Re: [PATCH] userfaultfd: clear flag if remap event not enabled

2018-12-10 Thread Peter Xu
On Mon, Dec 10, 2018 at 03:09:25PM -0500, Andrea Arcangeli wrote: > Hello, > > On Mon, Dec 10, 2018 at 07:51:16PM +0200, Mike Rapoport wrote: > > On Mon, Dec 10, 2018 at 02:51:21PM +0800, Peter Xu wrote: > > > When the process being tracked do mremap() without > > > UFFD_FEATURE_EVENT_REMAP on the

Re: [PATCH] userfaultfd: clear flag if remap event not enabled

2018-12-10 Thread Andrea Arcangeli
Hello, On Mon, Dec 10, 2018 at 07:51:16PM +0200, Mike Rapoport wrote: > On Mon, Dec 10, 2018 at 02:51:21PM +0800, Peter Xu wrote: > > When the process being tracked do mremap() without > > UFFD_FEATURE_EVENT_REMAP on the corresponding tracking uffd file > > handle, we should not generate the remap

Re: [PATCH] userfaultfd: clear flag if remap event not enabled

2018-12-10 Thread Mike Rapoport
On Mon, Dec 10, 2018 at 02:51:21PM +0800, Peter Xu wrote: > When the process being tracked do mremap() without > UFFD_FEATURE_EVENT_REMAP on the corresponding tracking uffd file > handle, we should not generate the remap event, and at the same > time we should clear all the uffd flags on the new VM

[PATCH] userfaultfd: clear flag if remap event not enabled

2018-12-09 Thread Peter Xu
When the process being tracked do mremap() without UFFD_FEATURE_EVENT_REMAP on the corresponding tracking uffd file handle, we should not generate the remap event, and at the same time we should clear all the uffd flags on the new VMA. Without this patch, we can still have the VM_UFFD_MISSING|VM_U