Re: [RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-05 Thread Oleg Nesterov
On 04/05, Eric W. Biederman wrote: > > Oleg Nesterov writes: > > I agree that changing userspace semantics is something to be very > careful with. But at least for purposes of discussion I think this is a > good patch. I agree that we need it with your approach, but imo it

Re: [RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-05 Thread Oleg Nesterov
On 04/05, Eric W. Biederman wrote: > > Oleg Nesterov writes: > > I agree that changing userspace semantics is something to be very > careful with. But at least for purposes of discussion I think this is a > good patch. I agree that we need it with your approach, but imo it would be much better

Re: [RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-05 Thread Eric W. Biederman
Oleg Nesterov writes: > On 04/02, Eric W. Biederman wrote: >> >> --- a/kernel/fork.c >> +++ b/kernel/fork.c >> @@ -1515,6 +1515,13 @@ static __latent_entropy struct task_struct >> *copy_process( >> if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND)) >>

Re: [RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-05 Thread Eric W. Biederman
Oleg Nesterov writes: > On 04/02, Eric W. Biederman wrote: >> >> --- a/kernel/fork.c >> +++ b/kernel/fork.c >> @@ -1515,6 +1515,13 @@ static __latent_entropy struct task_struct >> *copy_process( >> if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND)) >> return

Re: [RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-05 Thread Oleg Nesterov
On 04/02, Eric W. Biederman wrote: > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -1515,6 +1515,13 @@ static __latent_entropy struct task_struct > *copy_process( > if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND)) > return ERR_PTR(-EINVAL); > > + /*

Re: [RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-05 Thread Oleg Nesterov
On 04/02, Eric W. Biederman wrote: > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -1515,6 +1515,13 @@ static __latent_entropy struct task_struct > *copy_process( > if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND)) > return ERR_PTR(-EINVAL); > > + /*

[RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-02 Thread Eric W. Biederman
Old threading libraries used CLONE_SIGHAND without clone thread. Modern threadding libraries always use CLONE_SIGHAND | CLONE_THREAD. Therefore let's simplify our lives and stop supporting a case no one cares about. Signed-off-by: "Eric W. Biederman" --- kernel/fork.c

[RFC][PATCH v2 3/5] clone: Disallown CLONE_THREAD with a shared sighand_struct

2017-04-02 Thread Eric W. Biederman
Old threading libraries used CLONE_SIGHAND without clone thread. Modern threadding libraries always use CLONE_SIGHAND | CLONE_THREAD. Therefore let's simplify our lives and stop supporting a case no one cares about. Signed-off-by: "Eric W. Biederman" --- kernel/fork.c | 7 +++ 1 file