]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: mm: allow text and rodata sections to be read-only
authorKees Cook <keescook@chromium.org>
Thu, 3 Apr 2014 20:29:50 +0000 (13:29 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 16 Oct 2014 21:38:54 +0000 (14:38 -0700)
commit3d3e3f66060957d6f0f1b8a6a452b6a7d5ccf49a
tree32f6d8a1c5a2250cc3f303df545dfbf52da62d19
parente5577b2b0f1745f6cd55ca0a629dc1e6e8c35ffe
ARM: mm: allow text and rodata sections to be read-only

This introduces CONFIG_DEBUG_RODATA, making kernel text and rodata
read-only. Additionally, this splits rodata from text so that rodata can
also be NX, which may lead to wasted memory when aligning to SECTION_SIZE.
The read-only areas are made writable during ftrace updates and kexec.

Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
arch/arm/include/asm/cacheflush.h
arch/arm/kernel/ftrace.c
arch/arm/kernel/machine_kexec.c
arch/arm/kernel/vmlinux.lds.S
arch/arm/mm/Kconfig
arch/arm/mm/init.c