]> granicus.if.org Git - strace/log
strace
5 years agoImplement decoding of fspick syscall
Dmitry V. Levin [Sat, 29 Jun 2019 17:38:25 +0000 (17:38 +0000)]
Implement decoding of fspick syscall

... introduced by Linux kernel commits v5.2-rc1~141^2~1,
v5.2-rc1~20^2~1, and v5.2-rc1~20^2.

* fspick.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* pathtrace.c (pathtrace_match_set): Add SEN_fspick.
* xlat/fspick_flags.in: New file.
* linux/syscallent-common.h [BASE_NR + 433]: Wire up fspick.
* NEWS: Mention this change.
* tests/fspick.c: New file.
* tests/fspick-P.c: Likewise.
* tests/gen_tests.in (fspick, fspick-P): New entries.
* tests/pure_executables.list: Add fspick and fspick-P.
* tests/.gitignore: Likewise.

5 years agoImplement decoding of fsmount syscall
Dmitry V. Levin [Fri, 28 Jun 2019 09:30:54 +0000 (09:30 +0000)]
Implement decoding of fsmount syscall

... introduced by Linux kernel commits v5.2-rc1~141^2~2,
v5.2-rc1~20^2~1, and v5.2-rc1~20^2.

* fsmount.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* pathtrace.c (pathtrace_match_set): Add SEN_fsmount.
* xlat/fsmount_cmds.in: New file.
* xlat/mount_attr_atime.in: Likewise.
* xlat/mount_attr_flags.in: Likewise.
* linux/syscallent-common.h [BASE_NR + 432]: Wire up fsmount.
* NEWS: Mention this change.
* tests/fsmount.c: New file.
* tests/gen_tests.in (fsmount): New entry.
* tests/pure_executables.list: Add fsmount.
* tests/.gitignore: Likewise.

5 years agoImplement decoding of fsconfig syscall
Dmitry V. Levin [Thu, 27 Jun 2019 16:51:33 +0000 (16:51 +0000)]
Implement decoding of fsconfig syscall

... introduced by Linux kernel commits v5.2-rc1~141^2~3,
v5.2-rc1~20^2~1, and v5.2-rc1~20^2.

* fsconfig.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* pathtrace.c (pathtrace_match_set): Add SEN_fsconfig.
* xlat/fsconfig_cmds.in: New file.
* linux/syscallent-common.h [BASE_NR + 431]: Wire up fsconfig.
* NEWS: Mention this change.
* tests/fsconfig.c: New file.
* tests/fsconfig-P.c: Likewise.
* tests/gen_tests.in (fsconfig, fsconfig-P): New entries.
* tests/pure_executables.list: Add fsconfig and fsconfig-P.
* tests/.gitignore: Likewise.

5 years agoprint_dirfd: do not print trailing comma
Dmitry V. Levin [Thu, 27 Jun 2019 16:51:33 +0000 (16:51 +0000)]
print_dirfd: do not print trailing comma

It was fine to print trailing comma in print_dirfd until introduction
of a syscall with the last argument being a dirfd.
Now it's time to change print_dirfd.

* open.c (print_dirfd): Do not print comma.
(SYS_FUNC(open)): Print comma after print_dirfd() invocation.
* access.c (SYS_FUNC(faccessat)): Likewise.
* chmod.c (SYS_FUNC(fchmodat)): Likewise.
* execve.c (SYS_FUNC(execveat)): Likewise.
* fanotify.c (SYS_FUNC(fanotify_mark)): Likewise.
* fchownat.c (SYS_FUNC(fchownat)): Likewise.
* file_handle.c (SYS_FUNC(name_to_handle_at)): Likewise.
* link.c (SYS_FUNC(linkat), SYS_FUNC(unlinkat), SYS_FUNC(symlinkat)):
Likewise.
* mknod.c (SYS_FUNC(mknodat)): Likewise.
* move_mount.c (SYS_FUNC(move_mount)): Likewise.
* open_tree.c (SYS_FUNC(open_tree)): Likewise.
* readlink.c (SYS_FUNC(readlinkat)): Likewise.
* renameat.c (decode_renameat): Likewise.
* stat.c (SYS_FUNC(newfstatat)): Likewise.
* stat64.c (SYS_FUNC(fstatat64)): Likewise.
* statx.c (SYS_FUNC(statx)): Likewise.
* utimes.c (SYS_FUNC(futimesat), do_utimensat): Likewise.

5 years agoImplement decoding of fsopen syscall
Dmitry V. Levin [Wed, 26 Jun 2019 08:00:39 +0000 (08:00 +0000)]
Implement decoding of fsopen syscall

