]> granicus.if.org Git - strace/log
strace
6 years agobpf: update BPF_MAP_CREATE decoding
Dmitry V. Levin [Sun, 19 Nov 2017 23:38:58 +0000 (23:38 +0000)]
bpf: update BPF_MAP_CREATE decoding

Implement decoding of union bpf_attr.numa_node field for BPF_MAP_CREATE
command introduced by linux kernel commit v4.14-rc1~130^2~196^2~1.

* configure.ac: Check for numa_node member of union bpf_attr
instead of inner_map_fd.
(decode_BPF_MAP_CREATE): Add numa_node field to the structure, print it.
* NEWS: Mention this.
* tests/bpf.c: Update macro guards of BPF_MAP_CREATE decoder test.
(init_BPF_MAP_CREATE_first, print_BPF_MAP_CREATE_attr): Update expected
output.
(init_BPF_MAP_CREATE_attr): Initialize numa_node field, update offset.

6 years agounwind.c: cleanup
Eugene Syromiatnikov [Fri, 4 Aug 2017 06:45:06 +0000 (08:45 +0200)]
unwind.c: cleanup

* unwind.c (rebuild_cache_if_invalid): Simplify return statement.

6 years agounwind.c: fix typo in comment
Eugene Syromiatnikov [Fri, 4 Aug 2017 06:36:22 +0000 (08:36 +0200)]
unwind.c: fix typo in comment

* unwind.c (unwind_cache_invalidate, unwind_print_stacktrace,
unwind_capture_stacktrace): Replace strack with stack.

6 years agoipc_shm: decode hugetlb page size in shmget flags
Dmitry V. Levin [Sat, 18 Nov 2017 01:35:20 +0000 (01:35 +0000)]
ipc_shm: decode hugetlb page size in shmget flags

Decode alternative hugetlb page sizes introduced by kernel commit
v3.8-rc1~175^2~36.

* ipc_shm.c [!SHM_HUGE_SHIFT] (SHM_HUGE_SHIFT): New macro.
[!SHM_HUGE_MASK] (SHM_HUGE_MASK): Likewise.
(SYS_FUNC(shmget)): Print hugetlb page size.
* tests/ipc_shm.c: Check it.

6 years agomemfd_create: decode hugetlb page size
Dmitry V. Levin [Sat, 18 Nov 2017 00:19:31 +0000 (00:19 +0000)]
memfd_create: decode hugetlb page size

Decode alternative hugetlb page sizes introduced by kernel commit
v4.14-rc1~126^2~17.

* configure.ac (AC_CHECK_HEADERS): Add linux/memfd.h.
* memfd_create.c [HAVE_LINUX_MEMFD_H]: Include it.
[!MFD_HUGE_SHIFT] (MFD_HUGE_SHIFT): New macro.
[!MFD_HUGE_MASK] (MFD_HUGE_MASK): Likewise.
(SYS_FUNC(memfd_create)): Print hugetlb page size.
* tests/memfd_create.c: Check it.

6 years agoPrint the first argument of memfd_create syscall as a path
Dmitry V. Levin [Sat, 18 Nov 2017 00:19:31 +0000 (00:19 +0000)]
Print the first argument of memfd_create syscall as a path

The limit imposed by the kernel on the length of memfd_create first
argument is NAME_MAX - strlen("memfd:").

* memfd_create.c (SYS_FUNC(memfd_create)): Print the first argument
using printpathn.
* tests/memfd_create.c: Check it.

6 years agomem: decode hugetlb page size in mmap flags
Dmitry V. Levin [Fri, 17 Nov 2017 18:35:06 +0000 (18:35 +0000)]
mem: decode hugetlb page size in mmap flags

Decode alternative hugetlb page sizes introduced by kernel commit
v3.8-rc1~175^2~36.

* mem.c [!MAP_HUGE_SHIFT] (MAP_HUGE_SHIFT): New macro.
[!MAP_HUGE_MASK] (MAP_HUGE_MASK): Likewise.
(print_mmap_flags): Print hugetlb page size.
* NEWS: Mention it.
* tests/remap_file_pages.c: Check it.

6 years agomem: assume that MAP_TYPE is defined
Dmitry V. Levin [Fri, 17 Nov 2017 17:47:53 +0000 (17:47 +0000)]
mem: assume that MAP_TYPE is defined

Since linux kernel provided a definition of MAP_TYPE in <asm/mman.h>
as long ago as in v2.4.0, it's safe to assume that MAP_TYPE is defined.

* mem.c (print_mmap_flags) [!MAP_TYPE]: Remove.

6 years agomem: move printing of mmap_flags to a separate function
Dmitry V. Levin [Fri, 17 Nov 2017 17:47:53 +0000 (17:47 +0000)]
mem: move printing of mmap_flags to a separate function

