All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le
@ 2023-11-24  0:20 Dimitri John Ledkov
  2023-11-24  4:59 ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Dimitri John Ledkov @ 2023-11-24  0:20 UTC (permalink / raw)
  To: linuxppc-dev

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.

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.

Is it really possible to run 32bit big-endian KVM on a 64bit
little-endian POWER?

Or is Kconfig slightly buggy and should be fixed up to prevent
offering COMPAT options when little-endian 64bit POWER kernel is being
configured?

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
---
 debian.master/config/annotations | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/debian.master/config/annotations b/debian.master/config/annotations
index 2fc37c961d..e96eeee2e5 100644
--- a/debian.master/config/annotations
+++ b/debian.master/config/annotations
@@ -15,7 +15,7 @@ CONFIG_AGP                                      note<'not autoloadable'>
 CONFIG_ARCH_MMAP_RND_BITS                       policy<{'amd64': '32', 'arm64': '33', 'arm64-generic-64k': '29', 'armhf': '16', 'ppc64el': '29', 'riscv64': '24'}>
 CONFIG_ARCH_MMAP_RND_BITS                       note<'LP: #1983357'>
 
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS                policy<{'amd64': '16', 'arm64': '16', 'ppc64el': '13', 'riscv64': '-'}>
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS                policy<{'amd64': '16', 'arm64': '16', 'ppc64el': '-', 'riscv64': '-'}>
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS                note<'LP: #1983357'>
 
 CONFIG_ARCH_ROCKCHIP                            policy<{'arm64': 'y', 'armhf': 'y'}>
@@ -1230,7 +1230,7 @@ CONFIG_ARCH_HAS_SUBPAGE_FAULTS                  policy<{'arm64': 'y'}>
 CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE       policy<{'amd64': 'y'}>
 CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU                policy<{'arm64': 'y', 'armhf': 'y', 'riscv64': 'y'}>
 CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE             policy<{'arm64': 'y', 'armhf': 'y', 'riscv64': 'y'}>
-CONFIG_ARCH_HAS_SYSCALL_WRAPPER                 policy<{'amd64': 'y', 'arm64': 'y', 'riscv64': 'y', 's390x': 'y'}>
+CONFIG_ARCH_HAS_SYSCALL_WRAPPER                 policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS                policy<{'arm64': 'y', 'armhf': 'y'}>
 CONFIG_ARCH_HAS_TICK_BROADCAST                  policy<{'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y'}>
 CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE              policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y'}>
@@ -1463,7 +1463,7 @@ CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT           policy<{'amd64': 'y', 's390x': '
 CONFIG_ARCH_WANTS_NO_INSTR                      policy<{'amd64': 'y', 'arm64': 'y', 's390x': 'y'}>
 CONFIG_ARCH_WANTS_THP_SWAP                      policy<{'amd64': 'y', 'arm64': 'y', 'arm64-generic-64k': '-', 'riscv64': 'y'}>
 CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH        policy<{'amd64': 'y', 'arm64': 'y'}>
-CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION       policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 's390x': 'y'}>
+CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION       policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': '-', 's390x': 'y'}>
 CONFIG_ARCH_WANT_DEFAULT_BPF_JIT                policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 's390x': 'y'}>
 CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT    policy<{'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y'}>
 CONFIG_ARCH_WANT_FLAT_DTB_INSTALL               policy<{'armhf': 'y'}>
@@ -1474,7 +1474,7 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION              policy<{'armhf': 'y', 'ppc64el':
 CONFIG_ARCH_WANT_IRQS_OFF_ACTIVATE_MM           policy<{'ppc64el': 'y'}>
 CONFIG_ARCH_WANT_KERNEL_PMD_MKWRITE             policy<{'s390x': 'y'}>
 CONFIG_ARCH_WANT_LD_ORPHAN_WARN                 policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y'}>
-CONFIG_ARCH_WANT_OLD_COMPAT_IPC                 policy<{'amd64': 'y', 'ppc64el': 'y', 's390x': 'y'}>
+CONFIG_ARCH_WANT_OLD_COMPAT_IPC                 policy<{'amd64': 'y', 'ppc64el': '-', 's390x': 'y'}>
 CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP           policy<{'amd64': 'y', 'ppc64el': 'y'}>
 CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP       policy<{'amd64': 'y', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_ARCH_WANT_PMD_MKWRITE                    policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
@@ -3145,14 +3145,14 @@ CONFIG_COMMON_RESET_HI6220                      policy<{'arm64': 'm', 'armhf': '
 CONFIG_COMPACTION                               policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_COMPACT_UNEVICTABLE_DEFAULT              policy<{'amd64': '1', 'arm64': '1', 'armhf': '1', 'ppc64el': '1', 'riscv64': '1', 's390x': '1'}>
 CONFIG_COMPAL_LAPTOP                            policy<{'amd64': 'm'}>
-CONFIG_COMPAT                                   policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 'riscv64': 'n', 's390x': 'y'}>
+CONFIG_COMPAT                                   policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'n', 'riscv64': 'n', 's390x': 'y'}>
 CONFIG_COMPAT_32                                policy<{'amd64': 'y'}>
-CONFIG_COMPAT_32BIT_TIME                        policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
+CONFIG_COMPAT_32BIT_TIME                        policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'n', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_COMPAT_ALIGNMENT_FIXUPS                  policy<{'arm64': 'n'}>
-CONFIG_COMPAT_BINFMT_ELF                        policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 's390x': 'y'}>
+CONFIG_COMPAT_BINFMT_ELF                        policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': '-', 's390x': 'y'}>
 CONFIG_COMPAT_FOR_U64_ALIGNMENT                 policy<{'amd64': 'y'}>
