From fbaa93e8fa89d8c6472f4a487f4b79d7b6dddff5 Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Thu, 4 Apr 2024 15:45:47 +0200 Subject: [PATCH] Fix profiling stack trace bp bounds checking. --- src/profiling.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/profiling.rs b/src/profiling.rs index fa7c9de4fe..7e9bf58140 100644 --- a/src/profiling.rs +++ b/src/profiling.rs @@ -175,8 +175,8 @@ pub unsafe fn nmi_handler(stack: &InterruptStack) { let mut len = 2; for i in 2..32 { - if bp.saturating_add(16) < crate::KERNEL_HEAP_OFFSET - || bp >= crate::KERNEL_HEAP_OFFSET + crate::PML4_SIZE + if bp < crate::PHYS_OFFSET + || bp.saturating_add(16) >= crate::PHYS_OFFSET + crate::PML4_SIZE { break; }