Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1260/?format=api
{ "id": 1260, "url": "http://patchwork.ozlabs.org/api/patches/1260/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-embedded/patch/7B7EF7F090B9804A830ACC82F2CDE95D56E615@insardxms01.ap.sony.com/", "project": { "id": 5, "url": "http://patchwork.ozlabs.org/api/projects/5/?format=api", "name": "Linux PowerPC Embedded development", "link_name": "linuxppc-embedded", "list_id": "linuxppc-embedded.ozlabs.org", "list_email": "linuxppc-embedded@ozlabs.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<7B7EF7F090B9804A830ACC82F2CDE95D56E615@insardxms01.ap.sony.com>", "list_archive_url": null, "date": "2008-09-24T09:12:22", "name": "remove bogus ppc_select syscall", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f6a36b390d32e1030effa36605b642541fcf2e81", "submitter": { "id": 428, "url": "http://patchwork.ozlabs.org/api/people/428/?format=api", "name": "Halesh S", "email": "halesh.sadashiv@ap.sony.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-embedded/patch/7B7EF7F090B9804A830ACC82F2CDE95D56E615@insardxms01.ap.sony.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/1260/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1260/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-embedded-bounces+patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-embedded@ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-embedded@ozlabs.org" ], "Received": [ "from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id B94DCDDFE7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 24 Sep 2008 19:13:33 +1000 (EST)", "from IE1EHSOBE005.bigfish.com (outbound-dub.frontbridge.com\n\t[213.199.154.16]) by ozlabs.org (Postfix) with ESMTP id 86956DDE25;\n\tWed, 24 Sep 2008 19:13:20 +1000 (EST)", "from mail20-dub-R.bigfish.com (10.5.252.3) by\n\tIE1EHSOBE005.bigfish.com (10.5.252.25) with Microsoft SMTP Server id\n\t8.1.240.5; Wed, 24 Sep 2008 09:13:14 +0000", "from mail20-dub (localhost.localdomain [127.0.0.1])\tby\n\tmail20-dub-R.bigfish.com (Postfix) with ESMTP id 7A9B014181F8;\n\tWed, 24 Sep 2008 09:13:14 +0000 (UTC)", "by mail20-dub (MessageSwitch) id 1222247592543814_388; Wed, 24 Sep\n\t2008 09:13:12 +0000 (UCT)", "from sggdcex1ns01.sony.com.sg (sggdcex1ns01.sony.com.sg\n\t[121.100.32.134])\t(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA\n\t(168/168\n\tbits))\t(No client certificate requested)\tby mail20-dub.bigfish.com\n\t(Postfix)\n\twith ESMTP id CE4A4380075;\tWed, 24 Sep 2008 09:13:11 +0000 (UTC)", "from sggdcwn1vs01.sony.com.sg (sggdcwn1vs01 [43.68.8.23])\tby\n\tsggdcex1ns01.sony.com.sg (8.13.7+Sun/8.13.7) with SMTP id\n\tm8O9CvUj002454; Wed, 24 Sep 2008 17:12:58 +0800 (SGT)", "from (sgsesgdcid01.sony.com.sg [43.68.8.1]) by\n\tsggdcwn1vs01.sony.com.sg with smtp\t id\n\t1167_fa35f738_8a18_11dd_904b_001372631f16;\n\tWed, 24 Sep 2008 17:12:57 +0800", "from sgapxbh04.ap.sony.com ([43.68.15.49])\tby\n\tsgsesgdcid01.sony.com.sg (8.13.7+Sun/8.13.7) with ESMTP id\n\tm8O9CvDc003739; Wed, 24 Sep 2008 17:12:57 +0800 (SGT)", "from insardxms01.ap.sony.com ([43.88.102.10]) by\n\tsgapxbh04.ap.sony.com with Microsoft SMTPSVC(6.0.3790.3959);\n\tWed, 24 Sep 2008 17:12:40 +0800" ], "X-BigFish": "VPS-32(zz542N1432Ra0dJ936fO9371P1127izzzzz2dh6bh61h)", "X-Spam-TCS-SCL": "0:0", "X-MimeOLE": "Produced By Microsoft MimeOLE V6.00.3790.4325", "Content-Class": "urn:content-classes:message", "MIME-Version": "1.0", "Subject": "RE: [PATCH] remove bogus ppc_select syscall", "Importance": "normal", "Priority": "normal", "Date": "Wed, 24 Sep 2008 14:42:22 +0530", "Message-ID": "<7B7EF7F090B9804A830ACC82F2CDE95D56E615@insardxms01.ap.sony.com>", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "Thread-Topic": "[PATCH] remove bogus ppc_select syscall", "Thread-Index": "AckeEL3kAcgEZ/4fTkulZxtmUxUchQAEnOFA", "From": "\"Sadashiiv, Halesh\" <halesh.sadashiv@ap.sony.com>", "To": "\"Arnd Bergmann\" <arnd@arndb.de>, <linuxppc-embedded@ozlabs.org>,\n\t<paulus@samba.org>", "X-OriginalArrivalTime": "24 Sep 2008 09:12:40.0867 (UTC)\n\tFILETIME=[B22CBF30:01C91E25]", "Cc": "linuxppc-dev@ozlabs.org", "X-BeenThere": "linuxppc-embedded@ozlabs.org", "X-Mailman-Version": "2.1.11", "Precedence": "list", "List-Id": "Linux on Embedded PowerPC Developers Mail List\n\t<linuxppc-embedded.ozlabs.org>", "List-Unsubscribe": "<https://ozlabs.org/mailman/options/linuxppc-embedded>,\n\t<mailto:linuxppc-embedded-request@ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://ozlabs.org/pipermail/linuxppc-embedded>", "List-Post": "<mailto:linuxppc-embedded@ozlabs.org>", "List-Help": "<mailto:linuxppc-embedded-request@ozlabs.org?subject=help>", "List-Subscribe": "<https://ozlabs.org/mailman/listinfo/linuxppc-embedded>,\n\t<mailto:linuxppc-embedded-request@ozlabs.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "linuxppc-embedded-bounces+patchwork-incoming=ozlabs.org@ozlabs.org", "Errors-To": "linuxppc-embedded-bounces+patchwork-incoming=ozlabs.org@ozlabs.org" }, "content": "I have tested the provided patch on PPC32 with little modifications.\n\nTest passed on the PPC32.\n\nModification to Arnd's Patch: \n\tIn systbl.h you have changed \n\t\t-SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)\n\t\t+SYSCALL(sys_ni_syscall)\n\n\tThat has to be\n\t\t-SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)\n\t\t+SYSCALL(ni_syscall)\n\nWhich failed the kernel build. It's a typo from your side I think.\nAfter fixing it build went fine.\n\nSigned-off-by: Halesh Sadashiv <halesh.sadashiv@ap.sony.com>\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\n\n-\treturn sys_select(n, inp, outp, exp, tvp);\n-}\n-#endif\n-\n #ifdef CONFIG_PPC64\n long ppc64_personality(unsigned long personality) {\n\nThanks\nHalesh\n\n\n\n\n>-----Original Message-----\n>From: Arnd Bergmann [mailto:arnd@arndb.de]\n>Sent: Wednesday, September 24, 2008 12:09 PM\n>To: linuxppc-embedded@ozlabs.org; paulus@samba.org\n>Cc: benh@kernel.crashing.org; Sadashiiv, Halesh;\nlinuxppc-dev@ozlabs.org\n>Subject: [PATCH] remove bogus ppc_select syscall\n>\n>The ppc_select function was introduced in linux-2.3.48 in order to\nsupport\n>code confusing the legacy select() calling convention with the standard\none.\n>Even 11 years ago, all correctly built code should not have done this\nand\n>could have easily been phased out. Nothing that was compiled later\nshould\n>actually try to use the old_select interface, and it would have been\nbroken\n>already on all ppc64 kernels with the syscall emulation layer.\n>\n>This patch brings the 32 bit compat ABI and the native 32 bit ABI for\n>powerpc into a consistent state, by removing support for both the\n>old_select system call number and the handler for it.\n>\n>The bug report triggering this came from Halesh Sadashiiv\n><halesh.sadashiv@ap.sony.com>, who discovered that the 32 bit\n>implementation of ppc_select would in case of a negative number\n>of file descriptors incorrectly return -EFAULT instead of -EINVAL.\n>There seems to be no way to fix this problem in a way that would\n>keep broken pre-1997 binaries running.\n>\n>Signed-off-by: Arnd Bergmann <arnd@arndb.de>\n>Cc: Halesh Sadashiiv <halesh.sadashiv@ap.sony.com>\n>---\n>\n>Halesh, please test this patch to make sure it fixes the problem\n>you reported. I do not have a ppc32 machine I can try this on.\n>\n>diff --git a/arch/powerpc/include/asm/unistd.h\nb/arch/powerpc/include/asm/unistd.h\n>index e07d0c7..46107cc 100644\n>--- a/arch/powerpc/include/asm/unistd.h\n>+++ b/arch/powerpc/include/asm/unistd.h\n>@@ -92,7 +92,7 @@\n> #define __NR_settimeofday 79\n> #define __NR_getgroups 80\n> #define __NR_setgroups 81\n>-#define __NR_select 82\n>+/* Number 82 was the old (pre-1.3.x) select */\n> #define __NR_symlink 83\n> #define __NR_oldlstat 84\n> #define __NR_readlink 85\n>diff --git a/arch/powerpc/include/asm/systbl.h\n>b/arch/powerpc/include/asm/systbl.h\n>index f6cc7a4..5a69b32 100644\n>--- a/arch/powerpc/include/asm/systbl.h\n>+++ b/arch/powerpc/include/asm/systbl.h\n>@@ -85,7 +85,7 @@ COMPAT_SYS_SPU(gettimeofday)\n> COMPAT_SYS_SPU(settimeofday)\n> COMPAT_SYS_SPU(getgroups)\n> COMPAT_SYS_SPU(setgroups)\n>-SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)\n>+SYSCALL(sys_ni_syscall)\n> SYSCALL_SPU(symlink)\n> OLDSYS(lstat)\n> COMPAT_SYS_SPU(readlink)\n>@@ -145,7 +145,7 @@ SYSCALL_SPU(setfsuid)\n> SYSCALL_SPU(setfsgid)\n> SYSCALL_SPU(llseek)\n> COMPAT_SYS_SPU(getdents)\n>-SYSX_SPU(sys_select,ppc32_select,ppc_select)\n>+SYSX_SPU(sys_select,ppc32_select,sys_select)\n> SYSCALL_SPU(flock)\n> SYSCALL_SPU(msync)\n> COMPAT_SYS_SPU(readv)\n>diff --git a/arch/powerpc/kernel/syscalls.c\n>b/arch/powerpc/kernel/syscalls.c\n>index c04832c..c2e6a74 100644\n>--- a/arch/powerpc/kernel/syscalls.c\n>+++ b/arch/powerpc/kernel/syscalls.c\n>@@ -183,31 +183,6 @@ unsigned long sys_mmap(unsigned long addr, size_t\nlen,\n> \treturn do_mmap2(addr, len, prot, flags, fd, offset, PAGE_SHIFT);\n> }\n>\n>-#ifdef CONFIG_PPC32\n>-/*\n>- * Due to some executables calling the wrong select we sometimes\n>- * get wrong args. This determines how the args are being passed\n>- * (a single ptr to them all args passed) then calls\n>- * sys_select() with the appropriate args. -- Cort\n>- */\n>-int\n>-ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set\n__user\n>*exp, struct timeval __user *tvp)\n>-{\n>-\tif ( (unsigned long)n >= 4096 )\n>-\t{\n>-\t\tunsigned long __user *buffer = (unsigned long __user\n*)n;\n>-\t\tif (!access_ok(VERIFY_READ, buffer, 5*sizeof(unsigned\nlong))\n>-\t\t || __get_user(n, buffer)\n>-\t\t || __get_user(inp, ((fd_set __user * __user\n*)(buffer+1)))\n>-\t\t || __get_user(outp, ((fd_set __user * __user\n>*)(buffer+2)))\n>-\t\t || __get_user(exp, ((fd_set __user * __user\n*)(buffer+3)))\n>-\t\t || __get_user(tvp, ((struct timeval __user * __user\n>*)(buffer+4))))\n>-\t\t\treturn -EFAULT;\n>-\t}\n>-\treturn sys_select(n, inp, outp, exp, tvp);\n>-}\n>-#endif\n>-\n> #ifdef CONFIG_PPC64\n> long ppc64_personality(unsigned long personality)\n> {\n\n\n\n-------------------------------------------------------------------\nThis email is confidential and intended only for the use of the individual or entity named above and may contain information that is privileged. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or telephone and destroy the original message. - This mail is sent via Sony Asia Pacific Mail Gateway.\n-------------------------------------------------------------------", "diff": "diff --git a/arch/powerpc/include/asm/unistd.h\nb/arch/powerpc/include/asm/unistd.h\nindex e07d0c7..46107cc 100644\n--- a/arch/powerpc/include/asm/unistd.h\n+++ b/arch/powerpc/include/asm/unistd.h\n@@ -92,7 +92,7 @@\n #define __NR_settimeofday 79\n #define __NR_getgroups 80\n #define __NR_setgroups 81\n-#define __NR_select 82\n+/* Number 82 was the old (pre-1.3.x) select */\n #define __NR_symlink 83\n #define __NR_oldlstat 84\n #define __NR_readlink 85\ndiff --git a/arch/powerpc/include/asm/systbl.h\nb/arch/powerpc/include/asm/systbl.h\nindex f6cc7a4..5a69b32 100644\n--- a/arch/powerpc/include/asm/systbl.h\n+++ b/arch/powerpc/include/asm/systbl.h\n@@ -85,7 +85,7 @@ COMPAT_SYS_SPU(gettimeofday)\n COMPAT_SYS_SPU(settimeofday)\n COMPAT_SYS_SPU(getgroups)\n COMPAT_SYS_SPU(setgroups)\n-SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)\n+SYSCALL(ni_syscall)\n SYSCALL_SPU(symlink)\n OLDSYS(lstat)\n COMPAT_SYS_SPU(readlink)\n@@ -145,7 +145,7 @@ SYSCALL_SPU(setfsuid)\n SYSCALL_SPU(setfsgid)\n SYSCALL_SPU(llseek)\n COMPAT_SYS_SPU(getdents)\n-SYSX_SPU(sys_select,ppc32_select,ppc_select)\n+SYSX_SPU(sys_select,ppc32_select,sys_select)\n SYSCALL_SPU(flock)\n SYSCALL_SPU(msync)\n COMPAT_SYS_SPU(readv)\ndiff --git a/arch/powerpc/kernel/syscalls.c\nb/arch/powerpc/kernel/syscalls.c index c04832c..c2e6a74 100644\n--- a/arch/powerpc/kernel/syscalls.c\n+++ b/arch/powerpc/kernel/syscalls.c\n@@ -183,31 +183,6 @@ unsigned long sys_mmap(unsigned long addr, size_t\nlen,\n \treturn do_mmap2(addr, len, prot, flags, fd, offset, PAGE_SHIFT);\n}\n \n-#ifdef CONFIG_PPC32\n-/*\n- * Due to some executables calling the wrong select we sometimes\n- * get wrong args. This determines how the args are being passed\n- * (a single ptr to them all args passed) then calls\n- * sys_select() with the appropriate args. -- Cort\n- */\n-int\n-ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set\n__user *exp, struct timeval __user *tvp) -{\n-\tif ( (unsigned long)n >= 4096 )\n-\t{\n-\t\tunsigned long __user *buffer = (unsigned long __user\n*)n;\n-\t\tif (!access_ok(VERIFY_READ, buffer, 5*sizeof(unsigned\nlong))\n-\t\t || __get_user(n, buffer)\n-\t\t || __get_user(inp, ((fd_set __user * __user\n*)(buffer+1)))\n-\t\t || __get_user(outp, ((fd_set __user * __user\n*)(buffer+2)))\n-\t\t || __get_user(exp, ((fd_set __user * __user\n*)(buffer+3)))\n-\t\t || __get_user(tvp, ((struct timeval __user * __user\n*)(buffer+4))))\n-\t\t\treturn -EFAULT;\n-\t}\n", "prefixes": [] }