On October 23, 2026 6:09:07 AM PDT, Thomas Gleixner <[email protected]> wrote: >On Thu, Oct 22 2026 at 17:22, H. Peter Anvin wrote: >> On October 22, 2026 2:34:08 PM PDT, Thomas Gleixner <[email protected]> wrote: >>>-static __always_inline void do_syscall_x32(struct pt_regs *regs, unsigned >>>long nr) >>>+static __always_inline bool do_syscall_x32(struct pt_regs *regs, unsigned >>>long nr) >>> { >>>+ if (!IS_ENABLED(CONFIG_X86_X32_ABI)) >>>+ return false; >>>+ >>>+ /* Preserve the historic insanity of treating -1 special on x32 */ >>>+ if (nr == ULONG_MAX) >>>+ return true; >> >> It was never limited to x32... > >Tired brain misread the test output: > >[RUN] Running tests under ptrace: modifying the default return >[RUN] Checking system calls with msb = 0 (0x0) >[OK] x32 syscalls 0:-64..-2 returned -ENOSYS as expected >[OK] x32 syscall 0:-1 returned MODIFIED_BY_PTRACE as expected >[OK] x64 syscalls 0:-64..-1 returned -ENOSYS as expected > >But that's because the "-1" on x32 is actually 0xFFFFFFFF while on x64 >it's 0x7FFFFFFF. > >The whole mess comes from using -1 as indicator for syscall abort which >is undistinguishable from a syscall(nr=-1). > >Bah. Let me restore this nonsense. > >Thanks, > > tglx > > >
Yeah, that was always a WTF.
