-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
y2038: Support for Y2038 safe time on 32 bit systems
The time_t type is now Y2038 safe, which means that it is aliased to __time64_t when __USE_TIME_BITS64 is defined or __time_t otherwise. On the contrary the __time_t for 32 bit systems is only 32 bit, so for Y2038 safe system it must be 64 bit (as is time_t) This patch introduces the Y2038 specific code to make clock_settime/ __clock_settime64 Y2038 safe on 32 bit systems. This goal is achieved by using aliasing to clock_settime names when __USE_TIME_BITS64 is defined. As a result user programs call 64 bit versions of functions (i.e. __clock_settime64 instead of __clock_settime), which must have been globally visible for this purpose - for non Y2038 safe code those are hidden in glibc. Additionally this patch also converts following syscalls to be Y2038: - difftime - mktime - timegm - ctime_r - ctime - gmtime_r - gmtime - clock_gettime64 - clock_settime64 - clock_getres64 - utimensat - futimens - clock_nanosleep_time64 - ppoll64 - timer_gettime - timer_settime - difftime - timerfd_gettime - timerfd_settime - sched_rr_get_interval - timespec_get - settimeofday - gettimeofday - setitimer - getitimer - getrusage - wait4_time64 - utimes - utime - mq_timedsend - mq_timedreceive - futimes - lutimes - futimesat - semtimedop -> credits: Adhemerval Zanella - pselect -> credits: Adhemerval Zanella - recvmmsg -> credits: Adhemerval Zanella - nanosleep -> credits: Adhemerval Zanella - select -> credits: Adhemerval Zanella - sigtimedwait -> credits: Adhemerval Zanella - stat -> credits: Adhemerval Zanella - fstat -> credits: Adhemerval Zanella - lstat -> credits: Adhemerval Zanella - fstatat -> credits: Adhemerval Zanella - clock_adjtime64 - adjtime - adjtimex - ntp_gettime - ntp_gettimex - ntp_adjtime - just alias to ___adjtimex64 function - wait3 -> credits: Adhemerval Zanella - nptl (uses futex_time64): - pthread_timedjoin_np - pthread_clockjoin_np - pthread_cond_clockwait - pthread_cond_timedwait - sem_clockwait - sem_timedwait - pthread_rwlock_clockrdlock - pthread_rwlock_clockwrlock - pthread_rwlock_timedrdlock - pthread_rwlock_timedwrlock - pthread_mutex_clocklock - pthread_mutex_timedlock - C11 threads - mtx_timedlock - cnd_timedwait - thrd_sleep - time Structures converted/exported: ----------------------------- - struct timespec - struct itimerspec - struct timeval - struct rusage - WIP/RFC: export of struct stat{64} TO DO: ------ - aio_suspend () - cnd_timedwait () - Make exportable struct __stat64_t64 and __rusage64 (to be usable when we redirect glibc syscalls symbols) - utmp{x} and login in general - patches from Adhemerval Zanella waiting for review - Provide Y2038 support for struct msqid_ds (and msgctl() syscall in general - Provide Y2038 support for struct semid_ds - Port tests from y2038-tests repository to glibc -master branch
- Loading branch information
Lukasz Majewski
committed
Nov 4, 2020
1 parent
3c21568
commit cc68c04
Showing
37 changed files
with
811 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,5 +146,7 @@ libc { | |
__file_change_detection_for_path; | ||
__file_change_detection_for_fp; | ||
__fstat64; | ||
__ppoll64; | ||
__utime64; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ libc { | |
} | ||
GLIBC_PRIVATE { | ||
__getrlimit; | ||
__getrusage64; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,7 @@ libc { | |
} | ||
GLIBC_2.21 { | ||
} | ||
GLIBC_PRIVATE { | ||
__sigtimedwait64; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.