summaryrefslogtreecommitdiff
path: root/Kernel/Memory
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-04-04 16:52:32 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-04 17:10:30 +0200
commit9bb45ab3a6ffa86a12d32b81385141d9f99e2551 (patch)
treed9afd4884037c7593b49b32d1c02fb56234a4dc8 /Kernel/Memory
parent5560d8a25dd380c60bddb21944aa79d1322129b9 (diff)
downloadserenity-9bb45ab3a6ffa86a12d32b81385141d9f99e2551.zip
Kernel: Add debug logging to learn more about unexpected NP faults
Diffstat (limited to 'Kernel/Memory')
-rw-r--r--Kernel/Memory/Region.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/Memory/Region.cpp b/Kernel/Memory/Region.cpp
index f12ad9d0c5..b59eaa8247 100644
--- a/Kernel/Memory/Region.cpp
+++ b/Kernel/Memory/Region.cpp
@@ -382,6 +382,12 @@ PageFaultResponse Region::handle_fault(PageFault const& fault)
return PageFaultResponse::Continue;
}
dbgln("BUG! Unexpected NP fault at {}", fault.vaddr());
+ dbgln(" - Physical page slot pointer: {:p}", page_slot.ptr());
+ if (page_slot) {
+ dbgln(" - Physical page: {}", page_slot->paddr());
+ dbgln(" - Lazy committed: {}", page_slot->is_lazy_committed_page());
+ dbgln(" - Shared zero: {}", page_slot->is_shared_zero_page());
+ }
return PageFaultResponse::ShouldCrash;
}
VERIFY(fault.type() == PageFault::Type::ProtectionViolation);