aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-10-19 09:29:13 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-12-09 22:41:17 +1100
commit13dac4e31e75ce10b2fcaad4432a24dae6c955f6 (patch)
tree9fa4157708c5765962619f71fce6f866dfd68abd /arch/powerpc/include/asm/nohash/32/mmu-8xx.h
parentRevert "powerpc: Inline setup_kup()" (diff)
downloadlinux-dev-13dac4e31e75ce10b2fcaad4432a24dae6c955f6.tar.xz
linux-dev-13dac4e31e75ce10b2fcaad4432a24dae6c955f6.zip
powerpc/8xx: Activate KUEP at all time
On the 8xx, there is absolutely no runtime impact with KUEP. Protection against execution of user code in kernel mode is set up at boot time by configuring the groups with contain all user pages as having swapped protection rights, in extenso EX for user and NA for supervisor. Configure KUEP at startup and force selection of CONFIG_PPC_KUEP. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/2129e86944323ffe9ed07fffbeafdfd2e363690a.1634627931.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/nohash/32/mmu-8xx.h')
-rw-r--r--arch/powerpc/include/asm/nohash/32/mmu-8xx.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
index 997cec973406..0e93a4728c9e 100644
--- a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
+++ b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
@@ -39,12 +39,10 @@
* 0 => Kernel => 11 (all accesses performed according as user iaw page definition)
* 1 => Kernel+Accessed => 01 (all accesses performed according to page definition)
* 2 => User => 11 (all accesses performed according as user iaw page definition)
- * 3 => User+Accessed => 00 (all accesses performed as supervisor iaw page definition) for INIT
- * => 10 (all accesses performed according to swaped page definition) for KUEP
+ * 3 => User+Accessed => 10 (all accesses performed according to swaped page definition) for KUEP
* 4-15 => Not Used
*/
-#define MI_APG_INIT 0xdc000000
-#define MI_APG_KUEP 0xde000000
+#define MI_APG_INIT 0xde000000
/* The effective page number register. When read, contains the information
* about the last instruction TLB miss. When MI_RPN is written, bits in