summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/boot
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2017-03-27 02:44:47 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2017-12-16 22:37:07 -0800
commit40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9 (patch)
tree4855103872087025010742caa2ec0818f91f10ee /arch/xtensa/boot
parentaa6476f76c1678d5d1087b39d3047601f0139ef0 (diff)
downloadlinux-0-day-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.tar.gz
linux-0-day-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.tar.xz
xtensa: enable stack protector
The implementation is adopted from the ARM arch. GCC 7.3, 8 or newer is required for building the xtensa kernel with SSP. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/boot')
-rw-r--r--arch/xtensa/boot/lib/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/xtensa/boot/lib/Makefile b/arch/xtensa/boot/lib/Makefile
index d2a7f48564a47..2fe182915b63e 100644
--- a/arch/xtensa/boot/lib/Makefile
+++ b/arch/xtensa/boot/lib/Makefile
@@ -15,6 +15,10 @@ CFLAGS_REMOVE_inftrees.o = -pg
CFLAGS_REMOVE_inffast.o = -pg
endif
+CFLAGS_REMOVE_inflate.o += -fstack-protector -fstack-protector-strong
+CFLAGS_REMOVE_zmem.o += -fstack-protector -fstack-protector-strong
+CFLAGS_REMOVE_inftrees.o += -fstack-protector -fstack-protector-strong
+CFLAGS_REMOVE_inffast.o += -fstack-protector -fstack-protector-strong
quiet_cmd_copy_zlib = COPY $@
cmd_copy_zlib = cat $< > $@