aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/boot/compressed/Makefile
diff options
context:
space:
mode:
authorGravatar Ard Biesheuvel <ardb@kernel.org> 2021-10-26 10:23:31 +0200
committerGravatar Ard Biesheuvel <ardb@kernel.org> 2021-12-03 15:11:24 +0100
commit672513bf583157cc088a32e75bd850dd9f81564c (patch)
tree616ae2a0cde52f4c405b581a83f4785475f943c5 /arch/arm/boot/compressed/Makefile
parentLinux 5.16-rc1 (diff)
downloadlinux-672513bf583157cc088a32e75bd850dd9f81564c.tar.gz
linux-672513bf583157cc088a32e75bd850dd9f81564c.tar.bz2
linux-672513bf583157cc088a32e75bd850dd9f81564c.zip
ARM: decompressor: disable stack protector
Enabling the stack protector in the decompressor is of dubious value, given that it uses a fixed value for the canary, cannot print any output unless CONFIG_DEBUG_LL is enabled (which relies on board specific build time settings), and is already disabled for a good chunk of the code (libfdt). So let's just disable it in the decompressor. This will make it easier in the future to manage the command line options that would need to be removed again in this context for the TLS register based stack protector. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/arm/boot/compressed/Makefile')
-rw-r--r--arch/arm/boot/compressed/Makefile6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 91265e7ff672..e2bd084b1cdf 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -93,11 +93,6 @@ ifeq ($(CONFIG_USE_OF),y)
OBJS += $(libfdt_objs) fdt_check_mem_start.o
endif
-# -fstack-protector-strong triggers protection checks in this code,
-# but it is being used too early to link to meaningful stack_chk logic.
-$(foreach o, $(libfdt_objs) atags_to_fdt.o fdt_check_mem_start.o, \
- $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt -fno-stack-protector))
-
targets := vmlinux vmlinux.lds piggy_data piggy.o \
lib1funcs.o ashldi3.o bswapsdi2.o \
head.o $(OBJS)
@@ -107,6 +102,7 @@ clean-files += lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
+ -I$(srctree)/scripts/dtc/libfdt -fno-stack-protector \
-I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)
ccflags-remove-$(CONFIG_FUNCTION_TRACER) += -pg
asflags-y := -DZIMAGE