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

Commit e07db607 authored by Kees Cook's avatar Kees Cook Committed by Kees Cook
Browse files

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: default avatarKees Cook <keescook@chromium.org>
Tested-by: default avatarLaura Abbott <lauraa@codeaurora.org>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>

(cherry picked from commit 1e6b48116a95046ec51f3d40f83aff8b006674d7)
[merged with arch/arm/kernel/vmlinux.lds.S changes]
Signed-off-by: default avatarKees Cook <keescook@google.com>
Change-Id: I2864c905c0cb48bc9c21ff0bdb79908ad2175b53
parent 182905a2
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