]> granicus.if.org Git - strace/log
strace
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.

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

5 years agoIntroduce HAVE_ARCH_TIME32_SYSCALLS and HAVE_ARCH_OLD_TIME64_SYSCALLS
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.

5 years agotime.c: introduce do_timerfd_gettime and do_timerfd_settime
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.

5 years agotime.c: introduce do_timer_gettime and do_timer_settime
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.

5 years agotime.c: introduce do_clock_gettime, do_clock_settime, and do_clock_nanosleep
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.

5 years agotime.c: introduce do_clock_adjtime
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.

5 years agodo_adjtimex: parametrize print_timex
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.

5 years agoutimes.c: introduce do_utimensat
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.

5 years agosignal.c: introduce do_rt_sigtimedwait
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.

5 years agosched.c: introduce do_sched_rr_get_interval
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.

5 years agopoll.c: introduce do_ppoll
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.

5 years agomq.c: introduce do_mq_timedsend and do_mq_timedreceive
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.

5 years agommsghdr.c: introduce do_recvmmsg
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.

5 years agoipc_sem.c: introduce do_semtimedop
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.

5 years agofutex.c: introduce do_futex
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
futex.c: introduce do_futex

This is going to be used to implement a parser of futex_time64 syscall.

* futex.c (do_futex): New function.
(SYS_FUNC(futex)): Turn into a thin wrapper around do_futex.

5 years agodesc.c: introduce do_pselect6
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
desc.c: introduce do_pselect6

This is going to be used to implement a parser of pselect6_time64
syscall.

* dec.c (do_pselect6): New function.
(SYS_FUNC(pselect6)): Turn into a thin wrapper around do_pselect6.

5 years agoprint_io_getevents: parametrize print_timespec
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
print_io_getevents: parametrize print_timespec

This is going to be used to implement a parser of io_pgetevents_time64
syscall.

* aio.c (print_io_getevents): Add print_ts argument, invoke it
instead of print_timespec.
(SYS_FUNC(io_getevents), SYS_FUNC(io_pgetevents)): Pass print_timespec
to print_io_getevents.

5 years agoIntroduce print_obj_by_addr_fn and sprint_obj_by_addr_fn
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
Introduce print_obj_by_addr_fn and sprint_obj_by_addr_fn

These types are going to be used in signatures of functions that take
print_*time* functions as parameters.

* defs.h (print_obj_by_addr_fn, sprint_obj_by_addr_fn): New types.
* desc.c (decode_select): Use them.

5 years agoChange signatures of print_*time* functions to match print_timex
Dmitry V. Levin [Sat, 4 May 2019 23:15:52 +0000 (23:15 +0000)]
Change signatures of print_*time* functions to match print_timex

Make all these functions that print time by address return -1 when
umove_or_printaddr() returns non-zero.

This helps to use these functions as parameters to other functions.

* defs.h [ALPHA] (print_timeval32, print_timeval32_utimes,
print_itimerval32): Change return type to int.
* desc.c (decode_select): Change return type of print_tv_ts to int.
* print_timespec.c (print_timespec, print_timespec_utime_pair,
print_itimerspec): Change return type to int, return -1 when
umove_or_printaddr() returns non-zero.
* print_timeval.c (print_timeval, print_timeval_utimes,
print_itimerval): Likewise.
[ALPHA] (print_timeval32, print_timeval32_utimes, print_itimerval32):
Likewise.

5 years agotests: robustify umount and umount2 tests against future kernel changes
Dmitry V. Levin [Tue, 16 Apr 2019 00:27:42 +0000 (00:27 +0000)]
tests: robustify umount and umount2 tests against future kernel changes

Prepare for the rename of umount syscall to umount2 introduced by linux
kernel commits v5.1-rc1~160^2~3^2~12 and v5.1-rc1~160^2~3^2~16 on alpha
and ia64 architectures, respectively.

* tests/umount.c: Check for __NR_umount == __NR_umount2.
* tests/umount2.c: Likewise.

5 years agoalpha: wire up getegid, geteuid, and getppid syscalls
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
alpha: wire up getegid, geteuid, and getppid syscalls

* linux/alpha/syscallent.h [530..532]: Wire up getegid, geteuid,
and getppid syscalls introduced on this architecture by linux commit
v5.1-rc1~160^2~3^2~1.
* NEWS: Mention this.

