public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [[PATCH RFC 2]  00/63] Make GLIBC Y2038-proof
@ 2018-04-18 20:18 Albert ARIBAUD (3ADEV)
  2018-04-18 20:18 ` [[PATCH RFC 2] 01/63] Y2038: add type __time64_t Albert ARIBAUD (3ADEV)
  0 siblings, 1 reply; 78+ messages in thread
From: Albert ARIBAUD (3ADEV) @ 2018-04-18 20:18 UTC (permalink / raw)
  To: libc-alpha; +Cc: Albert ARIBAUD (3ADEV)

This series implements Y2038-proof types, implementation, internal
functions, and APIs. For more information, see documentation at
https://sourceware.org/glibc/wiki/Y2038ProofnessDesign

Each patch in this series except the last add one type or function,
with a few exception where several functions are implemented as a whole.

Right now, this series provides a 64-bit time API to application code
but does not use 64-bit Linux syscalls, only 32-bit ones. This means
application code will most probably not run properly if times involved
go beyond Y2038, but should work fine otherwise.

These patches are currently tested using an ad hoc framework published
at https://github.com/3adev/y2038 which runs functional tests of the
APIS below, at and beyond the Y2038 limit. The tests are run on the
ARM and PPC architecture.

These patches have also been subjected to a 'make (x)check' on the ARM
architexcture and the results compared to those obtained without the
patches; no new failure is introduced by the series.

The last patch enables the _TIME_BITS mechanism. Once this patch is
applied, API header files will will use 64-bit time if _TIME_BITS is
defined and equal to 64 prior to their inclusion, and conversively,
will use 32-bit time if _TIME_BITS is different from 64 or does not
exist.

Albert ARIBAUD (3ADEV) (63):
  Y2038: add type __time64_t
  Y2038: add function __difftime64
  Y2038: make __tz_convert compatible with 64-bit-time
  Y2038: add function __localtime64
  Y2038: add function __localtime64_r
  Y2038: add function __gmtime64
  Y2038: add function __gmtime64_r
  Y2038: add function __ctime64
  Y2038: add function __ctime64_r
  Y2038: implement 64-bit-time __mktime64() and timelocal()
  Y2038: implement 64-bit-time __timegm64()
  Y2038: add struct __timespec64
  Y2038: add function __clock_gettime64
  Y2038: arm: implement clock_gettime64 as a VDSO symbol
  Y2038: powerpc: implement clock_gettime64 as a VDSO symbol
  Y2038: add function __clock_settime64
  Y2038: add function __clock_getres64
  Y2038: add function __clock_nanosleep64
  Y2038: add function __timespec_get64
  Y2038: add function __futimens64
  Y2038: add function __utimensat64
  Y2038: add function __sigtimedwait64
  Y2038: add struct __timeval64
  Y2038: add function __futimes64
  Y2038: add function __lutimes64
  Y2038: add struct __itimerspec64
  Y2038: add function __timer_gettime64
  Y2038: add function __timer_settime64
  Y2038: add function __timerfd_gettime64
  Y2038: add function __timerfd_settime64
  Y2038: add struct __stat64_t64
  Y2038: add function __fstat64_t64 (and __fxstat64_t64)
  Y2038: add function __stat64_t64 (and __xstat64_t64)
  Y2038: add function __lstat64_t64 (and __lxstat64_t64)
  Y2038: add function __fstatat64_t64 (and __fxstatat_t64)
  Y2038: add function __gettimeofday64
  Y2038: add function __settimeofday64
  Y2038: add function __time64
  Y2038: add function __stime64
  Y2038: add function __utimes64
  Y2038: add function __mq_timedreceived64
  Y2038: add function __mq_timedsend64
  Y2038: add function __msgctl64
  Y2038: add function __sched_rr_get_interval64
  Y2038: add function __nanosleep64
  Y2038: add function __adjtime64
  Y2038: add function __utime64
  Y2038: add struct __itimerval64
  Y2038: add function __getitimer64
  Y2038: add function __setitimer64
  Y2038: add functions using futexes
  Y2038: add function __getrusage64
  Y2038: add struct __ntp_timeval64
  Y2038: add function __ntp_gettime64
  Y2038: add function __ntp_gettimex64
  Y2038: add struct __timex64
  Y2038: add function __adjtimex64 (and __ntp_adjtime64)
  Y2038: add function pselect64
  Y2038: add function select64
  Y2038: add function __clntudp_create64
  Y2038: add function __clntudp_bufcreate64
  Y2038: add function __pmap_rmtcall64
  Y2038: add _TIME_BITS support

 bits/typesizes.h                                   |   1 +
 include/features.h                                 |  19 +
 include/sys/select.h                               |  13 +
 include/sys/stat.h                                 |  35 ++
 include/sys/time.h                                 |   4 +
 include/time.h                                     | 188 +++++-
 include/utime.h                                    |   7 +
 io/Makefile                                        |   2 +-
 io/Versions                                        |   5 +
 io/fstat64.c                                       |   7 +
 io/fstatat64.c                                     |   7 +
 io/futimens.c                                      |   8 +
 io/lstat64.c                                       |   7 +
 io/stat64.c                                        |   7 +
 io/sys/stat.h                                      |  75 ++-
 io/utime.c                                         |  16 +
 io/utime.h                                         |  16 +-
 io/utimensat.c                                     |   9 +
 manual/creature.texi                               |  28 +
 misc/Makefile                                      |   3 +-
 misc/futimes.c                                     |   9 +
 misc/lutimes.c                                     |   8 +
 misc/sys/select.h                                  |  25 +
 misc/utimes.c                                      |  15 +
 nptl/Versions                                      |   8 +
 nptl/lll_timedlock_wait.c                          |  37 ++
 nptl/pthread_cond_wait.c                           | 285 +++++++++
 nptl/pthread_mutex_timedlock.c                     | 636 +++++++++++++++++++++
 nptl/pthread_rwlock_common.c                       | 591 +++++++++++++++++++
 nptl/pthread_rwlock_timedrdlock.c                  |  19 +
 nptl/pthread_rwlock_timedwrlock.c                  |  19 +
 nptl/sem_timedwait.c                               |  18 +
 nptl/sem_wait.c                                    |  24 +
 nptl/sem_waitcommon.c                              | 172 ++++++
 posix/Makefile                                     |   3 +-
 posix/Versions                                     |   2 +
 posix/bits/types.h                                 |   3 +-
 posix/nanosleep64.c                                |  63 ++
 posix/sched.h                                      |   9 +
 posix/sched_rr_gi64.c                              |  51 ++
 resource/Makefile                                  |   2 +-
 resource/Versions                                  |   3 +
 resource/getrusage64.c                             | 187 ++++++
 resource/sys/resource.h                            |   9 +
 rt/Makefile                                        |   6 +-
 rt/Versions                                        |   9 +
 rt/mq_timedreceive64.c                             |  46 ++
 rt/mq_timedsend64.c                                |  45 ++
 rt/mqueue.h                                        |  22 +
 rt/timerfd_gettime64.c                             |  29 +
 rt/timerfd_settime64.c                             |  30 +
 signal/signal.h                                    |  10 +
 signal/sigtimedwait.c                              |  10 +
 sunrpc/clnt_udp.c                                  |  37 ++
 sunrpc/pmap_rmt.c                                  |  23 +
 sunrpc/rpc/clnt.h                                  |  24 +
 sunrpc/rpc/pmap_clnt.h                             |  15 +
 sysdeps/nptl/aio_misc.h                            |  39 ++
 sysdeps/nptl/lowlevellock.h                        |  17 +
 sysdeps/nptl/pthread.h                             |  41 ++
 sysdeps/posix/clock_getres.c                       |  96 +++-
 sysdeps/posix/time64.c                             |  43 ++
 sysdeps/posix/utime64.c                            |  46 ++
 sysdeps/powerpc/powerpc32/backtrace.c              |   1 +
 sysdeps/pthread/aio_suspend.c                      | 164 ++++++
 sysdeps/pthread/semaphore.h                        |  10 +
 sysdeps/unix/clock_gettime.c                       |  54 ++
 sysdeps/unix/clock_settime.c                       |  56 +-
 sysdeps/unix/stime64.c                             |  47 ++
 sysdeps/unix/sysv/linux/Versions                   |   2 +
 sysdeps/unix/sysv/linux/adjtime.c                  | 124 ++++
 sysdeps/unix/sysv/linux/arm/init-first.c           |  15 +
 sysdeps/unix/sysv/linux/arm/libc-vdso.h            |   1 +
 sysdeps/unix/sysv/linux/arm/libpthread.abilist     |   4 +
 sysdeps/unix/sysv/linux/arm/librt.abilist          |   8 +
 sysdeps/unix/sysv/linux/bits/msq.h                 |  20 +
 sysdeps/unix/sysv/linux/bits/stat.h                |   6 +-
 sysdeps/unix/sysv/linux/clock_getres.c             |  60 ++
 sysdeps/unix/sysv/linux/clock_gettime.c            |  81 +++
 sysdeps/unix/sysv/linux/clock_nanosleep.c          |  42 +-
 sysdeps/unix/sysv/linux/clock_settime.c            |  60 ++
 sysdeps/unix/sysv/linux/futex-internal.h           | 123 ++++
 sysdeps/unix/sysv/linux/futimens.c                 |  48 ++
 sysdeps/unix/sysv/linux/futimes.c                  |  59 ++
 sysdeps/unix/sysv/linux/fxstat64.c                 |  50 ++
 sysdeps/unix/sysv/linux/fxstatat64.c               |  54 ++
 sysdeps/unix/sysv/linux/gettimeofday64.c           |  48 ++
 sysdeps/unix/sysv/linux/lowlevellock-futex.h       |  22 +
 sysdeps/unix/sysv/linux/lutimes.c                  |  58 ++
 sysdeps/unix/sysv/linux/lxstat64.c                 |  50 ++
 sysdeps/unix/sysv/linux/msgctl.c                   |  72 +++
 sysdeps/unix/sysv/linux/ntp_gettime.c              |  25 +
 sysdeps/unix/sysv/linux/ntp_gettimex.c             |  31 +
 sysdeps/unix/sysv/linux/powerpc/init-first.c       |  16 +
 sysdeps/unix/sysv/linux/powerpc/libc-vdso.h        |   2 +
 .../linux/powerpc/powerpc32/libpthread.abilist     |   4 +
 .../sysv/linux/powerpc/powerpc32/librt.abilist     |   8 +
 sysdeps/unix/sysv/linux/pselect.c                  |  61 ++
 sysdeps/unix/sysv/linux/select.c                   |  66 +++
 sysdeps/unix/sysv/linux/settimeofday64.c           |  39 ++
 sysdeps/unix/sysv/linux/sigtimedwait.c             |  76 +++
 sysdeps/unix/sysv/linux/sys/timerfd.h              |  19 +
 sysdeps/unix/sysv/linux/sys/timex.h                |  45 +-
 sysdeps/unix/sysv/linux/timer_gettime.c            |  22 +
 sysdeps/unix/sysv/linux/timer_settime.c            |  39 ++
 sysdeps/unix/sysv/linux/timerfd_gettime64.c        |  43 ++
 sysdeps/unix/sysv/linux/timerfd_settime64.c        |  61 ++
 sysdeps/unix/sysv/linux/timespec_get.c             |  41 ++
 sysdeps/unix/sysv/linux/utimensat.c                |  58 ++
 sysdeps/unix/sysv/linux/utimes64.c                 |  54 ++
 sysdeps/unix/sysv/linux/xstat64.c                  |  50 ++
 sysvipc/Versions                                   |   3 +
 sysvipc/sys/msg.h                                  |   9 +
 time/Makefile                                      |   3 +
 time/Versions                                      |  29 +
 time/adjtime.c                                     |  10 +
 time/bits/types/struct_itimerspec.h                |  13 +
 time/bits/types/struct_timespec.h                  |  30 +
 time/bits/types/struct_timeval.h                   |  15 +
 time/bits/types/time_t.h                           |   4 +
 time/ctime.c                                       |  10 +
 time/ctime_r.c                                     |   9 +
 time/difftime.c                                    |   9 +
 time/getitimer64.c                                 |  53 ++
 time/gettimeofday.c                                |  11 +-
 time/gmtime.c                                      |  30 +-
 time/localtime.c                                   |  32 +-
 time/mktime.c                                      | 403 +++++++++++++
 time/offtime.c                                     |   8 +-
 time/setitimer64.c                                 |  71 +++
 time/settimeofday.c                                |   8 +
 time/stime.c                                       |  17 +
 time/sys/time.h                                    |  84 +++
 time/time.c                                        |  13 +
 time/time.h                                        | 161 +++++-
 time/timegm.c                                      |  11 +
 time/tzfile.c                                      |   4 +-
 time/tzset.c                                       |  24 +-
 138 files changed, 6359 insertions(+), 57 deletions(-)
 create mode 100644 posix/nanosleep64.c
 create mode 100644 posix/sched_rr_gi64.c
 create mode 100644 resource/getrusage64.c
 create mode 100644 rt/mq_timedreceive64.c
 create mode 100644 rt/mq_timedsend64.c
 create mode 100644 rt/timerfd_gettime64.c
 create mode 100644 rt/timerfd_settime64.c
 create mode 100644 sysdeps/posix/time64.c
 create mode 100644 sysdeps/posix/utime64.c
 create mode 100644 sysdeps/unix/stime64.c
 create mode 100644 sysdeps/unix/sysv/linux/gettimeofday64.c
 create mode 100644 sysdeps/unix/sysv/linux/settimeofday64.c
 create mode 100644 sysdeps/unix/sysv/linux/timerfd_gettime64.c
 create mode 100644 sysdeps/unix/sysv/linux/timerfd_settime64.c
 create mode 100644 sysdeps/unix/sysv/linux/utimes64.c
 create mode 100644 time/getitimer64.c
 create mode 100644 time/setitimer64.c

-- 
2.14.1

^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2018-06-11 22:39 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18 20:18 [[PATCH RFC 2] 00/63] Make GLIBC Y2038-proof Albert ARIBAUD (3ADEV)
2018-04-18 20:18 ` [[PATCH RFC 2] 01/63] Y2038: add type __time64_t Albert ARIBAUD (3ADEV)
2018-04-18 20:18   ` [[PATCH RFC 2] 02/63] Y2038: add function __difftime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:18     ` [[PATCH RFC 2] 03/63] Y2038: make __tz_convert compatible with 64-bit-time Albert ARIBAUD (3ADEV)
2018-04-18 20:18       ` [[PATCH RFC 2] 04/63] Y2038: add function __localtime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:18         ` [[PATCH RFC 2] 05/63] Y2038: add function __localtime64_r Albert ARIBAUD (3ADEV)
2018-04-18 20:19           ` [[PATCH RFC 2] 06/63] Y2038: add function __gmtime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:19             ` [[PATCH RFC 2] 07/63] Y2038: add function __gmtime64_r Albert ARIBAUD (3ADEV)
2018-04-18 20:19               ` [[PATCH RFC 2] 08/63] Y2038: add function __ctime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:19                 ` [[PATCH RFC 2] 09/63] Y2038: add function __ctime64_r Albert ARIBAUD (3ADEV)
2018-04-18 20:19                   ` [[PATCH RFC 2] 10/63] Y2038: implement 64-bit-time __mktime64() and timelocal() Albert ARIBAUD (3ADEV)
2018-04-18 20:19                     ` [[PATCH RFC 2] 11/63] Y2038: implement 64-bit-time __timegm64() Albert ARIBAUD (3ADEV)
2018-04-18 20:19                       ` [[PATCH RFC 2] 12/63] Y2038: add struct __timespec64 Albert ARIBAUD (3ADEV)
2018-04-18 20:19                         ` [[PATCH RFC 2] 13/63] Y2038: add function __clock_gettime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:19                           ` [[PATCH RFC 2] 14/63] Y2038: arm: implement clock_gettime64 as a VDSO symbol Albert ARIBAUD (3ADEV)
2018-04-18 20:19                             ` [[PATCH RFC 2] 15/63] Y2038: powerpc: " Albert ARIBAUD (3ADEV)
2018-04-18 20:19                               ` [[PATCH RFC 2] 16/63] Y2038: add function __clock_settime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:19                                 ` [[PATCH RFC 2] 17/63] Y2038: add function __clock_getres64 Albert ARIBAUD (3ADEV)
2018-04-18 20:19                                   ` [[PATCH RFC 2] 18/63] Y2038: add function __clock_nanosleep64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                     ` [[PATCH RFC 2] 19/63] Y2038: add function __timespec_get64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                       ` [[PATCH RFC 2] 20/63] Y2038: add function __futimens64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                         ` [[PATCH RFC 2] 21/63] Y2038: add function __utimensat64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                           ` [[PATCH RFC 2] 22/63] Y2038: add function __sigtimedwait64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                             ` [[PATCH RFC 2] 23/63] Y2038: add struct __timeval64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                               ` [[PATCH RFC 2] 24/63] Y2038: add function __futimes64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                                 ` [[PATCH RFC 2] 25/63] Y2038: add function __lutimes64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                                   ` [[PATCH RFC 2] 26/63] Y2038: add struct __itimerspec64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                                     ` [[PATCH RFC 2] 27/63] Y2038: add function __timer_gettime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                                       ` [[PATCH RFC 2] 28/63] Y2038: add function __timer_settime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                                         ` [[PATCH RFC 2] 29/63] Y2038: add function __timerfd_gettime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                                           ` [[PATCH RFC 2] 30/63] Y2038: add function __timerfd_settime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                             ` [[PATCH RFC 2] 31/63] Y2038: add struct __stat64_t64 Albert ARIBAUD (3ADEV)
2018-04-18 20:20                                                               ` [[PATCH RFC 2] 32/63] Y2038: add function __fstat64_t64 (and __fxstat64_t64) Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                 ` [[PATCH RFC 2] 33/63] Y2038: add function __stat64_t64 (and __xstat64_t64) Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                   ` [[PATCH RFC 2] 34/63] Y2038: add function __lstat64_t64 (and __lxstat64_t64) Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                     ` [[PATCH RFC 2] 35/63] Y2038: add function __fstatat64_t64 (and __fxstatat_t64) Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                       ` [[PATCH RFC 2] 36/63] Y2038: add function __gettimeofday64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                         ` [[PATCH RFC 2] 37/63] Y2038: add function __settimeofday64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                           ` [[PATCH RFC 2] 38/63] Y2038: add function __time64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                             ` [[PATCH RFC 2] 39/63] Y2038: add function __stime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                               ` [[PATCH RFC 2] 40/63] Y2038: add function __utimes64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                                 ` [[PATCH RFC 2] 41/63] Y2038: add function __mq_timedreceived64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                                   ` [[PATCH RFC 2] 42/63] Y2038: add function __mq_timedsend64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                                     ` [[PATCH RFC 2] 43/63] Y2038: add function __msgctl64 Albert ARIBAUD (3ADEV)
2018-04-18 20:22                                                                                       ` [[PATCH RFC 2] 44/63] Y2038: add function __sched_rr_get_interval64 Albert ARIBAUD (3ADEV)
2018-04-18 20:21                                                                                         ` [[PATCH RFC 2] 45/63] Y2038: add function __nanosleep64 Albert ARIBAUD (3ADEV)
2018-04-18 20:22                                                                                           ` [[PATCH RFC 2] 46/63] Y2038: add function __adjtime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:22                                                                                             ` [[PATCH RFC 2] 47/63] Y2038: add function __utime64 Albert ARIBAUD (3ADEV)
2018-04-18 20:22                                                                                               ` [[PATCH RFC 2] 48/63] Y2038: add struct __itimerval64 Albert ARIBAUD (3ADEV)
2018-04-18 20:22                                                                                                 ` [[PATCH RFC 2] 49/63] Y2038: add function __getitimer64 Albert ARIBAUD (3ADEV)
2018-04-18 21:54                                                     ` [[PATCH RFC 2] 26/63] Y2038: add struct __itimerspec64 Joseph Myers
2018-04-18 21:53                                         ` [[PATCH RFC 2] 20/63] Y2038: add function __futimens64 Joseph Myers
2018-04-18 21:51                     ` [[PATCH RFC 2] 10/63] Y2038: implement 64-bit-time __mktime64() and timelocal() Joseph Myers
2018-04-19  1:02       ` [[PATCH RFC 2] 03/63] Y2038: make __tz_convert compatible with 64-bit-time Paul Eggert
2018-04-19  1:08       ` Paul Eggert
2018-04-19  6:52         ` Florian Weimer
2018-05-02  9:11           ` Albert ARIBAUD
2018-04-18 20:37     ` [[PATCH RFC 2] 02/63] Y2038: add function __difftime64 Paul Eggert
2018-04-19 13:04       ` Albert ARIBAUD
2018-04-19 21:36         ` Paul Eggert
2018-05-02  7:22           ` Albert ARIBAUD
2018-05-02  7:40             ` Albert ARIBAUD
2018-05-02  7:46             ` Florian Weimer
2018-05-02 11:26               ` Albert ARIBAUD
2018-05-02 19:07               ` Paul Eggert
2018-05-03 17:31                 ` Albert ARIBAUD
2018-05-03 17:53                   ` Paul Eggert
2018-05-22 20:58                     ` Albert ARIBAUD
2018-05-22 21:15                       ` Paul Eggert
2018-05-22 22:10                         ` Joseph Myers
2018-06-11 22:24                           ` Albert ARIBAUD
2018-06-11 22:39                             ` Joseph Myers
2018-05-02 15:45             ` Joseph Myers
2018-05-02 19:14             ` Paul Eggert
2018-04-18 21:50     ` Joseph Myers
2018-04-19 12:27       ` Albert ARIBAUD
2018-04-19 13:18         ` Joseph Myers
2018-05-02  7:25           ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).