Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1240/?format=api
{ "id": 1240, "url": "http://patchwork.ozlabs.org/api/patches/1240/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/200809240839.14902.arnd@arndb.de/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<200809240839.14902.arnd@arndb.de>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/200809240839.14902.arnd@arndb.de/", "date": "2008-09-24T06:39:14", "name": "remove bogus ppc_select syscall", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "7bbe449251674cf6aff0adb34d08a39c03e66050", "submitter": { "id": 30, "url": "http://patchwork.ozlabs.org/api/people/30/?format=api", "name": "Arnd Bergmann", "email": "arnd@arndb.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/200809240839.14902.arnd@arndb.de/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/1240/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1240/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Received": [ "from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 771BBDDEDA\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 24 Sep 2008 16:39:50 +1000 (EST)", "from moutng.kundenserver.de (moutng.kundenserver.de\n\t[212.227.126.183]) by ozlabs.org (Postfix) with ESMTP id C8FCCDDE11; \n\tWed, 24 Sep 2008 16:39:31 +1000 (EST)", "from klappe.local ([207.108.95.66])\n\tby mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis)\n\tid 0ML21M-1KiO221uDB-0007sU; Wed, 24 Sep 2008 08:39:27 +0200" ], "From": "Arnd Bergmann <arnd@arndb.de>", "To": "linuxppc-embedded@ozlabs.org,\n paulus@samba.org", "Subject": "[PATCH] remove bogus ppc_select syscall", "Date": "Wed, 24 Sep 2008 08:39:14 +0200", "User-Agent": "KMail/1.9.9", "References": "<7B7EF7F090B9804A830ACC82F2CDE95D56E206@insardxms01.ap.sony.com>\n\t<1222160853.12085.136.camel@pasglop>\n\t<200809240823.12484.arnd@arndb.de>", "In-Reply-To": "<200809240823.12484.arnd@arndb.de>", "X-Face": "I@=L^?./?$U, EK.)V[4*>`zSqm0>65YtkOe>TFD'!aw?7OVv#~5xd\\s,\n\t[~w]-J!)|%=]>=?utf-8?q?+=0A=09=7EohchhkRGW=3F=7C6=5FqTmkd=5Ft=3FLZC=23Q-=60=2E=60Y=2Ea=5E?=\n\t=?utf-8?q?3zb?=)\n\t=?utf-8?q?+U-JVN=5DWT=25cw=23=5BYo0=267C=26bL12wWGlZi=0A=09=7EJ=3B=5Cwg?=\n\t=?utf-8?q?=3B3zRnz?=,\n\tJ\"CT_)=\\H'1/{?SR7GDu?WIopm.HaBG=QYj\"NZD_[zrM\\Gip^U", "MIME-Version": "1.0", "Content-Disposition": "inline", "Message-Id": "<200809240839.14902.arnd@arndb.de>", "X-Provags-ID": "V01U2FsdGVkX1+OsH+5+4X+m1R9LRUbbddX/CeIvlj+aupjTw2\n\tqV5LR2z4Zm298XXJyEnQgD0kIBdbIKHhs3ikespolLqqmEm1uf\n\tE2J5Pzgma7IH1z7nh8tIw==", "Cc": "\"Sadashiiv, Halesh\" <halesh.sadashiv@ap.sony.com>,\n\tlinuxppc-dev@ozlabs.org", "X-BeenThere": "linuxppc-dev@ozlabs.org", "X-Mailman-Version": "2.1.11", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>", "List-Unsubscribe": "<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://ozlabs.org/pipermail/linuxppc-dev>", "List-Post": "<mailto:linuxppc-dev@ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@ozlabs.org?subject=help>", "List-Subscribe": "<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org" }, "content": "The ppc_select function was introduced in linux-2.3.48 in order to support\ncode confusing the legacy select() calling convention with the standard one.\nEven 11 years ago, all correctly built code should not have done this and\ncould have easily been phased out. Nothing that was compiled later should\nactually try to use the old_select interface, and it would have been broken\nalready on all ppc64 kernels with the syscall emulation layer.\n\nThis patch brings the 32 bit compat ABI and the native 32 bit ABI for\npowerpc into a consistent state, by removing support for both the\nold_select system call number and the handler for it.\n\nThe bug report triggering this came from Halesh Sadashiiv <halesh.sadashiv@ap.sony.com>, who discovered that the 32 bit\nimplementation of ppc_select would in case of a negative number\nof file descriptors incorrectly return -EFAULT instead of -EINVAL.\nThere seems to be no way to fix this problem in a way that would\nkeep broken pre-1997 binaries running.\n\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\nCc: Halesh Sadashiiv <halesh.sadashiv@ap.sony.com>\n---\n\nHalesh, please test this patch to make sure it fixes the problem\nyou reported. I do not have a ppc32 machine I can try this on.", "diff": "diff --git a/arch/powerpc/include/asm/unistd.h b/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 b/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(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)\ndiff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c\nindex 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 len,\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 __user *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-\t\tif (!access_ok(VERIFY_READ, buffer, 5*sizeof(unsigned long))\n-\t\t || __get_user(n, buffer)\n-\t\t || __get_user(inp, ((fd_set __user * __user *)(buffer+1)))\n-\t\t || __get_user(outp, ((fd_set __user * __user *)(buffer+2)))\n-\t\t || __get_user(exp, ((fd_set __user * __user *)(buffer+3)))\n-\t\t || __get_user(tvp, ((struct timeval __user * __user *)(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", "prefixes": [] }