Re: [PATCH] x86: Start removing X86_X32_ABI

From: H. Peter Anvin

Date: Mon Jun 01 2026 - 17:47:20 EST


On May 27, 2026 5:02:04 AM PDT, David Laight <david.laight.linux@xxxxxxxxx> wrote:
>On Tue, 26 May 2026 08:54:56 -0700
>"H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
>
>> On May 26, 2026 3:40:51 AM PDT, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:
>> >On 2026-05-23 14:43:52 [-0700], H. Peter Anvin wrote:
>> >> However, we can not recycle the syscall numbers. The x32 flag in the
>> >> syscall number was advisory originally; it was introduced late in the
>> >> game to work around a design bug in the input subsystem (*).
>> >
>> >If x32 is removed/ not supported why can't the 32/64 bit ABI use syscall
>> >numbers 512+? It is an ELF32 with EM_X86_64 which should be rejected.
>> >Shouldn't this free the space because there are no users anymore?
>> >
>> >> -hpa
>> >
>> >Sebastian
>>
>> System call numbers or even mechanisms are in no wise tied to the ELF type.
>> An x86-64 binary can issue x86-64, x32 or i386 system calls, even from 64-bit mode!
>>
>
>I suspect a 32bit binary can also switch to 64bit mode and issue any
>of them as well.
>
>-- David

Yes, they can. But you don't even need to switch to 32-bit mode to issue an i386 syscall.