diff options
author | Gregory Fong <gregory.0xf0@gmail.com> | 2013-06-12 13:08:54 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-07-01 09:10:48 -0400 |
commit | 36ecafc5ad17861e2bc1fb12af4cc97680e25942 (patch) | |
tree | 8b1094782049660b366b417119d34a5a519e0c95 /arch/mips/kernel/process.c | |
parent | 23df34155b29674465813b327647cd79722aa659 (diff) |
MIPS: initial stack protector support
Implements basic stack protector support based on ARM version in
c743f38013aeff58ef6252601e397b5ba281c633 , with Kconfig option,
constant canary value set at boot time, and script to check if
compiler actually supports stack protector.
Tested by creating a kernel module that writes past end of char[].
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Cc: Carmelo Amoroso <carmelo.amoroso@st.com>
Patchwork: https://patchwork.linux-mips.org/patch/5448/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index c6a041d9d05d..7d62894f7e23 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -201,6 +201,12 @@ int dump_task_fpu(struct task_struct *t, elf_fpregset_t *fpr) | |||
201 | return 1; | 201 | return 1; |
202 | } | 202 | } |
203 | 203 | ||
204 | #ifdef CONFIG_CC_STACKPROTECTOR | ||
205 | #include <linux/stackprotector.h> | ||
206 | unsigned long __stack_chk_guard __read_mostly; | ||
207 | EXPORT_SYMBOL(__stack_chk_guard); | ||
208 | #endif | ||
209 | |||
204 | /* | 210 | /* |
205 | * | 211 | * |
206 | */ | 212 | */ |