]>
granicus.if.org Git - strace/log
Dmitry V. Levin [Thu, 20 Jun 2019 09:49:27 +0000 (09:49 +0000)]
Introduce printnum_fd
This is going to be used to implement decoding of CLONE_PIDFD flag
of clone syscall.
* defs.h (printnum_fd): New prototype.
* util.c (printnum_fd): New function.
Dmitry V. Levin [Thu, 20 Jun 2019 09:49:27 +0000 (09:49 +0000)]
Enhance decoding of CLONE_PARENT_SETTID flag of clone syscall
* clone.c (SYS_FUNC(clone)): Print the parent_tid returned by the kernel
instead of its address when CLONE_PARENT_SETTID flag is set.
* tests/clone-flags.c (main): Check it.
Dmitry V. Levin [Thu, 20 Jun 2019 09:49:27 +0000 (09:49 +0000)]
clone: fix printing of zero clone flags
* clone.c (SYS_FUNC(clone)): Fix printing of zero clone flags.
* tests/clone-flags.c (main): Check it.
Dmitry V. Levin [Thu, 20 Jun 2019 09:49:27 +0000 (09:49 +0000)]
clone: print read-only arguments on entering syscall
* clone.c (SYS_FUNC(clone)): Print child_stack, stack_size, and flags
arguments on entering syscall.
* NEWS: Mention this change.
Dmitry V. Levin [Thu, 20 Jun 2019 09:49:27 +0000 (09:49 +0000)]
tests: check decoding of clone flags
* tests/clone-flags.c: New file.
* tests/pure_executables.list: Add clone-flags.
* tests/.gitignore: Likewise.
* tests/clone-flags.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add clone-flags.test.
Dmitry V. Levin [Tue, 18 Jun 2019 12:03:35 +0000 (12:03 +0000)]
clone: cleanup
* clone.c (print_tls_arg): Use addr argument.
Dmitry V. Levin [Tue, 18 Jun 2019 12:03:35 +0000 (12:03 +0000)]
xlat: update CLONE_* constants
* xlat/clone_flags.in (CLONE_IDLETASK): Remove unused flag conflicting
with CLONE_PIDFD.
Fixes: v5.1-8-gb43f44bca "xlat: update CLONE_* constants"
Paul Chaignon [Fri, 14 Jun 2019 17:34:57 +0000 (19:34 +0200)]
Use debug_msg macro where possible
* linux/alpha/get_scno.c (arch_get_scno): Use debug_msg instead of
open-coding it.
* linux/mips/get_scno.c: Likewise.
* linux/sh/get_scno.c: Likewise.
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Dmitry V. Levin [Mon, 27 May 2019 21:25:52 +0000 (21:25 +0000)]
xlat: update ETH_* constants
* xlat/ethernet_protocols.in (ETH_P_DSA_8021Q): New constant introduced
by Linux kernel commit v5.2-rc1~133^2~58^2~7.
* NEWS: Mention this.
Dmitry V. Levin [Mon, 27 May 2019 21:25:52 +0000 (21:25 +0000)]
xlat: update KBD_* constants
* xlat/evdev_keycode.in (KEY_KBD_LAYOUT_NEXT): New constant
introduced by Linux kernel commit v5.2-rc1~79^2^2~7.
* NEWS: Mention this.
Dmitry V. Levin [Mon, 27 May 2019 21:25:52 +0000 (21:25 +0000)]
xlat: update TIPC_* constants
* xlat/sock_tipc_options.in (TIPC_SOCK_RECVQ_USED): New constant
introduced by Linux kernel commit v5.2-rc1~133^2~143.
* NEWS: Mention this.
Dmitry V. Levin [Mon, 27 May 2019 21:25:52 +0000 (21:25 +0000)]
xlat: update KVM_CAP_* constants
* xlat/clone_flags.in (KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2): New
constant introduced by Linux kernel commit v5.2-rc1~17^2~11.
(KVM_CAP_PPC_IRQ_XIVE): New constant introduced by Linux kernel commits
v5.2-rc1~17^2~2^2~19 and v5.2-rc1~17^2~2.
(KVM_CAP_ARM_SVE): New constant introduced by Linux kernel commit
v5.2-rc1~17^2~1^2~31.
(KVM_CAP_ARM_PTRAUTH_ADDRESS, KVM_CAP_ARM_PTRAUTH_GENERIC): New
constants introduced by Linux kernel commits v5.2-rc1~17^2~1^2~10
and v5.2-rc1~17^2~1.
* NEWS: Mention this.
Dmitry V. Levin [Mon, 27 May 2019 21:25:52 +0000 (21:25 +0000)]
xlat: update CLONE_* constants
* xlat/clone_flags.in (CLONE_PIDFD): New constant introduced by Linux
kernel commit v5.2-rc1~158^2~2.
* NEWS: Mention this.
Dmitry V. Levin [Sun, 26 May 2019 22:08:55 +0000 (22:08 +0000)]
xlat: update V4L2_PIX_* constants
* xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_FWHT_STATELESS): New constant
introduced by Linux kernel commit v5.2-rc1~33^2~132.
(V4L2_PIX_FMT_BGRA32, V4L2_PIX_FMT_BGRX32, V4L2_PIX_FMT_RGBA32,
V4L2_PIX_FMT_RGBX32): New constants introduced by Linux kernel commit
v5.2-rc1~33^2~25.
(V4L2_PIX_FMT_RGBA444, V4L2_PIX_FMT_RGBX444, V4L2_PIX_FMT_ABGR444,
V4L2_PIX_FMT_XBGR444, V4L2_PIX_FMT_XBGR444, V4L2_PIX_FMT_BGRX444): New
constants introduced by Linux kernel commit v5.2-rc1~33^2~24.
(V4L2_PIX_FMT_RGBA555, V4L2_PIX_FMT_RGBX555, V4L2_PIX_FMT_ABGR555,
V4L2_PIX_FMT_XBGR555, V4L2_PIX_FMT_BGRA555, V4L2_PIX_FMT_BGRX555): New
constants introduced by Linux kernel commit v5.2-rc1~33^2~23.
Dmitry V. Levin [Sun, 26 May 2019 22:08:55 +0000 (22:08 +0000)]
xlat: fix v4l2_pix_fmts sorting order
* xlat/v4l2_pix_fmts.in: Fix sorting order.
Dmitry V. Levin [Sun, 26 May 2019 22:08:55 +0000 (22:08 +0000)]
xlat: update V4L2_CID_* constants
* xlat/v4l2_control_ids.in (V4L2_CID_FWHT_I_FRAME_QP,
V4L2_CID_FWHT_P_FRAME_QP): New constants introduced by Linux kernel
commit v5.2-rc1~33^2~132.
(V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP,
V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP,
V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP,
V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP): New constants introduced by
Linux kernel commit v5.2-rc1~33^2~95.
* NEWS: Mention this.
Dmitry V. Levin [Sat, 25 May 2019 22:12:30 +0000 (22:12 +0000)]
xlat: update AUDIT_* constants
* xlat/nl_audit_types.in (AUDIT_FANOTIFY): New constant introduced by
Linux kernel commit v4.15-rc1~130^2^2~11.
(AUDIT_TIME_INJOFFSET): New constant introduced by Linux kernel commit
v5.2-rc1~144^2~2.
(AUDIT_TIME_ADJNTPVAL): New constant introduced by Linux kernel commit
v5.2-rc1~144^2~1.
Dmitry V. Levin [Fri, 24 May 2019 21:54:17 +0000 (21:54 +0000)]
xlat: update AUDIT_ARCH_* constants
* xlat/audit_arch.in (AUDIT_ARCH_ARCOMPACT, AUDIT_ARCH_ARCOMPACTBE,
AUDIT_ARCH_ARCV2, AUDIT_ARCH_ARCV2BE): New constants introduced by Linux
kernel commit v5.2-rc1~144^2~16.
(AUDIT_ARCH_C6X, AUDIT_ARCH_C6XBE): New constants introduced by Linux
kernel commit v5.2-rc1~144^2~15.
(AUDIT_ARCH_CSKY): New constant introduced by Linux kernel commit
v5.0-rc1~37^2~15.
(AUDIT_ARCH_H8300): New constant introduced by Linux kernel commit
v5.2-rc1~144^2~14.
(AUDIT_ARCH_HEXAGON): New constant introduced by Linux kernel commit
v5.2-rc1~144^2~12.
(AUDIT_ARCH_NDS32, AUDIT_ARCH_NDS32BE): New constants introduced by
Linux kernel commit v5.2-rc1~144^2~9.
(AUDIT_ARCH_NIOS2): New constant introduced by Linux kernel commit
v5.2-rc1~144^2~8.
(AUDIT_ARCH_RISCV32, AUDIT_ARCH_RISCV64): New constants introduced by
Linux kernel commit v5.0-rc2~23^2~1^2~5.
(AUDIT_ARCH_TILEGX, AUDIT_ARCH_TILEGX32, AUDIT_ARCH_TILEPRO): New
constants introduced by Linux kernel commit v4.3-rc1~83^2~3.
(AUDIT_ARCH_UNICORE): New constant introduced by Linux kernel commit
v5.2-rc1~144^2~6.
(AUDIT_ARCH_XTENSA): New constant introduced by Linux kernel commit
v5.0-rc1~92^2~8.
* NEWS: Mention this.
Masatake YAMATO [Thu, 23 May 2019 03:17:17 +0000 (12:17 +0900)]
tests: print the reason of failure in ioctl_kvm_run tests
* tests/ioctl_kvm_run_common.c (run_kvm): Print
hardware_entry_failure_reason field of kvm_run
when KVM_RUN is failed with KVM_EXIT_FAIL_ENTRY.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Dmitry V. Levin [Thu, 23 May 2019 01:02:03 +0000 (01:02 +0000)]
Post-release administrivia
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 5.1-1.
* strace.spec.in: Likewise.
Dmitry V. Levin [Wed, 22 May 2019 11:12:13 +0000 (11:12 +0000)]
Prepare for 5.1 release
* NEWS: Update for 5.1 release.
Dmitry V. Levin [Wed, 22 May 2019 11:05:13 +0000 (11:05 +0000)]
Update copyright headers
Headers updated automatically using maint/update_copyright_years.sh
script.
Eugene Syromyatnikov [Fri, 22 Feb 2019 17:41:31 +0000 (18:41 +0100)]
Use xzalloc(sz) instead of xcalloc(1, sz)
* bpf.c (BEGIN_BPF_CMD_DECODER(BPF_OBJ_GET_INFO_BY_FD)): Use xzalloc
instead of xcalloc of one-item-sized array.
* kvm.c (vcpu_alloc): Likewise.
* perf.c (fetch_perf_event_attr): Likewise.
* syscall.c (ptrace_get_scno): Likewise.
Eugene Syromyatnikov [Fri, 22 Feb 2019 17:34:33 +0000 (18:34 +0100)]
xmalloc: introduce xzalloc
* xmalloc.h (xmalloc, xcalloc, xreallocarray): Document.
(xzalloc): New function, a thin wrapper around xcalloc with xmalloc
interface.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Eugene Syromyatnikov [Thu, 21 Feb 2019 15:49:35 +0000 (16:49 +0100)]
Rename the stat struct used internally by strace to strace_stat_t
* largefile_wrappers.h (struct_stat): Rename to strace_stat_t.
* strace.c (startup_child): Rename struct_stat to strace_stat_t.
* util.c (printdev): Likewise.
Eugene Syromyatnikov [Thu, 21 Feb 2019 15:48:44 +0000 (16:48 +0100)]
Move open_file to largefile_wrappers.h
* util.c (open_file): Move it ...
* largefile_wrappers.h: ... here.
Dmitry V. Levin [Tue, 21 May 2019 23:30:35 +0000 (23:30 +0000)]
tests: robustify bpf-obj_get_info_by_fd test against future kernels
* tests/bpf-obj_get_info_by_fd.c (print_prog_load, main): Change
log_level from 42 to 7, to placate Linux kernels containing commit
v5.2-rc1~133^2~193^2~18^2~9.
Dmitry V. Levin [Tue, 21 May 2019 23:30:35 +0000 (23:30 +0000)]
bpf: add support for new fields in struct bpf_prog_info
* bpf_attr.h (struct bpf_prog_info_struct): Add run_time_ns and run_cnt
fields.
* bpf.c (print_bpf_prog_info): Decode run_time_ns and run_cnt fields
introduced by Linux kernel commit v5.1-rc1~178^2~17^2~15^2~2.
* NEWS: Mention it.
* tests/bpf-obj_get_info_by_fd.c (main): Update expected output.
Dmitry V. Levin [Tue, 21 May 2019 23:30:35 +0000 (23:30 +0000)]
xlat: update FAN_* constants
* xlat/fan_mark_flags.in (FAN_MARK_FILESYSTEM): New constant
introduced by Linux kernel commit v4.20-rc1~75^2~10.
* tests/fanotify_mark.c (main): Update expected output.
Dmitry V. Levin [Tue, 21 May 2019 21:26:52 +0000 (21:26 +0000)]
xlat: update IPV6_* constants
* xlat/sock_ipv6_options.in (IPV6_MULTICAST_ALL): New constant
introduced by Linux kernel commit v4.20-rc1~14^2~384.
(IPV6_ROUTER_ALERT_ISOLATE): New constant introduced
by Linux kernel commit v5.1-rc1~178^2~22.
* NEWS: Mention this.
Dmitry V. Levin [Tue, 21 May 2019 21:26:52 +0000 (21:26 +0000)]
xlat: update F_SEAL_* constants
* xlat/f_seals.in (F_SEAL_FUTURE_WRITE): New constant introduced
by Linux kernel commit v5.1-rc1~152^2~49.
* NEWS: Mention this.
Dmitry V. Levin [Tue, 21 May 2019 14:53:06 +0000 (14:53 +0000)]
btrfs: implement decoding of BTRFS_IOC_FORGET_DEV argument
... introduced by Linux kernel commit v5.1-rc1~47^2~47.
* btrfs.c (btrfs_ioctl) [BTRFS_IOC_FORGET_DEV]: Handle
BTRFS_IOC_FORGET_DEV.
* tests/btrfs.c (btrfs_test_device_ioctls) [BTRFS_IOC_FORGET_DEV]:
Check it.
Gleb Fotengauer-Malinovskiy [Wed, 8 May 2019 13:28:24 +0000 (16:28 +0300)]
Update ioctl entries from linux v5.1
* linux/32/ioctls_inc_align16.h: Update from linux v5.1
using ioctls_gen.sh.
* linux/32/ioctls_inc_align32.h: Likewise.
* linux/32/ioctls_inc_align64.h: Likewise.
* linux/64/ioctls_inc.h: Likewise.
* linux/x32/ioctls_inc0.h: Likewise.
* NEWS: Mention this.
* tests/ioctl_random.c (main): Update expected output.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Dmitry V. Levin [Mon, 20 May 2019 22:50:44 +0000 (22:50 +0000)]
xlat: update FAN_* constants
* xlat/fan_init_flags.in (FAN_REPORT_FID): New constant introduced
by Linux kernel commit v5.1-rc1~139^2~18.
* xlat/fan_event_flags.in (FAN_ATTRIB, FAN_MOVED_FROM, FAN_MOVED_TO,
FAN_CREATE, FAN_DELETE, FAN_DELETE_SELF, FAN_MOVE_SELF): New constants
introduced by Linux kernel commit v5.1-rc1~139^2~9.
* NEWS: Mention this.
* tests/fanotify_init.c (main): Update expected output.
* tests/fanotify_mark.c (main): Likewise.
Dmitry V. Levin [Mon, 20 May 2019 22:50:44 +0000 (22:50 +0000)]
xlat: update PR_SPEC_* constants
* xlat/pr_spec_get_store_bypass_flags.in (PR_SPEC_DISABLE_NOEXEC):
New constant introduced by Linux kernel commit v5.1-rc1~168^2.
* xlat/pr_spec_set_store_bypass_flags.in: Likewise.
* NEWS: Mention this.
* tests/prctl-spec-inject.c (get_strs, set_strs): Update.
Dmitry V. Levin [Mon, 20 May 2019 22:50:44 +0000 (22:50 +0000)]
xlat: update BPF_* constants
* xlat/ebpf_class.in (BPF_JMP32): New constant introduced
by Linux kernel commit v5.1-rc1~178^2~404^2~4^2~15.
* xlat/bpf_map_update_elem_flags.in (BPF_F_LOCK): New constant
introduced by Linux kernel commit v5.1-rc1~178^2~375^2~4^2~3.
* NEWS: Mention this.
Dmitry V. Levin [Mon, 20 May 2019 22:50:44 +0000 (22:50 +0000)]
xlat: update V4L2_* constants
* xlat/v4l2_control_ids.in
(V4L2_CID_MPEG_VIDEO_H264_CONSTRAINED_INTRA_PREDICTION): New constant
introduced by Linux kernel commit v5.1-rc1~88^2~261.
(V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET): New constant
introduced by Linux kernel commit v5.1-rc1~88^2~260.
* xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_AYUV32, V4L2_PIX_FMT_XYUV32,
V4L2_PIX_FMT_VUYA32, V4L2_PIX_FMT_VUYX32): New constants
introduced by Linux kernel commit v5.1-rc1~88^2~90.
* NEWS: Mention this.
Dmitry V. Levin [Mon, 20 May 2019 22:50:44 +0000 (22:50 +0000)]
xlat: update NT_* constants
* xlat/nt_descriptor_types.in (NT_ARM_PACA_KEYS, NT_ARM_PACG_KEYS): New
constants introduced by Linux kernel commit v5.1-rc1~82^2~44.
* NEWS: Mention this.
Dmitry V. Levin [Sun, 19 May 2019 23:35:20 +0000 (23:35 +0000)]
Implement decoding of io_uring_* syscalls
... introduced by Linux kernel commits v5.1-rc1~99^2~14,
v5.1-rc1~99^2~7, and v5.1-rc7~24^2.
* configure.ac (AC_CHECK_HEADERS): Add linux/io_uring.h.
* io_uring.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* pathtrace.c (pathtrace_match_set): Add SEN_io_uring_enter,
SEN_io_uring_register, and SEN_io_uring_setup.
* xlat/uring_enter_flags.in: New file.
* xlat/uring_register_opcodes.in: Likewise.
* linux/32/syscallent.h [425, 426, 427]: Wire up io_uring_setup,
io_uring_enter, and io_uring_register.
* linux/64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h [535, 536, 537]: Likewise.
* linux/ia64/syscallent.h [1024 + 425, 1024 + 426, 1024 + 427]: Likewise.
* linux/mips/syscallent-n32.h [6425, 6426, 6427]: Likewise.
* linux/mips/syscallent-n64.h [5425, 5426, 5427]: Likewise.
* linux/mips/syscallent-o32.h [4425, 4426, 4427]: Likewise.
* NEWS: Mention this change.
* tests/io_uring_enter.c: New file.
* tests/io_uring_register.c: Likewise.
* tests/io_uring_setup.c: Likewise.
* tests/gen_tests.in (io_uring_enter, io_uring_register,
io_uring_setup): New entries.
* tests/pure_executables.list: Add io_uring_enter, io_uring_register,
and io_uring_setup.
* tests/.gitignore: Likewise.
Dmitry V. Levin [Sat, 18 May 2019 22:26:06 +0000 (22:26 +0000)]
Implement decoding of pidfd_send_signal syscall
... introduced by Linux kernel commit v5.1-rc1~6^2~1.
* signal.c (SYS_FUNC(pidfd_send_signal)): New function.
* linux/32/syscallent.h [424]: Wire up pidfd_send_signal.
* linux/64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h [534]: Likewise.
* linux/ia64/syscallent.h [1024 + 424]: Likewise.
* linux/mips/syscallent-n32.h [6424]: Likewise.
* linux/mips/syscallent-n64.h [5424]: Likewise.
* linux/mips/syscallent-o32.h [4424]: Likewise.
* NEWS: Mention this change.
* tests/pidfd_send_signal.c: New file.
* tests/gen_tests.in (pidfd_send_signal): New entry.
* tests/pure_executables.list: Add pidfd_send_signal.
* tests/.gitignore: Likewise.
Dmitry V. Levin [Fri, 17 May 2019 16:16:29 +0000 (16:16 +0000)]
tests: check decoding of SO_TIMESTAMP*_NEW control messages
* configure.ac (AC_CHECK_TYPES): Check for struct __kernel_timespec
and struct __kernel_sock_timeval.
* tests/msg_control.c [HAVE_STRUCT___KERNEL_SOCK_TIMEVAL ||
HAVE_STRUCT___KERNEL_TIMESPEC]: Include <linux/time_types.h>.
(test_scm_timestamp): Rename to test_scm_timestamp_old.
(test_scm_timestampns): Rename to test_scm_timestampns_old.
(test_scm_timestamping): Rename to test_scm_timestamping_old.
[HAVE_STRUCT___KERNEL_SOCK_TIMEVAL] (test_scm_timestamp_new): New
function.
[HAVE_STRUCT___KERNEL_TIMESPEC] (test_scm_timestampns_new,
test_scm_timestamping_new): New functions.
(test_sol_socket): Use them.
* tests/sockopt-timestamp.c [HAVE_STRUCT___KERNEL_SOCK_TIMEVAL ||
HAVE_STRUCT___KERNEL_TIMESPEC]: Include <linux/time_types.h>.
Include "xlat/sock_options.h" in XLAT_MACROS_ONLY mode.
(print_timestampns_old): Define unconditionally.
[HAVE_STRUCT___KERNEL_SOCK_TIMEVAL] (print_timestamp_new): New function.
[HAVE_STRUCT___KERNEL_TIMESPEC] (print_timestampns_new): Likewise.
(main): Test SO_TIMESTAMPNS_OLD unconditionally.
[HAVE_STRUCT___KERNEL_SOCK_TIMEVAL]: Test SO_TIMESTAMP_NEW.
[HAVE_STRUCT___KERNEL_TIMESPEC]: Test SO_TIMESTAMPNS_NEW.
Dmitry V. Levin [Fri, 17 May 2019 16:16:29 +0000 (16:16 +0000)]
Implement decoding of SO_TIMESTAMP*_NEW control messages
* print_timeval64.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (print_timeval64_data_size): New prototype.
* msghdr.c (print_scm_timestamp_new, print_scm_timestampns_new,
print_scm_timestamping_new): New functions.
(cmsg_socket_printers): Add SO_TIMESTAMP_NEW, SO_TIMESTAMPNS_NEW,
and SO_TIMESTAMPING_NEW.
* NEWS: Mention this change.
Dmitry V. Levin [Fri, 17 May 2019 16:16:29 +0000 (16:16 +0000)]
print_timespec.h: parametrize TIMESPEC_T.tv_nsec
This is going to be used to implement a parser of SO_TIMESTAMP_NEW
control message.
* print_timespec.h [!TIMESPEC_NSEC] (TIMESPEC_NSEC): Define to tv_sec.
(TIMESPEC_TO_SEC_NSEC, timespec_fmt, print_timespec_t_utime): Use
TIMESPEC_NSEC instead of tv_sec.
Dmitry V. Levin [Fri, 17 May 2019 16:16:29 +0000 (16:16 +0000)]
print_timespec.h: conditionalize printers
This allows to implement a parser of SO_TIMESTAMP_NEW control message
without implementing extra unused printers.
* print_timespec.h (PRINT_TIMESPEC_DATA_SIZE,
PRINT_TIMESPEC_ARRAY_DATA_SIZE, PRINT_TIMESPEC, SPRINT_TIMESPEC,
PRINT_TIMESPEC_UTIME_PAIR, PRINT_ITIMERSPEC): Conditionalize.
Dmitry V. Levin [Fri, 17 May 2019 16:16:29 +0000 (16:16 +0000)]
xlat: add SO_TIMESTAMP*_NEW constants
* xlat/sock_options.in (SO_TIMESTAMP_NEW, SO_TIMESTAMPNS_NEW,
SO_TIMESTAMPING_NEW): New constants introduced by Linux commits
v5.1-rc1~178^2~363^2~4 and v5.1-rc1~178^2~363^2~3.
* xlat/scmvals.in: Likewise.
Dmitry V. Levin [Thu, 16 May 2019 22:46:26 +0000 (22:46 +0000)]
Use kernel_timeval64_t in definition of kernel_timex64_t
* kernel_timex.h: Include "kernel_timeval.h".
(kernel_timex64_t): Change the type of "time" field from a locally
defined structure to its equivalent kernel_timeval64_t.
Dmitry V. Levin [Thu, 16 May 2019 22:46:26 +0000 (22:46 +0000)]
Introduce kernel_timeval64_t type
This type is going to be used to implement parsers of SO_TIMESTAMP*_NEW
control messages.
* kernel_timeval.h: New file.
* Makefile.am (strace_SOURCES): Add it.
Dmitry V. Levin [Wed, 15 May 2019 16:52:37 +0000 (16:52 +0000)]
xlat: add _OLD suffixes to SO_RCVTIMEO and SO_SNDTIMEO
Follow the Linux kernel commit v5.1-rc1~178^2~363^2~1 and rename
these constants.
* xlat/sock_options.in (SO_RCVTIMEO): Rename to SO_RCVTIMEO_OLD.
(SO_SNDTIMEO): Rename to SO_SNDTIMEO_OLD.
Dmitry V. Levin [Wed, 15 May 2019 16:52:37 +0000 (16:52 +0000)]
Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD
Follow the Linux kernel commit v5.1-rc1~178^2~363^2~8 and rename
these constants everywhere.
* xlat/scmvals.in (SO_TIMESTAMP): Rename to SO_TIMESTAMP_OLD.
(SO_TIMESTAMPNS): Rename to SO_TIMESTAMPNS_OLD.
(SO_TIMESTAMPING): Rename to SO_TIMESTAMPING_OLD.
* xlat/sock_options.in: Likewise.
* xlat/sock_rds_options.in: Likewise.
* msghdr.c (cmsg_socket_printers): Likewise.
(print_scm_timestamp): Rename to print_scm_timestamp_old.
(print_scm_timestampns): Rename to print_scm_timestampns_old.
(print_scm_timestamping): Rename to print_scm_timestamping_old.
* tests/msg_control.c (test_scm_timestamp): Rename SO_TIMESTAMP
to SO_TIMESTAMP_OLD.
(test_scm_timestampns): Rename SO_TIMESTAMPNS to SO_TIMESTAMPNS_OLD.
(test_scm_timestamping): Rename SO_TIMESTAMPING to SO_TIMESTAMPING_OLD.
* tests/sockopt-timestamp.c (main): Rename SO_TIMESTAMP and
SO_TIMESTAMPNS to SO_TIMESTAMP_OLD and SO_TIMESTAMPNS_OLD, respectively.
Dmitry V. Levin [Wed, 15 May 2019 16:52:37 +0000 (16:52 +0000)]
Replace SCM_TIMESTAMP* constants with SO_TIMESTAMP*
Besides the fact that SO_TIMESTAMP* constants appear to be more
standardized than SCM_TIMESTAMP*, new SO_TIMESTAMP*_OLD and
SO_TIMESTAMP*_NEW constants introduced in Linux 5.1 have no
SCM_TIMESTAMP*_OLD and SCM_TIMESTAMP*_NEW analogues.
* xlat/scmvals.in: Replace SCM_WIFI_STATUS, SCM_TXTIME, SCM_TIMESTAMP,
SCM_TIMESTAMPNS, and SCM_TIMESTAMPING with SO_WIFI_STATUS, SO_TXTIME,
SO_TIMESTAMP, SO_TIMESTAMPNS, and SO_TIMESTAMPING, respectively.
* msghdr.c: Include "xlat/sock_options.h" in XLAT_MACROS_ONLY mode.
(cmsg_socket_printers): Replace SCM_TIMESTAMP, SCM_TIMESTAMPNS, and
SCM_TIMESTAMPING with SO_TIMESTAMP, SO_TIMESTAMPNS, and SO_TIMESTAMPING,
respectively.
* tests/msg_control.c: Include "xlat/sock_options.h" in XLAT_MACROS_ONLY
mode.
(test_scm_timestamp): Replace SCM_TIMESTAMP with SO_TIMESTAMP.
(test_scm_timestampns): Replace SCM_TIMESTAMPNS with SO_TIMESTAMPNS.
(test_scm_timestamping): Replace SCM_TIMESTAMPING with SO_TIMESTAMPING.
* tests/sockopt-timestamp.c (main): Replace SCM_TIMESTAMP and
SCM_TIMESTAMPNS with SO_TIMESTAMP and SO_TIMESTAMPNS, respectively.
Dmitry V. Levin [Wed, 15 May 2019 16:52:37 +0000 (16:52 +0000)]
tests: add another test of SO_TIMESTAMP and SO_TIMESTAMPNS decoding
Unlike msg_control test, this new test makes the kernel generate
SO_TIMESTAMP and SO_TIMESTAMPNS messages.
* tests/sockopt-timestamp.c: New file.
* tests/gen_tests.in (sockopt-timestamp): New entry.
* tests/pure_executables.list: Add sockopt-timestamp.
* tests/.gitignore: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
print_timespec.c: remove unused printers
* print_timespec.c (PRINT_TIMESPEC, SPRINT_TIMESPEC,
PRINT_TIMESPEC_UTIME_PAIR, PRINT_ITIMERSPEC): Remove.
(print_timespec, sprint_timespec, print_timespec_utime_pair,
print_itimerspec): Remove.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of utimensat syscall
* utimes.c (SYS_FUNC(utimensat)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(utimensat_time32)): New function.
* pathtrace.c (pathtrace_match_set): Replace SEN_utimensat with
SEN_utimensat_time32.
* linux/64/syscallent.h: Replace SEN(utimensat) with
SEN(utimensat_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(utimensat) with
SEN(utimensat_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of timerfd_gettime and timerfd_settime syscalls
* time.c (SYS_FUNC(timerfd_gettime), SYS_FUNC(timerfd_settime)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(timerfd_gettime32),
SYS_FUNC(timerfd_settime32)): New functions.
* pathtrace.c (pathtrace_match_set): Replace SEN_timerfd_gettime and
SEN_timerfd_settime with SEN_timerfd_gettime32 and
SEN_timerfd_settime32, respectively.
* linux/64/syscallent.h: Replace SEN(timerfd_gettime) and
SEN(timerfd_settime) with SEN(timerfd_gettime64) and
SEN(timerfd_settime64), respectively.
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(timerfd_gettime) and
SEN(timerfd_settime) with SEN(timerfd_gettime32) and
SEN(timerfd_settime32), respectively.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of timer_gettime and timer_settime syscalls
* time.c (SYS_FUNC(timer_gettime), SYS_FUNC(timer_settime)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(timer_gettime32),
SYS_FUNC(timer_settime32)): New functions.
* linux/64/syscallent.h: Replace SEN(timer_gettime) and
SEN(timer_settime) with SEN(timer_gettime64) and SEN(timer_settime64),
respectively.
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(timer_gettime) and
SEN(timer_settime) with SEN(timer_gettime32) and SEN(timer_settime32),
respectively.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of nanosleep syscall
* time.c (SYS_FUNC(nanosleep)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS]
(do_nanosleep): New function.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(nanosleep_time32)): Likewise.
[HAVE_ARCH_OLD_TIME64_SYSCALLS] (SYS_FUNC(nanosleep_time64)): Likewise.
* linux/64/syscallent.h: Replace SEN(nanosleep) with
SEN(nanosleep_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(nanosleep) with
SEN(nanosleep_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of clock_nanosleep syscall
* time.c (SYS_FUNC(clock_nanosleep)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(clock_nanosleep_time32)): New
function.
* linux/64/syscallent.h: Replace SEN(clock_nanosleep) with
SEN(clock_nanosleep_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(clock_nanosleep) with
SEN(clock_nanosleep_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of clock_gettime and clock_settime syscalls
* time.c (SYS_FUNC(clock_gettime), SYS_FUNC(clock_settime)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(clock_gettime32),
SYS_FUNC(clock_settime32)): New functions.
* linux/dummy.h (sys_clock_getres): Remove.
(sys_clock_getres_time32): Redirect to sys_clock_gettime32.
* linux/64/syscallent.h: Replace SEN(clock_gettime), SEN(clock_settime),
and SEN(clock_getres) with SEN(clock_gettime64), SEN(clock_settime64),
and SEN(clock_getres_time64), respectively.
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(clock_gettime), SEN(clock_settime),
and SEN(clock_getres) with SEN(clock_gettime32), SEN(clock_settime32),
and SEN(clock_getres_time32), respectively.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of mq_timedsend and mq_timedreceive syscalls
* mq.c (SYS_FUNC(mq_timedsend), SYS_FUNC(mq_timedreceive)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(mq_timedsend_time32),
SYS_FUNC(mq_timedreceive_time32)): New functions.
* pathtrace.c (pathtrace_match_set): Replace SEN_mq_timedsend and
SEN_mq_timedreceive with SEN_mq_timedsend_time32 and
SEN_mq_timedreceive_time32, respectively.
* syscall.c (dumpio): Likewise.
* linux/64/syscallent.h: Replace SEN(mq_timedsend) and
SEN(mq_timedreceive) with SEN(mq_timedsend_time64) and
SEN(mq_timedreceive_time64), respectively.
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(mq_timedsend) and
SEN(mq_timedreceive) with SEN(mq_timedsend_time32) and
SEN(mq_timedreceive_time32), respectively.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of rt_sigtimedwait syscall
* signal.c (SYS_FUNC(rt_sigtimedwait)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(rt_sigtimedwait_time32)): New
function.
* linux/64/syscallent.h: Replace SEN(rt_sigtimedwait) with
SEN(ppoll_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(rt_sigtimedwait) with
SEN(ppoll_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of sched_rr_get_interval syscall
* sched.c (SYS_FUNC(sched_rr_get_interval)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(sched_rr_get_interval_time32)):
New function.
* linux/64/syscallent.h: Replace SEN(sched_rr_get_interval) with
SEN(sched_rr_get_interval_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(sched_rr_get_interval) with
SEN(sched_rr_get_interval_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of poll syscall
* poll.c (SYS_FUNC(poll)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS] (do_poll):
New function.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(poll_time32)): Likewise.
[HAVE_ARCH_OLD_TIME64_SYSCALLS] (SYS_FUNC(poll_time64)): Likewise.
* pathtrace.c (pathtrace_match_set): Replace SEN_poll with
SEN_poll_time32 and SEN_poll_time64.
* linux/aarch64/syscallent.h: Replace SEN(poll) with SEN(poll_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Replace SEN(poll) with SEN(poll_time32).
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of ppoll syscall
* poll.c (SYS_FUNC(ppoll)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(ppoll_time32)): New function.
* pathtrace.c (pathtrace_match_set): Replace SEN_ppoll with
SEN_ppoll_time32.
* linux/64/syscallent.h: Replace SEN(ppoll) with SEN(ppoll_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(ppoll) with SEN(ppoll_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of recvmmsg syscall
* mmsghdr.c (SYS_FUNC(recvmmsg)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(recvmmsg_time32)): New function.
* syscall.c (dumpio): Handle SEN_recvmmsg_time32.
* linux/subcall32.h (sys_recvmmsg): Redirect to sys_recvmmsg_time32.
* linux/subcall64.h (sys_recvmmsg): Redirect to sys_recvmmsg_time64.
* linux/64/syscallent.h: Replace SEN(recvmmsg) with SEN(recvmmsg_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(recvmmsg) with SEN(recvmmsg_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of semtimedop syscall
* ipc_sem.c (SYS_FUNC(semtimedop)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(semtimedop_time32)): New function.
* linux/subcall32.h (sys_semtimedop): Redirect to sys_semtimedop_time32.
* linux/subcall64.h (sys_semtimedop): Redirect to sys_semtimedop_time64.
* linux/64/syscallent.h: Replace SEN(semtimedop) with
SEN(semtimedop_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(semtimedop) with
SEN(semtimedop_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Introduce subcall32.h and subcall64.h wrappers
They are going to be used to implement new parsers for indirect
time-related syscalls.
* linux/subcall32.h: New file.
* linux/subcall64.h: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* linux/arm/syscallent.h: Replace "subcall.h" with "subcall32.h".
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Replace "subcall.h" with "subcall64.h".
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of futex syscall
* futex.c (SYS_FUNC(futex)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(futex_time32)): New function.
* linux/64/syscallent.h: Replace SEN(futex) with SEN(futex_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(futex) with SEN(futex_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of pselect6 syscall
* desc.c (SYS_FUNC(pselect6)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(pselect6_time32)): New function.
* pathtrace.c (pathtrace_match_set): Replace SEN_pselect6 with
SEN_pselect6_time32.
* linux/64/syscallent.h: Replace SEN(pselect6) with
SEN(pselect6_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(pselect6) with
SEN(pselect6_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of io_pgetevents syscall
* aio.c (SYS_FUNC(io_pgetevents)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(io_pgetevents_time32)): New
function.
* linux/64/syscallent.h: Replace SEN(io_pgetevents) with
SEN(io_pgetevents_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(io_pgetevents) with
SEN(io_pgetevents_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)]
Implement and use new parsers of io_getevents syscall
* aio.c (SYS_FUNC(io_getevents)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(io_getevents_time32)): New
function.
[HAVE_ARCH_OLD_TIME64_SYSCALLS] (SYS_FUNC(io_getevents_time64)):
Likewise.
* linux/64/syscallent.h: Replace SEN(io_getevents) with
SEN(io_getevents_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(io_getevents) with
SEN(io_getevents_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
Dmitry V. Levin [Sat, 11 May 2019 22:35:56 +0000 (22:35 +0000)]
Wire up *time64 system calls
* linux/32/syscallent.h [403...423]: Wire up clock_gettime64,
clock_settime64, clock_adjtime64, clock_getres_time64,
clock_nanosleep_time64, timer_gettime64, timer_settime64,
timerfd_gettime64, timerfd_settime64, utimensat_time64, pselect6_time64,
ppoll_time64, io_pgetevents_time64, recvmmsg_time64,
mq_timedsend_time64, mq_timedreceive_time64, semtimedop_time64,
rt_sigtimedwait_time64, futex_time64, and sched_rr_get_interval_time64
introduced by linux commit v5.1-rc1~160^2~2^2.
* linux/arm/syscallent.h [403...423]: Likewise.
* linux/hppa/syscallent.h [403...423]: Likewise.
* linux/i386/syscallent.h [403...423]: Likewise.
* linux/m68k/syscallent.h [403...423]: Likewise.
* linux/microblaze/syscallent.h [403...423]: Likewise.
* linux/mips/syscallent-n32.h [6403...6423]: Likewise.
* linux/mips/syscallent-o32.h [4403...4423]: Likewise.
* linux/powerpc/syscallent.h [403...423]: Likewise.
* linux/s390/syscallent.h [403...423]: Likewise.
* linux/sh/syscallent.h [403...423]: Likewise.
* linux/sparc/syscallent.h [403...423]: Likewise.
* linux/xtensa/syscallent.h [403...423]: Likewise.
* linux/64/syscallent.h: Add a comment about syscall numbers
reserved to sync up with other architectures.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* pathtrace.c (pathtrace_match_set): Handle SEN_utimensat_time64,
SEN_pselect6_time64, SEN_ppoll_time64, SEN_mq_timedreceive_time64,
SEN_mq_timedsend_time64, SEN_timerfd_gettime64, and
SEN_timerfd_settime64.
* syscall.c (dumpio): Handle SEN_mq_timedsend_time64,
SEN_mq_timedreceive_time64, and SEN_recvmmsg_time64.
* NEWS: Mention this.
Dmitry V. Levin [Sat, 11 May 2019 22:35:56 +0000 (22:35 +0000)]
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.
Dmitry V. Levin [Sat, 11 May 2019 22:35:56 +0000 (22:35 +0000)]
Use new parsers of adjtimex and clock_adjtime syscalls
* print_timex.c (struct_timex, print_timex): Remove.
* time.c (SYS_FUNC(adjtimex), SYS_FUNC(clock_adjtime)): Remove.
* linux/alpha/syscallent.h [303]: Replace SEN(adjtimex)
with SEN(adjtimex32).
[366]: Replace SEN(adjtimex) with SEN(adjtimex64).
[499]: Replace SEN(clock_adjtime) with SEN(clock_adjtime64).
* linux/32/syscallent.h: Replace SEN(adjtimex) and SEN(clock_adjtime)
with SEN(adjtimex32) and SEN(clock_adjtime32), respectively.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/64/syscallent.h: Replace SEN(adjtimex) and SEN(clock_adjtime)
with SEN(adjtimex64) and SEN(clock_adjtime64), respectively.
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* tests/adjtimex.c: Include <stddef.h>.
(main): Print struct timex.tai unconditionally.
Dmitry V. Levin [Sat, 11 May 2019 22:35:56 +0000 (22:35 +0000)]
Implement parsers of 64-bit adjtimex and clock_adjtime syscalls
* time.c (SYS_FUNC(clock_adjtime64)): New function.
[SPARC64] (SYS_FUNC(clock_sparc64_adjtime)): Likewise.
[HAVE_ARCH_OLD_TIME64_SYSCALLS] (SYS_FUNC(adjtimex64)): Likewise.
Dmitry V. Levin [Sat, 11 May 2019 22:35:56 +0000 (22:35 +0000)]
Implement parsers of 32-bit adjtimex and clock_adjtime syscalls
* time.c [HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(adjtimex32),
SYS_FUNC(clock_adjtime32)): New functions.
Dmitry V. Levin [Fri, 10 May 2019 22:27:59 +0000 (22:27 +0000)]
sparc64: implement printer for sparc64-specific struct timex
According to Linux kernel commit v5.1-rc1~160^2~2^2~8, sparc64 is the
only architecture on Linux that has a 'timeval' definition with a 32-bit
tv_usec but a 64-bit tv_sec.
* defs.h [SPARC64] (print_sparc64_timex): New prototype.
* kernel_timex.h [SPARC64] (kernel_sparc64_timex_t): New type.
* print_timex.c [SPARC64] (print_sparc64_timex): New function.
Dmitry V. Levin [Fri, 10 May 2019 22:27:59 +0000 (22:27 +0000)]
Implement printer for kernel_timex64_t
This is going to be used to implement clock_adjtime64 parser.
* defs.h (kernel_timex64_t): New prototype.
* print_timex.c (print_timex64): New function.
Dmitry V. Levin [Fri, 10 May 2019 22:27:59 +0000 (22:27 +0000)]
Implement printer for kernel_timex32_t
This is going to be used to re-implement parsers of syscalls that deal
with 32-bit struct timex.
* print_timex.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (print_timex32): New prototype.
* print_timex.c: Include "kernel_timex.h".
[HAVE_ARCH_TIME32_SYSCALLS] (print_timex32): New function.
Dmitry V. Levin [Fri, 10 May 2019 22:27:59 +0000 (22:27 +0000)]
Introduce kernel_timex64_t
This is going to be used to implement clock_adjtime64 parser.
* kernel_timex.h (kernel_timex64_t): New type.
Dmitry V. Levin [Fri, 10 May 2019 22:27:59 +0000 (22:27 +0000)]
Introduce kernel_timex32_t
Currently existing parsers of syscalls that deal with 32-bit timex
rely upon struct timex being defined in libc and match the definition
used by the kernel. Given the upcoming y2038 changes in glibc,
this new type is going to be used instead.
* kernel_timex.h: New file.
* Makefile.am (strace_SOURCES): Add it.
Dmitry V. Levin [Thu, 9 May 2019 22:03:30 +0000 (22:03 +0000)]
Re-implement mpersified timespec printers using timespec32/timespec64 printers
* print_timespec.c (UTIME_NOW, UTIME_OMIT, TIMESPEC_TO_SEC_NSEC,
timespec_fmt, print_sec_nsec, print_timespec_t, print_timespec_t_utime):
Remove.
(TIMESPEC_IS_32BIT, PRINT_TIMESPEC_DATA_SIZE,
PRINT_TIMESPEC_ARRAY_DATA_SIZE, PRINT_TIMESPEC, SPRINT_TIMESPEC,
PRINT_TIMESPEC_UTIME_PAIR,PRINT_ITIMERSPEC): New macros.
(print_struct_timespec_data_size): Invoke PRINT_TIMESPEC_DATA_SIZE.
(print_struct_timespec_array_data_size): Invoke
PRINT_TIMESPEC_ARRAY_DATA_SIZE.
(print_timespec): Invoke PRINT_TIMESPEC.
(sprint_timespec): Invoke SPRINT_TIMESPEC.
(print_timespec_utime_pair): Invoke PRINT_TIMESPEC_UTIME_PAIR.
(print_itimerspec): Invoke PRINT_ITIMERSPEC.
Dmitry V. Levin [Thu, 9 May 2019 22:03:30 +0000 (22:03 +0000)]
Implement printers for kernel_timespec64_t
They are going to be used to re-implement parsers of syscalls that deal
with 64-bit timespec, and to implement parsers of new *time64 syscalls.
* defs.h (print_timespec64_data_size, print_timespec64_array_data_size,
print_timespec64, sprint_timespec64, print_timespec64_utime_pair,
print_itimerspec64): New prototypes.
* print_timespec64.c: New file.
* Makefile.am (strace_SOURCES): Add it.
Dmitry V. Levin [Thu, 9 May 2019 22:03:30 +0000 (22:03 +0000)]
Implement printers for kernel_timespec32_t
They are going to be used to re-implement parsers of syscalls that deal
with 32-bit timespec.
* defs.h (print_timespec32_data_size, print_timespec32_array_data_size,
print_timespec32, sprint_timespec32, print_timespec32_utime_pair,
print_itimerspec32): New prototypes.
* print_timespec.h: New file based on print_timespec.c.
* print_timespec32.c: New file.
* Makefile.am (strace_SOURCES): Add them.
Dmitry V. Levin [Thu, 9 May 2019 22:03:30 +0000 (22:03 +0000)]
print_timespec.c: introduce helper macros and functions
They are going to be used to implement printers of other timespec
flavours, e.g. kernel_timespec32_t and kernel_timespec64_t.
* print_timespec.c (TIMESPEC_TO_SEC_NSEC): New macro.
(print_timespec_t_utime, sprint_timespec): Use it.
(print_sec_nsec): New function.
(print_timespec_t): Use it.
Dmitry V. Levin [Sun, 5 May 2019 22:28:34 +0000 (22:28 +0000)]
Introduce kernel_timespec64_t type
This type ais going to be used to implement parsers of syscalls
that deal with 64-bit timespec.
* kernel_timespec.h (kernel_timespec64_t): New type.
Dmitry V. Levin [Sun, 5 May 2019 22:28:34 +0000 (22:28 +0000)]
Introduce kernel_timespec32_t type
Currently existing parsers of syscalls that deal with 32-bit timespec
rely upon struct timespec being defined in libc and match the definition
used by the kernel. Given the upcoming y2038 changes in glibc,
this new type is going to be used instead.
* kernel_timespec.h: New file.
* Makefile.am (strace_SOURCES): Add it.
Dmitry V. Levin [Sun, 5 May 2019 22:28:34 +0000 (22:28 +0000)]
Introduce ARCH_TIMESIZE
This is going to be used to implement new timespec parsers.
* linux/arch_defs_.h [!ARCH_TIMESIZE] (ARCH_TIMESIZE): Define
to SIZEOF_LONG.
* linux/x32/arch_defs_.h (ARCH_TIMESIZE): Define to 8.
Dmitry V. Levin [Sun, 5 May 2019 22:28:34 +0000 (22:28 +0000)]
Introduce HAVE_ARCH_TIME32_SYSCALLS and HAVE_ARCH_OLD_TIME64_SYSCALLS
These are going to control whether to compile parsers of 32-bit and
old 64-bit time syscalls.
* linux/arch_defs_.h [!MIN_WORDSIZE] (MIN_WORDSIZE): Define.
[!HAVE_ARCH_TIME32_SYSCALLS] (HAVE_ARCH_TIME32_SYSCALLS): Define.
[!HAVE_ARCH_OLD_TIME64_SYSCALLS] (HAVE_ARCH_OLD_TIME64_SYSCALLS):
Define.
* linux/alpha/arch_defs_.h (HAVE_ARCH_TIME32_SYSCALLS): Define.
* linux/x32/arch_defs_.h (HAVE_ARCH_OLD_TIME64_SYSCALLS): Define.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
time.c: introduce do_timerfd_gettime and do_timerfd_settime
These are going to be used to implement parsers of timerfd_gettime64
and timerfd_settime64 syscalls.
* time.c (do_timerfd_settime, do_timerfd_gettime): New functions.
((SYS_FUNC(timerfd_settime)): Turn into a thin wrapper around
do_timerfd_settime.
((SYS_FUNC(timerfd_gettime)): Turn into a thin wrapper around
do_timerfd_gettime.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
time.c: introduce do_timer_gettime and do_timer_settime
These are going to be used to implement parsers of timer_gettime64 and
timer_settime64 syscalls.
* time.c (do_timer_settime, do_timer_gettime): New functions.
((SYS_FUNC(timer_settime)): Turn into a thin wrapper around
do_timer_settime.
((SYS_FUNC(timer_gettime)): Turn into a thin wrapper around
do_timer_gettime.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
time.c: introduce do_clock_gettime, do_clock_settime, and do_clock_nanosleep
These are going to be used to implement parsers of clock_gettime64,
clock_settime64, and clock_nanosleep_time64 syscalls.
* time.c (do_clock_settime, do_clock_gettime, do_clock_nanosleep): New
functions.
((SYS_FUNC(clock_settime)): Turn into a thin wrapper around
do_clock_settime.
((SYS_FUNC(clock_gettime)): Turn into a thin wrapper around
do_clock_gettime.
((SYS_FUNC(clock_nanosleep)): Turn into a thin wrapper around
do_clock_nanosleep.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
time.c: introduce do_clock_adjtime
This is going to be used to implement a parser of clock_adjtime64
syscall.
* time.c (do_clock_adjtime): New function.
((SYS_FUNC(clock_adjtime)): Turn into a thin wrapper around
do_clock_adjtime.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
do_adjtimex: parametrize print_timex
This is going to be used to implement a parser of clock_adjtime64
syscall.
* time.c (do_adjtimex): Add print_tx argument, invoke it
instead of print_timex.
(SYS_FUNC(adjtimex), SYS_FUNC(clock_adjtime)): Pass print_timex
to do_adjtimex.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
utimes.c: introduce do_utimensat
This is going to be used to implement a parser of utimensat_time64
syscall.
* utimes.c (do_utimensat): New function.
(SYS_FUNC(utimensat)): Turn into a thin wrapper around do_utimensat.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
signal.c: introduce do_rt_sigtimedwait
This is going to be used to implement a parser of rt_sigtimedwait_time64
syscall.
* signal.c (do_rt_sigtimedwait): New function.
(SYS_FUNC(rt_sigtimedwait)): Turn into a thin wrapper around
do_rt_sigtimedwait.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
sched.c: introduce do_sched_rr_get_interval
This is going to be used to implement a parser of
sched_rr_get_interval_time64 syscall.
* sched.c (do_sched_rr_get_interval): New function.
(SYS_FUNC(sched_rr_get_interval)): Turn into a thin wrapper around
do_sched_rr_get_interval.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
poll.c: introduce do_ppoll
This is going to be used to implement a parser of ppoll_time64 syscall.
* poll.c (decode_poll_exiting): Add sprint_ts argument.
(SYS_FUNC(poll)): Pass sprint_timespec to decode_poll_exiting.
(do_ppoll): New function.
(SYS_FUNC(ppoll)): Turn into a thin wrapper around do_ppoll.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
mq.c: introduce do_mq_timedsend and do_mq_timedreceive
These are going to be used to implement parsers of mq_timedsend_time64
and mq_timedreceive_time64 syscalls.
* mq.c (do_mq_timedsend, do_mq_timedreceive): New functions.
(SYS_FUNC(mq_timedsend)): Turn into a thin wrapper around
do_mq_timedsend.
(SYS_FUNC(mq_timedreceive)): Turn into a thin wrapper around
do_mq_timedreceive.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
mmsghdr.c: introduce do_recvmmsg
This is going to be used to implement a parser of recvmmsg_time64
syscall.
* mmsghdr.c (do_recvmmsg): New function.
(SYS_FUNC(recvmmsg)): Turn into a thin wrapper around do_recvmmsg.
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
ipc_sem.c: introduce do_semtimedop
This is going to be used to implement a parser of semtimedop_time64
syscall.
* ipc_sem.c (do_semtimedop): New function.
(SYS_FUNC(semtimedop)): Turn into a thin wrapper around do_semtimedop.