Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Eugene Syromiatnikov
On Tue, Sep 10, 2019 at 04:46:15PM +0200, Christian Brauner wrote: > On Tue, Sep 10, 2019 at 04:39:44PM +0200, Oleg Nesterov wrote: > > On 09/10, Christian Brauner wrote: > > > On Tue, Sep 10, 2019 at 03:10:48PM +0200, Christian Brauner wrote: > > > > On Tue, Sep 10, 2019 at 03:09:35PM +0200,

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Christian Brauner
On Tue, Sep 10, 2019 at 04:39:44PM +0200, Oleg Nesterov wrote: > On 09/10, Christian Brauner wrote: > > On Tue, Sep 10, 2019 at 03:10:48PM +0200, Christian Brauner wrote: > > > On Tue, Sep 10, 2019 at 03:09:35PM +0200, Christian Brauner wrote: > > > > On Tue, Sep 10, 2019 at 02:44:41PM +0200, Oleg

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Oleg Nesterov
On 09/10, Christian Brauner wrote: > On Tue, Sep 10, 2019 at 03:10:48PM +0200, Christian Brauner wrote: > > On Tue, Sep 10, 2019 at 03:09:35PM +0200, Christian Brauner wrote: > > > On Tue, Sep 10, 2019 at 02:44:41PM +0200, Oleg Nesterov wrote: > > > > On 09/10, Eugene Syromiatnikov wrote: > > > >

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Eugene Syromiatnikov
On Tue, Sep 10, 2019 at 03:27:02PM +0200, Christian Brauner wrote: > On Tue, Sep 10, 2019 at 03:10:48PM +0200, Christian Brauner wrote: > > On Tue, Sep 10, 2019 at 03:09:35PM +0200, Christian Brauner wrote: > > > On Tue, Sep 10, 2019 at 02:44:41PM +0200, Oleg Nesterov wrote: > > > > On 09/10,

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Christian Brauner
On Tue, Sep 10, 2019 at 03:10:48PM +0200, Christian Brauner wrote: > On Tue, Sep 10, 2019 at 03:09:35PM +0200, Christian Brauner wrote: > > On Tue, Sep 10, 2019 at 02:44:41PM +0200, Oleg Nesterov wrote: > > > On 09/10, Eugene Syromiatnikov wrote: > > > > > > > > --- a/kernel/fork.c > > > > +++

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Christian Brauner
On Tue, Sep 10, 2019 at 03:09:35PM +0200, Christian Brauner wrote: > On Tue, Sep 10, 2019 at 02:44:41PM +0200, Oleg Nesterov wrote: > > On 09/10, Eugene Syromiatnikov wrote: > > > > > > --- a/kernel/fork.c > > > +++ b/kernel/fork.c > > > @@ -2562,6 +2562,9 @@ noinline static int > > >

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Christian Brauner
On Tue, Sep 10, 2019 at 02:44:41PM +0200, Oleg Nesterov wrote: > On 09/10, Eugene Syromiatnikov wrote: > > > > --- a/kernel/fork.c > > +++ b/kernel/fork.c > > @@ -2562,6 +2562,9 @@ noinline static int copy_clone_args_from_user(struct > > kernel_clone_args *kargs, > > if (copy_from_user(,

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Oleg Nesterov
On 09/10, Eugene Syromiatnikov wrote: > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -2562,6 +2562,9 @@ noinline static int copy_clone_args_from_user(struct > kernel_clone_args *kargs, > if (copy_from_user(, uargs, size)) > return -EFAULT; > > + if

Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Dmitry V. Levin
On Tue, Sep 10, 2019 at 12:57:11PM +0100, Eugene Syromiatnikov wrote: > Previously, higher 32 bits of exit_signal fields were lost when > copied to the kernel args structure (that uses int as a type for the > respective field). Fail with EINVAL if these are set as it looks like > there's no sane

[PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

2019-09-10 Thread Eugene Syromiatnikov
Previously, higher 32 bits of exit_signal fields were lost when copied to the kernel args structure (that uses int as a type for the respective field). Fail with EINVAL if these are set as it looks like there's no sane reason to accept them. * kernel/fork.c (copy_clone_args_from_user): Fail with