Thread (26 messages) 26 messages, 5 authors, 15d ago

Re: [RFC] entry: Untangle the return value of syscall_enter_from_user_mode from syscall NR

From: Thomas Gleixner <tglx@kernel.org>
Date: 2026-07-06 08:17:14
Also in: linux-doc, linux-riscv, linux-s390, lkml, loongarch

On Wed, Jul 01 2026 at 19:42, Michal Suchánek wrote:
 
 	if (unlikely(work & SYSCALL_WORK_SYSCALL_TRACEPOINT))
-		syscall = trace_syscall_enter(regs, syscall);
+		*syscall = trace_syscall_enter(regs, *syscall);
 
-	syscall_enter_audit(regs, syscall);
+	syscall_enter_audit(regs, *syscall);
 
-	return ret ? : syscall;
+	return 0;
That breaks trace_syscall_enter() because the probes/BPF muck attached
ot that can:

     1) set the return code
     2) set syscall to -1L

That works correctly today, but with your sloppy hackery the low level
x86 code falls into sys_ni_syscall() which sets the return code to
-ENOSYS.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help