Re: [PATCH 4/6] mm, oom: skip vforked tasks from being selected

2016-06-01 Thread Michal Hocko
On Tue 31-05-16 23:43:38, Oleg Nesterov wrote: > On 05/31, Michal Hocko wrote: > > > > On Mon 30-05-16 21:28:57, Oleg Nesterov wrote: > > > > > > I don't think we can trust vfork_done != NULL. > > > > > > copy_process() doesn't disallow CLONE_VFORK without CLONE_VM, so with > > > this patch > > >

Re: [PATCH 4/6] mm, oom: skip vforked tasks from being selected

2016-05-31 Thread Oleg Nesterov
On 05/31, Michal Hocko wrote: > > On Mon 30-05-16 21:28:57, Oleg Nesterov wrote: > > > > I don't think we can trust vfork_done != NULL. > > > > copy_process() doesn't disallow CLONE_VFORK without CLONE_VM, so with this > > patch > > it would be trivial to make the exploit which hides a memory hog

Re: [PATCH 4/6] mm, oom: skip vforked tasks from being selected

2016-05-31 Thread Michal Hocko
On Mon 30-05-16 21:28:57, Oleg Nesterov wrote: > On 05/30, Michal Hocko wrote: > > > > Make sure to not select vforked task as an oom victim by checking > > vfork_done in oom_badness. > > I agree, this look like a good change to me... But. > > > --- a/mm/oom_kill.c > > +++ b/mm/oom_kill.c > > @@

Re: [PATCH 4/6] mm, oom: skip vforked tasks from being selected

2016-05-30 Thread Oleg Nesterov
On 05/30, Michal Hocko wrote: > > Make sure to not select vforked task as an oom victim by checking > vfork_done in oom_badness. I agree, this look like a good change to me... But. > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -176,11 +176,13 @@ unsigned long oom_badness(struct task_struct *p,