Re: [PATCH v2 1/2] mm: Allow non-VM_DONTEXPAND and VM_PFNMAP mappings with MREMAP_DONTUNMAP

2021-03-17 Thread Brian Geffon
You're 100% correct, I'll mail a new patch in a few Brian On Wed, Mar 17, 2021 at 5:19 PM Peter Xu wrote: > > On Wed, Mar 17, 2021 at 04:44:25PM -0400, Brian Geffon wrote: > > Hi Peter, > > Hi, Brian, > > > Thank you as always for taking a look. This change relies on the > > existing check in v

Re: [PATCH v2 1/2] mm: Allow non-VM_DONTEXPAND and VM_PFNMAP mappings with MREMAP_DONTUNMAP

2021-03-17 Thread Peter Xu
On Wed, Mar 17, 2021 at 04:44:25PM -0400, Brian Geffon wrote: > Hi Peter, Hi, Brian, > Thank you as always for taking a look. This change relies on the > existing check in vma_to_resize on line 686: > https://elixir.bootlin.com/linux/v5.12-rc3/source/mm/mremap.c#L686 > which returns -EFAULT when

Re: [PATCH v2 1/2] mm: Allow non-VM_DONTEXPAND and VM_PFNMAP mappings with MREMAP_DONTUNMAP

2021-03-17 Thread Brian Geffon
Hi Peter, Thank you as always for taking a look. This change relies on the existing check in vma_to_resize on line 686: https://elixir.bootlin.com/linux/v5.12-rc3/source/mm/mremap.c#L686 which returns -EFAULT when the vma is VM_DONTEXPAND or VM_PFNMAP. Thanks Brian On Wed, Mar 17, 2021 at 4:40 PM

Re: [PATCH v2 1/2] mm: Allow non-VM_DONTEXPAND and VM_PFNMAP mappings with MREMAP_DONTUNMAP

2021-03-17 Thread Peter Xu
Hi, Brian, On Wed, Mar 17, 2021 at 12:13:33PM -0700, Brian Geffon wrote: > Currently MREMAP_DONTUNMAP only accepts private anonymous mappings. This > change will widen the support to include any mappings which are not > VM_DONTEXPAND or VM_PFNMAP. The primary use case is to support > MREMAP_DONTUN

[PATCH v2 1/2] mm: Allow non-VM_DONTEXPAND and VM_PFNMAP mappings with MREMAP_DONTUNMAP

2021-03-17 Thread Brian Geffon
Currently MREMAP_DONTUNMAP only accepts private anonymous mappings. This change will widen the support to include any mappings which are not VM_DONTEXPAND or VM_PFNMAP. The primary use case is to support MREMAP_DONTUNMAP on mappings which may have been created from a memfd. This change which takes