From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Paul Burton <paul.burton@mips.com>
Cc: linux-mips <linux-mips@linux-mips.org>,
James Hogan <jhogan@kernel.org>,
Ralf Baechle <ralf@linux-mips.org>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Boqun Feng <boqun.feng@gmail.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] MIPS: Add ksig argument to rseq_{signal_deliver,handle_notify_resume}
Date: Sun, 24 Jun 2018 13:08:26 -0400 (EDT) [thread overview]
Message-ID: <929268757.2788.1529860106385.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20180624165800.2732-1-paul.burton@mips.com>
----- On Jun 24, 2018, at 12:58 PM, Paul Burton paul.burton@mips.com wrote:
> Commit 784e0300fe9f ("rseq: Avoid infinite recursion when delivering
> SIGSEGV") added a new ksig argument to the rseq_signal_deliver() &
> rseq_handle_notify_resume() functions, and was merged in v4.18-rc2.
> Meanwhile MIPS support for restartable sequences was also merged in
> v4.18-rc2 with commit 9ea141ad5471 ("MIPS: Add support for restartable
> sequences"), and therefore didn't get updated for the API change.
>
> This results in build failures like the following:
>
> CC arch/mips/kernel/signal.o
> arch/mips/kernel/signal.c: In function 'handle_signal':
> arch/mips/kernel/signal.c:804:22: error: passing argument 1 of
> 'rseq_signal_deliver' from incompatible pointer type
> [-Werror=incompatible-pointer-types]
> rseq_signal_deliver(regs);
> ^~~~
> In file included from ./include/linux/context_tracking.h:5,
> from arch/mips/kernel/signal.c:12:
> ./include/linux/sched.h:1811:56: note: expected 'struct ksignal *' but
> argument is of type 'struct pt_regs *'
> static inline void rseq_signal_deliver(struct ksignal *ksig,
> ~~~~~~~~~~~~~~~~^~~~
> arch/mips/kernel/signal.c:804:2: error: too few arguments to function
> 'rseq_signal_deliver'
> rseq_signal_deliver(regs);
> ^~~~~~~~~~~~~~~~~~~
>
> Fix this by adding the ksig argument as was done for other architectures
> in commit 784e0300fe9f ("rseq: Avoid infinite recursion when delivering
> SIGSEGV").
Looks like we both noticed the same issue. Your commit message is more
exhaustive than mine, so yours should be merged rather than mine.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thanks!
Mathieu
>
> Signed-off-by: Paul Burton <paul.burton@mips.com>
> Cc: James Hogan <jhogan@kernel.org>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-mips@linux-mips.org
> Cc: linux-kernel@vger.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.17.1
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
prev parent reply other threads:[~2018-06-24 17:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-24 16:58 [PATCH] MIPS: Add ksig argument to rseq_{signal_deliver,handle_notify_resume} Paul Burton
2018-06-24 17:08 ` Mathieu Desnoyers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=929268757.2788.1529860106385.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=boqun.feng@gmail.com \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=paul.burton@mips.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.