On Wed, Jul 29, 2015 at 11:42:52AM -0400, Eric B Munson wrote:
[...]
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index ca1e091..38d69fc 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -579,6 +579,7 @@ static void show_smap_vma_flags(struct seq_file *m, 
> struct vm_area_struct *vma)
>  #ifdef CONFIG_X86_INTEL_MPX
>               [ilog2(VM_MPX)]         = "mp",
>  #endif
> +             [ilog2(VM_LOCKONFAULT)] = "lf",
>               [ilog2(VM_LOCKED)]      = "lo",
>               [ilog2(VM_IO)]          = "io",
>               [ilog2(VM_SEQ_READ)]    = "sr",
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 2e872f9..c2f3551 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -127,6 +127,7 @@ extern unsigned int kobjsize(const void *objp);
>  #define VM_PFNMAP    0x00000400      /* Page-ranges managed without "struct 
> page", just pure PFN */
>  #define VM_DENYWRITE 0x00000800      /* ETXTBSY on write attempts.. */
>  
> +#define VM_LOCKONFAULT       0x00001000      /* Lock the pages covered when 
> they are faulted in */
>  #define VM_LOCKED    0x00002000
>  #define VM_IO           0x00004000   /* Memory mapped I/O or similar */
>  

This clashes with another change currently in linux-next:

        81d056997385 userfaultfd: add VM_UFFD_MISSING and VM_UFFD_WP

Adding Andrea for visibility.

I noticed this because I was trying to make selftests/vm/mlock2-tests
work to see if the new mlock2 syscall would work on ARM. It didn't, so I
had to investigate and noticed that two symbolic names resolve to the
same value, which results in the mnemonics table (first hunk above)
overwriting the VM_LOCKONFAULT entry with the VM_UFFD_WP entry.

I've applied the following patch locally to fix this up.

Andrew, I think both of those patches came in via your tree, so perhaps
the best thing would be to squash the below (provided everybody agrees
that it's the right fix) into Eric's patch, adding the VM_LOCKONFAULT
flag?

Thierry

---- >8 ----

Reply via email to