All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Dimitri John Ledkov <dimitri.ledkov@canonical.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le
Date: Fri, 24 Nov 2023 15:59:04 +1100	[thread overview]
Message-ID: <87sf4vrbl3.fsf@mail.lhotse> (raw)
In-Reply-To: <20231124002042.1741578-1-dimitri.ledkov@canonical.com>

Dimitri John Ledkov <dimitri.ledkov@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.

> 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.

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.

cheers

  reply	other threads:[~2023-11-24  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24  0:20 [RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le Dimitri John Ledkov
2023-11-24  4:59 ` Michael Ellerman [this message]
2023-11-24  8:25   ` Michal Suchánek
2023-11-24 14:06     ` Dimitri John Ledkov
2023-11-24 14:05   ` Dimitri John Ledkov

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=87sf4vrbl3.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=dimitri.ledkov@canonical.com \
    --cc=linuxppc-dev@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.