[PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1936d LANDED

Landed in mainline as 5d510ed78bcf on 2021-05-12.

2 messages, 2 authors, 2021-05-15 · open the first message on its own page

[PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong

From: Christophe Leroy <hidden>
Date: 2021-05-06 11:56:37

kuap_save_and_lock() is only for interrupts inside kernel.

system call are only from user, calling kuap_save_and_lock()
is wrong.

Fixes: c16728835eec ("powerpc/32: Manage KUAP in C")
Signed-off-by: Christophe Leroy <redacted>
---
 arch/powerpc/kernel/interrupt.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index e4559f8914eb..30a596182baa 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -34,9 +34,6 @@ notrace long system_call_exception(long r3, long r4, long r5,
 	syscall_fn f;
 
 	kuep_lock();
-#ifdef CONFIG_PPC32
-	kuap_save_and_lock(regs);
-#endif
 
 	regs->orig_gpr3 = r3;
 
-- 
2.25.0

Re: [PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong

From: Michael Ellerman <hidden>
Date: 2021-05-15 22:45:58

On Thu, 6 May 2021 11:56:31 +0000 (UTC), Christophe Leroy wrote:
kuap_save_and_lock() is only for interrupts inside kernel.

system call are only from user, calling kuap_save_and_lock()
is wrong.
Applied to powerpc/fixes.

[1/1] powerpc/syscall: Calling kuap_save_and_lock() is wrong
      https://git.kernel.org/powerpc/c/5d510ed78bcfcbbd3b3891cbe79cd7543bce1d05

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help