Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-18 Thread Rik van Riel
On Fri, 2017-08-18 at 11:15 -0700, Andrew Morton wrote: > On Fri, 18 Aug 2017 12:28:29 -0400 Rik van Riel > wrote: > > > On Thu, 2017-08-17 at 15:50 -0700, Andrew Morton wrote: > > > On Tue, 15 Aug 2017 22:18:19 -0400 Rik van Riel > > > wrote: > > > > > > > >

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-18 Thread Andrew Morton
On Fri, 18 Aug 2017 12:28:29 -0400 Rik van Riel wrote: > On Thu, 2017-08-17 at 15:50 -0700, Andrew Morton wrote: > > On Tue, 15 Aug 2017 22:18:19 -0400 Rik van Riel > > wrote: > > > > > > > --- a/mm/madvise.c > > > > > +++ b/mm/madvise.c > > > > > @@ -80,6

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-18 Thread Mike Kravetz
On 08/11/2017 02:28 PM, r...@redhat.com wrote: > From: Rik van Riel > > Introduce MADV_WIPEONFORK semantics, which result in a VMA being > empty in the child process after fork. This differs from MADV_DONTFORK > in one important way. > > If a child process accesses memory that

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-18 Thread Rik van Riel
On Thu, 2017-08-17 at 15:50 -0700, Andrew Morton wrote: > On Tue, 15 Aug 2017 22:18:19 -0400 Rik van Riel > wrote: > > > > > --- a/mm/madvise.c > > > > +++ b/mm/madvise.c > > > > @@ -80,6 +80,17 @@ static long madvise_behavior(struct > > > > vm_area_struct *vma, > > > > __

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-17 Thread Andrew Morton
On Tue, 15 Aug 2017 22:18:19 -0400 Rik van Riel wrote: > > > --- a/mm/madvise.c > > > +++ b/mm/madvise.c > > > @@ -80,6 +80,17 @@ static long madvise_behavior(struct > > > vm_area_struct *vma, > > > __} > > > __new_flags &= ~VM_DONTCOPY; > > > __

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-15 Thread Rik van Riel
On Tue, 2017-08-15 at 15:51 -0700, Andrew Morton wrote: > On Fri, 11 Aug 2017 17:28:29 -0400 r...@redhat.com wrote: > > > A further complication is the proliferation of clone flags, > > programs bypassing glibc's functions to call clone directly, > > and programs calling unshare, causing the

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-15 Thread Andrew Morton
On Fri, 11 Aug 2017 17:28:29 -0400 r...@redhat.com wrote: > From: Rik van Riel > > Introduce MADV_WIPEONFORK semantics, which result in a VMA being > empty in the child process after fork. This differs from MADV_DONTFORK > in one important way. > > If a child process accesses

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-14 Thread kbuild test robot
Hi Rik, [auto build test ERROR on linus/master] [also build test ERROR on v4.13-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-11 Thread Linus Torvalds
On Fri, Aug 11, 2017 at 1:27 PM, Rik van Riel wrote: >> >> Yes, you don't do the page table copies. Fine. But you leave vma with >> the the anon_vma pointer - doesn't that mean that it's still >> connected >> to the original anonvma chain, and we might end up swapping something

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-11 Thread Rik van Riel
On Fri, 2017-08-11 at 12:42 -0700, Linus Torvalds wrote: > On Fri, Aug 11, 2017 at 12:19 PM,   wrote: > > diff --git a/mm/memory.c b/mm/memory.c > > index 0e517be91a89..f9b0ad7feb57 100644 > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -1134,6 +1134,16 @@ int

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-11 Thread Linus Torvalds
On Fri, Aug 11, 2017 at 12:19 PM, wrote: > diff --git a/mm/memory.c b/mm/memory.c > index 0e517be91a89..f9b0ad7feb57 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -1134,6 +1134,16 @@ int copy_page_range(struct mm_struct *dst_mm, struct > mm_struct *src_mm, >

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-11 Thread Mike Kravetz
On 08/11/2017 09:59 AM, Rik van Riel wrote: > On Fri, 2017-08-11 at 09:36 -0700, Mike Kravetz wrote: >> On 08/11/2017 08:23 AM, Rik van Riel wrote: >>> On Thu, 2017-08-10 at 17:23 +0200, Michal Hocko wrote: On Sun 06-08-17 10:04:25, Rik van Riel wrote: [...] > diff --git

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-11 Thread Rik van Riel
On Fri, 2017-08-11 at 09:36 -0700, Mike Kravetz wrote: > On 08/11/2017 08:23 AM, Rik van Riel wrote: > > On Thu, 2017-08-10 at 17:23 +0200, Michal Hocko wrote: > > > On Sun 06-08-17 10:04:25, Rik van Riel wrote: > > > [...] > > > > diff --git a/kernel/fork.c b/kernel/fork.c > > > > index

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-11 Thread Mike Kravetz
On 08/11/2017 08:23 AM, Rik van Riel wrote: > On Thu, 2017-08-10 at 17:23 +0200, Michal Hocko wrote: >> On Sun 06-08-17 10:04:25, Rik van Riel wrote: >> [...] >>> diff --git a/kernel/fork.c b/kernel/fork.c >>> index 17921b0390b4..db1fb2802ecc 100644 >>> --- a/kernel/fork.c >>> +++ b/kernel/fork.c

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-11 Thread Rik van Riel
On Thu, 2017-08-10 at 17:23 +0200, Michal Hocko wrote: > On Sun 06-08-17 10:04:25, Rik van Riel wrote: > [...] > > diff --git a/kernel/fork.c b/kernel/fork.c > > index 17921b0390b4..db1fb2802ecc 100644 > > --- a/kernel/fork.c > > +++ b/kernel/fork.c > > @@ -659,6 +659,13 @@ static __latent_entropy

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-10 Thread Michal Hocko
On Sun 06-08-17 10:04:25, Rik van Riel wrote: [...] > diff --git a/kernel/fork.c b/kernel/fork.c > index 17921b0390b4..db1fb2802ecc 100644 > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -659,6 +659,13 @@ static __latent_entropy int dup_mmap(struct mm_struct > *mm, > tmp->vm_flags

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-05 Thread kbuild test robot
Hi Rik, [auto build test ERROR on linus/master] [also build test ERROR on v4.13-rc3 next-20170804] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-05 Thread kbuild test robot
Hi Rik, [auto build test ERROR on linus/master] [also build test ERROR on v4.13-rc3 next-20170804] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-05 Thread Rik van Riel
On Fri, 2017-08-04 at 16:09 -0700, Mike Kravetz wrote: > On 08/04/2017 12:07 PM, r...@redhat.com wrote: > > From: Rik van Riel > > > > Introduce MADV_WIPEONFORK semantics, which result in a VMA being > > empty in the child process after fork. This differs from > > MADV_DONTFORK

Re: [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK

2017-08-04 Thread Mike Kravetz
On 08/04/2017 12:07 PM, r...@redhat.com wrote: > From: Rik van Riel > > Introduce MADV_WIPEONFORK semantics, which result in a VMA being > empty in the child process after fork. This differs from MADV_DONTFORK > in one important way. > > If a child process accesses memory that