-CONFIG_COMPAT_NETLINK_MESSAGES                  policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y'}>
-CONFIG_COMPAT_OLD_SIGACTION                     policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 's390x': 'y'}>
+CONFIG_COMPAT_NETLINK_MESSAGES                  policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': '-'}>
+CONFIG_COMPAT_OLD_SIGACTION                     policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': '-', 's390x': 'y'}>
 CONFIG_COMPAT_VDSO                              policy<{'amd64': 'n'}>
 CONFIG_COMPILE_TEST                             policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 'riscv64': 'n', 's390x': 'n'}>
 CONFIG_CONFIGFS_FS                              policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
@@ -5473,7 +5473,7 @@ CONFIG_HAVE_ARCH_KGDB                           policy<{'amd64': 'y', 'arm64': '
 CONFIG_HAVE_ARCH_KGDB_QXFER_PKT                 policy<{'riscv64': 'y'}>
 CONFIG_HAVE_ARCH_KMSAN                          policy<{'amd64': 'y'}>
 CONFIG_HAVE_ARCH_MMAP_RND_BITS                  policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y'}>
-CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS           policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y'}>
+CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS           policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': '-'}>
 CONFIG_HAVE_ARCH_NODE_DEV_GROUP                 policy<{'amd64': 'y'}>
 CONFIG_HAVE_ARCH_NVRAM_OPS                      policy<{'ppc64el': 'y'}>
 CONFIG_HAVE_ARCH_PFN_VALID                      policy<{'armhf': 'y'}>
@@ -6600,6 +6600,7 @@ CONFIG_INTERCONNECT_QCOM_SM8550                 policy<{'arm64': 'm', 'armhf': '
 CONFIG_INTERCONNECT_QCOM_SMD_RPM                policy<{'arm64': 'm', 'armhf': 'm'}>
 CONFIG_INTERCONNECT_SAMSUNG                     policy<{'armhf': 'n'}>
 CONFIG_INTERRUPT_CNT                            policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm'}>
+CONFIG_INTERRUPT_SANITIZE_REGISTERS             policy<{'ppc64el': 'y'}>
 CONFIG_INTERVAL_TREE                            policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_INTERVAL_TREE_SPAN_ITER                  policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y'}>
 CONFIG_INTERVAL_TREE_TEST                       policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'ppc64el': 'n', 'riscv64': 'n', 's390x': 'n'}>
@@ -7121,7 +7122,7 @@ CONFIG_KVM_BOOK3S_HV_NESTED_PMU_WORKAROUND      policy<{'ppc64el': 'y'}>
 CONFIG_KVM_BOOK3S_HV_P9_TIMING                  policy<{'ppc64el': 'y'}>
 CONFIG_KVM_BOOK3S_HV_POSSIBLE                   policy<{'ppc64el': 'y'}>
 CONFIG_KVM_BOOK3S_PR_POSSIBLE                   policy<{'ppc64el': 'y'}>
-CONFIG_KVM_COMPAT                               policy<{'amd64': 'y', 'ppc64el': 'y'}>
+CONFIG_KVM_COMPAT                               policy<{'amd64': 'y', 'ppc64el': '-'}>
 CONFIG_KVM_EXTERNAL_WRITE_TRACKING              policy<{'amd64': 'y'}>
 CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT        policy<{'amd64': 'y', 'arm64': 'y', 'riscv64': 'y'}>
 CONFIG_KVM_GENERIC_HARDWARE_ENABLING            policy<{'amd64': 'y', 'arm64': 'y', 'riscv64': 'y'}>
@@ -8475,7 +8476,7 @@ CONFIG_NETFILTER_NETLINK_QUEUE                  policy<{'amd64': 'm', 'arm64': '
 CONFIG_NETFILTER_SKIP_EGRESS                    policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_NETFILTER_SYNPROXY                       policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
 CONFIG_NETFILTER_XTABLES                        policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
-CONFIG_NETFILTER_XTABLES_COMPAT                 policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 'riscv64': '-', 's390x': 'y'}>
+CONFIG_NETFILTER_XTABLES_COMPAT                 policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': '-', 'riscv64': '-', 's390x': 'y'}>
 CONFIG_NETFILTER_XT_CONNMARK                    policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
 CONFIG_NETFILTER_XT_MARK                        policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
 CONFIG_NETFILTER_XT_MATCH_ADDRTYPE              policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'm'}>
