Skip to content

Commit 8db423d

Browse files
ctmarinasAlex Shi
authored andcommitted
kvm: arm64: Disable compiler instrumentation for hypervisor code
With the recent rewrite of the arm64 KVM hypervisor code in C, enabling certain options like KASAN would allow the compiler to generate memory accesses or function calls to addresses not mapped at EL2. This patch disables the compiler instrumentation on the arm64 hypervisor code for gcov-based profiling (GCOV_KERNEL), undefined behaviour sanity checker (UBSAN) and kernel address sanitizer (KASAN). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Christoffer Dall <christoffer.dall@linaro.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: <stable@vger.kernel.org> # 4.5+ Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> (cherry picked from commit a6cdf1c08cbfe0818a3d8042844d75bf74fd82bd) Signed-off-by: Alex Shi <alex.shi@linaro.org> Conflicts: arch/arm64/kvm/hyp/Makefile
1 parent 8991296 commit 8db423d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/arm64/kvm/hyp/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ obj-$(CONFIG_KVM_ARM_HOST) += switch.o
1212
obj-$(CONFIG_KVM_ARM_HOST) += fpsimd.o
1313
obj-$(CONFIG_KVM_ARM_HOST) += tlb.o
1414
obj-$(CONFIG_KVM_ARM_HOST) += hyp-entry.o
15+
16+
GCOV_PROFILE := n
17+
KASAN_SANITIZE := n
18+
UBSAN_SANITIZE := n

0 commit comments

Comments
 (0)