Linux-Kernel 5.6 zur Behebung des Jahr-2038-Problems „Unix Y2K“

Einblick: Linux Kernel 5.6 zur Behebung des Jahr-2038-Problems

Im Moment sieht es so aus, als würde Linux Kernel 5.6 wahrscheinlich das mögliche Jahr-2038-Problem lösen. Linux Kernel 5.6 ist bereit, das „Y2038“- oder „Unix Y2K“-Problem zu lösen.

Linux Kernel 5.6 zur Behebung des Jahr-2038-Problems

Der Linux-Entwickler Arnd Bergmann erwähnte diese Funktion in einem Email per Post an Linus Torvalds.

Das Jahr-2038-Problem wird auch als Unix Millenium Bug oder Y2K38-Bug bezeichnet, der Probleme bei der Datenspeicherung verursachen kann, beispielsweise in Situationen, in denen Zeitwerte als vorzeichenbehaftete 32-Bit-Ganzzahl gespeichert oder berechnet werden.

Eingebettete Systeme, die Datumsangaben entweder zur Berechnung oder zur Diagnoseprotokollierung verwenden, sind am wahrscheinlichsten vom 2038-Problem betroffen. Aufgrund dieses Fehlers werden die Zeitwerte als negative Zahl gespeichert und die Systeme lesen das Datum als 13. Dezember 1901 statt als 19. Januar 2038.

Aus der E-Mail von Arnd Bergmann:

y2038: core, driver and file system changes

These are updates to device drivers and file systems that for some reason
or another were not included in the kernel in the previous y2038 series.

I've gone through all users of time_t again to make sure the kernel is
in a long-term maintainable state, replacing all remaining references
to time_t with safe alternatives.

Some related parts of the series were picked up into the nfsd, xfs,
alsa and v4l2 trees. A final set of patches in linux-mm removes the now
unused time_t/timeval/timespec types and helper functions after all five
branches are merged for linux-5.6, ensuring that no new users get merged.

As a result, linux-5.6, or my backport of the patches to 5.4 (1), should
be the first release that can serve as a base for a 32-bit system designed
to run beyond year 2038, with a few remaining caveats:

- All user space must be compiled with a 64-bit time_t, which will be
  supported in the coming musl-1.2 and glibc-2.32 releases, along with
  installed kernel headers from linux-5.6 or higher.

- Applications that use the system call interfaces directly need to be
  ported to use the time64 syscalls added in linux-5.1 in place of the
  existing system calls. This impacts most users of futex() and seccomp()
  as well as programming languages that have their own runtime environment
  not based on libc.

- Applications that use a private copy of kernel uapi header files or
  their contents may need to update to the linux-5.6 version, in
  particular for sound/asound.h, xfs/xfs_fs.h, linux/input.h,
  linux/elfcore.h, linux/sockios.h, linux/timex.h and linux/can/bcm.h.

- A few remaining interfaces cannot be changed to pass a 64-bit time_t
  in a compatible way, so they must be configured to use CLOCK_MONOTONIC
  times or (with a y2106 problem) unsigned 32-bit timestamps. Most
  importantly this impacts all users of 'struct input_event'.

- All y2038 problems that are present on 64-bit machines also apply to
  32-bit machines. In particular this affects file systems with on-disk
  timestamps using signed 32-bit seconds: ext4 with ext3-style small
  inodes, ext2, xfs (to be fixed soon) and ufs.

Linux Lite 5.6 veröffentlicht


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert