mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Borislav Petkov" <bp@alien8.de>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Thomas Gleixner" <tglx@kernel.org>
Subject: Re: [PATCH] x86: Start removing X86_X32_ABI
Date: Tue, 02 Jun 2026 18:36:54 +0200	[thread overview]
Message-ID: <e1f6d514-202c-4461-b3f6-1fbdbf44004c@app.fastmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2606021657510.1450@angie.orcam.me.uk>

On Tue, Jun 2, 2026, at 18:02, Maciej W. Rozycki wrote:
> On Mon, 1 Jun 2026, Arnd Bergmann wrote:
>
>> I think the main reason to remove x32 support is all the special
>> cases we have for it where it is different from normal 'compat'
>> syscall and ioctl handling, which leaks all the way into file
>> systems and device drivers (sound/core/pcm_compat.c,
>> fs/fuse/ioctl.c, fs/read_write, ...) as well as user space
>> trying to handle 64-bit time_t in a portable way.
>
>  FWIW it's no different from n32 MIPS ABI support, which we've had for 
> even longer and isn't going away anytime soon.  So there's undoubtedly 
> some x86-specific stuff there, but generic support for an ILP32 ABI is 
> there to stay both in the kernel and on the user side.

For the parts I'm interested in, it's a huge difference: MIPS o32
and n32 have essentially the same types and syscalls aside from the
few structures that describe the actual registers (pt_regs, sigcontext)
and the syscall numbers.

On x32, there are custom integer types (__kernel_ulong_t,
__kernel_old_time_t, __kernel_ipc_pid_t, __kernel_uid_t, ...)
and alignment rules that were intended to match the native x86-64
types for simplicity but end up doing the opposite by requiring
compat ioctl handling to be aware of the difference and implement
a third case when the x32 version is different from both the
i386 and the x86-64 one.

Even for the cases where x32 ends up using the same syscall
as x86-64 because of these type choices (e.g. gettimeofday),
this still needs a special case in the kernel because all other
compat architectures have a shared compat version.

      Arnd

  reply	other threads:[~2026-06-02 16:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23  9:37 Sebastian Andrzej Siewior
2026-05-23 21:43 ` H. Peter Anvin
2026-05-26 10:40   ` Sebastian Andrzej Siewior
2026-05-26 15:53     ` H. Peter Anvin
2026-05-26 15:54     ` H. Peter Anvin
2026-05-26 20:43       ` Sebastian Andrzej Siewior
2026-05-31 21:46         ` Arnd Bergmann
2026-06-01 21:44           ` Sebastian Andrzej Siewior
2026-06-01 22:45             ` Arnd Bergmann
2026-05-27 12:02       ` David Laight
2026-06-01 21:29         ` H. Peter Anvin
2026-06-04 20:27   ` Thomas Gleixner
2026-05-27 13:10 ` Sam James
2026-05-27 13:41 ` Neal Gompa
2026-05-27 15:57 ` John Paul Adrian Glaubitz
2026-06-01 21:12   ` Sebastian Andrzej Siewior
2026-06-01 21:14     ` H. Peter Anvin
2026-05-28  7:05 ` Tomas Glozar
2026-06-01 21:26   ` Sebastian Andrzej Siewior
2026-05-31 22:05 ` Arnd Bergmann
2026-06-02 16:02   ` Maciej W. Rozycki
2026-06-02 16:36     ` Arnd Bergmann [this message]
2026-06-05  3:35       ` H. Peter Anvin
2026-07-04  8:08   ` Sebastian Andrzej Siewior
2026-07-04  8:56     ` Arnd Bergmann
2026-06-02  9:48 ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1f6d514-202c-4461-b3f6-1fbdbf44004c@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=mingo@redhat.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®