Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: arm64: Enable stack protection and branch profiling for VHE

For historical reasons, the VHE code inherited the build configuration from
nVHE. Now those two parts have their own folder and makefile, we can
enable stack protection and branch profiling for VHE.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Reviewed-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221004154216.2833636-1-vdonnefort@google.com

authored by

Vincent Donnefort and committed by
Marc Zyngier
837d632a 5994bc9e

+4 -4
+1 -4
arch/arm64/kvm/hyp/Makefile
··· 5 5 6 6 incdir := $(srctree)/$(src)/include 7 7 subdir-asflags-y := -I$(incdir) 8 - subdir-ccflags-y := -I$(incdir) \ 9 - -fno-stack-protector \ 10 - -DDISABLE_BRANCH_PROFILING \ 11 - $(DISABLE_STACKLEAK_PLUGIN) 8 + subdir-ccflags-y := -I$(incdir) 12 9 13 10 obj-$(CONFIG_KVM) += vhe/ nvhe/ pgtable.o
+3
arch/arm64/kvm/hyp/nvhe/Makefile
··· 10 10 # will explode instantly (Words of Marc Zyngier). So introduce a generic flag 11 11 # __DISABLE_TRACE_MMIO__ to disable MMIO tracing for nVHE KVM. 12 12 ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS -D__DISABLE_TRACE_MMIO__ 13 + ccflags-y += -fno-stack-protector \ 14 + -DDISABLE_BRANCH_PROFILING \ 15 + $(DISABLE_STACKLEAK_PLUGIN) 13 16 14 17 hostprogs := gen-hyprel 15 18 HOST_EXTRACFLAGS += -I$(objtree)/include