diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2017-03-27 02:44:47 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-12-16 22:37:07 -0800 |
commit | 40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9 (patch) | |
tree | 4855103872087025010742caa2ec0818f91f10ee /arch/xtensa/kernel/process.c | |
parent | aa6476f76c1678d5d1087b39d3047601f0139ef0 (diff) | |
download | linux-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.tar.gz linux-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.tar.bz2 linux-40d1a07b333ef1f7fce11ee20b8f4281d1a75fb9.zip |
xtensa: enable stack protector
The implementation is adopted from the ARM arch. GCC 7.3, 8 or newer is
required for building the xtensa kernel with SSP.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/process.c')
-rw-r--r-- | arch/xtensa/kernel/process.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index ff4f0ecb03dd..8dd0593fb2c4 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c @@ -58,6 +58,12 @@ void (*pm_power_off)(void) = NULL; EXPORT_SYMBOL(pm_power_off); +#ifdef CONFIG_CC_STACKPROTECTOR +#include <linux/stackprotector.h> +unsigned long __stack_chk_guard __read_mostly; +EXPORT_SYMBOL(__stack_chk_guard); +#endif + #if XTENSA_HAVE_COPROCESSORS void coprocessor_release_all(struct thread_info *ti) |