[PATCH 0/6] Always use 32-bit time_t for certain syscalls
Alistair Francis
alistair.francis@wdc.com
Mon Feb 3 18:38:00 GMT 2020
On y2038 safe 32-bit systems the Linux kernel expects itimerval
and rusage to use a 32-bit time_t, even though the other time_t's
are 64-bit.
This series adds 32-bit overrides for the specific syscalls that converts
between the Linux kernel's expected 32-bit time_t to the user expected 64-bit
time_t. This follows the standard y2038 conversion so that we don't break
backwards compatibility but we expose a 64-bit version for y2038 safe
architectrures (like RV32).
This series applies ontop of: https://patchwork.ozlabs.org/patch/1230878/
Alistair Francis (6):
sysv/linux: Rename alpha functions to be alpha specific
time: Add a timeval with a long tv_sec and tv_usec
time: Add a __itimerval64 struct
linux: Use 32-bit time_t for itimerval
resource: Add a __rusage64 struct
linux: Use 32-bit time_t for rusage
include/sys/resource.h | 116 ++++++++++++++++++
include/time.h | 66 ++++++++++
sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | 8 +-
sysdeps/unix/sysv/linux/alpha/osf_getitimer.c | 4 +-
sysdeps/unix/sysv/linux/alpha/osf_getrusage.c | 2 +-
.../unix/sysv/linux/alpha/osf_gettimeofday.c | 2 +-
sysdeps/unix/sysv/linux/alpha/osf_setitimer.c | 8 +-
.../unix/sysv/linux/alpha/osf_settimeofday.c | 2 +-
sysdeps/unix/sysv/linux/alpha/osf_utimes.c | 4 +-
sysdeps/unix/sysv/linux/alpha/osf_wait4.c | 2 +-
sysdeps/unix/sysv/linux/alpha/tv32-compat.h | 14 +--
.../linux/generic/wordsize-32/getitimer.c | 54 ++++++++
.../linux/generic/wordsize-32/getrusage.c | 52 ++++++++
.../linux/generic/wordsize-32/setitimer.c | 77 ++++++++++++
.../linux/generic/wordsize-32/tv32-compat.h | 82 +++++++++++++
.../sysv/linux/generic/wordsize-32/wait4.c | 83 +++++++++++++
16 files changed, 553 insertions(+), 23 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/getitimer.c
create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/getrusage.c
create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/setitimer.c
create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/tv32-compat.h
create mode 100644 sysdeps/unix/sysv/linux/generic/wordsize-32/wait4.c
--
2.25.0
More information about the Libc-alpha
mailing list