summaryrefslogtreecommitdiff
path: root/arch/arm/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-27 22:19:07 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-27 22:19:07 +0300
commitc6f1b355d451680a45d63ce66cea67057c938a87 (patch)
tree413ed05d88e6a59d33a8b2034cfffdae1862e7b8 /arch/arm/Makefile
parentc06e9ef6918b1a6d183f1fef78ebc66f054a7b5a (diff)
parent189af4657186da08a2e79fb8e906cfd82b2ccddc (diff)
downloadlinux-c6f1b355d451680a45d63ce66cea67057c938a87.tar.xz
Merge tag 'gcc-plugins-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull gcc-plugins update from Kees Cook: "Both arm and arm64 are gaining per-task stack canaries (to match x86), but arm is being done with a gcc plugin, hence it going through the gcc-plugins tree. New gcc-plugin: - Enable per-task stack protector for ARM (Ard Biesheuvel)" * tag 'gcc-plugins-v4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: ARM: smp: add support for per-task stack canaries
Diffstat (limited to 'arch/arm/Makefile')
-rw-r--r--arch/arm/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 05a91d8b89f3..0436002d5091 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -303,6 +303,18 @@ else
KBUILD_IMAGE := $(boot)/zImage
endif
+ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y)
+prepare: stack_protector_prepare
+stack_protector_prepare: prepare0
+ $(eval KBUILD_CFLAGS += \
+ -fplugin-arg-arm_ssp_per_task_plugin-tso=$(shell \
+ awk '{if ($$2 == "THREAD_SZ_ORDER") print $$3;}'\
+ include/generated/asm-offsets.h) \
+ -fplugin-arg-arm_ssp_per_task_plugin-offset=$(shell \
+ awk '{if ($$2 == "TI_STACK_CANARY") print $$3;}'\
+ include/generated/asm-offsets.h))
+endif
+
all: $(notdir $(KBUILD_IMAGE))