Skip to content

Commit ed6313a

Browse files
Kalesh SinghMarc Zyngier
authored andcommitted
KVM: arm64: Fix hypervisor address symbolization
With CONFIG_RANDOMIZE_BASE=y vmlinux addresses will resolve incorrectly from kallsyms. Fix this by adding the KASLR offset before printing the symbols. Fixes: 6ccf9cb ("KVM: arm64: Symbolize the nVHE HYP addresses") Reported-by: Fuad Tabba <tabba@google.com> Signed-off-by: Kalesh Singh <kaleshsingh@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220715235824.2549012-1-kaleshsingh@google.com
1 parent 6a4f7fc commit ed6313a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm64/kvm/handle_exit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,10 @@ void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr,
347347
kvm_err("nVHE hyp BUG at: %s:%u!\n", file, line);
348348
else
349349
kvm_err("nVHE hyp BUG at: [<%016llx>] %pB!\n", panic_addr,
350-
(void *)panic_addr);
350+
(void *)(panic_addr + kaslr_offset()));
351351
} else {
352352
kvm_err("nVHE hyp panic at: [<%016llx>] %pB!\n", panic_addr,
353-
(void *)panic_addr);
353+
(void *)(panic_addr + kaslr_offset()));
354354
}
355355

356356
/*

0 commit comments

Comments
 (0)