* mem.c (print_mmap_flags): New function.
(print_mmap, SYS_FUNC(remap_file_pages)): Use it.

6 years agoProvide fallback definitions for SHM_EXEC constant
Dmitry V. Levin [Fri, 17 Nov 2017 11:26:55 +0000 (11:26 +0000)]
Provide fallback definitions for SHM_EXEC constant

Although SHM_EXEC is available in <linux/shm.h> since kernel commit
v2.6.9-rc2~23^2~93^2~78, the glibc version of <sys/shm.h> did not
provide SHM_EXEC until commit glibc-2.10~238.

* xlat/shm_flags.in (SHM_EXEC): Add fallback definition.
* tests/shmxt.c (SHM_EXEC): Likewise.

6 years agoUpdate SHM_* constants
Dmitry V. Levin [Fri, 17 Nov 2017 00:24:41 +0000 (00:24 +0000)]
Update SHM_* constants

* xlat/shm_flags.in: Add SHM_EXEC introduced by kernel commit
v2.6.9-rc2~23^2~93^2~78.
* xlat/shm_resource_flags.in: Add SHM_NORESERVE introduced by kernel
commit v2.6.15-rc1~622.
* NEWS: Mention this.
* tests/ipc_shm.c (main): Update expected output.
* tests/shmxt.c (main): Update expected output, check SHM_EXEC decoding.

6 years agoRemove fallback definitions for SHM_STAT and SHM_INFO constants
Dmitry V. Levin [Fri, 17 Nov 2017 00:24:41 +0000 (00:24 +0000)]
Remove fallback definitions for SHM_STAT and SHM_INFO constants

These constants are universally available for quite a long time
and are used unconditionally in tests without any complaints.

* xlat/shmctl_flags.in: Remove fallback definitions.

6 years agonet: fix SOL_NETLINK NETLINK_LIST_MEMBERSHIPS decoding
Dmitry V. Levin [Thu, 16 Nov 2017 02:27:40 +0000 (02:27 +0000)]
net: fix SOL_NETLINK NETLINK_LIST_MEMBERSHIPS decoding

NETLINK_LIST_MEMBERSHIPS, unlike all other SOL_NETLINK options, requests
not just a single integer but an array of integers.  The kernel also
supports a zero optlen NETLINK_LIST_MEMBERSHIPS request.

* net.c (print_uint32): New function.
(print_getsockopt): Add ulen argument, rename len argument to rlen,
<SOL_NETLINK> Handle NETLINK_LIST_MEMBERSHIPS using print_array
and print_uint32.
(SYS_FUNC(getsockopt)): Pass ulen to print_getsockopt.
* tests/sockopt-sol_netlink.c (main): Check NETLINK_LIST_MEMBERSHIPS
decoding.

6 years agotests: check [gs]etsockopt SOL_NETLINK decoding
Dmitry V. Levin [Thu, 16 Nov 2017 00:12:46 +0000 (00:12 +0000)]
tests: check [gs]etsockopt SOL_NETLINK decoding

* tests/sockopt-sol_netlink.c: New file.
* tests/gen_tests.in (sockopt-sol_netlink): New entry.
* tests/pure_executables.list: Add sockopt-sol_netlink.
* tests/.gitignore: Likewise.

6 years agonet: fix decoding of optval argument of [gs]etsockopt SOL_NETLINK
Dmitry V. Levin [Thu, 16 Nov 2017 00:12:46 +0000 (00:12 +0000)]
net: fix decoding of optval argument of [gs]etsockopt SOL_NETLINK

Tweak the parser to follow the kernel behaviour.

* net.c (print_getsockopt, print_setsockopt) <SOL_NETLINK>: Fetch and
print returned value as integer iff the length is >= sizeof(int),
otherwise print the address.
* NEWS: Mention this.

6 years agonet: decode optname argument of [gs]etsockopt for SOL_NETLINK level
Dmitry V. Levin [Wed, 15 Nov 2017 16:36:21 +0000 (16:36 +0000)]
net: decode optname argument of [gs]etsockopt for SOL_NETLINK level

* xlat/socknetlinkoptions.in: New file.
* net.c: Include "xlat/socknetlinkoptions.h".
(print_sockopt_fd_level_name) <SOL_NETLINK>: Print name using
socknetlinkoptions.
* NEWS: Metnion this.

6 years agoUpdate MSG_* constants
Dmitry V. Levin [Wed, 15 Nov 2017 16:14:40 +0000 (16:14 +0000)]
Update MSG_* constants

* xlat/msg_flags.in: Add MSG_ZEROCOPY introduced by kernel commit
v4.14-rc1~130^2~376^2~6.
* NEWS: Mention this.

6 years agonetlink: print descriptor attributes using printfd
Dmitry V. Levin [Wed, 15 Nov 2017 15:30:49 +0000 (15:30 +0000)]
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.

