All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong
@ 2021-05-06 11:56 ` Christophe Leroy
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe Leroy @ 2021-05-06 11:56 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linux-kernel, linuxppc-dev

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 <christophe.leroy@csgroup.eu>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong
@ 2021-05-06 11:56 ` Christophe Leroy
  0 siblings, 0 replies; 4+ messages in thread
From: Christophe Leroy @ 2021-05-06 11:56 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, linux-kernel

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 <christophe.leroy@csgroup.eu>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong
  2021-05-06 11:56 ` Christophe Leroy
@ 2021-05-15 22:43   ` Michael Ellerman
  -1 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2021-05-15 22:43 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Christophe Leroy
  Cc: linux-kernel, linuxppc-dev

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong
@ 2021-05-15 22:43   ` Michael Ellerman
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2021-05-15 22:43 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Christophe Leroy
  Cc: linuxppc-dev, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-15 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 11:56 [PATCH] powerpc/syscall: Calling kuap_save_and_lock() is wrong Christophe Leroy
2021-05-06 11:56 ` Christophe Leroy
2021-05-15 22:43 ` Michael Ellerman
2021-05-15 22:43   ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.