BACKPORT: 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> (cherry picked from commit 1e6b48116a95046ec51f3d40f83aff8b006674d7) [merged with arch/arm/kernel/vmlinux.lds.S changes] Signed-off-by:
Kees Cook <keescook@google.com> Change-Id: I2864c905c0cb48bc9c21ff0bdb79908ad2175b53
Loading
Please register or sign in to comment