Need 32-bit Linux to run past 2038? When version 5.6 of the kernel pops, you're in for a treat

I've been to the year 3000... Not much has changed, but they're still patching Linux

Linux fans intent on holding back the years will be delighted to hear that the upcoming version 5.6 of the kernel should see 32-bit systems hanging on past the dread Y2038.

Arnd Bergmann, an engineer working on the thorny Y2038 problem in the Linux kernel, posted to the mailing list that, yup, Linux 5.6 "should be the first release that can serve as a base for a 32-bit system designed to run beyond year 2038".

Bergmann has also been on a trawling exercise, replacing code that uses time_t with something a little safer for the long term.

time_t represents the number of seconds since the start of the Unix epoch (1 January 1970) and systems using a signed 32-bit time_t integer type could well suffer borkage in 2038, when that seconds count blows past the maximum that can be stored.

The Linux team has been dealing with the upcoming Y2038 problem for a while now, and this news will come as a relief for those unable to update their 32-bit systems.

There are, as ever, caveats. User space must be compiled with a 64-bit time_t and applications that use the system call interfaces directly need to be ported to use the time64 syscalls added in Linux 5.1.

Bergmann also cautioned that there were a few interfaces that could not be changed "in a compatible way", and needed to be configured to use CLOCK_MONOTONIC, which doesn't suffer from that 1 January 1970 epoch issue but has challenges of its own, or an unsigned 32-bit timestamp, which could choke in 2106.

Still, by then most of us will have been enveloped by the sweet, sweet embrace of oblivion. Or will be flying around in rocket-powered robo-braincases/frantically treading water (insert your own apocalyptic scenario here).

Yes, that's the kind of short-term thinking that got us into this mess in the first place.

Bergmann was also keen to emphasise that Y2038 issues lurking in 64-bit machines will also be present in their 32-bit siblings and called out file systems using signed 32-bit seconds, such as ext2, xfs and ufs.

Linux distro makers have long been plotting ways of dropping 32-bit versions of the Penguin-tinged OS. Canonical stopped creating install media for i386 in 2018, but opted to change plans and build "selected" 32-bit i386 packages for Ubuntu 19.10 and the upcoming 20.04 LTS after an outcry from gamers.

And while those still in the 32-bit can theoretically upgrade, there is an awful lot of gear out there running all manner of Linux variants that will never see the fruits of Bergmann's labour through lack of support or just plain ignorance of what is in that mysterious box on the side of the industrial machine.

With less than two decades left until Y2038, that pile of abandonware will grow as vendors move on (cough, Sonos, cough), and continue happily counting the seconds until the dreaded date arrives. ®

Sponsored: Webcast: Why you need managed detection and response

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER


Biting the hand that feeds IT © 1998–2020