... introduced by Linux kernel commits v5.2-rc1~141^2~5,
v5.2-rc1~20^2~1, and v5.2-rc1~20^2.

* fsopen.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* pathtrace.c (pathtrace_match_set): Add SEN_fsopen.
* xlat/fsopen_flags.in: New file.
* linux/syscallent-common.h [BASE_NR + 430]: Wire up fsopen.
* NEWS: Mention this change.
* tests/fsopen.c: New file.
* tests/gen_tests.in (fsopen): New entry.
* tests/pure_executables.list: Add fsopen.
* tests/.gitignore: Likewise.

5 years agoImplement decoding of move_mount syscall
Dmitry V. Levin [Tue, 25 Jun 2019 11:32:26 +0000 (11:32 +0000)]
Implement decoding of move_mount syscall

... introduced by Linux kernel commits v5.2-rc1~141^2~8,
v5.2-rc1~20^2~1, and v5.2-rc1~20^2.

* move_mount.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* pathtrace.c (pathtrace_match_set): Add SEN_move_mount.
* xlat/move_mount_flags.in: New file.
* linux/syscallent-common.h [BASE_NR + 429]: Wire up move_mount.
* NEWS: Mention this change.
* tests/move_mount.c: New file.
* tests/move_mount-P.c: Likewise.
* tests/gen_tests.in (move_mount, move_mount-P): New entries.
* tests/pure_executables.list: Add move_mount and move_mount-P.
* tests/.gitignore: Likewise.

5 years agoImplement decoding of open_tree syscall
Dmitry V. Levin [Mon, 24 Jun 2019 16:57:01 +0000 (16:57 +0000)]
Implement decoding of open_tree syscall

... introduced by Linux kernel commits v5.2-rc1~141^2~9,
v5.2-rc1~20^2~1, and v5.2-rc1~20^2.

* configure.ac (AC_CHECK_HEADERS): Add linux/mount.h.
* open_tree.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* pathtrace.c (pathtrace_match_set): Add SEN_open_tree.
* xlat/open_tree_flags.in: New file.
* linux/syscallent-common.h [BASE_NR + 428]: Wire up open_tree.
* NEWS: Mention this change.
* tests/open_tree.c: New file.
* tests/open_tree-P.c: Likewise.
* tests/gen_tests.in (open_tree, open_tree-P): New entries.
* tests/pure_executables.list: Add open_tree and open_tree-P.
* tests/.gitignore: Likewise.

5 years agoIntroduce linux/syscallent-common.h and linux/syscallent-common-32.h
Dmitry V. Levin [Wed, 26 Jun 2019 08:00:39 +0000 (08:00 +0000)]
Introduce linux/syscallent-common.h and linux/syscallent-common-32.h

These files are going to be used to define syscall entries for common
syscalls added in Linux kernel 5.1+.

* linux/syscallent-common.h: New file.
* linux/syscallent-common-32.h: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
(syscallent_names): Add syscallent-common.h and syscallent-common-32.h.
* linux/mips/.gitignore: Add syscallent-common-32-stub.h
and syscallent-common-stub.h.
* linux/mips/genstub.sh: Parametrize source directory.  Change syscall
name prefix to SYSCALL_NAME_PREFIX.
* configure.ac [MIPS]: Generate stubs for linux/syscallent-common.h
and linux/syscallent-common-32.h files.
* linux/mips/syscallent-n32.h [LINUX_MIPSN32]
[BASE_NR + 403..BASE_NR + 427]: Remove, include "syscallent-common-32.h"
and "syscallent-common.h" instead.
[!LINUX_MIPSN32] (SYSCALL_NAME_PREFIX): Define.
[!LINUX_MIPSN32]: Include "syscallent-common-32-sub.h"
and "syscallent-common-stub.h".
* linux/mips/syscallent-o32.h [LINUX_MIPSO32]
[BASE_NR + 403..BASE_NR + 427]: Remove, include "syscallent-common-32.h"
and "syscallent-common.h" instead.
[!LINUX_MIPSO32] (SYSCALL_NAME_PREFIX): Define.
[!LINUX_MIPSO32]: Include "syscallent-common-32-sub.h"
* linux/32/syscallent.h [403..427]: Remove, include
"syscallent-common-32.h" and "syscallent-common.h" instead.
* 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/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/alpha/syscallent.h (BASE_NR): Define.
[534..537]: Remove, include "syscallent-common.h" instead.
* linux/ia64/syscallent.h [BASE_NR + 424..BASE_NR + 427]: Remove,
include "syscallent-common.h" instead.
* linux/mips/syscallent-n64.h [LINUX_MIPSN64]: Likewise.
[!LINUX_MIPSN64] (SYSCALL_NAME_PREFIX): Define.
[!LINUX_MIPSN64]: Include "syscallent-common-stub.h".
* linux/64/syscallent.h [424..427]: Remove, include
"syscallent-common.h" instead.
* 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.

