Kernels after 5.16 cannot execute x32-ABI binaries

Bug #1994516 reported by Sven Hartrumpf
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
High
Unassigned

Bug Description

The kernel configuration option CONFIG_X86_X32_ABI is outcommented for kernel 5.17 and higher (amd64). x32 binaries are now reporting:

cannot execute binary file: Exec format error

The x32-ABI has its proven merits in some HPC tasks (e.g. link and GC intensive tasks) because it saves CPU time and critical resources like energy.

So, the following approach (e.g. Debian) looks more appropriate:

1. Include the x32-relevant code, but disable its use on standard boots:

CONFIG_X86_X32=y
CONFIG_X86_X32_DISABLED=y

2. 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.
---
ProblemType: Bug
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/controlC1', '/dev/snd/hwC1D0', '/dev/snd/pcmC1D2c', '/dev/snd/pcmC1D1p', '/dev/snd/pcmC1D0c', '/dev/snd/pcmC1D0p', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
CasperMD5CheckResult: unknown
DistroRelease: Ubuntu 22.10
InstallationDate: Installed on 2022-10-24 (1 days ago)
InstallationMedia: Lubuntu 22.10 "Kinetic Kudu" - Release amd64 (20221017.1)
IwConfig:
 lo no wireless extensions.

 eno1 no wireless extensions.
MachineType: ASUS System Product Name
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.19.0-23-generic root=UUID=b71ed1bd-e82f-41cb-b6dd-a7805136105f ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.19.0-23.24-generic 5.19.7
RelatedPackageVersions:
 linux-restricted-modules-5.19.0-23-generic N/A
 linux-backports-modules-5.19.0-23-generic N/A
 linux-firmware 20220923.gitf09bebf3-0ubuntu1
RfKill:

Tags: kinetic
Uname: Linux 5.19.0-23-generic x86_64
UnreportableReason: This report is about a package that is not installed.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: sudo
WifiSyslog:

_MarkForUpload: False
dmi.bios.date: 10/13/2022
dmi.bios.release: 8.5
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0805
dmi.board.asset.tag: Default string
dmi.board.name: PRIME B650-PLUS
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0805:bd10/13/2022:br8.5:svnASUS:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnPRIMEB650-PLUS:rvrRev1.xx:cvnDefaultstring:ct3:cvrDefaultstring:skuSKU:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.version: System Version
dmi.sys.vendor: ASUS

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1994516

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : Lspci.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : Lspci-vt.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : Lsusb.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : Lsusb-t.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : Lsusb-v.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : PaInfo.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : ProcEnviron.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : ProcModules.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : PulseList.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : UdevDb.txt

apport information

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote : acpidump.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Matthias Klose (doko)
tags: added: regression-release rls-ll-incoming
tags: added: rls-kk-incoming
Changed in linux (Ubuntu):
importance: Undecided → High
Revision history for this message
Sven Hartrumpf (hartrumpf) wrote :

This bug even affects 22.04 LTS if using HWE because linux-generic-hwe-22.04 does not support the X32 ABI.

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote :

Thanks for checking this bug, @doko. Do the added tags means that it will be fixed for 22.10 and 23.04?

Revision history for this message
Matthias Klose (doko) wrote :

Debian has a kernel, where this can be enabled with a boot parameter (syscall.x32=y)

Revision history for this message
Sven Hartrumpf (hartrumpf) wrote :

Yes, in my initial message, I described this Debian approach.

So, has Ubuntu decided to not follow this approach and give up the X32 ABI for its kernels?
Would be a pity.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Hi Sven & doko,

Nice to hear from you Sven again, you always pop-up on x32 kernel mailing lists threads, great to hear you use Ubuntu.

Debian also has ports that provide x32 binaries, whereas Ubuntu doesn't. We did do preliminary work to enable x32 over sixteen years ago in gutsy, but since then no demand has materialised to actually ever support this. It is probably a mistake and oversight that we have kept this config option on for so long; and continue to have portions of toolchain available too (triarch). From the investigations I did, it appears this config was dropped as part of the kernel config review, when a few other obsolete execution formats were dropped. Note that no ubuntu certification, tooling, or assertions enforce or test x32 binaries on ubuntu kernels, and imho shouldn't gonig forward. I spoke to a few people about this, and consenus infofar is this opens an attack vector even when simply complied in and not enabled at runtime. Other distributions also do not have this on (fedora, suse). I will use this bug report, to document that x32 should be off and not turned back on. If you use 22.04 LTS you can use linux-generic (v5.15) based kernel, which will continue to have existing config as is. Or alternatively you can build your own kernel, or use Debian one.

tags: added: rls-kk-notfixing rls-ll-notfixing
removed: rls-kk-incoming rls-ll-incoming
Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Sven Hartrumpf (hartrumpf) wrote :

Hi Dimitri.

Thanks for your long answer where you explain the Ubuntu view. It is a pity that x32 was dropped from its kernel, but I can understand the reasoning ... I hope x32 will gain some momentum elsewhere.

It would be really helpful if at least the existing x32 support in Ubuntu (I mean x32 packages, gcc/clang archs) would be maintained.

Greetings
Sven

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

> It would be really helpful if at least the existing x32 support in Ubuntu (I mean x32 packages, gcc/clang archs) would be maintained.

although ubuntu does build and provide many cross-toolchains to "-ports" arches, they are not guarantedd to be available of provided. I understand that self building toolchains is difficult, but it is also a large liability for us to do so.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.