VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Kees Cook <keescook@chromium.org> 2021-04-01 16:23:44 -0700 committer: Thomas Gleixner <tglx@linutronix.de> 2021-04-08 14:05:19 +0200 commit: 39218ff4c625dbf2e68224024fe0acaa60bcd51a parent: 51cba1ebc60df9c4ce034a9f5441169c0d0956c0
Commit Summary:
stack: Optionally randomize kernel stack offset each syscall
Diffstat:
1 file changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index cc77fd45ca64..d3bf50326d69 100644
--- a/Makefile
+++ b/Makefile
@@ -813,6 +813,10 @@ KBUILD_CFLAGS	+= -ftrivial-auto-var-init=zero
 KBUILD_CFLAGS	+= -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
 endif
 
+# While VLAs have been removed, GCC produces unreachable stack probes
+# for the randomize_kstack_offset feature. Disable it for all compilers.
+KBUILD_CFLAGS	+= $(call cc-option, -fno-stack-clash-protection)
+
 DEBUG_CFLAGS	:=
 
 # Workaround for GCC versions < 5.0