From: Dmitry V. Levin Date: Sat, 11 May 2019 22:35:56 +0000 (+0000) Subject: Implement parsers of new *time64 system calls X-Git-Tag: v5.1~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d893d25d47eb54d106a186b7b8d149a5a021a2b;p=strace Implement parsers of new *time64 system calls * aio.c (SYS_FUNC(io_pgetevents_time64)): New function. * desc.c (SYS_FUNC(pselect6_time64)): Likewise. * futex.c (SYS_FUNC(futex_time64)): Likewise. * ipc_sem.c (SYS_FUNC(semtimedop_time64)): Likewise. * mmsghdr.c (SYS_FUNC(recvmmsg_time64)): Likewise. * mq.c (SYS_FUNC(mq_timedsend_time64), SYS_FUNC(mq_timedreceive_time64)): Likewise. * poll.c (SYS_FUNC(ppoll_time64)): Likewise. * sched.c (SYS_FUNC(sched_rr_get_interval_time64)): Likewise. * signal.c (SYS_FUNC(rt_sigtimedwait_time64)): Likewise. * time.c (SYS_FUNC(clock_settime64), SYS_FUNC(clock_gettime64), SYS_FUNC(clock_nanosleep_time64), SYS_FUNC(timer_settime64), SYS_FUNC(timer_gettime64), SYS_FUNC(timerfd_settime64), SYS_FUNC(timerfd_gettime64)): Likewise. * utimes.c (SYS_FUNC(utimensat_time64)): Likewise. * linux/dummy.h (sys_clock_getres_time64): Redirect to sys_clock_gettime64. --- diff --git a/aio.c b/aio.c index 54df8d10..7cc5f219 100644 --- a/aio.c +++ b/aio.c @@ -255,3 +255,8 @@ SYS_FUNC(io_pgetevents) { return print_io_getevents(tcp, print_timespec, true); } + +SYS_FUNC(io_pgetevents_time64) +{ + return print_io_getevents(tcp, print_timespec64, true); +} diff --git a/desc.c b/desc.c index 1b1e5003..1f2625d5 100644 --- a/desc.c +++ b/desc.c @@ -249,3 +249,8 @@ SYS_FUNC(pselect6) { return do_pselect6(tcp, print_timespec, sprint_timespec); } + +SYS_FUNC(pselect6_time64) +{ + return do_pselect6(tcp, print_timespec64, sprint_timespec64); +} diff --git a/futex.c b/futex.c index 41e4857d..b9048bc0 100644 --- a/futex.c +++ b/futex.c @@ -127,3 +127,8 @@ SYS_FUNC(futex) { return do_futex(tcp, print_timespec); } + +SYS_FUNC(futex_time64) +{ + return do_futex(tcp, print_timespec64); +} diff --git a/ipc_sem.c b/ipc_sem.c index 5d706a58..908a58c4 100644 --- a/ipc_sem.c +++ b/ipc_sem.c @@ -87,6 +87,11 @@ SYS_FUNC(semtimedop) return do_semtimedop(tcp, print_timespec); } +SYS_FUNC(semtimedop_time64) +{ + return do_semtimedop(tcp, print_timespec64); +} + SYS_FUNC(semget) { printxval(ipc_private, (unsigned int) tcp->u_arg[0], NULL); diff --git a/linux/dummy.h b/linux/dummy.h index a21ffb68..012c844c 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -41,6 +41,7 @@ # define sys_acct sys_chdir # define sys_chroot sys_chdir # define sys_clock_getres sys_clock_gettime +# define sys_clock_getres_time64 sys_clock_gettime64 # define sys_connect sys_bind # define sys_fchdir sys_close # define sys_fdatasync sys_close diff --git a/mmsghdr.c b/mmsghdr.c index 64365188..15c3d1a2 100644 --- a/mmsghdr.c +++ b/mmsghdr.c @@ -229,3 +229,8 @@ SYS_FUNC(recvmmsg) { return do_recvmmsg(tcp, print_timespec, sprint_timespec); } + +SYS_FUNC(recvmmsg_time64) +{ + return do_recvmmsg(tcp, print_timespec64, sprint_timespec64); +} diff --git a/mq.c b/mq.c index cc8b4256..c9f9ee1a 100644 --- a/mq.c +++ b/mq.c @@ -43,6 +43,11 @@ SYS_FUNC(mq_timedsend) return do_mq_timedsend(tcp, print_timespec); } +SYS_FUNC(mq_timedsend_time64) +{ + return do_mq_timedsend(tcp, print_timespec64); +} + static int do_mq_timedreceive(struct tcb *const tcp, const print_obj_by_addr_fn print_ts) { @@ -74,6 +79,11 @@ SYS_FUNC(mq_timedreceive) return do_mq_timedreceive(tcp, print_timespec); } +SYS_FUNC(mq_timedreceive_time64) +{ + return do_mq_timedreceive(tcp, print_timespec64); +} + SYS_FUNC(mq_notify) { printfd(tcp, tcp->u_arg[0]); diff --git a/poll.c b/poll.c index 5ad16da2..16145546 100644 --- a/poll.c +++ b/poll.c @@ -168,3 +168,8 @@ SYS_FUNC(ppoll) { return do_ppoll(tcp, print_timespec, sprint_timespec); } + +SYS_FUNC(ppoll_time64) +{ + return do_ppoll(tcp, print_timespec64, sprint_timespec64); +} diff --git a/sched.c b/sched.c index ff0889a0..49b6ffda 100644 --- a/sched.c +++ b/sched.c @@ -81,6 +81,11 @@ SYS_FUNC(sched_rr_get_interval) return do_sched_rr_get_interval(tcp, print_timespec); } +SYS_FUNC(sched_rr_get_interval_time64) +{ + return do_sched_rr_get_interval(tcp, print_timespec64); +} + static void print_sched_attr(struct tcb *const tcp, const kernel_ulong_t addr, unsigned int usize) diff --git a/signal.c b/signal.c index ce328aa1..65a6e3d7 100644 --- a/signal.c +++ b/signal.c @@ -691,6 +691,11 @@ SYS_FUNC(rt_sigtimedwait) return do_rt_sigtimedwait(tcp, print_timespec, sprint_timespec); } +SYS_FUNC(rt_sigtimedwait_time64) +{ + return do_rt_sigtimedwait(tcp, print_timespec64, sprint_timespec64); +} + SYS_FUNC(restart_syscall) { tprintf("<... resuming interrupted %s ...>", diff --git a/time.c b/time.c index e912ba3c..53329917 100644 --- a/time.c +++ b/time.c @@ -239,6 +239,11 @@ SYS_FUNC(clock_settime) return do_clock_settime(tcp, print_timespec); } +SYS_FUNC(clock_settime64) +{ + return do_clock_settime(tcp, print_timespec64); +} + static int do_clock_gettime(struct tcb *const tcp, const print_obj_by_addr_fn print_ts) { @@ -256,6 +261,11 @@ SYS_FUNC(clock_gettime) return do_clock_gettime(tcp, print_timespec); } +SYS_FUNC(clock_gettime64) +{ + return do_clock_gettime(tcp, print_timespec64); +} + static int do_clock_nanosleep(struct tcb *const tcp, const print_obj_by_addr_fn print_ts) { @@ -287,6 +297,11 @@ SYS_FUNC(clock_nanosleep) return do_clock_nanosleep(tcp, print_timespec); } +SYS_FUNC(clock_nanosleep_time64) +{ + return do_clock_nanosleep(tcp, print_timespec64); +} + static int do_clock_adjtime(struct tcb *const tcp, const print_obj_by_addr_fn print_tx) { @@ -349,6 +364,11 @@ SYS_FUNC(timer_settime) return do_timer_settime(tcp, print_itimerspec); } +SYS_FUNC(timer_settime64) +{ + return do_timer_settime(tcp, print_itimerspec64); +} + static int do_timer_gettime(struct tcb *const tcp, const print_obj_by_addr_fn print_its) { @@ -365,6 +385,11 @@ SYS_FUNC(timer_gettime) return do_timer_gettime(tcp, print_itimerspec); } +SYS_FUNC(timer_gettime64) +{ + return do_timer_gettime(tcp, print_itimerspec64); +} + #include "xlat/timerfdflags.h" SYS_FUNC(timerfd_create) @@ -397,6 +422,11 @@ SYS_FUNC(timerfd_settime) return do_timerfd_settime(tcp, print_itimerspec); } +SYS_FUNC(timerfd_settime64) +{ + return do_timerfd_settime(tcp, print_itimerspec64); +} + static int do_timerfd_gettime(struct tcb *const tcp, const print_obj_by_addr_fn print_its) { @@ -413,3 +443,8 @@ SYS_FUNC(timerfd_gettime) { return do_timerfd_gettime(tcp, print_itimerspec); } + +SYS_FUNC(timerfd_gettime64) +{ + return do_timerfd_gettime(tcp, print_itimerspec64); +} diff --git a/utimes.c b/utimes.c index 5dd98a12..cf9168e3 100644 --- a/utimes.c +++ b/utimes.c @@ -51,6 +51,11 @@ SYS_FUNC(utimensat) return do_utimensat(tcp, print_timespec_utime_pair); } +SYS_FUNC(utimensat_time64) +{ + return do_utimensat(tcp, print_timespec64_utime_pair); +} + #ifdef ALPHA SYS_FUNC(osf_utimes) {