Re: pselect/etc semantics

From: Arnd Bergmann
Date: Thu May 30 2019 - 14:32:20 EST


On Thu, May 30, 2019 at 3:54 AM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
> Arnd Bergmann <arnd@xxxxxxxx> writes:
> > On Wed, May 29, 2019 at 6:12 PM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> >
> > Not sure about the order of the cleanups, but probably something like
> > this would work:
> >
> > 1. fix the race (to be backported)
> > 2. unify set_compat_user_sigmask/set_user_sigmask
> > 3. remove unneeded compat handlers
> > 4. replace restore_user_sigmask with restore_saved_sigmask_if()
> > 5. also unify compat_get_fd_set()/get_fd_set() and kill off
> > compat select() variants.
>
> Are new system calls added preventing a revert of the patch in question
> for stable kernels?

Yes, a straight revert would not work, as it was done as a cleanup in
order to simplify the following conversion. I suppose one could undo
the cleanup in both the time32 and time64 versions of each syscall,
but I would consider that a more risky change than just fixing the
bug that was reported.

Arnd