arm64: mm: Mark .rodata as RO
authorJeremy Linton <jeremy.linton@arm.com>
Fri, 19 Feb 2016 17:50:32 +0000 (11:50 -0600)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 29 Jul 2016 16:59:49 +0000 (18:59 +0200)
commit953adfd4a1b2c0ff4be17ad7ebacc241b60a7638
tree3b065edfd66530714fce8089ab5fea000a872a55
parent5dd612ebfad71f5463d89ff92d1bc307cd286b5d
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>
(cherry picked from commit 2f39b5f91eb4bccd786d194e70db1dccad784755)
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/mm/init.c
arch/arm64/mm/mmu.c