[PATCH v2 3/4] KVM: arm64: Introduce CONFIG_UBSAN_KVM_EL2

Kees Cook kees at kernel.org
Wed Apr 30 11:30:38 PDT 2025


On Wed, Apr 30, 2025 at 04:27:10PM +0000, Mostafa Saleh wrote:
> 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: Mostafa Saleh <smostafa at google.com>

Thanks for the rename, this looks good!

Reviewed-by: Kees Cook <kees at kernel.org>

-- 
Kees Cook



More information about the linux-arm-kernel mailing list