public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Always use long time_t for certain syscalls
@ 2020-02-10 17:50 Alistair Francis
  2020-02-10 17:50 ` [PATCH v2 2/6] time: Add a timeval with a long tv_sec and tv_usec Alistair Francis
                   ` (6 more replies)
  0 siblings, 7 replies; 32+ messages in thread
From: Alistair Francis @ 2020-02-10 17:50 UTC (permalink / raw)
  To: libc-alpha; +Cc: alistair23, Alistair Francis

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 converts getitimer, setitimer, getrusage and wait4 to be
both y2038 safe and always pass a long time_t. On 32 and 64-bit systems
we will pass a long time to the kernel (no matter the time_t size). This is
no change for 64-bit architectures or 32-bit architectures with a 32-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).

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 long time_t __getitimer/__setitimer
  resource: Add a __rusage64 struct
  linux: Use long time_t for wait4/getrusage

 include/sys/resource.h                        | 120 ++++++++++++++++++
 include/time.h                                |  64 ++++++++++
 .../{tv32-compat.h => alpha-tv32-compat.h}    |  16 +--
 sysdeps/unix/sysv/linux/alpha/osf_adjtime.c   |  10 +-
 sysdeps/unix/sysv/linux/alpha/osf_getitimer.c |   6 +-
 sysdeps/unix/sysv/linux/alpha/osf_getrusage.c |   4 +-
 .../unix/sysv/linux/alpha/osf_gettimeofday.c  |   4 +-
 sysdeps/unix/sysv/linux/alpha/osf_setitimer.c |  10 +-
 .../unix/sysv/linux/alpha/osf_settimeofday.c  |   4 +-
 sysdeps/unix/sysv/linux/alpha/osf_utimes.c    |   6 +-
 sysdeps/unix/sysv/linux/alpha/osf_wait4.c     |   4 +-
 sysdeps/unix/sysv/linux/getitimer.c           |  54 ++++++++
 sysdeps/unix/sysv/linux/getrusage.c           |  53 ++++++++
 sysdeps/unix/sysv/linux/setitimer.c           |  89 +++++++++++++
 sysdeps/unix/sysv/linux/tv32-compat.h         |  82 ++++++++++++
 sysdeps/unix/sysv/linux/wait4.c               |  40 +++++-
 16 files changed, 530 insertions(+), 36 deletions(-)
 rename sysdeps/unix/sysv/linux/alpha/{tv32-compat.h => alpha-tv32-compat.h} (88%)
 create mode 100644 sysdeps/unix/sysv/linux/getitimer.c
 create mode 100644 sysdeps/unix/sysv/linux/getrusage.c
 create mode 100644 sysdeps/unix/sysv/linux/setitimer.c
 create mode 100644 sysdeps/unix/sysv/linux/tv32-compat.h

-- 
2.25.0

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

end of thread, other threads:[~2020-02-11 21:37 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 17:50 [PATCH v2 0/6] Always use long time_t for certain syscalls Alistair Francis
2020-02-10 17:50 ` [PATCH v2 2/6] time: Add a timeval with a long tv_sec and tv_usec Alistair Francis
2020-02-10 23:12   ` Lukasz Majewski
2020-02-10 17:50 ` [PATCH v2 3/6] time: Add a __itimerval64 struct Alistair Francis
2020-02-10 17:50 ` [PATCH v2 4/6] linux: Use long time_t __getitimer/__setitimer Alistair Francis
2020-02-11 20:02   ` Vineet Gupta
2020-02-11 21:37     ` Alistair Francis
2020-02-10 17:50 ` [PATCH v2 1/6] sysv/linux: Rename alpha functions to be alpha specific Alistair Francis
2020-02-10 21:11   ` Zack Weinberg
2020-02-10 21:25     ` Alistair Francis
2020-02-10 21:35       ` Zack Weinberg
2020-02-10 21:53         ` Adhemerval Zanella
2020-02-10 22:27           ` Alistair Francis
2020-02-11  1:11           ` Zack Weinberg
2020-02-11 13:25             ` Adhemerval Zanella
2020-02-11 14:39               ` Zack Weinberg
2020-02-11 16:06                 ` Alistair Francis
2020-02-11 16:23                   ` Zack Weinberg
2020-02-11 17:14                     ` Adhemerval Zanella
2020-02-11 17:21                       ` Zack Weinberg
2020-02-11 18:04                     ` Alistair Francis
2020-02-11 18:10                       ` Alistair Francis
2020-02-11 18:38                       ` Zack Weinberg
2020-02-11 19:01                         ` Alistair Francis
2020-02-11 20:16                       ` Stepan Golosunov
2020-02-11 21:36                         ` Alistair Francis
2020-02-10 23:09   ` Lukasz Majewski
2020-02-10 17:50 ` [PATCH v2 6/6] linux: Use long time_t for wait4/getrusage Alistair Francis
2020-02-11 11:28   ` Lukasz Majewski
2020-02-11 18:15     ` Alistair Francis
2020-02-10 17:50 ` [PATCH v2 5/6] resource: Add a __rusage64 struct Alistair Francis
2020-02-10 18:06 ` [PATCH v2 0/6] Always use long time_t for certain syscalls Alistair Francis

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).