mbox series

[v2,00/25] Add 64 bit time support on legacy ABIs

Message ID 20210518205613.1487824-1-adhemerval.zanella@linaro.org
Headers show
Series Add 64 bit time support on legacy ABIs | expand

Message

Adhemerval Zanella Netto May 18, 2021, 8:55 p.m. UTC
This is an updated version of my previous patchset [1].  Based on
the reviews and weekly call discussions, I dropped the utmp and
lastlogin fixes and the also the internal time64 usage.

The former requires further discussion, since we might just deprecate
the interface since its hard to fix issues (such as BZ#24492).  The
later is not really required and simplifies the patchset (I plan to
resend it once we get the 64 bit time support upstream).

I also rebased against master to get the newer pthread move in sync
(which should not interfere with the 64 bit time_t anymore) and fixes
some issues.

As before this patchset add support for 64 bit time on ABIs which only
support 32 bit time.  It is done through a new build flags,
_TIME_BITS=64, which is supported only when Long File Support is also
used (_FILE_OFFSET_BITS=64).  The new flag redefine the required
structures and redirected the required symbols to newer exported ones.

However, different then LFS support, the new 64 bit time_t symbols
are only exported for the ABI that require them.  ABIs that provides
64 bit time as the default ABI are unaffected.

On Linux, to fully support 64 bit time_t it requires a minimum of
kernel v5.1 due the newer syscalls.

To make the patch review easier, it is divided in 3 subparts:

  1. Patches from 01/23 to 04/52 are changes requires which is
     indepedent of 64 bit time support.

  2. Patches from 04/23 to 19/23 export the newer 64 bit time symbols
     and enable the _TImE_BITS on installed headers.

  3. Patches from 20/23 to 23/23 enables basic test coverage.  It covers
     now all but two symbols (getrusage and gai_suspend).

I checked for i686-linux-gnu running on a x86_64 5.4 kernel,
powerpc-linux-gnu running on ppc64 5.10 kernel, and on
arm-linux-gnueabihf running on arm64 5.4 kernel.  The new 64 bit time_t
tests when running on older kernels shows as unsupported.

[1] https://patchwork.sourceware.org/project/glibc/list/?series=1783

Adhemerval Zanella (23):
  linux: mips: Split libpthread.abilist in n32 and n64
  linux: mips: Split librt.abilist in n32 and n64
  linux: mips: Split libanl.abilist in n32 and n64
  linux: s390: Add libanl.abilist in s390 and s390x
  linux: Add fallback for 64-bit time_t SO_{RCV,SND}TIMEO
  linux: Add fallback for 64-bit time_t SO_TIMESTAMP{NS}
  linux: Add recvvmsg fallback for 64-bit time_t SO_TIMESTAMP{NS}
  y2038: Add __USE_TIME_BITS64 support for time_t
  y2038: Add __USE_TIME_BITS64 support for struct timeval
  y2038: Add __USE_TIME_BITS64 support for struct timespec
  y2038: Add __USE_TIME_BITS64 support for struct utimbuf
  y2038: linux: Add __USE_TIME_BITS64 support for struct timex
  y2038: Use a common definition for semid_ds
  y2038: Use a common definition for shmid_ds
  y2038: Add __USE_TIME_BITS64 support for socket-constants.h
  time: Add 64 bit time support for getdate
  y2038: Add support for 64 bit time on legacy ABIs
  posix: Add glob64 with 64 bit time_t support
  io: Add fts64 with 64 bit time_t support
  io: Add ftw64 with 64 bit time_t support
  libsupport: Add 64 bit time_t support for time functions
  libsupport: Add 64 bit time_t support for stat functions
  y2038: Add test coverage

Lukasz Majewski (2):
  y2038: Use a common definition for stat
  y2038: Use a common definition for msqid_ds

 Makeconfig                                    |  14 ++
 Makefile                                      |   2 +-
 Makerules                                     |  18 ++-
 NEWS                                          |   5 +
 include/features-time64.h                     |   1 +
 include/features.h                            |   2 +
 include/fts.h                                 |  51 +++++++
 include/ftw.h                                 |  18 +++
 include/glob.h                                |  28 ++++
 include/sys/socket.h                          |   5 +
 include/sys/stat.h                            |   2 +-
 include/time.h                                |  12 +-
 io/Makefile                                   |  28 +++-
 io/fts.h                                      |  43 +++++-
 io/fts64-time64.c                             |  35 +++++
 io/ftw.c                                      |   5 +-
 io/ftw.h                                      |  46 +++++-
 io/ftw64-time64.c                             |  34 +++++
 io/ftwtest-time64.c                           |   1 +
 io/sys/poll.h                                 |  11 ++
 io/sys/stat.h                                 | 113 ++++++++++++--
 io/tst-fts-time64.c                           |   1 +
 io/tst-futimens-time64.c                      |   2 +
 io/tst-futimens.c                             |   6 +-
 io/tst-futimes-time64.c                       |   2 +
 io/tst-futimes.c                              |   6 +-
 io/tst-futimesat-time64.c                     |   4 +
 io/tst-futimesat.c                            |  47 ++++--
 io/tst-lutimes-time64.c                       |   2 +
 io/tst-lutimes.c                              |  10 +-
 io/tst-stat-time64.c                          | 102 +++++++++++++
 io/tst-utime-time64.c                         |   2 +
 io/tst-utime.c                                |   6 +-
 io/tst-utimensat-time64.c                     |   2 +
 io/tst-utimensat.c                            |  12 +-
 io/tst-utimes-time64.c                        |   2 +
 io/tst-utimes.c                               |   6 +-
 io/utime.h                                    |  16 ++
 manual/creature.texi                          |  44 ++++++
 misc/Makefile                                 |   4 +
 misc/sys/select.h                             |  27 ++++
 misc/tst-pselect-time64.c                     |   1 +
 misc/tst-select-time64.c                      |   1 +
 nptl/Makefile                                 |   3 +
 nptl/pthread_clockjoin.c                      |   3 +-
 nptl/pthread_cond_wait.c                      |   9 +-
 nptl/pthread_mutex_timedlock.c                |   8 +-
 nptl/pthread_rwlock_clockrdlock.c             |   4 +-
 nptl/pthread_rwlock_clockwrlock.c             |   4 +-
 nptl/pthread_rwlock_timedrdlock.c             |   4 +-
 nptl/pthread_rwlock_timedwrlock.c             |   4 +-
 nptl/pthread_timedjoin.c                      |   3 +-
 nptl/sem_clockwait.c                          |   3 +-
 nptl/sem_timedwait.c                          |   4 +-
 nptl/tst-cancel4_2-time64.c                   |   1 +
 posix/Makefile                                |   7 +-
 posix/glob.c                                  |  46 +++---
 posix/glob.h                                  |  22 +++
 posix/glob64-lstat-compat.c                   |   3 +-
 posix/glob64-time64.c                         |  49 +++++++
 posix/globfree64-time64.c                     |  30 ++++
 posix/sched.h                                 |  11 +-
 posix/sys/wait.h                              |  20 +++
 posix/tst-gnuglob64-time64.c                  |   7 +
 posix/tst-sched_rr_get_interval-time64.c      |   1 +
 posix/tst-wait3-time64.c                      |   1 +
 posix/tst-wait4-time64.c                      |   1 +
 resolv/netdb.h                                |  11 ++
 resource/sys/resource.h                       |  10 ++
 rt/Makefile                                   |   9 ++
 rt/aio.h                                      |  15 +-
 rt/mqueue.h                                   |  22 +++
 rt/tst-aio6-time64.c                          |   1 +
 rt/tst-cpuclock2-time64.c                     |   1 +
 rt/tst-cpuclock2.c                            |   9 +-
 rt/tst-mqueue1-time64.c                       |   1 +
 rt/tst-mqueue2-time64.c                       |   1 +
 rt/tst-mqueue4-time64.c                       |   1 +
 rt/tst-mqueue8-time64.c                       |   1 +
 rt/tst-timer4-time64.c                        |   1 +
 signal/signal.h                               |  13 ++
 socket/sys/socket.h                           |  11 ++
 support/Makefile                              |   9 ++
 support/support-xfstat-time64.c               |  32 ++++
 support/support-xstat-time64.c                |  32 ++++
 support/timespec-add-time64.c                 |  27 ++++
 support/timespec-add.c                        |   2 +-
 support/timespec-sub-time64.c                 |  27 ++++
 support/timespec-sub.c                        |   2 +-
 support/timespec-time64.c                     |  40 +++++
 support/timespec.c                            |   9 +-
 support/timespec.h                            |  52 +++++--
 support/xclock_gettime_time64.c               |  26 ++++
 support/xclock_settime_time64.c               |  23 +++
 support/xlstat-time64.c                       |  32 ++++
 support/xtime.h                               |   7 +
 support/xunistd.h                             |  13 ++
 sysdeps/generic/features-time64.h             |  19 +++
 sysdeps/generic/time64-compat.h               |   3 +
 sysdeps/gnu/glob64-lstat-compat.c             |   3 +-
 sysdeps/nptl/pthread.h                        | 119 +++++++++++++++
 sysdeps/pthread/Makefile                      |  10 ++
 sysdeps/pthread/semaphore.h                   |  25 ++++
 sysdeps/pthread/threads.h                     |  33 +++++
 sysdeps/pthread/tst-abstime-time64.c          |   1 +
 sysdeps/pthread/tst-cnd-timedwait-time64.c    |   1 +
 sysdeps/pthread/tst-cond11-time64.c           |   1 +
 sysdeps/pthread/tst-join14-time64.c           |   1 +
 sysdeps/pthread/tst-mtx-timedlock-time64.c    |   1 +
 sysdeps/pthread/tst-rwlock14-time64.c         |   1 +
 sysdeps/pthread/tst-sem5-time64.c             |   1 +
 sysdeps/pthread/tst-thrd-sleep-time64.c       |   1 +
 sysdeps/unix/sysv/linux/Makefile              |  18 ++-
 sysdeps/unix/sysv/linux/Versions              | 107 ++++++++++++++
 sysdeps/unix/sysv/linux/arm/be/libanl.abilist |   1 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  76 ++++++++++
 sysdeps/unix/sysv/linux/arm/be/librt.abilist  |   5 +
 sysdeps/unix/sysv/linux/arm/le/libanl.abilist |   1 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  76 ++++++++++
 sysdeps/unix/sysv/linux/arm/le/librt.abilist  |   5 +
 sysdeps/unix/sysv/linux/arm/time64-compat.h   |   2 +
 sysdeps/unix/sysv/linux/bits/msq.h            |   1 +
 sysdeps/unix/sysv/linux/bits/sem.h            |   1 +
 sysdeps/unix/sysv/linux/bits/shm.h            |   1 +
 .../unix/sysv/linux/bits/socket-constants.h   |  47 +++++-
 sysdeps/unix/sysv/linux/bits/struct_stat.h    |  51 ++++---
 .../linux/bits/struct_stat_time64_helper.h    |  63 ++++++++
 sysdeps/unix/sysv/linux/bits/time.h           |  10 ++
 sysdeps/unix/sysv/linux/bits/timex.h          |  31 ++++
 .../sysv/linux/bits/types/struct_msqid64_ds.h |  10 +-
 .../bits/types/struct_msqid64_ds_helper.h     |  28 ++++
 .../sysv/linux/bits/types/struct_msqid_ds.h   |  12 +-
 .../sysv/linux/bits/types/struct_semid64_ds.h |   5 +-
 .../bits/types/struct_semid64_ds_helper.h     |  23 +++
 .../sysv/linux/bits/types/struct_semid_ds.h   |  10 +-
 .../sysv/linux/bits/types/struct_shmid64_ds.h |   9 +-
 .../bits/types/struct_shmid64_ds_helper.h     |  26 ++++
 .../sysv/linux/bits/types/struct_shmid_ds.h   |  10 +-
 sysdeps/unix/sysv/linux/cnd_timedwait.c       |   8 +-
 .../unix/sysv/linux/convert_scm_timestamps.c  |  96 ++++++++++++
 sysdeps/unix/sysv/linux/csky/libanl.abilist   |   1 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  76 ++++++++++
 sysdeps/unix/sysv/linux/csky/librt.abilist    |   5 +
 sysdeps/unix/sysv/linux/csky/time64-compat.h  |   2 +
 sysdeps/unix/sysv/linux/features-time64.h     |  37 +++++
 sysdeps/unix/sysv/linux/getsockopt.c          |  79 +++++++++-
 sysdeps/unix/sysv/linux/glob-lstat-compat.c   |   6 +-
 sysdeps/unix/sysv/linux/glob.c                |   6 +
 sysdeps/unix/sysv/linux/glob64-lstat-compat.c |  12 +-
 sysdeps/unix/sysv/linux/glob64-time64.c       |  44 ++++++
 sysdeps/unix/sysv/linux/glob64.c              |   8 +-
 sysdeps/unix/sysv/linux/globfree64-time64.c   |  35 +++++
 .../sysv/linux/hppa/bits/socket-constants.h   |  36 ++++-
 .../linux/hppa/bits/types/struct_msqid_ds.h   |  12 +-
 .../linux/hppa/bits/types/struct_semid_ds.h   |   4 +
 .../linux/hppa/bits/types/struct_shmid_ds.h   |  10 +-
 sysdeps/unix/sysv/linux/hppa/libanl.abilist   |   1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  76 ++++++++++
 sysdeps/unix/sysv/linux/hppa/librt.abilist    |   5 +
 .../sysv/linux/hppa/socket-constants-time64.h |  35 +++++
 sysdeps/unix/sysv/linux/hppa/time64-compat.h  |   2 +
 sysdeps/unix/sysv/linux/i386/Makefile         |   2 +
 sysdeps/unix/sysv/linux/i386/libanl.abilist   |   1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  76 ++++++++++
 sysdeps/unix/sysv/linux/i386/librt.abilist    |   5 +
 sysdeps/unix/sysv/linux/i386/time64-compat.h  |   2 +
 sysdeps/unix/sysv/linux/include/sys/msg.h     |   2 -
 sysdeps/unix/sysv/linux/include/sys/shm.h     |   2 -
 sysdeps/unix/sysv/linux/include/sys/timex.h   |   2 +
 .../unix/sysv/linux/m68k/bits/struct_stat.h   |  50 ++++---
 .../sysv/linux/m68k/coldfire/libanl.abilist   |   1 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |  76 ++++++++++
 .../sysv/linux/m68k/coldfire/librt.abilist    |   5 +
 .../sysv/linux/m68k/m680x0/libanl.abilist     |   1 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  76 ++++++++++
 .../unix/sysv/linux/m68k/m680x0/librt.abilist |   5 +
 sysdeps/unix/sysv/linux/m68k/time64-compat.h  |   2 +
 .../sysv/linux/microblaze/be/libanl.abilist   |   1 +
 .../sysv/linux/microblaze/be/libc.abilist     |  76 ++++++++++
 .../sysv/linux/microblaze/be/librt.abilist    |   5 +
 .../sysv/linux/microblaze/bits/struct_stat.h  |  48 +++---
 .../sysv/linux/microblaze/le/libanl.abilist   |   1 +
 .../sysv/linux/microblaze/le/libc.abilist     |  76 ++++++++++
 .../sysv/linux/microblaze/le/librt.abilist    |   5 +
 .../sysv/linux/microblaze/time64-compat.h     |   2 +
 .../sysv/linux/mips/bits/socket-constants.h   |  36 ++++-
 .../unix/sysv/linux/mips/bits/struct_stat.h   |  89 ++++++-----
 .../linux/mips/bits/types/struct_msqid_ds.h   |  18 ++-
 .../linux/mips/bits/types/struct_semid_ds.h   |   4 +
 .../linux/mips/bits/types/struct_shmid_ds.h   |  14 +-
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  76 ++++++++++
 .../sysv/linux/mips/mips32/libanl.abilist     |   1 +
 .../unix/sysv/linux/mips/mips32/librt.abilist |   5 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  76 ++++++++++
 .../sysv/linux/mips/mips32/time64-compat.h    |   2 +
 .../sysv/linux/mips/mips64/n32/libanl.abilist |   5 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  76 ++++++++++
 .../mips/mips64/{ => n32}/libpthread.abilist  |   0
 .../sysv/linux/mips/mips64/n32/librt.abilist  |  42 ++++++
 .../linux/mips/mips64/n32/time64-compat.h     |   2 +
 .../mips/mips64/{ => n64}/libanl.abilist      |   0
 .../linux/mips/mips64/n64/libpthread.abilist  |  15 ++
 .../linux/mips/mips64/{ => n64}/librt.abilist |   0
 .../sysv/linux/mips/socket-constants-time64.h |  35 +++++
 sysdeps/unix/sysv/linux/mtx_timedlock.c       |   8 +-
 sysdeps/unix/sysv/linux/nios2/libanl.abilist  |   1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |  76 ++++++++++
 sysdeps/unix/sysv/linux/nios2/librt.abilist   |   5 +
 sysdeps/unix/sysv/linux/nios2/time64-compat.h |   2 +
 sysdeps/unix/sysv/linux/oldglob.c             |  11 +-
 .../linux/powerpc/bits/socket-constants.h     |  36 ++++-
 .../sysv/linux/powerpc/bits/struct_stat.h     |  52 ++++---
 .../powerpc/bits/types/struct_msqid_ds.h      |  12 +-
 .../powerpc/bits/types/struct_semid_ds.h      |  10 +-
 .../powerpc/bits/types/struct_shmid_ds.h      |  10 +-
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  76 ++++++++++
 .../linux/powerpc/powerpc32/libanl.abilist    |   1 +
 .../linux/powerpc/powerpc32/librt.abilist     |   5 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |  76 ++++++++++
 .../linux/powerpc/powerpc32/time64-compat.h   |   2 +
 .../linux/powerpc/socket-constants-time64.h   |  35 +++++
 sysdeps/unix/sysv/linux/recvmmsg.c            |  17 ++-
 sysdeps/unix/sysv/linux/recvmsg.c             |  23 ++-
 .../unix/sysv/linux/s390/bits/struct_stat.h   |  56 ++++---
 .../sysv/linux/s390/s390-32/libanl.abilist    |   5 +
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  76 ++++++++++
 .../sysv/linux/s390/s390-32/librt.abilist     |   5 +
 .../sysv/linux/s390/s390-32/time64-compat.h   |   2 +
 .../linux/s390/{ => s390-64}/libanl.abilist   |   0
 sysdeps/unix/sysv/linux/semctl.c              |   1 -
 sysdeps/unix/sysv/linux/setsockopt.c          |  83 ++++++++++-
 sysdeps/unix/sysv/linux/sh/be/libanl.abilist  |   1 +
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  76 ++++++++++
 sysdeps/unix/sysv/linux/sh/be/librt.abilist   |   5 +
 sysdeps/unix/sysv/linux/sh/le/libanl.abilist  |   1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  76 ++++++++++
 sysdeps/unix/sysv/linux/sh/le/librt.abilist   |   5 +
 sysdeps/unix/sysv/linux/sh/time64-compat.h    |   2 +
 .../unix/sysv/linux/socket-constants-time64.h |  35 +++++
 .../sysv/linux/sparc/bits/socket-constants.h  |  36 ++++-
 .../linux/sparc/bits/types/struct_msqid_ds.h  |  12 +-
 .../linux/sparc/bits/types/struct_semid_ds.h  |  10 +-
 .../linux/sparc/bits/types/struct_shmid_ds.h  |  10 +-
 .../linux/sparc/socket-constants-time64.h     |  35 +++++
 .../sysv/linux/sparc/sparc32/libanl.abilist   |   1 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |  76 ++++++++++
 .../sysv/linux/sparc/sparc32/librt.abilist    |   5 +
 .../sysv/linux/sparc/sparc32/time64-compat.h  |   2 +
 sysdeps/unix/sysv/linux/struct_stat_time64.h  |  59 +-------
 sysdeps/unix/sysv/linux/sys/timerfd.h         |  22 +++
 sysdeps/unix/sysv/linux/sys/timex.h           |  27 +++-
 sysdeps/unix/sysv/linux/tst-adjtimex-time64.c |   1 +
 .../sysv/linux/tst-clock_adjtime-time64.c     |   1 +
 .../unix/sysv/linux/tst-ntp_adjtime-time64.c  |   1 +
 .../unix/sysv/linux/tst-ntp_gettime-time64.c  |   1 +
 .../unix/sysv/linux/tst-ntp_gettimex-time64.c |   1 +
 sysdeps/unix/sysv/linux/tst-ppoll-time64.c    |   1 +
 .../unix/sysv/linux/tst-sigtimedwait-time64.c |   1 +
 sysdeps/unix/sysv/linux/tst-timerfd-time64.c  |   1 +
 .../unix/sysv/linux/x86/bits/struct_stat.h    |  90 ++++++------
 .../linux/x86/bits/types/struct_semid_ds.h    |   4 +
 sysvipc/Makefile                              |   2 +
 sysvipc/sys/msg.h                             |  10 ++
 sysvipc/sys/sem.h                             |  21 +++
 sysvipc/sys/shm.h                             |  10 ++
 sysvipc/test-sysvmsg-time64.c                 |   1 +
 sysvipc/test-sysvsem-time64.c                 |   1 +
 sysvipc/test-sysvshm-time64.c                 |   1 +
 time/Makefile                                 |  18 +++
 time/bits/types/struct_timespec.h             |  12 +-
 time/bits/types/struct_timeval.h              |   5 +
 time/bits/types/time_t.h                      |   4 +
 time/getdate.c                                |  22 ++-
 time/sys/time.h                               |  71 +++++++++
 time/time.h                                   | 138 +++++++++++++++++-
 time/tst-adjtime-time64.c                     |   1 +
 time/tst-clock-time64.c                       |   1 +
 time/tst-clock2-time64.c                      |   1 +
 time/tst-clock_nanosleep-time64.c             |   1 +
 time/tst-clock_settime-time64.c               |   1 +
 time/tst-cpuclock1-time64.c                   |   1 +
 time/tst-ctime-time64.c                       |   1 +
 time/tst-ctime.c                              |  16 ++
 time/tst-difftime-time64.c                    |   1 +
 time/tst-getdate.c                            |  14 +-
 time/tst-gmtime-time64.c                      |   1 +
 time/tst-itimer-time64.c                      |   1 +
 time/tst-mktime4-time64.c                     |   1 +
 time/tst-settimeofday-time64.c                |   1 +
 time/tst-timegm-time64.c                      |   1 +
 time/tst-timespec_get-time64.c                |   1 +
 time/tst-timespec_getres-time64.c             |   1 +
 time/tst-y2039-time64.c                       |   1 +
 time/tst-y2039.c                              |  10 ++
 294 files changed, 5048 insertions(+), 538 deletions(-)
 create mode 100644 include/features-time64.h
 create mode 100644 io/fts64-time64.c
 create mode 100644 io/ftw64-time64.c
 create mode 100644 io/ftwtest-time64.c
 create mode 100644 io/tst-fts-time64.c
 create mode 100644 io/tst-futimens-time64.c
 create mode 100644 io/tst-futimes-time64.c
 create mode 100644 io/tst-futimesat-time64.c
 create mode 100644 io/tst-lutimes-time64.c
 create mode 100644 io/tst-stat-time64.c
 create mode 100644 io/tst-utime-time64.c
 create mode 100644 io/tst-utimensat-time64.c
 create mode 100644 io/tst-utimes-time64.c
 create mode 100644 misc/tst-pselect-time64.c
 create mode 100644 misc/tst-select-time64.c
 create mode 100644 nptl/tst-cancel4_2-time64.c
 create mode 100644 posix/glob64-time64.c
 create mode 100644 posix/globfree64-time64.c
 create mode 100644 posix/tst-gnuglob64-time64.c
 create mode 100644 posix/tst-sched_rr_get_interval-time64.c
 create mode 100644 posix/tst-wait3-time64.c
 create mode 100644 posix/tst-wait4-time64.c
 create mode 100644 rt/tst-aio6-time64.c
 create mode 100644 rt/tst-cpuclock2-time64.c
 create mode 100644 rt/tst-mqueue1-time64.c
 create mode 100644 rt/tst-mqueue2-time64.c
 create mode 100644 rt/tst-mqueue4-time64.c
 create mode 100644 rt/tst-mqueue8-time64.c
 create mode 100644 rt/tst-timer4-time64.c
 create mode 100644 support/support-xfstat-time64.c
 create mode 100644 support/support-xstat-time64.c
 create mode 100644 support/timespec-add-time64.c
 create mode 100644 support/timespec-sub-time64.c
 create mode 100644 support/timespec-time64.c
 create mode 100644 support/xclock_gettime_time64.c
 create mode 100644 support/xclock_settime_time64.c
 create mode 100644 support/xlstat-time64.c
 create mode 100644 sysdeps/generic/features-time64.h
 create mode 100644 sysdeps/generic/time64-compat.h
 create mode 100644 sysdeps/pthread/tst-abstime-time64.c
 create mode 100644 sysdeps/pthread/tst-cnd-timedwait-time64.c
 create mode 100644 sysdeps/pthread/tst-cond11-time64.c
 create mode 100644 sysdeps/pthread/tst-join14-time64.c
 create mode 100644 sysdeps/pthread/tst-mtx-timedlock-time64.c
 create mode 100644 sysdeps/pthread/tst-rwlock14-time64.c
 create mode 100644 sysdeps/pthread/tst-sem5-time64.c
 create mode 100644 sysdeps/pthread/tst-thrd-sleep-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/arm/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/types/struct_msqid64_ds_helper.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/types/struct_semid64_ds_helper.h
 create mode 100644 sysdeps/unix/sysv/linux/bits/types/struct_shmid64_ds_helper.h
 create mode 100644 sysdeps/unix/sysv/linux/convert_scm_timestamps.c
 create mode 100644 sysdeps/unix/sysv/linux/csky/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/features-time64.h
 create mode 100644 sysdeps/unix/sysv/linux/glob64-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/globfree64-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/hppa/socket-constants-time64.h
 create mode 100644 sysdeps/unix/sysv/linux/hppa/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/i386/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/m68k/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/microblaze/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/libanl.abilist
 rename sysdeps/unix/sysv/linux/mips/mips64/{ => n32}/libpthread.abilist (100%)
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/librt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/time64-compat.h
 rename sysdeps/unix/sysv/linux/mips/mips64/{ => n64}/libanl.abilist (100%)
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/libpthread.abilist
 rename sysdeps/unix/sysv/linux/mips/mips64/{ => n64}/librt.abilist (100%)
 create mode 100644 sysdeps/unix/sysv/linux/mips/socket-constants-time64.h
 create mode 100644 sysdeps/unix/sysv/linux/nios2/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/socket-constants-time64.h
 create mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/libanl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/time64-compat.h
 rename sysdeps/unix/sysv/linux/s390/{ => s390-64}/libanl.abilist (100%)
 create mode 100644 sysdeps/unix/sysv/linux/sh/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/socket-constants-time64.h
 create mode 100644 sysdeps/unix/sysv/linux/sparc/socket-constants-time64.h
 create mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/time64-compat.h
 create mode 100644 sysdeps/unix/sysv/linux/tst-adjtimex-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-clock_adjtime-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-ntp_adjtime-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-ntp_gettime-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-ntp_gettimex-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-ppoll-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-sigtimedwait-time64.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-timerfd-time64.c
 create mode 100644 sysvipc/test-sysvmsg-time64.c
 create mode 100644 sysvipc/test-sysvsem-time64.c
 create mode 100644 sysvipc/test-sysvshm-time64.c
 create mode 100644 time/tst-adjtime-time64.c
 create mode 100644 time/tst-clock-time64.c
 create mode 100644 time/tst-clock2-time64.c
 create mode 100644 time/tst-clock_nanosleep-time64.c
 create mode 100644 time/tst-clock_settime-time64.c
 create mode 100644 time/tst-cpuclock1-time64.c
 create mode 100644 time/tst-ctime-time64.c
 create mode 100644 time/tst-difftime-time64.c
 create mode 100644 time/tst-gmtime-time64.c
 create mode 100644 time/tst-itimer-time64.c
 create mode 100644 time/tst-mktime4-time64.c
 create mode 100644 time/tst-settimeofday-time64.c
 create mode 100644 time/tst-timegm-time64.c
 create mode 100644 time/tst-timespec_get-time64.c
 create mode 100644 time/tst-timespec_getres-time64.c
 create mode 100644 time/tst-y2039-time64.c

Comments

Carlos O'Donell June 4, 2021, 7:29 p.m. UTC | #1
On 5/18/21 4:55 PM, Adhemerval Zanella wrote:
> This is an updated version of my previous patchset [1].  Based on
> the reviews and weekly call discussions, I dropped the utmp and
> lastlogin fixes and the also the internal time64 usage.

Overall this looks very good.

I tested this across i686, x86_64, ppc64le, aarch64, and s390x looking
for any inconsistencies that might impact the existing 64-bit targets
that are most important to me downstream. I didn't see any regressions
or test failures in the targets that were related.

Thank you for championing this work.

> The former requires further discussion, since we might just deprecate
> the interface since its hard to fix issues (such as BZ#24492).  The
> later is not really required and simplifies the patchset (I plan to
> resend it once we get the 64 bit time support upstream).
> 
> I also rebased against master to get the newer pthread move in sync
> (which should not interfere with the 64 bit time_t anymore) and fixes
> some issues.
> 
> As before this patchset add support for 64 bit time on ABIs which only
> support 32 bit time.  It is done through a new build flags,
> _TIME_BITS=64, which is supported only when Long File Support is also
> used (_FILE_OFFSET_BITS=64).  The new flag redefine the required
> structures and redirected the required symbols to newer exported ones.
> 
> However, different then LFS support, the new 64 bit time_t symbols
> are only exported for the ABI that require them.  ABIs that provides
> 64 bit time as the default ABI are unaffected.
> 
> On Linux, to fully support 64 bit time_t it requires a minimum of
> kernel v5.1 due the newer syscalls.
> 
> To make the patch review easier, it is divided in 3 subparts:
> 
>   1. Patches from 01/23 to 04/52 are changes requires which is
>      indepedent of 64 bit time support.
> 
>   2. Patches from 04/23 to 19/23 export the newer 64 bit time symbols
>      and enable the _TImE_BITS on installed headers.
> 
>   3. Patches from 20/23 to 23/23 enables basic test coverage.  It covers
>      now all but two symbols (getrusage and gai_suspend).
> 
> I checked for i686-linux-gnu running on a x86_64 5.4 kernel,
> powerpc-linux-gnu running on ppc64 5.10 kernel, and on
> arm-linux-gnueabihf running on arm64 5.4 kernel.  The new 64 bit time_t
> tests when running on older kernels shows as unsupported.
> 
> [1] https://patchwork.sourceware.org/project/glibc/list/?series=1783
> 
> Adhemerval Zanella (23):
>   linux: mips: Split libpthread.abilist in n32 and n64
>   linux: mips: Split librt.abilist in n32 and n64
>   linux: mips: Split libanl.abilist in n32 and n64
>   linux: s390: Add libanl.abilist in s390 and s390x
>   linux: Add fallback for 64-bit time_t SO_{RCV,SND}TIMEO
>   linux: Add fallback for 64-bit time_t SO_TIMESTAMP{NS}
>   linux: Add recvvmsg fallback for 64-bit time_t SO_TIMESTAMP{NS}
>   y2038: Add __USE_TIME_BITS64 support for time_t
>   y2038: Add __USE_TIME_BITS64 support for struct timeval
>   y2038: Add __USE_TIME_BITS64 support for struct timespec
>   y2038: Add __USE_TIME_BITS64 support for struct utimbuf
>   y2038: linux: Add __USE_TIME_BITS64 support for struct timex
>   y2038: Use a common definition for semid_ds
>   y2038: Use a common definition for shmid_ds
>   y2038: Add __USE_TIME_BITS64 support for socket-constants.h
>   time: Add 64 bit time support for getdate
>   y2038: Add support for 64 bit time on legacy ABIs
>   posix: Add glob64 with 64 bit time_t support
>   io: Add fts64 with 64 bit time_t support
>   io: Add ftw64 with 64 bit time_t support
>   libsupport: Add 64 bit time_t support for time functions
>   libsupport: Add 64 bit time_t support for stat functions
>   y2038: Add test coverage
> 
> Lukasz Majewski (2):
>   y2038: Use a common definition for stat
>   y2038: Use a common definition for msqid_ds
> 
>  Makeconfig                                    |  14 ++
>  Makefile                                      |   2 +-
>  Makerules                                     |  18 ++-
>  NEWS                                          |   5 +
>  include/features-time64.h                     |   1 +
>  include/features.h                            |   2 +
>  include/fts.h                                 |  51 +++++++
>  include/ftw.h                                 |  18 +++
>  include/glob.h                                |  28 ++++
>  include/sys/socket.h                          |   5 +
>  include/sys/stat.h                            |   2 +-
>  include/time.h                                |  12 +-
>  io/Makefile                                   |  28 +++-
>  io/fts.h                                      |  43 +++++-
>  io/fts64-time64.c                             |  35 +++++
>  io/ftw.c                                      |   5 +-
>  io/ftw.h                                      |  46 +++++-
>  io/ftw64-time64.c                             |  34 +++++
>  io/ftwtest-time64.c                           |   1 +
>  io/sys/poll.h                                 |  11 ++
>  io/sys/stat.h                                 | 113 ++++++++++++--
>  io/tst-fts-time64.c                           |   1 +
>  io/tst-futimens-time64.c                      |   2 +
>  io/tst-futimens.c                             |   6 +-
>  io/tst-futimes-time64.c                       |   2 +
>  io/tst-futimes.c                              |   6 +-
>  io/tst-futimesat-time64.c                     |   4 +
>  io/tst-futimesat.c                            |  47 ++++--
>  io/tst-lutimes-time64.c                       |   2 +
>  io/tst-lutimes.c                              |  10 +-
>  io/tst-stat-time64.c                          | 102 +++++++++++++
>  io/tst-utime-time64.c                         |   2 +
>  io/tst-utime.c                                |   6 +-
>  io/tst-utimensat-time64.c                     |   2 +
>  io/tst-utimensat.c                            |  12 +-
>  io/tst-utimes-time64.c                        |   2 +
>  io/tst-utimes.c                               |   6 +-
>  io/utime.h                                    |  16 ++
>  manual/creature.texi                          |  44 ++++++
>  misc/Makefile                                 |   4 +
>  misc/sys/select.h                             |  27 ++++
>  misc/tst-pselect-time64.c                     |   1 +
>  misc/tst-select-time64.c                      |   1 +
>  nptl/Makefile                                 |   3 +
>  nptl/pthread_clockjoin.c                      |   3 +-
>  nptl/pthread_cond_wait.c                      |   9 +-
>  nptl/pthread_mutex_timedlock.c                |   8 +-
>  nptl/pthread_rwlock_clockrdlock.c             |   4 +-
>  nptl/pthread_rwlock_clockwrlock.c             |   4 +-
>  nptl/pthread_rwlock_timedrdlock.c             |   4 +-
>  nptl/pthread_rwlock_timedwrlock.c             |   4 +-
>  nptl/pthread_timedjoin.c                      |   3 +-
>  nptl/sem_clockwait.c                          |   3 +-
>  nptl/sem_timedwait.c                          |   4 +-
>  nptl/tst-cancel4_2-time64.c                   |   1 +
>  posix/Makefile                                |   7 +-
>  posix/glob.c                                  |  46 +++---
>  posix/glob.h                                  |  22 +++
>  posix/glob64-lstat-compat.c                   |   3 +-
>  posix/glob64-time64.c                         |  49 +++++++
>  posix/globfree64-time64.c                     |  30 ++++
>  posix/sched.h                                 |  11 +-
>  posix/sys/wait.h                              |  20 +++
>  posix/tst-gnuglob64-time64.c                  |   7 +
>  posix/tst-sched_rr_get_interval-time64.c      |   1 +
>  posix/tst-wait3-time64.c                      |   1 +
>  posix/tst-wait4-time64.c                      |   1 +
>  resolv/netdb.h                                |  11 ++
>  resource/sys/resource.h                       |  10 ++
>  rt/Makefile                                   |   9 ++
>  rt/aio.h                                      |  15 +-
>  rt/mqueue.h                                   |  22 +++
>  rt/tst-aio6-time64.c                          |   1 +
>  rt/tst-cpuclock2-time64.c                     |   1 +
>  rt/tst-cpuclock2.c                            |   9 +-
>  rt/tst-mqueue1-time64.c                       |   1 +
>  rt/tst-mqueue2-time64.c                       |   1 +
>  rt/tst-mqueue4-time64.c                       |   1 +
>  rt/tst-mqueue8-time64.c                       |   1 +
>  rt/tst-timer4-time64.c                        |   1 +
>  signal/signal.h                               |  13 ++
>  socket/sys/socket.h                           |  11 ++
>  support/Makefile                              |   9 ++
>  support/support-xfstat-time64.c               |  32 ++++
>  support/support-xstat-time64.c                |  32 ++++
>  support/timespec-add-time64.c                 |  27 ++++
>  support/timespec-add.c                        |   2 +-
>  support/timespec-sub-time64.c                 |  27 ++++
>  support/timespec-sub.c                        |   2 +-
>  support/timespec-time64.c                     |  40 +++++
>  support/timespec.c                            |   9 +-
>  support/timespec.h                            |  52 +++++--
>  support/xclock_gettime_time64.c               |  26 ++++
>  support/xclock_settime_time64.c               |  23 +++
>  support/xlstat-time64.c                       |  32 ++++
>  support/xtime.h                               |   7 +
>  support/xunistd.h                             |  13 ++
>  sysdeps/generic/features-time64.h             |  19 +++
>  sysdeps/generic/time64-compat.h               |   3 +
>  sysdeps/gnu/glob64-lstat-compat.c             |   3 +-
>  sysdeps/nptl/pthread.h                        | 119 +++++++++++++++
>  sysdeps/pthread/Makefile                      |  10 ++
>  sysdeps/pthread/semaphore.h                   |  25 ++++
>  sysdeps/pthread/threads.h                     |  33 +++++
>  sysdeps/pthread/tst-abstime-time64.c          |   1 +
>  sysdeps/pthread/tst-cnd-timedwait-time64.c    |   1 +
>  sysdeps/pthread/tst-cond11-time64.c           |   1 +
>  sysdeps/pthread/tst-join14-time64.c           |   1 +
>  sysdeps/pthread/tst-mtx-timedlock-time64.c    |   1 +
>  sysdeps/pthread/tst-rwlock14-time64.c         |   1 +
>  sysdeps/pthread/tst-sem5-time64.c             |   1 +
>  sysdeps/pthread/tst-thrd-sleep-time64.c       |   1 +
>  sysdeps/unix/sysv/linux/Makefile              |  18 ++-
>  sysdeps/unix/sysv/linux/Versions              | 107 ++++++++++++++
>  sysdeps/unix/sysv/linux/arm/be/libanl.abilist |   1 +
>  sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  76 ++++++++++
>  sysdeps/unix/sysv/linux/arm/be/librt.abilist  |   5 +
>  sysdeps/unix/sysv/linux/arm/le/libanl.abilist |   1 +
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  76 ++++++++++
>  sysdeps/unix/sysv/linux/arm/le/librt.abilist  |   5 +
>  sysdeps/unix/sysv/linux/arm/time64-compat.h   |   2 +
>  sysdeps/unix/sysv/linux/bits/msq.h            |   1 +
>  sysdeps/unix/sysv/linux/bits/sem.h            |   1 +
>  sysdeps/unix/sysv/linux/bits/shm.h            |   1 +
>  .../unix/sysv/linux/bits/socket-constants.h   |  47 +++++-
>  sysdeps/unix/sysv/linux/bits/struct_stat.h    |  51 ++++---
>  .../linux/bits/struct_stat_time64_helper.h    |  63 ++++++++
>  sysdeps/unix/sysv/linux/bits/time.h           |  10 ++
>  sysdeps/unix/sysv/linux/bits/timex.h          |  31 ++++
>  .../sysv/linux/bits/types/struct_msqid64_ds.h |  10 +-
>  .../bits/types/struct_msqid64_ds_helper.h     |  28 ++++
>  .../sysv/linux/bits/types/struct_msqid_ds.h   |  12 +-
>  .../sysv/linux/bits/types/struct_semid64_ds.h |   5 +-
>  .../bits/types/struct_semid64_ds_helper.h     |  23 +++
>  .../sysv/linux/bits/types/struct_semid_ds.h   |  10 +-
>  .../sysv/linux/bits/types/struct_shmid64_ds.h |   9 +-
>  .../bits/types/struct_shmid64_ds_helper.h     |  26 ++++
>  .../sysv/linux/bits/types/struct_shmid_ds.h   |  10 +-
>  sysdeps/unix/sysv/linux/cnd_timedwait.c       |   8 +-
>  .../unix/sysv/linux/convert_scm_timestamps.c  |  96 ++++++++++++
>  sysdeps/unix/sysv/linux/csky/libanl.abilist   |   1 +
>  sysdeps/unix/sysv/linux/csky/libc.abilist     |  76 ++++++++++
>  sysdeps/unix/sysv/linux/csky/librt.abilist    |   5 +
>  sysdeps/unix/sysv/linux/csky/time64-compat.h  |   2 +
>  sysdeps/unix/sysv/linux/features-time64.h     |  37 +++++
>  sysdeps/unix/sysv/linux/getsockopt.c          |  79 +++++++++-
>  sysdeps/unix/sysv/linux/glob-lstat-compat.c   |   6 +-
>  sysdeps/unix/sysv/linux/glob.c                |   6 +
>  sysdeps/unix/sysv/linux/glob64-lstat-compat.c |  12 +-
>  sysdeps/unix/sysv/linux/glob64-time64.c       |  44 ++++++
>  sysdeps/unix/sysv/linux/glob64.c              |   8 +-
>  sysdeps/unix/sysv/linux/globfree64-time64.c   |  35 +++++
>  .../sysv/linux/hppa/bits/socket-constants.h   |  36 ++++-
>  .../linux/hppa/bits/types/struct_msqid_ds.h   |  12 +-
>  .../linux/hppa/bits/types/struct_semid_ds.h   |   4 +
>  .../linux/hppa/bits/types/struct_shmid_ds.h   |  10 +-
>  sysdeps/unix/sysv/linux/hppa/libanl.abilist   |   1 +
>  sysdeps/unix/sysv/linux/hppa/libc.abilist     |  76 ++++++++++
>  sysdeps/unix/sysv/linux/hppa/librt.abilist    |   5 +
>  .../sysv/linux/hppa/socket-constants-time64.h |  35 +++++
>  sysdeps/unix/sysv/linux/hppa/time64-compat.h  |   2 +
>  sysdeps/unix/sysv/linux/i386/Makefile         |   2 +
>  sysdeps/unix/sysv/linux/i386/libanl.abilist   |   1 +
>  sysdeps/unix/sysv/linux/i386/libc.abilist     |  76 ++++++++++
>  sysdeps/unix/sysv/linux/i386/librt.abilist    |   5 +
>  sysdeps/unix/sysv/linux/i386/time64-compat.h  |   2 +
>  sysdeps/unix/sysv/linux/include/sys/msg.h     |   2 -
>  sysdeps/unix/sysv/linux/include/sys/shm.h     |   2 -
>  sysdeps/unix/sysv/linux/include/sys/timex.h   |   2 +
>  .../unix/sysv/linux/m68k/bits/struct_stat.h   |  50 ++++---
>  .../sysv/linux/m68k/coldfire/libanl.abilist   |   1 +
>  .../sysv/linux/m68k/coldfire/libc.abilist     |  76 ++++++++++
>  .../sysv/linux/m68k/coldfire/librt.abilist    |   5 +
>  .../sysv/linux/m68k/m680x0/libanl.abilist     |   1 +
>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  76 ++++++++++
>  .../unix/sysv/linux/m68k/m680x0/librt.abilist |   5 +
>  sysdeps/unix/sysv/linux/m68k/time64-compat.h  |   2 +
>  .../sysv/linux/microblaze/be/libanl.abilist   |   1 +
>  .../sysv/linux/microblaze/be/libc.abilist     |  76 ++++++++++
>  .../sysv/linux/microblaze/be/librt.abilist    |   5 +
>  .../sysv/linux/microblaze/bits/struct_stat.h  |  48 +++---
>  .../sysv/linux/microblaze/le/libanl.abilist   |   1 +
>  .../sysv/linux/microblaze/le/libc.abilist     |  76 ++++++++++
>  .../sysv/linux/microblaze/le/librt.abilist    |   5 +
>  .../sysv/linux/microblaze/time64-compat.h     |   2 +
>  .../sysv/linux/mips/bits/socket-constants.h   |  36 ++++-
>  .../unix/sysv/linux/mips/bits/struct_stat.h   |  89 ++++++-----
>  .../linux/mips/bits/types/struct_msqid_ds.h   |  18 ++-
>  .../linux/mips/bits/types/struct_semid_ds.h   |   4 +
>  .../linux/mips/bits/types/struct_shmid_ds.h   |  14 +-
>  .../sysv/linux/mips/mips32/fpu/libc.abilist   |  76 ++++++++++
>  .../sysv/linux/mips/mips32/libanl.abilist     |   1 +
>  .../unix/sysv/linux/mips/mips32/librt.abilist |   5 +
>  .../sysv/linux/mips/mips32/nofpu/libc.abilist |  76 ++++++++++
>  .../sysv/linux/mips/mips32/time64-compat.h    |   2 +
>  .../sysv/linux/mips/mips64/n32/libanl.abilist |   5 +
>  .../sysv/linux/mips/mips64/n32/libc.abilist   |  76 ++++++++++
>  .../mips/mips64/{ => n32}/libpthread.abilist  |   0
>  .../sysv/linux/mips/mips64/n32/librt.abilist  |  42 ++++++
>  .../linux/mips/mips64/n32/time64-compat.h     |   2 +
>  .../mips/mips64/{ => n64}/libanl.abilist      |   0
>  .../linux/mips/mips64/n64/libpthread.abilist  |  15 ++
>  .../linux/mips/mips64/{ => n64}/librt.abilist |   0
>  .../sysv/linux/mips/socket-constants-time64.h |  35 +++++
>  sysdeps/unix/sysv/linux/mtx_timedlock.c       |   8 +-
>  sysdeps/unix/sysv/linux/nios2/libanl.abilist  |   1 +
>  sysdeps/unix/sysv/linux/nios2/libc.abilist    |  76 ++++++++++
>  sysdeps/unix/sysv/linux/nios2/librt.abilist   |   5 +
>  sysdeps/unix/sysv/linux/nios2/time64-compat.h |   2 +
>  sysdeps/unix/sysv/linux/oldglob.c             |  11 +-
>  .../linux/powerpc/bits/socket-constants.h     |  36 ++++-
>  .../sysv/linux/powerpc/bits/struct_stat.h     |  52 ++++---
>  .../powerpc/bits/types/struct_msqid_ds.h      |  12 +-
>  .../powerpc/bits/types/struct_semid_ds.h      |  10 +-
>  .../powerpc/bits/types/struct_shmid_ds.h      |  10 +-
>  .../linux/powerpc/powerpc32/fpu/libc.abilist  |  76 ++++++++++
>  .../linux/powerpc/powerpc32/libanl.abilist    |   1 +
>  .../linux/powerpc/powerpc32/librt.abilist     |   5 +
>  .../powerpc/powerpc32/nofpu/libc.abilist      |  76 ++++++++++
>  .../linux/powerpc/powerpc32/time64-compat.h   |   2 +
>  .../linux/powerpc/socket-constants-time64.h   |  35 +++++
>  sysdeps/unix/sysv/linux/recvmmsg.c            |  17 ++-
>  sysdeps/unix/sysv/linux/recvmsg.c             |  23 ++-
>  .../unix/sysv/linux/s390/bits/struct_stat.h   |  56 ++++---
>  .../sysv/linux/s390/s390-32/libanl.abilist    |   5 +
>  .../unix/sysv/linux/s390/s390-32/libc.abilist |  76 ++++++++++
>  .../sysv/linux/s390/s390-32/librt.abilist     |   5 +
>  .../sysv/linux/s390/s390-32/time64-compat.h   |   2 +
>  .../linux/s390/{ => s390-64}/libanl.abilist   |   0
>  sysdeps/unix/sysv/linux/semctl.c              |   1 -
>  sysdeps/unix/sysv/linux/setsockopt.c          |  83 ++++++++++-
>  sysdeps/unix/sysv/linux/sh/be/libanl.abilist  |   1 +
>  sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  76 ++++++++++
>  sysdeps/unix/sysv/linux/sh/be/librt.abilist   |   5 +
>  sysdeps/unix/sysv/linux/sh/le/libanl.abilist  |   1 +
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  76 ++++++++++
>  sysdeps/unix/sysv/linux/sh/le/librt.abilist   |   5 +
>  sysdeps/unix/sysv/linux/sh/time64-compat.h    |   2 +
>  .../unix/sysv/linux/socket-constants-time64.h |  35 +++++
>  .../sysv/linux/sparc/bits/socket-constants.h  |  36 ++++-
>  .../linux/sparc/bits/types/struct_msqid_ds.h  |  12 +-
>  .../linux/sparc/bits/types/struct_semid_ds.h  |  10 +-
>  .../linux/sparc/bits/types/struct_shmid_ds.h  |  10 +-
>  .../linux/sparc/socket-constants-time64.h     |  35 +++++
>  .../sysv/linux/sparc/sparc32/libanl.abilist   |   1 +
>  .../sysv/linux/sparc/sparc32/libc.abilist     |  76 ++++++++++
>  .../sysv/linux/sparc/sparc32/librt.abilist    |   5 +
>  .../sysv/linux/sparc/sparc32/time64-compat.h  |   2 +
>  sysdeps/unix/sysv/linux/struct_stat_time64.h  |  59 +-------
>  sysdeps/unix/sysv/linux/sys/timerfd.h         |  22 +++
>  sysdeps/unix/sysv/linux/sys/timex.h           |  27 +++-
>  sysdeps/unix/sysv/linux/tst-adjtimex-time64.c |   1 +
>  .../sysv/linux/tst-clock_adjtime-time64.c     |   1 +
>  .../unix/sysv/linux/tst-ntp_adjtime-time64.c  |   1 +
>  .../unix/sysv/linux/tst-ntp_gettime-time64.c  |   1 +
>  .../unix/sysv/linux/tst-ntp_gettimex-time64.c |   1 +
>  sysdeps/unix/sysv/linux/tst-ppoll-time64.c    |   1 +
>  .../unix/sysv/linux/tst-sigtimedwait-time64.c |   1 +
>  sysdeps/unix/sysv/linux/tst-timerfd-time64.c  |   1 +
>  .../unix/sysv/linux/x86/bits/struct_stat.h    |  90 ++++++------
>  .../linux/x86/bits/types/struct_semid_ds.h    |   4 +
>  sysvipc/Makefile                              |   2 +
>  sysvipc/sys/msg.h                             |  10 ++
>  sysvipc/sys/sem.h                             |  21 +++
>  sysvipc/sys/shm.h                             |  10 ++
>  sysvipc/test-sysvmsg-time64.c                 |   1 +
>  sysvipc/test-sysvsem-time64.c                 |   1 +
>  sysvipc/test-sysvshm-time64.c                 |   1 +
>  time/Makefile                                 |  18 +++
>  time/bits/types/struct_timespec.h             |  12 +-
>  time/bits/types/struct_timeval.h              |   5 +
>  time/bits/types/time_t.h                      |   4 +
>  time/getdate.c                                |  22 ++-
>  time/sys/time.h                               |  71 +++++++++
>  time/time.h                                   | 138 +++++++++++++++++-
>  time/tst-adjtime-time64.c                     |   1 +
>  time/tst-clock-time64.c                       |   1 +
>  time/tst-clock2-time64.c                      |   1 +
>  time/tst-clock_nanosleep-time64.c             |   1 +
>  time/tst-clock_settime-time64.c               |   1 +
>  time/tst-cpuclock1-time64.c                   |   1 +
>  time/tst-ctime-time64.c                       |   1 +
>  time/tst-ctime.c                              |  16 ++
>  time/tst-difftime-time64.c                    |   1 +
>  time/tst-getdate.c                            |  14 +-
>  time/tst-gmtime-time64.c                      |   1 +
>  time/tst-itimer-time64.c                      |   1 +
>  time/tst-mktime4-time64.c                     |   1 +
>  time/tst-settimeofday-time64.c                |   1 +
>  time/tst-timegm-time64.c                      |   1 +
>  time/tst-timespec_get-time64.c                |   1 +
>  time/tst-timespec_getres-time64.c             |   1 +
>  time/tst-y2039-time64.c                       |   1 +
>  time/tst-y2039.c                              |  10 ++
>  294 files changed, 5048 insertions(+), 538 deletions(-)
>  create mode 100644 include/features-time64.h
>  create mode 100644 io/fts64-time64.c
>  create mode 100644 io/ftw64-time64.c
>  create mode 100644 io/ftwtest-time64.c
>  create mode 100644 io/tst-fts-time64.c
>  create mode 100644 io/tst-futimens-time64.c
>  create mode 100644 io/tst-futimes-time64.c
>  create mode 100644 io/tst-futimesat-time64.c
>  create mode 100644 io/tst-lutimes-time64.c
>  create mode 100644 io/tst-stat-time64.c
>  create mode 100644 io/tst-utime-time64.c
>  create mode 100644 io/tst-utimensat-time64.c
>  create mode 100644 io/tst-utimes-time64.c
>  create mode 100644 misc/tst-pselect-time64.c
>  create mode 100644 misc/tst-select-time64.c
>  create mode 100644 nptl/tst-cancel4_2-time64.c
>  create mode 100644 posix/glob64-time64.c
>  create mode 100644 posix/globfree64-time64.c
>  create mode 100644 posix/tst-gnuglob64-time64.c
>  create mode 100644 posix/tst-sched_rr_get_interval-time64.c
>  create mode 100644 posix/tst-wait3-time64.c
>  create mode 100644 posix/tst-wait4-time64.c
>  create mode 100644 rt/tst-aio6-time64.c
>  create mode 100644 rt/tst-cpuclock2-time64.c
>  create mode 100644 rt/tst-mqueue1-time64.c
>  create mode 100644 rt/tst-mqueue2-time64.c
>  create mode 100644 rt/tst-mqueue4-time64.c
>  create mode 100644 rt/tst-mqueue8-time64.c
>  create mode 100644 rt/tst-timer4-time64.c
>  create mode 100644 support/support-xfstat-time64.c
>  create mode 100644 support/support-xstat-time64.c
>  create mode 100644 support/timespec-add-time64.c
>  create mode 100644 support/timespec-sub-time64.c
>  create mode 100644 support/timespec-time64.c
>  create mode 100644 support/xclock_gettime_time64.c
>  create mode 100644 support/xclock_settime_time64.c
>  create mode 100644 support/xlstat-time64.c
>  create mode 100644 sysdeps/generic/features-time64.h
>  create mode 100644 sysdeps/generic/time64-compat.h
>  create mode 100644 sysdeps/pthread/tst-abstime-time64.c
>  create mode 100644 sysdeps/pthread/tst-cnd-timedwait-time64.c
>  create mode 100644 sysdeps/pthread/tst-cond11-time64.c
>  create mode 100644 sysdeps/pthread/tst-join14-time64.c
>  create mode 100644 sysdeps/pthread/tst-mtx-timedlock-time64.c
>  create mode 100644 sysdeps/pthread/tst-rwlock14-time64.c
>  create mode 100644 sysdeps/pthread/tst-sem5-time64.c
>  create mode 100644 sysdeps/pthread/tst-thrd-sleep-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/arm/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h
>  create mode 100644 sysdeps/unix/sysv/linux/bits/types/struct_msqid64_ds_helper.h
>  create mode 100644 sysdeps/unix/sysv/linux/bits/types/struct_semid64_ds_helper.h
>  create mode 100644 sysdeps/unix/sysv/linux/bits/types/struct_shmid64_ds_helper.h
>  create mode 100644 sysdeps/unix/sysv/linux/convert_scm_timestamps.c
>  create mode 100644 sysdeps/unix/sysv/linux/csky/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/features-time64.h
>  create mode 100644 sysdeps/unix/sysv/linux/glob64-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/globfree64-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/hppa/socket-constants-time64.h
>  create mode 100644 sysdeps/unix/sysv/linux/hppa/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/i386/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/m68k/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/microblaze/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/libanl.abilist
>  rename sysdeps/unix/sysv/linux/mips/mips64/{ => n32}/libpthread.abilist (100%)
>  create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/librt.abilist
>  create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n32/time64-compat.h
>  rename sysdeps/unix/sysv/linux/mips/mips64/{ => n64}/libanl.abilist (100%)
>  create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/libpthread.abilist
>  rename sysdeps/unix/sysv/linux/mips/mips64/{ => n64}/librt.abilist (100%)
>  create mode 100644 sysdeps/unix/sysv/linux/mips/socket-constants-time64.h
>  create mode 100644 sysdeps/unix/sysv/linux/nios2/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/powerpc/socket-constants-time64.h
>  create mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/libanl.abilist
>  create mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/time64-compat.h
>  rename sysdeps/unix/sysv/linux/s390/{ => s390-64}/libanl.abilist (100%)
>  create mode 100644 sysdeps/unix/sysv/linux/sh/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/socket-constants-time64.h
>  create mode 100644 sysdeps/unix/sysv/linux/sparc/socket-constants-time64.h
>  create mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/time64-compat.h
>  create mode 100644 sysdeps/unix/sysv/linux/tst-adjtimex-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-clock_adjtime-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-ntp_adjtime-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-ntp_gettime-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-ntp_gettimex-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-ppoll-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-sigtimedwait-time64.c
>  create mode 100644 sysdeps/unix/sysv/linux/tst-timerfd-time64.c
>  create mode 100644 sysvipc/test-sysvmsg-time64.c
>  create mode 100644 sysvipc/test-sysvsem-time64.c
>  create mode 100644 sysvipc/test-sysvshm-time64.c
>  create mode 100644 time/tst-adjtime-time64.c
>  create mode 100644 time/tst-clock-time64.c
>  create mode 100644 time/tst-clock2-time64.c
>  create mode 100644 time/tst-clock_nanosleep-time64.c
>  create mode 100644 time/tst-clock_settime-time64.c
>  create mode 100644 time/tst-cpuclock1-time64.c
>  create mode 100644 time/tst-ctime-time64.c
>  create mode 100644 time/tst-difftime-time64.c
>  create mode 100644 time/tst-gmtime-time64.c
>  create mode 100644 time/tst-itimer-time64.c
>  create mode 100644 time/tst-mktime4-time64.c
>  create mode 100644 time/tst-settimeofday-time64.c
>  create mode 100644 time/tst-timegm-time64.c
>  create mode 100644 time/tst-timespec_get-time64.c
>  create mode 100644 time/tst-timespec_getres-time64.c
>  create mode 100644 time/tst-y2039-time64.c
>