aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/Makefile2
-rw-r--r--kernel/panic.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 3cff3c894cf3..c3e0eeeb1dd2 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -73,7 +73,7 @@ else
73 73
74 stackp := $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh 74 stackp := $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh
75 stackp-$(CONFIG_CC_STACKPROTECTOR) := $(shell $(stackp) \ 75 stackp-$(CONFIG_CC_STACKPROTECTOR) := $(shell $(stackp) \
76 "$(CC)" -fstack-protector ) 76 "$(CC)" "-fstack-protector -DGCC_HAS_SP" )
77 stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(stackp) \ 77 stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(stackp) \
78 "$(CC)" -fstack-protector-all ) 78 "$(CC)" -fstack-protector-all )
79 79
diff --git a/kernel/panic.c b/kernel/panic.c
index 866be9b72e4f..6729e3f4ebcb 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -325,6 +325,9 @@ EXPORT_SYMBOL(warn_on_slowpath);
325 325
326#ifdef CONFIG_CC_STACKPROTECTOR 326#ifdef CONFIG_CC_STACKPROTECTOR
327 327
328#ifndef GCC_HAS_SP
329#warning You have selected the CONFIG_CC_STACKPROTECTOR option, but the gcc used does not support this.
330#endif
328static unsigned long __stack_check_testing; 331static unsigned long __stack_check_testing;
329/* 332/*
330 * Self test function for the stack-protector feature. 333 * Self test function for the stack-protector feature.