unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/6] y2038: Linux: Provide __clock_* functions supporting 64 bit time
@ 2019-04-14 22:08 Lukasz Majewski
  2019-04-14 22:08 ` [PATCH 1/6] y2038: Introduce internal for glibc struct __timespec64 Lukasz Majewski
                   ` (10 more replies)
  0 siblings, 11 replies; 111+ messages in thread
From: Lukasz Majewski @ 2019-04-14 22:08 UTC (permalink / raw)
  To: libc-alpha; +Cc: Paul Eggert, Joseph Myers, Lukasz Majewski

This patch set introduces the conversion of __clock_{settime|
gettime|getres|nanosleep} to explicit 64 bit struct __timespec64
arguments. As a result those functions are now Y2038 safe

To achieve the above goal - new, internal to glibc,
struct __timespec64 has been also introduced as well as
helper functions to handle time conversions on 32 bit systems.

The code from this patch set uses new clock_* syscalls (explicit
64 bits) from Linux kernel (5.1+) as well

This work is (loosely) based on a previous development/patches:
https://libc-alpha.sourceware.narkive.com/zniMOWui/rfc-patch-00-52-make-glibc-y2038-proof#post68

Those patches shall be applied on top of:
https://github.com/lmajewski/y2038_glibc/commit/c17d6107d205026f476076948269763f5d177481
https://github.com/lmajewski/y2038_glibc/commit/a9835a888842078ea4d317086375d8f518a490d7

Github branch (including the y2038 conversion example):
https://github.com/lmajewski/y2038_glibc/commits/Y2038-2.29-glibc-__clock-internal-struct-timespec-v1


Shall be used with provided meta-y2038 for development and testing:
https://github.com/lmajewski/meta-y2038

I've used guidelines from:
https://www.gnu.org/software/libc/manual/html_mono/libc.html
"D.2.1 64-bit time symbol handling in the GNU C Library"
to convert *clock_settime*.

and most notably from:
https://sourceware.org/glibc/wiki/Y2038ProofnessDesign#clock_gettime.28.29

Comments are more than welcome.


Lukasz Majewski (6):
  y2038: Introduce internal for glibc struct __timespec64
  y2038: Provide conversion helpers for struct __timespec64
  y2038: linux: Provide __clock_settime64 implementation
  y2038: linux: Provide __clock_getres64 implementation
  y2038: linux: Provide __clock_gettime64 implementation
  y2038: linux: Provide __clock_nanosleep64 implementation

 include/time.h                            | 142 ++++++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/clock_getres.c    |  33 ++++++-
 sysdeps/unix/sysv/linux/clock_gettime.c   |  33 ++++++-
 sysdeps/unix/sysv/linux/clock_nanosleep.c |  52 ++++++++++-
 sysdeps/unix/sysv/linux/clock_settime.c   |  34 ++++++-
 5 files changed, 285 insertions(+), 9 deletions(-)

-- 
2.11.0


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

end of thread, other threads:[~2019-06-06  6:50 UTC | newest]