5 years agoia64: introduce BASE_NR to syscallent initializers
Dmitry V. Levin [Wed, 26 Jun 2019 08:00:39 +0000 (08:00 +0000)]
ia64: introduce BASE_NR to syscallent initializers

* linux/ia64/syscallent.h (BASE_NR): New macro.  Use it instead of 1024.

5 years agomips: refactor syscallent initializers
Dmitry V. Levin [Wed, 26 Jun 2019 08:00:39 +0000 (08:00 +0000)]
mips: refactor syscallent initializers

Change format of designated initializers to BASE_NR + offset.

* linux/mips/syscallent-n32.h (BASE_NR): New macro.  Use it in designated
initializers.
* linux/mips/syscallent-n64.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.

5 years agoxlat: update AT_* constants
Dmitry V. Levin [Mon, 24 Jun 2019 16:57:01 +0000 (16:57 +0000)]
xlat: update AT_* constants

* xlat/at_flags.in (AT_RECURSIVE): New constant introduced
by Linux kernel commit v5.2-rc1~141^2~9.
* NEWS: Mention this.
* tests/linkat.c: Update expected output.
* tests/unlinkat.c: Update expected output.
* tests/utimensat.c: Update expected output.
* tests/xstatx.c: Update expected output.

5 years agotravis: Move fastest test configuration first
Paul Chaignon [Fri, 28 Jun 2019 15:51:42 +0000 (17:51 +0200)]
travis: Move fastest test configuration first

I use Travis CI to check each patch before sending my patchsets.  Most
failures are simple and make all test configurations fail.  However, since
Travis CI runs test configurations in order and given that the first three
configurations are the slowest ones, it takes about twenty minutes to see
the failure.  Moving the fastest test configuration first would allow to
fail earlier.  It would become about 3x faster to fail in case of simple
mistakes.

* .travis.yml (CC=gcc, STACKTRACE=no): Move to first position.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
5 years agoget_os_release: tolerate malformed kernel release strings
Dmitry V. Levin [Sat, 22 Jun 2019 21:25:15 +0000 (21:25 +0000)]
get_os_release: tolerate malformed kernel release strings

* strace.c (get_os_release): Handle malformed kernel release strings
gracefully.

Resolves: https://github.com/strace/strace/issues/101

5 years agoImplement decoding of CLONE_PIDFD flag of clone syscall
Dmitry V. Levin [Thu, 20 Jun 2019 09:49:27 +0000 (09:49 +0000)]
Implement decoding of CLONE_PIDFD flag of clone syscall

* clone.c (SYS_FUNC(clone)): Print pidfd returned by the kernel
when CLONE_PIDFD flag is set.
* tests/clone-flags.c (main): Check it.

5 years agoIntroduce printnum_fd
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.

5 years agoEnhance decoding of CLONE_PARENT_SETTID flag of clone syscall
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.

5 years agoclone: fix printing of zero clone flags
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.

5 years agoclone: print read-only arguments on entering syscall
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.

5 years agotests: check decoding of clone flags
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.

5 years agoclone: cleanup
Dmitry V. Levin [Tue, 18 Jun 2019 12:03:35 +0000 (12:03 +0000)]
clone: cleanup

* clone.c (print_tls_arg): Use addr argument.

5 years agoxlat: update CLONE_* constants
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"
5 years agoUse debug_msg macro where possible
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>
5 years agoxlat: update ETH_* constants
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.

5 years agoxlat: update KBD_* constants
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.

5 years agoxlat: update TIPC_* constants
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.

5 years agoxlat: update KVM_CAP_* constants
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.

5 years agoxlat: update CLONE_* constants
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.

5 years agoxlat: update V4L2_PIX_* constants
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.

5 years agoxlat: fix v4l2_pix_fmts sorting order
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.

5 years agoxlat: update V4L2_CID_* constants
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.

5 years agoxlat: update AUDIT_* constants
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.

5 years agoxlat: update AUDIT_ARCH_* constants
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.

5 years agotests: print the reason of failure in ioctl_kvm_run tests
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>
5 years agoPost-release administrivia
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.

5 years agoPrepare for 5.1 release v5.1
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.

5 years agoUpdate copyright headers
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.

5 years agoUse xzalloc(sz) instead of xcalloc(1, sz)
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.

