summaryrefslogtreecommitdiff
path: root/arch/riscv/Kconfig
diff options
context:
space:
mode:
authorZong Li <zong.li@sifive.com>2020-03-09 19:55:41 +0300
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-03-26 19:24:45 +0300
commitd27c3c90817e4c5ea655714065a725b4abd576f9 (patch)
tree6ab698bef5704fa108f5454047f6cf92cc196c07 /arch/riscv/Kconfig
parent00cb41d5ad3189f52a59f42766918557693f94fa (diff)
downloadlinux-d27c3c90817e4c5ea655714065a725b4abd576f9.tar.xz
riscv: add STRICT_KERNEL_RWX support
The commit contains that make text section as non-writable, rodata section as read-only, and data section as non-executable. The init section should be changed to non-executable. Signed-off-by: Zong Li <zong.li@sifive.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/Kconfig')
-rw-r--r--arch/riscv/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 31fbc6ef7a6d..dfc9c3ea9f7d 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -61,6 +61,7 @@ config RISCV
select ARCH_HAS_GIGANTIC_PAGE
select ARCH_HAS_SET_DIRECT_MAP
select ARCH_HAS_SET_MEMORY
+ select ARCH_HAS_STRICT_KERNEL_RWX
select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
select SPARSEMEM_STATIC if 32BIT
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU