kernel/x86_64: Only show kernel addresses in backtraces
This avoids walking off into userspace memory where we don't know what could happen.
This commit is contained in:
parent
1f6a0db188
commit
f629e17ff4
@ -327,7 +327,7 @@ namespace CPU
|
|||||||
static void backtrace_impl(u64 base_pointer, void (*callback)(u64, void*), void* arg)
|
static void backtrace_impl(u64 base_pointer, void (*callback)(u64, void*), void* arg)
|
||||||
{
|
{
|
||||||
StackFrame* current_frame = (StackFrame*)base_pointer;
|
StackFrame* current_frame = (StackFrame*)base_pointer;
|
||||||
while (current_frame &&
|
while (current_frame && (u64)current_frame >= 0xFFFF'FFFF'8000'0000 &&
|
||||||
MemoryManager::validate_access(current_frame, sizeof(*current_frame), MemoryManager::DEFAULT_ACCESS) &&
|
MemoryManager::validate_access(current_frame, sizeof(*current_frame), MemoryManager::DEFAULT_ACCESS) &&
|
||||||
current_frame->instruction)
|
current_frame->instruction)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user