linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH V2 2/3] riscv: Add support for restartable sequence
       [not found] ` <1583733592-22873-3-git-send-email-vincent.chen@sifive.com>
@ 2021-07-19 14:43   ` Mathieu Desnoyers
  2021-07-21  3:19     ` Vincent Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Desnoyers @ 2021-07-19 14:43 UTC (permalink / raw)
  To: Vincent Chen, Guo Ren
  Cc: Paul Walmsley, Palmer Dabbelt, linux-kselftest, linux-riscv,
	linux-kernel, Alexander Viro, Linus Torvalds

----- On Mar 9, 2020, at 1:59 AM, Vincent Chen vincent.chen@sifive.com wrote:
[...]
> --- a/arch/riscv/kernel/signal.c
> +++ b/arch/riscv/kernel/signal.c
> @@ -234,6 +234,7 @@ static void handle_signal(struct ksignal *ksig, struct
> pt_regs *regs)
> 	sigset_t *oldset = sigmask_to_save();
> 	int ret;
> 
> +	rseq_signal_deliver(ksig, regs);
> 	/* Are we from a system call? */
> 	if (regs->cause == EXC_SYSCALL) {

[...]

As Al Viro pointed out on IRC, the rseq_signal_deliver() should go after syscall
restart handling, similarly to what is done on every other supported architecture.

Note that there is already an upstream commit derived on this non-upstream patch:

commit 9866d141a097 ("csky: Add support for restartable sequence")

which is broken in the same way.

I'm not sure why I was never CC'd on the csky patch. Considering that nobody
bothered to implement the rseq selftests for csky, I don't see how any of
this is tested. I would favor a revert of that commit until the testing glue
is contributed. Unfortunately, the csky commit has been upstream since v5.7.

Thanks,

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

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

* Re: [PATCH V2 2/3] riscv: Add support for restartable sequence
  2021-07-19 14:43   ` [PATCH V2 2/3] riscv: Add support for restartable sequence Mathieu Desnoyers
@ 2021-07-21  3:19     ` Vincent Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Vincent Chen @ 2021-07-21  3:19 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Guo Ren, Paul Walmsley, Palmer Dabbelt, linux-kselftest,
	linux-riscv, linux-kernel, Alexander Viro, Linus Torvalds

On Mon, Jul 19, 2021 at 10:43 PM Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
>
> ----- On Mar 9, 2020, at 1:59 AM, Vincent Chen vincent.chen@sifive.com wrote:
> [...]
> > --- a/arch/riscv/kernel/signal.c
> > +++ b/arch/riscv/kernel/signal.c
> > @@ -234,6 +234,7 @@ static void handle_signal(struct ksignal *ksig, struct
> > pt_regs *regs)
> >       sigset_t *oldset = sigmask_to_save();
> >       int ret;
> >
> > +     rseq_signal_deliver(ksig, regs);
> >       /* Are we from a system call? */
> >       if (regs->cause == EXC_SYSCALL) {
>
> [...]
>
> As Al Viro pointed out on IRC, the rseq_signal_deliver() should go after syscall
> restart handling, similarly to what is done on every other supported architecture.

Thanks for the notification. I will adjust the porting and try to send
the patch again for review.


>
> Note that there is already an upstream commit derived on this non-upstream patch:
>
> commit 9866d141a097 ("csky: Add support for restartable sequence")
>
> which is broken in the same way.
>
> I'm not sure why I was never CC'd on the csky patch. Considering that nobody
> bothered to implement the rseq selftests for csky, I don't see how any of
> this is tested. I would favor a revert of that commit until the testing glue
> is contributed. Unfortunately, the csky commit has been upstream since v5.7.
>
> Thanks,
>
> Mathieu
>
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com

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

end of thread, other threads:[~2021-07-21  3:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1583733592-22873-1-git-send-email-vincent.chen@sifive.com>
     [not found] ` <1583733592-22873-3-git-send-email-vincent.chen@sifive.com>
2021-07-19 14:43   ` [PATCH V2 2/3] riscv: Add support for restartable sequence Mathieu Desnoyers
2021-07-21  3:19     ` Vincent Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).