BACKPORT: arm64: mm: Mark .rodata as RO
authorJeremy Linton <jeremy.linton@arm.com>
Fri, 19 Feb 2016 17:50:32 +0000 (11:50 -0600)
committerSami Tolvanen <samitolvanen@google.com>
Wed, 5 Oct 2016 15:09:05 +0000 (08:09 -0700)
commit1a6c07cf6f2671e1a8a561745bdcc295a7cfeb17
tree90c7abbe06f10299689b14298dd6b8a1ddda03a7
parent8fd31d5a2c06726a6060ea355bb5c90d44b132c4
BACKPORT: arm64: mm: Mark .rodata as RO

Currently the .rodata section is actually still executable when DEBUG_RODATA
is enabled. This changes that so the .rodata is actually read only, no execute.
It also adds the .rodata section to the mem_init banner.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
[catalin.marinas@arm.com: added vm_struct vmlinux_rodata in map_kernel()]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 31374226
Change-Id: I6fd95beaf814fc91805da12c5329a57ce9008fd7
(cherry picked from commit 2f39b5f91eb4bccd786d194e70db1dccad784755)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/mm/init.c
arch/arm64/mm/mmu.c