Re: [PATCH 18/28] mm: enforce that vmap can't map pages executable

2020-04-08 Thread Christoph Hellwig
On Wed, Apr 08, 2020 at 01:38:36PM +0100, Mark Rutland wrote: > > +static inline pgprot_t pgprot_nx(pgprot_t prot) > > +{ > > + return __pgprot(pgprot_val(prot) | _PAGE_NX); > > +} > > +#define pgprot_nx pgprot_nx > > + > > #ifdef CONFIG_X86_PAE > > I reckon for arm64 we can do similar in our :

Re: [PATCH 18/28] mm: enforce that vmap can't map pages executable

2020-04-08 Thread Mark Rutland
On Wed, Apr 08, 2020 at 01:59:16PM +0200, Christoph Hellwig wrote: > To help enforcing the W^X protection don't allow remapping existing > pages as executable. > > Based on patch from Peter Zijlstra . > > Signed-off-by: Christoph Hellwig > --- > arch/x86/include/asm/pgtable_types.h | 6 ++ >

[PATCH 18/28] mm: enforce that vmap can't map pages executable

2020-04-08 Thread Christoph Hellwig
To help enforcing the W^X protection don't allow remapping existing pages as executable. Based on patch from Peter Zijlstra . Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/pgtable_types.h | 6 ++ include/asm-generic/pgtable.h| 4 mm/vmalloc.c