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 <[email protected]> Signed-off-by: Kalesh Singh <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6a4f7fc commit ed6313a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)