glibc/sysdeps/unix
Lukasz Majewski 8f8a6cae48 y2038: linux: Provide ___adjtimex64 implementation
This patch provides new ___adjtimex64 explicit 64 bit function for adjusting
Linux kernel clock.

Internally, the __clock_adjtime64 syscall is used. This patch is necessary
for having architectures with __WORDSIZE == 32 Y2038 safe.

Moreover, a 32 bit version - ___adjtimex has been refactored to internally
use ___adjtimex64.

The ___adjtimex is now supposed to be used on systems still supporting 32
bit time (__TIMESIZE != 64) - hence the necessary conversions between struct
timex and 64 bit struct __timex64.

Last but not least, in ___adjtimex64 function the __clock_adjtime syscall has
been replaced with __clock_adjtime64 to support 64 bit time on architectures
with __WORDSIZE == 32 and __TIMESIZE != 64.

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Run-time tests:
- Run specific tests on ARM/x86 32bit systems (qemu):
  https://github.com/lmajewski/meta-y2038 and run tests:
  https://github.com/lmajewski/y2038-tests/commits/master

Above tests were performed with Y2038 redirection applied as well as without to
test the proper usage of both ___adjtimex64 and ___adjtimex.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2020-05-20 01:03:26 +02:00
..
alpha alpha: Refactor syscall and Use Linux kABI for syscall return 2020-02-14 21:09:12 -03:00
arm linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
bsd Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
i386 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
inet Remove obsolete, never-implemented XSI STREAMS declarations 2019-03-14 15:44:15 +01:00
mips linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
powerpc Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sh linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
sysv/linux y2038: linux: Provide ___adjtimex64 implementation 2020-05-20 01:03:26 +02:00
x86_64 linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
confstr.h
get_child_max.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getlogin_r.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getlogin.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getpagesize.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
grantpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
ifreq.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies
make-syscalls.sh Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] 2020-04-29 05:35:34 -07:00
Makefile Add arch-syscall.h dependency for generating sysd-syscalls file 2020-05-14 18:40:58 +02:00
pt-fcntl.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s-proto-cancel.S * sysdeps/unix/Makefile: Include $(common-objpfx)s-proto-cancel.d. 2002-12-30 00:12:56 +00:00
s-proto.S
setxid.h Update. 2004-11-12 01:27:04 +00:00
sockatmark.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
syscall-template.S Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] 2020-04-29 05:35:34 -07:00
syscall.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
syscalls.list Mark unsigned long arguments with U in more syscalls [BZ #25810] 2020-04-29 08:10:01 -07:00
sysdep.h linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00