mirror of
https://github.com/torvalds/linux.git
synced 2026-05-17 19:17:29 +02:00
LoongArch: Add pgprot_nx() implementation
Commit cca98e9f8b ("mm: enforce that vmap can't map pages
executable") enforces the W^X protection by not allowing remapping
existing pages as executable. Add LoongArch bits so that LoongArch
can benefit the same protection.
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
parent
613d4164f5
commit
0816b2ea18
|
|
@ -96,6 +96,13 @@
|
|||
|
||||
#define _PAGE_IOREMAP pgprot_val(PAGE_KERNEL_SUC)
|
||||
|
||||
#define pgprot_nx pgprot_nx
|
||||
|
||||
static inline pgprot_t pgprot_nx(pgprot_t _prot)
|
||||
{
|
||||
return __pgprot(pgprot_val(_prot) | _PAGE_NO_EXEC);
|
||||
}
|
||||
|
||||
#define pgprot_noncached pgprot_noncached
|
||||
|
||||
static inline pgprot_t pgprot_noncached(pgprot_t _prot)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user