All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for 4.18] MIPS: adapt to rseq API changes
@ 2018-06-24 16:25 Mathieu Desnoyers
  2018-06-24 17:08 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Desnoyers @ 2018-06-24 16:25 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, Mathieu Desnoyers, Will Deacon, peterz, paulmck,
	boqun.feng, linux-mips, Ralf Baechle, Paul Burton, James Hogan

The prototype of rseq_handle_notify_resume() and rseq_signal_deliver()
had to be changed to fix handling of traps occuring on signal delivery.
The API change was merged at the same time as the rseq MIPS port.

Adapt the MIPS port to this API change.

Fixes: 784e0300fe ("rseq: Avoid infinite recursion when delivering SIGSEGV")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: peterz@infradead.org
Cc: paulmck@linux.vnet.ibm.com
Cc: boqun.feng@gmail.com
Cc: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
---
 arch/mips/kernel/signal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 00f2535d2226..0a9cfe7a0372 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -801,7 +801,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
 		regs->regs[0] = 0;		/* Don't deal with this again.	*/
 	}
 
-	rseq_signal_deliver(regs);
+	rseq_signal_deliver(ksig, regs);
 
 	if (sig_uses_siginfo(&ksig->ka, abi))
 		ret = abi->setup_rt_frame(vdso + abi->vdso->off_rt_sigreturn,
@@ -870,7 +870,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
 	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
 		clear_thread_flag(TIF_NOTIFY_RESUME);
 		tracehook_notify_resume(regs);
-		rseq_handle_notify_resume(regs);
+		rseq_handle_notify_resume(NULL, regs);
 	}
 
 	user_enter();
-- 
2.11.0


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

* Re: [PATCH for 4.18] MIPS: adapt to rseq API changes
  2018-06-24 16:25 [PATCH for 4.18] MIPS: adapt to rseq API changes Mathieu Desnoyers
@ 2018-06-24 17:08 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2018-06-24 17:08 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Thomas Gleixner, linux-kernel, Will Deacon, peterz, paulmck,
	boqun.feng, linux-mips, Ralf Baechle, Paul Burton, James Hogan

Hi Mathieu,

On Sun, Jun 24, 2018 at 12:25:13PM -0400, Mathieu Desnoyers wrote:
> The prototype of rseq_handle_notify_resume() and rseq_signal_deliver()
> had to be changed to fix handling of traps occuring on signal delivery.
> The API change was merged at the same time as the rseq MIPS port.
> 
> Adapt the MIPS port to this API change.

Ah, you beat me to send this out :)

Pushed to mips-fixes.

Thanks,
    Paul

> Fixes: 784e0300fe ("rseq: Avoid infinite recursion when delivering SIGSEGV")
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: peterz@infradead.org
> Cc: paulmck@linux.vnet.ibm.com
> Cc: boqun.feng@gmail.com
> Cc: linux-mips@linux-mips.org
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: James Hogan <jhogan@kernel.org>
> ---
>  arch/mips/kernel/signal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
> index 00f2535d2226..0a9cfe7a0372 100644
> --- a/arch/mips/kernel/signal.c
> +++ b/arch/mips/kernel/signal.c
> @@ -801,7 +801,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
>  		regs->regs[0] = 0;		/* Don't deal with this again.	*/
>  	}
>  
> -	rseq_signal_deliver(regs);
> +	rseq_signal_deliver(ksig, regs);
>  
>  	if (sig_uses_siginfo(&ksig->ka, abi))
>  		ret = abi->setup_rt_frame(vdso + abi->vdso->off_rt_sigreturn,
> @@ -870,7 +870,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
>  	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
>  		clear_thread_flag(TIF_NOTIFY_RESUME);
>  		tracehook_notify_resume(regs);
> -		rseq_handle_notify_resume(regs);
> +		rseq_handle_notify_resume(NULL, regs);
>  	}
>  
>  	user_enter();
> -- 
> 2.11.0
> 

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

end of thread, other threads:[~2018-06-24 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-24 16:25 [PATCH for 4.18] MIPS: adapt to rseq API changes Mathieu Desnoyers
2018-06-24 17:08 ` Paul Burton

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.