Commit 61b38f75 authored by Mostafa Saleh's avatar Mostafa Saleh Committed by Marc Zyngier
Browse files

KVM: arm64: Introduce CONFIG_UBSAN_KVM_EL2



Add a new Kconfig CONFIG_UBSAN_KVM_EL2 for KVM which enables
UBSAN for EL2 code (in protected/nvhe/hvhe) modes.
This will re-use the same checks enabled for the kernel for
the hypervisor. The only difference is that for EL2 it always
emits a "brk" instead of implementing hooks as the hypervisor
can't print reports.

The KVM code will re-use the same code for the kernel
"report_ubsan_failure()" so #ifdefs are changed to also have this
code for CONFIG_UBSAN_KVM_EL2

Signed-off-by: default avatarMostafa Saleh <smostafa@google.com>
Reviewed-by: default avatarKees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20250430162713.1997569-4-smostafa@google.com


Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
parent d683a856
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment