Commit Graph

215 Commits

Author SHA1 Message Date
489a70576b Post-release administrivia
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 4.20-1.
* strace.spec.in: Likewise.
2017-11-14 20:32:24 +00:00
c992025798 Prepare for 4.20 release
* NEWS: Update for 4.20 release.
2017-11-13 20:21:22 +00:00
5d460ae383 seccomp: decode SECCOMP_GET_ACTION_AVAIL operation
* defs.h (seccomp_ret_action): New xlat prototype.
* seccomp.c (decode_seccomp_set_mode_strict): Remove.
(SYS_FUNC(seccomp)): Decode SECCOMP_GET_ACTION_AVAIL operation.
* NEWS: Mention this.
* tests/seccomp_get_action_avail.c: New file.
* tests/gen_tests.in (seccomp_get_action_avail): New entry.
* tests/pure_executables.list: Add seccomp_get_action_avail.
* tests/.gitignore: Likewise.
2017-11-02 00:21:57 +00:00
3ed59f89fd Update SECCOMP_* constants
* xlat/seccomp_filter_flags.in: Add SECCOMP_FILTER_FLAG_LOG introduced
by kernel commit v4.14-rc2~15^2~6.
* xlat/seccomp_ops.in: Add SECCOMP_GET_ACTION_AVAIL introduced
by kernel commit v4.14-rc2~15^2~9.
* xlat/seccomp_ret_action.in: Add SECCOMP_RET_LOG introduced
by kernel commit v4.14-rc2~15^2~5.
* NEWS: Mention this.
* tests/seccomp-filter.c (main): Update expected output.
* tests/seccomp-filter-v.c (main): Likewise.
2017-11-01 02:00:04 +00:00
JingPiao Chen
58739bf243 netlink: decode NETLINK_NETFILTER netlink message flags
* netlink.c (decode_nlmsg_flags_netfilter): New function.
(nlmsg_flags): Add NETLINK_NETFILTER.
* NEWS: Mention this.
2017-10-26 18:08:03 +00:00
JingPiao Chen
c5d6bccdb0 netlink: decode NETLINK_NETFILTER netlink message types
* netlink.c: Include "xlat/nf_acct_msg_types.h",
"xlat/nf_cthelper_msg_types.h", "xlat/nf_ctnetlink_exp_msg_types.h",
"xlat/nf_ctnetlink_msg_types.h", "xlat/nf_cttimeout_msg_types.h",
"xlat/nf_ipset_msg_types.h", "xlat/nf_nft_compat_msg_types.h",
"xlat/nf_nftables_msg_types.h", "xlat/nf_osf_msg_types.h",
"xlat/nf_queue_msg_types.h", and "xlat/nf_ulog_msg_types.h".
(nf_nlmsg_types): New array.
(decode_nlmsg_type_netfilter): Use it.
* NEWS: Mention this.
* xlat/nf_acct_msg_types.in: New file.
* xlat/nf_cthelper_msg_types.in: Likewise.
* xlat/nf_ctnetlink_exp_msg_types.in: Likewise.
* xlat/nf_ctnetlink_msg_types.in: Likewise.
* xlat/nf_cttimeout_msg_types.in: Likewise.
* xlat/nf_ipset_msg_types.in: Likewise.
* xlat/nf_nft_compat_msg_types.in: Likewise.
* xlat/nf_nftables_msg_types.in: Likewise.
* xlat/nf_osf_msg_types.in: Likewise.
* xlat/nf_queue_msg_types.in: Likewise.
* xlat/nf_ulog_msg_types.in: Likewise.
* tests/netlink_netfilter.c (test_nlmsg_type): Update expected output.
2017-09-24 10:07:57 +00:00
55b097b506 ppc64: truncate syscall args for 32-bit personality tracees
* linux/powerpc/get_syscall_args.c (get_syscall_args): Clear upper
32 bits of syscall args for 32-bit personality tracees.
* NEWS: Mention this fix.
2017-09-20 00:15:02 +00:00
5e90930421 Update ioctl entries from linux v4.14-rc1
* linux/32/ioctls_inc_align16.h: Update from linux v4.14-rc1
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.
* xlat/loop_cmds.in: Add LOOP_SET_BLOCK_SIZE introduced
by kernel commit v4.13-rc7-176-g89e4fde.
* NEWS: Mention this.
* tests/ioctl_loop.c (main): Update.
2017-09-19 11:32:05 +00:00
52231be034 Update MEMBARRIER_CMD_* constants
* xlat/membarrier_cmds.in: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED
introduced by kernel commit v4.14-rc1~174^2^2^4.
* NEWS: Mention this.
* tests/membarrier.c (main): Update expected output.
2017-09-17 12:04:11 +00:00
13901e7e6f Update UFFD_FEATURE_* constants
* xlat/memfd_create_flags.in: Remove UFFD_FEATURE_EVENT_EXIT removed
by kernel commit v4.11-rc2~15^2~18.
Add UFFD_FEATURE_SIGBUS and UFFD_FEATURE_THREAD_ID introduced by kernel
commits v4.14-rc1~126^2~28 and v4.14-rc1~126^2~23, repsectively.
* NEWS: Mention this.
2017-09-17 12:04:11 +00:00
53ddcf0fd6 Update MFD_* constants
* xlat/memfd_create_flags.in: Add MFD_HUGETLB introduced
by kernel commit v4.14-rc1~126^2~17.
* NEWS: Mention this.
* tests/memfd_create.c (main): Update expected output.
2017-09-17 12:04:11 +00:00
23dc62bb8b Update ETH_P_* constants
* xlat/ethernet_protocols.in: Add ETH_P_ERSPAN, ETH_P_NSH, ETH_P_IFE,
and ETH_P_MAP introduced by kernel commits v4.14-rc1~130^2~164,
v4.14-rc1~130^2~89^2~3, v4.14-rc1~130^2~90^2~2, and
v4.14-rc1~130^2~78^2~2, respectively.
* NEWS: Mention this.
2017-09-17 12:04:11 +00:00
6751159fda Update ARPHRD_* constants
* xlat/arp_hardware_types.in: Add ARPHRD_RAWIP introduced
by kernel commit v4.14-rc1~130^2~78^2~1.
* NEWS: Mention this.
2017-09-17 12:04:11 +00:00
3e45b0398d Update BPF_* constants
* xlat/bpf_attach_type.in: Add BPF_SK_SKB_STREAM_PARSER
and BPF_SK_SKB_STREAM_VERDICT introduced by kernel commit
v4.14-rc1~130^2~123^2~8.
* xlat/bpf_map_flags.in: Add BPF_F_NO_COMMON_LRU and BPF_F_NUMA_NODE
introduced by kernel commits v4.10-rc1~202^2~271^2~2
and v4.14-rc1~130^2~196^2~1, respectively.
* xlat/bpf_map_types.in: Add BPF_MAP_TYPE_DEVMAP
and BPF_MAP_TYPE_SOCKMAP introduced by kernel commits
v4.14-rc1~130^2~497^2~4 and v4.14-rc1~130^2~234^2~4,
respectively.
* xlat/bpf_op_jmp.in: Add BPF_JLT, BPF_JLE, BPF_JSLT, and BPF_JSLE
introduced by kernel commit v4.14-rc1~130^2~309^2~8.
* xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_SK_SKB introduced
by kernel commit v4.14-rc1~130^2~234^2~6.
* NEWS: Mention this.
2017-09-17 12:04:11 +00:00
55bb3e27d7 Update SO_* constants
* xlat/sockoptions.in: Add SO_ZEROCOPY introduced by kernel commit
v4.14-rc1~130^2~376^2~5.
* NEWS: Mention this.
2017-09-17 12:04:11 +00:00
5f1d34e1f3 Update MADV_* constants
* xlat/madvise_cmds.in: Add MADV_WIPEONFORK and MADV_KEEPONFORK
introduced by kernel commit v4.14-rc1~126^2.
* NEWS: Mention this.
2017-09-17 12:04:11 +00:00
68d00ce2d6 Update TCP_* constants
* xlat/socktcpoptions.in: Add TCP_ULP and TCP_MD5SIG_EXT.
* NEWS: Mention this.
2017-09-07 06:45:04 +00:00
3e178d2fb2 Update SOL_* constants
* xlat/socketlayers.in: Add SOL_TLS.
* NEWS: Mention this.
2017-09-07 06:45:04 +00:00
93006fc2a0 Post-release administrivia
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 4.19-1.
* strace.spec.in: Likewise.
2017-09-06 20:24:50 +00:00
af9010e63b Prepare for 4.19 release
* NEWS: Update for 4.19 release.
2017-09-05 12:13:14 +00:00
Eugene Syromyatnikov
94e0fe19bc Update NEWS 2017-09-04 23:17:27 +02:00
Gleb Fotengauer-Malinovskiy
5f270dcbc6 Update ioctl entries from linux v4.13-rc7
* linux/32/ioctls_inc_align16.h: Update from linux v4.13-rc7 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.
* linux/arm/ioctls_arch0.h: Likewise.
* linux/i386/ioctls_arch0.h: Likewise.
* linux/powerpc/ioctls_arch0.h: Likewise.
* linux/s390x/ioctls_arch0.h: Likewise.
* linux/x86_64/ioctls_arch0.h: Likewise.
* NEWS: Mention this.
2017-08-28 14:44:38 +00:00
JingPiao Chen
418dd0e7db Update NEWS 2017-08-14 01:10:33 +00:00
JingPiao Chen
e4b90f7bbf netlink: decode NETLINK_CRYPTO crypto_user_alg netlink attributes
* configure.ac (AC_CHECK_TYPES): Check for crypto_report_aead,
crypto_report_blkcipher, crypto_report_cipher, crypto_report_hash,
and crypto_report_rng structures in <linux/cryptouser.h>.
* netlink_crypto.c (decode_crypto_report_generic,
decode_crypto_report_hash, decode_crypto_report_blkcipher,
decode_crypto_report_aead, decode_crypto_report_rng,
decode_crypto_report_cipher): New functions.
(crypto_user_alg_nla_decoders): New array.
(decode_crypto_user_alg): Use it.
* xlat/crypto_nl_attrs.in: New file.
* NEWS: Mention this.
2017-07-24 11:18:43 +00:00
JingPiao Chen
9da72b5251 netlink: add a basic parser of NETLINK_CRYPTO messages
* netlink_crypto.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (decode_netlink_crypto): New prototype.
* netlink.c (netlink_decoders): Add NETLINK_CRYPTO.
* NEWS: Mention this.
2017-07-24 10:47:19 +00:00
6f51a6d00d keyctl: add support for KEYCTL_RESTRICT_KEYRING operation
* keyctl.c (keyctl_restrict_keyring): New function.
(SYS_FUNC(keyctl)): Use it to implement KEYCTL_RESTRICT_KEYRING support.
* NEWS: Mention this.
* tests/keyctl.c (main): Check KEYCTL_RESTRICT_KEYRING decoding.
2017-07-21 11:07:55 +00:00
8d2dd76323 x86: wire up arch_prctl syscall
* linux/i386/syscallent.h [384]: Add arch_prctl entry.
* xlat/archvals.in: Add fallback definitions for constants.
* prctl.c: Stop including <asm/prctl.h>.
(SYS_FUNC(arch_prctl)): Enable for [I386].
* NEWS: Mention this.
2017-07-21 01:30:26 +00:00
886a7966b1 Update input event KEY_* constants
* xlat/evdev_keycode.in: Add KEY_ASSISTANT introduced by linux kernel
commit v4.13-rc1~13^2~1^2~1.
* NEWS: Mention this.
2017-07-19 20:41:15 +00:00
3e1ed8cf62 Update fs *_MAGIC constants
* xlat/fsmagic.in: Add AAFS_MAGIC introduced by linux kernel commit
v4.13-rc1~161^2~87.
* NEWS: Mention this.
2017-07-19 20:41:15 +00:00
JingPiao Chen
3bfaa0f744 netlink: decode nlmsgerr attributes
* netlink.c: Include "nlattr.h" and "xlat/nlmsgerr_attrs.h".
(print_cookie, decode_nlmsgerr_attr_cookie): New functions.
(nlmsgerr_nla_decoders): New array.
(decode_nlmsgerr): Use it.
* xlat/nlmsgerr_attrs.in: New file.
* NEWS: Mention this.
2017-07-19 09:25:58 +00:00
JingPiao Chen
9ec9ad9c0f netlink: decode netlink message ack flags
* netlink.c: Include "xlat/netlink_ack_flags.h".
(decode_nlmsg_flags): Decode ack flags when type == NLMSG_ERROR.
* xlat/netlink_ack_flags.in: New file.
* NEWS: Mention this.
* tests/netlink_protocol.c (test_ack_flags): New function, check this.
(main): Use it.
2017-07-19 09:25:58 +00:00
6644e1f4e1 userfaultfd: decode struct uffdio_api.features as flags
* xlat/uffd_api_features.in: New file.
* userfaultfd.c: Include "xlat/uffd_api_features.h".
(uffdio_ioctl): Print struct uffdio_api.features using
PRINT_FIELD_FLAGS64 and uffd_api_features.
* NEWS: Mention this.
* tests/ioctl_uffdio.c: Include "xlat.h" and "xlat/uffd_api_features.h".
(main): Update expected output.
2017-07-19 00:33:56 +00:00
8d62a6072d Update NEWS 2017-07-17 19:55:17 +00:00
7bcb1dcdbc net: enhance decoding of MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP
* net.c (print_group_req): Allow option length greater than
sizeof(struct group_req) to match the kernel behaviour.
When the option length is invalid, print the address.
* NEWS: Mention this.
2017-07-09 18:43:34 +00:00
492517e35f net: enhance decoding of IP_ADD_MEMBERSHIP et al socket options
* net.c (print_mreq, print_mreq6): Treat negative option length
as invalid to match the kernel behaviour.  When the option length
is invalid, print the address.
* NEWS: Mention it.
* tests/ip_mreq.c (main): Check it.  Update expected output.
2017-07-09 18:43:34 +00:00
0c4052b9ca net: accept arbitrary option length for getsockopt's SO_PEERCRED
* print_fields.h (PRINT_FIELD_UID): New macro.
* net.c (print_ucred): Rewrite to match the kernel behaviour.
* NEWS: Mention this.
2017-07-08 19:27:26 +00:00
bc515c7f54 Implement decoding of linux socket filter programs
* bpf_sock_filter.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* xlat/skf_ad.in: New file.
* defs.h (decode_sock_fprog, print_sock_fprog): New prototypes.
* fetch_bpf_fprog.c (get_bpf_fprog_size): New mpers printer.
* net.c (print_getsockopt): Use decode_sock_fprog to print
socket filter programs for SO_GET_FILTER socket option.
(print_setsockopt): Use decode_sock_fprog and get_bpf_fprog_size
to print socket filter programs for SO_ATTACH_FILTER
and SO_ATTACH_REUSEPORT_CBPF socket options.
* NEWS: Mention this.
2017-07-08 14:57:44 +00:00
4c14d39332 net: accept arbitrary option length for getsockopt's SO_LINGER
* net.c (print_linger): Rename to print_set_linger.
(print_setsockopt): Replace print_linger with print_set_linger.
(print_get_linger): New function that accepts arbitrary option length
to match the kernel behaviour.
(print_getsockopt): Replace print_linger with print_get_linger.
* NEWS: Mention this.
2017-07-08 14:57:44 +00:00
657b04b83b net: enhance decoding of getsockopt's optlen argument
As the last argument of getsockopt syscall has read-write semantics,
print both user and kernel values when they differ.

* net.c (SYS_FUNC(getsockopt)): On entering syscall, fetch and save
the length specified to the kernel.  On error, print the length saved
on entering.  When the saved length and the length returned by the
kernel differ, print both values.
* NEWS: Mention this.
* tests/net-icmp_filter.c (main): Update expected output.
2017-07-08 14:57:44 +00:00
1e4f54cd28 Post-release administrivia
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 4.18-1.
* strace.spec.in: Likewise.
2017-07-06 12:50:55 +00:00
c136e9e449 Prepare for 4.18 release
* NEWS: Update for 4.18 release.
2017-07-05 07:08:09 +00:00
e70dae5954 Update NEWS 2017-07-04 17:52:54 +00:00
Gleb Fotengauer-Malinovskiy
89e2e64936 Update ioctl entries from linux v4.12-rc7
* linux/32/ioctls_inc_align16.h: Update from linux v4.12-rc7
(with f7a320ff commit applied on top) 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.
2017-06-29 09:20:36 +00:00
7f2b636a22 Fix a few misspellings in comments
Reported by kernel's checkpatch.pl script.
2017-06-17 10:40:05 +00:00
Miroslav Lichvar
c0a127d163 msghdr: print SCM_TIMESTAMP* control messages
Add support for printing control messages containing software and/or
hardware timestamps, which are typically enabled by NTP and PTP
implementations.

