summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/init_32.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-03-04 17:35:09 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2021-03-24 06:09:30 +0300
commit90cbac0e995dd92f7bcf82f74aa50250bf194a4a (patch)
tree3aed376f4cfed4ced8df36e455819cd5e7279f59 /arch/powerpc/mm/init_32.c
parent0b71b37241784c309bea6bd6a9d2027943c4ab94 (diff)
downloadlinux-90cbac0e995dd92f7bcf82f74aa50250bf194a4a.tar.xz
powerpc: Enable KFENCE for PPC32
Add architecture specific implementation details for KFENCE and enable KFENCE for the ppc32 architecture. In particular, this implements the required interface in <asm/kfence.h>. KFENCE requires that attributes for pages from its memory pool can individually be set. Therefore, force the Read/Write linear map to be mapped at page granularity. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Marco Elver <elver@google.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/8dfe1bd2abde26337c1d8c1ad0acfcc82185e0d5.1614868445.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/init_32.c')
-rw-r--r--arch/powerpc/mm/init_32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 02c7db4087cb..3d690be48e84 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -97,6 +97,9 @@ static void __init MMU_setup(void)
if (IS_ENABLED(CONFIG_PPC_8xx))
return;
+ if (IS_ENABLED(CONFIG_KFENCE))
+ __map_without_ltlbs = 1;
+
if (debug_pagealloc_enabled())
__map_without_ltlbs = 1;