From fe60a37cfe072ec41663a69aefb02816af4067db Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 15 Sep 2025 23:41:52 -0400 Subject: sys: mman: Add PROT_USER flag Signed-off-by: Ian Moffett --- src/sys/arch/amd64/cpu/mmu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sys/arch/amd64') diff --git a/src/sys/arch/amd64/cpu/mmu.c b/src/sys/arch/amd64/cpu/mmu.c index 974e7d3..60fb4f1 100644 --- a/src/sys/arch/amd64/cpu/mmu.c +++ b/src/sys/arch/amd64/cpu/mmu.c @@ -97,6 +97,8 @@ prot_to_pte(int prot) pte_flags |= PTE_P; if (ISSET(prot, MMU_PROT_WRITE)) pte_flags |= PTE_RW; + if (ISSET(prot, MMU_PROT_USER)) + pte_flags |= PTE_US; if (ISSET(prot, MMU_PROT_EXEC)) pte_flags &= ~PTE_NX; -- cgit v1.2.3