Commit Graph

6022 Commits

Author SHA1 Message Date
300d9f1fee netlink: print descriptor attributes using printfd
* nlattr.h (DECL_NLA(fd)): New prototype.
* nlattr.c (decode_nla_fd): New function.
* rtnl_link.c (ifla_xdp_nla_decoders) <IFLA_XDP_FD>: Use it.
(ifinfomsg_nla_decoders) <IFLA_NET_NS_FD>: Likewise.
* rtnl_nsid.c (rtgenmsg_nla_decoders) <NETNSA_FD>: Likewise.
* NEWS: Mention this.
2017-11-15 15:30:49 +00:00
Eugene Syromyatnikov
252667882a maint/update_copyright_years.sh: implement concurrent execution
Analogous to the way it is done in xlat/gen.sh.

* maint/update_copyright_years.sh (MAX_JOBS): New variable, initialize
it to double the CPU count.
<while [ -n "${1:-}" ]; do case "$1" in>: Add -j option parsing.
(jobs, pids): New variables.
<git ls-files -- "$@" | grep -vFx "$IGNORED_FILES" | while read f; do>:
Execute process_file in background, count background jobs and wait
if there are too many.
2017-11-14 20:32:24 +00:00
Eugene Syromyatnikov
65b1268580 maint/update_copyright_years.sh: use -efu shell mode
* maint/update_copyright_years.sh: Add -efu to shebang.  Adjust
the script for -efu shell mode.
2017-11-14 20:32:24 +00:00
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
72e403f2db CREDITS.in: remove entries listed by maint/gen-contributors-list.sh 2017-11-13 20:21:22 +00:00
Eugene Syromyatnikov
96b7894228 Makefile.am: use gen-contributors-list.sh for CREDITS
* Makefile.am ($(srcdir)/CREDITS): Employ maint/gen-contributors-list.sh
for the contributor list generation.
2017-11-13 20:21:22 +00:00
Eugene Syromyatnikov
cca061f6f0 maint: make gen-contributors-list.sh suitable for generation of CREDITS
Implement various features in order to make it suitable for the
generation of the CREDITS file:
- add an option for including contributor e-mail;
- add an option to read additional list of contributors from stdin;
- add shorthand for referring to the initial commit of the branch;
- document all of the above in a help message.

* maint/gen-contributors-list.sh (print_help): New function.
(script): Rename to SCRIPT.
(SCRIPT_NORM_EMAILS, MATCH_OUT, OUT_EMAILS, OUT_NO_EMAILS, read_stdin,
include_email): New variables.
Add parsing of options, rewrite input processing.
2017-11-13 20:21:22 +00:00
34051e8885 .mailmap: add more entries to avoid duplication in CREDITS 2017-11-13 20:21:22 +00:00
6bca8555fc .mailmap: sort entries 2017-11-13 20:21:22 +00:00
Eugene Syromyatnikov
469c4053c5 .mailmap: more deduplication
Of course there are no two persons in the whole world that share
the same name.
2017-11-13 20:21:22 +00:00
020a04256d CREDITS.in: use UTF-8 consistently
In particular, do not use " symbols in names.
2017-11-13 20:21:22 +00:00
Eugene Syromyatnikov
0c6157d850 CREDITS.in: add Jiri Slaby as a contributor
Unfortunately, he wasn't mentioned in the message of the commit
v4.19-68-g48cb633, so let's fix that omission.

References: https://github.com/strace/strace/pull/16
2017-11-13 20:21:22 +00:00
Gleb Fotengauer-Malinovskiy
6b7b706cd0 s390, s390x: update ioctl entries from linux 4.14
* linux/s390/ioctls_arch0.h: Update from linux v4.14 using ioctls_gen.sh.
* linux/s390x/ioctls_arch0.h: Likewise.
2017-11-13 20:21:22 +00:00
Gleb Fotengauer-Malinovskiy
9ffb1a6b9f s390x: remove some of non-s390 KVM ioctls
* linux/s390x/ioctls_arch0.h: Regenerate.
2017-11-13 20:21:22 +00:00
Gleb Fotengauer-Malinovskiy
78f448e8c7 maint: remove KVM_PPC_CONFIGURE_V3_MMU ioctl from non-powerpc arches
* maint/ioctls_sym.sh (ppc_list): Update.
2017-11-13 20:21:22 +00:00
18f69cceeb Update copyright headers
Headers updated semi-automatically using
maint/update_copyright_years.sh script.

* m4/mpers.m4: Update copyright years.
* tests/kcmp.c: Likewise.
* tests/membarrier.c: Likewise.
2017-11-12 00:11:06 +00:00
73e9f00754 maint/update_copyright_years.sh: fix typo in help output
* maint/update_copyright_years.sh (print_help): Fix typo, disable
here-document expansion.
2017-11-11 23:08:09 +00:00
Eugene Syromiatnikov
bb9673ba1d Move MIN, MAX, and CLAMP to macros.h
We shouldn't have to include the whole defs.h to get them.

