summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorJeremy Linton <jeremy.linton@arm.com>2016-02-19 11:50:32 -0600
committerCatalin Marinas <catalin.marinas@arm.com>2016-02-26 15:08:04 +0000
commit2f39b5f91eb4bccd786d194e70db1dccad784755 (patch)
tree726713a839445a87a77fa05fb369cd0107e60346 /arch/arm64/kernel/vmlinux.lds.S
parentb7dc8d16e76c25409d93ff3aceda42fc386efc4e (diff)
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>
Diffstat (limited to 'arch/arm64/kernel/vmlinux.lds.S')
-rw-r--r--arch/arm64/kernel/vmlinux.lds.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index e3f6cd740ea3..4c56e7a0621b 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -114,8 +114,9 @@ SECTIONS
*(.got) /* Global offset table */
}
- RO_DATA(PAGE_SIZE)
- EXCEPTION_TABLE(8)
+ ALIGN_DEBUG_RO_MIN(PAGE_SIZE)
+ RO_DATA(PAGE_SIZE) /* everything from this point to */
+ EXCEPTION_TABLE(8) /* _etext will be marked RO NX */
NOTES
ALIGN_DEBUG_RO_MIN(PAGE_SIZE)