summaryrefslogtreecommitdiff
path: root/src/sys/arch/amd64/cpu
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-15 23:41:52 -0400
committerIan Moffett <ian@osmora.org>2025-09-15 23:41:52 -0400
commitfe60a37cfe072ec41663a69aefb02816af4067db (patch)
tree80e164931cd2e21b2c3b5ff87b233b1b38a81f2d /src/sys/arch/amd64/cpu
parent06fb71061438ce7c9cf665abcb289221dfa6fca8 (diff)
sys: mman: Add PROT_USER flag
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/arch/amd64/cpu')
-rw-r--r--src/sys/arch/amd64/cpu/mmu.c2
1 files changed, 2 insertions, 0 deletions
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;