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

2018-08-01 Thread Jann Horn
On Wed, Aug 1, 2018 at 9:44 AM Jürg Billeter wrote: > > On Tue, 2018-07-31 at 18:26 +0200, Jann Horn wrote: > > On Mon, Jul 30, 2018 at 10:01 AM Jürg Billeter wrote: > > > > [...] > > > diff --git a/kernel/sys.c b/kernel/sys.c > > > index 38509dc1f77b..264de630d548 100644 > > > --- a/kernel/sys.c

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

2018-08-01 Thread Jürg Billeter
On Tue, 2018-07-31 at 18:26 +0200, Jann Horn wrote: > On Mon, Jul 30, 2018 at 10:01 AM Jürg Billeter wrote: > > [...] > > diff --git a/kernel/sys.c b/kernel/sys.c > > index 38509dc1f77b..264de630d548 100644 > > --- a/kernel/sys.c > > +++ b/kernel/sys.c > > [...] > > + case PR_SET_KILLABLE:

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

2018-07-31 Thread Jann Horn
On Mon, Jul 30, 2018 at 10:01 AM 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 is required for job control in a shell that us

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

2018-07-30 Thread Thomas Gleixner
On Mon, 30 Jul 2018, Jürg Billeter wrote: > On Mon, 2018-07-30 at 12:17 +0200, Oleg Nesterov wrote: > > On 07/30, Jürg Billeter wrote: > > > > > > This is required for job control in a shell that uses CLONE_NEWPID for > > > child processes. > > > > Could you explain in more details? > > The SIG

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

2018-07-30 Thread Jürg Billeter
On Mon, 2018-07-30 at 12:17 +0200, Oleg Nesterov wrote: > On 07/30, Jürg Billeter wrote: > > > > This is required for job control in a shell that uses CLONE_NEWPID for > > child processes. > > Could you explain in more details? The SIGNAL_UNKILLABLE flag, which is implicitly set for tasks cloned

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

2018-07-30 Thread Oleg Nesterov
On 07/30, Jürg Billeter wrote: > > This is required for job control in a shell that uses CLONE_NEWPID for > child processes. Could you explain in more details? > + case PR_SET_KILLABLE: > + if (arg2 != 1 || arg3 || arg4 || arg5) > + return -EINVAL; > +

[PATCH] prctl: add PR_[GS]ET_KILLABLE

2018-07-30 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 is required for job control in a shell that uses CLONE_NEWPID for child processes. This prctl does not allow se