0b3e336601
This adds support for the STACKLEAK gcc plugin to arm64 by implementing stackleak_check_alloca(), based heavily on the x86 version, and adding the two helpers used by the stackleak common code: current_top_of_stack() and on_thread_stack(). The stack erasure calls are made at syscall returns. Additionally, this disables the plugin in hypervisor and EFI stub code, which are out of scope for the protection. Acked-by: Alexander Popov <alex.popov@linux.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
31 lines
971 B
Makefile
31 lines
971 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for Kernel-based Virtual Machine module, HYP part
|
|
#
|
|
|
|
ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING \
|
|
$(DISABLE_STACKLEAK_PLUGIN)
|
|
|
|
KVM=../../../../virt/kvm
|
|
|
|
obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v3-sr.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/timer-sr.o
|
|
|
|
obj-$(CONFIG_KVM_ARM_HOST) += vgic-v2-cpuif-proxy.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += sysreg-sr.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += debug-sr.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += entry.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += switch.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += fpsimd.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += tlb.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += hyp-entry.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += s2-setup.o
|
|
|
|
# KVM code is run at a different exception code with a different map, so
|
|
# compiler instrumentation that inserts callbacks or checks into the code may
|
|
# cause crashes. Just disable it.
|
|
GCOV_PROFILE := n
|
|
KASAN_SANITIZE := n
|
|
UBSAN_SANITIZE := n
|
|
KCOV_INSTRUMENT := n
|