5 years agoalpha: wire up statfs64 and fstatfs64 syscalls
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
alpha: wire up statfs64 and fstatfs64 syscalls

* linux/alpha/syscallent.h [528..529]: Wire up statfs64 and fstatfs64
syscalls introduced on this architecture by linux commit
v5.1-rc1~160^2~3^2~2.
* NEWS: Mention this.

5 years agoWire up pkey_* and rseq syscalls on remaining architectures
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
Wire up pkey_* and rseq syscalls on remaining architectures

* linux/alpha/syscallent.h [524..527]: Wire up pkey_mprotect,
pkey_alloc, pkey_free, and rseq syscalls introduced on this architecture
by linux commit v5.1-rc1~160^2~3^2~3.
* linux/hppa/syscallent.h [351..354]: Likewise.
* linux/ia64/syscallent.h [1024 + 330..333]: Likewise.
* linux/m68k/syscallent.h [381..384]: Likewise.
* linux/sh/syscallent.h [384..387]: Likewise.
* linux/sparc/syscallent.h [362..365]: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/s390/syscallent.h [384..386]: Wire up pkey_mprotect,
pkey_alloc, and pkey_free syscalls introduced on this architecture
by linux commit v5.1-rc1~160^2~3^2~3.
* linux/s390x/syscallent.h: Likewise.
* linux/xtensa/syscallent.h [352]: Wire up rseq syscall introduced
on this architecture by linux commit v5.1-rc1~160^2~3^2~3.
* NEWS: Mention this.

5 years agoWire up direct ipc syscalls on m68k, mips, powerpc*, s390*, sh, sparc*, x86
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
Wire up direct ipc syscalls on m68k, mips, powerpc*, s390*, sh, sparc*, x86

* linux/i386/syscallent.h [393..402]: Wire up semget, semctl, shmget,
shmctl, shmat, shmdt, msgget, msgsnd, msgrcv, and msgctl syscalls
introduced on this architecture by linux commit v5.1-rc1~160^2~3^2~4.
* linux/m68k/syscallent.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-o32.h [4393..4402]: Wire up semget, semctl,
shmget, shmctl, shmat, shmdt, msgget, msgsnd, msgrcv, and msgctl syscalls
introduced on this architecture by linux commit v5.1-rc1~160^2~3^2~4.
* linux/powerpc64/syscallent.h [392..402]: Wire up semtimedop, semget,
semctl, shmget, shmctl, shmat, shmdt, msgget, msgsnd, msgrcv, and msgctl
syscalls introduced on this architecture by linux commit
v5.1-rc1~160^2~3^2~4.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* NEWS: Mention this.

5 years agopowerpc, powerpc64: remove direct ipc syscall entries
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
powerpc, powerpc64: remove direct ipc syscall entries

* linux/powerpc/syscallent.h [366..377]: Remove entries reserved for
direct ipc syscalls, they were added by linux kernel commit
v4.4-rc1~98^2~32 and removed by linux kernel commit v4.4-rc6~5^2~2.
* linux/powerpc64/syscallent.h: Likewise.

5 years agosh: wire up statx syscall
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
sh: wire up statx syscall

* linux/sh/syscallent.h [380]: Wire up statx syscall
introduced on sh by linux commit v5.1-rc1~160^2~3^2~7.
* NEWS: Mention this.

5 years agom68k: wire up seccomp syscall
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
m68k: wire up seccomp syscall

* linux/m68k/syscallent.h [380]: Wire up seccomp syscall
introduced on m68k by linux commit v5.1-rc1~160^2~3^2~9.
* NEWS: Mention this.

5 years agoarm: wire up kexec_file_load syscall
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
arm: wire up kexec_file_load syscall

* linux/arm/syscallent.h [401]: Wire up kexec_file_load syscall
introduced on arm by linux commit v5.1-rc1~160^2~3^2~10.
* NEWS: Mention this.

5 years agoarm: wire up migrate_pages syscall
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
arm: wire up migrate_pages syscall

* linux/arm/syscallent.h [400]: Wire up migrate_pages syscall
introduced on arm by linux commit v5.1-rc1~160^2~3^2~11.
* NEWS: Mention this.

5 years agoalpha: wire up io_pgetevents syscall
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
alpha: wire up io_pgetevents syscall

