lkml.org 
[lkml]   [2016]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
Hi Oleg,

On Thu, Nov 17, 2016 at 08:04:20PM +0100, Oleg Nesterov wrote:
> On 11/16, Jamie Iles wrote:
> >
> > This can result in init becoming stoppable/killable after tracing. For
> > example, running:
> >
> > while true; do kill -STOP 1; done &
> > strace -p 1
>
> > and then stopping strace and the kill loop will result in init being
> > left in state TASK_STOPPED. Sending SIGCONT to init will resume it, but
> > init will now respond to future SIGSTOP signals rather than ignoring
> > them.
>
> Yes, and a lot more... I forgot about these problems again.
>
> Jamie, sorry for delay, I'll try to read the patch and reply tomorrow.

Did you get chance to look at the patch? I did have another thought -
rather than the accessors, we could change signal_struct to have:

unsigned int unkillable:1;
unsigned int flags:31;

to separate signal_unkillable from flags, making it a bit safer in the
future.

Jamie

\
 
 \ /
  Last update: 2016-11-28 13:16    [W:0.319 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site