Re: Can we drop upstream Linux x32 support?

From: Arnd Bergmann
Date: Wed Dec 12 2018 - 04:05:17 EST


On Wed, Dec 12, 2018 at 3:38 AM Thorsten Glaser <tg@xxxxxxxxx> wrote:
>
> Andy Lutomirski dixit:
>
> >Thatâs the thing, though: the whole generic kernel compat
> >infrastructure assumes there are at most two ABIs: native and, if
> >enabled and relevant, compat. x32 breaks this entirely.
>
> MIPS had o32, n32, n64 since like forever.

o32 and n32 are practically the same, the only difference on the
syscall ABI that I can see are the actual syscall numbers, and
the 'struct sigcontext' definition.

> ARM has old ABI, EABI and now 64-bit.

arm64 intentionally did not attempt to support OABI user space
because of this, and as I said the ilp32 ABI follows what MIPS
n32 does using the same data structures as aarch32 (corresponding
to mips o32).

> >How hard would it be to have __attribute__((ilp64)), with an optional
> >warning if any embedded structs are not ilp64? This plus a wrapper to
>
> You mean LP64. Impossible, because LP64 vs. ILP32 is not the only
> difference between amd64 and x32.

I think the above is what Intel's compiler does, and similar to what they
do for mixing big-endian and little-endian code (!). Generally possible yes,
but a lot of work, as well as error-prone and not particular appealing for
the GNU toolchain IMHO.

Arnd