Thread (71 messages) 71 messages, 20 authors, 2020-04-16

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

From: Christoph Hellwig <hch@lst.de>
Date: 2020-04-08 15:32:55
Also in: bpf, linux-arch, linux-arm-kernel, linux-hyperv, linux-iommu, linux-mm, linux-s390, lkml

On Wed, Apr 08, 2020 at 01:38:36PM +0100, Mark Rutland wrote:
quoted
+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 <asm/pgtable.h>:

#define pgprot_nx(pgprot_t prot) \
	__pgprot_modify(prot, 0, PTE_PXN)

... matching the style of our existing pgprot_*() modifier helpers.
I've added that for the next version with attribution to you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help