5 years agoxmalloc: introduce xzalloc
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>
5 years agoRename the stat struct used internally by strace to strace_stat_t
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.

5 years agoMove open_file to largefile_wrappers.h
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.

5 years agotests: robustify bpf-obj_get_info_by_fd test against future kernels
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.

5 years agobpf: add support for new fields in struct bpf_prog_info
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.

5 years agoxlat: update FAN_* constants
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.

5 years agoxlat: update IPV6_* constants
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.

5 years agoxlat: update F_SEAL_* constants
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.

5 years agobtrfs: implement decoding of BTRFS_IOC_FORGET_DEV argument
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.

5 years agoUpdate ioctl entries from linux v5.1
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>
5 years agoxlat: update FAN_* constants
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.

5 years agoxlat: update PR_SPEC_* constants
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.

5 years agoxlat: update BPF_* constants
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.

5 years agoxlat: update V4L2_* constants
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.

5 years agoxlat: update NT_* constants
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.

5 years agoImplement decoding of io_uring_* syscalls
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.

5 years agoImplement decoding of pidfd_send_signal syscall
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.

5 years agotests: check decoding of SO_TIMESTAMP*_NEW control messages
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.

5 years agoImplement decoding of SO_TIMESTAMP*_NEW control messages
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.

5 years agoprint_timespec.h: parametrize TIMESPEC_T.tv_nsec
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.

5 years agoprint_timespec.h: conditionalize printers
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.

5 years agoxlat: add SO_TIMESTAMP*_NEW constants
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.

5 years agoUse kernel_timeval64_t in definition of kernel_timex64_t
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.

5 years agoIntroduce kernel_timeval64_t type
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.

5 years agoxlat: add _OLD suffixes to SO_RCVTIMEO and SO_SNDTIMEO
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.

5 years agoRename SO_TIMESTAMP* to SO_TIMESTAMP*_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.

5 years agoReplace SCM_TIMESTAMP* constants with SO_TIMESTAMP*
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.

5 years agotests: add another test of SO_TIMESTAMP and SO_TIMESTAMPNS decoding
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.

5 years agoprint_timespec.c: remove unused printers
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.

5 years agoImplement and use new parsers of utimensat syscall
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.

5 years agoImplement and use new parsers of timerfd_gettime and timerfd_settime syscalls
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.

5 years agoImplement and use new parsers of timer_gettime and timer_settime syscalls
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.

5 years agoImplement and use new parsers of nanosleep syscall
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.

5 years agoImplement and use new parsers of clock_nanosleep syscall
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.

5 years agoImplement and use new parsers of clock_gettime and clock_settime syscalls
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.

5 years agoImplement and use new parsers of mq_timedsend and mq_timedreceive syscalls
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.

5 years agoImplement and use new parsers of rt_sigtimedwait syscall
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.

5 years agoImplement and use new parsers of sched_rr_get_interval syscall
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.

5 years agoImplement and use new parsers of poll syscall
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.

5 years agoImplement and use new parsers of ppoll syscall
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.

5 years agoImplement and use new parsers of recvmmsg syscall
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.

5 years agoImplement and use new parsers of semtimedop syscall
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.

5 years agoIntroduce subcall32.h and subcall64.h wrappers
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.

5 years agoImplement and use new parsers of futex syscall
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.

5 years agoImplement and use new parsers of pselect6 syscall
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.

5 years agoImplement and use new parsers of io_pgetevents syscall
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.

5 years agoImplement and use new parsers of io_getevents syscall
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.

5 years agoWire up *time64 system calls
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.

5 years agoImplement parsers of new *time64 system calls
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.

5 years agoUse new parsers of adjtimex and clock_adjtime syscalls
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.

5 years agoImplement parsers of 64-bit adjtimex and clock_adjtime syscalls
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.

5 years agoImplement parsers of 32-bit adjtimex and clock_adjtime syscalls
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.

5 years agosparc64: implement printer for sparc64-specific struct timex
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.

5 years agoImplement printer for kernel_timex64_t
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.

5 years agoImplement printer for kernel_timex32_t
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.

5 years agoIntroduce kernel_timex64_t
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.

5 years agoIntroduce kernel_timex32_t
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.

5 years agoRe-implement mpersified timespec printers using timespec32/timespec64 printers
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.

5 years agoImplement printers for kernel_timespec64_t
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.

5 years agoImplement printers for kernel_timespec32_t
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.

5 years agoprint_timespec.c: introduce helper macros and functions
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.

5 years agoIntroduce kernel_timespec64_t type
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.

5 years agoIntroduce kernel_timespec32_t 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.