Explorar o código

Kernel/Memory: Fix UNMAP_AFTER_INIT page fault handling

This was discovered by me during a work on USB keyboard patches, so it
triggered this bug.

The printing format for the VirtualAddress part is incorrect, leading to
another crash when handling page fault after accessing UNMAP_AFTER_INIT
code section.
Liav A %!s(int64=2) %!d(string=hai) anos
pai
achega
36bb04d792
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Kernel/Memory/MemoryManager.cpp

+ 1 - 1
Kernel/Memory/MemoryManager.cpp

@@ -740,7 +740,7 @@ PageFaultResponse MemoryManager::handle_page_fault(PageFault const& fault)
 
     if (faulted_in_range(&start_of_unmap_after_init, &end_of_unmap_after_init)) {
         auto const* kernel_symbol = symbolicate_kernel_address(fault.vaddr().get());
-        dbgln("Attempt to access UNMAP_AFTER_INIT section ({:p}: {})", fault.vaddr(), kernel_symbol ? kernel_symbol->name : "(Unknown)");
+        dbgln("Attempt to access UNMAP_AFTER_INIT section ({}: {})", fault.vaddr(), kernel_symbol ? kernel_symbol->name : "(Unknown)");
         return PageFaultResponse::ShouldCrash;
     }