summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/boot
diff options
context:
space:
mode:
authorMax Filippov2017-03-27 11:44:47 +0200
committerMax Filippov2017-12-17 07:37:07 +0100
commit40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9 (patch)
tree4855103872087025010742caa2ec0818f91f10ee /arch/xtensa/boot
parentxtensa: print hardware config ID on startup (diff)
downloadkernel-qcow2-linux-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.tar.gz
kernel-qcow2-linux-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.tar.xz
kernel-qcow2-linux-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.zip
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 d2a7f48564a4..2fe182915b63 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 $< > $@