Re: [PATCH RFC 2/4] syscalls: Add support for x86_x32 for the common syscall table

From: Arnd Bergmann

Date: Fri Jul 24 2026 - 16:16:43 EST


On Fri, Jul 24, 2026, at 22:00, André Almeida wrote:
> x86_x32 has a peculiar ordering: first, goes the x86 syscalls. Then, the
> shared syscall numbers from the common table, and finally the x86_x32
> syscall numbers. Adapt syscallhdr.sh script to take this into account.
>
> Let's hope that x32 is deprecated before the syscall table reaches syscall
> 512, to avoid making the shared table more confusing.
>
> Signed-off-by: André Almeida <andrealmeid@xxxxxxxxxx>

The suggestion at the moment is to remove x32 in linux-7.4, and
I don't think your patches will hit 7.3 at this point, so hopefully
we don't need this bit either.

As we discussed recently [1], we likely still need to stay away from
the x32 range to avoid having conflicting numbers on x86-64 between
future number assignments and old kernels (< linux-5.4) that fail
to return -ENOSYS for x32 special syscalls. The only way we could
arguably consider reusing them is if glibc increases the minimum
kernel version from 3.2 to 5.4 before we get to that number, but
that is still slightly fragile because glibc is not the only
runtime to consider here.

Arnd

[1] https://lore.kernel.org/lkml/29bdbdc4-caef-4486-8816-84422c23bc20@xxxxxxxxxxxxxxxx/