Re: [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change

2018-03-06 Thread Andrew Morton
On Wed, 21 Feb 2018 10:15:50 -0700 Khalid Aziz wrote: > When protection bits are changed on a VMA, some of the architecture > specific flags should be cleared as well. An examples of this are the > PKEY flags on x86. This patch expands the current code that clears > PKEY

Re: [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change

2018-03-06 Thread Andrew Morton
On Wed, 21 Feb 2018 10:15:50 -0700 Khalid Aziz wrote: > When protection bits are changed on a VMA, some of the architecture > specific flags should be cleared as well. An examples of this are the > PKEY flags on x86. This patch expands the current code that clears > PKEY flags for x86, to

Re: [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change

2018-03-05 Thread Khalid Aziz
On 03/05/2018 12:23 PM, Dave Hansen wrote: On 02/21/2018 09:15 AM, Khalid Aziz wrote: +/* Arch-specific flags to clear when updating VM flags on protection change */ +#ifndef VM_ARCH_CLEAR +# define VM_ARCH_CLEAR VM_NONE +#endif +#define VM_FLAGS_CLEAR (ARCH_VM_PKEY_FLAGS | VM_ARCH_CLEAR)

Re: [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change

2018-03-05 Thread Khalid Aziz
On 03/05/2018 12:23 PM, Dave Hansen wrote: On 02/21/2018 09:15 AM, Khalid Aziz wrote: +/* Arch-specific flags to clear when updating VM flags on protection change */ +#ifndef VM_ARCH_CLEAR +# define VM_ARCH_CLEAR VM_NONE +#endif +#define VM_FLAGS_CLEAR (ARCH_VM_PKEY_FLAGS | VM_ARCH_CLEAR)

Re: [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change

2018-03-05 Thread Dave Hansen
On 02/21/2018 09:15 AM, Khalid Aziz wrote: > +/* Arch-specific flags to clear when updating VM flags on protection change > */ > +#ifndef VM_ARCH_CLEAR > +# define VM_ARCH_CLEAR VM_NONE > +#endif > +#define VM_FLAGS_CLEAR (ARCH_VM_PKEY_FLAGS | VM_ARCH_CLEAR) Shouldn't this be

Re: [PATCH v12 08/11] mm: Clear arch specific VM flags on protection change

2018-03-05 Thread Dave Hansen
On 02/21/2018 09:15 AM, Khalid Aziz wrote: > +/* Arch-specific flags to clear when updating VM flags on protection change > */ > +#ifndef VM_ARCH_CLEAR > +# define VM_ARCH_CLEAR VM_NONE > +#endif > +#define VM_FLAGS_CLEAR (ARCH_VM_PKEY_FLAGS | VM_ARCH_CLEAR) Shouldn't this be