summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-08-10 23:46:49 +0200
committerRussell King <rmk+kernel@armlinux.org.uk>2016-08-12 17:47:06 +0200
commit7619751f8c900fa5fdd76db06f4caf095c56de8e (patch)
treec4b0185d61b10af7b385e2c20cbe15137ac93097 /arch/arm/mm/mmu.c
parentARM: 8594/1: enable binfmt_flat on systems with an MMU (diff)
downloadlinux-7619751f8c900fa5fdd76db06f4caf095c56de8e.tar.xz
linux-7619751f8c900fa5fdd76db06f4caf095c56de8e.zip
ARM: 8595/2: apply more __ro_after_init
Guided by grsecurity's analogous __read_only markings in arch/arm, this applies several uses of __ro_after_init to structures that are only updated during __init. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 62f4d01941f7..2396935e715c 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -243,7 +243,7 @@ __setup("noalign", noalign_setup);
#define PROT_PTE_S2_DEVICE PROT_PTE_DEVICE
#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE
-static struct mem_type mem_types[] = {
+static struct mem_type mem_types[] __ro_after_init = {
[MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED |
L_PTE_SHARED,