aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mmu_decl.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-03-04 14:35:09 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-03-24 14:09:30 +1100
commit90cbac0e995dd92f7bcf82f74aa50250bf194a4a (patch)
tree3aed376f4cfed4ced8df36e455819cd5e7279f59 /arch/powerpc/mm/mmu_decl.h
parentpowerpc/ptrace: Remove duplicate check from pt_regs_check() (diff)
downloadlinux-dev-90cbac0e995dd92f7bcf82f74aa50250bf194a4a.tar.xz
linux-dev-90cbac0e995dd92f7bcf82f74aa50250bf194a4a.zip
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/mmu_decl.h')
-rw-r--r--arch/powerpc/mm/mmu_decl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 998810e68562..7dac910c0b21 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -185,3 +185,8 @@ void ptdump_check_wx(void);
#else
static inline void ptdump_check_wx(void) { }
#endif
+
+static inline bool debug_pagealloc_enabled_or_kfence(void)
+{
+ return IS_ENABLED(CONFIG_KFENCE) || debug_pagealloc_enabled();
+}