@@ -13422,7 +13423,7 @@ CONFIG_SYSTEM_TRUSTED_KEYRING                   policy<{'amd64': 'y', 'arm64': '
 CONFIG_SYSTEM_TRUSTED_KEYS                      policy<{'amd64': '"debian/canonical-certs.pem"', 'arm64': '"debian/canonical-certs.pem"', 'armhf': '"debian/canonical-certs.pem"', 'ppc64el': '"debian/canonical-certs.pem"', 'riscv64': '"debian/canonical-certs.pem"', 's390x': '"debian/canonical-certs.pem"'}>
 CONFIG_SYSV68_PARTITION                         policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'n'}>
 CONFIG_SYSVIPC                                  policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
-CONFIG_SYSVIPC_COMPAT                           policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': 'y', 's390x': 'y'}>
+CONFIG_SYSVIPC_COMPAT                           policy<{'amd64': 'y', 'arm64': 'y', 'ppc64el': '-', 's390x': 'y'}>
 CONFIG_SYSVIPC_SYSCTL                           policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
 CONFIG_SYSV_FS                                  policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm', 's390x': 'n'}>
 CONFIG_SYS_HYPERVISOR                           policy<{'amd64': 'y', 'arm64': 'y', 's390x': 'y'}>
@@ -14550,7 +14551,6 @@ CONFIG_VDPA_SIM_BLOCK                           policy<{'amd64': 'm', 'arm64': '
 CONFIG_VDPA_SIM_NET                             policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm'}>
 CONFIG_VDPA_USER                                policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm'}>
 CONFIG_VDSO                                     policy<{'armhf': 'y'}>
-CONFIG_VDSO32                                   policy<{'ppc64el': 'y'}>
 CONFIG_VEML6030                                 policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm'}>
 CONFIG_VEML6070                                 policy<{'amd64': 'm', 'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', 'riscv64': 'm'}>
 CONFIG_VERSION_SIGNATURE                        policy<{'amd64': '""', 'arm64': '""', 'armhf': '""', 'ppc64el': '""', 'riscv64': '""', 's390x': '""'}>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le
  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
  2023-11-24  8:25   ` Michal Suchánek
  2023-11-24 14:05   ` Dimitri John Ledkov
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Ellerman @ 2023-11-24  4:59 UTC (permalink / raw)
  To: Dimitri John Ledkov, linuxppc-dev

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le
  2023-11-24  4:59 ` Michael Ellerman
@ 2023-11-24  8:25   ` Michal Suchánek
  2023-11-24 14:06     ` Dimitri John Ledkov
  2023-11-24 14:05   ` Dimitri John Ledkov
  1 sibling, 1 reply; 5+ messages in thread
From: Michal Suchánek @ 2023-11-24  8:25 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Dimitri John Ledkov

On Fri, Nov 24, 2023 at 03:59:04PM +1100, Michael Ellerman wrote:
> 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.

I have seen software that does not work when compiled 64bit so it would
build 32bit binary even on ppc64le and abuse the compat layer to run.

It quite rare, though.

Thanks

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le
  2023-11-24  4:59 ` Michael Ellerman
  2023-11-24  8:25   ` Michal Suchánek
@ 2023-11-24 14:05   ` Dimitri John Ledkov
  1 sibling, 0 replies; 5+ messages in thread
From: Dimitri John Ledkov @ 2023-11-24 14:05 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 2618 bytes --]

On Fri, 24 Nov 2023 at 04:59, Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> 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.

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

[-- Attachment #2: Type: text/html, Size: 3428 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] UBUNTU: [Config] y2038: Disable COMPAT and COMPAT_32BIT_TIME on ppc64le
  2023-11-24  8:25   ` Michal Suchánek
@ 2023-11-24 14:06     ` Dimitri John Ledkov
  0 siblings, 0 replies; 5+ messages in thread
From: Dimitri John Ledkov @ 2023-11-24 14:06 UTC (permalink / raw)
  To: Michal Suchánek; +Cc: linuxppc-dev

On Fri, 24 Nov 2023 at 08:25, Michal Suchánek <msuchanek@suse.de> wrote:
>
> On Fri, Nov 24, 2023 at 03:59:04PM +1100, Michael Ellerman wrote:
> > 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.
>
> I have seen software that does not work when compiled 64bit so it would
> build 32bit binary even on ppc64le and abuse the compat layer to run.
>
> It quite rare, though.

Thank you! And yes, do not want =)

-- 
okurrr,

Dimitri

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-24 22:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2023-11-24  8:25   ` Michal Suchánek
2023-11-24 14:06     ` Dimitri John Ledkov
2023-11-24 14:05   ` Dimitri John Ledkov

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.