diff options
author | Guo Ren <guoren@linux.alibaba.com> | 2020-07-10 16:19:57 +0000 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-07-30 11:37:39 -0700 |
commit | f2c9699f65557a31fed4ddb9e5b4d9489b1bf32f (patch) | |
tree | 944424af9ffbfbb6ac6dafef33202045a2e8da4c /arch/riscv/Kconfig | |
parent | 08b5985e7be54d15d058191adda2722bd395df32 (diff) |
riscv: Add STACKPROTECTOR supported
The -fstack-protector & -fstack-protector-strong features are from
gcc. The patch only add basic kernel support to stack-protector
feature and some arch could have its own solution such as
ARM64_PTR_AUTH.
After enabling STACKPROTECTOR and STACKPROTECTOR_STRONG, the .text
size is expanded from 0x7de066 to 0x81fb32 (only 5%) to add canary
checking code.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/Kconfig')
-rw-r--r-- | arch/riscv/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index b124ca4323bf..b55be0980b2b 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -66,6 +66,7 @@ config RISCV select HAVE_PERF_EVENTS select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP + select HAVE_STACKPROTECTOR select HAVE_SYSCALL_TRACEPOINTS select IRQ_DOMAIN select MODULES_USE_ELF_RELA if MODULES |