6 years agomaint/update_copyright_years.sh: implement concurrent execution
Eugene Syromyatnikov [Tue, 14 Nov 2017 04:34:37 +0000 (05:34 +0100)]
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.

6 years agomaint/update_copyright_years.sh: use -efu shell mode
Eugene Syromyatnikov [Tue, 14 Nov 2017 04:33:25 +0000 (05:33 +0100)]
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.

6 years agoPost-release administrivia
Dmitry V. Levin [Tue, 14 Nov 2017 20:32:24 +0000 (20:32 +0000)]
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.

6 years agoPrepare for 4.20 release v4.20
Dmitry V. Levin [Mon, 13 Nov 2017 20:21:22 +0000 (20:21 +0000)]
Prepare for 4.20 release

* NEWS: Update for 4.20 release.

6 years agoCREDITS.in: remove entries listed by maint/gen-contributors-list.sh
Dmitry V. Levin [Mon, 13 Nov 2017 20:21:22 +0000 (20:21 +0000)]
CREDITS.in: remove entries listed by maint/gen-contributors-list.sh

6 years agoMakefile.am: use gen-contributors-list.sh for CREDITS
Eugene Syromyatnikov [Mon, 13 Nov 2017 14:27:56 +0000 (15:27 +0100)]
Makefile.am: use gen-contributors-list.sh for CREDITS

* Makefile.am ($(srcdir)/CREDITS): Employ maint/gen-contributors-list.sh
for the contributor list generation.

6 years agomaint: make gen-contributors-list.sh suitable for generation of CREDITS
Eugene Syromyatnikov [Mon, 13 Nov 2017 14:21:13 +0000 (15:21 +0100)]
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.

6 years ago.mailmap: add more entries to avoid duplication in CREDITS
Dmitry V. Levin [Mon, 13 Nov 2017 20:21:22 +0000 (20:21 +0000)]
.mailmap: add more entries to avoid duplication in CREDITS

6 years ago.mailmap: sort entries
Dmitry V. Levin [Mon, 13 Nov 2017 20:21:22 +0000 (20:21 +0000)]
.mailmap: sort entries

6 years ago.mailmap: more deduplication
Eugene Syromyatnikov [Mon, 13 Nov 2017 14:29:04 +0000 (15:29 +0100)]
.mailmap: more deduplication

Of course there are no two persons in the whole world that share
the same name.

6 years agoCREDITS.in: use UTF-8 consistently
Dmitry V. Levin [Mon, 13 Nov 2017 20:21:22 +0000 (20:21 +0000)]
CREDITS.in: use UTF-8 consistently

In particular, do not use " symbols in names.

6 years agoCREDITS.in: add Jiri Slaby as a contributor
Eugene Syromyatnikov [Mon, 13 Nov 2017 16:34:37 +0000 (17:34 +0100)]
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

6 years agos390, s390x: update ioctl entries from linux 4.14
Gleb Fotengauer-Malinovskiy [Mon, 13 Nov 2017 18:36:44 +0000 (21:36 +0300)]
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.

6 years agos390x: remove some of non-s390 KVM ioctls
Gleb Fotengauer-Malinovskiy [Mon, 13 Nov 2017 18:29:23 +0000 (21:29 +0300)]
s390x: remove some of non-s390 KVM ioctls

* linux/s390x/ioctls_arch0.h: Regenerate.

6 years agomaint: remove KVM_PPC_CONFIGURE_V3_MMU ioctl from non-powerpc arches
Gleb Fotengauer-Malinovskiy [Mon, 13 Nov 2017 18:28:56 +0000 (21:28 +0300)]
maint: remove KVM_PPC_CONFIGURE_V3_MMU ioctl from non-powerpc arches

* maint/ioctls_sym.sh (ppc_list): Update.

6 years agoUpdate copyright headers
Dmitry V. Levin [Sun, 12 Nov 2017 00:11:06 +0000 (00:11 +0000)]
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.

6 years agomaint/update_copyright_years.sh: fix typo in help output
Dmitry V. Levin [Sat, 11 Nov 2017 23:08:09 +0000 (23:08 +0000)]
maint/update_copyright_years.sh: fix typo in help output

* maint/update_copyright_years.sh (print_help): Fix typo, disable
here-document expansion.

6 years agoMove MIN, MAX, and CLAMP to macros.h
Eugene Syromiatnikov [Thu, 9 Nov 2017 16:39:18 +0000 (17:39 +0100)]
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.

6 years agoUpdate .mailmap
Eugene Syromiatnikov [Fri, 10 Nov 2017 17:35:18 +0000 (18:35 +0100)]
Update .mailmap

* .mailmap (Eugene Syromyatnikov): Add work address.

