Turning COMPAT_32BIT_TIME off on s390x

Bug #2038583 reported by Dimitri John Ledkov
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
bugproxy
linux (Ubuntu)
Fix Released
High
Unassigned

Bug Description

This will prevent existing s390 binaries to operate correctly, if they are still using 32bit time.

24.04 LTS is likely to be used for 10 years. And if allowed to overrun and remain active in the field in 2038 can lead to catastrophic failure in the field due to these syscalls enabled and used.

I would like to request if we can turn off COMPAT_32BIT_TIME on every architecture, thus this will be arch by arch bug report, and arch by arch decision.

This needs to be a per-arch decision, potentially taking into consideration bi-arch userspace support.

config COMPAT_32BIT_TIME
 bool "Provide system calls for 32-bit time_t"
 default !64BIT || COMPAT
 help
   This enables 32 bit time_t support in addition to 64 bit time_t support.
   This is relevant on all 32-bit architectures, and 64-bit architectures
   as part of compat syscall handling.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 2038583

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

This will notably affect libc6-s390

Frank Heimes (fheimes)
tags: added: n-release reverse-proxy-bugzilla
Changed in ubuntu-z-systems:
status: New → Incomplete
importance: Undecided → High
assignee: nobody → bugproxy (bugproxy)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Studying this more, this is likely to only affect trying to run libc6-s390 that is from 18.04 bionic or older. As later versions of libc6-s390 wrap 64bit syscall, instead of calling 32bit syscall directly.

However, ideally we would drop all s390 (31 bit) binaries from Ubuntu, and turn off COMPAT / COMPAT_32BIT_TIME in the kernel.

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-203848 severity-medium targetmilestone-inin---
Revision history for this message
Frank Heimes (fheimes) wrote :

Hello, since the "noble"/24.04 development just started, may I ask if you/IBM have/has any updates or an opinion if it is be okay to switch off COMPAT_32BIT_TIME?

(We would like to do switch this off for all architectures.)

tags: added: noble
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

My analysis based on public information is that 31bit binaries that are compiled against glibc 2.31 or earlier might be affected. Something like db2 version 9.7, 31bit s390 edition of it. Which is well out of support, and not sure if it was ever possible to run on Ubuntu.

Separately, please let me know if we still need to keep support for 31bit binaries on Ubuntu - as turning off CONFIG_COMPAT for 31bit binaries, and dropping compilation of biarch binaries will harden kernel & userspace, as well as ensure that s390x port is year 2038 ready ahead of x86.

Changed in linux (Ubuntu):
importance: Undecided → High
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

TODO: Need to check if we can still compile and run 31bit xenial s390 binaries, on a kernel with COMPAT_32BIT_TIME turned off, to support launchpad build farm itself.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2023-11-30 06:45 EDT-------
Hi @Dimitri & @Frank,
yes, it does make sense to address the year 2038 time problem rather earlier than later - especially since there is an LTS release coming up that will be around for 10 or even more years.
We are also in favor of fixing this with noble.
Therefore, we are currently evaluating the solution suggested by Dimitri: ".. we would drop all s390 (31 bit) binaries from Ubuntu, and turn off COMPAT / COMPAT_32BIT_TIME in the kernel."

I will post an update as soon as I have double-checked with all affected parties on our side.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

> TODO: Need to check if we can still compile and run 31bit xenial s390 binaries, on a kernel with COMPAT_32BIT_TIME turned off, to support launchpad build farm itself.

This is now complete. I believe we are capable of continue to building ESM/EOL releases, even with COMPAT turned off. Specifically to like continue building xenials' libc-s390 even if the host kernel in the build farm is noble+ kernel with compat turned off.

If it helps your analysis i can provide you a jammy kernel in a ppa that has compat turned off, such that you can empirically run anything you want and observe if things you think you might care about still work or not.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in ubuntu-z-systems:
status: Incomplete → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

IBM Z are deployed for longer timeframes than usually anticipated. And I don't think we will ever be able to get a straight answer about this.

I am proposing to turn off both COMPAT and COMPAT_32BIT_TIME on s390x in noble.

If any useful production instances of software are identified that require either of these; and cannot run on Jammy, or in a VM, I will gladly SRU kernel config change to turn either or both of these options back on in noble.

Revision history for this message
Frank Heimes (fheimes) wrote :

Makes sense to me - I'm +1 for turning it off starting with noble.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2024-01-17 07:24 EDT-------
In the development team we agreed on disabling the 32 bit compat syscall layer in the kernel for IBM Z with Ubuntu 24.04.

Revision history for this message
Frank Heimes (fheimes) wrote :

Thx Andreas for your +1

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Patch sent to the kernel team mailing list for review:

https://lists.ubuntu.com/archives/kernel-team/2024-January/148256.html

Changed in linux (Ubuntu):
status: Confirmed → In Progress
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Confirmed → In Progress
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Revision history for this message
Frank Heimes (fheimes) wrote :

Applied for 6.8.0-12.12, so included in -20 (that is atm still in -proposed).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 6.8.0-20.20

---------------
linux (6.8.0-20.20) noble; urgency=medium

  * noble/linux: 6.8.0-20.20 -proposed tracker (LP: #2058221)

  * Noble update: v6.8.1 upstream stable release (LP: #2058224)
    - x86/mmio: Disable KVM mitigation when X86_FEATURE_CLEAR_CPU_BUF is set
    - Documentation/hw-vuln: Add documentation for RFDS
    - x86/rfds: Mitigate Register File Data Sampling (RFDS)
    - KVM/x86: Export RFDS_NO and RFDS_CLEAR to guests
    - Linux 6.8.1

  * Autopkgtest failures on amd64 (LP: #2048768)
    - [Packaging] update to clang-18

  * Miscellaneous Ubuntu changes
    - SAUCE: apparmor4.0.0: LSM stacking v39: fix build error with
      CONFIG_SECURITY=n
    - [Config] amd64: MITIGATION_RFDS=y

 -- Paolo Pisati <email address hidden> Mon, 18 Mar 2024 11:08:14 +0100

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.