Thread overview: 111+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-14 22:08 [PATCH 0/6] y2038: Linux: Provide __clock_* functions supporting 64 bit time Lukasz Majewski
2019-04-14 22:08 ` [PATCH 1/6] y2038: Introduce internal for glibc struct __timespec64 Lukasz Majewski
2019-04-14 22:08 ` [PATCH 2/6] y2038: Provide conversion helpers for " Lukasz Majewski
2019-04-14 22:08 ` [PATCH 3/6] y2038: linux: Provide __clock_settime64 implementation Lukasz Majewski
2019-04-17 22:08   ` Joseph Myers
2019-04-18  6:46     ` Lukasz Majewski
2019-04-20  0:20   ` Stepan Golosunov
2019-04-20 11:21     ` Lukasz Majewski
2019-04-22  9:07       ` Stepan Golosunov
2019-04-22 21:45         ` Arnd Bergmann
2019-04-23 15:45           ` Lukasz Majewski
2019-04-14 22:08 ` [PATCH 4/6] y2038: linux: Provide __clock_getres64 implementation Lukasz Majewski
2019-04-14 22:08 ` [PATCH 5/6] y2038: linux: Provide __clock_gettime64 implementation Lukasz Majewski
2019-04-14 22:08 ` [PATCH 6/6] y2038: linux: Provide __clock_nanosleep64 implementation Lukasz Majewski
2019-04-17 22:11   ` Joseph Myers
2019-04-18  5:54     ` Lukasz Majewski
2019-04-29 10:46 ` [PATCH v2 0/7] y2038: Linux: Provide __clock_* functions supporting 64 bit time Lukasz Majewski
2019-04-29 10:46   ` [PATCH v2 1/7] y2038: Introduce internal for glibc struct __timespec64 Lukasz Majewski
2019-04-29 10:46   ` [PATCH v2 2/7] y2038: Introduce __ASSUME_64BIT_TIME define Lukasz Majewski
2019-04-29 21:50     ` Joseph Myers
2019-04-30  9:05       ` Lukasz Majewski
2019-04-30 21:47         ` Stepan Golosunov
2019-05-02  8:51           ` Lukasz Majewski
2019-05-02 11:54             ` Stepan Golosunov
2019-05-02 13:55               ` Lukasz Majewski
2019-05-06 13:38                 ` Lukasz Majewski
2019-05-06 14:26                   ` Lukasz Majewski
2019-05-06 19:36                     ` Stepan Golosunov
2019-05-06 21:14                       ` Lukasz Majewski
2019-05-07 20:03                         ` Stepan Golosunov
2019-05-07 20:44                           ` Joseph Myers
2019-05-08  7:51                           ` Lukasz Majewski
2019-05-08 19:48                             ` Stepan Golosunov
2019-05-09 16:12                               ` Joseph Myers
2019-05-16  4:00                               ` Arnd Bergmann
2019-05-16 19:54                                 ` Stepan Golosunov
2019-05-16 19:59                                 ` Joseph Myers
2019-05-17  7:23                                   ` Florian Weimer
2019-05-17  8:34                                     ` Arnd Bergmann
2019-05-07 15:43                       ` Joseph Myers
2019-05-02 15:04         ` Joseph Myers
2019-05-05 14:10           ` Stepan Golosunov
2019-05-05 20:46             ` Lukasz Majewski
2019-05-06 14:56           ` Lukasz Majewski
2019-05-07 15:35             ` Joseph Myers
2019-05-08 10:18               ` Lukasz Majewski
2019-05-09 15:46                 ` Joseph Myers
2019-05-15 15:39                   ` Lukasz Majewski
2019-05-16  3:57                     ` Arnd Bergmann
2019-05-16  6:58                       ` Lukasz Majewski
2019-05-31 11:37                 ` Stepan Golosunov
2019-06-05 16:35                   ` Lukasz Majewski
2019-06-06  6:50                     ` Stepan Golosunov
2019-04-29 10:46   ` [PATCH v2 3/7] y2038: Provide conversion helpers for struct __timespec64 Lukasz Majewski
2019-05-02 11:56     ` Stepan Golosunov
2019-05-02 14:17       ` Lukasz Majewski
2019-05-02 15:59         ` Joseph Myers
2019-05-02 16:19           ` Lukasz Majewski
2019-04-29 10:46   ` [PATCH v2 4/7] y2038: linux: Provide __clock_settime64 implementation Lukasz Majewski
2019-04-29 10:46   ` [PATCH v2 5/7] y2038: linux: Provide __clock_getres64 implementation Lukasz Majewski
2019-04-29 10:46   ` [PATCH v2 6/7] y2038: linux: Provide __clock_gettime64 implementation Lukasz Majewski
2019-04-29 10:46   ` [PATCH v2 7/7] y2038: linux: Provide __clock_nanosleep64 implementation Lukasz Majewski
2019-05-07 13:18 ` [PATCH v3 0/5] y2038: Linux: Provide __clock_settime function supporting 64 bit time Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 1/5] y2038: Introduce __ASSUME_TIME64_SYSCALLS define Lukasz Majewski
2019-05-07 16:04     ` Joseph Myers
2019-05-07 13:18   ` [PATCH v3 2/5] y2038: Introduce internal for glibc struct __timespec64 Lukasz Majewski
2019-05-07 13:30     ` Andreas Schwab
2019-05-07 14:07       ` Lukasz Majewski
2019-05-07 14:13         ` Andreas Schwab
2019-05-08  8:32           ` Lukasz Majewski
2019-05-08  8:38             ` Andreas Schwab
2019-05-08  9:10               ` Lukasz Majewski
2019-05-08  9:12                 ` Andreas Schwab
2019-05-08  9:37                   ` Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 3/5] y2038: Provide conversion helpers for " Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 4/5] y2038: linux: Provide __clock_settime64 implementation Lukasz Majewski
2019-05-07 16:40     ` Joseph Myers
2019-05-07 13:18   ` [PATCH v3 5/5] y2038: Support for Y2038 safe time on 32 bit systems Lukasz Majewski
2019-05-07 16:37     ` Joseph Myers
2019-05-08 10:27       ` Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 0/5] y2038: Linux: Provide __clock_settime function supporting 64 bit time Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 1/5] y2038: Introduce __ASSUME_TIME64_SYSCALLS define Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 2/5] y2038: Introduce internal for glibc struct __timespec64 Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 3/5] y2038: Provide conversion helpers for " Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 4/5] y2038: linux: Provide __clock_settime64 implementation Lukasz Majewski
2019-05-07 13:18   ` [PATCH v3 5/5] y2038: Support for Y2038 safe time on 32 bit systems Lukasz Majewski
2019-05-07 13:34     ` Andreas Schwab
2019-05-08 15:56 ` [PATCH] y2038: Introduce __ASSUME_TIME64_SYSCALLS define Lukasz Majewski
2019-05-09 15:58   ` Joseph Myers
2019-05-09 16:18     ` Stepan Golosunov
2019-05-15 14:27 ` [PATCH v5] " Lukasz Majewski
2019-05-21 15:15   ` Lukasz Majewski
2019-05-23  7:34   ` Stepan Golosunov
2019-05-23  9:35     ` Lukasz Majewski
2019-05-25 16:19       ` Lukasz Majewski
2019-05-25 19:45       ` Stepan Golosunov
2019-05-26 12:39         ` Lukasz Majewski
2019-05-28 16:00           ` Lukasz Majewski
2019-05-28 19:53           ` Joseph Myers
2019-05-28 22:46             ` Lukasz Majewski
2019-05-28 22:50               ` Joseph Myers
2019-05-28 19:47         ` Joseph Myers
2019-05-28 22:09           ` Lukasz Majewski
2019-05-28 22:43             ` Joseph Myers
2019-05-23 21:17     ` Joseph Myers
2019-05-20 10:27 ` [PATCH v4 0/3] y2038: Linux: Provide __clock_settime64 function supporting 64 bit time Lukasz Majewski
2019-05-20 10:27   ` [PATCH v4 1/3] y2038: Introduce internal for glibc struct __timespec64 Lukasz Majewski
2019-05-20 10:27   ` [PATCH v4 2/3] y2038: Provide conversion helpers for " Lukasz Majewski
2019-05-20 10:27   ` [PATCH v4 3/3] y2038: linux: Provide __clock_settime64 implementation Lukasz Majewski
2019-05-23  7:08     ` Stepan Golosunov
2019-05-23  9:28       ` Lukasz Majewski

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