summaryrefslogtreecommitdiff
path: root/arch/powerpc/mm/book3s32
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2023-07-11 18:59:18 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2023-08-02 15:22:18 +0300
commit26e041208291bfdea1cb9e26bc94a0f9499efe15 (patch)
tree11248d52f17a6dd6f7100624681af381f6069758 /arch/powerpc/mm/book3s32
parent4589a2b7894d4266380b65e13291f609cf19dd19 (diff)
downloadlinux-26e041208291bfdea1cb9e26bc94a0f9499efe15.tar.xz
powerpc/kuap: Use MMU_FTR_KUAP on all and refactor disabling kuap
All but book3s/64 use a static branch key for disabling kuap. book3s/64 uses an mmu feature. Refactor all targets to use MMU_FTR_KUAP like book3s/64. For PPC32 that implies updating mmu features fixups once KUAP has been initialised. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/6b3d7c977bad73378ea368bc6818e9c94ea95ab0.1689091022.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/book3s32')
-rw-r--r--arch/powerpc/mm/book3s32/kuap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/mm/book3s32/kuap.c b/arch/powerpc/mm/book3s32/kuap.c
index 28676cabb005..24c1c686e6b9 100644
--- a/arch/powerpc/mm/book3s32/kuap.c
+++ b/arch/powerpc/mm/book3s32/kuap.c
@@ -3,9 +3,6 @@
#include <asm/kup.h>
#include <asm/smp.h>
-struct static_key_false disable_kuap_key;
-EXPORT_SYMBOL(disable_kuap_key);
-
void kuap_lock_all_ool(void)
{
kuap_lock_all();
@@ -30,7 +27,7 @@ void setup_kuap(bool disabled)
return;
if (disabled)
- static_branch_enable(&disable_kuap_key);
+ cur_cpu_spec->mmu_features &= ~MMU_FTR_KUAP;
else
pr_info("Activating Kernel Userspace Access Protection\n");
}