4 ms·
> We can’t run the resulting binary. x32 is an ABI that impacts the kernel interface too, so these binaries cannot be executed on a regular x86-64 kernel. Sadly
by jcelerier 2y ago
> We can’t run the resulting binary. x32 is an ABI that impacts the kernel interface too, so these binaries cannot be executed on a regular x86-64 kernel. Sadly, and as far as I can tell, x32 is pretty much abandonware today. Gentoo claims to support it but there are no official builds of any distribution I can find that are built in x32 mode.
Which distro is this ? In debian I'm pretty sure CONFIG_X86_X32 was enabled in the kernel not too long ago, enabling this to work without issues. When I benchmarked it was on average 20% faster than x86_64 and used quite less memory for GUI apps IIRC - I think that for most utilities like coreutils, image viewers, file explorers, media players, etc. they'd benefit from it ; >4GB is only really meaningful for web browsers, compilers & interpreters, games and creative apps such as anything doing 3D, audio or large data processing.
- jmmv 2y agoOriginal author here. Actually, this was on Debian testing, so maybe x32 was disabled not that long ago? A 20% penalty sounds insane, but I can very well believe it. What benchmarks did you run?
- sillystuff 2y agoYou need to pass syscall.x32=y on the kernel cmdline for Debian packaged kernels. https://wiki.debian.org/X32Port https://wiki.debian.org/X32Port But, maybe support has gone away recently, too since upstream apparently was interested in removing support? https://www.phoronix.com/news/Linux-Potentially-Drops-x32 https://www.phoronix.com/news/Linux-Potentially-Drops-x32
- LegionMammal978 2y agoAs far as I'm aware, kernel-side support hasn't budged an inch since all those articles came out. The bigger annoyance is that you'll either have to compile a special libc or define your own raw-syscall wrappers.
- sillystuff 2y agoIt has been several years since I played with x32, but Debian had pretty good support. Not every package built for amd64 was also built for x32, but most server stuff was there. It has been a long time, but I was using x32 containers on an amd64 host (both Debian), and things worked fine without having to build anything from source. After moving to a different VPS provider who was less stingy with RAM in their base offering, I just simplified and used straight amd64. While I didn't try adding x32 as an additional arch with Debian's multi-arch, I'm pretty confident, it would "just work" just as adding i386 as an additional arch does.
- LegionMammal978 2y agoPerhaps. I was just trying it on Ubuntu, and found that while I can add x32 as an architecture on dpkg, there aren't any x32 versions of libc6 and other basic libraries. The odd part is, I distinctly recall playing with x32 assembly quite recently on Ubuntu with no special configuration, but now it seems like it's no longer enabled in the kernel by default. Maybe it was disabled with 24.04.
- jcelerier 2y agoOn debian libc6-x32 is definitely there: https://packages.debian.org/search?keywords=libc6-x32 https://packages.debian.org/search?keywords=libc6-x32
- sillystuff 2y agoSeems like the smaller virtual address space available to each x32 userspace application would negatively impact ASLR too.
- DaiPlusPlus 2y ago> >4GB is only really meaningful for web browsers, compilers & interpreters, games and creative apps such as anything doing 3D, audio or large data processing. Yes, but... > web browsers ...includes Electron, Cordova/PhoneGap, WebView-based UIs, et cetera. So yes, so long as software-houses uncritically jump on Electron as their platform-of-choice then all those apps will also ultimately be "web browsers" in disguise ...even a simple utility to flash an SD card[1] is a 150MB behemoth... I'm dying inside at this point. [1]: https://github.com/balena-io/etcher/releases/tag/v1.19.21 https://github.com/balena-io/etcher/releases/tag/v1.19.21
- jcelerier 2y agoIDK, I mostly use KDE apps and none of those are electron. The only web-browser thing I have open right now is firefox, everything else is pretty lean Qt apps: strawberry (RES 77 megabytes), dolphin (RES 61 megabytes), konsole (RES between 30 and 60-megabytes depending on my instance) the app I'm developing https://ossia.io https://ossia.io (lean enough to run on a raspberry pi zero 2). Meanwhile, I have a dozen firefox processes each above 500M RES and a few above 1G...