* linux/alpha/syscallent.h [523]: Wire up io_pgetevents syscall
introduced on alpha by linux commit v5.1-rc1~160^2~3^2~13.
* NEWS: Mention this.

5 years agoia64: wire up perf_event_open and seccomp syscalls
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
ia64: wire up perf_event_open and seccomp syscalls

* linux/ia64/syscallent.h [1024 + 327..328]: Wire up perf_event_open
and seccomp syscalls introduced on ia64 by linux commit
v5.1-rc1~160^2~3^2~14.
* NEWS: Mention this.

5 years agoia64: wire up statx and io_pgetevents syscalls
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
ia64: wire up statx and io_pgetevents syscalls

* linux/ia64/syscallent.h [1024 + 326..327]: Wire up statx and
io_pgetevents syscalls introduced on ia64 by linux commit
v5.1-rc1~160^2~3^2~15.
* NEWS: Mention this.

5 years agoia64: make syscall entry table numbers more readable
Dmitry V. Levin [Mon, 15 Apr 2019 00:39:53 +0000 (00:39 +0000)]
ia64: make syscall entry table numbers more readable

* linux/ia64/syscallent.h: Format syscall numbers using base+offset form.
* scno.am (SCNO_SED): Update to handle this format.

5 years agoAdd C-SKY architecture support
Guo Ren [Sat, 23 Mar 2019 00:56:14 +0000 (08:56 +0800)]
Add C-SKY architecture support

This is port of C-SKY architecture for strace.  There is a little
difference between abiv1 and abiv2, we use __CSKYABIV2__ from GCC-csky
to distinguish.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reviewed-By: Dmitry V. Levin <ldv@altlinux.org>
* cacheflush.c [CSKY] (cacheflush_flags, SYS_FUNC(cacheflush)): Define.
* clone.c [CSKY] (ARG_*): Define.
* configure.ac [$host_cpu == csky*]: Define CSKY.
* linux/csky/arch_regs.c: New file.
* linux/csky/get_error.c: Likewise.
* linux/csky/get_scno.c: Likewise.
* linux/csky/get_syscall_args.c: Likewise.
* linux/csky/ioctls_arch0.h: Likewise.
* linux/csky/ioctls_inc0.h: Likewise.
* linux/csky/raw_syscall.h: Likewise.
* linux/csky/set_error.c: Likewise.
* linux/csky/set_scno.c: Likewise.
* linux/csky/syscallent.h: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* NEWS: Mention this change.

5 years agoriscv: Fixup wrong clone's arguments define
Guo Ren [Fri, 22 Mar 2019 08:58:17 +0000 (16:58 +0800)]
riscv: Fixup wrong clone's arguments define

In linux kernel riscv select CLONE_BACKWARDS in
linux/arch/riscv/Kconfig, and in linux/kernel/fork.c:

ifdef CONFIG_CLONE_BACKWARDS
SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
 int __user *, parent_tidptr,
 unsigned long, tls,
 int __user *, child_tidptr)
elif ...

So we must make the riscv clone-arguments' sequence to be:
  define ARG_FLAGS 0
  define ARG_STACK 1
  define ARG_PTID 2
  define ARG_TLS 3
  define ARG_CTID 4

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reviewed-By: Dmitry V. Levin <ldv@altlinux.org>
* clone.c [RISCV]: Use default definitions for ARG_* macros.
* NEWS: Mention this fix.

5 years agoPost-release administrivia
Dmitry V. Levin [Wed, 20 Mar 2019 23:31:27 +0000 (23:31 +0000)]
Post-release administrivia

* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 5.0-1.
* strace.spec.in: Likewise.

5 years agoPrepare for 5.0 release v5.0
Dmitry V. Levin [Tue, 19 Mar 2019 03:04:05 +0000 (03:04 +0000)]
Prepare for 5.0 release

* NEWS: Update for 5.0 release.

5 years ago.mailmap: add more entries to avoid duplication in CREDITS
Dmitry V. Levin [Tue, 19 Mar 2019 03:04:05 +0000 (03:04 +0000)]
.mailmap: add more entries to avoid duplication in CREDITS

5 years agostrace.spec.in: do not define Group tag for modern distros
Dmitry V. Levin [Mon, 18 Mar 2019 19:06:47 +0000 (19:06 +0000)]
strace.spec.in: do not define Group tag for modern distros

