summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2016-11-22 11:49:30 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2016-11-23 12:57:15 +0100
commit6533b7c16ee5712041b4e324100550e02a9a5dda (patch)
tree4a177902f8805cd188f851154d24a673dc1b5449 /arch/powerpc/kernel/process.c
parentpowerpc: Implement {cmp}xchg for u8 and u16 (diff)
downloadlinux-6533b7c16ee5712041b4e324100550e02a9a5dda.tar.xz
linux-6533b7c16ee5712041b4e324100550e02a9a5dda.zip
powerpc: Initial stack protector (-fstack-protector) support
Partialy copied from commit c743f38013aef ("ARM: initial stack protector (-fstack-protector) support") This is the very basic stuff without the changing canary upon task switch yet. Just the Kconfig option and a constant canary value initialized at boot time. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 5b62e8c36210..9da9a42595ce 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -64,6 +64,12 @@
#include <linux/kprobes.h>
#include <linux/kdebug.h>
+#ifdef CONFIG_CC_STACKPROTECTOR
+#include <linux/stackprotector.h>
+unsigned long __stack_chk_guard __read_mostly;
+EXPORT_SYMBOL(__stack_chk_guard);
+#endif
+
/* Transactional Memory debug */
#ifdef TM_DEBUG_SW
#define TM_DEBUG(x...) printk(KERN_INFO x)