* defs.h (MIN, MAX, CLAMP): Move ...
* macros.h: ... here.
2017-11-10 17:35:18 +00:00
Eugene Syromiatnikov
f3d9348fd1 Update .mailmap
* .mailmap (Eugene Syromyatnikov): Add work address.
2017-11-10 17:35:18 +00:00
Steve McIntyre
6d87820a94 debian: update debhelper compat level to 10, replace -s with -a in some calls 2017-11-07 23:04:09 +00:00
Steve McIntyre
83e88bd659 debian: update Standards-Version to 3.9.8 2017-11-07 23:04:09 +00:00
9517cfa996 mpers.m4: check for size of long and kernel_long_t
The primary purpose of this new check is diagnostics.

* m4/mpers.m4 (st_MPERS): Check for size of long and kernel_long_t.
2017-11-06 19:21:58 +00:00
Eugene Syromyatnikov
04a65a183b xlat/gen.sh: speedup xlat generation
This commit implements the following changes:
- increases the number of concurrent jobs to twice the CPU count;
- creates a circular buffer, so instead of running multiple jobs
  at once, the generator tries to keep about the same number of jobs
  being run concurrently;
- runs gen_git and gen_make concurrently in order to squeeze in
  one more bit of concurrency.

With my deeply scientific measurements, this approach achieves
up to 15% speedup with dash and about 30-40% with bash as /bin/sh
on a 4-core machine.

* xlat/gen.sh (main): Declare pids local variable, append pid of every
run job to it; increase the limit of jobs to ncpus * 2; when the limit
is reached, wait for the first pid in pids instead of resetting jobs
to zero and waiting for all the run jobs; put gen_git and gen_make
into background.
2017-11-06 19:21:58 +00:00
4d8eedbd4f hppa: wire up statx syscall
* linux/hppa/syscallent.h [349]: Add statx entry.
2017-11-05 20:18:44 +00:00
c458ea4d77 tests: check signal mask transparency
Starting with commit v4.17-5-gf83b49b strace is expected
to forward the signal mask to tracees unchanged.

* tests/check_sigblock.c: New file.
* tests/set_sigblock.c: Likewise.
* tests/sigblock.test: New test.
* tests/.gitignore: Add check_sigblock and set_sigblock.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(MISC_TESTS): Add sigblock.test.
2017-11-04 23:43:55 +00:00
ff1bc06589 tests: check signal disposition transparency
Starting with commit v4.17-8-ge97a66f strace is expected
to forward the signal disposition to tracees unchanged.

* tests/check_sigign.c: New file.
* tests/list_sigaction_signum.c: Likewise.
* tests/set_sigign.c: Likewise.
* tests/sigign.test: New test.
* tests/.gitignore: Add check_sigign, list_sigaction_signum,
and set_sigign.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(MISC_TESTS): Add sigign.test.
2017-11-03 23:10:38 +00:00
Eugene Syromyatnikov
48cb6336d8 tests: update futex test to accommodate the recent kernel change
Kernel commit v4.14-rc1~162^2~8 refactored futex implementation and
introduced checks for invalid shift sizes.  Accommodate this change
by allowing EINVAL in the corresponding futex checks.

* tests/futex.c (CHECK_FUTEX_GENERIC): Reset errno before the syscall.
(main) <wake_ops>: Add err2 field, describe err/err2 fields.
Add EINVAL as a possible errno to the checks that contain invalid
shift values.
Update return value check so it checks that values are strictly
as expected.

Closes: https://github.com/strace/strace/pull/16
2017-11-03 20:46:47 +00:00
Eugene Syromyatnikov
052a399cce tests: cleanup futex test
* tests/futex.c (main) <wake_ops>: Remove unused errstr field
from the structure type definition.
2017-11-03 20:46:47 +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
745c53410f Add SECCOMP_RET_KILL_PROCESS decoding support
* bpf_seccomp_filter.c [!SECCOMP_RET_ACTION]: Remove.
[!SECCOMP_RET_ACTION_FULL] (SECCOMP_RET_ACTION_FULL): Define.
(print_seccomp_filter_k): Use SECCOMP_RET_ACTION_FULL
instead of SECCOMP_RET_ACTION.
* xlat/seccomp_ret_action.in: Add SECCOMP_RET_KILL_PROCESS introduced
by linux kernel commit v4.14-rc2~15^2~3.
2017-11-01 02:05:41 +00:00
01d45b6c2b Rename SECCOMP_RET_KILL to SECCOMP_RET_KILL_THREAD
Follow linux kernel commit v4.14-rc2~15^2~4 and rename SECCOMP_RET_KILL
to SECCOMP_RET_KILL_THREAD.

* xlat/seccomp_ret_action.in (SECCOMP_RET_KILL): Rename
to SECCOMP_RET_KILL_THREAD.
* tests/prctl-seccomp-filter-v.c (main): Update expected output.
* tests/seccomp-filter-v.c (main): Likewise.
2017-11-01 02:02:21 +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
2ce8a26a9a Provide fallback definitions for SECCOMP_RET_* constants
* xlat/seccomp_ret_action.in: Add fallback definitions.
2017-11-01 02:00:04 +00:00
1079428852 tests: robustify options-syntax.test against inquisitive musl
Workaround musl >= 1.1.17 ability to use AT_EXECFN during
program_invocation_name initialization.

