Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5c232e0 authored by Kees Cook's avatar Kees Cook Committed by Shiraz Hashim
Browse files

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.

Change-Id: I581132df1b77156675d421eae0f3f2f53d72ca05
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Tested-by: default avatarLaura Abbott <lauraa@codeaurora.org>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarShiraz Hashim <shashim@codeaurora.org>
Git-commit: 1e6b48116a95046ec51f3d40f83aff8b006674d7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[shashim@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: default avatarShiraz Hashim <shashim@codeaurora.org>
parent 4d07fad8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment