Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
On Fri, 2018-08-03 at 08:34 -0500, Eric W. Biederman wrote: > From the other direction I think we can just go ahead and fix handling > of the job control stop signals as well. As far as I understand it > there is a legitimate complaint that SIGTSTP SIGTTIN SIGTTOU do not work > on a pid namespace

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Eric W. Biederman
Jürg Billeter writes: > On Wed, 2018-08-01 at 16:19 +0200, Oleg Nesterov wrote: >> On 07/31, Jürg Billeter wrote: >> > >> > > Could you explain your use-case? Why a shell wants to use >> > > CLONE_NEWPID? >> > >> > To guarantee that there won't be any runaway processes, i.e., ensure >> > that n

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Oleg Nesterov
On 08/03, Jürg Billeter wrote: > > On Wed, 2018-08-01 at 16:19 +0200, Oleg Nesterov wrote: > > On 07/31, Jürg Billeter wrote: > > > > > > > Could you explain your use-case? Why a shell wants to use > > > > CLONE_NEWPID? > > > > > > To guarantee that there won't be any runaway processes, i.e., ensur

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-03 Thread Jürg Billeter
On Wed, 2018-08-01 at 16:19 +0200, Oleg Nesterov wrote: > On 07/31, Jürg Billeter wrote: > > > > > Could you explain your use-case? Why a shell wants to use > > > CLONE_NEWPID? > > > > To guarantee that there won't be any runaway processes, i.e., ensure > > that no descendants (background helper

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-08-01 Thread Oleg Nesterov
On 07/31, Jürg Billeter wrote: > > > Could you explain your use-case? Why a shell wants to use > > CLONE_NEWPID? > > To guarantee that there won't be any runaway processes, i.e., ensure > that no descendants (background helper daemons or misbehaving > processes) survive when the child process is te

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-07-31 Thread Jürg Billeter
On Tue, 2018-07-31 at 16:39 +0200, Oleg Nesterov wrote: > On 07/31, Jürg Billeter wrote: > > SIGINT, SIGQUIT and SIGTSTP are used in job control for ^C, ^\, ^Z. > > While a task with the SIGNAL_UNKILLABLE flag could install handlers for > > these signals, this is not sufficient to implement a shell

Re: [PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-07-31 Thread Oleg Nesterov
On 07/31, Jürg Billeter wrote: > > PR_SET_KILLABLE clears the SIGNAL_UNKILLABLE flag. This allows > CLONE_NEWPID tasks to restore normal signal behavior, opting out of the > special signal protection for init processes. This prctl does not allow > setting the SIGNAL_UNKILLABLE flag, only clearing.

[PATCH v2] prctl: add PR_[GS]ET_KILLABLE

2018-07-31 Thread Jürg Billeter
PR_SET_KILLABLE clears the SIGNAL_UNKILLABLE flag. This allows CLONE_NEWPID tasks to restore normal signal behavior, opting out of the special signal protection for init processes. This prctl does not allow setting the SIGNAL_UNKILLABLE flag, only clearing. The SIGNAL_UNKILLABLE flag, which is imp