Re: [PATCHv2] signal: protect SIGNAL_UNKILLABLE from unintentional clearing.

From: Oleg Nesterov
Date: Thu Jan 05 2017 - 13:21:14 EST


On 01/04, 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.

and to SIGKILL.

Another problem is that /sbin/init should ignore SIGKILL even when ptraced,
but this needs another patch, will try to do tomorrow. And yet another problem
with force_sig(), it should probably take ptrace and/or SIGTRAP into account.

Thanks Jamie,

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>