mips: rseq: Use new interface required to avoid SIGSEGV infinite recursion
PATCH 1/1 mips: rseq: Use new interface required to avoid SIGSEGV infinite recursion
The new interface was introduced in 784e0300fe (rseq: Avoid infinite recursion when delivering SIGSEGV).
This patch makes the change for mips.
--- arch/mips/kernel/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/signal.c +2 -2
@@ -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 ();
Signature · 1 line
2.7.4
Right after sending out this patch, I found Mathieu Desnoyers had already done it. Sorry for duplicating.
Dengcheng
From: Dengcheng Zhu
Sent: Monday, June 25, 2018 10:56 AM
To: Paul Burton; [email protected]
Cc: [email protected]; Dengcheng Zhu; Will Deacon
Subject: [PATCH] mips: rseq: Use new interface required to avoid SIGSEGV infinite recursion
The new interface was introduced in 784e0300fe (rseq: Avoid infinite recursion when delivering SIGSEGV).
This patch makes the change for mips.
---
arch/mips/kernel/signal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/signal.c +0 -0
@@ -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();
Signature · 1 line
2.7.4