Linux Kernel 5.6 Developers Ready for 2038

At the beginning of the new decade, Linux Kernel 5.6 developers are ready to address the 2038 issue (also known as “Y2038” or “Unix Y2K” issues) that will come over the next decade. Linux 5.6 also became the first mainline kernel to be ready to run for a 32-bit system beyond 2038.

Linux Kernel 5.6 Developers Ready for 2038

The 2038 problem is similar to the Millennium Bug problem, which may cause some software to not function properly after 3:14:07 on January 19, 2038. At that time, on most 32-bit operating systems, the time will be “turned back” time_t and represented internally as a negative number, resulting in programs not working because they do not recognize 2038 and may jump back to 1970 or 1901.

At this stage, there is no common solution to the 2038 problem. Linux 5.6 is the first to be prepared and is likely to reverse port to a 5.4/5.5 stable branch.

Linux Kernel 5.6 Developers Ready for 2038

In an email to Linus Torvalds from Linux developer Arnd Bergmann, he mentioned that Linux Kernel 5.6 should be the foundation for a 32-bit system to run beyond 2038. His proposed PR includes a change to the time_t, which is to change the number of storage seconds (a signed 32-bit integer).

Bergmann says, “I once again traversed all users of the time_t to ensure that the kernel is in a long-term maintainable state, replacing all remaining references to the time_t with a secure alternative.” Some of the relevant parts of the series were introduced into the nfsd, xfs, alsa, and v4l2 trees. After all five branches of the linux-mm are merged, the last set of patches in the linux-mm will remove the currently unused time_t /timeval /timespec types and helper functions to ensure that no new users are merged. “

Due to the 2038 issue, the Unix timestamp will overflow on January 19, 2038 because it cannot store a signed 32-bit integer and will limit the update of the 32-bit system. To avoid this problem, according to Bergmann, user space applications need to be called to modern Linux kernel systems, and GNU C Library 2.32 and Musl libc 1.2 need to build user spaces for 64-bit time_t.

Finally, he also mentions that all y2038 problems that occur on 64-bit computers also apply to 32-bit computers.

Source: fossbytes