Thread (31 messages) 31 messages, 4 authors, 6d ago

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

From: Linus Walleij <linusw@kernel.org>
Date: 2026-07-21 08:45:42
Also in: linux-mm, lkml

On Tue, Jul 21, 2026 at 10:43 AM Linus Walleij [off-list ref] wrote:
On Tue, Jul 21, 2026 at 10:19 AM Jinjie Ruan [off-list ref] wrote:

quoted
In preparation for moving arm64 over to the generic entry,
invert the nested conditional flags check within el0_svc_common().

No functional changes.
(...)
quoted
        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@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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help