Message ID | d1ad9fdd9b27da3fdfa16510bb542ed51fa6e134.1634292136.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [v1,1/8] powerpc/booke: Disable STRICT_KERNEL_RWX, DEBUG_PAGEALLOC and KFENCE | expand |
Related | show |
On Fri, 15 Oct 2021 12:02:42 +0200, Christophe Leroy wrote: > fsl_booke and 44x are not able to map kernel linear memory with > pages, so they can't support DEBUG_PAGEALLOC and KFENCE, and > STRICT_KERNEL_RWX is also a problem for now. > > Enable those only on book3s (both 32 and 64 except KFENCE), 8xx and 40x. > > > [...] Applied to powerpc/next. [1/8] powerpc/booke: Disable STRICT_KERNEL_RWX, DEBUG_PAGEALLOC and KFENCE https://git.kernel.org/powerpc/c/68b44f94d6370e2c6c790fedd28e637fa9964a93 [2/8] powerpc/fsl_booke: Rename fsl_booke.c to fsl_book3e.c https://git.kernel.org/powerpc/c/3a75fd709c89cb45b8b1044b8ef0d15027a69f9b [3/8] powerpc/fsl_booke: Take exec flag into account when setting TLBCAMs https://git.kernel.org/powerpc/c/01116e6e98b08ab0641fa516ddafb1b1b2088e64 [4/8] powerpc/fsl_booke: Enable reloading of TLBCAM without switching to AS1 https://git.kernel.org/powerpc/c/a97dd9e2f760c6996a8f1385ddab0bfef325b364 [5/8] powerpc/fsl_booke: Tell map_mem_in_cams() if init is done https://git.kernel.org/powerpc/c/52bda69ae8b5102fe08c9db10f4a1514478e07d3 [6/8] powerpc/fsl_booke: Allocate separate TLBCAMs for readonly memory https://git.kernel.org/powerpc/c/0b2859a74306b2b89f6e77c216fe0992ff890fa6 [7/8] powerpc/fsl_booke: Update of TLBCAMs after init https://git.kernel.org/powerpc/c/d5970045cf9e266d9a43941ac0866865fd22a36a [8/8] powerpc/fsl_booke: Enable STRICT_KERNEL_RWX https://git.kernel.org/powerpc/c/49e3d8ea62482625c3835f0a33ae9c1dda39ea8f cheers
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index ba5b66189358..6b9f523882c5 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -138,7 +138,7 @@ config PPC select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64 select ARCH_HAS_SET_MEMORY - select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 || PPC32) && !HIBERNATION) + select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX && !PPC_BOOK3S_32 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UACCESS_FLUSHCACHE @@ -150,7 +150,7 @@ config PPC select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_STACKWALK select ARCH_SUPPORTS_ATOMIC_RMW - select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC32 || PPC_BOOK3S_64 + select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx || 40x select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF if PPC64 select ARCH_USE_MEMTEST @@ -190,7 +190,7 @@ config PPC select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14 select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14 - select HAVE_ARCH_KFENCE if PPC32 + select HAVE_ARCH_KFENCE if PPC_BOOK3S_32 || PPC_8xx || 40x select HAVE_ARCH_KGDB select HAVE_ARCH_MMAP_RND_BITS select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
fsl_booke and 44x are not able to map kernel linear memory with pages, so they can't support DEBUG_PAGEALLOC and KFENCE, and STRICT_KERNEL_RWX is also a problem for now. Enable those only on book3s (both 32 and 64 except KFENCE), 8xx and 40x. Fixes: 88df6e90fa97 ("[POWERPC] DEBUG_PAGEALLOC for 32-bit") Fixes: 95902e6c8864 ("powerpc/mm: Implement STRICT_KERNEL_RWX on PPC32") Fixes: 90cbac0e995d ("powerpc: Enable KFENCE for PPC32") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- arch/powerpc/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)