diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-21 13:05:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-21 15:49:39 +0100 |
commit | 59b9e49bcdad278e50400b3cdb41bc83e744d604 (patch) | |
tree | b380db540d67500cd1beaf5e5bbbdd981360cf34 /Kernel/Arch/i386/CPU.h | |
parent | f9a138aa4b9d96f59d20219179038805b0c8755e (diff) | |
download | serenity-59b9e49bcdad278e50400b3cdb41bc83e744d604.zip |
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.
Diffstat (limited to 'Kernel/Arch/i386/CPU.h')
-rw-r--r-- | Kernel/Arch/i386/CPU.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Arch/i386/CPU.h b/Kernel/Arch/i386/CPU.h index 0bc0cc1d1d..693aa1e0d8 100644 --- a/Kernel/Arch/i386/CPU.h +++ b/Kernel/Arch/i386/CPU.h @@ -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) { |