The year 2038 problem

All 32-bit kernels to date use a signed 32-bit time_t type, which can only represent time until January 2038. Since embedded systems running 32-bit Linux are going to survive beyond that date, we have to change all current uses, in a backwards compatible way.

User space interfaces

We will likely keep the 32-bit time_t in all user space interfaces that currently use it, but add new interfaces with a 64-bit timespec or another type that can represent later times. Most importantly that impacts system calls, but also specific ioctl commands and a few other interfaces. User space programs have to be recompiled to use the new interfaces, and the policy whether to use the old or the time time is left to the C library. While that policy is a complex topic itself, we don't cover it here.

System calls

File systems

Each file system stores its file modification times in its own format on disk, and a lot of them have the same problem. See also [y2038/vfs].

Tasks

The task list is for people that want to get involved, there will be many more tasks over time, so this is just a starting point. In the end, we should remove all instances of 'time_t', 'timespec' and 'timeval' from the kernel.

Trivial tasks

Find a driver using time_t/timespec/timeval internally and convert it to ktime_t/timespec64, examples:

drivers/firewire/core-cdev.c

drivers/firewire/nosy.c

drivers/hv/hv_util.c

drivers/infiniband/hw/nes/

drivers/misc/ibmasm/ibmasm.h

drivers/net/wireless/atmel.c

drivers/ide/pdc202xx_new.c

fs/fuse/dir.c

drivers/scsi/pmcraid.c

Small tasks

Find a driver using time_t/timespec/timeval internally and convert it to ktime_t/timespec64, examples:

drivers/block/sx8.c

drivers/char/ipmi/ipmi_ssif.c

drivers/char/mmtimer.c

drivers/cpufreq/speedstep-lib.c

drivers/hsi/clients/cmt_speech.c

drivers/media/platform/vivid/

drivers/net/hamradio/baycom_ser_fdx.c

Medium tasks

Modify an ioctl interface in a driver to support both 32- and 64-bit time interfaces, examples:

drivers/usb/misc/usbtest.c

Convert the internal timekeeping in fs/nfsd

Convert all 'struct key' users (time_t)

fix all uses of timeval in drivers/scsi/bfa

Advanced tasks

Change the on-disk layout of a broken file system to optionally support longer time stamps