riscv: add STRICT_KERNEL_RWX support
authorZong Li <zong.li@sifive.com>
Mon, 9 Mar 2020 16:55:41 +0000 (00:55 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 26 Mar 2020 16:24:45 +0000 (09:24 -0700)
commitd27c3c90817e4c5ea655714065a725b4abd576f9
tree6ab698bef5704fa108f5454047f6cf92cc196c07
parent00cb41d5ad3189f52a59f42766918557693f94fa
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>
arch/riscv/Kconfig
arch/riscv/include/asm/set_memory.h
arch/riscv/mm/init.c