* tests/options-syntax.test: Check for two valid variants
of "zeroargc strace" expected output.
2017-11-01 01:43:25 +00:00
73354cff1a Update MEMBARRIER_CMD_* constants
* xlat/membarrier_cmds.in: Add MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED
introduced by kernel commit v4.14-rc6~26.
* tests/membarrier.c (main): Update expected output.
2017-11-01 00:20:44 +00:00
JingPiao Chen
98e7eec333 tests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message flags
* tests/nfnetlink_nft_compat.c (test_nlmsg_flags): New function.
(main): Use it.
2017-10-31 11:59:55 +08:00
JingPiao Chen
76e1dbb539 tests: check decoding of NFNL_SUBSYS_NFTABLES netlink message flags
* tests/nfnetlink_nftables.c (test_nlmsg_flags): New function.
(main): Use it.
2017-10-31 11:59:55 +08:00
JingPiao Chen
3617415443 tests: check decoding of NFNL_SUBSYS_CTHELPER netlink message flags
* tests/nfnetlink_cthelper.c (test_nlmsg_flags): New function.
(main): Use it.
2017-10-31 11:59:55 +08:00
JingPiao Chen
148e20ccdc tests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message flags
* tests/nfnetlink_cttimeout.c (test_nlmsg_flags): New function.
(main): Use it.
2017-10-31 11:59:55 +08:00
JingPiao Chen
66e923f09d tests: check decoding of NFNL_SUBSYS_ACCT netlink message flags
* tests/nfnetlink_acct.c (test_nlmsg_flags): New function.
(main): Use it.
2017-10-31 11:59:55 +08:00
JingPiao Chen
2a23f1d638 tests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message flags
* tests/nfnetlink_ctnetlink_exp.c (test_nlmsg_flags): New function.
(main): Use it.
2017-10-31 11:59:55 +08:00
JingPiao Chen
07c91defbc tests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message flags
* tests/nfnetlink_ctnetlink.c (test_nlmsg_flags): New function.
(main): Use it.
2017-10-31 11:59:42 +08: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
b56c8dbcfb netlink: decode netlink message delete flags
* netlink.c: Include "xlat/netlink_delete_flags.h".
(decode_nlmsg_flags_crypto, decode_nlmsg_flags_route,
decode_nlmsg_flags_xfrm): Decode delete flags.
* netlink.h (NLM_F_NONREC): New macro.
* xlat/netlink_delete_flags.in: New file.
* tests/netlink_crypto.c (test_nlmsg_flags): Check this.
* tests/netlink_route.c (test_nlmsg_flags): Likewise.
* tests/netlink_xfrm.c (test_nlmsg_flags): Likewise.
2017-10-26 18:07:03 +00:00
JingPiao Chen
695de1df13 netlink: refactor decode_nlmsg_flags
Refactor decode_nlmsg_flags to make it family-specific, just like
decode_nlmsg_type and decode_payload.

* netlink.c (decode_nlmsg_flags_crypto, decode_nlmsg_flags_route,
decode_nlmsg_flags_sock_diag, decode_nlmsg_flags_xfrm): New functions.
(nlmsg_flags_decoder_t): New typedef.
(nlmsg_flags): New array.
(decode_nlmsg_flags): Use it.
2017-10-26 18:04:08 +00:00
JingPiao Chen
69c68ef5bf Workaround historic linux/netfilter/xt_osf.h deficiencies
When using linux kernel headers without commit v4.5-rc1~128^2~115^2~22
("netfilter: fix include files for compilation"), both <linux/ip.h>
and <linux/tcp.h> have to be included before <linux/netfilter/xt_osf.h>.

* configure.ac (AC_CHECK_HEADERS): Include <linux/ip.h>
and <linux/tcp.h> when checking for linux/netfilter/xt_osf.h header.
* tests/nfnetlink_osf.c: Include <linux/ip.h> and <linux/tcp.h>
before <linux/netfilter/xt_osf.h>.
2017-10-14 18:29:51 +00:00
JingPiao Chen
489d8a9564 tests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nf_tables_compat.h.
* tests/nfnetlink_nft_compat.c: New file.
* tests/gen_tests.in (nfnetlink_nft_compat): New entry.
* tests/pure_executables.list: Add nfnetlink_nft_compat.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
b27bee724d tests: check decoding of NFNL_SUBSYS_NFTABLES netlink message types
* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/nf_tables.h.
* tests/nfnetlink_nftables.c: New file.
* tests/gen_tests.in (nfnetlink_nftables): New entry.
* tests/pure_executables.list: Add nfnetlink_nftables.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
935e0629c5 tests: check decoding of NFNL_SUBSYS_CTHELPER netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_cthelper.h.
* tests/nfnetlink_cthelper.c: New file.
* tests/gen_tests.in (nfnetlink_cthelper): New entry.
* tests/pure_executables.list: Add nfnetlink_cthelper.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00