6 years agodebian: update debhelper compat level to 10, replace -s with -a in some calls
Steve McIntyre [Fri, 16 Dec 2016 10:24:28 +0000 (10:24 +0000)]
debian: update debhelper compat level to 10, replace -s with -a in some calls

6 years agodebian: update Standards-Version to 3.9.8
Steve McIntyre [Fri, 16 Dec 2016 10:23:53 +0000 (10:23 +0000)]
debian: update Standards-Version to 3.9.8

6 years agompers.m4: check for size of long and kernel_long_t
Dmitry V. Levin [Mon, 6 Nov 2017 19:21:58 +0000 (19:21 +0000)]
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.

6 years agoxlat/gen.sh: speedup xlat generation
Eugene Syromyatnikov [Sat, 16 Sep 2017 00:30:40 +0000 (02:30 +0200)]
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.

6 years agohppa: wire up statx syscall
Dmitry V. Levin [Sun, 5 Nov 2017 20:18:44 +0000 (20:18 +0000)]
hppa: wire up statx syscall

* linux/hppa/syscallent.h [349]: Add statx entry.

6 years agotests: check signal mask transparency
Dmitry V. Levin [Sat, 4 Nov 2017 23:43:55 +0000 (23:43 +0000)]
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.

6 years agotests: check signal disposition transparency
Dmitry V. Levin [Fri, 3 Nov 2017 23:10:38 +0000 (23:10 +0000)]
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.

6 years agotests: update futex test to accommodate the recent kernel change
Eugene Syromyatnikov [Fri, 3 Nov 2017 02:45:00 +0000 (03:45 +0100)]
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
6 years agotests: cleanup futex test
Eugene Syromyatnikov [Fri, 3 Nov 2017 02:45:00 +0000 (03:45 +0100)]
tests: cleanup futex test

* tests/futex.c (main) <wake_ops>: Remove unused errstr field
from the structure type definition.

6 years agoseccomp: decode SECCOMP_GET_ACTION_AVAIL operation
Dmitry V. Levin [Thu, 2 Nov 2017 00:21:57 +0000 (00:21 +0000)]
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.

6 years agoAdd SECCOMP_RET_KILL_PROCESS decoding support
Dmitry V. Levin [Wed, 1 Nov 2017 02:05:41 +0000 (02:05 +0000)]
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.

6 years agoRename SECCOMP_RET_KILL to SECCOMP_RET_KILL_THREAD
Dmitry V. Levin [Wed, 1 Nov 2017 02:02:21 +0000 (02:02 +0000)]
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.

6 years agoUpdate SECCOMP_* constants
Dmitry V. Levin [Wed, 1 Nov 2017 01:50:59 +0000 (01:50 +0000)]
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.

6 years agoProvide fallback definitions for SECCOMP_RET_* constants
Dmitry V. Levin [Wed, 1 Nov 2017 02:00:04 +0000 (02:00 +0000)]
Provide fallback definitions for SECCOMP_RET_* constants

* xlat/seccomp_ret_action.in: Add fallback definitions.

6 years agotests: robustify options-syntax.test against inquisitive musl
Dmitry V. Levin [Wed, 1 Nov 2017 01:43:25 +0000 (01:43 +0000)]
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.

6 years agoUpdate MEMBARRIER_CMD_* constants
Dmitry V. Levin [Wed, 1 Nov 2017 00:20:44 +0000 (00:20 +0000)]
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.

6 years agotests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message flags
JingPiao Chen [Sat, 28 Oct 2017 01:03:19 +0000 (09:03 +0800)]
tests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message flags

* tests/nfnetlink_nft_compat.c (test_nlmsg_flags): New function.
(main): Use it.

6 years agotests: check decoding of NFNL_SUBSYS_NFTABLES netlink message flags
JingPiao Chen [Sat, 28 Oct 2017 01:01:27 +0000 (09:01 +0800)]
tests: check decoding of NFNL_SUBSYS_NFTABLES netlink message flags

* tests/nfnetlink_nftables.c (test_nlmsg_flags): New function.
(main): Use it.

6 years agotests: check decoding of NFNL_SUBSYS_CTHELPER netlink message flags
JingPiao Chen [Sat, 28 Oct 2017 00:58:44 +0000 (08:58 +0800)]
tests: check decoding of NFNL_SUBSYS_CTHELPER netlink message flags

* tests/nfnetlink_cthelper.c (test_nlmsg_flags): New function.
(main): Use it.

6 years agotests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message flags
JingPiao Chen [Sat, 28 Oct 2017 00:55:44 +0000 (08:55 +0800)]
tests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message flags

* tests/nfnetlink_cttimeout.c (test_nlmsg_flags): New function.
(main): Use it.

6 years agotests: check decoding of NFNL_SUBSYS_ACCT netlink message flags
JingPiao Chen [Sat, 28 Oct 2017 00:50:51 +0000 (08:50 +0800)]
tests: check decoding of NFNL_SUBSYS_ACCT netlink message flags

