From f4e319649441bdaeb2738129882ba9f5b0e58b7e Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 23 Apr 2019 17:09:54 -0700 Subject: [PATCH] Fix permissions. --- kern/pmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kern/pmap.c b/kern/pmap.c index 58c0a41..2c590f2 100644 --- a/kern/pmap.c +++ b/kern/pmap.c @@ -183,8 +183,8 @@ mem_init(void) // Your code goes here: boot_map_region(kern_pgdir, UPAGES, ROUNDUP(pages_size, PGSIZE), - PADDR(pages), PTE_W); - kern_pgdir[PDX(UPAGES)] |= PTE_U | PTE_P; + PADDR(pages), PTE_U); + kern_pgdir[PDX(UPAGES)] |= PTE_U; kern_pgdir[PDX(UPAGES)] &= ~PTE_W; ////////////////////////////////////////////////////////////////////// @@ -196,7 +196,7 @@ mem_init(void) // LAB 3: Your code here. boot_map_region(kern_pgdir, UENVS, ROUNDUP(envs_size, PGSIZE), - PADDR(envs), PTE_W); + PADDR(envs), PTE_U); kern_pgdir[PDX(UENVS)] |= PTE_U; kern_pgdir[PDX(UPAGES)] &= ~PTE_W;