* [PATCH v5 0/2] Start removing X86_X32_ABI
@ 2026-10-15 18:47 Sebastian Andrzej Siewior
2026-10-15 18:47 ` [PATCH v5 1/2] selftests/nolibc: remove the x32 testcase Sebastian Andrzej Siewior
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-10-15 18:47 UTC (permalink / raw)
To: linux-kernel, linux-kselftest
Cc: Sebastian Andrzej Siewior, H. Peter Anvin, Maciej W. Rozycki,
Bill Wendling, Borislav Petkov, Dave Hansen, Ingo Molnar,
John Paul Adrian Glaubitz, Jonathan Corbet, Justin Stitt,
Nathan Chancellor, Neal Gompa, Nick Desaulniers, Richard Purdie,
Sam James, Shuah Khan, Thomas Gleixner, Thomas Weißschuh,
Tomas Glozar, Willy Tarreau, x86, Arnd Bergmann
Patch #2 prepares the removal of the X32 ABI and has the broader
reasoning. Patch #1 removes x32 from the selftests because it does not
have a depends on and assumes x32 to be always available on x64 and so
it breaks.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
v4…v5: https://patch.msgid.link/20261008-x32_removal-v4-0-d389a193c506@breakpoint.cc
- reword commit message for #2 as requested by hpa to state that this
is the last warning.
v3…v4: https://patch.msgid.link/20260813-x32_removal-v3-0-e8f96cd15478@linutronix.de
- Depend on BROKEN instead of removing it.
v2…v3: https://patch.msgid.link/20260707212252.bYk3-AlU@linutronix.de
- added a nolibc-selftests patch to not break it in their setup since
it does not depend on the symbol.
v1…v2: https://lore.kernel.org/r/20260523093734.A3AR7reJ@linutronix.de
- reworded commit message
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Bill Wendling <morbo@google.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Jonathan Corbet <corbet@lwn.net>,
Cc: Justin Stitt <justinstitt@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Neal Gompa <neal@gompa.dev>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Sam James <sam@gentoo.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Cc: Tomas Glozar <tglozar@kernel.org>
Cc: Willy Tarreau <w@1wt.eu>
Cc: x86@kernel.org
To: linux-kernel@vger.kernel.org
To: linux-kselftest@vger.kernel.org
---
Sebastian Andrzej Siewior (1):
x86: Start removing X86_X32_ABI
Thomas Weißschuh (1):
selftests/nolibc: remove the x32 testcase
arch/x86/Kconfig | 2 +-
tools/testing/selftests/nolibc/Makefile.nolibc | 6 ------
tools/testing/selftests/nolibc/run-tests.sh | 7 +------
3 files changed, 2 insertions(+), 13 deletions(-)
---
base-commit: ec8bf8280261294a9b9b4520414b42704c7f9f6b
change-id: 20260706-x32_removal-28823498c4a2
Best regards,
--
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v5 1/2] selftests/nolibc: remove the x32 testcase
2026-10-15 18:47 [PATCH v5 0/2] Start removing X86_X32_ABI Sebastian Andrzej Siewior
@ 2026-10-15 18:47 ` Sebastian Andrzej Siewior
2026-10-15 18:47 ` [PATCH v5 2/2] x86: Start removing X86_X32_ABI Sebastian Andrzej Siewior
2026-10-15 19:47 ` [PATCH v5 0/2] " Shuah Khan
2 siblings, 0 replies; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-10-15 18:47 UTC (permalink / raw)
To: linux-kernel, linux-kselftest
Cc: Sebastian Andrzej Siewior, H. Peter Anvin, Maciej W. Rozycki,
Bill Wendling, Borislav Petkov, Dave Hansen, Ingo Molnar,
John Paul Adrian Glaubitz, Jonathan Corbet, Justin Stitt,
Nathan Chancellor, Neal Gompa, Nick Desaulniers, Richard Purdie,
Sam James, Shuah Khan, Thomas Gleixner, Thomas Weißschuh,
Tomas Glozar, Willy Tarreau, x86
From: Thomas Weißschuh <linux@weissschuh.net>
Support for the x32 ABI is about to be removed from the kernel itself.
This will break the nolibc x32 testcase.
Remove the testcase to avoid breaking the testsuite in general.
This also ends official support from nolibc proper for x32. But as there
is no clear x32-specific code in the nolibc codebase, there won't be a
removal patch for that.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: H. Peter Anvin (Rosaic) <hpa@zytor.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
tools/testing/selftests/nolibc/Makefile.nolibc | 6 ------
tools/testing/selftests/nolibc/run-tests.sh | 7 +------
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing/selftests/nolibc/Makefile.nolibc
index f70c8dfca0186..895a6ea7a8e45 100644
--- a/tools/testing/selftests/nolibc/Makefile.nolibc
+++ b/tools/testing/selftests/nolibc/Makefile.nolibc
@@ -47,7 +47,6 @@ XARCH_riscv = riscv64
XARCH = $(or $(XARCH_$(ARCH)),$(ARCH))
# map from user input variants to their kernel supported architectures
-ARCH_x32 = x86
ARCH_armthumb = arm
ARCH_ppc = powerpc
ARCH_ppc64 = powerpc
@@ -70,7 +69,6 @@ ARCH := $(or $(ARCH_$(XARCH)),$(XARCH))
# kernel image names by architecture
IMAGE_i386 = arch/x86/boot/bzImage
IMAGE_x86_64 = arch/x86/boot/bzImage
-IMAGE_x32 = arch/x86/boot/bzImage
IMAGE_x86 = arch/x86/boot/bzImage
IMAGE_arm64 = arch/arm64/boot/Image
IMAGE_arm = arch/arm/boot/zImage
@@ -106,7 +104,6 @@ DEFCONFIG_sh4 = rts7751r2dplus_defconfig
DEFCONFIG_openrisc = virt_defconfig
DEFCONFIG = $(or $(DEFCONFIG_$(XARCH)),defconfig)
-EXTRACONFIG_x32 = -e CONFIG_X86_X32_ABI
EXTRACONFIG_arm = -e CONFIG_NAMESPACES
EXTRACONFIG_armthumb = -e CONFIG_NAMESPACES
EXTRACONFIG_sparc32 = -e CONFIG_TMPFS
@@ -119,7 +116,6 @@ EXTRACONFIG = $(EXTRACONFIG_$(XARCH))
TEST =
# QEMU_ARCH: arch names used by qemu
-QEMU_ARCH_x32 = x86_64
QEMU_ARCH_x86 = x86_64
QEMU_ARCH_arm64 = aarch64
QEMU_ARCH_armthumb = arm
@@ -151,7 +147,6 @@ endif
# QEMU_ARGS : some arch-specific args to pass to qemu
QEMU_ARGS_i386 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_x86_64 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)"
-QEMU_ARGS_x32 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_x86 = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_arm64 = -M virt -cpu cortex-a53 -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_arm = -M virt -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)"
@@ -189,7 +184,6 @@ Q=@
endif
CFLAGS_i386 = $(call cc-option,-m32)
-CFLAGS_x32 = -mx32
CFLAGS_arm = -marm
CFLAGS_armthumb = -mthumb -march=armv6t2
CFLAGS_parisc32 = -mfast-indirect-calls
diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/selftests/nolibc/run-tests.sh
index dc0b1649c6419..20e0d2dc0e9b9 100755
--- a/tools/testing/selftests/nolibc/run-tests.sh
+++ b/tools/testing/selftests/nolibc/run-tests.sh
@@ -18,7 +18,7 @@ test_mode=system
werror=1
llvm=
all_archs=(
- i386 x86_64 x32
+ i386 x86_64
arm64 arm armthumb
mips32le mips32be mipsn32le mipsn32be mips64le mips64be
openrisc
@@ -119,7 +119,6 @@ crosstool_arch() {
mips*) echo mips;;
s390*) echo s390;;
sparc*) echo sparc64;;
- x32*) echo x86_64;;
parisc32) echo hppa;;
*) echo "$1";;
esac
@@ -198,10 +197,6 @@ test_arch() {
echo "Unsupported configuration"
return
fi
- if [ "$arch" = "x32" ] && [ "$test_mode" = "user" ]; then
- echo "Unsupported configuration"
- return
- fi
mkdir -p "$build_dir"
swallow_output "${MAKE[@]}" defconfig
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v5 2/2] x86: Start removing X86_X32_ABI
2026-10-15 18:47 [PATCH v5 0/2] Start removing X86_X32_ABI Sebastian Andrzej Siewior
2026-10-15 18:47 ` [PATCH v5 1/2] selftests/nolibc: remove the x32 testcase Sebastian Andrzej Siewior
@ 2026-10-15 18:47 ` Sebastian Andrzej Siewior
2026-10-15 22:35 ` Thomas Gleixner
2026-10-15 19:47 ` [PATCH v5 0/2] " Shuah Khan
2 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-10-15 18:47 UTC (permalink / raw)
To: linux-kernel, linux-kselftest
Cc: Sebastian Andrzej Siewior, H. Peter Anvin, Maciej W. Rozycki,
Bill Wendling, Borislav Petkov, Dave Hansen, Ingo Molnar,
John Paul Adrian Glaubitz, Jonathan Corbet, Justin Stitt,
Nathan Chancellor, Neal Gompa, Nick Desaulniers, Richard Purdie,
Sam James, Shuah Khan, Thomas Gleixner, Thomas Weißschuh,
Tomas Glozar, Willy Tarreau, x86, Arnd Bergmann
The x32 ABI was introduced in v3.4 to leverage the additional registers
which were available on x86_64 but not on i386 while keeping the smaller
32bit pointers.
This did not take off. The memory usage usually knows no limit and the
better performance did not reach a point where certain workloads widely
move to x32 and use it exclusively. In the meantime Debian introduced a
patch to disable x32 by default (so it has to be enabled at boot time on
the command line) because they are afraid of the increased attack
surface. Fedora as far as I tell has X32 disabled (looking at 7.0-rc5
rpm in rawhide).
The syscall range >512 used by x32 can not be reused because on earlier
kernels (before v5.4 with x32 enabled, see commit 6365b842aae4
("x86/syscalls: Split the x32 syscalls into their own table") it is not
obvious if the syscall is for x86-64 and not implemented or meant for
x32.
What can be removed are the special compat cases due to different
alignment.
Since there is practically no real use for x32, start removing it by
marking the symbol as BROKEN so it is not possible to enable by default.
If you have a legitimate use case for x32, this is your last chance to
speak up. Otherwise it will be removed.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: H. Peter Anvin (Rosaic) <hpa@zytor.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 15fd9ec5ecacb..21a6863e14e7a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -3104,7 +3104,7 @@ config IA32_EMULATION_DEFAULT_DISABLED
config X86_X32_ABI
bool "x32 ABI for 64-bit mode"
- depends on X86_64
+ depends on X86_64 && BROKEN
# llvm-objcopy does not convert x86_64 .note.gnu.property or
# compressed debug sections to x86_x32 properly:
# https://github.com/ClangBuiltLinux/linux/issues/514
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v5 0/2] Start removing X86_X32_ABI
2026-10-15 18:47 [PATCH v5 0/2] Start removing X86_X32_ABI Sebastian Andrzej Siewior
2026-10-15 18:47 ` [PATCH v5 1/2] selftests/nolibc: remove the x32 testcase Sebastian Andrzej Siewior
2026-10-15 18:47 ` [PATCH v5 2/2] x86: Start removing X86_X32_ABI Sebastian Andrzej Siewior
@ 2026-10-15 19:47 ` Shuah Khan
2 siblings, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2026-10-15 19:47 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, linux-kernel, linux-kselftest
Cc: H. Peter Anvin, Maciej W. Rozycki, Bill Wendling,
Borislav Petkov, Dave Hansen, Ingo Molnar,
John Paul Adrian Glaubitz, Jonathan Corbet, Justin Stitt,
Nathan Chancellor, Neal Gompa, Nick Desaulniers, Richard Purdie,
Sam James, Shuah Khan, Thomas Gleixner, Thomas Weißschuh,
Tomas Glozar, Willy Tarreau, x86, Arnd Bergmann, Shuah Khan
On 10/15/26 12:47, Sebastian Andrzej Siewior wrote:
> Patch #2 prepares the removal of the X32 ABI and has the broader
> reasoning. Patch #1 removes x32 from the selftests because it does not
> have a depends on and assumes x32 to be always available on x64 and so
> it breaks.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> v4…v5: https://patch.msgid.link/20261008-x32_removal-v4-0-d389a193c506@breakpoint.cc
> - reword commit message for #2 as requested by hpa to state that this
> is the last warning.
>
> v3…v4: https://patch.msgid.link/20260813-x32_removal-v3-0-e8f96cd15478@linutronix.de
> - Depend on BROKEN instead of removing it.
>
> v2…v3: https://patch.msgid.link/20260707212252.bYk3-AlU@linutronix.de
> - added a nolibc-selftests patch to not break it in their setup since
> it does not depend on the symbol.
>
> v1…v2: https://lore.kernel.org/r/20260523093734.A3AR7reJ@linutronix.de
> - reworded commit message
>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
> Cc: Bill Wendling <morbo@google.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: Jonathan Corbet <corbet@lwn.net>,
> Cc: Justin Stitt <justinstitt@google.com>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Neal Gompa <neal@gompa.dev>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
> Cc: Sam James <sam@gentoo.org>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Thomas Gleixner <tglx@kernel.org>
> Cc: Thomas Weißschuh <linux@weissschuh.net>
> Cc: Tomas Glozar <tglozar@kernel.org>
> Cc: Willy Tarreau <w@1wt.eu>
> Cc: x86@kernel.org
> To: linux-kernel@vger.kernel.org
> To: linux-kselftest@vger.kernel.org
>
> ---
> Sebastian Andrzej Siewior (1):
> x86: Start removing X86_X32_ABI
>
> Thomas Weißschuh (1):
> selftests/nolibc: remove the x32 testcase
>
> arch/x86/Kconfig | 2 +-
> tools/testing/selftests/nolibc/Makefile.nolibc | 6 ------
> tools/testing/selftests/nolibc/run-tests.sh | 7 +------
> 3 files changed, 2 insertions(+), 13 deletions(-)
> ---
For selftests:
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Do you plan to cleanup x32 checks from selftests/x86 Makefiles?
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v5 2/2] x86: Start removing X86_X32_ABI
2026-10-15 18:47 ` [PATCH v5 2/2] x86: Start removing X86_X32_ABI Sebastian Andrzej Siewior
@ 2026-10-15 22:35 ` Thomas Gleixner
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2026-10-15 22:35 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, linux-kernel, linux-kselftest
Cc: Sebastian Andrzej Siewior, H. Peter Anvin, Maciej W. Rozycki,
Bill Wendling, Borislav Petkov, Dave Hansen, Ingo Molnar,
John Paul Adrian Glaubitz, Jonathan Corbet, Justin Stitt,
Nathan Chancellor, Neal Gompa, Nick Desaulniers, Richard Purdie,
Sam James, Shuah Khan, Thomas Weißschuh, Tomas Glozar,
Willy Tarreau, x86, Arnd Bergmann
On Thu, Oct 15 2026 at 20:47, Sebastian Andrzej Siewior wrote:
> The x32 ABI was introduced in v3.4 to leverage the additional registers
> which were available on x86_64 but not on i386 while keeping the smaller
> 32bit pointers.
>
> This did not take off. The memory usage usually knows no limit and the
> better performance did not reach a point where certain workloads widely
> move to x32 and use it exclusively. In the meantime Debian introduced a
> patch to disable x32 by default (so it has to be enabled at boot time on
> the command line) because they are afraid of the increased attack
> surface. Fedora as far as I tell has X32 disabled (looking at 7.0-rc5
> rpm in rawhide).
>
> The syscall range >512 used by x32 can not be reused because on earlier
> kernels (before v5.4 with x32 enabled, see commit 6365b842aae4
> ("x86/syscalls: Split the x32 syscalls into their own table") it is not
> obvious if the syscall is for x86-64 and not implemented or meant for
> x32.
> What can be removed are the special compat cases due to different
> alignment.
>
> Since there is practically no real use for x32, start removing it by
> marking the symbol as BROKEN so it is not possible to enable by default.
> If you have a legitimate use case for x32, this is your last chance to
> speak up. Otherwise it will be removed.
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: H. Peter Anvin (Rosaic) <hpa@zytor.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
> ---
> arch/x86/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 15fd9ec5ecacb..21a6863e14e7a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -3104,7 +3104,7 @@ config IA32_EMULATION_DEFAULT_DISABLED
>
> config X86_X32_ABI
> bool "x32 ABI for 64-bit mode"
> - depends on X86_64
> + depends on X86_64 && BROKEN
> # llvm-objcopy does not convert x86_64 .note.gnu.property or
> # compressed debug sections to x86_x32 properly:
> # https://github.com/ClangBuiltLinux/linux/issues/514
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-15 22:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15 18:47 [PATCH v5 0/2] Start removing X86_X32_ABI Sebastian Andrzej Siewior
2026-10-15 18:47 ` [PATCH v5 1/2] selftests/nolibc: remove the x32 testcase Sebastian Andrzej Siewior
2026-10-15 18:47 ` [PATCH v5 2/2] x86: Start removing X86_X32_ABI Sebastian Andrzej Siewior
2026-10-15 22:35 ` Thomas Gleixner
2026-10-15 19:47 ` [PATCH v5 0/2] " Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®