Thread (5 messages) 5 messages, 3 authors, 2023-11-24

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2023-11-24 05:00:08

Dimitri John Ledkov [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help