* tests/nfnetlink_acct.c (test_nlmsg_flags): New function.
(main): Use it.

6 years agotests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message flags
JingPiao Chen [Sat, 28 Oct 2017 00:46:39 +0000 (08:46 +0800)]
tests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message flags

* tests/nfnetlink_ctnetlink_exp.c (test_nlmsg_flags): New function.
(main): Use it.

6 years agotests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message flags
JingPiao Chen [Mon, 18 Sep 2017 12:25:13 +0000 (20:25 +0800)]
tests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message flags

* tests/nfnetlink_ctnetlink.c (test_nlmsg_flags): New function.
(main): Use it.

6 years agonetlink: decode NETLINK_NETFILTER netlink message flags
JingPiao Chen [Mon, 18 Sep 2017 12:13:14 +0000 (20:13 +0800)]
netlink: decode NETLINK_NETFILTER netlink message flags

* netlink.c (decode_nlmsg_flags_netfilter): New function.
(nlmsg_flags): Add NETLINK_NETFILTER.
* NEWS: Mention this.

6 years agonetlink: decode netlink message delete flags
JingPiao Chen [Thu, 21 Sep 2017 01:25:38 +0000 (09:25 +0800)]
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.

6 years agonetlink: refactor decode_nlmsg_flags
JingPiao Chen [Sat, 9 Sep 2017 15:43:20 +0000 (23:43 +0800)]
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.

6 years agoWorkaround historic linux/netfilter/xt_osf.h deficiencies
JingPiao Chen [Wed, 11 Oct 2017 14:41:50 +0000 (22:41 +0800)]
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>.

6 years agotests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message types
JingPiao Chen [Sat, 9 Sep 2017 11:10:17 +0000 (19:10 +0800)]
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.

6 years agotests: check decoding of NFNL_SUBSYS_NFTABLES netlink message types
JingPiao Chen [Sat, 9 Sep 2017 11:07:21 +0000 (19:07 +0800)]
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.

6 years agotests: check decoding of NFNL_SUBSYS_CTHELPER netlink message types
JingPiao Chen [Sat, 9 Sep 2017 11:03:28 +0000 (19:03 +0800)]
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.

6 years agotests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:59:46 +0000 (18:59 +0800)]
tests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message types

* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_cttimeout.h.
* tests/nfnetlink_cttimeout.c: New file.
* tests/gen_tests.in (nfnetlink_cttimeout): New entry.
* tests/pure_executables.list: Add nfnetlink_cttimeout.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of NFNL_SUBSYS_ACCT netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:54:08 +0000 (18:54 +0800)]
tests: check decoding of NFNL_SUBSYS_ACCT netlink message types

* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_acct.h.
* tests/nfnetlink_acct.c: New file.
* tests/gen_tests.in (nfnetlink_acct): New entry.
* tests/pure_executables.list: Add nfnetlink_acct.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of NFNL_SUBSYS_IPSET netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:50:47 +0000 (18:50 +0800)]
tests: check decoding of NFNL_SUBSYS_IPSET netlink message types

* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/ipset/ip_set.h.
* tests/nfnetlink_ipset.c: New file.
* tests/gen_tests.in (nfnetlink_ipset): New entry.
* tests/pure_executables.list: Add nfnetlink_ipset.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of NFNL_SUBSYS_OSF netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:46:40 +0000 (18:46 +0800)]
tests: check decoding of NFNL_SUBSYS_OSF netlink message types

* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/xt_osf.h.
* tests/nfnetlink_osf.c: New file.
* tests/gen_tests.in (nfnetlink_osf): New entry.
* tests/pure_executables.list: Add nfnetlink_osf.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of NFNL_SUBSYS_ULOG netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:42:50 +0000 (18:42 +0800)]
tests: check decoding of NFNL_SUBSYS_ULOG netlink message types

* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_log.h.
* tests/nfnetlink_ulog.c: New file.
* tests/gen_tests.in (nfnetlink_ulog): New entry.
* tests/pure_executables.list: Add nfnetlink_ulog.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of NFNL_SUBSYS_QUEUE netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:39:10 +0000 (18:39 +0800)]
tests: check decoding of NFNL_SUBSYS_QUEUE netlink message types

* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_queue.h.
* tests/nfnetlink_queue.c: New file.
* tests/gen_tests.in (nfnetlink_queue): New entry.
* tests/pure_executables.list: Add nfnetlink_queue.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:35:19 +0000 (18:35 +0800)]
tests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message types

* tests/nfnetlink_ctnetlink_exp.c: New file.
* tests/gen_tests.in (nfnetlink_ctnetlink_exp): New entry.
* tests/pure_executables.list: Add nfnetlink_ctnetlink_exp.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message types
JingPiao Chen [Sat, 9 Sep 2017 10:29:12 +0000 (18:29 +0800)]
tests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message types

* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_conntrack.h.
* tests/nfnetlink_ctnetlink.c: New file.
* tests/gen_tests.in (nfnetlink_ctnetlink): New entry.
* tests/pure_executables.list: Add nfnetlink_ctnetlink.
* tests/.gitignore: Likewise.

6 years agonetlink: decode NETLINK_NETFILTER netlink message types
JingPiao Chen [Sat, 9 Sep 2017 09:42:41 +0000 (17:42 +0800)]
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.

6 years agoppc64: fix sigreturn parser for ppc personality
Dmitry V. Levin [Wed, 20 Sep 2017 00:15:02 +0000 (00:15 +0000)]
ppc64: fix sigreturn parser for ppc personality

* linux/powerpc/arch_sigreturn.c (arch_sigreturn) [POWERPC64]: Rewrite.

6 years agoppc64: truncate syscall args for 32-bit personality tracees
Dmitry V. Levin [Wed, 20 Sep 2017 00:15:02 +0000 (00:15 +0000)]
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.

6 years agoppc64: fix PRI__64 macro definition when compiled with -m32
Dmitry V. Levin [Wed, 20 Sep 2017 00:15:02 +0000 (00:15 +0000)]
ppc64: fix PRI__64 macro definition when compiled with -m32

* kernel_types.h [SIZEOF_LONG != 4]: Check for __powerpc64__ instead
of POWERPC to handle -m32 case properly.

6 years agoloop: decode LOOP_SET_BLOCK_SIZE
Dmitry V. Levin [Tue, 19 Sep 2017 11:32:05 +0000 (11:32 +0000)]
loop: decode LOOP_SET_BLOCK_SIZE

* loop.c (loop_ioctl) <LOOP_SET_BLOCK_SIZE>: Handle LOOP_SET_BLOCK_SIZE.
* tests/ioctl_loop.c (main): Check it.

6 years agoUpdate ioctl entries from linux v4.14-rc1
Dmitry V. Levin [Tue, 19 Sep 2017 11:32:05 +0000 (11:32 +0000)]
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.

6 years agomaint: generate ioctl entries without target architecture code execution
Gleb Fotengauer-Malinovskiy [Tue, 12 Sep 2017 17:13:12 +0000 (20:13 +0300)]
maint: generate ioctl entries without target architecture code execution

ioctls_sym.sh used to generate and invoke target architecture
executables that limited its applicability.
After this change, the generated code is just compiled to the target
architecture object files and all required information is obtained
from the dwarf sections.
This approach allows to generate ioctl entries for any target
architecture supported by compiler.

* maint/ioctls_sym.awk: New file.
* maint/ioctls_sym.sh (LC_ALL): Define to C and export.
(uname_m): Make configurable.
(CFLAGS): Add -gdwarf-2.
(LDFLAGS): Remove.
Do not use print_ioctlent.c.
Change asm-generic/ioctl.h and asm/ioctl.h hook.
Dump and process dwarf sections of generated object files.
* maint/print_ioctlent.c: Remove.

6 years agoRemove KVM_S390_* ioctls from non-s390 architectures
Dmitry V. Levin [Mon, 18 Sep 2017 11:26:04 +0000 (11:26 +0000)]
Remove KVM_S390_* ioctls from non-s390 architectures

* maint/ioctls_sym.sh <linux/kvm.h> (s390_list): New variable.
Use it to exclude KVM_S390_* ioctls on non-s390 architectures.
* linux/arm/ioctls_arch0.h: Regenerate.
* linux/i386/ioctls_arch0.h: Likewise.
* linux/powerpc/ioctls_arch0.h: Likewise.
* linux/s390/ioctls_arch0.h: Likewise.
* linux/x86_64/ioctls_arch0.h: Likewise.

6 years agoRemove some of arch-specific KVM ioctls from non-matching architectures
Dmitry V. Levin [Sun, 17 Sep 2017 12:04:11 +0000 (12:04 +0000)]
Remove some of arch-specific KVM ioctls from non-matching architectures

* maint/ioctls_sym.sh (arm_list, ppc_list, x86_list): Use bracket
expressions to generalize arch-specific regular expressions.
* linux/arm/ioctls_arch0.h: Regenerate.
* linux/i386/ioctls_arch0.h: Likewise.
* linux/powerpc/ioctls_arch0.h: Likewise.
* linux/s390/ioctls_arch0.h: Likewise.
* linux/x86_64/ioctls_arch0.h: Likewise.

6 years agodm: add support for DM_DEV_ARM_POLL
Eugene Syromyatnikov [Sun, 17 Sep 2017 01:51:51 +0000 (03:51 +0200)]
dm: add support for DM_DEV_ARM_POLL

Added in Linux commit v4.13-rc1~137^2~14.

* dm.c [!DM_LIST_VERSIONS] (DM_LIST_VERSIONS): Add leading zero.
[!DM_TARGET_MSG] (DM_TARGET_MSG): Likewise.
[!DM_DEV_SET_GEOMETRY_CMD] (DM_DEV_SET_GEOMETRY_CMD): Likewise.
[!DM_DEV_ARM_POLL] (DM_DEV_ARM_POLL): New macro.
(dm_ioctl_has_params, dm_ioctl): Handle DM_DEV_ARM_POLL.
* tests/ioctl_dm.c [!DM_DEV_ARM_POLL] (DM_DEV_ARM_POLL): New macro.
(main) <dummy_check_cmds>: Add DM_DEV_ARM_POLL.

6 years agokcmp: add KCMP_EPOLL_TFD support
Eugene Syromyatnikov [Sat, 16 Sep 2017 01:05:33 +0000 (03:05 +0200)]
kcmp: add KCMP_EPOLL_TFD support

* configure.ac (AC_CHECK_TYPES): Add check for struct kcmp_epoll_slot.
* kcmp.c (SYS_FUNC(kcmp)) <case KCMP_EPOLL_TFD>: Implement idx1/idx2
argument parsing.
* tests/kcmp.c: Update test.
* xlat/kcmp_types.in (KCMP_EPOLL_TFD): New entry.

6 years agotests: add kcmp-y test
Eugene Syromyatnikov [Sat, 16 Sep 2017 01:04:40 +0000 (03:04 +0200)]
tests: add kcmp-y test

It is not very useful as of now, but it will allow tracking changes
in fd output once they are implemented.

* tests/gen_tests.in (kcmp-y): New test.
* tests/kcmp-y.c: New file, wrapper for kcmp.c
* tests/kcmp.c: Add opening of some files for which info may be printed
in the future.
* tests/pure_executables.list: Add kcmp-y.
* tests/.gitignore: Likewise.

6 years agokcmp: output fds using a separate function
Eugene Syromyatnikov [Sat, 16 Sep 2017 01:02:16 +0000 (03:02 +0200)]
kcmp: output fds using a separate function

This is a preparation for the future introduction of cross-NS PID
derivation, which would enable us to print fd information for fds
related to all processes, not just traced ones.

Note the change in output type for idx1/idx2 in KCMP_FILE command from
unsigned to int, it follows printfd output format.

* kcmp.c (printpidfd): New function.
(PRINT_FIELD_PIDFD): New macro.
(SYS_FUNC(kcmp)) <case KCMP_FILE>: Use printpidfd for printing
idx1/idx2, as they are fds, after all.

6 years agotests/kcmp: add more checks
Eugene Syromyatnikov [Sat, 16 Sep 2017 00:59:10 +0000 (02:59 +0200)]
tests/kcmp: add more checks

Let's check all kcmp commands that they indeed do not print idx1/idx2.
Also, check that upper bits of pid arguments are ignored.

* tests/gen_tests.in (kcmp): Decrease -a argument's value from 27 to 22.
* tests/kcmp.c: Add checks for upper bits of pid1/pid2 and for all
kcmp types not tested before.

6 years agotests/kcmp: use <linux/kcmp.h> if it is available
Eugene Syromyatnikov [Sat, 16 Sep 2017 00:56:14 +0000 (02:56 +0200)]
tests/kcmp: use <linux/kcmp.h> if it is available

I see it as a good idea to stick to system headers whenever possible
in order to also check for possible discrepancies between strace's
internal definitions and definitions present in the system headers.

* configure.ac (AC_CHECK_HEADERS): Add linux/kcmp.h.
* tests/kcmp.h [HAVE_LINUX_KCMP_H]: Include <linux/kcmp.h>,
do not define KCMP_FILE and KCMP_SYSVSEM.

6 years agotests: check decoding of MDBA_ROUTER_PORT netlink attribute
JingPiao Chen [Sat, 9 Sep 2017 01:49:35 +0000 (09:49 +0800)]
tests: check decoding of MDBA_ROUTER_PORT netlink attribute

* tests/nlattr_mdba_router_port.c: New file.
* tests/gen_tests.in (nlattr_mdba_router_port): New entry.
* tests/pure_executables.list: Add nlattr_mdba_router_port.
* tests/.gitignore: Likewise.

6 years agotests: check decoding of MDBA_MDB_ENTRY_INFO netlink attributes
JingPiao Chen [Sat, 9 Sep 2017 01:38:11 +0000 (09:38 +0800)]
tests: check decoding of MDBA_MDB_ENTRY_INFO netlink attributes

