mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +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:
parent
f9a138aa4b
commit
59b9e49bcd
4 changed files with 31 additions and 1 deletions
|
@ -91,6 +91,8 @@ public:
|
|||
|
||||
bool validate_kernel_read(const Process&, VirtualAddress, size_t) const;
|
||||
|
||||
bool can_read_without_faulting(const Process&, VirtualAddress, size_t) const;
|
||||
|
||||
enum class ShouldZeroFill {
|
||||
No,
|
||||
Yes
|
||||
|
@ -164,6 +166,7 @@ private:
|
|||
|
||||
PageDirectory& kernel_page_directory() { return *m_kernel_page_directory; }
|
||||
|
||||
const PageTableEntry* pte(const PageDirectory&, VirtualAddress);
|
||||
PageTableEntry& ensure_pte(PageDirectory&, VirtualAddress);
|
||||
|
||||
RefPtr<PageDirectory> m_kernel_page_directory;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue