mbox

[RFC,0/6] y2038: Prepare glibc to be Y2038 safe for 32 bit ports

Message ID 20201204233604.7430-1-lukma@denx.de
Headers

Message

Lukasz Majewski Dec. 4, 2020, 11:35 p.m. UTC
  This patch series is the RFC for preparing glibc to be Y2038 safe on
ports with __WORDSIZE=32 && __TIMESIZE!=64 (e.g. 32 bit ARM).

First patch provides necessary definitions and redirections to
achieve the above task.

Following patches are adjustments to glibc to provide proper handling
of 64 bit time in some exported and local structures. Those patches
shall be applied before the first one is pulled.

This patch set causes following Y2038 tests being all passed:
https://github.com/lmajewski/y2038-tests/

Those tests are run as part of meta-y2038:
https://github.com/lmajewski/meta-y2038/

Lukasz Majewski (6):
  y2038: Introduce _TIME_BITS flag to support 64 bit time on 32 bit
    systems
  y2038: stat: {f}stat{at}64_time64 redirection to be used on Y2038
    systems
  y2038: Export struct_stat_time64_helper.h with Y2038 safe stat{64}
    content
  y2038: Enhance struct msqid_ds to support 64 bit time
  msqid: Provide internal copy of struct __msqid64_ds
  msg: provide glibc local copy of struct msqid_ds

 include/bits/types/struct_msqid64_ds.h        |  36 +++++
 include/features.h                            |  19 +++
 io/Versions                                   |   6 +
 io/sys/poll.h                                 |  11 ++
 io/sys/stat.h                                 | 100 +++++++++++-
 io/utime.h                                    |  15 ++
 manual/creature.texi                          |  28 ++++
 misc/Versions                                 |   5 +
 misc/sys/select.h                             |  27 ++++
 nptl/Versions                                 |  15 ++
 posix/Versions                                |   2 +
 posix/sched.h                                 |   9 ++
 posix/sys/wait.h                              |  20 +++
 resolv/Versions                               |   3 +
 resolv/netdb.h                                |  11 ++
 resource/Versions                             |   1 +
 resource/bits/types/struct_rusage.h           |   5 +
 resource/sys/resource.h                       |  10 ++
 rt/Versions                                   |   7 +
 rt/aio.h                                      |  25 ++-
 rt/mqueue.h                                   |  25 +++
 signal/Versions                               |   3 +
 signal/signal.h                               |  12 ++
 socket/sys/socket.h                           |  11 ++
 sysdeps/nptl/pthread.h                        | 117 ++++++++++++++
 sysdeps/pthread/semaphore.h                   |  23 +++
 sysdeps/pthread/threads.h                     |  33 ++++
 sysdeps/unix/sysv/linux/Makefile              |   3 +-
 sysdeps/unix/sysv/linux/Versions              |   7 +
 sysdeps/unix/sysv/linux/bits/struct_stat.h    |  17 +-
 .../linux/bits/struct_stat_time64_helper.h    |  70 +++++++++
 sysdeps/unix/sysv/linux/bits/time.h           |  10 ++
 sysdeps/unix/sysv/linux/bits/timex.h          |  31 ++++
 .../sysv/linux/bits/types/struct_msqid64_ds.h |   4 -
 .../sysv/linux/bits/types/struct_msqid_ds.h   |   8 +
 .../linux/hppa/bits/types/struct_msqid_ds.h   |   8 +
 sysdeps/unix/sysv/linux/include/sys/msg.h     |  66 +++++++-
 .../unix/sysv/linux/m68k/bits/struct_stat.h   |  16 ++
 .../sysv/linux/microblaze/bits/struct_stat.h  |  16 ++
 .../unix/sysv/linux/mips/bits/struct_stat.h   |  16 ++
 .../linux/mips/bits/types/struct_msqid_ds.h   |  12 +-
 .../sysv/linux/powerpc/bits/struct_stat.h     |  48 ++++--
 .../powerpc/bits/types/struct_msqid_ds.h      |   8 +
 .../linux/sparc/bits/types/struct_msqid_ds.h  |   8 +
 sysdeps/unix/sysv/linux/struct_stat_time64.h  |  60 ++-----
 sysdeps/unix/sysv/linux/sys/timerfd.h         |  22 +++
 sysdeps/unix/sysv/linux/sys/timex.h           |  37 ++++-
 .../unix/sysv/linux/x86/bits/struct_stat.h    |  16 ++
 sysvipc/Versions                              |   2 +
 sysvipc/sys/msg.h                             |  10 ++
 sysvipc/sys/sem.h                             |  21 +++
 sysvipc/sys/shm.h                             |  10 ++
 time/Versions                                 |  24 +++
 time/bits/types/struct_timespec.h             |  17 +-
 time/bits/types/struct_timeval.h              |   5 +
 time/bits/types/time_t.h                      |   4 +
 time/sys/time.h                               |  91 +++++++++++
 time/time.h                                   | 146 ++++++++++++++++++
 58 files changed, 1294 insertions(+), 98 deletions(-)
 create mode 100644 include/bits/types/struct_msqid64_ds.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h