Re: [PATCH V2] x86/entry: Fix ptrace regression

From
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date
2026-11-02 16:21:18
Also in
linux-alpha, linux-arch, linux-doc, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-sh, linux-um, lkml, loongarch, sparclinux
Reply to
Thomas Gleixner, 2026-11-01
On 2026-11-01 18:58:08 [+0100], Thomas Gleixner wrote:
quoted hunk ↗ jump to hunk
--- a/arch/x86/entry/syscall_32.c
+++ b/arch/x86/entry/syscall_32.c
@@ -77,6 +77,10 @@ static __always_inline void do_syscall_3
 	if (likely(nr < IA32_NR_syscalls)) {
 		nr = array_index_nospec(nr, IA32_NR_syscalls);
 		regs->ax = ia32_sys_call(regs, (unsigned int)nr);
+	} else {
+		/* See comment in do_syscall_64() */
+		if (nr != -1UL) {
+			regs->ax = -ENOSYS;
A curly closing bracket here and then it compiles for me. Or remove the
one in the "if" line.
 	}
 }
With either of the suggested changes:
Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Sebastian
Thread (125 messages) 125 messages, 17 authors, last reply 6d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help