From c16728835eec45fa82f4744a52940717ac828f6d Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Fri, 12 Mar 2021 12:50:51 +0000 Subject: powerpc/32: Manage KUAP in C Move all KUAP management in C. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/199365ddb58d579daf724815f2d0acb91cc49d19.1615552867.git.christophe.leroy@csgroup.eu --- arch/powerpc/include/asm/interrupt.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/powerpc/include/asm/interrupt.h') diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h index 857375309255..7c633896d758 100644 --- a/arch/powerpc/include/asm/interrupt.h +++ b/arch/powerpc/include/asm/interrupt.h @@ -36,6 +36,8 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrup if (user_mode(regs)) { kuep_lock(); account_cpu_user_entry(); + } else { + kuap_save_and_lock(regs); } #endif /* -- cgit v1.2.3