1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +00:00

Kernel: Don't trigger page faults during profiling stack walk

The kernel sampling profiler will walk thread stacks during the timer
tick handler. Since it's not safe to trigger page faults during IRQ's,
we now avoid this by checking the page tables manually before accessing
each stack location.
This commit is contained in:
Andreas Kling 2020-02-21 13:05:39 +01:00
parent f9a138aa4b
commit 59b9e49bcd
4 changed files with 31 additions and 1 deletions

View file

@ -115,6 +115,7 @@ union [[gnu::packed]] Descriptor
class PageDirectoryEntry {
public:
const PageTableEntry* page_table_base() const { return reinterpret_cast<PageTableEntry*>(m_raw & 0xfffff000u); }
PageTableEntry* page_table_base() { return reinterpret_cast<PageTableEntry*>(m_raw & 0xfffff000u); }
void set_page_table_base(u32 value)
{