* strace.spec.in (Group): Conditionalize on distro version.

References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag

5 years agostrace-log-merge: enhance pid formatting
Dmitry V. Levin [Mon, 18 Mar 2019 19:06:47 +0000 (19:06 +0000)]
strace-log-merge: enhance pid formatting

* strace-log-merge (max_suffix_length): New variable.
(iterate_logfiles, process_suffix, process_logfile): New functions.
Use them to choose the optimum width for pid column.
* NEWS: Mention this enhancement.
* tests/strace-log-merge-suffix.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.

5 years agostrace-log-merge: fix error diagnostics
Dmitry V. Levin [Mon, 18 Mar 2019 19:06:47 +0000 (19:06 +0000)]
strace-log-merge: fix error diagnostics

* strace-log-merge: Print error diagnostics and exit with a non-zero
status in case of no strace output.
* NEWS: Mention this fix.
* tests/strace-log-merge-error.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.

Fixes: v4.21~287 "strace-log-merge: work around corner cases of strace -ttt parsing"
5 years agoUpdate NEWS
Eugene Syromyatnikov [Mon, 18 Mar 2019 17:48:37 +0000 (18:48 +0100)]
Update NEWS

5 years agoUpdate copyright year number range
Dmitry V. Levin [Mon, 18 Mar 2019 02:40:16 +0000 (02:40 +0000)]
Update copyright year number range

* COPYING: Update copyright year number range.
* tests/COPYING: Likewise.
* debian/copyright: Likewise.

5 years agoUpdate copyright headers
Dmitry V. Levin [Mon, 18 Mar 2019 02:40:16 +0000 (02:40 +0000)]
Update copyright headers

Headers updated automatically using maint/update_copyright_years.sh
script.

5 years agoFix preprocessor indentation
Dmitry V. Levin [Mon, 18 Mar 2019 02:40:16 +0000 (02:40 +0000)]
Fix preprocessor indentation

Indent the C preprocessor directives to reflect their nesting
using the following script:

$ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$') |while read f; do
cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
done

5 years agoHonor xlat styles when decoding mac addresses
Shankara Pailoor [Sun, 13 Jan 2019 23:34:04 +0000 (15:34 -0800)]
Honor xlat styles when decoding mac addresses

* defs.h (print_mac_addr): Add xlat_style support, move ...
* print_mac.c: ... here.
* tests/sockaddr_xlat.c [HAVE_BLUETOOTH_BLUETOOTH_H]: Include
<bluetooth/bluetooth.h>, <bluetooth/hci.h>, <bluetooth/l2cap.h>
<bluetooth/rfcomm.h>, and <bluetooth/sco.h>.
[HAVE_BLUETOOTH_BLUETOOTH_H] (check_sco, check_rc): New functions.
(main) [HAVE_BLUETOOTH_BLUETOOTH_H]: Call them to verify
new xlat_style support in print_mac_addr().
* tests/net-packet_mreq.c: Handle XLAT_RAW, XLAT_ABBREV,
and XLAT_VERBOSE macros.
* tests/net-packet_mreq-Xabbrev.c: New test.
* tests/net-packet_mreq-Xraw.c: Likewise.
* tests/net-packet_mreq-Xverbose.c: Likewise.
* tests/gen_tests.in (net-packet_mreq-Xabbrev, net-packet_mreq-Xraw,
net-packet_mreq-Xverbose): New tests.
* tests/pure_executables.list: Add net-packet_mreq-Xabbrev,
net-packet_mreq-Xraw, and et-packet_mreq-Xverbose.
* tests/.gitignore: Likewise.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
5 years agonet: print mac address consistently
Shankara Pailoor [Sun, 13 Jan 2019 23:34:04 +0000 (15:34 -0800)]
net: print mac address consistently

* net.c (print_packet_mreq): Call PRINT_FIELD_MAC_SZ instead of custom
print.
* tests/net-packet_mreq.c (test_packet_mreq): Update expected output.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
5 years agoChange -D option to imply -I4
Dmitry V. Levin [Sun, 17 Mar 2019 14:36:56 +0000 (14:36 +0000)]
Change -D option to imply -I4

* strace.c (init) [daemonized_tracer && !opt_intr]: Set opt_intr
to INTR_BLOCK_TSTP_TOO.
* strace.1.in: Document this.
* NEWS: Mention this change.

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