* print_timeval.c (print_struct_timeval_data_size): New mpers printer.
* print_timespec.c (print_struct_timespec_data_size,
print_struct_timespec_array_data_size): Likewise.
* msghdr.c (print_scm_timestamp, print_scm_timestampns,
print_scm_timestamping): New functions.
(cmsg_socket_printers): Add them.
* NEWS: Mention this change.
* tests/msg_control.c: Include "xlat.h" and "xlat/scmvals.h".
(test_scm_timestamp, test_scm_timestampns, test_scm_timestamping):
New functions.
(test_sol_socket): Use them.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2017-06-15 23:52:48 +00:00
a25d7521ef scno.am: include config.h before syscallent.h
This fixes generation of syscallent.i and subsequent scno.h files
on mips where syscallent.h checks macros defined in config.h.

* scno.am (syscallent.i): Add $(top_builddir)/config.h
to prerequisites, include it.
* NEWS: Mention this fix.

Reported-by: David Robins <dbrobins@i4031.net>
2017-05-30 22:44:47 +00:00
337d3a10ce signal: fix decoding of struct old_sigaction on some architectures
On alpha, struct old_sigaction.sa_flags has a 32-bit type.

On mips, only first word of old_sigaction.sa_mask is read.

On all architectures except alpha and mips that have old sigaction
syscall, struct old_sigaction has sa_restorer field that has to be
decoded.

