FS#78274 - Support the execution of binaries for the x32-ABI

Attached to Project: Arch Linux
Opened by Sven (sve) - Friday, 21 April 2023, 09:49 GMT
Last edited by Jelle van der Waa (jelly) - Thursday, 28 September 2023, 16:50 GMT
Task Type Feature Request
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Levente Polyak (anthraxx)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

The x32-ABI has its merits for some work loads, see https://en.wikipedia.org/wiki/X32_ABI , esp. references in the "Details" sections.

I am asking to consider supporting the x32-ABI on the execution level so that you can execute x32 binaries on archlinux.
(Development support is not so pressing because other distros provide this or advanced users can build it themselves.)

There are two options I know:

A.
enable CONFIG_X86_X32_ABI (as done by Ubuntu 22.04 and older, etc.), in older kernels named CONFIG_X86_X32

B.
allow the kernel to activate X32 support per GRUB command line option, as done by recent Debian versions.
Includes the x32-relevant code, but disables its use on standard boots: CONFIG_X86_X32_ABI=y CONFIG_X86_X32_DISABLED=y
Users that must run x32 binaries can easily add the GRUB cmdline option syscall.x32=y to enable x32 binaries.
This could be a good compromise between kernel complexity and resource efficiency.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Thursday, 28 September 2023, 16:50 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Although Debian has this, this is significantly more work to support and as 32 bit is dying and Arch wants to be a modern distro. We won't support this.
Comment by Toolybird (Toolybird) - Friday, 21 April 2023, 22:51 GMT
We used to have this in the kernel but it was killed off at some point. I realize you're not requesting it...but toolchain support to build X32 ABI binaries definitely will not happen.

Have you looked at the previous discussion?  FS#31270   FS#32176   FS#38737   FS#43190   FS#43778 
Comment by Sven (sve) - Saturday, 22 April 2023, 06:17 GMT
Yes, I read the previous discussions. I think in recent years some things have changed. Option B became available, Debian demonstrated its stability, and energy efficiency has become more and more important.
Comment by Toolybird (Toolybird) - Saturday, 22 April 2023, 12:36 GMT
> Option B became available

Yeah, but with a custom patch that is not upstreamed. The Debian doc is here [1]. The security issue (increased attack surface) still seems relevant today. Will defer to the PM's.

> toolchain support to build X32 ABI binaries definitely will not happen

Thinking about it some more, we provide toolchains for various other targets so I suppose it's feasible, but not a full-blown port.

[1] https://wiki.debian.org/X32Port