From 738d881d5d17ca7fc406edb897c9f2cb581d6bb8 Mon Sep 17 00:00:00 2001 From: 0x6D70 Date: Tue, 23 Jan 2024 21:10:45 +0100 Subject: [PATCH] proberly check if a process is a kernel process --- xernel/kernel/src/mem/mmap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xernel/kernel/src/mem/mmap.rs b/xernel/kernel/src/mem/mmap.rs index ee483dc1..fb72f308 100644 --- a/xernel/kernel/src/mem/mmap.rs +++ b/xernel/kernel/src/mem/mmap.rs @@ -59,7 +59,7 @@ pub fn handle_page_fault(addr: VirtAddr, error_code: PageFaultErrorCode) -> bool let base_addr = addr.align_down(Size4KiB::SIZE); let frame = FRAME_ALLOCATOR.lock().allocate_frame::().unwrap(); - let pt_flags = ptflags_from_protflags(vm_entry.prot, true); // TODO: don't hardcode user_accessible + let pt_flags = ptflags_from_protflags(vm_entry.prot, process.page_table.is_some()); let mut pt = process.get_page_table().unwrap(); pt.map::(frame, Page::from_start_address(base_addr).unwrap(), pt_flags, true);