Linux 7.3 Cleans Up The Code For Disabling Of Legacy 32-bit Time Support

Linux 7.3 Cleans Up The Code For Disabling Of Legacy 32-bit Time Support

The Linux kernel has supported the CONFIG_COMPAT_32BIT_TIME Kconfig build time option for optionally disabling of legacy 32-bit time system call support. This is intended to disable the code that uses a 32-bit integer for time that is thus not Year 2038 safe, but at the cost of breaking compatibility for legacy 32-bit applications. Even if building without Linux 32-bit time support, it turns out some 32-bit time code persisted but that is now being fixed with Linux 7.3. Even if CONFIG_COMPAT_32BIT_TIME was disabled, it turns out in different CPU architecture code and other areas some legacy 32-bit time code was still being exposed. As part of the vDSO pull request for the Linux 7.3 merge window, that is being cleaned up now so the legacy 32-bit time code is being properly gated. The patches ensure that the old time(), stime(), and gettimeofday() functions using 32-bit integers for seconds are completely disabled when building with the 32-bit time compatibility disabled. There is also architecture-specific code for ARM, PowerPC, MIPS, SPARC, and x86 for ensuring that the COMPAT_32BIT_TIME Is properly respected to avoid unintentionally exposing the legacy 32-bit time related functionality. Most Linux distribution kernels are still running with CONFIG_COMPAT_32BIT_TIME=y in order to ensure 32-bit app compatibility but hopefully that will change within the next 11 years before the Y2038 problem. These clean-ups can be found via the vDSO pull request.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.