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: NKees Cook <keescook@chromium.org> Tested-by: NLaura Abbott <lauraa@codeaurora.org> Acked-by: NNicolas Pitre <nico@linaro.org>
Showing
想要评论请 注册 或 登录