]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: mm: allow non-text sections to be non-executable
authorKees Cook <keescook@chromium.org>
Fri, 4 Apr 2014 00:28:11 +0000 (17:28 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 16 Oct 2014 21:38:54 +0000 (14:38 -0700)
commite5577b2b0f1745f6cd55ca0a629dc1e6e8c35ffe
tree1c18e08416613ef84513cb2cd52679e7af6d4d7c
parent15132a52d9709e6ff6c2376661ac37e0440b37c2
ARM: mm: allow non-text sections to be non-executable

Adds CONFIG_ARM_KERNMEM_PERMS to separate the kernel memory regions
into section-sized areas that can have different permisions. Performs
the NX permission changes during free_initmem, so that init memory can be
reclaimed.

This uses section size instead of PMD size to reduce memory lost to
padding on non-LPAE systems.

Based on work by Brad Spengler, Larry Bassel, and Laura Abbott.

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