On Thu, Feb 25, 2016 at 09:11:44AM +0100, Peter Zijlstra wrote:
> > Out of curiousity - where did that stray wakeup come from? PTRACE_KILL
> > used to trigger those, but that got fixed. How does one trigger that
> > kind of bugs on the current kernels?
>
> Its a regular TASK_INTERRUPTIBLE
On Thu, Feb 25, 2016 at 09:11:44AM +0100, Peter Zijlstra wrote:
> > Out of curiousity - where did that stray wakeup come from? PTRACE_KILL
> > used to trigger those, but that got fixed. How does one trigger that
> > kind of bugs on the current kernels?
>
> Its a regular TASK_INTERRUPTIBLE
On Thu, Feb 25, 2016 at 03:18:52AM +, Al Viro wrote:
> On Mon, Jan 25, 2016 at 08:09:15PM +0100, Oleg Nesterov wrote:
> > On 01/25, Sasha Levin wrote:
> > >
> > > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> > > being set.
> >
> > and TIF_RESTORE_SIGMASK is just
On Thu, Feb 25, 2016 at 03:18:52AM +, Al Viro wrote:
> On Mon, Jan 25, 2016 at 08:09:15PM +0100, Oleg Nesterov wrote:
> > On 01/25, Sasha Levin wrote:
> > >
> > > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> > > being set.
> >
> > and TIF_RESTORE_SIGMASK is just
On Mon, Jan 25, 2016 at 08:09:15PM +0100, Oleg Nesterov wrote:
> On 01/25, Sasha Levin wrote:
> >
> > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> > being set.
>
> and TIF_RESTORE_SIGMASK is just wrong in this case. I'd say this is the
> bugfix, not work-around ;)
>
>
On Mon, Jan 25, 2016 at 08:09:15PM +0100, Oleg Nesterov wrote:
> On 01/25, Sasha Levin wrote:
> >
> > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> > being set.
>
> and TIF_RESTORE_SIGMASK is just wrong in this case. I'd say this is the
> bugfix, not work-around ;)
>
>
On 01/27, Andrew Morton wrote:
>
> On Wed, 27 Jan 2016 17:41:54 +0100 Oleg Nesterov wrote:
>
> > IOW, signal_pending() is the "special" condition, you do not need to
> > serialize
> > this check with task->state setting, exactly because schedule() knows about
> > the
> > signals.
>
> So it's
On Wed, 27 Jan 2016 17:41:54 +0100 Oleg Nesterov wrote:
> > But it did get me to
> > look at the patch again:
> >
> > + while (!signal_pending(current)) {
> > + __set_current_state(TASK_INTERRUPTIBLE);
> > + schedule();
> > + }
> >
> > That should very
On Wed, Jan 27, 2016 at 05:41:54PM +0100, Oleg Nesterov wrote:
> Why? It should work either way. Yes, signal_wakeup() can come right before
> __set_current_state(TASK_INTERRUPTIBLE) but this is fine, __schedule() must
> not
> sleep if signal_pending() == T,
Urgh yes, I always forget this :/
On 01/27/2016 03:44 AM, Peter Zijlstra wrote:
> On Tue, Jan 26, 2016 at 10:10:09PM +0100, Oleg Nesterov wrote:
>
>> 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
On 01/27, Peter Zijlstra wrote:
>
> On Tue, Jan 26, 2016 at 10:10:09PM +0100, Oleg Nesterov wrote:
>
> > 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
On Tue, Jan 26, 2016 at 10:10:09PM +0100, Oleg Nesterov wrote:
> 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
On 01/27, Peter Zijlstra wrote:
>
> On Tue, Jan 26, 2016 at 10:10:09PM +0100, Oleg Nesterov wrote:
>
> > 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
On Wed, Jan 27, 2016 at 05:41:54PM +0100, Oleg Nesterov wrote:
> Why? It should work either way. Yes, signal_wakeup() can come right before
> __set_current_state(TASK_INTERRUPTIBLE) but this is fine, __schedule() must
> not
> sleep if signal_pending() == T,
Urgh yes, I always forget this :/
On 01/27/2016 03:44 AM, Peter Zijlstra wrote:
> On Tue, Jan 26, 2016 at 10:10:09PM +0100, Oleg Nesterov wrote:
>
>> 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
On Wed, 27 Jan 2016 17:41:54 +0100 Oleg Nesterov wrote:
> > But it did get me to
> > look at the patch again:
> >
> > + while (!signal_pending(current)) {
> > + __set_current_state(TASK_INTERRUPTIBLE);
> > + schedule();
> > + }
> >
> >
On 01/27, Andrew Morton wrote:
>
> On Wed, 27 Jan 2016 17:41:54 +0100 Oleg Nesterov wrote:
>
> > IOW, signal_pending() is the "special" condition, you do not need to
> > serialize
> > this check with task->state setting, exactly because schedule() knows about
> > the
> >
On Tue, Jan 26, 2016 at 10:10:09PM +0100, Oleg Nesterov wrote:
> 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
On 01/25, Andrew Morton wrote:
>
> On Mon, 25 Jan 2016 10:21:46 -0500 Sasha Levin 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
On 01/26, Ingo Molnar wrote:
>
> * Sasha Levin 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.
> >
> > Signed-off-by: Sasha Levin
> > ---
> > kernel/signal.c |6
On 01/26, Ingo Molnar wrote:
>
> * Sasha Levin 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.
> >
> > Signed-off-by: Sasha Levin
On 01/25, Andrew Morton wrote:
>
> On Mon, 25 Jan 2016 10:21:46 -0500 Sasha Levin 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
* Sasha Levin 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.
>
> Signed-off-by: Sasha Levin
> ---
> kernel/signal.c |6 --
> 1 file changed, 4 insertions(+), 2
On Mon, 25 Jan 2016 10:21:46 -0500 Sasha Levin 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
On Mon, Jan 25, 2016 at 08:09:15PM +0100, Oleg Nesterov wrote:
> On 01/25, Sasha Levin wrote:
> >
> > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> > being set.
>
> and TIF_RESTORE_SIGMASK is just wrong in this case. I'd say this is the
> bugfix, not work-around ;)
On 01/25, Sasha Levin wrote:
>
> A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> being set.
and TIF_RESTORE_SIGMASK is just wrong in this case. I'd say this is the
bugfix, not work-around ;)
> Avoid that by making sure we were signaled, like sys_pause() does.
>
>
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.
Signed-off-by: Sasha Levin
---
kernel/signal.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/signal.c
* Sasha Levin 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.
>
> Signed-off-by: Sasha Levin
> ---
> kernel/signal.c |6
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.
Signed-off-by: Sasha Levin
---
kernel/signal.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
On Mon, 25 Jan 2016 10:21:46 -0500 Sasha Levin 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
On 01/25, Sasha Levin wrote:
>
> A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> being set.
and TIF_RESTORE_SIGMASK is just wrong in this case. I'd say this is the
bugfix, not work-around ;)
> Avoid that by making sure we were signaled, like sys_pause() does.
>
>
On Mon, Jan 25, 2016 at 08:09:15PM +0100, Oleg Nesterov wrote:
> On 01/25, Sasha Levin wrote:
> >
> > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING
> > being set.
>
> and TIF_RESTORE_SIGMASK is just wrong in this case. I'd say this is the
> bugfix, not work-around ;)
32 matches
Mail list logo