[PATCH v17 06/15] arm64: syscall: Rework the syscall exit path in el0_svc_common()

Linus Walleij linusw at kernel.org
Tue Jul 21 01:45:20 PDT 2026


On Tue, Jul 21, 2026 at 10:43 AM Linus Walleij <linusw at kernel.org> wrote:
> On Tue, Jul 21, 2026 at 10:19 AM Jinjie Ruan <ruanjinjie at huawei.com> wrote:
>
>
> > In preparation for moving arm64 over to the generic entry,
> > invert the nested conditional flags check within el0_svc_common().
> >
> > No functional changes.
> (...)
> >         if (!has_syscall_work(flags) && !IS_ENABLED(CONFIG_DEBUG_RSEQ)) {
> >                 flags = read_thread_flags();
> > -               if (!has_syscall_work(flags) && !(flags & _TIF_SINGLESTEP))
> > -                       return;
> > +               if (has_syscall_work(flags) || flags & _TIF_SINGLESTEP)
> > +                       syscall_trace_exit(regs);
> > +               return;
>
> What about just:
>
> if (...)
>   goto trace_exit;
>
> This is easier to follow IMO.
>
> With that:
> Reviewed-by: Linus Walleij <linusw at kernel.org>

Aha I see you refactor it again in patch 8, no big deal then.
This is fine, add the Reviewed-by.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list