[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220715235824.2549012-1-kaleshsingh@google.com>
Date: Fri, 15 Jul 2022 16:58:24 -0700
From: Kalesh Singh <kaleshsingh@...gle.com>
To: maz@...nel.org, mark.rutland@....com, broonie@...nel.org,
madvenka@...ux.microsoft.com, tabba@...gle.com
Cc: will@...nel.org, qperret@...gle.com, android-mm@...gle.com,
kernel-team@...roid.com, Kalesh Singh <kaleshsingh@...gle.com>,
James Morse <james.morse@....com>,
Alexandru Elisei <alexandru.elisei@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux-kernel@...r.kernel.org
Subject: [PATCH] KVM: arm64: Fix hypervisor address symbolization
With CONFIG_RANDOMIZE_BASE=y vmlinux addresses will resolve correctly
from kallsyms. Fix this by adding the KASLR offset before printing the
symbols.
Based on arm64 for-next/stacktrace.
Fixes: 6ccf9cb557bd ("KVM: arm64: Symbolize the nVHE HYP addresses")
Reported-by: Fuad Tabba <tabba@...gle.com>
Signed-off-by: Kalesh Singh <kaleshsingh@...gle.com>
---
arch/arm64/kvm/handle_exit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c
index f66c0142b335..e43926ef2bc2 100644
--- a/arch/arm64/kvm/handle_exit.c
+++ b/arch/arm64/kvm/handle_exit.c
@@ -347,10 +347,10 @@ void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr,
kvm_err("nVHE hyp BUG at: %s:%u!\n", file, line);
else
kvm_err("nVHE hyp BUG at: [<%016llx>] %pB!\n", panic_addr,
- (void *)panic_addr);
+ (void *)(panic_addr + kaslr_offset()));
} else {
kvm_err("nVHE hyp panic at: [<%016llx>] %pB!\n", panic_addr,
- (void *)panic_addr);
+ (void *)(panic_addr + kaslr_offset()));
}
/*
base-commit: 82a592c13b0aeff94d84d54183dae0b26384c95f
--
2.37.0.170.g444d1eabd0-goog
Powered by blists - more mailing lists