summaryrefslogtreecommitdiff
path: root/arch/sh/Kconfig
diff options
context:
space:
mode:
authorFilippo Arcidiacono <filippo.arcidiacono@st.com>2012-04-19 15:45:57 +0900
committerPaul Mundt <lethal@linux-sh.org>2012-04-19 15:45:57 +0900
commit5d920bb929a99446062a48cf90867bbca57b8e77 (patch)
treefdadebe0b0fe8906ffd81ad9f726430d6428a8f5 /arch/sh/Kconfig
parent932e9f352b5d685725076f21b237f7c7d804b29c (diff)
downloadlinux-3.10-5d920bb929a99446062a48cf90867bbca57b8e77.tar.gz
linux-3.10-5d920bb929a99446062a48cf90867bbca57b8e77.tar.bz2
linux-3.10-5d920bb929a99446062a48cf90867bbca57b8e77.zip
sh: initial stack protector support.
This implements basic -fstack-protector support, based on the early ARM version in c743f38013aeff58ef6252601e397b5ba281c633. The SMP case is limited to the initial canary value, while the UP case handles per-task granularity (limited to 32-bit sh until a new enough sh64 compiler manifests itself). Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/Kconfig')
-rw-r--r--arch/sh/Kconfig14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index ff9e033ce62..60ed3669979 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -685,6 +685,20 @@ config SECCOMP
If unsure, say N.
+config CC_STACKPROTECTOR
+ bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
+ depends on SUPERH32 && EXPERIMENTAL
+ help
+ This option turns on the -fstack-protector GCC feature. This
+ feature puts, at the beginning of functions, a canary value on
+ the stack just before the return address, and validates
+ the value just before actually returning. Stack based buffer
+ overflows (that need to overwrite this return address) now also
+ overwrite the canary, which gets detected and the attack is then
+ neutralized via a kernel panic.
+
+ This feature requires gcc version 4.2 or above.
+
config SMP
bool "Symmetric multi-processing support"
depends on SYS_SUPPORTS_SMP