lkml.org 
[lkml]   [2016]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] signals: work around random wakeups in sigsuspend()
On 01/25, Andrew Morton wrote:
>
> On Mon, 25 Jan 2016 10:21:46 -0500 Sasha Levin <sasha.levin@oracle.com> wrote:
>
> > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> > being set.
> >
> > Avoid that by making sure we were signaled, like sys_pause() does.
>
> What we're lacking here is any description of the end-user-visible
> effects of the bug.

The warning in dmesg and -ERESTARTNOHAND which we should never return to user
space, although I bet nobody checks the error code returned by sigsuspend().

Plus, of course, sys_sigsuspend() can return while it should not.

> Enough for people to be able to decide (and to
> recognize!) whether their kernel needs this patch.</stdrefrain>

I don't think this problem is really serious, plus it is very unlikely. The
spurious return from sigsuspend() should not really hurt.

And, ironically, there is another more serious "reverse" problem ;) sigsuspend()
orany other user of -ERESTARTNOHAND can "miss" the signal, in a sense that the
kernel can wrongly restart this syscall after return from signal handler. This
is not trivial to fix..

Oleg.

\
 
 \ /
  Last update: 2016-01-26 22:41    [W:0.111 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site