diff options
author | Filippo Arcidiacono <filippo.arcidiacono@st.com> | 2012-04-19 02:45:57 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-04-19 02:45:57 -0400 |
commit | 5d920bb929a99446062a48cf90867bbca57b8e77 (patch) | |
tree | fdadebe0b0fe8906ffd81ad9f726430d6428a8f5 /arch/sh/kernel/process.c | |
parent | 932e9f352b5d685725076f21b237f7c7d804b29c (diff) |
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/kernel/process.c')
-rw-r--r-- | arch/sh/kernel/process.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 325f98b1736d..f3f03e4c785d 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -2,10 +2,17 @@ | |||
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/slab.h> | 3 | #include <linux/slab.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/export.h> | ||
6 | #include <linux/stackprotector.h> | ||
5 | 7 | ||
6 | struct kmem_cache *task_xstate_cachep = NULL; | 8 | struct kmem_cache *task_xstate_cachep = NULL; |
7 | unsigned int xstate_size; | 9 | unsigned int xstate_size; |
8 | 10 | ||
11 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
12 | unsigned long __stack_chk_guard __read_mostly; | ||
13 | EXPORT_SYMBOL(__stack_chk_guard); | ||
14 | #endif | ||
15 | |||
9 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | 16 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) |
10 | { | 17 | { |
11 | *dst = *src; | 18 | *dst = *src; |