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:
apio 2023-07-12 16:04:45 +02:00
parent 1f6a0db188
commit f629e17ff4
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -327,7 +327,7 @@ namespace CPU
static void backtrace_impl(u64 base_pointer, void (*callback)(u64, void*), void* arg)
{
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) &&
current_frame->instruction)
{