* tests/nlattr_mdba_mdb_entry.c: New file.
* tests/gen_tests.in (nlattr_mdba_mdb_entry): New entry.
* tests/pure_executables.list: Add nlattr_mdba_mdb_entry.
* tests/.gitignore: Likewise.

6 years agotests: extend TEST_NESTED_NLATTR_OBJECT macro
JingPiao Chen [Sat, 9 Sep 2017 01:30:01 +0000 (09:30 +0800)]
tests: extend TEST_NESTED_NLATTR_OBJECT macro

Extend TEST_NESTED_NLATTR_OBJECT macro for multi-nested netlink
attributes, such as

[MDBA_MDB] = {
[MDBA_MDB_ENTRY] = {
[MDBA_MDB_ENTRY_INFO] {
struct br_mdb_entry
[MDBA_MDB_EATTR attributes]
}
}
}

* tests/test_nlattr.h (TEST_NESTED_NLATTR_OBJECT_EX_,
TEST_NESTED_NLATTR_OBJECT_EX): New macros.
(TEST_NESTED_NLATTR_OBJECT): Use TEST_NESTED_NLATTR_OBJECT_EX_.

6 years agortnl_mdb: decode br_port_msg netlink attributes
JingPiao Chen [Mon, 4 Sep 2017 14:27:02 +0000 (22:27 +0800)]
rtnl_mdb: decode br_port_msg netlink attributes

* configure.ac (AC_CHECK_TYPES): Check for struct br_mdb_entry
in <linux/if_bridge.h>.
(AC_CHECK_MEMBERS): Check for flags and vid fields in struct br_mdb_entry.
* rtnl_mdb.c: Include "xlat/mdb_flags.h", "xlat/mdb_states.h",
"xlat/rtnl_mdba_mdb_attrs.h", "xlat/rtnl_mdba_mdb_eattr_attrs.h",
"xlat/rtnl_mdba_mdb_entry_attrs.h" ,"xlat/rtnl_mdba_router_attrs.h"
and "xlat/rtnl_mdba_router_pattr_attrs.h".
(decode_mdba_mdb_entry_info, decode_mdba_mdb_entry,
decode_mdba_mdb, decode_multicast_router_type,
decode_mdba_router_port, decode_mdba_router): New functions.
(mdba_mdb_eattr_nla_decoders, mdba_mdb_entry_nla_decoders,
mdba_mdb_nla_decoders, mdba_router_pattr_nla_decoders,
mdba_router_nla_decoders, br_port_msg_nla_decoders): New arrays.
(decode_br_port_msg): Use br_port_msg_nla_decoders.
* xlat/mdb_flags.in: New file.
* xlat/mdb_states.in: Likewise.
* xlat/multicast_router_types.in: Likewise.
* xlat/rtnl_mdba_mdb_attrs.in: Likewise.
* xlat/rtnl_mdba_mdb_eattr_attrs.in: Likewise.
* xlat/rtnl_mdba_mdb_entry_attrs.in: Likewise.
* xlat/rtnl_mdba_router_attrs.in: Likewise.
* xlat/rtnl_mdba_router_pattr_attrs.in: Likewise.

6 years agonetlink: implement decoding of INET_DIAG_CLASS_ID attribute
Dmitry V. Levin [Sat, 16 Sep 2017 17:44:29 +0000 (17:44 +0000)]
netlink: implement decoding of INET_DIAG_CLASS_ID attribute

This is a new netlink attribute introduced by linux kernel commit
v4.14-rc1~130^2~207.

* linux/inet_diag.h (INET_DIAG_CLASS_ID): New enum.
* netlink_inet_diag.c (inet_diag_msg_nla_decoders): Add
INET_DIAG_CLASS_ID.
* xlat/inet_diag_attrs.in: Add INET_DIAG_CLASS_ID.
* xlat/inet_diag_extended_flags.in: Add 1<<(INET_DIAG_CLASS_ID-1).
* tests/nlattr_inet_diag_msg.c (main): Check INET_DIAG_CLASS_ID
decoding.

6 years agoUpdate MEMBARRIER_CMD_* constants
Dmitry V. Levin [Fri, 15 Sep 2017 16:06:14 +0000 (16:06 +0000)]
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.

6 years agoUpdate UFFD_FEATURE_* constants
Dmitry V. Levin [Thu, 14 Sep 2017 15:52:54 +0000 (15:52 +0000)]
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.

6 years agoUpdate MFD_* constants
Dmitry V. Levin [Wed, 13 Sep 2017 15:50:37 +0000 (15:50 +0000)]
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.

6 years agoUpdate ETH_P_* constants
Dmitry V. Levin [Tue, 12 Sep 2017 15:46:35 +0000 (15:46 +0000)]
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.

6 years agoUpdate ARPHRD_* constants
Dmitry V. Levin [Mon, 11 Sep 2017 15:43:36 +0000 (15:43 +0000)]
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.