[PATCH v2] powerpc/32: remove bogus ppc_select syscall

Arnd Bergmann arnd at arndb.de
Fri Mar 5 02:17:55 AEDT 2021


On Thu, Mar 4, 2021 at 1:51 PM Christophe Leroy
<christophe.leroy at csgroup.eu> wrote:
>
> From: Arnd Bergmann <arnd at arndb.de>
>
> The ppc_select function was introduced in linux-2.3.48 in order to support
> code confusing the legacy select() calling convention with the standard one.
> Even 24 years ago, all correctly built code should not have done this and
> could have easily been phased out. Nothing that was compiled later should
> actually try to use the old_select interface, and it would have been broken
> already on all ppc64 kernels with the syscall emulation layer.
>
> This patch brings the 32 bit compat ABI and the native 32 bit ABI for
> powerpc into a consistent state, by removing support for both the
> old_select system call number and the handler for it.
>
> The bug report triggering this came from
> Halesh Sadashiiv <halesh.sadashiv at ap.sony.com>, who discovered that the
> 32 bit implementation of ppc_select would in case of a negative number
> of file descriptors incorrectly return -EFAULT instead of -EINVAL.
> There seems to be no way to fix this problem in a way that would
> keep broken pre-1997 binaries running.
>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> Cc: Halesh Sadashiiv <halesh.sadashiv at ap.sony.com>
> [chleroy: Rebased and updated the number of years elapsed in the commit message]
> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
> ---
> First version was in 2008, at that time it was rejected, see
> http://patchwork.ozlabs.org/project/linuxppc-dev/patch/200809240839.14902.arnd@arndb.de/

The patch from 2008 did two things:

- it removed the ppc32 specific 'select' syscall at #82
- it fixed the generic '_newselect' syscall at #142

Back then, the decision was to only address the second issue, which
got merged in commit dad2f2fb0fc7 ("powerpc: Fix wrong error code from
ppc32 select syscall").

It is probably ok to remove the old select system call now, but
my changelog text no longer makes sense, as the patch has nothing
to do with the bug that was reported back then.

       Arnd


More information about the Linuxppc-dev mailing list