summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/book3s32/kuap.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-06-03 08:41:36 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-06-17 00:09:07 +1000
commit91ec66719d4c5c0e7b4e32585b01881660d1bc53 (patch)
tree3d527b14c1fdb5111112db4257b109c4d4ddd3e6 /arch/powerpc/mm/book3s32/kuap.c
parentf6025a140ba8dcabdfb8a1e27ddaf44821700dce (diff)
downloadlinux-91ec66719d4c5c0e7b4e32585b01881660d1bc53.tar.gz
linux-91ec66719d4c5c0e7b4e32585b01881660d1bc53.tar.bz2
linux-91ec66719d4c5c0e7b4e32585b01881660d1bc53.zip
powerpc/32s: Move setup_{kuep/kuap}() into {kuep/kuap}.c
Avoids the #ifdef in mmu.c Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/0b7a13d414837e58264edc336b89c2fe9f35f9bc.1622708530.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/book3s32/kuap.c')
-rw-r--r--arch/powerpc/mm/book3s32/kuap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/mm/book3s32/kuap.c b/arch/powerpc/mm/book3s32/kuap.c
new file mode 100644
index 000000000000..1df55392878e
--- /dev/null
+++ b/arch/powerpc/mm/book3s32/kuap.c
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include <asm/kup.h>
+
+void __init setup_kuap(bool disabled)
+{
+ pr_info("Activating Kernel Userspace Access Protection\n");
+
+ if (disabled)
+ pr_warn("KUAP cannot be disabled yet on 6xx when compiled in\n");
+}