* signal.c (struct old_sigaction) [ALPHA]: Change sa_flags type
to unsigned int, add ATTRIBUTE_PACKED.
[MIPS]: Dhrink sa_mask array to 1 element.
[!ALPHA && !MIPS]: Define sa_restorer field unconditionally.
(struct old_sigaction32): Likewise.
(decode_old_sigaction) [!current_wordsize]: Initialize sa_restorer field
from old_sigaction32.sa_restorer unconditionally.
[!ALPHA && !MIPS]: Print old_sigaction.sa_restorer if SA_RESTORER flag
is set.
* NEWS: Mention this change.
2017-05-28 17:13:29 +00:00
47b93f2a7a Fix termination signal forwarding
When traced command is terminated by a blocked signal, unblock
that signal to ensure strace termination with the same signal.

* strace.c (main): Unblock the signal raised for strace termination.
* NEWS: Mention this change.
2017-05-27 17:59:44 +00:00
e97a66faa1 Do not reset SIGCHLD handler in tracees to SIG_DFL
While strace resets SIGCHLD handler to the default action so that
waitpid definitely works without losing track of children, tracees
should not inherit this change.

* strace.c (struct exec_params): Add child_sa field.
(init): When setting SIGCHLD handler to SIG_DFL, save the old handler.
(exec_or_die): Restore SIGCHLD handler if it was different from SIG_DFL
at startup.
* NEWS: Mention this change.
2017-05-27 17:59:44 +00:00
f83b49b03a Fix unblocking of signals in interactive mode
In interactive mode (-I2), those signals that were blocked at startup
will remain blocked for the whole period of strace execution.

* strace.c (empty_set): Rename to start_set.  All users changed.
(init): Initialize start_set and blocked_set to the set of currently
blocked signals.
(startup_attach, trace): Use SIG_SETMASK instead of SIG_BLOCK.
* NEWS: Mention this change.
2017-05-27 10:00:43 +00:00