[RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le

Dimitri John Ledkov dimitri.ledkov at canonical.com
Sat Nov 25 01:05:10 AEDT 2023


On Fri, 24 Nov 2023 at 04:59, Michael Ellerman <mpe at ellerman.id.au> wrote:
>
> Dimitri John Ledkov <dimitri.ledkov at canonical.com> writes:
> > BugLink: https://bugs.launchpad.net/bugs/2038587
> >
> > ppc64le is exclusively little endian and 64-bit, thus there is no need
> > for COMPAT_32BIT_TIME, nor COMPAT.
>
> To be pedantic, the ppc64le kernel does support running 32-bit little
> endian userspace in compat mode (CONFIG_COMPAT=y). It's a distro choice
> as to whether you support COMPAT. Notably there are two other major
> distros that don't support COMPAT for ppc64le, and the set of 32-bit LE
> software is effectively empty.

🤯

>
> > diffconfig result of these changes is:
> >
> >  -ARCH_MMAP_RND_COMPAT_BITS 13
> >  -ARCH_WANT_COMPAT_IPC_PARSE_VERSION y
> >  -ARCH_WANT_OLD_COMPAT_IPC y
> >  -COMPAT_BINFMT_ELF y
> >  -COMPAT_NETLINK_MESSAGES y
> >  -COMPAT_OLD_SIGACTION y
> >  -HAVE_ARCH_MMAP_RND_COMPAT_BITS y
> >  -KVM_COMPAT y
> >  -NETFILTER_XTABLES_COMPAT y
> >  -SYSVIPC_COMPAT y
> >  -VDSO32 y
> >   COMPAT y -> n
> >   COMPAT_32BIT_TIME y -> n
> >  +ARCH_HAS_SYSCALL_WRAPPER y
> >  +INTERRUPT_SANITIZE_REGISTERS y
> >
> > What confused me, if the above combination is even valid or just pure
> > dead code.
>
> I don't entirely understand what that diff is saying, but I'll try and
> answer anyway.

This is output from diffconfig, lines with "y -> n" are changes to a key
that is available as a choice.
Lines prefixed with minus ('-') become unavailable.
Lines prefixed with plus ('+') are NEW options that become available.

So the effect of turning COMPAT off removes lots of compat things in other
places, and makes INTERRUPT_SANITIZE_REGISTERS available.

>
> > Is it really possible to run 32bit big-endian KVM on a 64bit
> > little-endian POWER?
>
> Are you referring to KVM_COMPAT being disabled?
>
> That's nothing to do with big-endian. It's just controlling whether the
> KVM ioctls (which qemu calls) support compat handling, ie. whether you
> can run a 32-bit qemu under a 64-bit kernel.
>

Thank you for the explanation. And also "no thank you, do not want 32-bit
qemu".

> It's entirely expected that when COMPAT is turned off KVM_COMPAT also
> gets turned off.
>
> > Or is Kconfig slightly buggy and should be fixed up to prevent
> > offering COMPAT options when little-endian 64bit POWER kernel is being
> > configured?
>
> No. Like I said at the top, the kernel does support 32-bit LE compat,
> eventhough it's not very widely used.
>

Thank you for explaining all of this.

-- 
okurrr,

Dimitri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20231124/1868d8ca/attachment-0001.htm>


More information about the Linuxppc-dev mailing list