summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/book3s/64
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-04-29 23:25:36 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2016-05-01 18:32:30 +1000
commite58e87adc8bf92e9c6abb1dc1f4af2500aa07ff3 (patch)
treec4af711ba617e4646735f695d2f79e9e975e1f66 /arch/powerpc/include/asm/book3s/64
parent96270b1fc25d527b015c73533119f6c85df2e0ff (diff)
downloadblackbird-op-linux-e58e87adc8bf92e9c6abb1dc1f4af2500aa07ff3.tar.gz
blackbird-op-linux-e58e87adc8bf92e9c6abb1dc1f4af2500aa07ff3.zip
powerpc/mm: Update _PAGE_KERNEL_RO
PS3 had used a PPP bit hack to implement a read only mapping in the kernel area. Since we are bolting the ioremap area, it used the pte flags _PAGE_PRESENT | _PAGE_USER to get a PPP value of 0x3 there by resulting in a read only mapping. This means the area can be accessed by user space, but kernel will never return such an address to user space. But we can do better by implementing a read only kernel mapping using PPP bits 0b110. This also allows us to do read only kernel mapping for radix in later patches. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/book3s/64')
-rw-r--r--arch/powerpc/include/asm/book3s/64/hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index e1abe39e9dc2..eb224792095f 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -119,10 +119,10 @@
#endif /* CONFIG_PPC_MM_SLICES */
/*
- * No separate kernel read-only, user access blocked by key
+ * user access blocked by key
*/
#define _PAGE_KERNEL_RW (_PAGE_PRIVILEGED | _PAGE_RW | _PAGE_DIRTY)
-#define _PAGE_KERNEL_RO _PAGE_KERNEL_RW
+#define _PAGE_KERNEL_RO (_PAGE_PRIVILEGED | _PAGE_READ)
#define _PAGE_KERNEL_RWX (_PAGE_PRIVILEGED | _PAGE_DIRTY | \
_PAGE_RW | _PAGE_EXEC)
OpenPOWER on IntegriCloud