release-request-ccd04736-6e66-4825-a227-ecd69d8b5337-for-git_oc-mr1-release-4163697 snap-temp-L79500000080559163

Change-Id: I98acc548cdc11ac59bd95a6b95b4849cf21456f2
diff --git a/Android.mk b/Android.mk
index c348c1a..b2a8fcf 100644
--- a/Android.mk
+++ b/Android.mk
@@ -16,32 +16,10 @@
 
 LOCAL_PATH := $(call my-dir)
 
-#
-# To update:
-#
-
-#  repo sync .
-#  repo start merge .
-#  git merge aosp/upstream-master --no-ff # resolve any conflicts
-#  ./configure && make
-#  mm -j32
-#  # (Make any necessary Android.mk changes and test the new strace.)
-#  # Beware the .gitignore files --- xlat especially.
-#  git commit -a --amend
-#
-
-# We don't currently have a good solution for the 'configure' side of things.
-# You can get a list of the HAVE_* variables in use and manually go through it:
-#
-#   find . -name "*.[ch]" | xargs grep HAVE_ | sed 's/.*\(HAVE_[A-Z0-9_]*\).*/\1/p' | grep -v HAVE_DECL_ | sort | uniq -d
-
-# -------------------------------------------------------------------------
+ifneq ($(strip $(TARGET_ARCH)),mips)
 
 include $(CLEAR_VARS)
 
-strace_version := "4.17"
-strace_year := "2017"
-
 LOCAL_SRC_FILES := \
     access.c \
     affinity.c \
@@ -60,6 +38,8 @@
     desc.c \
     dirent.c \
     dirent64.c \
+    dm.c \
+    dyxlat.c \
     epoll.c \
     evdev.c \
     eventfd.c \
@@ -120,6 +100,8 @@
     mtd.c \
     net.c \
     netlink.c \
+    netlink_sock_diag.c \
+    nlattr.c \
     nsfs.c \
     numa.c \
     oldstat.c \
@@ -206,112 +188,15 @@
     v4l2.c \
     wait.c \
     xattr.c \
+    xlat.c \
     xmalloc.c \
 
-LOCAL_CFLAGS := \
-    -DGETGROUPS_T=gid_t \
-    \
-    -UHAVE_ASM_CACHECTL_H \
-    -DHAVE_ASM_SIGCONTEXT_H=1 \
-    -DHAVE_BLKGETSIZE64=1 \
-    -UHAVE_BLUETOOTH_BLUETOOTH_H \
-    -DHAVE___BUILTIN_POPCOUNT=1 \
-    -DHAVE_DIRENT_H=1 \
-    -DHAVE_DLADDR=1 \
-    -DHAVE_ELF_H=1 \
-    -DHAVE_FOPEN64=1 \
-    -DHAVE_FORK=1 \
-    -DHAVE_FSTATAT=1 \
-    -DHAVE_FTRUNCATE=1 \
-    -DHAVE_FUTIMENS=1 \
-    -DHAVE_IF_INDEXTONAME=1 \
-    -DHAVE_INET_NTOP=1 \
-    -DHAVE_INET_PTON=1 \
-    -DHAVE_INTTYPES_H=1 \
-    -DHAVE_LINUX_BPF_H=1 \
-    -DHAVE_LINUX_BSG_H=1 \
-    -DHAVE_LINUX_BTRFS_H=1 \
-    -DHAVE_LINUX_FALLOC_H=1 \
-    -DHAVE_LINUX_FILTER_H=1 \
-    -DHAVE_LINUX_FUTEX_H=1 \
-    -DHAVE_LINUX_ICMP_H=1 \
-    -DHAVE_LINUX_IF_PACKET_H=1 \
-    -DHAVE_LINUX_INPUT_H=1 \
-    -DHAVE_LINUX_IN6_H=1 \
-    -DHAVE_LINUX_IPC_H=1 \
-    -DHAVE_LINUX_MQUEUE=1 \
-    -DHAVE_LINUX_MSG_H=1 \
-    -DHAVE_LINUX_NETLINK_H=1 \
-    -DHAVE_LINUX_PERF_EVENT_H=1 \
-    -DHAVE_LINUX_SEM_H=1 \
-    -DHAVE_LINUX_SHM_H=1 \
-    -DHAVE_LITTLE_ENDIAN_LONG_LONG=1 \
-    -DHAVE_LONG_LONG=1 \
-    -DHAVE_NETINET_TCP_H=1 \
-    -DHAVE_NETINET_UDP_H=1 \
-    -DHAVE_POLL_H=1 \
-    -DHAVE_PRCTL=1 \
-    -DHAVE_PWRITEV=1 \
-    -DHAVE_SCSI_SG_H=1 \
-    -DHAVE_SENDMSG=1 \
-    -DHAVE_SIGACTION=1 \
-    -DHAVE_SIG_ATOMIC_T=1 \
-    -DHAVE_SIGINFO_T=1 \
-    -DHAVE_SIGINFO_T_SI_OVERRUN=1 \
-    -DHAVE_SIGINFO_T_SI_SYSCALL=1 \
-    -DHAVE_SIGINFO_T_SI_TIMERID=1 \
-    -DHAVE_STATFS64=1 \
-    -DHAVE_STDBOOL_H=1 \
-    -DHAVE_STRERROR=1 \
-    -DHAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START=1 \
-    -DHAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS=1 \
-    -DHAVE_STRUCT_FLOCK=1 \
-    -DHAVE_STRUCT_FLOCK64=1 \
-    -DHAVE_STRUCT_MMSGHDR=1 \
-    -DHAVE_STRUCT_MSGHDR_MSG_CONTROL=1 \
-    -DHAVE_STRUCT_SIGCONTEXT=1 \
-    -DHAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD=1 \
-    -DHAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID=1 \
-    -DHAVE_STRUCT_STATFS64=1 \
-    -UHAVE_STRUCT_STAT_ST_ACLCNT \
-    -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 \
-    -DHAVE_STRUCT_STAT_ST_BLOCKS=1 \
-    -UHAVE_STRUCT_STAT_ST_FLAGS \
-    -UHAVE_STRUCT_STAT_ST_FSTYPE \
-    -UHAVE_STRUCT_STAT_ST_GEN \
-    -UHAVE_STRUCT_STAT_ST_LEVEL \
-    -DHAVE_STRUCT_STAT_ST_RDEV=1 \
-    -DHAVE_STRUCT_SYSINFO_FREEHIGH=1 \
-    -DHAVE_STRUCT_SYSINFO_MEM_UNIT=1 \
-    -DHAVE_STRUCT_SYSINFO_TOTALHIGH=1 \
-    -DHAVE_STRUCT_UTSNAME_DOMAINNAME=1 \
-    -DHAVE_SYS_EPOLL_H=1 \
-    -DHAVE_SYS_IOCTL_H=1 \
-    -DHAVE_SYS_POLL_H=1 \
-    -DHAVE_SYS_REG_H=1 \
-    -DHAVE_SYS_VFS_H=1 \
-    -DHAVE_SYS_XATTR_H=1 \
-    -DHAVE_UNISTD_H=1 \
-    -DHAVE_UTIMENSAT=1 \
-    \
-    -DMAJOR_IN_SYSMACROS \
-    -DPACKAGE_NAME='"strace"' \
-    -DPACKAGE_URL='"https://strace.io"' \
-    -DPACKAGE_VERSION='$(strace_version)' \
-    -DCOPYRIGHT_YEAR='$(strace_year)' \
-    -DSIZEOF_KERNEL_LONG_T=SIZEOF_LONG \
-    -DSIZEOF_OFF_T=SIZEOF_LONG \
-    -DSIZEOF_LONG_LONG=8 \
-    -DSTDC_HEADERS=1 \
-    -DSTRACE_KNOWS_ONLY_EABI=1 \
-    -D_LFS64_LARGEFILE=1 \
-
-LOCAL_CFLAGS += -D_GNU_SOURCE=1 -D_POSIX_SOURCE=1
-
-LOCAL_CFLAGS += -fno-strict-aliasing
-
-LOCAL_CFLAGS_32 += -DSIZEOF_LONG=4 -DSIZEOF_RLIM_T=4 -DHAVE_STRUCT_STAT64=1
-LOCAL_CFLAGS_64 += -DSIZEOF_LONG=8 -DSIZEOF_RLIM_T=8
+# We have "config.h", but since we're using one file for both LP32 and LP64,
+# we need to set the hard-coded size #defines here instead.
+LOCAL_CFLAGS := -DHAVE_CONFIG_H
+LOCAL_CFLAGS_32 += -DSIZEOF_LONG_LONG=8 -DSIZEOF_LONG=4 -DSIZEOF_RLIM_T=4 -DHAVE_STRUCT_STAT64=1
+LOCAL_CFLAGS_64 += -DSIZEOF_LONG_LONG=8 -DSIZEOF_LONG=8 -DSIZEOF_RLIM_T=8
+LOCAL_CFLAGS += -DSIZEOF_KERNEL_LONG_T=SIZEOF_LONG -DSIZEOF_OFF_T=SIZEOF_LONG
 
 LOCAL_CFLAGS_arm += -DARM=1
 LOCAL_CFLAGS_arm += -DHAVE_STRUCT___OLD_KERNEL_STAT=1
@@ -331,12 +216,12 @@
 
 LOCAL_CFLAGS += \
     -Wall \
-    -Wwrite-strings \
-    -Wsign-compare \
+    -Werror \
     -Wno-missing-field-initializers \
     -Wno-pointer-arith \
     -Wno-unused-parameter \
     -Wno-sign-compare \
+    -fno-strict-aliasing \
 
 LOCAL_C_INCLUDES_arm := $(LOCAL_PATH)/linux/arm $(LOCAL_PATH)/linux
 LOCAL_C_INCLUDES_arm64 := $(LOCAL_PATH)/linux/aarch64 $(LOCAL_PATH)/linux
@@ -345,14 +230,12 @@
 LOCAL_C_INCLUDES_x86 := $(LOCAL_PATH)/linux/i386 $(LOCAL_PATH)/linux
 LOCAL_C_INCLUDES_x86_64 := $(LOCAL_PATH)/linux/x86_64 $(LOCAL_PATH)/linux
 
-LOCAL_CLANG := true
-
 LOCAL_MODULE := strace
 
 LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
 
 LOCAL_MODULE_TAGS := debug
 
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
 include $(BUILD_EXECUTABLE)
+
+endif
diff --git a/COPYING b/COPYING
index 168a715..a359208 100644
--- a/COPYING
+++ b/COPYING
@@ -3,8 +3,8 @@
 Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
 Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
 Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
-Copyright (C) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
-Copyright (C) 2001-2017 The strace developers.
+Copyright (c) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
+Copyright (c) 2001-2017 The strace developers.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/CREDITS b/CREDITS
index d4fade1..a59c8dd 100644
--- a/CREDITS
+++ b/CREDITS
@@ -56,6 +56,7 @@
 	Erik Johansson <erik@ejohansson.se>
 	Etienne Gemsa <etienne.gemsa@lse.epita.fr>
 	Eugene Syromyatnikov <evgsyr@gmail.com>
+	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
 	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
 	Fabien Siron <fabien.siron@epita.fr>
 	Fei Jie <feij.fnst@cn.fujitsu.com>
@@ -97,6 +98,7 @@
 	Katerina Koukiou <k.koukiou@googlemail.com>
 	Keith Owens <kaos.ocs@gmail.com>
 	Keith Thompson <kst@alsys.com>
+	Khem Raj <raj.khem@gmail.com>
 	Kirill A. Shutemov <kirill@shutemov.name>
 	Kyle McMartin <kyle@mcmartin.ca>
 	Lai JiangShan <laijs@cn.fujitsu.com>
@@ -123,6 +125,7 @@
 	Mike Frysinger <vapier@gentoo.org>
 	Mike Stroyan <mike.stroyan@hp.com>
 	Mikulas Patocka <mpatocka@redhat.com>
+	Miroslav Lichvar <mlichvar@redhat.com>
 	Muttley Meen <muttley.meen@gmail.com>
 	Nahim El Atmani <naam@lse.epita.fr>
 	Namhyung Kim <namhyung.kim@lge.com>
@@ -150,6 +153,7 @@
 	Rishi Bhatt <bhatt.rishi062@gmail.com>
 	Roland Borde <bo@uebemc.siemens.de>
 	Roland McGrath <roland@redhat.com>
+	Romain Naour <romain.naour@smile.fr>
 	Sami Farin <safari@u.safari.iki.fi>
 	Sandhya Bankar <bankarsandhya512@gmail.com>
 	Scott Tsai <scottt958@yahoo.com.tw>
diff --git a/ChangeLog b/ChangeLog
index 01f6563..fed0a30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,1580 @@
+2017-07-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Prepare for 4.18 release.
+	* NEWS: Update for 4.18 release.
+
+2017-07-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: robustify create_nl_socket based tests against the race condition
+	There is a race condition between the moment a netlink socket is created
+	and the moment it is reported via SOCK_DIAG_BY_FAMILY interface.
+	Add one more operation on the socket created by create_nl_socket
+	to increase chances of winning the race.
+
+	* tests/create_nl_socket.c (create_nl_socket_ext): Add a getsockopt call
+	with the created socket.
+
+2017-07-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Update NEWS.
+
+2017-07-04  Romain Naour  <romain.naour@smile.fr>
+
+	nios2: fix wrong access to "SP" register in user_pt_regs.
+	Starting with linux commit v4.0-rc4~21^2, "SP" register
+	is available via regs[PTR_SP] member of struct user_pt_regs.
+
+	* linux/nios2/arch_regs.h (nios2_sp_ptr): Change type
+	to "unsigned int *".
+	* linux/nios2/arch_regs.c (nios2_sp_ptr): Likewise.
+	Replace .sp with .regs[PTR_SP].
+
+	Fixes: http://autobuild.buildroot.net/results/b9f/b9fc25b82f3280872fe1593ac252a8529ba83576
+	Fixes: v4.16-34-g6117728a ("nios2: export nios2_sp_ptr")
+
+2017-07-03  Eugene Syromyatnikov  <evgsyr@gmail.com>
+	    Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: add multi-process check to qual_fault.test.
+	Check that syscall counters used for tampering are per-tcb.
+
+	* tests/qual_fault.c: Include <fcntl.h> for open(),
+	<sys/param.h> for PATH_MAX, and <sys/wait.h> for wait().
+	(expfd): Rename to exp_fd, remove const qualifier and initialization.
+	(gotfd): Rename to got_fd, remove const qualifier and initialization.
+	(out_fd): New variable, for the expected strace output.
+	(open_file): New helper function.
+	(main): Remove st, add num_procs, proc, exp_prefix, got_prefix,
+	out_prefix, pid_prefix.  Remove stat asserts, update argc assert.
+	Add num_procs, exp_prefix, got_prefix, out_prefix, pid_prefix
+	initialization.  Add per-process loop, open expfd, gotfd, out_fd, pidfd
+	in each one, print process's pid to pidfd, print exit message to out_fd.
+	Add wait() call for each forked process.
+	* tests/qual_fault.test (N): increase to 100 in order to check
+	concurrent process execution.
+	(check_fault_injection): Take additional argument for the process
+	count, pass it to qual_fault, add filename variables for expected strace
+	output and pid file, pass them to qual_fault.
+	Specify -ff parameter to strace invocation.
+	Compare write and strace output for the each process.
+	Update all check_fault_injection invocation with process count argument,
+	add an invocation with 4 concurrent processes.
+	* tests/init.sh (TIMEOUT_DURATION): Raise from 120 to 300.
+
+2017-07-03  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: adjust TEST_NLATTR_OBJECT and TEST_NLATTR_ARRAY for large objects
+	* tests/test_nlattr.h (TEST_NLATTR_OBJECT, TEST_NLATTR_ARRAY): Add
+	support for objects larger than DEFAULT_STRLEN.
+	* tests/nlattr_inet_diag_msg.c (main): Change pattern size
+	from DEFAULT_STRLEN to 4096.
+	* tests/nlattr_netlink_diag_msg.c: Likewise.
+	* tests/nlattr_unix_diag_msg.c: Likewise.
+
+	Reported-by: JingPiao Chen <chenjingpiao@gmail.com>
+
+2017-07-03  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: move DEFAULT_STRLEN macro to tests.h.
+	* tests/tests.h [!DEFAULT_STRLEN] (DEFAULT_STRLEN): New macro.
+	* tests/mincore.c (DEFAULT_STRLEN): Remove.
+	* tests/mmsg_name.c: Likewise.
+	* tests/msg_control.c: Likewise.
+	* tests/netlink_protocol.c: Likewise.
+	* tests/nlattr.c: Likewise.
+	* tests/nlattr_inet_diag_msg.c: Likewise.
+	* tests/nlattr_netlink_diag_msg.c: Likewise.
+	* tests/nlattr_unix_diag_msg.c: Likewise.
+	* tests/printstr.c: Likewise.
+	* tests/xattr.c: Likewise.
+	* tests/execve.c: Likewise.
+	(main): Initialize str_a and str_b arrays at run time.
+	* tests/execveat.c: Likewise.
+
+	Suggested-by: JingPiao Chen <chenjingpiao@gmail.com>
+
+2017-07-03  Eugene Syromyatnikov  <evgsyr@gmail.com>
+
+	tests: use unified diff in order to improve test log readability.
+	* tests/init.sh (match_diff): Add -u option to the diff invocation.
+
+2017-07-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix error diagnostics in case of zero argc.
+	* strace.c (init): Adjust argc along with argv,
+	check that adjusted argc is sane.
+	* tests/zeroargc.c: New file.
+	* tests/.gitignore: Add zeroargc.
+	* tests/Makefile.am (check_PROGRAMS): Likewise.
+	* tests/options-syntax.test: Check strace error diagnostics
+	in case of zero argc.
+
+2017-07-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Use program_invocation_name instead of a local progname variable.
+	Emulate program_invocation_name only if it is not provided by libc.
+
+	* configure.ac: Check for program_invocation_name variable.
+	* strace.c (progname): Remove.
+	[!HAVE_PROGRAM_INVOCATION_NAME] (program_invocation_name): New variable.
+	(verror_msg, error_msg_and_help): Use it instead of progname.
+	(init): Initialize program_invocation_name instead of progname.
+
+2017-07-02  Dmitry V. Levin  <ldv@altlinux.org>
+	    Victor Krapivensky  <krapivenskiy.va@phystech.edu>
+
+	Introduce generic STRINGIFY and STRINGIFY_VAL macros.
+	* macros.h (STRINGIFY, STRINGIFY_VAL): New macros.
+	* mpers_type.h: Include "macros.h".
+	[IN_MPERS] (STRINGIFY): Remove.
+	* tests/sockname.c (TEST_SYSCALL_STR__, TEST_SYSCALL_STR_): Remove.
+	(TEST_SYSCALL_STR): Use STRINGIFY_VAL.
+
+2017-07-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Introduce macros.h.
+	Introduce a separate header file for generic macros shared between
+	strace and its tests.  Start this unification with ARRAY_SIZE macro.
+
+	* defs.h: Include "macros.h".
+	(ARRAY_SIZE): Move ...
+	* macros.h: ... to new file.
+	* Makefile.am (strace_SOURCES): Add it.
+	* tests/tests.h: Include "macros.h".
+	(ARRAY_SIZE): Remove.  All callers updated.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	quota: use PRINT_FIELD_FLAGS.
+	* quota.c (struct xfs_dqblk): Change d_flags field's type from int8_t
+	to uint8_t.
+	(decode_cmd_data): Use PRINT_FIELD_FLAGS.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Unify different generic PRINT_FIELD_* implementations.
+	Create a new header print_fields.h and move generic PRINT_FIELD_*
+	macros there.
+
+	* print_fields.h: New file.
+	* Makefile.am (strace_SOURCES): Add it.
+	* netlink_sock_diag.c: Include "print_fields.h".
+	(PRINT_FIELD_U, PRINT_FIELD_X, PRINT_FIELD_COOKIE, PRINT_FIELD_FLAGS,
+	PRINT_FIELD_XVAL): Move to print_fields.h file.
+	* quota.c: Include "print_fields.h".
+	(PRINT_FIELD_D): Move to print_fields.h file.
+	(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
+	* statx.c: Include "print_fields.h".
+	(PRINT_FIELD_U): Remove.
+	(SYS_FUNC(statx)): Update PRINT_FIELD_U callers.
+	* tests/quotactl.h: Include "print_fields.h".
+	* tests/quotactl-xfs.c: Update callers of PRINT_FIELD_* macros.
+	* tests/quotactl.c: Likewise.
+	(PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X): Remove.
+	* tests/test_nlattr.h: Include "print_fields.h".
+	(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
+	* tests/xstatx.c: Include "print_fields.h".
+	(PRINT_FIELD_U): Remove.
+	(print_stat): Update PRINT_FIELD_U callers.
+	* tests/tests.h [!STRACE_PRINTF] (STRACE_PRINTF): Define to printf.
+
+2017-07-01  Eugeniy Paltsev  <Eugeniy.Paltsev@synopsys.com>
+
+	arc: fix wrong access to "sp" member in user_regs_struct.
+	"sp" register is a member of "scratch" structure (which is nested
+	in user_regs_struct)
+
+	* linux/arc/arch_regs.c: Replace .sp with .scratch.sp .
+
+	Fixes: v4.16-31-g134042a5 ("arc: export arc_sp_ptr")
+
+2017-07-01  Khem Raj  <raj.khem@gmail.com>
+
+	aarch64, tile: replace struct ucontext with ucontext_t.
+	glibc >= 2.26 has dropped the tag struct ucontext from ucontext_t type.
+
+	* linux/arm/arch_sigreturn.c (arch_sigreturn) [AARCH64]: Replace
+	struct ucontext with ucontext_t.
+	* linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: enhance nlattr_unix_diag_msg test.
+	* tests/nlattr_unix_diag_msg.c: Include "test_nlattr.h".
+	(test_unix_diag_vfs, test_unix_diag_icons, test_unix_diag_rqlen):
+	Remove.
+	(init_unix_diag_msg): Add const qualifier to arguments and variables.
+	(print_unix_diag_msg, print_uint): New functions.
+	(main): Use them and macros from test_nlattr.h file.
+
+2017-07-01  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of netlink unix_diag_msg attributes.
+	* tests/nlattr_unix_diag_msg.c: New file.
+	* tests/gen_tests.in (nlattr_unix_diag_msg): New entry.
+	* tests/pure_executables.list: Add nlattr_unix_diag_msg.
+	* tests/.gitignore: Likewise.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: ensure that structure field names are printed properly
+	* netlink_sock_diag.c (decode_unix_diag_vfs, decode_unix_diag_rqlen):
+	Use PRINT_FIELD_U to print structure fields.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: add const qualifiers.
+	Add const qualifiers to auto variables and function arguments.
+	This change does not affect the code generated by the compiler,
+	the purpose of these "const" qualifiers is to highlight the intent.
+
+	* netlink_sock_diag.c (decode_unix_diag_vfs, decode_unix_diag_inode,
+	decode_unix_diag_rqlen): Add const qualifier to tcp, addr, and len
+	arguments.
+
+2017-07-01  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	netlink: decode AF_UNIX unix_diag_msg attributes.
+	* netlink_sock_diag.c (unix_diag_msg_nla_decoders): New array.
+	(decode_unix_diag_msg): Use it.
+	* linux/unix_diag.h (unix_diag_vfs, unix_diag_rqlen): New structures.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: enhance nlattr_netlink_diag_msg test.
+	* tests/nlattr_netlink_diag_msg.c: Include "test_nlattr.h".
+	(test_netlink_diag_groups, test_netlink_diag_rx_ring,
+	test_netlink_diag_flags): Remove.
+	(init_netlink_diag_msg): Add const qualifier to arguments and variables.
+	(print_netlink_diag_msg, print_xlong): New functions.
+	(main): Use them and macros from test_nlattr.h file.
+
+2017-07-01  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of netlink_diag_msg attributes.
+	* tests/nlattr_netlink_diag_msg.c: New file.
+	* tests/gen_tests.in (nlattr_netlink_diag_msg): New entry.
+	* tests/pure_executables.list: Add nlattr_netlink_diag_msg.
+	* tests/.gitignore: Likewise.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: ensure that structure field names are printed properly
+	* netlink_sock_diag.c (decode_netlink_diag_ring): Use PRINT_FIELD_U
+	to print structure fields.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: add const qualifiers.
+	Add const qualifiers to auto variables and function arguments.
+	This change does not affect the code generated by the compiler,
+	the purpose of these "const" qualifiers is to highlight the intent.
+
+	* netlink_sock_diag.c (print_group, decode_netlink_diag_groups,
+	decode_netlink_diag_ring, decode_netlink_diag_flags): Add const
+	qualifier to tcp, addr, and len arguments.
+
+2017-07-01  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	netlink: decode AF_NETLINK netlink_diag_msg attributes.
+	* linux/netlink_diag.h (netlink_diag_ring): New structure.
+	(NDIAG_FLAG_*): New macros.
+	* netlink_sock_diag.c: Include "xlat/netlink_socket_flags.h".
+	(print_group, decode_netlink_diag_groups, decode_netlink_diag_ring,
+	decode_netlink_diag_flags): New functions.
+	(netlink_diag_msg_nla_decoders): New array.
+	(decode_netlink_diag_msg): Use it.
+	* xlat/netlink_socket_flags.in: New file.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: print inet_diag_sockid.idiag_if as an interface index
+	* netlink_sock_diag.c (print_inet_diag_sockid): Print idiag_if field
+	using print_ifindex.
+	* tests/nlattr_inet_diag_msg.c: Include <net/if.h>.
+	(IFINDEX_LO): New macro.
+	(init_inet_diag_msg): Set inet_diag_sockid.idiag_if field.
+	(print_inet_diag_msg): Update expected output.
+
+2017-07-01  Dmitry V. Levin  <ldv@altlinux.org>
+	    JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of several standard netlink attributes.
+	* tests/nlattr_inet_diag_msg.c (main): Check decoding of uint32_t,
+	uint8_t, and zero-terminated string attributes.
+
+2017-06-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: enhance nlattr_inet_diag_msg test.
+	* tests/test_nlattr.h: New file.
+	* tests/Makefile.am (libtests_a_SOURCES): Add it.
+	* tests/nlattr_inet_diag_msg.c: Include "test_nlattr.h".
+	(test_inet_diag_meminfo, test_inet_diag_vegasinfo,
+	test_inet_diag_dctcpinfo, test_inet_diag_bbrinfo): Remove.
+	(address): New variable.
+	(init_inet_diag_msg): Remove "address" argument, add const qualifier
+	to all remaining arguments.
+	(print_inet_diag_msg, print_uint): New functions.
+	(main): Use macros from test_nlattr.h file.
+
+2017-06-30  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of netlink inet_diag_msg attributes.
+	* tests/nlattr_inet_diag_msg.c: New file.
+	* tests/gen_tests.in (nlattr_inet_diag_msg): New entry.
+	* tests/pure_executables.list: Add nlattr_inet_diag_msg.
+	* tests/.gitignore: Likewise.
+
+2017-06-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: ensure that structure field names are printed properly
+	* netlink_sock_diag.c (PRINT_FIELD_X): New macro.
+	(decode_inet_diag_meminfo, decode_tcpvegas_info, decode_tcp_dctcp_info,
+	decode_tcp_bbr_info): Use it and PRINT_FIELD_U to print structure
+	fields.
+
+2017-06-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: add const qualifiers.
+	Add const qualifiers to auto variables and function arguments.
+	This change does not affect the code generated by the compiler,
+	the purpose of these "const" qualifiers is to highlight the intent.
+
+	* netlink_sock_diag.c (print_meminfo, decode_meminfo,
+	decode_inet_diag_meminfo, decode_tcpvegas_info, decode_tcp_dctcp_info,
+	decode_tcp_bbr_info): Add const qualifier to tcp, addr, and len
+	arguments.
+
+2017-06-30  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	netlink: decode AF_INET inet_diag_msg attributes.
+	* linux/inet_diag.h (inet_diag_meminfo, tcpvegas_info,
+	tcp_dctcp_info, tcp_bbr_info): New structures.
+	* linux/sock_diag.h (SK_MEMINFO_VARS): New macro.
+	* netlink_sock_diag.c: Include  <linux/sock_diag.h>.
+	(print_meminfo, decode_meminfo, decode_inet_diag_meminfo,
+	decode_tcpvegas_info, decode_tcp_dctcp_info, decode_tcp_bbr_info):
+	New functions.
+	(inet_diag_msg_nla_decoders): New array.
+	(decode_inet_diag_msg): Use it.
+
+2017-06-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	nlattr: add const qualifiers to auto variables and function arguments.
+	This change does not affect the code generated by the compiler,
+	the purpose of these "const" qualifiers is to highlight the intent.
+
+	* nlattr.c (decode_nlattr_with_data, decode_nla_str, decode_nla_strn,
+	decode_nla_##name): Add const qualifier to tcp, addr, and len arguments.
+
+2017-06-30  JingPiao Chen  <chenjingpiao@gmail.com>
+	    Fabien Siron  <fabien.siron@epita.fr>
+
+	netlink: introduce nla_decoder_t to parse netlink attributes data.
+	* nlattr.h (nla_decoder_t): New typedef.
+	(DECL_NLA): New macro.
+	(decode_nlattr): Add decoders, size and opaque_data argument.
+	* nlattr.c: (decode_nlattr_with_data): Likewise.
+	(decode_nla_*): New functions.
+	* netlink_sock_diag.c (decode_inet_diag_req_compat)
+	(decode_inet_diag_req_v2, decode_inet_diag_msg)
+	(decode_netlink_diag_msg, (decode_packet_diag_msg)
+	(decode_smc_diag_msg, decode_unix_diag_msg): Add decoders,
+	size and opaque_data arguments. All callers updated.
+
+2017-06-30  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	netlink: add a basic netlink attribute parser of AF_SMC diag.
+	* netlink_sock_diag.c: Include "xlat/smc_diag_attrs.h".
+	(decode_smc_diag_msg): Use decode_nlattr.
+	* xlat/smc_diag_attrs.in: New file.
+
+2017-06-30  JingPiao Chen  <chenjingpiao@gmail.com>
+	    Fabien Siron  <fabien.siron@epita.fr>
+
+	netlink: add a basic netlink attribute parser of AF_INET diag.
+	* linux/inet_diag.h (INET_DIAG_REQ_*): New enum.
+	* netlink_sock_diag.c: Include "xlat/inet_diag_attrs.h"
+	and "xlat/inet_diag_req_attrs.h".
+	(decode_inet_diag_req_compat, decode_inet_diag_req_v2,
+	 decode_inet_diag_msg): Use decode_nlattr.
+	* xlat/inet_diag_attrs.in: New file.
+	* xlat/inet_diag_req_attrs.in: Likewise.
+
+	netlink: add a basic netlink attribute parser of AF_PACKET diag.
+	* linux/packet_diag.h (PACKET_DIAG_*): New enum.
+	* netlink_sock_diag.c: Include "xlat/packet_diag_attrs.h".
+	(decode_packet_diag_msg): Use decode_nlattr.
+	* xlat/packet_diag_attrs.in: New file.
+
+	netlink: add a basic netlink attribute parser of AF_NETLINK diag.
+	* linux/netlink_diag.h (NETLINK_DIAG_*): New enum.
+	* netlink_sock_diag.c: Include "xlat/netlink_diag_attrs.h".
+	(decode_netlink_diag_msg): Use decode_nlattr.
+	* xlat/netlink_diag_attrs.in: New file.
+
+2017-06-29  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink_sock_diag: ensure that structure field names are printed properly
+	* netlink_sock_diag.c (PRINT_FIELD_U, PRINT_FIELD_COOKIE,
+	PRINT_FIELD_FLAGS, PRINT_FIELD_XVAL): New macros.
+	(decode_unix_diag_req, decode_unix_diag_msg, decode_netlink_diag_req,
+	decode_netlink_diag_msg, decode_packet_diag_req, decode_packet_diag_msg,
+	print_inet_diag_sockid, decode_inet_diag_req_compat,
+	decode_inet_diag_req_v2, decode_inet_diag_msg, decode_smc_diag_req,
+	decode_smc_diag_msg): Use them to print structure fields.
+
+2017-06-29  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>
+
+	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  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>
+
+	maint: fix ioctls_sym.sh premature termination.
+	When the list of headers do not fit into the command line, xargs splits
+	it into several lists and then passes them to grep.  If no headers from
+	a list match the grep pattern, grep exits with a non-zero status that
+	causes xargs to exit with a non-zero status, too.
+
+	* maint/ioctls_sym.sh: Use "find -exec +" instead of xargs,
+	ignore its exit status.
+
+2017-06-27  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: introduce NLMSG_ATTR macro.
+	* tests/tests.h (NLMSG_ATTR): New macro.
+	* tests/nlattr.c (test_nlattr, test_nla_type): Use it.
+
+2017-06-27  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	netlink: pass NLMSG_DONE messages to family specific payload decoders.
+	While many NLMSG_DONE messages indeed have payload containing
+	just one integer, there are exceptions. Handle this by passing
+	payloads of NLMSG_DONE messages to family specific netlink
+	payload decoders.
+
+	* netlink.c (print_nlmsghdr): Do not skip family detection
+	for nlmsg_type == NLMSG_DONE.
+	(decode_nlmsg_type): Skip family specific type decoders
+	for type == NLMSG_DONE.
+	(decode_nlmsg_flags): Skip family specific decoding of flags
+	for type == NLMSG_DONE.
+	(decode_netlink_sock_diag): Skip for nlmsg_type == NLMSG_DONE.
+
+2017-06-26  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Unexport die_out_of_memory.
+	Print more specific error diagnostics than a generic "Out of memory"
+	when an error happens outside xmalloc.c.
+
+	* defs.h (die_out_of_memory): Remove prototype.
+	* strace.c (strace_popen, init): Call perror_msg_and_die instead
+	of die_out_of_memory.
+	* unwind.c (unwind_tcb_init): Likewise.
+	* xmalloc.c (die_out_of_memory): Add static qualifier.
+
+2017-06-26  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Check -s argument early.
+	* util.c (printstr_ex): Move the check that -s argument
+	does not exceed -1U / 4 ...
+	* strace.c (init): ... here.
+	* tests/options-syntax.test: Check it.
+
+2017-06-25  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Include "netlink.h" instead of <linux/netlink.h>
+	* net.c: Include "netlink.h" instead of <linux/netlink.h>.
+	* sockaddr.c: Likewise.
+	* tests/create_nl_socket.c: Likewise.
+	* tests/net-sockaddr.c: Likewise.
+	* tests/netlink_audit.c: Likewise.
+	* tests/netlink_generic.c: Likewise.
+	* tests/netlink_inet_diag.c: Likewise.
+	* tests/netlink_netfilter.c: Likewise.
+	* tests/netlink_route.c: Likewise.
+	* tests/netlink_selinux.c: Likewise.
+	* tests/netlink_xfrm.c: Likewise.
+	* tests/net-yy-netlink.c: Include "netlink.h" instead
+	of <linux/netlink.h>, remove fallback definition of NETLINK_SOCK_DIAG.
+	* tests/netlink_netlink_diag.c: Likewise.
+	* tests/netlink_protocol.c: Likewise.
+	* tests/netlink_sock_diag.c: Likewise.
+	* tests/netlink_unix_diag.c: Likewise.
+	* tests/nlattr.c: Likewise.
+
+2017-06-24  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink: provide a fallback definition of NETLINK_SOCK_DIAG.
+	Add a fallback definition of NETLINK_SOCK_DIAG to netlink.h
+	instead of adding these fallback definitions to every file.
+
+	* netlink.h: Provide a fallback definition of NETLINK_SOCK_DIAG.
+	* socketutils.c: Include "netlink.h" instead of <linux/netlink.h>,
+	remove fallback definition of NETLINK_SOCK_DIAG.
+
+2017-06-23  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Update prctl ARCH_* constants.
+	* xlat/archvals.in: Add ARCH_GET_CPUID and ARCH_SET_CPUID
+	introduced by linux kernel commit v4.12-rc1~153^2~2.
+
+2017-06-22  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Update V4L2_* constants.
+	* xlat/v4l2_buf_types.in: Add V4L2_BUF_TYPE_META_CAPTURE introduced
+	by linux kernel commit v4.12-rc1~85^2~71.
+	* xlat/v4l2_device_capabilities_flags.in: Add V4L2_CAP_META_CAPTURE
+	introduced by the same commit.
+	* xlat/v4l2_control_flags.in: Add V4L2_CTRL_FLAG_HAS_PAYLOAD,
+	V4L2_CTRL_FLAG_EXECUTE_ON_WRITE, and V4L2_CTRL_FLAG_MODIFY_LAYOUT
+	introduced by linux kernel commits v3.17-rc1~112^2~363,
+	v4.1-rc1~59^2~1^2~63, and v4.12-rc1~85^2~62, respectively.
+	* xlat/v4l2_control_types.in: Add V4L2_CTRL_TYPE_U8, V4L2_CTRL_TYPE_U16,
+	and V4L2_CTRL_TYPE_U32 introduced by linux kernel commits
+	v3.17-rc1~112^2~343 and v3.17-rc1~112^2~112.
+
+	Update SCTP_* constants.
+	* xlat/socksctpoptions.in: Add SCTP_ENABLE_STREAM_RESET,
+	SCTP_RESET_STREAMS, SCTP_RESET_ASSOC, SCTP_ADD_STREAMS,
+	SCTP_RECONFIG_SUPPORTED, and SCTP_PR_STREAM_STATUS introduced
+	by linux kernel commits v4.11-rc1~124^2~387^2~1, v4.11-rc1~124^2~387^2,
+	v4.11-rc1~124^2~166^2~2, v4.11-rc1~124^2~166^2, v4.12-rc1~64^3~469^2,
+	and v4.12-rc1~64^3~276, respectively.
+
+	Update RTM_* constants.
+	* xlat/nl_route_types.in: Add RTM_DELNETCONF introduced
+	by linux kernel commit v4.12-rc1~64^3~312^2~6.
+
+	Update NDIAG_SHOW_* constants.
+	* linux/netlink_diag.h (NDIAG_SHOW_FLAGS): New constant introduced
+	by linux kernel commit v4.12-rc1~64^3~260.
+	* xlat/netlink_diag_show.in: Add it.
+
+	Update KEYCTL_* constants.
+	* xlat/keyctl_commands.in: Add KEYCTL_RESTRICT_KEYRING introduced
+	by linux kernel commit v4.12-rc1~123^2~7^2~2^2~3.
+
+	Update ARPHRD_* constants.
+	* xlat/arp_hardware_types.in: Add ARPHRD_VSOCKMON introduced
+	by linux kernel commit v4.12-rc1~129^2~118^2~2.
+
+	Update SO_* constants.
+	* xlat/sockoptions.in: Add SO_MEMINFO, SO_INCOMING_NAPI_ID,
+	and SO_COOKIE introduced by linux kernel commits v4.12-rc1~64^3~389,
+	v4.12-rc1~64^3~341^2, and v4.12-rc1~64^3~221^2~1, respectively.
+
+2017-06-21  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: check more corner cases of nlattr decoding.
+	* tests/nlattr.c (test_nlattr): Check decoding in case of invalid
+	struct nlattr.nla_len.
+
+2017-06-21  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of netlink attribute.
+	* tests/nlattr.c: New file.
+	* tests/gen_tests.in (nlattr): New entry.
+	* tests/pure_executables.list: Add nlattr.
+	* tests/.gitignore: Likewise.
+
+2017-06-21  JingPiao Chen  <chenjingpiao@gmail.com>
+	    Fabien Siron  <fabien.siron@epita.fr>
+
+	netlink: introduce a basic netlink attributes parser.
+	* linux/unix_diag.h (UNIX_DIAG_*): New enum.
+	* nlattr.c: New file.
+	* nlattr.h: Likewise.
+	* Makefile.am (strace_SOURCES): Add them.
+	* netlink_sock_diag.c: Include "nlattr.h" and "xlat/unix_diag_attrs.h".
+	(decode_unix_diag_msg): Use decode_nlattr.
+	* xlat/unix_diag_attrs.in: New file.
+
+2017-06-21  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	netlink: introduce netlink.h.
+	* netlink.h: New file.
+	* Makefile.am (strace_SOURCES): Add it.
+	* netlink_sock_diag.c: Include "netlink.h",
+	remove <sys/socket.h> and <linux/netlink.h>.
+	* netlink.c: Likewise.
+	(NLMSG_HDRLEN): Move to netlink.h.
+	* tests/netlink_protocol.c: Replace <linux/netlink.h> with "netlink.h".
+	* tests/netlink_sock_diag.c: Likewise.
+
+2017-06-20  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: add SET_STRUCT macro to tests.h.
+	* tests/netlink_sock_diag.c (INIT_STRUCT): Rename to SET_STRUCT,
+	all callers updated.  Move ...
+	* tests/tests.h: ... here.
+
+2017-06-19  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: fix potential unaligned access in netlink_sock_diag.test.
+	Despite our efforts made to avoid unaligned access, gcc appears to be
+	generating instructions that might cause unaligned access when copying
+	structures to unaligned addresses.
+
+	Fix this issue by replacing copying of structures to unaligned addresses
+	with memcpy calls.
+
+	* tests/netlink_sock_diag.c (INIT_STRUCT): New macro.
+	(test_odd_family_req, test_odd_family_msg, test_unix_diag_req,
+	test_unix_diag_msg, test_netlink_diag_req, test_netlink_diag_msg,
+	test_packet_diag_req, test_packet_diag_msg, test_inet_diag_sockid,
+	test_inet_diag_req, test_inet_diag_req_v2, test_inet_diag_msg,
+	test_smc_diag_req, test_smc_diag_msg): Use it to initialize potentially
+	unaligned struct nlmsghdr.  Do not access nlh->nlmsg_len.
+
+2017-06-19  Masatake YAMATO  <yamato@redhat.com>
+
+	tests: check decoding of NETLINK_GENERIC message types.
+	* tests/netlink_generic.c: New file.
+	* tests/gen_tests.in (netlink_generic): New entry.
+	* tests/pure_executables.list: Add netlink_generic.
+	* tests/.gitignore: Likewise.
+
+2017-06-19  Masatake YAMATO  <yamato@redhat.com>
+
+	netlink: add decoding of NETLINK_GENERIC protocol families.
+	NETLINK_GENERIC is a protocol stacked on netlink protocol.
+
+	When a NETLINK_GENERIC subsystem registers its "family" name in the
+	kernel at run time, an integer value associated with this name is
+	assigned by the kernel.  This integer value is specified in struct
+	nlmsghdr.nlmsg_type of subsequent communications with the
+	NETLINK_GENERIC subsystem.
+
+	This change implements decoding of NETLINK_GENERIC message types in
+	symbolic form, for example:
+
+	  $ ./strace -yy -e 'sendto' ip tcp_metrics > /dev/null
+	  sendto(4<NETLINK:[GENERIC:12345]>, {{len=20, type=tcp_metrics, ...
+	  +++ exited with 0 +++
+
+	Note that type= specifying the NETLINK_GENERIC protocol family
+	is decoded properly.
+
+	* netlink.c (decode_nlmsg_type_generic): New function.
+	(nlmsg_types): Add NETLINK_GENERIC entry.
+
+2017-06-19  Masatake YAMATO  <yamato@redhat.com>
+
+	socketutils: build a dynamic xlat table for NETLINK_GENERIC decoding.
+	* configure.ac (AC_CHECK_HEADERS): Add linux/genetlink.h.
+	* defs.h (genl_families_xlat): New prototype.
+	* socketutils.c [HAVE_LINUX_GENETLINK_H]: Include <linux/genetlink.h>.
+	[HAVE_LINUX_GENETLINK_H] (genl_send_dump_families,
+	genl_parse_families_response): New helper functions.
+	(genl_families_xlat): New function for building the xlat table
+	for NETLINK_GENERIC decoding.
+
+2017-06-19  Masatake YAMATO  <yamato@redhat.com>
+
+	dyxlat: new interface for building xlat tables dynamically.
+	xlat tables are usually generated at build time.
+
+	printxval is suitable for printing struct nlmsghdr.nlmsg_type for
+	NETLINK_GENERIC protocol.  However, the corresponding xlat table
+	cannot be defined at build time because the values are registered
+	by the kernel at run time.
+
+	This change introduces dyxlat functions for building xlat tables
+	dynamically.  The primary use case is decoding nlmsg_type but this
+	interface can be used for other purposes.
+
+	* defs.h (struct dyxlat): New opaque data type.
+	(dyxlat_alloc, dyxlat_free, dyxlat_add_pair): New function declarations.
+	* dyxlat.c: New file.
+	* Makefile.am (strace_SOURCES): Add it.
+
+2017-06-19  Masatake YAMATO  <yamato@redhat.com>
+
+	Introduce xstrndup function.
+	* configure.ac (AC_CHECK_FUNCS): Add strndup.
+	* defs.h (xstrndup): New prototype.
+	* xmalloc.c (xstrndup): New function.
+
+2017-06-18  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink: do not print extra braces around payloadless nlmsghdr.
+	* netlink.c (decode_nlmsghdr_with_payload): Print braces before
+	print_nlmsghdr and after decode_payload iff decode_payload is invoked.
+	* tests/netlink_audit.c (test_nlmsg_type): Update expected output.
+	* tests/netlink_netfilter.c: Likewise.
+	* tests/netlink_selinux.c: Likewise.
+	* tests/netlink_protocol.c (send_query): Likewise.
+	* tests/netlink_route.c (test_nlmsg_type, test_nlmsg_flags): Likewise.
+	* tests/netlink_sock_diag.c: Likewise.
+	* tests/netlink_xfrm.c: Likewise.
+
+2017-06-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Strip argument name of type "struct tcb *" from function prototypes.
+	"struct tcb *" was used in most prototypes along with "struct tcb *tcp",
+	this change converts the latter form to the former for consistency.
+
+	Fix a few spacing style issues.
+	Reported by kernel's checkpatch.pl script.
+
+2017-06-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Strip redundant trailing semicolons.
+	Strip trailing semicolons from macro definitions.
+	Strip extra semicolons from statements terminations.
+
+	Reported by kernel's checkpatch.pl script.
+
+2017-06-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix macros encosure in a do/while loop.
+	Enclose macros with multiple statements and macros starting
+	with "if" statement in a do/while loop.
+	Do not enclose single statement macros in a do/while loop.
+
+	Reported by kernel's checkpatch.pl script.
+
+2017-06-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Use __func__ instead of gcc specific __FUNCTION__
+	Reported by kernel's checkpatch.pl script.
+
+2017-06-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix a few initialization style issues.
+	Do not initialise statics and globals to 0, NULL, or false.
+
+	Reported by kernel's checkpatch.pl script.
+
+2017-06-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix function prototypes with unspecified arguments.
+	Change functions declared as taking unspecified number of arguments
+	of unspecified type to functions that take no arguments.
+
+	Reported by kernel's checkpatch.pl script.
+
+2017-06-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix a few sizeof style issues.
+	Reported by kernel's checkpatch.pl script.
+
+	Fix a few misspellings in comments.
+	Reported by kernel's checkpatch.pl script.
+
+2017-06-16  Dmitry V. Levin  <ldv@altlinux.org>
+
+	print_mreq: remove superfluous print_quoted_string calls.
+	The string returned by inet_ntoa(3) has IPv4 dotted-decimal notation,
+	no need to quote it.
+
+	* net.c (print_mreq): Remove print_quoted_string calls.
+
+2017-06-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: check decoding of incomplete SCM_TIMESTAMP* control messages.
+	* tests/msg_control.c (test_scm_timestamp, test_scm_timestampns,
+	test_scm_timestamping): Check decoding of incomplete control messages.
+
+2017-06-15  Miroslav Lichvar  <mlichvar@redhat.com>
+
+	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.
+
+2017-06-15  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of NETLINK_SOCK_DIAG AF_SMC messages.
+	* tests/netlink_sock_diag.c: Include <linux/smc_diag.h>.
+	(SMC_ACTIVE): New macro.
+	(test_smc_diag_req, test_smc_diag_msg): New functions.
+	(main): Use them.
+
+	netlink: add a basic socket diag parser of AF_SMC messages.
+	* linux/smc_diag.h: New file.
+	* Makefile.am (EXTRA_DIST): Add it.
+	* netlink_sock_diag.c: Include <linux/smc_diag.h>,
+	"xlat/smc_diag_extended_flags.h" and "xlat/smc_states.h".
+	(decode_smc_diag_req, decode_smc_diag_msg): New functions.
+	(diag_decoders): Add AF_SMC.
+	* xlat/smc_diag_extended_flags.in: New file.
+	* xlat/smc_states.in: Likewise.
+
+2017-06-15  JingPiao Chen  <chenjingpiao@gmail.com>
+	    Fabien Siron  <fabien.siron@epita.fr>
+
+	tests: check decoding of NETLINK_SOCK_DIAG AF_INET messages.
+	* tests/netlink_sock_diag.c: Include <arpa/inet.h>
+	and <linux/inet_diag.h>.
+	(test_inet_diag_sockid, test_inet_diag_req, test_inet_diag_req_v2,
+	test_inet_diag_msg): New functions.
+	(mian): Use them.
+
+	netlink: add a basic socket diag parser of AF_INET and AF_INET6 messages
+	* defs.h (inet_protocols): New xlat prototype.
+	* linux/inet_diag.h (inet_diag_req): New structure.
+	(INET_DIAG_*): New enum.
+	* netlink_sock_diag.c: Include <arpa/inet.h>, <linux/inet_diag.h>
+	and "xlat/inet_diag_extended_flags.h".
+	(print_inet_diag_sockid, decode_inet_diag_req_compat)
+	(decode_inet_diag_req_v2, decode_inet_diag_req)
+	(decode_inet_diag_msg): New functions.
+	(diag_decoders): Add AF_INET and AF_INET6;
+	* xlat/inet_diag_extended_flags.in: New file.
+
+2017-06-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Introduce print_inet_addr.
+	* defs.h (print_inet_addr): New prototype.
+	* sockaddr.c (print_inet_addr): New function.
+	(print_sockaddr_data_in6): Use it.
+	* net.c (print_mreq6): Likewise.
+	* tests/ip_mreq.c (main): Update expected output.
+
+2017-06-15  JingPiao Chen  <chenjingpiao@gmail.com>
+	    Fabien Siron  <fabien.siron@epita.fr>
+
+	tests: check decoding of NETLINK_SOCK_DIAG AF_PACKET messages.
+	* tests/netlink_sock_diag.c: Include <linux/if_ether.h>
+	and <linux/packet_diag.h>.
+	(test_packet_diag_req, test_packet_diag_msg): New functions.
+	(main): Use them.
+
+	netlink: add a basic socket diag parser of AF_PACKET messages.
+	* linux/packet_diag.h: New file.
+	* Makefile.am (EXTRA_DIST): Add it.
+	* defs.h (ethernet_protocols): New xlat prototype.
+	* netlink_sock_diag.c: Include <linux/packet_diag.h>
+	and "xlat/packet_diag_show.h".
+	(decode_packet_diag_req, decode_packet_diag_msg): New functions.
+	(diag_decoders): Add AF_PACKET.
+	* xlat/packet_diag_show.in: New file.
+
+	tests: check decoding of NETLINK_SOCK_DIAG AF_NETLINK messages.
+	* tests/netlink_sock_diag.c: Include <linux/netlink_diag.h>.
+	(test_netlink_diag_req, test_netlink_diag_msg): New functions.
+	(main): Use them.
+
+	netlink: add a basic socket diag parser of AF_NETLINK messages.
+	* linux/netlink_diag.h (NDIAG_SHOW_GROUPS, NDIAG_SHOW_RING_CFG):
+	New macros.
+	* netlink_sock_diag.c: Include <linux/netlink_diag.h>,
+	"xlat/netlink_diag_show.h" and "xlat/netlink_states.h".
+	(decode_netlink_diag_req, decode_netlink_diag_msg): New functions.
+	(diag_decoders): Add AF_NETLINK.
+	* xlat/netlink_diag_show.in: New file.
+	* xlat/netlink_states.in: Likewise.
+
+2017-06-15  Dmitry V. Levin  <ldv@altlinux.org>
+	    Fabien Siron  <fabien.siron@epita.fr>
+	    JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of NETLINK_SOCK_DIAG AF_UNIX messages.
+	* tests/netlink_sock_diag.c: Include <netinet/tcp.h>
+	and <linux/unix_diag.h>.
+	(test_odd_family_req, test_odd_family_msg, test_unix_diag_req,
+	test_unix_diag_msg): New functions.
+	(main): Use them.
+
+	netlink: add a basic socket diag parser of AF_UNIX messages.
+	* defs.h (socktypes): New xlat prototype.
+	* linux/unix_diag.h (UDIAG_SHOW_VFS, UDIAG_SHOW_ICONS, UDIAG_SHOW_RQLEN,
+	UDIAG_SHOW_MEMINFO): New macros.
+	* netlink_sock_diag.c: Include <sys/socket.h>, <linux/netlink.h>,
+	<linux/unix_diag.h>, "xlat/tcp_states.h", "xlat/tcp_state_flags.h",
+	and "xlat/unix_diag_show.h".
+	(decode_unix_diag_req, decode_unix_diag_msg): New functions.
+	(netlink_diag_decoder_t): New typedef.
+	(diag_decoders): New array.
+	(decode_netlink_sock_diag): Use it.
+	* xlat/tcp_state_flags.in: New file.
+	* xlat/tcp_states.in: Likewise.
+	* xlat/unix_diag_show.in: Likewise.
+
+	netlink: introduce family specific payload decoders.
+	* defs.h (netlink_decoder_t): New typedef.
+	(DECL_NETLINK): New macro.
+	(decode_netlink_sock_diag): New prototype.
+	* netlink.c (netlink_decoders): New array.
+	(decode_payload): Use it to invoke netlink family specific decoders.
+	* netlink_sock_diag.c: New file.
+	* Makefile.am (strace_SOURCES): Add it.
+
+2017-06-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Update SCM_* constants.
+	* xlat/scmvals.in: Add SCM_TIMESTAMP, SCM_TIMESTAMPNS, SCM_TIMESTAMPING,
+	SCM_WIFI_STATUS, and SCM_TIMESTAMPING_OPT_STATS.
+
+2017-06-14  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink: refactor decode_nlmsg_type.
+	* netlink.c (decode_nlmsg_type_default, decode_nlmsg_type_netfilter):
+	New functions.
+	(nlmsg_types_decoder_t): New typedef.
+	(nlmsg_types): Add decoder field.
+	(decode_nlmsg_type): Use it.
+
+2017-06-14  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: extend printstr test.
+	* tests/printstr.c (main): Add a case for short read.
+
+2017-06-13  Dmitry V. Levin  <ldv@altlinux.org>
+
+	v4l2: fix preprocessor checks.
+	Fix checks for struct v4l2_window.global_alpha and struct
+	v4l2_sdr_format.buffersize.
+
+	* v4l2.c (print_v4l2_format_fmt): Do not assume that
+	HAVE_STRUCT_V4L2_WINDOW_GLOBAL_ALPHA and
+	HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE are defined.
+	* tests/ioctl_v4l2.c (init_v4l2_format, dprint_ioctl_v4l2): Likewise.
+
+2017-06-12  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Move xlat related functions to a separate file.
+	* util.c (xlookup, xlat_bsearch_compare, xlat_search, printxvals,
+	printxval_searchn, addflags, sprintflags, printflags_ex): Move ...
+	* xlat.c: ... to this new file.
+	* Makefile.am (strace_SOURCES): Add it.
+
+2017-06-12  Masatake YAMATO  <yamato@redhat.com>
+
+	socketeutils: extend receive_responses further.
+	This is the second patch in series of implementing NETLINK_GENERIC
+	protocol decoder.
+
+	This change allows passing of opaque user data to the callback function.
+
+	* socketutils.c (receive_responses): Change the type of proto_name
+	argument from "const char *" to "void *" to allow passing
+	of arbitrary data to the callback function.
+	Rename proto_name to opaque_data, make it the last argument.
+	Pass it to the callback function as the last argument.
+	(inet_parse_response, unix_parse_response, netlink_parse_response):
+	Change the type of proto_name argument from "const char *" to "void *",
+	rename it to opaque_data, make it the last argument.
+	Introduce a local variable proto_name to convert the type
+	of opaque_data argument from "void *" to "const char *".
+	(unix_get, inet_get, netlink_get): Cast the protocol name from
+	"const char *" to "void *" for passing to the callback function.
+
+2017-06-12  Masatake YAMATO  <yamato@redhat.com>
+
+	socketeutils: extend receive_responses to handle other netlink types.
+	This is the first patch in series of implementing NETLINK_GENERIC
+	protocol decoder.
+
+	receive_responses was written for decoding kernel responses of type
+	SOCK_DIAG_BY_FAMILY, other types were ignored.
+
+	This change makes the type of netlink response a parameter
+	so the function can be used for other types of communication.
+
+	* socketutils.c (receive_responses): add a new parameter
+	expected_msg_type to handle types other than SOCK_DIAG_BY_FAMILY.
+
+2017-06-12  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: fix typo.
+	* tests/dup3.c (SKIP_MAIN_UNDEFINED): Remove duplicated &&.
+
+2017-06-08  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Introduce printflags_ex function.
+	Add printflags_ex extension over printflags64 that, similar
+	to printxvals, takes a NULL-terminated sequence of xlat pointers.
+
+	* defs.h (printflags_ex): New prototype.
+	(printflags64): Turn into a thin wrapper around printflags_ex.
+	* netlink.c (decode_nlmsg_flags): Use printflags_ex.
+	* util.c (printflags_ex): New function.
+	(printflags64): Remove.
+	* xlat/netlink_get_flags.in: Remove entries listed
+	in xlat/netlink_flags.in file.
+	* xlat/netlink_new_flags.in: Likewise.
+
+2017-06-08  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: add check for decoding netlink get and new flags.
+	* tests/netlink_route.c (test_nlmsg_flags): New function, checks
+	decoding of NETLINK_ROUTE get and new flags.
+	(main): Use it.
+	* tests/netlink_sock_diag.c (test_nlmsg_flags): New function, checks
+	decoding of NETLINK_SOCK_DIAG get flags.
+	(main): Use it.
+	* tests/netlink_xfrm.c: (test_nlmsg_flags): New function, checks
+	decoding of NETLINK_XFRM get and new flags.
+	(main): Use it.
+
+2017-06-08  JingPiao Chen  <chenjingpiao@gmail.com>
+	    Fabien Siron  <fabien.siron@epita.fr>
+	    Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink: implement generic nlmsg_flags decoding.
+	* netlink.c: Include "xlat/netlink_get_flags.h"
+	and "xlat/netlink_new_flags.h".
+	(decode_nlmsg_flags): New function.
+	(print_nlmsghdr): Use it.
+	* xlat/netlink_get_flags.in: New file.
+	* xlat/netlink_new_flags.in: Likewise.
+
+2017-06-08  Dmitry V. Levin  <ldv@altlinux.org>
+
+	xlat: provide fallback definitions for XFRM_MSG_* constants.
+	Some of XFRM_MSG_* constants were introduced later than the header file
+	where they are defined.
+
+	* xlat/nl_xfrm_types.in: Add default values for constants.
+
+2017-06-05  Victor Krapivensky  <krapivenskiy.va@phystech.edu>
+
+	syscall.c: split trace_syscall() into 6 functions.
+	This change removes the trace_syscall function.  Now, the code that uses
+	syscall.c trace functions is expected to check whether it is a syscall
+	entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make
+	an appropriate sequence of function calls.
+
+	* defs.h: Update comment on TCB_INSYSCALL.
+	(trace_syscall): Remove prototype.
+	(syscall_entering_decode, syscall_entering_trace,
+	syscall_entering_finish, syscall_exiting_decode, syscall_exiting_trace,
+	syscall_exiting_finish): New prototypes.
+	* strace.c (trace_syscall): New static replacement for old trace_syscall.
+	* syscall.c (trace_syscall): Remove.
+	(trace_syscall_entering): Split into ...
+	(syscall_entering_decode, syscall_entering_trace,
+	syscall_entering_finish): ... new functions.
+	(trace_syscall_exiting): Split into ...
+	(syscall_exiting_decode, syscall_exiting_trace,
+	syscall_exiting_finish): ... new functions.
+
+2017-06-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: guard against missing linux/netfilter/nfnetlink.h.
+	nfnetlink was introduced in linux by commit v2.6.14-rc1~1035^2~217,
+	add a guard for the case when system headers are not fresh enough.
+
+	* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/nfnetlink.h.
+	* tests/netlink_netfilter.c: Check for HAVE_LINUX_NETFILTER_NFNETLINK_H.
+
+2017-06-05  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: check decoding of NETLINK_XFRM message types.
+	* tests/netlink_xfrm.c: New file.
+	* tests/gen_tests.in (netlink_xfrm): New entry.
+	* tests/pure_executables.list: Add netlink_xfrm.
+	* tests/.gitignore: Likewise.
+
+	tests: check decoding of NETLINK_SELINUX message types.
+	* tests/netlink_selinux.c: New file.
+	* tests/gen_tests.in (netlink_selinux): New entry.
+	* tests/pure_executables.list: Add netlink_selinux.
+	* tests/.gitignore: Likewise.
+
+	tests: check decoding of NETLINK_NETFILTER message types.
+	* tests/netlink_netfilter.c: New file.
+	* tests/gen_tests.in (netlink_netfilter): New entry.
+	* tests/pure_executables.list: Add netlink_netfilter.
+	* tests/.gitignore: Likewise.
+
+	tests: check decoding of NETLINK_AUDIT message types.
+	* tests/netlink_audit.c: New file.
+	* tests/gen_tests.in (netlink_audit): New entry.
+	* tests/pure_executables.list: Add netlink_audit.
+	* tests/.gitignore: Likewise.
+
+	tests: check decoding of NETLINK_ROUTE message types.
+	* tests/netlink_route.c: New file.
+	* tests/gen_tests.in (netlink_route): New entry.
+	* tests/pure_executables.list: Add netlink_route.
+	* tests/.gitignore: Likewise.
+
+	tests: check decoding of NETLINK_SOCK_DIAG message types.
+	* tests/netlink_sock_diag.c: New file.
+	* tests/netlink_sock_diag.test: New test.
+	* tests/pure_executables.list: Add netlink_sock_diag.
+	* tests/.gitignore: Likewise.
+	* tests/Makefile.am (DECODER_TESTS): Add netlink_sock_diag.test.
+
+2017-06-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: use create_nl_socket in netlink_protocol.test.
+	* tests/netlink_protocol.c (main): Use create_nl_socket.
+
+	tests: change netlink_protocol.test to trace sendto syscalls only.
+	* tests/gen_tests.in (netlink_protocol): Replace %network with sendto.
+	* tests/netlink_protocol.c (main): Update expected output.
+
+	tests: enhance create_nl_socket diagnostics messages.
+	* tests/tests.h (create_nl_socket): Rename to create_nl_socket_ext,
+	add a string argument.
+	(create_nl_socket): New macro wrapper around create_nl_socket_ext.
+	* tests/create_nl_socket.c (create_nl_socket): Rename
+	to create_nl_socket_ext, add a string argument, include it
+	in diagnostic messages.
+
+	tests: use const and designated initializers in create_nl_socket.c.
+	* tests/create_nl_socket.c: Stop including <string.h>.
+	(create_nl_socket): Use const and designated initializers.
+
+2017-06-05  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	tests: add create_nl_socket function to libtests.
+	* tests/create_nl_socket.c: New file.
+	* tests/tests.h (create_nl_socket): New prototype.
+	* tests/Makefile.am (libtests_a_SOURCES): Add create_nl_socket.c.
+
+2017-06-05  Dmitry V. Levin  <ldv@altlinux.org>
+	    Fabien Siron  <fabien.siron@epita.fr>
+
+	netlink: add decoding of NETLINK_NETFILTER message types.
+	* xlat/nl_netfilter_msg_types.in: New file.
+	* xlat/nl_netfilter_subsys_ids.in: Likewise.
+	* netlink.c: Include "xlat/nl_netfilter_msg_types.h"
+	and "xlat/nl_netfilter_subsys_ids.h".
+	(nlmsg_types): Add NETLINK_NETFILTER.
+	(decode_nlmsg_type): Handle NETLINK_NETFILTER.
+
+	netlink: add decoding of NETLINK_XFRM message types.
+	* xlat/nl_xfrm_types.in: New file.
+	* netlink.c: Include "xlat/nl_xfrm_types.h".
+	(nlmsg_types): Add NETLINK_XFRM.
+
+	netlink: add decoding of NETLINK_SELINUX message types.
+	* xlat/nl_selinux_types.in: New file.
+	* netlink.c: Include "xlat/nl_selinux_types.h".
+	(nlmsg_types): Add NETLINK_SELINUX.
+
+	netlink: add decoding of NETLINK_ROUTE message types.
+	* xlat/nl_route_types.in: New file.
+	* netlink.c: Include <linux/rtnetlink.h> and "xlat/nl_route_types.h".
+	(nlmsg_types): Add NETLINK_ROUTE.
+
+	netlink: add decoding of NETLINK_AUDIT message types.
+	* xlat/nl_audit_types.in: New file.
+	* netlink.c: Include <linux/audit.h> and "xlat/nl_audit_types.h".
+	(nlmsg_types): Add NETLINK_AUDIT.
+
+2017-06-05  Dmitry V. Levin  <ldv@altlinux.org>
+	    Fabien Siron  <fabien.siron@epita.fr>
+
+	netlink: implement generic nlmsg_type decoding.
+	Implement a pluggable mechanism of nlmsg_type decoding.
+	Add decoding of NETLINK_SOCK_DIAG types.
+
+	* linux/sock_diag.h (SOCK_DESTROY): New macro.
+	* xlat/nl_sock_diag_types.in: New file.
+	* netlink.c: Include xlat/nl_sock_diag_types.h.
+	(get_fd_nl_family, decode_nlmsg_type): New functions.
+	(print_nlmsghdr): Use them for nlmsg_type decoding.
+
+2017-06-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink: add netlink family argument to printers and decoders.
+	* netlink.c (NL_FAMILY_ERROR, NL_FAMILY_DEFAULT): New constants.
+	(print_nlmsghdr): Add netlink family argument, change return type
+	to int, return family.
+	(decode_nlmsghdr_with_payload, decode_nlmsgerr, decode_payload): Add
+	netlink family argument.  All callers updated.
+
+2017-06-05  Fabien Siron  <fabien.siron@epita.fr>
+	    Dmitry V. Levin  <ldv@altlinux.org>
+
+	Add file descriptor argument to decode_netlink.
+	* defs.h (decode_netlink): Add file descriptor argument.
+	* io.c (print_iovec): Specify file descriptor to decode_netlink.
+	* net.c (decode_sockbuf): Likewise.
+	* netlink.c (print_nlmsghdr, decode_nlmsghdr_with_payload,
+	decode_nlmsgerr, decode_payload, decode_nlmsghdr_with_payload,
+	decode_netlink): Likewise.
+	All callers updated.
+
+	Introduce getfdinode to obtain inode from fd.
+	* defs.h (getfdinode): New prototype.
+	* utils.c (getfdinode): New function.
+
+2017-06-05  Fabien Siron  <fabien.siron@epita.fr>
+	    Dmitry V. Levin  <ldv@altlinux.org>
+
+	Introduce get_sockaddr_by_inode.
+	Add a way to get socket information without printing it.
+
+	* defs.h (get_sockaddr_by_inode): New prototype.
+	* socketutils.c (get_sockaddr_by_inode): New function.
+
+2017-06-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+	socketutils.c: introduce get_sockaddr_by_inode_uncached.
+	* socketutils.c (get_sockaddr_by_inode_uncached): New function.
+	(print_sockaddr_by_inode_uncached): Use it.
+
+2017-06-05  Fabien Siron  <fabien.siron@epita.fr>
+	    Dmitry V. Levin  <ldv@altlinux.org>
+
+	socketutils.c: use get_sockaddr_by_inode_cached.
+	* socketutils.c (unix_print, inet_print, tcp_v4_print, tcp_v6_print,
+	udp_v4_print, udp_v6_print, netlink_print): Remove.
+	(unix_get, inet_get, tcp_v4_get, tcp_v6_get, udp_v4_get,
+	udp_v6_get, netlink_get): New functions.
+	(protocols): Update.
+
+2017-06-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+	socketutils.c: move inet_print closer to its first use.
+	* socketutils.c (inet_print): Move right before tcp_v4_print.
+
+2017-06-05  Fabien Siron  <fabien.siron@epita.fr>
+	    Dmitry V. Levin  <ldv@altlinux.org>
+
+	socketutils.c: introduce cache_inode_details.
+	cache_inode_details gives a way to obtain cache information without
+	printing it.
+
+	* socketutils.c (cache_and_print_inode_details): Rename
+	to cache_inode_details.  Do not print cached information.
+	(inet_parse_response, unix_parse_response, netlink_parse_response):
+	Use cache_inode_details instead of cache_and_print_inode_details.
+	(inet_print, unix_print, netlink_print): Call
+	print_sockaddr_by_inode_cached.
+
+2017-06-05  Victor Krapivensky  <krapivenskiy.va@phystech.edu>
+
+	strace.c: move termination code to a separate function.
+	This will be needed for the pull-style API.
+
+	* strace.c (terminate): New function.
+	(main): Use it.
+
+2017-06-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: avoid hitting SO_SNDBUF limit in sendfile/sendfile64 tests.
+	Do not assume that an executable is small enough and SO_SNDBUF is large
+	enough so that the executable could be sendfile'ed into a socket pair.
+
+	* tests/sendfile.c (main): Create a regular file of the right size
+	to avoid hitting SO_SNDBUF limit.
+	* tests/sendfile64.c: Likewise.
+
+	Reported-by: Andreas Schwab <schwab@linux-m68k.org>
+
+2017-06-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Move netlink_protocols definition from net.c to netlink.c.
+	The side effect of #include "xlat/netlink_protocols.h" is
+	NETLINK_* constants properly defined in that header file.
+	While net.c does not use these constants itself, netlink.c
+	is going to need them soon.
+
+	* net.c: Move inclusion of "xlat/netlink_protocols.h" ...
+	* netlink.c: ... here.
+
+2017-06-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+	travis: switch from gcc-6 to gcc-7.
+	* .travis.yml (matrix): Change gcc-6 to gcc-7.
+
+	tests: extend checking of NLMSG_DONE decoding.
+	* tests/netlink_protocol.c (test_nlmsg_done):  Use designated
+	initializers.  Check decoding of messages with non-integer payload.
+
+2017-06-04  JingPiao Chen  <chenjingpiao@gmail.com>
+
+	netlink: decode NLMSG_DONE messages.
+	* netlink.c (decode_payload): Decode NLMSG_DONE messages.
+	* tests/netlink_protocol.c (test_nlmsg_done): New function
+	for checking decoding of NLMSG_DONE messages.
+	(main): Use it.
+
+2017-06-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+	socketutils.c: introduce get_sockaddr_by_inode_cached.
+	* socketutils.c (get_sockaddr_by_inode_cached): New function.
+	(print_sockaddr_by_inode_cached): Use it.
+
+2017-06-03  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Unexport print_sockaddr_by_inode_cached.
+	Change print_sockaddr_by_inode to be the only function exposed,
+	hide print_sockaddr_by_inode_cached as a part of implementation.
+
+	* defs.h (print_sockaddr_by_inode_cached): Remove prototype.
+	(print_sockaddr_by_inode): Add struct tcb * and descriptor arguments.
+	* socketutils.c (print_sockaddr_by_inode_cached): Make static.
+	(print_sockaddr_by_inode): Rename to print_sockaddr_by_inode_uncached,
+	make static.
+	(print_sockaddr_by_inode): New function.
+	* util.c (printfd): Update to use new print_sockaddr_by_inode.
+
+2017-06-03  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Introduce str_strip_prefix_len function and STR_STRIP_PREFIX macro.
+	Address proliferation of string prefix check implementations.
+
+	* defs.h (str_strip_prefix_len): New inline function.
+	(STR_STRIP_PREFIX): New macro.
+	* qualify.c (strip_prefix): Remove.
+	(parse_inject_token): Use STR_STRIP_PREFIX instead of strip_prefix.
+	(qualify): Use str_strip_prefix_len.
+	* socketutils.c (netlink_parse_response): Likewise.
+	* util.c (printfd): Likewise.
+
+2017-06-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+	netlink: move NLMSG_ERROR payload length check to nlmsgerr decoder.
+	Move decoder specific check to the decoder.
+
+	* netlink.c (decode_payload): Move NLMSG_ERROR payload length check ...
+	(decode_nlmsgerr): ... here.
+
+2017-06-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+	strace.c: handle PTRACE_EVENT_EXEC like other events.
+	There is nothing unusual about PTRACE_EVENT_EXEC that would require
+	a special treatment.
+
+	* strace.c (next_event): Move PTRACE_EVENT_EXEC handling to the main
+	switch statement.
+
+2017-06-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+	strace.c: remove dead code.
+	As strace does not use WCONTINUED flag, there is no need to handle
+	WIFCONTINUED status.
+
+	* strace.c (print_debug_info) [WIFCONTINUED]: Remove.
+	(next_event): Remove redundant !WIFSTOPPED check.
+
+2017-06-02  Victor Krapivensky  <krapivenskiy.va@phystech.edu>
+
+	strace.c: refactor trace into two functions.
+	This change decouples waiting for next event from reacting to it.  This
+	makes the control flow easier to understand, and serves as a preparation
+	for implementing a pull-style API for LuaJIT.
+
+	* strace.c (enum trace_event): New enum.
+	(trace): Split into ...
+	(next_event, dispatch_event): ... new functions.
+	(main): Use them.
+
+2017-05-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	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-28  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: check decoding of sigaction syscall.
+	* tests/sigaction.c: New file.
+	* tests/gen_tests.in (sigaction): New entry.
+	* tests/pure_executables.list: Add sigaction.
+	* tests/.gitignore: Likewise.
+
+	tests: rename sigaction.test to rt_sigaction.test.
+	* tests/sigaction.awk: Rename to rt_sigaction.awk.
+	* tests/sigaction.c: Rename to tests/rt_sigaction.c.
+	* tests/sigaction.test: Rename to tests/rt_sigaction.test.
+	* tests/.gitignore: Replace sigaction with rt_sigaction.
+	* tests/pure_executables.list: Likewise.
+	* tests/Makefile.am (DECODER_TESTS): Replace sigaction.test
+	with rt_sigaction.test.
+	(EXTRA_DIST): Replace sigaction.awk with rt_sigaction.awk.
+
+2017-05-28  Dmitry V. Levin  <ldv@altlinux.org>
+
+	sparc: enhance decoding of signal number argument of sigaction syscall.
+	On sparc, unlike all other architectures, old sigaction syscall takes
+	a negated signal number.
+
+	* signal.c (SYS_FUNC(sigaction)) [SPARC || SPARC64]: Enhance printing
+	of negative signal number argument.
+
+2017-05-28  Dmitry V. Levin  <ldv@altlinux.org>
+
+	signal: enhance printing of old_sigaction.mask.
+	* signal.c (decode_old_sigaction): Print old_sigaction.mask
+	using tprint_old_sigmask_val.
+
+	signal: limit scope of struct old_sigaction32 definition.
+	* signal.c (struct old_sigaction32): Define only if [!current_wordsize].
+
+2017-05-28  Dmitry V. Levin  <ldv@altlinux.org>
+
+	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  Dmitry V. Levin  <ldv@altlinux.org>
+
+	xlat: rename SA_STACK to SA_ONSTACK.
+	SA_ONSTACK is the standard name while its alias SA_STACK is not even
+	defined on many platforms.
+
+	* xlat/sigact_flags.in (SA_STACK): Rename to SA_ONSTACK.
+
+2017-05-28  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: check decoding of sigpending syscall.
+	* tests/sigpending.c: New file.
+	* tests/gen_tests.in (sigpending): New entry.
+	* tests/pure_executables.list: Add sigpending.
+	* tests/.gitignore: Likewise.
+
+	tests: check decoding of sigprocmask syscall.
+	* tests/sigprocmask.c: New file.
+	* tests/gen_tests.in (sigprocmask): New entry.
+	* tests/pure_executables.list: Add sigprocmask.
+	* tests/.gitignore: Likewise.
+
+2017-05-28  Dmitry V. Levin  <ldv@altlinux.org>
+
+	alpha: rename sys_sigprocmask to sys_osf_sigprocmask.
+	Parsers of sigprocmask and osf_sigprocmask syscalls are different
+	anyway, so rename the function to match the syscall name.
+
+	* signal.c [ALPHA] (SYS_FUNC(sigprocmask)): Rename
+	to SYS_FUNC(osf_sigprocmask).
+	* linux/alpha/syscallent.h: Update sys_func.
+
+2017-05-27  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Enable coverage when strace is self terminated by signal.
+	The data collected by -fprofile-arcs during program run is saved
+	on program exit.  When program is terminated by signal, the data
+	is not saved.  However, libgcov provides an interface to dump
+	the data at runtime.
+
+	* m4/ax_code_coverage.m4 (AX_CODE_COVERAGE): Add -DENABLE_COVERAGE_GCOV
+	to CODE_COVERAGE_CPPFLAGS.
+	* strace.c [ENABLE_COVERAGE_GCOV] (__gcov_flush): New prototype.
+	(main) [ENABLE_COVERAGE_GCOV]: Call __gcov_flush() before raise()
+	and sigprocmask() calls that might cause program termination.
+
+2017-05-27  Dmitry V. Levin  <ldv@altlinux.org>
+
+	tests: check termination signal forwarding.
+	* tests/run_expect_termsig.c: New file.
+	* tests/unblock_reset_raise.c: Likewise.
+	* tests/termsig.test: New test.
+	* tests/.gitignore: Add run_expect_termsig and unblock_reset_raise.
+	* tests/Makefile.am (check_PROGRAMS): Likewise.
+	(MISC_TESTS): Add termsig.test.
+
+2017-05-27  Dmitry V. Levin  <ldv@altlinux.org>
+
+	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  Dmitry V. Levin  <ldv@altlinux.org>
+
+	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  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Refactor setting of signal handlers to reduce redundancy.
+	* strace.c (set_sigaction): New function.
+	(init): Use it instead of sigaction with sigaddset.
+
+	tests: check how signals are unblocked in interactive mode.
+	* tests/block_reset_raise_run.c: New file.
+	* tests/interactive_block.test: New test.
+	* tests/.gitignore: Add block_reset_raise_run.
+	* tests/Makefile.am (check_PROGRAMS): Likewise.
+	(MISC_TESTS): Add interactive_block.test.
+
+2017-05-27  Dmitry V. Levin  <ldv@altlinux.org>
+
+	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-26  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Cleanup interactive check.
+	* strace.c (init): Check for INTR_WHILE_WAIT mode the same way
+	as in other places.
+
+	tests: check decoding of signal syscall.
+	* tests/signal.c: New file.
+	* tests/gen_tests.in (signal): New entry.
+	* tests/pure_executables.list: Add signal.
+	* tests/.gitignore: Likewise.
+
+2017-05-26  Eugene Syromyatnikov  <evgsyr@gmail.com>
+
+	Unify capitalisation of (c) in copyright notices.
+
+2017-05-25  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Post-release administrivia.
+	* NEWS: Add a header line for the next release.
+	* debian/changelog.in: Add a changelog entry for 4.17-1.
+	* strace.spec.in: Likewise.
+
 2017-05-24  Dmitry V. Levin  <ldv@altlinux.org>
 
 	Prepare for 4.17 release.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..cb65021
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,1064 @@
+# Automake input for strace.
+#
+# Copyright (c) 2002-2009 Roland McGrath <roland@redhat.com>
+# Copyright (c) 2006-2016 Dmitry V. Levin <ldv@altlinux.org>
+# Copyright (c) 2008-2015 Mike Frysinger <vapier@gentoo.org>
+# Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
+# Copyright (c) 2002-2017 The strace developers.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+if HAVE_M32_RUNTIME
+TESTS_M32 = tests-m32
+endif
+if HAVE_MX32_RUNTIME
+TESTS_MX32 = tests-mx32
+endif
+SUBDIRS = tests $(TESTS_M32) $(TESTS_MX32)
+
+bin_PROGRAMS = strace
+man_MANS = strace.1
+bin_SCRIPTS = strace-graph strace-log-merge
+
+OS		= linux
+# ARCH is `i386', `m68k', `sparc', etc.
+ARCH		= @arch@
+
+ACLOCAL_AMFLAGS = -I m4
+AM_CFLAGS = $(WARN_CFLAGS)
+AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \
+	      -I$(srcdir)/$(OS)/$(ARCH) \
+	      -I$(builddir)/$(OS) \
+	      -I$(srcdir)/$(OS) \
+	      -I$(builddir) \
+	      -I$(srcdir)
+
+AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD)
+AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS)
+
+include xlat/Makemodule.am
+
+strace_CPPFLAGS = $(AM_CPPFLAGS)
+strace_CFLAGS = $(AM_CFLAGS)
+strace_LDFLAGS =
+strace_LDADD = libstrace.a
+noinst_LIBRARIES = libstrace.a
+
+libstrace_a_CPPFLAGS = $(strace_CPPFLAGS)
+libstrace_a_CFLAGS = $(strace_CFLAGS)
+libstrace_a_SOURCES =	\
+	fstatfs.c \
+	fstatfs64.c \
+	ipc.c \
+	sigreturn.c	\
+	socketcall.c \
+	statfs.c \
+	statfs64.c \
+	sync_file_range.c \
+	sync_file_range2.c \
+	upeek.c		\
+	upoke.c		\
+	# end of libstrace_a_SOURCES
+
+strace_SOURCES =	\
+	access.c	\
+	affinity.c	\
+	aio.c		\
+	alpha.c		\
+	bjm.c		\
+	block.c		\
+	bpf.c		\
+	btrfs.c		\
+	cacheflush.c	\
+	capability.c	\
+	caps0.h		\
+	caps1.h		\
+	chdir.c		\
+	chmod.c		\
+	clone.c		\
+	copy_file_range.c \
+	count.c		\
+	defs.h		\
+	desc.c		\
+	dirent.c	\
+	dirent64.c	\
+	dm.c		\
+	dyxlat.c	\
+	empty.h		\
+	epoll.c		\
+	evdev.c		\
+	eventfd.c	\
+	execve.c	\
+	fadvise.c	\
+	fallocate.c	\
+	fanotify.c	\
+	fchownat.c	\
+	fcntl.c		\
+	fetch_seccomp_fprog.c \
+	fetch_struct_flock.c \
+	fetch_struct_mmsghdr.c \
+	fetch_struct_msghdr.c \
+	fetch_struct_stat.c \
+	fetch_struct_stat64.c \
+	fetch_struct_statfs.c \
+	file_handle.c	\
+	file_ioctl.c	\
+	fs_x_ioctl.c	\
+	flock.c		\
+	flock.h		\
+	futex.c		\
+	gcc_compat.h	\
+	get_robust_list.c \
+	getcpu.c	\
+	getcwd.c	\
+	getrandom.c	\
+	hdio.c		\
+	hostname.c	\
+	inotify.c	\
+	io.c		\
+	ioctl.c		\
+	ioperm.c	\
+	iopl.c		\
+	ioprio.c	\
+	ipc_defs.h	\
+	ipc_msg.c	\
+	ipc_msgctl.c	\
+	ipc_sem.c	\
+	ipc_shm.c	\
+	ipc_shmctl.c	\
+	kcmp.c		\
+	kernel_types.h	\
+	kexec.c		\
+	keyctl.c	\
+	ldt.c		\
+	link.c		\
+	linux/asm_stat.h \
+	linux/x32/asm_stat.h \
+	linux/x86_64/asm_stat.h \
+	lookup_dcookie.c \
+	loop.c		\
+	lseek.c		\
+	macros.h	\
+	mem.c		\
+	membarrier.c	\
+	memfd_create.c	\
+	mknod.c		\
+	mmsghdr.c	\
+	mount.c		\
+	mpers_type.h	\
+	mq.c		\
+	msghdr.c	\
+	msghdr.h	\
+	mtd.c		\
+	native_defs.h	\
+	net.c		\
+	netlink.c       \
+	netlink.h	\
+	netlink_sock_diag.c \
+	nlattr.c	\
+	nlattr.h	\
+	nsfs.c          \
+	nsfs.h          \
+	nsig.h		\
+	numa.c		\
+	oldstat.c	\
+	open.c		\
+	or1k_atomic.c	\
+	pathtrace.c	\
+	perf.c		\
+	perf_event_struct.h \
+	personality.c	\
+	pkeys.c		\
+	poll.c		\
+	prctl.c		\
+	print_dev_t.c	\
+	print_fields.h	\
+	print_mq_attr.c	\
+	print_msgbuf.c	\
+	print_sg_req_info.c \
+	print_sigevent.c \
+	print_statfs.c	\
+	print_struct_stat.c \
+	print_time.c	\
+	print_timespec.c \
+	print_timeval.c	\
+	print_timex.c	\
+	printmode.c	\
+	printrusage.c	\
+	printsiginfo.c	\
+	printsiginfo.h	\
+	process.c	\
+	process_vm.c	\
+	ptp.c		\
+	ptrace.h	\
+	qualify.c	\
+	quota.c		\
+	readahead.c	\
+	readlink.c	\
+	reboot.c	\
+	regs.h		\
+	renameat.c	\
+	resource.c	\
+	rt_sigframe.c	\
+	rt_sigreturn.c	\
+	rtc.c		\
+	sched.c		\
+	sched_attr.h	\
+	scsi.c		\
+	seccomp.c	\
+	seccomp_fprog.h \
+	sendfile.c	\
+	sg_io_v3.c	\
+	sg_io_v4.c	\
+	sigaltstack.c	\
+	sigevent.h	\
+	signal.c	\
+	signalfd.c	\
+	sock.c		\
+	sockaddr.c	\
+	socketutils.c	\
+	sram_alloc.c	\
+	stat.c		\
+	stat.h		\
+	stat64.c	\
+	statfs.c	\
+	statfs.h	\
+	statx.c		\
+	statx.h		\
+	strace.c	\
+	swapon.c	\
+	syscall.c	\
+	sysctl.c	\
+	sysent.h	\
+	sysinfo.c	\
+	syslog.c	\
+	sysmips.c	\
+	term.c		\
+	time.c		\
+	times.c		\
+	truncate.c	\
+	ubi.c		\
+	uid.c		\
+	uid16.c		\
+	umask.c		\
+	umount.c	\
+	uname.c		\
+	userfaultfd.c	\
+	ustat.c		\
+	util.c		\
+	utime.c		\
+	utimes.c	\
+	v4l2.c		\
+	wait.c		\
+	xattr.c		\
+	xlat.c		\
+	xlat.h		\
+	xmalloc.c	\
+	# end of strace_SOURCES
+
+if USE_LIBUNWIND
+strace_SOURCES += unwind.c
+strace_CPPFLAGS += $(libunwind_CPPFLAGS)
+strace_LDFLAGS += $(libunwind_LDFLAGS)
+strace_LDADD += $(libunwind_LIBS)
+endif
+
+@CODE_COVERAGE_RULES@
+CODE_COVERAGE_BRANCH_COVERAGE = 1
+CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
+	--prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
+CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*'
+strace_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
+strace_CFLAGS += $(CODE_COVERAGE_CFLAGS)
+strace_LDADD += $(CODE_COVERAGE_LDFLAGS)
+
+# Enable this to get link map generated
+#strace_LDFLAGS += -Wl,-Map=strace.mapfile
+
+EXTRA_DIST =				\
+	$(man_MANS)			\
+	.version			\
+	COPYING				\
+	CREDITS				\
+	ChangeLog			\
+	ChangeLog-CVS			\
+	README-linux-ptrace		\
+	debian/changelog		\
+	debian/compat			\
+	debian/control			\
+	debian/copyright		\
+	debian/rules			\
+	debian/source/format		\
+	debian/strace-udeb.install	\
+	debian/strace.docs		\
+	debian/strace.examples		\
+	debian/strace.install		\
+	debian/strace.manpages		\
+	debian/strace64.install		\
+	debian/strace64.manpages	\
+	debian/watch			\
+	generate_sen.sh			\
+	ioctl_iocdef.c			\
+	ioctlsort.c			\
+	linux/32/ioctls_inc.h		\
+	linux/32/ioctls_inc_align16.h	\
+	linux/32/ioctls_inc_align32.h	\
+	linux/32/ioctls_inc_align64.h	\
+	linux/32/syscallent.h		\
+	linux/64/ioctls_inc.h		\
+	linux/64/syscallent.h		\
+	linux/aarch64/arch_regs.c	\
+	linux/aarch64/arch_regs.h	\
+	linux/aarch64/arch_rt_sigframe.c\
+	linux/aarch64/arch_sigreturn.c	\
+	linux/aarch64/errnoent1.h	\
+	linux/aarch64/get_error.c	\
+	linux/aarch64/get_scno.c	\
+	linux/aarch64/get_syscall_args.c\
+	linux/aarch64/ioctls_arch0.h	\
+	linux/aarch64/ioctls_arch1.h	\
+	linux/aarch64/ioctls_inc0.h	\
+	linux/aarch64/ioctls_inc1.h	\
+	linux/aarch64/set_error.c	\
+	linux/aarch64/set_scno.c	\
+	linux/aarch64/signalent1.h	\
+	linux/aarch64/syscallent.h	\
+	linux/aarch64/syscallent1.h	\
+	linux/alpha/arch_getrval2.c	\
+	linux/alpha/arch_regs.c		\
+	linux/alpha/arch_regs.h		\
+	linux/alpha/arch_rt_sigframe.c	\
+	linux/alpha/arch_sigreturn.c	\
+	linux/alpha/errnoent.h		\
+	linux/alpha/get_error.c		\
+	linux/alpha/get_scno.c		\
+	linux/alpha/get_syscall_args.c	\
+	linux/alpha/get_syscall_result.c\
+	linux/alpha/ioctls_arch0.h	\
+	linux/alpha/ioctls_inc0.h	\
+	linux/alpha/set_error.c		\
+	linux/alpha/set_scno.c		\
+	linux/alpha/signalent.h		\
+	linux/alpha/syscallent.h	\
+	linux/alpha/userent.h		\
+	linux/arc/arch_regs.c		\
+	linux/arc/arch_regs.h		\
+	linux/arc/arch_rt_sigframe.c	\
+	linux/arc/get_error.c		\
+	linux/arc/get_scno.c		\
+	linux/arc/get_syscall_args.c	\
+	linux/arc/ioctls_arch0.h	\
+	linux/arc/ioctls_inc0.h		\
+	linux/arc/set_error.c		\
+	linux/arc/set_scno.c		\
+	linux/arc/syscallent.h		\
+	linux/arch_regs.h		\
+	linux/arch_sigreturn.c		\
+	linux/arm/arch_regs.c		\
+	linux/arm/arch_regs.h		\
+	linux/arm/arch_rt_sigframe.c	\
+	linux/arm/arch_sigreturn.c	\
+	linux/arm/get_error.c		\
+	linux/arm/get_scno.c		\
+	linux/arm/get_syscall_args.c	\
+	linux/arm/ioctls_arch0.h	\
+	linux/arm/ioctls_inc0.h		\
+	linux/arm/set_error.c		\
+	linux/arm/set_scno.c		\
+	linux/arm/syscallent.h		\
+	linux/arm/userent.h		\
+	linux/avr32/arch_regs.c		\
+	linux/avr32/arch_regs.h		\
+	linux/avr32/arch_rt_sigframe.c	\
+	linux/avr32/get_error.c		\
+	linux/avr32/get_scno.c		\
+	linux/avr32/get_syscall_args.c	\
+	linux/avr32/ioctls_arch0.h	\
+	linux/avr32/ioctls_inc0.h	\
+	linux/avr32/set_error.c		\
+	linux/avr32/set_scno.c		\
+	linux/avr32/syscallent.h	\
+	linux/avr32/userent.h		\
+	linux/bfin/arch_regs.c		\
+	linux/bfin/arch_rt_sigframe.c	\
+	linux/bfin/get_error.c		\
+	linux/bfin/get_scno.c		\
+	linux/bfin/get_syscall_args.c	\
+	linux/bfin/get_syscall_result.c	\
+	linux/bfin/ioctls_arch0.h	\
+	linux/bfin/ioctls_inc0.h	\
+	linux/bfin/rt_sigframe.h	\
+	linux/bfin/set_error.c		\
+	linux/bfin/set_scno.c		\
+	linux/bfin/syscallent.h		\
+	linux/bfin/userent.h		\
+	linux/crisv10/arch_regs.c	\
+	linux/crisv10/arch_rt_sigframe.c\
+	linux/crisv10/arch_sigreturn.c	\
+	linux/crisv10/get_error.c	\
+	linux/crisv10/get_scno.c	\
+	linux/crisv10/get_syscall_args.c	\
+	linux/crisv10/get_syscall_result.c	\
+	linux/crisv10/rt_sigframe.h	\
+	linux/crisv10/set_error.c	\
+	linux/crisv10/set_scno.c	\
+	linux/crisv10/syscallent.h	\
+	linux/crisv10/userent.h		\
+	linux/crisv32/arch_regs.c	\
+	linux/crisv32/arch_rt_sigframe.c\
+	linux/crisv32/arch_sigreturn.c	\
+	linux/crisv32/get_error.c	\
+	linux/crisv32/get_scno.c	\
+	linux/crisv32/get_syscall_args.c	\
+	linux/crisv32/get_syscall_result.c	\
+	linux/crisv32/rt_sigframe.h	\
+	linux/crisv32/set_error.c	\
+	linux/crisv32/set_scno.c	\
+	linux/crisv32/syscallent.h	\
+	linux/crisv32/userent.h		\
+	linux/dummy.h			\
+	linux/errnoent.h		\
+	linux/getregs_old.h		\
+	linux/hppa/arch_regs.c		\
+	linux/hppa/arch_regs.h		\
+	linux/hppa/arch_rt_sigframe.c	\
+	linux/hppa/errnoent.h		\
+	linux/hppa/get_error.c		\
+	linux/hppa/get_scno.c		\
+	linux/hppa/get_syscall_args.c	\
+	linux/hppa/get_syscall_result.c	\
+	linux/hppa/ioctls_arch0.h	\
+	linux/hppa/ioctls_inc0.h	\
+	linux/hppa/rt_sigframe.h	\
+	linux/hppa/set_error.c		\
+	linux/hppa/set_scno.c		\
+	linux/hppa/signalent.h		\
+	linux/hppa/syscallent.h		\
+	linux/i386/arch_regs.c		\
+	linux/i386/arch_regs.h		\
+	linux/i386/arch_rt_sigframe.c	\
+	linux/i386/arch_sigreturn.c	\
+	linux/i386/get_error.c		\
+	linux/i386/get_scno.c		\
+	linux/i386/get_syscall_args.c	\
+	linux/i386/ioctls_arch0.h	\
+	linux/i386/ioctls_inc0.h	\
+	linux/i386/rt_sigframe.h	\
+	linux/i386/set_error.c		\
+	linux/i386/set_scno.c		\
+	linux/i386/syscallent.h		\
+	linux/i386/userent.h		\
+	linux/i386/userent0.h		\
+	linux/ia64/arch_getrval2.c	\
+	linux/ia64/arch_regs.c		\
+	linux/ia64/arch_regs.h		\
+	linux/ia64/arch_rt_sigframe.c	\
+	linux/ia64/get_error.c		\
+	linux/ia64/get_scno.c		\
+	linux/ia64/get_syscall_args.c	\
+	linux/ia64/ioctls_arch0.h	\
+	linux/ia64/ioctls_inc0.h	\
+	linux/ia64/rt_sigframe.h	\
+	linux/ia64/set_error.c		\
+	linux/ia64/set_scno.c		\
+	linux/ia64/syscallent.h		\
+	linux/ia64/userent.h		\
+	linux/inet_diag.h		\
+	linux/m68k/arch_regs.c		\
+	linux/m68k/arch_regs.h		\
+	linux/m68k/arch_rt_sigframe.c	\
+	linux/m68k/arch_sigreturn.c	\
+	linux/m68k/get_error.c		\
+	linux/m68k/get_scno.c		\
+	linux/m68k/get_syscall_args.c	\
+	linux/m68k/ioctls_arch0.h	\
+	linux/m68k/ioctls_inc0.h	\
+	linux/m68k/rt_sigframe.h	\
+	linux/m68k/set_error.c		\
+	linux/m68k/set_scno.c		\
+	linux/m68k/syscallent.h		\
+	linux/m68k/userent.h		\
+	linux/metag/arch_regs.c		\
+	linux/metag/arch_regs.h		\
+	linux/metag/arch_rt_sigframe.c	\
+	linux/metag/get_error.c		\
+	linux/metag/get_scno.c		\
+	linux/metag/get_syscall_args.c	\
+	linux/metag/ioctls_arch0.h	\
+	linux/metag/ioctls_inc0.h	\
+	linux/metag/set_error.c		\
+	linux/metag/set_scno.c		\
+	linux/metag/syscallent.h	\
+	linux/microblaze/arch_regs.c	\
+	linux/microblaze/arch_rt_sigframe.c\
+	linux/microblaze/arch_sigreturn.c	\
+	linux/microblaze/get_error.c	\
+	linux/microblaze/get_scno.c	\
+	linux/microblaze/get_syscall_args.c	\
+	linux/microblaze/get_syscall_result.c	\
+	linux/microblaze/ioctls_arch0.h	\
+	linux/microblaze/ioctls_inc0.h	\
+	linux/microblaze/set_error.c	\
+	linux/microblaze/set_scno.c	\
+	linux/microblaze/syscallent.h	\
+	linux/microblaze/userent.h	\
+	linux/mips/arch_getrval2.c	\
+	linux/mips/arch_regs.c		\
+	linux/mips/arch_regs.h		\
+	linux/mips/arch_rt_sigframe.c	\
+	linux/mips/arch_sigreturn.c	\
+	linux/mips/errnoent.h		\
+	linux/mips/genstub.sh		\
+	linux/mips/get_error.c		\
+	linux/mips/get_scno.c		\
+	linux/mips/get_syscall_args.c	\
+	linux/mips/ioctls_arch0.h	\
+	linux/mips/ioctls_inc0.h	\
+	linux/mips/rt_sigframe.h	\
+	linux/mips/set_error.c		\
+	linux/mips/set_scno.c		\
+	linux/mips/signalent.h		\
+	linux/mips/syscallent-compat.h	\
+	linux/mips/syscallent-n32.h	\
+	linux/mips/syscallent-n64.h	\
+	linux/mips/syscallent-o32.h	\
+	linux/mips/syscallent.h		\
+	linux/mips/userent.h		\
+	linux/mtd-abi.h			\
+	linux/netlink_diag.h		\
+	linux/nios2/arch_regs.c		\
+	linux/nios2/arch_regs.h		\
+	linux/nios2/arch_rt_sigframe.c	\
+	linux/nios2/get_error.c		\
+	linux/nios2/get_scno.c		\
+	linux/nios2/get_syscall_args.c	\
+	linux/nios2/ioctls_arch0.h	\
+	linux/nios2/ioctls_inc0.h	\
+	linux/nios2/set_error.c		\
+	linux/nios2/set_scno.c		\
+	linux/nios2/syscallent.h	\
+	linux/or1k/arch_regs.c		\
+	linux/or1k/arch_regs.h		\
+	linux/or1k/arch_rt_sigframe.c	\
+	linux/or1k/get_error.c		\
+	linux/or1k/get_scno.c		\
+	linux/or1k/get_syscall_args.c	\
+	linux/or1k/ioctls_arch0.h	\
+	linux/or1k/ioctls_inc0.h	\
+	linux/or1k/set_error.c		\
+	linux/or1k/set_scno.c		\
+	linux/or1k/syscallent.h		\
+	linux/or1k/userent.h		\
+	linux/packet_diag.h		\
+	linux/personality.h		\
+	linux/powerpc/arch_regs.c	\
+	linux/powerpc/arch_regs.h	\
+	linux/powerpc/arch_rt_sigframe.c\
+	linux/powerpc/arch_sigreturn.c	\
+	linux/powerpc/errnoent.h	\
+	linux/powerpc/get_error.c	\
+	linux/powerpc/get_scno.c	\
+	linux/powerpc/get_syscall_args.c	\
+	linux/powerpc/getregs_old.c	\
+	linux/powerpc/getregs_old.h	\
+	linux/powerpc/ioctls_arch0.h	\
+	linux/powerpc/ioctls_inc0.h	\
+	linux/powerpc/set_error.c	\
+	linux/powerpc/set_scno.c	\
+	linux/powerpc/syscallent.h	\
+	linux/powerpc/userent.h		\
+	linux/powerpc64/arch_regs.c	\
+	linux/powerpc64/arch_regs.h	\
+	linux/powerpc64/arch_rt_sigframe.c\
+	linux/powerpc64/arch_sigreturn.c	\
+	linux/powerpc64/errnoent.h	\
+	linux/powerpc64/errnoent1.h	\
+	linux/powerpc64/get_error.c	\
+	linux/powerpc64/get_scno.c	\
+	linux/powerpc64/get_syscall_args.c	\
+	linux/powerpc64/getregs_old.c	\
+	linux/powerpc64/getregs_old.h	\
+	linux/powerpc64/ioctls_arch0.h	\
+	linux/powerpc64/ioctls_arch1.h	\
+	linux/powerpc64/ioctls_inc0.h	\
+	linux/powerpc64/ioctls_inc1.h	\
+	linux/powerpc64/rt_sigframe.h	\
+	linux/powerpc64/set_error.c	\
+	linux/powerpc64/set_scno.c	\
+	linux/powerpc64/signalent1.h	\
+	linux/powerpc64/syscallent.h	\
+	linux/powerpc64/syscallent1.h	\
+	linux/powerpc64/userent.h	\
+	linux/ptp_clock.h		\
+	linux/riscv/arch_regs.c		\
+	linux/riscv/arch_regs.h		\
+	linux/riscv/arch_rt_sigframe.c	\
+	linux/riscv/errnoent1.h		\
+	linux/riscv/get_error.c		\
+	linux/riscv/get_scno.c		\
+	linux/riscv/get_syscall_args.c	\
+	linux/riscv/ioctls_arch0.h	\
+	linux/riscv/ioctls_arch1.h	\
+	linux/riscv/ioctls_inc0.h	\
+	linux/riscv/ioctls_inc1.h	\
+	linux/riscv/set_error.c		\
+	linux/riscv/set_scno.c		\
+	linux/riscv/signalent1.h	\
+	linux/riscv/syscallent.h	\
+	linux/riscv/syscallent1.h	\
+	linux/rt_sigframe.h		\
+	linux/s390/arch_regs.c		\
+	linux/s390/arch_regs.h		\
+	linux/s390/arch_rt_sigframe.c	\
+	linux/s390/arch_sigreturn.c	\
+	linux/s390/get_error.c		\
+	linux/s390/get_scno.c		\
+	linux/s390/get_syscall_args.c	\
+	linux/s390/ioctls_arch0.h	\
+	linux/s390/ioctls_inc0.h	\
+	linux/s390/rt_sigframe.h	\
+	linux/s390/set_error.c		\
+	linux/s390/set_scno.c		\
+	linux/s390/syscallent.h		\
+	linux/s390/userent.h		\
+	linux/s390/userent0.h		\
+	linux/s390/userent1.h		\
+	linux/s390x/arch_regs.c		\
+	linux/s390x/arch_regs.h		\
+	linux/s390x/arch_rt_sigframe.c	\
+	linux/s390x/arch_sigreturn.c	\
+	linux/s390x/get_error.c		\
+	linux/s390x/get_scno.c		\
+	linux/s390x/get_syscall_args.c	\
+	linux/s390x/ioctls_arch0.h	\
+	linux/s390x/ioctls_inc0.h	\
+	linux/s390x/rt_sigframe.h	\
+	linux/s390x/set_error.c		\
+	linux/s390x/set_scno.c		\
+	linux/s390x/syscallent.h	\
+	linux/s390x/userent.h		\
+	linux/sh/arch_getrval2.c	\
+	linux/sh/arch_regs.c		\
+	linux/sh/arch_rt_sigframe.c	\
+	linux/sh/get_error.c		\
+	linux/sh/get_scno.c		\
+	linux/sh/get_syscall_args.c	\
+	linux/sh/get_syscall_result.c	\
+	linux/sh/ioctls_arch0.h		\
+	linux/sh/ioctls_inc0.h		\
+	linux/sh/set_error.c		\
+	linux/sh/set_scno.c		\
+	linux/sh/syscallent.h		\
+	linux/sh/userent.h		\
+	linux/sh/userent0.h		\
+	linux/sh64/arch_regs.c		\
+	linux/sh64/arch_regs.h		\
+	linux/sh64/arch_rt_sigframe.c	\
+	linux/sh64/get_error.c		\
+	linux/sh64/get_scno.c		\
+	linux/sh64/get_syscall_args.c	\
+	linux/sh64/get_syscall_result.c	\
+	linux/sh64/ioctls_arch0.h	\
+	linux/sh64/ioctls_inc0.h	\
+	linux/sh64/rt_sigframe.h	\
+	linux/sh64/set_error.c		\
+	linux/sh64/set_scno.c		\
+	linux/sh64/syscallent.h		\
+	linux/sh64/userent.h		\
+	linux/signalent.h		\
+	linux/smc_diag.h		\
+	linux/sock_diag.h		\
+	linux/sparc/arch_getrval2.c	\
+	linux/sparc/arch_regs.c		\
+	linux/sparc/arch_regs.h		\
+	linux/sparc/arch_rt_sigframe.c	\
+	linux/sparc/arch_sigreturn.c	\
+	linux/sparc/errnoent.h		\
+	linux/sparc/gen.pl		\
+	linux/sparc/get_error.c		\
+	linux/sparc/get_scno.c		\
+	linux/sparc/get_syscall_args.c	\
+	linux/sparc/ioctls_arch0.h	\
+	linux/sparc/ioctls_inc0.h	\
+	linux/sparc/rt_sigframe.h	\
+	linux/sparc/set_error.c		\
+	linux/sparc/set_scno.c		\
+	linux/sparc/signalent.h		\
+	linux/sparc/syscallent.h	\
+	linux/sparc/userent.h		\
+	linux/sparc64/arch_getrval2.c	\
+	linux/sparc64/arch_regs.c	\
+	linux/sparc64/arch_regs.h	\
+	linux/sparc64/arch_rt_sigframe.c\
+	linux/sparc64/arch_sigreturn.c	\
+	linux/sparc64/errnoent.h	\
+	linux/sparc64/errnoent1.h	\
+	linux/sparc64/get_error.c	\
+	linux/sparc64/get_scno.c	\
+	linux/sparc64/get_syscall_args.c\
+	linux/sparc64/ioctls_arch0.h	\
+	linux/sparc64/ioctls_arch1.h	\
+	linux/sparc64/ioctls_inc0.h	\
+	linux/sparc64/ioctls_inc1.h	\
+	linux/sparc64/rt_sigframe.h	\
+	linux/sparc64/set_error.c	\
+	linux/sparc64/set_scno.c	\
+	linux/sparc64/signalent.h	\
+	linux/sparc64/signalent1.h	\
+	linux/sparc64/syscallent.h	\
+	linux/sparc64/syscallent1.h	\
+	linux/sparc64/userent.h		\
+	linux/subcall.h			\
+	linux/syscall.h			\
+	linux/tile/arch_regs.c		\
+	linux/tile/arch_regs.h		\
+	linux/tile/arch_rt_sigframe.c	\
+	linux/tile/arch_sigreturn.c	\
+	linux/tile/errnoent1.h		\
+	linux/tile/get_error.c		\
+	linux/tile/get_scno.c		\
+	linux/tile/get_syscall_args.c	\
+	linux/tile/ioctls_arch0.h	\
+	linux/tile/ioctls_arch1.h	\
+	linux/tile/ioctls_inc0.h	\
+	linux/tile/ioctls_inc1.h	\
+	linux/tile/rt_sigframe.h	\
+	linux/tile/set_error.c		\
+	linux/tile/set_scno.c		\
+	linux/tile/signalent1.h		\
+	linux/tile/syscallent.h		\
+	linux/tile/syscallent1.h	\
+	linux/tile/userent.h		\
+	linux/ubi-user.h		\
+	linux/unix_diag.h		\
+	linux/userent.h			\
+	linux/userent0.h		\
+	linux/x32/arch_regs.c		\
+	linux/x32/arch_regs.h		\
+	linux/x32/arch_rt_sigframe.c	\
+	linux/x32/arch_sigreturn.c	\
+	linux/x32/errnoent1.h		\
+	linux/x32/get_error.c		\
+	linux/x32/get_scno.c		\
+	linux/x32/get_syscall_args.c	\
+	linux/x32/ioctls_arch0.h	\
+	linux/x32/ioctls_arch1.h	\
+	linux/x32/ioctls_inc0.h		\
+	linux/x32/ioctls_inc1.h		\
+	linux/x32/rt_sigframe.h		\
+	linux/x32/set_error.c		\
+	linux/x32/set_scno.c		\
+	linux/x32/signalent1.h		\
+	linux/x32/syscallent.h		\
+	linux/x32/syscallent1.h		\
+	linux/x32/userent.h		\
+	linux/x86_64/arch_regs.c	\
+	linux/x86_64/arch_regs.h	\
+	linux/x86_64/arch_rt_sigframe.c	\
+	linux/x86_64/arch_sigreturn.c	\
+	linux/x86_64/errnoent1.h	\
+	linux/x86_64/errnoent2.h	\
+	linux/x86_64/gentab.pl		\
+	linux/x86_64/get_error.c	\
+	linux/x86_64/get_scno.c		\
+	linux/x86_64/get_syscall_args.c	\
+	linux/x86_64/getregs_old.c	\
+	linux/x86_64/getregs_old.h	\
+	linux/x86_64/ioctls_arch0.h	\
+	linux/x86_64/ioctls_arch1.h	\
+	linux/x86_64/ioctls_arch2.h	\
+	linux/x86_64/ioctls_inc0.h	\
+	linux/x86_64/ioctls_inc1.h	\
+	linux/x86_64/ioctls_inc2.h	\
+	linux/x86_64/rt_sigframe.h	\
+	linux/x86_64/set_error.c	\
+	linux/x86_64/set_scno.c		\
+	linux/x86_64/signalent1.h	\
+	linux/x86_64/signalent2.h	\
+	linux/x86_64/syscallent.h	\
+	linux/x86_64/syscallent1.h	\
+	linux/x86_64/syscallent2.h	\
+	linux/x86_64/userent.h		\
+	linux/xtensa/arch_regs.c	\
+	linux/xtensa/arch_rt_sigframe.c	\
+	linux/xtensa/get_error.c	\
+	linux/xtensa/get_scno.c		\
+	linux/xtensa/get_syscall_args.c	\
+	linux/xtensa/get_syscall_result.c	\
+	linux/xtensa/ioctls_arch0.h	\
+	linux/xtensa/ioctls_inc0.h	\
+	linux/xtensa/set_error.c	\
+	linux/xtensa/set_scno.c		\
+	linux/xtensa/syscallent.h	\
+	linux/xtensa/userent.h		\
+	mpers.awk			\
+	mpers.sh			\
+	mpers_test.sh			\
+	mpers_xlat.h			\
+	scno.head			\
+	strace-graph			\
+	strace-log-merge		\
+	strace.spec			\
+	$(XLAT_INPUT_FILES)		\
+	$(XLAT_HEADER_FILES)		\
+	xlat/gen.sh			\
+	xlate.el
+
+.PHONY: check-valgrind-local
+check-valgrind-local:
+
+.PHONY: srpm
+srpm: dist-xz
+	rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
+
+$(srcdir)/.version:
+	$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
+
+strace_SOURCES_c = \
+	$(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES))
+
+sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
+	for f in $^; do \
+		sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
+	done | sort -u > $@
+
+syscallent_names = subcall.h syscallent.h syscallent1.h \
+		   syscallent-n32.h syscallent-n64.h syscallent-o32.h
+syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names))
+syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST))
+
+sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
+	for f in $^; do cat -- $$f; done | \
+		$(srcdir)/generate_sen.sh > $@
+
+dist-hook:
+	$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
+	${AM_V_GEN}echo $(COPYRIGHT_YEAR) > $(distdir)/.year
+
+today = $(shell date +%Y-%m-%d)
+version_regexp = $(subst .,\.,$(VERSION))
+news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
+
+news-check: NEWS
+	$(AM_V_GEN)if head -1 $< |				\
+	  grep -x $(news_check_regexp) >/dev/null; then		\
+		:;						\
+	else							\
+		echo >&2 '$<: check failed';			\
+		exit 1;						\
+	fi
+
+ioctlsort_CC = $(CC_FOR_BUILD)
+ioctlsort_DEFS = $(DEFS)
+ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
+ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD)
+ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
+ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
+
+ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
+ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
+ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h)))
+
+ioctl_redefs%.h: ioctlent%.h ioctlent0.h
+	sort $< > $<-t
+	sort ioctlent0.h | comm -23 $<-t - | \
+		sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \
+		> $@-t
+	rm -f $<-t
+	mv $@-t $@
+
+ioctlent%.h: ioctlsort%
+	./$< > $@
+
+# Need to pick up <linux/ioctl.h> definitions *for host* while compiling
+# ioctlsort *for build*, hence this magic.
+ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c
+	$(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+		$(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@
+
+ioctl_iocdef.h: ioctl_iocdef.i
+	sed -n 's/^DEFINE HOST/#define /p' $< > $@
+
+ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o
+	$(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@
+
+ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c
+	$(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c
+
+ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
+	cat $^ > $@
+
+BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \
+		native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version
+CLEANFILES    = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \
+		ioctl_iocdef.h ioctl_iocdef.i \
+		native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h
+DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h
+
+include scno.am
+
+$(strace_OBJECTS): scno.h
+
+# defines mpers_source_files
+include mpers.am
+srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files))
+mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i)
+
+mpers_NAME =
+mpers_PREFIX = $(mpers_NAME)_
+mpers_DEFS = $(DEFS)
+mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES)
+mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS)
+mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS)
+libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS
+libmpers_CFLAGS = $(strace_CFLAGS)
+
+# mpers targets
+
+mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
+	for f in $^; do \
+		CC="$(CC)" CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \
+		CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \
+		$(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \
+	done
+	> $@
+
+m%_type_defs.h: $(srcdir_mpers_source_files)
+	for f in $^; do \
+		sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
+	done > $@-t
+	echo '#undef MPERS_PRINTER_NAME' >> $@-t
+	echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t
+	echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t
+	echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t
+	mv $@-t $@
+
+m%_funcs.h: $(srcdir_mpers_source_files)
+	for f in $^; do \
+		sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \
+	done > $@-t && \
+	echo '#include "sys_func.h"' >> $@-t
+	mv $@-t $@
+
+# printers
+
+%.c.mpers.i: $(srcdir)/%.c
+	$(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@
+
+mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$
+
+printers.h: $(mpers_preproc_files)
+	echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
+	echo 'typedef struct {' >> $@-t
+	for f in $^; do \
+		sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \
+		|| exit; \
+	done >> $@-t
+	echo '} struct_printers;' >> $@-t
+	echo 'extern const struct_printers *printers;' >> $@-t
+	echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t
+	mv $@-t $@
+
+%_printer_decls.h: $(mpers_preproc_files)
+	echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
+	for f in $^; do \
+		sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \
+		|| exit; \
+	done >> $@-t
+	mv $@-t $@
+
+%_printer_defs.h: $(mpers_preproc_files)
+	echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
+	for f in $^; do \
+		sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \
+		|| exit; \
+	done >> $@-t
+	mv $@-t $@
+
+native_printer_decls.h native_printer_defs.h: mpers_PREFIX =
+
+if HAVE_M32_MPERS
+
+strace_LDADD += libmpers-m32.a
+noinst_LIBRARIES += libmpers-m32.a
+libmpers_m32_a_SOURCES = $(mpers_source_files)
+libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
+libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS)
+mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
+
+BUILT_SOURCES += $(mpers_m32_targets)
+CLEANFILES    += $(mpers_m32_targets)
+
+$(mpers_m32_targets): mpers_NAME = m32
+
+endif # HAVE_M32_MPERS
+
+if HAVE_MX32_MPERS
+
+strace_LDADD += libmpers-mx32.a
+noinst_LIBRARIES += libmpers-mx32.a
+libmpers_mx32_a_SOURCES = $(mpers_source_files)
+libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
+libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS)
+mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
+
+BUILT_SOURCES += $(mpers_mx32_targets)
+CLEANFILES    += $(mpers_mx32_targets)
+
+$(mpers_mx32_targets): mpers_NAME = mx32
+
+endif # HAVE_MX32_MPERS
+
+clean-local:
+	-rm -rf mpers-m32 mpers-mx32
+
+if MAINTAINER_MODE
+
+gen_changelog_start_date = 2009-07-08 20:00
+$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
+		     $(srcdir)/.version
+	@rm -f $@.new
+	(cd $(srcdir); \
+	 ./gitlog-to-changelog --append-dot \
+	   --since='$(gen_changelog_start_date)'; \
+	 echo; echo; echo 'See ChangeLog-CVS for older changes.' \
+	) > $@.new
+	chmod 444 $@.new
+	mv -f $@.new $@
+
+$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
+		   $(srcdir)/Makefile.in $(srcdir)/.version
+	$(AM_V_GEN)							\
+	(								\
+	  cd $(srcdir);							\
+	  sed '/^##/,$$d' CREDITS.in;					\
+	  { sed -n '1,/^##>/d; s/   */\t/; s/^./&/p' CREDITS.in;	\
+	    git log --pretty=format:'%aN	%aE';			\
+	  } | LC_ALL=C sort -u						\
+	    | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}';		\
+	) > $@-t && mv $@-t $@
+
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
+
+endif
diff --git a/Makefile.in b/Makefile.in
index ee3dbe3..ab67ad0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -291,24 +291,26 @@
 am__strace_SOURCES_DIST = access.c affinity.c aio.c alpha.c bjm.c \
 	block.c bpf.c btrfs.c cacheflush.c capability.c caps0.h \
 	caps1.h chdir.c chmod.c clone.c copy_file_range.c count.c \
-	defs.h desc.c dirent.c dirent64.c dm.c empty.h epoll.c evdev.c \
-	eventfd.c execve.c fadvise.c fallocate.c fanotify.c fchownat.c \
-	fcntl.c fetch_seccomp_fprog.c fetch_struct_flock.c \
-	fetch_struct_mmsghdr.c fetch_struct_msghdr.c \
-	fetch_struct_stat.c fetch_struct_stat64.c \
-	fetch_struct_statfs.c file_handle.c file_ioctl.c fs_x_ioctl.c \
-	flock.c flock.h futex.c gcc_compat.h get_robust_list.c \
-	getcpu.c getcwd.c getrandom.c hdio.c hostname.c inotify.c io.c \
-	ioctl.c ioperm.c iopl.c ioprio.c ipc_defs.h ipc_msg.c \
-	ipc_msgctl.c ipc_sem.c ipc_shm.c ipc_shmctl.c kcmp.c \
-	kernel_types.h kexec.c keyctl.c ldt.c link.c linux/asm_stat.h \
-	linux/x32/asm_stat.h linux/x86_64/asm_stat.h lookup_dcookie.c \
-	loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \
-	mmsghdr.c mount.c mpers_type.h mq.c msghdr.c msghdr.h mtd.c \
-	native_defs.h net.c netlink.c nsfs.c nsfs.h nsig.h numa.c \
-	oldstat.c open.c or1k_atomic.c pathtrace.c perf.c \
-	perf_event_struct.h personality.c pkeys.c poll.c prctl.c \
-	print_dev_t.c print_mq_attr.c print_msgbuf.c \
+	defs.h desc.c dirent.c dirent64.c dm.c dyxlat.c empty.h \
+	epoll.c evdev.c eventfd.c execve.c fadvise.c fallocate.c \
+	fanotify.c fchownat.c fcntl.c fetch_seccomp_fprog.c \
+	fetch_struct_flock.c fetch_struct_mmsghdr.c \
+	fetch_struct_msghdr.c fetch_struct_stat.c \
+	fetch_struct_stat64.c fetch_struct_statfs.c file_handle.c \
+	file_ioctl.c fs_x_ioctl.c flock.c flock.h futex.c gcc_compat.h \
+	get_robust_list.c getcpu.c getcwd.c getrandom.c hdio.c \
+	hostname.c inotify.c io.c ioctl.c ioperm.c iopl.c ioprio.c \
+	ipc_defs.h ipc_msg.c ipc_msgctl.c ipc_sem.c ipc_shm.c \
+	ipc_shmctl.c kcmp.c kernel_types.h kexec.c keyctl.c ldt.c \
+	link.c linux/asm_stat.h linux/x32/asm_stat.h \
+	linux/x86_64/asm_stat.h lookup_dcookie.c loop.c lseek.c \
+	macros.h mem.c membarrier.c memfd_create.c mknod.c mmsghdr.c \
+	mount.c mpers_type.h mq.c msghdr.c msghdr.h mtd.c \
+	native_defs.h net.c netlink.c netlink.h netlink_sock_diag.c \
+	nlattr.c nlattr.h nsfs.c nsfs.h nsig.h numa.c oldstat.c open.c \
+	or1k_atomic.c pathtrace.c perf.c perf_event_struct.h \
+	personality.c pkeys.c poll.c prctl.c print_dev_t.c \
+	print_fields.h print_mq_attr.c print_msgbuf.c \
 	print_sg_req_info.c print_sigevent.c print_statfs.c \
 	print_struct_stat.c print_time.c print_timespec.c \
 	print_timeval.c print_timex.c printmode.c printrusage.c \
@@ -322,8 +324,8 @@
 	statx.h strace.c swapon.c syscall.c sysctl.c sysent.h \
 	sysinfo.c syslog.c sysmips.c term.c time.c times.c truncate.c \
 	ubi.c uid.c uid16.c umask.c umount.c uname.c userfaultfd.c \
-	ustat.c util.c utime.c utimes.c v4l2.c wait.c xattr.c xlat.h \
-	xmalloc.c unwind.c
+	ustat.c util.c utime.c utimes.c v4l2.c wait.c xattr.c xlat.c \
+	xlat.h xmalloc.c unwind.c
 @USE_LIBUNWIND_TRUE@am__objects_3 = strace-unwind.$(OBJEXT)
 am_strace_OBJECTS = strace-access.$(OBJEXT) strace-affinity.$(OBJEXT) \
 	strace-aio.$(OBJEXT) strace-alpha.$(OBJEXT) \
@@ -334,12 +336,12 @@
 	strace-clone.$(OBJEXT) strace-copy_file_range.$(OBJEXT) \
 	strace-count.$(OBJEXT) strace-desc.$(OBJEXT) \
 	strace-dirent.$(OBJEXT) strace-dirent64.$(OBJEXT) \
-	strace-dm.$(OBJEXT) strace-epoll.$(OBJEXT) \
-	strace-evdev.$(OBJEXT) strace-eventfd.$(OBJEXT) \
-	strace-execve.$(OBJEXT) strace-fadvise.$(OBJEXT) \
-	strace-fallocate.$(OBJEXT) strace-fanotify.$(OBJEXT) \
-	strace-fchownat.$(OBJEXT) strace-fcntl.$(OBJEXT) \
-	strace-fetch_seccomp_fprog.$(OBJEXT) \
+	strace-dm.$(OBJEXT) strace-dyxlat.$(OBJEXT) \
+	strace-epoll.$(OBJEXT) strace-evdev.$(OBJEXT) \
+	strace-eventfd.$(OBJEXT) strace-execve.$(OBJEXT) \
+	strace-fadvise.$(OBJEXT) strace-fallocate.$(OBJEXT) \
+	strace-fanotify.$(OBJEXT) strace-fchownat.$(OBJEXT) \
+	strace-fcntl.$(OBJEXT) strace-fetch_seccomp_fprog.$(OBJEXT) \
 	strace-fetch_struct_flock.$(OBJEXT) \
 	strace-fetch_struct_mmsghdr.$(OBJEXT) \
 	strace-fetch_struct_msghdr.$(OBJEXT) \
@@ -366,7 +368,8 @@
 	strace-mmsghdr.$(OBJEXT) strace-mount.$(OBJEXT) \
 	strace-mq.$(OBJEXT) strace-msghdr.$(OBJEXT) \
 	strace-mtd.$(OBJEXT) strace-net.$(OBJEXT) \
-	strace-netlink.$(OBJEXT) strace-nsfs.$(OBJEXT) \
+	strace-netlink.$(OBJEXT) strace-netlink_sock_diag.$(OBJEXT) \
+	strace-nlattr.$(OBJEXT) strace-nsfs.$(OBJEXT) \
 	strace-numa.$(OBJEXT) strace-oldstat.$(OBJEXT) \
 	strace-open.$(OBJEXT) strace-or1k_atomic.$(OBJEXT) \
 	strace-pathtrace.$(OBJEXT) strace-perf.$(OBJEXT) \
@@ -407,8 +410,8 @@
 	strace-ustat.$(OBJEXT) strace-util.$(OBJEXT) \
 	strace-utime.$(OBJEXT) strace-utimes.$(OBJEXT) \
 	strace-v4l2.$(OBJEXT) strace-wait.$(OBJEXT) \
-	strace-xattr.$(OBJEXT) strace-xmalloc.$(OBJEXT) \
-	$(am__objects_3)
+	strace-xattr.$(OBJEXT) strace-xlat.$(OBJEXT) \
+	strace-xmalloc.$(OBJEXT) $(am__objects_3)
 strace_OBJECTS = $(am_strace_OBJECTS)
 am__DEPENDENCIES_1 =
 @USE_LIBUNWIND_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
@@ -778,7 +781,9 @@
 	xlat/hw_breakpoint_len.in xlat/hw_breakpoint_type.in \
 	xlat/icmpfilterflags.in xlat/if_dqblk_valid.in \
 	xlat/if_dqinfo_flags.in xlat/if_dqinfo_valid.in \
-	xlat/iffflags.in xlat/inet_protocols.in xlat/inotify_flags.in \
+	xlat/iffflags.in xlat/inet_diag_attrs.in \
+	xlat/inet_diag_extended_flags.in xlat/inet_diag_req_attrs.in \
+	xlat/inet_protocols.in xlat/inotify_flags.in \
 	xlat/inotify_init_flags.in xlat/ioctl_dirs.in \
 	xlat/ioprio_class.in xlat/ioprio_who.in xlat/ip_cmsg_types.in \
 	xlat/ipc_msg_flags.in xlat/ipccalls.in xlat/itimer_which.in \
@@ -798,13 +803,20 @@
 	xlat/mtd_file_mode_options.in xlat/mtd_flags_options.in \
 	xlat/mtd_mode_options.in xlat/mtd_nandecc_options.in \
 	xlat/mtd_otp_options.in xlat/mtd_type_options.in \
-	xlat/name_to_handle_at_flags.in xlat/netlink_flags.in \
-	xlat/netlink_protocols.in xlat/netlink_types.in \
-	xlat/notifyflags.in xlat/nt_descriptor_types.in \
-	xlat/open_access_modes.in xlat/open_mode_flags.in \
-	xlat/packet_mreq_type.in xlat/perf_attr_size.in \
-	xlat/perf_branch_sample_type.in xlat/perf_event_open_flags.in \
-	xlat/perf_event_read_format.in \
+	xlat/name_to_handle_at_flags.in xlat/netlink_diag_attrs.in \
+	xlat/netlink_diag_show.in xlat/netlink_flags.in \
+	xlat/netlink_get_flags.in xlat/netlink_new_flags.in \
+	xlat/netlink_protocols.in xlat/netlink_socket_flags.in \
+	xlat/netlink_states.in xlat/netlink_types.in \
+	xlat/nl_audit_types.in xlat/nl_netfilter_msg_types.in \
+	xlat/nl_netfilter_subsys_ids.in xlat/nl_route_types.in \
+	xlat/nl_selinux_types.in xlat/nl_sock_diag_types.in \
+	xlat/nl_xfrm_types.in xlat/notifyflags.in \
+	xlat/nt_descriptor_types.in xlat/open_access_modes.in \
+	xlat/open_mode_flags.in xlat/packet_diag_attrs.in \
+	xlat/packet_diag_show.in xlat/packet_mreq_type.in \
+	xlat/perf_attr_size.in xlat/perf_branch_sample_type.in \
+	xlat/perf_event_open_flags.in xlat/perf_event_read_format.in \
 	xlat/perf_event_sample_format.in xlat/perf_hw_cache_id.in \
 	xlat/perf_hw_cache_op_id.in xlat/perf_hw_cache_op_result_id.in \
 	xlat/perf_hw_id.in xlat/perf_sw_ids.in xlat/perf_type_id.in \
@@ -837,7 +849,8 @@
 	xlat/sigpoll_codes.in xlat/sigprocmaskcmds.in \
 	xlat/sigprof_codes.in xlat/sigsegv_codes.in \
 	xlat/sigsys_codes.in xlat/sigtrap_codes.in \
-	xlat/sock_type_flags.in xlat/socketcalls.in \
+	xlat/smc_diag_attrs.in xlat/smc_diag_extended_flags.in \
+	xlat/smc_states.in xlat/sock_type_flags.in xlat/socketcalls.in \
 	xlat/socketlayers.in xlat/sockipoptions.in \
 	xlat/sockipv6options.in xlat/sockipxoptions.in \
 	xlat/sockoptions.in xlat/sockpacketoptions.in \
@@ -852,13 +865,14 @@
 	xlat/sysctl_net_ipv6_route.in xlat/sysctl_net_unix.in \
 	xlat/sysctl_root.in xlat/sysctl_vm.in \
 	xlat/syslog_action_type.in xlat/sysmips_operations.in \
-	xlat/tcflsh_options.in xlat/tcxonc_options.in \
-	xlat/timerfdflags.in xlat/ubi_volume_props.in \
-	xlat/ubi_volume_types.in xlat/uffd_api_flags.in \
-	xlat/uffd_copy_flags.in xlat/uffd_flags.in \
-	xlat/uffd_register_ioctl_flags.in \
+	xlat/tcflsh_options.in xlat/tcp_state_flags.in \
+	xlat/tcp_states.in xlat/tcxonc_options.in xlat/timerfdflags.in \
+	xlat/ubi_volume_props.in xlat/ubi_volume_types.in \
+	xlat/uffd_api_flags.in xlat/uffd_copy_flags.in \
+	xlat/uffd_flags.in xlat/uffd_register_ioctl_flags.in \
 	xlat/uffd_register_mode_flags.in xlat/uffd_zeropage_flags.in \
-	xlat/umount_flags.in xlat/unshare_flags.in xlat/usagewho.in \
+	xlat/umount_flags.in xlat/unix_diag_attrs.in \
+	xlat/unix_diag_show.in xlat/unshare_flags.in xlat/usagewho.in \
 	xlat/v4l2_buf_flags.in xlat/v4l2_buf_types.in \
 	xlat/v4l2_capture_modes.in xlat/v4l2_colorspaces.in \
 	xlat/v4l2_control_classes.in xlat/v4l2_control_flags.in \
@@ -921,11 +935,12 @@
 	xlat/hw_breakpoint_len.h xlat/hw_breakpoint_type.h \
 	xlat/icmpfilterflags.h xlat/if_dqblk_valid.h \
 	xlat/if_dqinfo_flags.h xlat/if_dqinfo_valid.h xlat/iffflags.h \
-	xlat/inet_protocols.h xlat/inotify_flags.h \
-	xlat/inotify_init_flags.h xlat/ioctl_dirs.h \
-	xlat/ioprio_class.h xlat/ioprio_who.h xlat/ip_cmsg_types.h \
-	xlat/ipc_msg_flags.h xlat/ipccalls.h xlat/itimer_which.h \
-	xlat/kcmp_types.h xlat/kexec_arch_values.h \
+	xlat/inet_diag_attrs.h xlat/inet_diag_extended_flags.h \
+	xlat/inet_diag_req_attrs.h xlat/inet_protocols.h \
+	xlat/inotify_flags.h xlat/inotify_init_flags.h \
+	xlat/ioctl_dirs.h xlat/ioprio_class.h xlat/ioprio_who.h \
+	xlat/ip_cmsg_types.h xlat/ipc_msg_flags.h xlat/ipccalls.h \
+	xlat/itimer_which.h xlat/kcmp_types.h xlat/kexec_arch_values.h \
 	xlat/kexec_file_load_flags.h xlat/kexec_load_flags.h \
 	xlat/key_perms.h xlat/key_reqkeys.h xlat/key_spec.h \
 	xlat/keyctl_commands.h xlat/lockfcmds.h xlat/loop_cmds.h \
@@ -940,16 +955,23 @@
 	xlat/mtd_file_mode_options.h xlat/mtd_flags_options.h \
 	xlat/mtd_mode_options.h xlat/mtd_nandecc_options.h \
 	xlat/mtd_otp_options.h xlat/mtd_type_options.h \
-	xlat/name_to_handle_at_flags.h xlat/netlink_flags.h \
-	xlat/netlink_protocols.h xlat/netlink_types.h \
-	xlat/notifyflags.h xlat/nt_descriptor_types.h \
-	xlat/open_access_modes.h xlat/open_mode_flags.h \
-	xlat/packet_mreq_type.h xlat/perf_attr_size.h \
-	xlat/perf_branch_sample_type.h xlat/perf_event_open_flags.h \
-	xlat/perf_event_read_format.h xlat/perf_event_sample_format.h \
-	xlat/perf_hw_cache_id.h xlat/perf_hw_cache_op_id.h \
-	xlat/perf_hw_cache_op_result_id.h xlat/perf_hw_id.h \
-	xlat/perf_sw_ids.h xlat/perf_type_id.h \
+	xlat/name_to_handle_at_flags.h xlat/netlink_diag_attrs.h \
+	xlat/netlink_diag_show.h xlat/netlink_flags.h \
+	xlat/netlink_get_flags.h xlat/netlink_new_flags.h \
+	xlat/netlink_protocols.h xlat/netlink_socket_flags.h \
+	xlat/netlink_states.h xlat/netlink_types.h \
+	xlat/nl_audit_types.h xlat/nl_netfilter_msg_types.h \
+	xlat/nl_netfilter_subsys_ids.h xlat/nl_route_types.h \
+	xlat/nl_selinux_types.h xlat/nl_sock_diag_types.h \
+	xlat/nl_xfrm_types.h xlat/notifyflags.h \
+	xlat/nt_descriptor_types.h xlat/open_access_modes.h \
+	xlat/open_mode_flags.h xlat/packet_diag_attrs.h \
+	xlat/packet_diag_show.h xlat/packet_mreq_type.h \
+	xlat/perf_attr_size.h xlat/perf_branch_sample_type.h \
+	xlat/perf_event_open_flags.h xlat/perf_event_read_format.h \
+	xlat/perf_event_sample_format.h xlat/perf_hw_cache_id.h \
+	xlat/perf_hw_cache_op_id.h xlat/perf_hw_cache_op_result_id.h \
+	xlat/perf_hw_id.h xlat/perf_sw_ids.h xlat/perf_type_id.h \
 	xlat/personality_flags.h xlat/personality_types.h \
 	xlat/pkey_access.h xlat/policies.h xlat/pollflags.h \
 	xlat/pr_cap_ambient.h xlat/pr_dumpable.h xlat/pr_fp_mode.h \
@@ -975,27 +997,30 @@
 	xlat/sigfpe_codes.h xlat/sigill_codes.h xlat/siginfo_codes.h \
 	xlat/sigpoll_codes.h xlat/sigprocmaskcmds.h \
 	xlat/sigprof_codes.h xlat/sigsegv_codes.h xlat/sigsys_codes.h \
-	xlat/sigtrap_codes.h xlat/sock_type_flags.h xlat/socketcalls.h \
-	xlat/socketlayers.h xlat/sockipoptions.h \
-	xlat/sockipv6options.h xlat/sockipxoptions.h \
-	xlat/sockoptions.h xlat/sockpacketoptions.h \
-	xlat/sockrawoptions.h xlat/socksctpoptions.h \
-	xlat/socktcpoptions.h xlat/socktypes.h xlat/splice_flags.h \
-	xlat/sram_alloc_flags.h xlat/statfs_flags.h xlat/statx_attrs.h \
-	xlat/statx_masks.h xlat/swap_flags.h \
-	xlat/sync_file_range_flags.h xlat/sysctl_kern.h \
-	xlat/sysctl_net.h xlat/sysctl_net_core.h \
+	xlat/sigtrap_codes.h xlat/smc_diag_attrs.h \
+	xlat/smc_diag_extended_flags.h xlat/smc_states.h \
+	xlat/sock_type_flags.h xlat/socketcalls.h xlat/socketlayers.h \
+	xlat/sockipoptions.h xlat/sockipv6options.h \
+	xlat/sockipxoptions.h xlat/sockoptions.h \
+	xlat/sockpacketoptions.h xlat/sockrawoptions.h \
+	xlat/socksctpoptions.h xlat/socktcpoptions.h xlat/socktypes.h \
+	xlat/splice_flags.h xlat/sram_alloc_flags.h \
+	xlat/statfs_flags.h xlat/statx_attrs.h xlat/statx_masks.h \
+	xlat/swap_flags.h xlat/sync_file_range_flags.h \
+	xlat/sysctl_kern.h xlat/sysctl_net.h xlat/sysctl_net_core.h \
 	xlat/sysctl_net_ipv4.h xlat/sysctl_net_ipv4_conf.h \
 	xlat/sysctl_net_ipv4_route.h xlat/sysctl_net_ipv6.h \
 	xlat/sysctl_net_ipv6_route.h xlat/sysctl_net_unix.h \
 	xlat/sysctl_root.h xlat/sysctl_vm.h xlat/syslog_action_type.h \
 	xlat/sysmips_operations.h xlat/tcflsh_options.h \
-	xlat/tcxonc_options.h xlat/timerfdflags.h \
-	xlat/ubi_volume_props.h xlat/ubi_volume_types.h \
-	xlat/uffd_api_flags.h xlat/uffd_copy_flags.h xlat/uffd_flags.h \
+	xlat/tcp_state_flags.h xlat/tcp_states.h xlat/tcxonc_options.h \
+	xlat/timerfdflags.h xlat/ubi_volume_props.h \
+	xlat/ubi_volume_types.h xlat/uffd_api_flags.h \
+	xlat/uffd_copy_flags.h xlat/uffd_flags.h \
 	xlat/uffd_register_ioctl_flags.h \
 	xlat/uffd_register_mode_flags.h xlat/uffd_zeropage_flags.h \
-	xlat/umount_flags.h xlat/unshare_flags.h xlat/usagewho.h \
+	xlat/umount_flags.h xlat/unix_diag_attrs.h \
+	xlat/unix_diag_show.h xlat/unshare_flags.h xlat/usagewho.h \
 	xlat/v4l2_buf_flags.h xlat/v4l2_buf_types.h \
 	xlat/v4l2_capture_modes.h xlat/v4l2_colorspaces.h \
 	xlat/v4l2_control_classes.h xlat/v4l2_control_flags.h \
@@ -1036,9 +1061,9 @@
 strace_SOURCES = access.c affinity.c aio.c alpha.c bjm.c block.c bpf.c \
 	btrfs.c cacheflush.c capability.c caps0.h caps1.h chdir.c \
 	chmod.c clone.c copy_file_range.c count.c defs.h desc.c \
-	dirent.c dirent64.c dm.c empty.h epoll.c evdev.c eventfd.c \
-	execve.c fadvise.c fallocate.c fanotify.c fchownat.c fcntl.c \
-	fetch_seccomp_fprog.c fetch_struct_flock.c \
+	dirent.c dirent64.c dm.c dyxlat.c empty.h epoll.c evdev.c \
+	eventfd.c execve.c fadvise.c fallocate.c fanotify.c fchownat.c \
+	fcntl.c fetch_seccomp_fprog.c fetch_struct_flock.c \
 	fetch_struct_mmsghdr.c fetch_struct_msghdr.c \
 	fetch_struct_stat.c fetch_struct_stat64.c \
 	fetch_struct_statfs.c file_handle.c file_ioctl.c fs_x_ioctl.c \
@@ -1048,12 +1073,13 @@
 	ipc_msgctl.c ipc_sem.c ipc_shm.c ipc_shmctl.c kcmp.c \
 	kernel_types.h kexec.c keyctl.c ldt.c link.c linux/asm_stat.h \
 	linux/x32/asm_stat.h linux/x86_64/asm_stat.h lookup_dcookie.c \
-	loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \
-	mmsghdr.c mount.c mpers_type.h mq.c msghdr.c msghdr.h mtd.c \
-	native_defs.h net.c netlink.c nsfs.c nsfs.h nsig.h numa.c \
-	oldstat.c open.c or1k_atomic.c pathtrace.c perf.c \
+	loop.c lseek.c macros.h mem.c membarrier.c memfd_create.c \
+	mknod.c mmsghdr.c mount.c mpers_type.h mq.c msghdr.c msghdr.h \
+	mtd.c native_defs.h net.c netlink.c netlink.h \
+	netlink_sock_diag.c nlattr.c nlattr.h nsfs.c nsfs.h nsig.h \
+	numa.c oldstat.c open.c or1k_atomic.c pathtrace.c perf.c \
 	perf_event_struct.h personality.c pkeys.c poll.c prctl.c \
-	print_dev_t.c print_mq_attr.c print_msgbuf.c \
+	print_dev_t.c print_fields.h print_mq_attr.c print_msgbuf.c \
 	print_sg_req_info.c print_sigevent.c print_statfs.c \
 	print_struct_stat.c print_time.c print_timespec.c \
 	print_timeval.c print_timex.c printmode.c printrusage.c \
@@ -1067,8 +1093,8 @@
 	statx.h strace.c swapon.c syscall.c sysctl.c sysent.h \
 	sysinfo.c syslog.c sysmips.c term.c time.c times.c truncate.c \
 	ubi.c uid.c uid16.c umask.c umount.c uname.c userfaultfd.c \
-	ustat.c util.c utime.c utimes.c v4l2.c wait.c xattr.c xlat.h \
-	xmalloc.c $(am__append_1)
+	ustat.c util.c utime.c utimes.c v4l2.c wait.c xattr.c xlat.c \
+	xlat.h xmalloc.c $(am__append_1)
 CODE_COVERAGE_BRANCH_COVERAGE = 1
 CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
 	--prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
@@ -1351,6 +1377,7 @@
 	linux/or1k/set_scno.c		\
 	linux/or1k/syscallent.h		\
 	linux/or1k/userent.h		\
+	linux/packet_diag.h		\
 	linux/personality.h		\
 	linux/powerpc/arch_regs.c	\
 	linux/powerpc/arch_regs.h	\
@@ -1467,6 +1494,7 @@
 	linux/sh64/syscallent.h		\
 	linux/sh64/userent.h		\
 	linux/signalent.h		\
+	linux/smc_diag.h		\
 	linux/sock_diag.h		\
 	linux/sparc/arch_getrval2.c	\
 	linux/sparc/arch_regs.c		\
@@ -1930,6 +1958,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dirent.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dirent64.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dyxlat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-epoll.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-evdev.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-eventfd.Po@am__quote@
@@ -1987,6 +2016,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mtd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-net.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-netlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-netlink_sock_diag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-nlattr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-nsfs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-numa.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-oldstat.Po@am__quote@
@@ -2068,6 +2099,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-v4l2.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-wait.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-xattr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-xlat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-xmalloc.Po@am__quote@
 
 .c.o:
@@ -3512,6 +3544,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dm.obj `if test -f 'dm.c'; then $(CYGPATH_W) 'dm.c'; else $(CYGPATH_W) '$(srcdir)/dm.c'; fi`
 
+strace-dyxlat.o: dyxlat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dyxlat.o -MD -MP -MF $(DEPDIR)/strace-dyxlat.Tpo -c -o strace-dyxlat.o `test -f 'dyxlat.c' || echo '$(srcdir)/'`dyxlat.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-dyxlat.Tpo $(DEPDIR)/strace-dyxlat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dyxlat.c' object='strace-dyxlat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dyxlat.o `test -f 'dyxlat.c' || echo '$(srcdir)/'`dyxlat.c
+
+strace-dyxlat.obj: dyxlat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dyxlat.obj -MD -MP -MF $(DEPDIR)/strace-dyxlat.Tpo -c -o strace-dyxlat.obj `if test -f 'dyxlat.c'; then $(CYGPATH_W) 'dyxlat.c'; else $(CYGPATH_W) '$(srcdir)/dyxlat.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-dyxlat.Tpo $(DEPDIR)/strace-dyxlat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dyxlat.c' object='strace-dyxlat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dyxlat.obj `if test -f 'dyxlat.c'; then $(CYGPATH_W) 'dyxlat.c'; else $(CYGPATH_W) '$(srcdir)/dyxlat.c'; fi`
+
 strace-epoll.o: epoll.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-epoll.o -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-epoll.Tpo $(DEPDIR)/strace-epoll.Po
@@ -4310,6 +4356,34 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-netlink.obj `if test -f 'netlink.c'; then $(CYGPATH_W) 'netlink.c'; else $(CYGPATH_W) '$(srcdir)/netlink.c'; fi`
 
+strace-netlink_sock_diag.o: netlink_sock_diag.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-netlink_sock_diag.o -MD -MP -MF $(DEPDIR)/strace-netlink_sock_diag.Tpo -c -o strace-netlink_sock_diag.o `test -f 'netlink_sock_diag.c' || echo '$(srcdir)/'`netlink_sock_diag.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-netlink_sock_diag.Tpo $(DEPDIR)/strace-netlink_sock_diag.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='netlink_sock_diag.c' object='strace-netlink_sock_diag.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-netlink_sock_diag.o `test -f 'netlink_sock_diag.c' || echo '$(srcdir)/'`netlink_sock_diag.c
+
+strace-netlink_sock_diag.obj: netlink_sock_diag.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-netlink_sock_diag.obj -MD -MP -MF $(DEPDIR)/strace-netlink_sock_diag.Tpo -c -o strace-netlink_sock_diag.obj `if test -f 'netlink_sock_diag.c'; then $(CYGPATH_W) 'netlink_sock_diag.c'; else $(CYGPATH_W) '$(srcdir)/netlink_sock_diag.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-netlink_sock_diag.Tpo $(DEPDIR)/strace-netlink_sock_diag.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='netlink_sock_diag.c' object='strace-netlink_sock_diag.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-netlink_sock_diag.obj `if test -f 'netlink_sock_diag.c'; then $(CYGPATH_W) 'netlink_sock_diag.c'; else $(CYGPATH_W) '$(srcdir)/netlink_sock_diag.c'; fi`
+
+strace-nlattr.o: nlattr.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-nlattr.o -MD -MP -MF $(DEPDIR)/strace-nlattr.Tpo -c -o strace-nlattr.o `test -f 'nlattr.c' || echo '$(srcdir)/'`nlattr.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-nlattr.Tpo $(DEPDIR)/strace-nlattr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='nlattr.c' object='strace-nlattr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-nlattr.o `test -f 'nlattr.c' || echo '$(srcdir)/'`nlattr.c
+
+strace-nlattr.obj: nlattr.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-nlattr.obj -MD -MP -MF $(DEPDIR)/strace-nlattr.Tpo -c -o strace-nlattr.obj `if test -f 'nlattr.c'; then $(CYGPATH_W) 'nlattr.c'; else $(CYGPATH_W) '$(srcdir)/nlattr.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-nlattr.Tpo $(DEPDIR)/strace-nlattr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='nlattr.c' object='strace-nlattr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-nlattr.obj `if test -f 'nlattr.c'; then $(CYGPATH_W) 'nlattr.c'; else $(CYGPATH_W) '$(srcdir)/nlattr.c'; fi`
+
 strace-nsfs.o: nsfs.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-nsfs.o -MD -MP -MF $(DEPDIR)/strace-nsfs.Tpo -c -o strace-nsfs.o `test -f 'nsfs.c' || echo '$(srcdir)/'`nsfs.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-nsfs.Tpo $(DEPDIR)/strace-nsfs.Po
@@ -5430,6 +5504,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi`
 
+strace-xlat.o: xlat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xlat.o -MD -MP -MF $(DEPDIR)/strace-xlat.Tpo -c -o strace-xlat.o `test -f 'xlat.c' || echo '$(srcdir)/'`xlat.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-xlat.Tpo $(DEPDIR)/strace-xlat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xlat.c' object='strace-xlat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xlat.o `test -f 'xlat.c' || echo '$(srcdir)/'`xlat.c
+
+strace-xlat.obj: xlat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xlat.obj -MD -MP -MF $(DEPDIR)/strace-xlat.Tpo -c -o strace-xlat.obj `if test -f 'xlat.c'; then $(CYGPATH_W) 'xlat.c'; else $(CYGPATH_W) '$(srcdir)/xlat.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-xlat.Tpo $(DEPDIR)/strace-xlat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xlat.c' object='strace-xlat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xlat.obj `if test -f 'xlat.c'; then $(CYGPATH_W) 'xlat.c'; else $(CYGPATH_W) '$(srcdir)/xlat.c'; fi`
+
 strace-xmalloc.o: xmalloc.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xmalloc.o -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strace-xmalloc.Tpo $(DEPDIR)/strace-xmalloc.Po
@@ -6182,6 +6270,12 @@
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/iffflags.h: $(top_srcdir)/xlat/iffflags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/inet_diag_attrs.h: $(top_srcdir)/xlat/inet_diag_attrs.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/inet_diag_extended_flags.h: $(top_srcdir)/xlat/inet_diag_extended_flags.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/inet_diag_req_attrs.h: $(top_srcdir)/xlat/inet_diag_req_attrs.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/inet_protocols.h: $(top_srcdir)/xlat/inet_protocols.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/inotify_flags.h: $(top_srcdir)/xlat/inotify_flags.in $(top_srcdir)/xlat/gen.sh
@@ -6278,12 +6372,38 @@
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/name_to_handle_at_flags.h: $(top_srcdir)/xlat/name_to_handle_at_flags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/netlink_diag_attrs.h: $(top_srcdir)/xlat/netlink_diag_attrs.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/netlink_diag_show.h: $(top_srcdir)/xlat/netlink_diag_show.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/netlink_flags.h: $(top_srcdir)/xlat/netlink_flags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/netlink_get_flags.h: $(top_srcdir)/xlat/netlink_get_flags.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/netlink_new_flags.h: $(top_srcdir)/xlat/netlink_new_flags.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/netlink_protocols.h: $(top_srcdir)/xlat/netlink_protocols.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/netlink_socket_flags.h: $(top_srcdir)/xlat/netlink_socket_flags.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/netlink_states.h: $(top_srcdir)/xlat/netlink_states.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/netlink_types.h: $(top_srcdir)/xlat/netlink_types.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/nl_audit_types.h: $(top_srcdir)/xlat/nl_audit_types.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/nl_netfilter_msg_types.h: $(top_srcdir)/xlat/nl_netfilter_msg_types.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/nl_netfilter_subsys_ids.h: $(top_srcdir)/xlat/nl_netfilter_subsys_ids.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/nl_route_types.h: $(top_srcdir)/xlat/nl_route_types.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/nl_selinux_types.h: $(top_srcdir)/xlat/nl_selinux_types.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/nl_sock_diag_types.h: $(top_srcdir)/xlat/nl_sock_diag_types.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/nl_xfrm_types.h: $(top_srcdir)/xlat/nl_xfrm_types.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/notifyflags.h: $(top_srcdir)/xlat/notifyflags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/nt_descriptor_types.h: $(top_srcdir)/xlat/nt_descriptor_types.in $(top_srcdir)/xlat/gen.sh
@@ -6292,6 +6412,10 @@
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/open_mode_flags.h: $(top_srcdir)/xlat/open_mode_flags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/packet_diag_attrs.h: $(top_srcdir)/xlat/packet_diag_attrs.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/packet_diag_show.h: $(top_srcdir)/xlat/packet_diag_show.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/packet_mreq_type.h: $(top_srcdir)/xlat/packet_mreq_type.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/perf_attr_size.h: $(top_srcdir)/xlat/perf_attr_size.in $(top_srcdir)/xlat/gen.sh
@@ -6448,6 +6572,12 @@
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/sigtrap_codes.h: $(top_srcdir)/xlat/sigtrap_codes.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/smc_diag_attrs.h: $(top_srcdir)/xlat/smc_diag_attrs.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/smc_diag_extended_flags.h: $(top_srcdir)/xlat/smc_diag_extended_flags.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/smc_states.h: $(top_srcdir)/xlat/smc_states.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/sock_type_flags.h: $(top_srcdir)/xlat/sock_type_flags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/socketcalls.h: $(top_srcdir)/xlat/socketcalls.in $(top_srcdir)/xlat/gen.sh
@@ -6514,6 +6644,10 @@
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/tcflsh_options.h: $(top_srcdir)/xlat/tcflsh_options.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/tcp_state_flags.h: $(top_srcdir)/xlat/tcp_state_flags.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/tcp_states.h: $(top_srcdir)/xlat/tcp_states.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/tcxonc_options.h: $(top_srcdir)/xlat/tcxonc_options.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/timerfdflags.h: $(top_srcdir)/xlat/timerfdflags.in $(top_srcdir)/xlat/gen.sh
@@ -6536,6 +6670,10 @@
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/umount_flags.h: $(top_srcdir)/xlat/umount_flags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/unix_diag_attrs.h: $(top_srcdir)/xlat/unix_diag_attrs.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
+$(top_srcdir)/xlat/unix_diag_show.h: $(top_srcdir)/xlat/unix_diag_show.in $(top_srcdir)/xlat/gen.sh
+	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/unshare_flags.h: $(top_srcdir)/xlat/unshare_flags.in $(top_srcdir)/xlat/gen.sh
 	$(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@
 $(top_srcdir)/xlat/usagewho.h: $(top_srcdir)/xlat/usagewho.in $(top_srcdir)/xlat/gen.sh
@@ -6660,8 +6798,8 @@
 ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h
 	cat $^ > $@
 
-syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
-	$(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@
+syscallent.i: $(top_builddir)/config.h $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
+	$(CPP) -P $(SCNO_CPPFLAGS) -include $^ -o $@
 
 scno.h: $(top_srcdir)/scno.head syscallent.i
 	echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
diff --git a/NEWS b/NEWS
index b8c88eb..85806f9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,35 @@
+Noteworthy changes in release 4.18 (2017-07-05)
+===============================================
+
+* Improvements
+  * Implemented decoding of SCM_TIMESTAMP* control messages.
+  * Implemented decoding of netlink NLMSG_DONE messages.
+  * Implemented decoding of netlink generic nlmsg_type and nlmsg_flags.
+  * Implemented decoding of NETLINK_AUDIT, NETLINK_NETFILTER, NETLINK_ROUTE,
+    NETLINK_SELINUX, NETLINK_SOCK_DIAG, and NETLINK_XFRM message types.
+  * Implemented decoding of NETLINK_GENERIC protocol families.
+  * Implemented basic protocol specific decoding of AF_INET, AF_INET6,
+    AF_NETLINK, AF_PACKET, AF_SMC, and AF_UNIX messages of NETLINK_SOCK_DIAG.
+  * Implemented basic decoding of netlink attributes.
+  * Implemented basic protocol specific decoding of AF_INET, AF_NETLINK,
+    AF_PACKET, AF_SMC, and AF_UNIX netlink attributes of NETLINK_SOCK_DIAG.
+  * Implemented decoding of inet_diag_msg, netlink_diag_msg, and unix_diag_msg
+    netlink attributes of NETLINK_SOCK_DIAG.
+  * Updated lists of ARPHRD_*, KEYCTL_*, NDIAG_SHOW_*, RTM_*, SCM_*, SCTP_*,
+    SO_*, V4L2_*, and prctl ARCH_* constants.
+  * Updated lists of ioctl commands from Linux 4.12.
+
+* Bug fixes
+  * In interactive mode (-I2), those signals that were blocked at startup
+    will remain blocked for the whole period of strace execution.
+  * strace no longer resets SIGCHLD handler in tracees to the default action.
+  * When traced command is terminated by a blocked signal, strace unblocks
+    that signal to ensure its own termination with the same signal.
+  * Fixed corner cases in decoding of old sigaction syscall.
+  * Fixed build with old kernel headers on mips.
+  * Fixed build on aarch64 and tile with glibc >= 2.26.
+  * Fixed build on arc and nios2.
+
 Noteworthy changes in release 4.17 (2017-05-24)
 ===============================================
 
@@ -832,7 +864,7 @@
 ==============
 * Fix Linux/ia64 support, looks like someone renamed a few things on us
 * Fix the ioctl setup for Linux, turned out it did not really work.
-  Improve the ioctl extracter as well so we decode some more ones.
+  Improve the ioctl extractor as well so we decode some more ones.
 
 Changes in 4.3.1
 ================
@@ -924,7 +956,7 @@
 ===========================
 
 * non-ascii strings can be optionally printed entirely in hex
-* the output format is readable when mutiple processes are generating output
+* the output format is readable when multiple processes are generating output
 * exit values are printed in an alignment column
 * is is possible to suppress messages about attaching and detaching
 * various tracing features can be enabled on a per syscall/signal/desc basis
diff --git a/aio.c b/aio.c
index 5565d0c..7adb20d 100644
--- a/aio.c
+++ b/aio.c
@@ -167,9 +167,9 @@
 	struct iocb cb;
 
 	if (elem_size < sizeof(kernel_ulong_t)) {
-		addr = * (unsigned int *) elem_buf;
+		addr = *(unsigned int *) elem_buf;
 	} else {
-		addr = * (kernel_ulong_t *) elem_buf;
+		addr = *(kernel_ulong_t *) elem_buf;
 	}
 
 	tprints("{");
diff --git a/block.c b/block.c
index 4d1a965..c77b92a 100644
--- a/block.c
+++ b/block.c
@@ -67,7 +67,7 @@
 #include MPERS_DEFS
 
 #ifndef BLKPG
-# define BLKPG      _IO(0x12,105)
+# define BLKPG      _IO(0x12, 105)
 #endif
 
 /*
@@ -80,40 +80,40 @@
 # define BLKTRACESETUP _IOWR(0x12, 115, struct_blk_user_trace_setup)
 #endif
 #ifndef BLKTRACESTART
-# define BLKTRACESTART _IO(0x12,116)
+# define BLKTRACESTART _IO(0x12, 116)
 #endif
 #ifndef BLKTRACESTOP
-# define BLKTRACESTOP _IO(0x12,117)
+# define BLKTRACESTOP _IO(0x12, 117)
 #endif
 #ifndef BLKTRACETEARDOWN
-# define BLKTRACETEARDOWN _IO(0x12,118)
+# define BLKTRACETEARDOWN _IO(0x12, 118)
 #endif
 #ifndef BLKDISCARD
-# define BLKDISCARD _IO(0x12,119)
+# define BLKDISCARD _IO(0x12, 119)
 #endif
 #ifndef BLKIOMIN
-# define BLKIOMIN _IO(0x12,120)
+# define BLKIOMIN _IO(0x12, 120)
 #endif
 #ifndef BLKIOOPT
-# define BLKIOOPT _IO(0x12,121)
+# define BLKIOOPT _IO(0x12, 121)
 #endif
 #ifndef BLKALIGNOFF
-# define BLKALIGNOFF _IO(0x12,122)
+# define BLKALIGNOFF _IO(0x12, 122)
 #endif
 #ifndef BLKPBSZGET
-# define BLKPBSZGET _IO(0x12,123)
+# define BLKPBSZGET _IO(0x12, 123)
 #endif
 #ifndef BLKDISCARDZEROES
-# define BLKDISCARDZEROES _IO(0x12,124)
+# define BLKDISCARDZEROES _IO(0x12, 124)
 #endif
 #ifndef BLKSECDISCARD
-# define BLKSECDISCARD _IO(0x12,125)
+# define BLKSECDISCARD _IO(0x12, 125)
 #endif
 #ifndef BLKROTATIONAL
-# define BLKROTATIONAL _IO(0x12,126)
+# define BLKROTATIONAL _IO(0x12, 126)
 #endif
 #ifndef BLKZEROOUT
-# define BLKZEROOUT _IO(0x12,127)
+# define BLKZEROOUT _IO(0x12, 127)
 #endif
 
 #include "xlat/blkpg_ops.h"
diff --git a/bpf.c b/bpf.c
index 2c709e1..de909d3 100644
--- a/bpf.c
+++ b/bpf.c
@@ -182,7 +182,7 @@
 
 static int
 bpf_obj_manage(struct tcb *const tcp, const kernel_ulong_t addr,
-               unsigned int size)
+	       unsigned int size)
 {
 	struct {
 		uint64_t ATTRIBUTE_ALIGNED(8) pathname;
@@ -243,14 +243,14 @@
 
 static int
 bpf_prog_attach(struct tcb *const tcp, const kernel_ulong_t addr,
-               unsigned int size)
+		unsigned int size)
 {
 	return bpf_prog_attach_detach(tcp, addr, size, true);
 }
 
 static int
 bpf_prog_detach(struct tcb *const tcp, const kernel_ulong_t addr,
-               unsigned int size)
+		unsigned int size)
 {
 	return bpf_prog_attach_detach(tcp, addr, size, false);
 }
diff --git a/btrfs.c b/btrfs.c
index 141cafa..e730c7a 100644
--- a/btrfs.c
+++ b/btrfs.c
@@ -367,7 +367,7 @@
 static bool
 print_uint64(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
 {
-	tprintf("%" PRIu64, * (uint64_t *) elem_buf);
+	tprintf("%" PRIu64, *(uint64_t *) elem_buf);
 
 	return true;
 }
@@ -488,7 +488,7 @@
 print_objectid_callback(struct tcb *tcp, void *elem_buf,
 			size_t elem_size, void *data)
 {
-	btrfs_print_objectid(* (uint64_t *) elem_buf);
+	btrfs_print_objectid(*(uint64_t *) elem_buf);
 
 	return true;
 }
@@ -679,12 +679,12 @@
 				   (uint64_t) args.start.srcdevid,
 				   (uint64_t) args.start.cont_reading_from_srcdev_mode);
 
-				str = (const char*) args.start.srcdev_name;
+				str = (const char *) args.start.srcdev_name;
 				print_quoted_string(str,
 						sizeof(args.start.srcdev_name),
 						QUOTE_0_TERMINATED);
 				tprints(", tgtdev_name=");
-				str = (const char*) args.start.tgtdev_name;
+				str = (const char *) args.start.tgtdev_name;
 				print_quoted_string(str,
 						sizeof(args.start.tgtdev_name),
 						QUOTE_0_TERMINATED);
diff --git a/clone.c b/clone.c
index a1c799a..a5f2b24 100644
--- a/clone.c
+++ b/clone.c
@@ -109,7 +109,7 @@
 				tcp->u_arg[ARG_STACKSIZE]);
 #endif
 		tprints("flags=");
-		if (!printflags64(clone_flags, flags &~ CSIGNAL, NULL))
+		if (!printflags64(clone_flags, flags & ~CSIGNAL, NULL))
 			sep = "";
 		if ((flags & CSIGNAL) != 0)
 			tprintf("%s%s", sep, signame(flags & CSIGNAL));
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..73ae7f6
--- /dev/null
+++ b/config.h
@@ -0,0 +1,1326 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define for the AArch64 architecture. */
+/* #undef AARCH64 */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Define for the Alpha architecture. */
+/* #undef ALPHA */
+
+/* Define for the ARC architecture. */
+/* #undef ARC */
+
+/* Define for the ARM architecture. */
+/* #undef ARM */
+
+/* SA_RESTORER defined in <asm/signal.h> */
+/* #undef ASM_SA_RESTORER */
+
+/* SIGRTMIN defined in <asm/signal.h> */
+/* #undef ASM_SIGRTMIN */
+
+/* Define for the AVR32 architecture. */
+/* #undef AVR32 */
+
+/* Define for the Blackfin architecture. */
+/* #undef BFIN */
+
+/* Current copyright year. */
+#define COPYRIGHT_YEAR "2017"
+
+/* Define for the CRISv10 architecture. */
+/* #undef CRISV10 */
+
+/* Define for the CRISv32 architecture. */
+/* #undef CRISV32 */
+
+/* Define to 1 if you want OABI support on ARM EABI. */
+#define ENABLE_ARM_OABI 0
+
+/* Define to 1 if you have the `accept4' function. */
+#define HAVE_ACCEPT4 1
+
+/* Define to 1 if you have the <asm/cachectl.h> header file. */
+/* #undef HAVE_ASM_CACHECTL_H */
+
+/* Define to 1 if you have the <asm/sigcontext.h> header file. */
+#define HAVE_ASM_SIGCONTEXT_H 1
+
+/* Define to 1 if you have the <asm/sysmips.h> header file. */
+/* #undef HAVE_ASM_SYSMIPS_H */
+
+/* Define to 1 if you have BLKGETSIZE64. */
+#define HAVE_BLKGETSIZE64 1
+
+/* Define to 1 if you have the <bluetooth/bluetooth.h> header file. */
+/* #undef HAVE_BLUETOOTH_BLUETOOTH_H */
+
+/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_LZO', and to 0
+   if you don't. */
+#define HAVE_DECL_BTRFS_COMPRESS_LZO 0
+
+/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_NONE', and to 0
+   if you don't. */
+#define HAVE_DECL_BTRFS_COMPRESS_NONE 0
+
+/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_ZLIB', and to 0
+   if you don't. */
+#define HAVE_DECL_BTRFS_COMPRESS_ZLIB 0
+
+/* Define to 1 if you have the declaration of `CTL_ARLAN', and to 0 if you
+   don't. */
+#define HAVE_DECL_CTL_ARLAN 1
+
+/* Define to 1 if you have the declaration of `CTL_FRV', and to 0 if you
+   don't. */
+#define HAVE_DECL_CTL_FRV 1
+
+/* Define to 1 if you have the declaration of `CTL_PM', and to 0 if you don't.
+   */
+#define HAVE_DECL_CTL_PM 1
+
+/* Define to 1 if you have the declaration of `CTL_PROC', and to 0 if you
+   don't. */
+#define HAVE_DECL_CTL_PROC 1
+
+/* Define to 1 if you have the declaration of `CTL_S390DBF', and to 0 if you
+   don't. */
+#define HAVE_DECL_CTL_S390DBF 1
+
+/* Define to 1 if you have the declaration of `CTL_SUNRPC', and to 0 if you
+   don't. */
+#define HAVE_DECL_CTL_SUNRPC 1
+
+/* Define to 1 if you have the declaration of `KERN_ACPI_VIDEO_FLAGS', and to
+   0 if you don't. */
+#define HAVE_DECL_KERN_ACPI_VIDEO_FLAGS 1
+
+/* Define to 1 if you have the declaration of `KERN_BOOTLOADER_TYPE', and to 0
+   if you don't. */
+#define HAVE_DECL_KERN_BOOTLOADER_TYPE 1
+
+/* Define to 1 if you have the declaration of `KERN_COMPAT_LOG', and to 0 if
+   you don't. */
+#define HAVE_DECL_KERN_COMPAT_LOG 1
+
+/* Define to 1 if you have the declaration of `KERN_HZ_TIMER', and to 0 if you
+   don't. */
+#define HAVE_DECL_KERN_HZ_TIMER 1
+
+/* Define to 1 if you have the declaration of `KERN_IA64_UNALIGNED', and to 0
+   if you don't. */
+#define HAVE_DECL_KERN_IA64_UNALIGNED 1
+
+/* Define to 1 if you have the declaration of `KERN_MAX_LOCK_DEPTH', and to 0
+   if you don't. */
+#define HAVE_DECL_KERN_MAX_LOCK_DEPTH 1
+
+/* Define to 1 if you have the declaration of `KERN_NGROUPS_MAX', and to 0 if
+   you don't. */
+#define HAVE_DECL_KERN_NGROUPS_MAX 1
+
+/* Define to 1 if you have the declaration of `KERN_NMI_WATCHDOG', and to 0 if
+   you don't. */
+#define HAVE_DECL_KERN_NMI_WATCHDOG 1
+
+/* Define to 1 if you have the declaration of `KERN_PANIC_ON_NMI', and to 0 if
+   you don't. */
+#define HAVE_DECL_KERN_PANIC_ON_NMI 1
+
+/* Define to 1 if you have the declaration of `KERN_PRINTK_RATELIMIT', and to
+   0 if you don't. */
+#define HAVE_DECL_KERN_PRINTK_RATELIMIT 1
+
+/* Define to 1 if you have the declaration of `KERN_PRINTK_RATELIMIT_BURST',
+   and to 0 if you don't. */
+#define HAVE_DECL_KERN_PRINTK_RATELIMIT_BURST 1
+
+/* Define to 1 if you have the declaration of `KERN_PTY', and to 0 if you
+   don't. */
+#define HAVE_DECL_KERN_PTY 1
+
+/* Define to 1 if you have the declaration of `KERN_RANDOMIZE', and to 0 if
+   you don't. */
+#define HAVE_DECL_KERN_RANDOMIZE 1
+
+/* Define to 1 if you have the declaration of `KERN_SETUID_DUMPABLE', and to 0
+   if you don't. */
+#define HAVE_DECL_KERN_SETUID_DUMPABLE 1
+
+/* Define to 1 if you have the declaration of `KERN_SPARC_SCONS_PWROFF', and
+   to 0 if you don't. */
+#define HAVE_DECL_KERN_SPARC_SCONS_PWROFF 1
+
+/* Define to 1 if you have the declaration of `KERN_SPIN_RETRY', and to 0 if
+   you don't. */
+#define HAVE_DECL_KERN_SPIN_RETRY 1
+
+/* Define to 1 if you have the declaration of `KERN_UNKNOWN_NMI_PANIC', and to
+   0 if you don't. */
+#define HAVE_DECL_KERN_UNKNOWN_NMI_PANIC 1
+
+/* Define to 1 if you have the declaration of `LO_FLAGS_AUTOCLEAR', and to 0
+   if you don't. */
+#define HAVE_DECL_LO_FLAGS_AUTOCLEAR 1
+
+/* Define to 1 if you have the declaration of `LO_FLAGS_DIRECT_IO', and to 0
+   if you don't. */
+#define HAVE_DECL_LO_FLAGS_DIRECT_IO 1
+
+/* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0 if
+   you don't. */
+#define HAVE_DECL_LO_FLAGS_PARTSCAN 1
+
+/* Define to 1 if you have the declaration of `LO_FLAGS_READ_ONLY', and to 0
+   if you don't. */
+#define HAVE_DECL_LO_FLAGS_READ_ONLY 1
+
+/* Define to 1 if you have the declaration of `LO_FLAGS_USE_AOPS', and to 0 if
+   you don't. */
+#define HAVE_DECL_LO_FLAGS_USE_AOPS 0
+
+/* Define to 1 if you have the declaration of `NET_CIPSOV4_CACHE_BUCKET_SIZE',
+   and to 0 if you don't. */
+#define HAVE_DECL_NET_CIPSOV4_CACHE_BUCKET_SIZE 1
+
+/* Define to 1 if you have the declaration of `NET_CIPSOV4_CACHE_ENABLE', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_CIPSOV4_CACHE_ENABLE 1
+
+/* Define to 1 if you have the declaration of `NET_CIPSOV4_RBM_OPTFMT', and to
+   0 if you don't. */
+#define HAVE_DECL_NET_CIPSOV4_RBM_OPTFMT 1
+
+/* Define to 1 if you have the declaration of `NET_CIPSOV4_RBM_STRICTVALID',
+   and to 0 if you don't. */
+#define HAVE_DECL_NET_CIPSOV4_RBM_STRICTVALID 1
+
+/* Define to 1 if you have the declaration of `NET_CORE_AEVENT_ETIME', and to
+   0 if you don't. */
+#define HAVE_DECL_NET_CORE_AEVENT_ETIME 1
+
+/* Define to 1 if you have the declaration of `NET_CORE_AEVENT_RSEQTH', and to
+   0 if you don't. */
+#define HAVE_DECL_NET_CORE_AEVENT_RSEQTH 1
+
+/* Define to 1 if you have the declaration of `NET_CORE_BUDGET', and to 0 if
+   you don't. */
+#define HAVE_DECL_NET_CORE_BUDGET 1
+
+/* Define to 1 if you have the declaration of `NET_CORE_DESTROY_DELAY', and to
+   0 if you don't. */
+#define HAVE_DECL_NET_CORE_DESTROY_DELAY 0
+
+/* Define to 1 if you have the declaration of `NET_CORE_WARNINGS', and to 0 if
+   you don't. */
+#define HAVE_DECL_NET_CORE_WARNINGS 1
+
+/* Define to 1 if you have the declaration of `NET_DCCP', and to 0 if you
+   don't. */
+#define HAVE_DECL_NET_DCCP 1
+
+/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_ACCEPT', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_CONF_ARP_ACCEPT 1
+
+/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_ANNOUNCE',
+   and to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_CONF_ARP_ANNOUNCE 1
+
+/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_IGNORE', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_CONF_ARP_IGNORE 1
+
+/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_NOTIFY', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_CONF_ARP_NOTIFY 1
+
+/* Define to 1 if you have the declaration of
+   `NET_IPV4_CONF_FORCE_IGMP_VERSION', and to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_CONF_FORCE_IGMP_VERSION 1
+
+/* Define to 1 if you have the declaration of
+   `NET_IPV4_CONF_PROMOTE_SECONDARIES', and to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_CONF_PROMOTE_SECONDARIES 1
+
+/* Define to 1 if you have the declaration of
+   `NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR', and to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR 1
+
+/* Define to 1 if you have the declaration of `NET_IPV4_IGMP_MAX_MSF', and to
+   0 if you don't. */
+#define HAVE_DECL_NET_IPV4_IGMP_MAX_MSF 1
+
+/* Define to 1 if you have the declaration of `NET_IPV4_IPFRAG_MAX_DIST', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_IPFRAG_MAX_DIST 1
+
+/* Define to 1 if you have the declaration of
+   `NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS', and to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS 1
+
+/* Define to 1 if you have the declaration of
+   `NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS', and to 0 if you don't. */
+#define HAVE_DECL_NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS 1
+
+/* Define to 1 if you have the declaration of `NET_IPV6_MLD_MAX_MSF', and to 0
+   if you don't. */
+#define HAVE_DECL_NET_IPV6_MLD_MAX_MSF 1
+
+/* Define to 1 if you have the declaration of
+   `NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS', and to 0 if you don't. */
+#define HAVE_DECL_NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS 1
+
+/* Define to 1 if you have the declaration of `NET_IRDA', and to 0 if you
+   don't. */
+#define HAVE_DECL_NET_IRDA 1
+
+/* Define to 1 if you have the declaration of `NET_LLC', and to 0 if you
+   don't. */
+#define HAVE_DECL_NET_LLC 1
+
+/* Define to 1 if you have the declaration of `NET_NETFILTER', and to 0 if you
+   don't. */
+#define HAVE_DECL_NET_NETFILTER 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_ABC', and to 0 if you
+   don't. */
+#define HAVE_DECL_NET_TCP_ABC 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_ALLOWED_CONG_CONTROL',
+   and to 0 if you don't. */
+#define HAVE_DECL_NET_TCP_ALLOWED_CONG_CONTROL 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_AVAIL_CONG_CONTROL',
+   and to 0 if you don't. */
+#define HAVE_DECL_NET_TCP_AVAIL_CONG_CONTROL 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_BASE_MSS', and to 0 if
+   you don't. */
+#define HAVE_DECL_NET_TCP_BASE_MSS 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_BIC_BETA', and to 0 if
+   you don't. */
+#define HAVE_DECL_NET_TCP_BIC_BETA 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_CONG_CONTROL', and to 0
+   if you don't. */
+#define HAVE_DECL_NET_TCP_CONG_CONTROL 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_DEFAULT_WIN_SCALE', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_TCP_DEFAULT_WIN_SCALE 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_DMA_COPYBREAK', and to
+   0 if you don't. */
+#define HAVE_DECL_NET_TCP_DMA_COPYBREAK 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_FRTO_RESPONSE', and to
+   0 if you don't. */
+#define HAVE_DECL_NET_TCP_FRTO_RESPONSE 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_MAX_SSTHRESH', and to 0
+   if you don't. */
+#define HAVE_DECL_NET_TCP_MAX_SSTHRESH 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_MODERATE_RCVBUF', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_TCP_MODERATE_RCVBUF 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_MTU_PROBING', and to 0
+   if you don't. */
+#define HAVE_DECL_NET_TCP_MTU_PROBING 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_NO_METRICS_SAVE', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_TCP_NO_METRICS_SAVE 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_SLOW_START_AFTER_IDLE',
+   and to 0 if you don't. */
+#define HAVE_DECL_NET_TCP_SLOW_START_AFTER_IDLE 1
+
+/* Define to 1 if you have the declaration of `NET_TCP_TSO_WIN_DIVISOR', and
+   to 0 if you don't. */
+#define HAVE_DECL_NET_TCP_TSO_WIN_DIVISOR 1
+
+/* Define to 1 if you have the declaration of `PTRACE_PEEKUSER', and to 0 if
+   you don't. */
+#define HAVE_DECL_PTRACE_PEEKUSER 1
+
+/* Define to 1 if you have the declaration of `PTRACE_POKEUSER', and to 0 if
+   you don't. */
+#define HAVE_DECL_PTRACE_POKEUSER 1
+
+/* Define to 1 if you have the declaration of `P_ALL', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_ALL 1
+
+/* Define to 1 if you have the declaration of `P_CID', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_CID 0
+
+/* Define to 1 if you have the declaration of `P_GID', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_GID 0
+
+/* Define to 1 if you have the declaration of `P_LWPID', and to 0 if you
+   don't. */
+#define HAVE_DECL_P_LWPID 0
+
+/* Define to 1 if you have the declaration of `P_PGID', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_PGID 1
+
+/* Define to 1 if you have the declaration of `P_PID', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_PID 1
+
+/* Define to 1 if you have the declaration of `P_PPID', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_PPID 0
+
+/* Define to 1 if you have the declaration of `P_SID', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_SID 0
+
+/* Define to 1 if you have the declaration of `P_UID', and to 0 if you don't.
+   */
+#define HAVE_DECL_P_UID 0
+
+/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you
+   don't. */
+#define HAVE_DECL_SYS_ERRLIST 0
+
+/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_SDR_CAPTURE', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_SDR_CAPTURE 0
+
+/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_SDR_OUTPUT', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_SDR_OUTPUT 0
+
+/* Define to 1 if you have the declaration of
+   `V4L2_BUF_TYPE_SLICED_VBI_CAPTURE', and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE 1
+
+/* Define to 1 if you have the declaration of
+   `V4L2_BUF_TYPE_SLICED_VBI_OUTPUT', and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT 1
+
+/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VBI_CAPTURE', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VBI_CAPTURE 1
+
+/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VBI_OUTPUT', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VBI_OUTPUT 1
+
+/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VIDEO_CAPTURE',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE 1
+
+/* Define to 1 if you have the declaration of
+   `V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE', and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 1
+
+/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VIDEO_OUTPUT',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT 1
+
+/* Define to 1 if you have the declaration of
+   `V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE', and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE 1
+
+/* Define to 1 if you have the declaration of
+   `V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY', and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY 1
+
+/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VIDEO_OVERLAY',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OVERLAY 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_470_SYSTEM_BG',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_470_SYSTEM_M',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_BT878', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_BT878 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_JPEG', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_JPEG 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_REC709', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_REC709 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_SMPTE170M', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_SMPTE170M 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_SMPTE240M', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_SMPTE240M 1
+
+/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_SRGB', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_COLORSPACE_SRGB 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_BITMASK', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_BITMASK 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_BOOLEAN', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_BOOLEAN 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_BUTTON', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_BUTTON 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_CTRL_CLASS', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_CTRL_CLASS 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_INTEGER', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_INTEGER64', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER64 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_INTEGER_MENU',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER_MENU 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_MENU', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_MENU 1
+
+/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_STRING', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_CTRL_TYPE_STRING 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_ALTERNATE', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_FIELD_ALTERNATE 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_ANY', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_FIELD_ANY 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_BOTTOM', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_FIELD_BOTTOM 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_INTERLACED', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_FIELD_INTERLACED 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_INTERLACED_BT', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_FIELD_INTERLACED_BT 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_INTERLACED_TB', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_FIELD_INTERLACED_TB 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_NONE', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_FIELD_NONE 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_SEQ_BT', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_FIELD_SEQ_BT 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_SEQ_TB', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_FIELD_SEQ_TB 1
+
+/* Define to 1 if you have the declaration of `V4L2_FIELD_TOP', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_FIELD_TOP 1
+
+/* Define to 1 if you have the declaration of `V4L2_FRMIVAL_TYPE_CONTINUOUS',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_FRMIVAL_TYPE_CONTINUOUS 1
+
+/* Define to 1 if you have the declaration of `V4L2_FRMIVAL_TYPE_DISCRETE',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_FRMIVAL_TYPE_DISCRETE 1
+
+/* Define to 1 if you have the declaration of `V4L2_FRMIVAL_TYPE_STEPWISE',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_FRMIVAL_TYPE_STEPWISE 1
+
+/* Define to 1 if you have the declaration of `V4L2_FRMSIZE_TYPE_CONTINUOUS',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_FRMSIZE_TYPE_CONTINUOUS 1
+
+/* Define to 1 if you have the declaration of `V4L2_FRMSIZE_TYPE_DISCRETE',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_FRMSIZE_TYPE_DISCRETE 1
+
+/* Define to 1 if you have the declaration of `V4L2_FRMSIZE_TYPE_STEPWISE',
+   and to 0 if you don't. */
+#define HAVE_DECL_V4L2_FRMSIZE_TYPE_STEPWISE 1
+
+/* Define to 1 if you have the declaration of `V4L2_MEMORY_DMABUF', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_MEMORY_DMABUF 1
+
+/* Define to 1 if you have the declaration of `V4L2_MEMORY_MMAP', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_MEMORY_MMAP 1
+
+/* Define to 1 if you have the declaration of `V4L2_MEMORY_OVERLAY', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_MEMORY_OVERLAY 1
+
+/* Define to 1 if you have the declaration of `V4L2_MEMORY_USERPTR', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_MEMORY_USERPTR 1
+
+/* Define to 1 if you have the declaration of `V4L2_PRIORITY_BACKGROUND', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_PRIORITY_BACKGROUND 1
+
+/* Define to 1 if you have the declaration of `V4L2_PRIORITY_INTERACTIVE', and
+   to 0 if you don't. */
+#define HAVE_DECL_V4L2_PRIORITY_INTERACTIVE 1
+
+/* Define to 1 if you have the declaration of `V4L2_PRIORITY_RECORD', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_PRIORITY_RECORD 1
+
+/* Define to 1 if you have the declaration of `V4L2_PRIORITY_UNSET', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_PRIORITY_UNSET 1
+
+/* Define to 1 if you have the declaration of `V4L2_TUNER_ANALOG_TV', and to 0
+   if you don't. */
+#define HAVE_DECL_V4L2_TUNER_ANALOG_TV 1
+
+/* Define to 1 if you have the declaration of `V4L2_TUNER_DIGITAL_TV', and to
+   0 if you don't. */
+#define HAVE_DECL_V4L2_TUNER_DIGITAL_TV 1
+
+/* Define to 1 if you have the declaration of `V4L2_TUNER_RADIO', and to 0 if
+   you don't. */
+#define HAVE_DECL_V4L2_TUNER_RADIO 1
+
+/* Define to 1 if you have the declaration of `VM_BLOCK_DUMP', and to 0 if you
+   don't. */
+#define HAVE_DECL_VM_BLOCK_DUMP 1
+
+/* Define to 1 if you have the declaration of `VM_HUGETLB_GROUP', and to 0 if
+   you don't. */
+#define HAVE_DECL_VM_HUGETLB_GROUP 1
+
+/* Define to 1 if you have the declaration of `VM_LAPTOP_MODE', and to 0 if
+   you don't. */
+#define HAVE_DECL_VM_LAPTOP_MODE 1
+
+/* Define to 1 if you have the declaration of `VM_LEGACY_VA_LAYOUT', and to 0
+   if you don't. */
+#define HAVE_DECL_VM_LEGACY_VA_LAYOUT 1
+
+/* Define to 1 if you have the declaration of `VM_MAX_MAP_COUNT', and to 0 if
+   you don't. */
+#define HAVE_DECL_VM_MAX_MAP_COUNT 1
+
+/* Define to 1 if you have the declaration of `VM_SWAP_TOKEN_TIMEOUT', and to
+   0 if you don't. */
+#define HAVE_DECL_VM_SWAP_TOKEN_TIMEOUT 1
+
+/* Define to 1 if you have the declaration of `VM_VFS_CACHE_PRESSURE', and to
+   0 if you don't. */
+#define HAVE_DECL_VM_VFS_CACHE_PRESSURE 1
+
+/* Define to 1 if the system provides dladdr */
+#define HAVE_DLADDR 1
+
+/* Define to 1 if you have the <elf.h> header file. */
+#define HAVE_ELF_H 1
+
+/* Define to 1 if you have the `fallocate' function. */
+#define HAVE_FALLOCATE 1
+
+/* Define to 1 if you have the `fanotify_mark' function. */
+/* #undef HAVE_FANOTIFY_MARK */
+
+/* Define to 1 if you have the `fopen64' function. */
+#define HAVE_FOPEN64 1
+
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 1
+
+/* Define to 1 if you have the `fputs_unlocked' function. */
+/* #undef HAVE_FPUTS_UNLOCKED */
+
+/* Define to 1 if you have the `fstatat' function. */
+#define HAVE_FSTATAT 1
+
+/* Define to 1 if you have the `ftruncate' function. */
+#define HAVE_FTRUNCATE 1
+
+/* Define to 1 if you have the `futimens' function. */
+#define HAVE_FUTIMENS 1
+
+/* Define to 1 if you have the <gnu_stubs> header file. */
+/* #undef HAVE_GNU_STUBS */
+
+/* Define to 1 if you have the <gnu/stubs-32.h> header file. */
+/* #undef HAVE_GNU_STUBS_32_H */
+
+/* Define to 1 if you have the <gnu/stubs-x32.h> header file. */
+/* #undef HAVE_GNU_STUBS_X32_H */
+
+/* Define to 1 if you have the `if_indextoname' function. */
+#define HAVE_IF_INDEXTONAME 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <libunwind-ptrace.h> header file. */
+/* #undef HAVE_LIBUNWIND_PTRACE_H */
+
+/* Define to 1 if you have the <linux/bpf.h> header file. */
+#define HAVE_LINUX_BPF_H 1
+
+/* Define to 1 if you have the <linux/bsg.h> header file. */
+#define HAVE_LINUX_BSG_H 1
+
+/* Define to 1 if you have the <linux/btrfs.h> header file. */
+#define HAVE_LINUX_BTRFS_H 1
+
+/* Define to 1 if you have the <linux/dm-ioctl.h> header file. */
+#define HAVE_LINUX_DM_IOCTL_H 1
+
+/* Define to 1 if you have the <linux/dqblk_xfs.h> header file. */
+#define HAVE_LINUX_DQBLK_XFS_H 1
+
+/* Define to 1 if you have the <linux/falloc.h> header file. */
+#define HAVE_LINUX_FALLOC_H 1
+
+/* Define to 1 if you have the <linux/fiemap.h> header file. */
+#define HAVE_LINUX_FIEMAP_H 1
+
+/* Define to 1 if you have the <linux/filter.h> header file. */
+#define HAVE_LINUX_FILTER_H 1
+
+/* Define to 1 if you have the <linux/genetlink.h> header file. */
+#define HAVE_LINUX_GENETLINK_H 1
+
+/* Define to 1 if you have the <linux/hiddev.h> header file. */
+#define HAVE_LINUX_HIDDEV_H 1
+
+/* Define to 1 if you have the <linux/input.h> header file. */
+#define HAVE_LINUX_INPUT_H 1
+
+/* Define to 1 if you have the <linux/ipc.h> header file. */
+#define HAVE_LINUX_IPC_H 1
+
+/* Define to 1 if you have the <linux/ip_vs.h> header file. */
+#define HAVE_LINUX_IP_VS_H 1
+
+/* Define to 1 if you have the <linux/mmtimer.h> header file. */
+#define HAVE_LINUX_MMTIMER_H 1
+
+/* Define to 1 if you have the <linux/mqueue.h> header file. */
+#define HAVE_LINUX_MQUEUE_H 1
+
+/* Define to 1 if you have the <linux/msg.h> header file. */
+#define HAVE_LINUX_MSG_H 1
+
+/* Define to 1 if you have the <linux/netfilter_arp/arp_tables.h> header file.
+   */
+#define HAVE_LINUX_NETFILTER_ARP_ARP_TABLES_H 1
+
+/* Define to 1 if you have the <linux/netfilter_bridge/ebtables.h> header
+   file. */
+#define HAVE_LINUX_NETFILTER_BRIDGE_EBTABLES_H 1
+
+/* Define to 1 if you have the <linux/netfilter_ipv4/ip_tables.h> header file.
+   */
+#define HAVE_LINUX_NETFILTER_IPV4_IP_TABLES_H 1
+
+/* Define to 1 if you have the <linux/netfilter_ipv6/ip6_tables.h> header
+   file. */
+#define HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H 1
+
+/* Define to 1 if you have the <linux/netfilter/nfnetlink.h> header file. */
+#define HAVE_LINUX_NETFILTER_NFNETLINK_H 1
+
+/* Define to 1 if you have the <linux/nsfs.h> header file. */
+#define HAVE_LINUX_NSFS_H 1
+
+/* Define to 1 if you have the <linux/perf_event.h> header file. */
+#define HAVE_LINUX_PERF_EVENT_H 1
+
+/* Define to 1 if you have the <linux/quota.h> header file. */
+#define HAVE_LINUX_QUOTA_H 1
+
+/* Define to 1 if you have the <linux/seccomp.h> header file. */
+#define HAVE_LINUX_SECCOMP_H 1
+
+/* Define to 1 if you have the <linux/securebits.h> header file. */
+#define HAVE_LINUX_SECUREBITS_H 1
+
+/* Define to 1 if you have the <linux/sem.h> header file. */
+#define HAVE_LINUX_SEM_H 1
+
+/* Define to 1 if you have the <linux/shm.h> header file. */
+#define HAVE_LINUX_SHM_H 1
+
+/* Define to 1 if you have the <linux/userfaultfd.h> header file. */
+#define HAVE_LINUX_USERFAULTFD_H 1
+
+/* Define to 1 if you have the <linux/utsname.h> header file. */
+#define HAVE_LINUX_UTSNAME_H 1
+
+/* Define to 1 if you have CFLAG mpers support */
+/* #undef HAVE_M32_MPERS */
+
+/* Define to 1 if MPERS_NAME has the type 'struct stat'. */
+/* #undef HAVE_M32_STRUCT_STAT */
+
+/* Define to 1 if MPERS_NAME has the type 'struct stat64'. */
+/* #undef HAVE_M32_STRUCT_STAT64 */
+
+/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat64'.
+   */
+/* #undef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC */
+
+/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat'. */
+/* #undef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <mqueue.h> header file. */
+/* #undef HAVE_MQUEUE_H */
+
+/* Define to 1 if you have CFLAG mpers support */
+/* #undef HAVE_MX32_MPERS */
+
+/* Define to 1 if MPERS_NAME has the type 'struct stat'. */
+/* #undef HAVE_MX32_STRUCT_STAT */
+
+/* Define to 1 if MPERS_NAME has the type 'struct stat64'. */
+/* #undef HAVE_MX32_STRUCT_STAT64 */
+
+/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat64'.
+   */
+/* #undef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC */
+
+/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat'. */
+/* #undef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC */
+
+/* Define to 1 if you have the <netinet/sctp.h> header file. */
+/* #undef HAVE_NETINET_SCTP_H */
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#define HAVE_NETINET_TCP_H 1
+
+/* Define to 1 if you have the <netinet/udp.h> header file. */
+#define HAVE_NETINET_UDP_H 1
+
+/* Define to 1 if you have the <netipx/ipx.h> header file. */
+/* #undef HAVE_NETIPX_IPX_H */
+
+/* Define to 1 if you have the `open64' function. */
+#define HAVE_OPEN64 1
+
+/* Define to 1 if you have the `prctl' function. */
+#define HAVE_PRCTL 1
+
+/* Define to 1 if you have the `preadv' function. */
+#define HAVE_PREADV 1
+
+/* Define to 1 if you have the `process_vm_readv' function. */
+#define HAVE_PROCESS_VM_READV 1
+
+/* Define to 1 if the system provides program_invocation_name variable */
+/* #undef HAVE_PROGRAM_INVOCATION_NAME */
+
+/* Define to 1 if you have the `pwritev' function. */
+#define HAVE_PWRITEV 1
+
+/* Define to 1 if you have the `readahead' function. */
+#define HAVE_READAHEAD 1
+
+/* Define to 1 if you have the <scsi/sg.h> header file. */
+#define HAVE_SCSI_SG_H 1
+
+/* Define to 1 if `si_overrun' is a member of `siginfo_t'. */
+#define HAVE_SIGINFO_T_SI_OVERRUN 1
+
+/* Define to 1 if `si_syscall' is a member of `siginfo_t'. */
+#define HAVE_SIGINFO_T_SI_SYSCALL 1
+
+/* Define to 1 if `si_timerid' is a member of `siginfo_t'. */
+#define HAVE_SIGINFO_T_SI_TIMERID 1
+
+/* Define to 1 if you have the `signalfd' function. */
+#define HAVE_SIGNALFD 1
+
+/* Define to 1 if the system has the type `sig_atomic_t'. */
+#define HAVE_SIG_ATOMIC_T 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `stpcpy' function. */
+#define HAVE_STPCPY 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strndup' function. */
+#define HAVE_STRNDUP 1
+
+/* Define to 1 if you have the <stropts.h> header file. */
+/* #undef HAVE_STROPTS_H */
+
+/* Define to 1 if you have the `strsignal' function. */
+#define HAVE_STRSIGNAL 1
+
+/* Define to 1 if the system has the type `struct blk_user_trace_setup'. */
+#define HAVE_STRUCT_BLK_USER_TRACE_SETUP 1
+
+/* Define to 1 if `start' is a member of `struct
+   btrfs_ioctl_defrag_range_args'. */
+#define HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START 1
+
+/* Define to 1 if `compat_flags' is a member of `struct
+   btrfs_ioctl_feature_flags'. */
+#define HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS 1
+
+/* Define to 1 if `nodesize' is a member of `struct btrfs_ioctl_fs_info_args'.
+   */
+#define HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE 1
+
+/* Define to 1 if `buf_size' is a member of `struct
+   btrfs_ioctl_search_args_v2'. */
+#define HAVE_STRUCT_BTRFS_IOCTL_SEARCH_ARGS_V2_BUF_SIZE 1
+
+/* Define to 1 if the system has the type `struct flock'. */
+#define HAVE_STRUCT_FLOCK 1
+
+/* Define to 1 if the system has the type `struct flock64'. */
+#define HAVE_STRUCT_FLOCK64 1
+
+/* Define to 1 if the system has the type `struct ia64_fpreg'. */
+/* #undef HAVE_STRUCT_IA64_FPREG */
+
+/* Define to 1 if `resolution' is a member of `struct input_absinfo'. */
+#define HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION 1
+
+/* Define to 1 if the system has the type `struct mmsghdr'. */
+#define HAVE_STRUCT_MMSGHDR 1
+
+/* Define to 1 if `aux_watermark' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK 1
+
+/* Define to 1 if `bp_type' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE 1
+
+/* Define to 1 if `branch_sample_type' is a member of `struct
+   perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE 1
+
+/* Define to 1 if `comm_exec' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC 1
+
+/* Define to 1 if `config1' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1 1
+
+/* Define to 1 if `config2' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2 1
+
+/* Define to 1 if `context_switch' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH 1
+
+/* Define to 1 if `exclude_callchain_kernel' is a member of `struct
+   perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL 1
+
+/* Define to 1 if `exclude_callchain_user' is a member of `struct
+   perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER 1
+
+/* Define to 1 if `exclude_guest' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST 1
+
+/* Define to 1 if `exclude_host' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST 1
+
+/* Define to 1 if `mmap2' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2 1
+
+/* Define to 1 if `mmap_data' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA 1
+
+/* Define to 1 if `precise_ip' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP 1
+
+/* Define to 1 if `sample_id_all' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL 1
+
+/* Define to 1 if `sample_max_stack' is a member of `struct perf_event_attr'.
+   */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK 1
+
+/* Define to 1 if `sample_regs_intr' is a member of `struct perf_event_attr'.
+   */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR 1
+
+/* Define to 1 if `sample_regs_user' is a member of `struct perf_event_attr'.
+   */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER 1
+
+/* Define to 1 if `sample_stack_user' is a member of `struct perf_event_attr'.
+   */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER 1
+
+/* Define to 1 if `use_clockid' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID 1
+
+/* Define to 1 if `write_backward' is a member of `struct perf_event_attr'. */
+#define HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD 1
+
+/* Define to 1 if the system has the type `struct ptrace_peeksiginfo_args'. */
+#define HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS 1
+
+/* Define to 1 if the system has the type `struct pt_all_user_regs'. */
+/* #undef HAVE_STRUCT_PT_ALL_USER_REGS */
+
+/* Define to 1 if the system has the type `struct sigcontext'. */
+#define HAVE_STRUCT_SIGCONTEXT 1
+
+/* Define to 1 if the system has the type `struct stat64'. */
+/* #undef HAVE_STRUCT_STAT64 */
+
+/* Define to 1 if `st_mtime_nsec' is a member of `struct stat64'. */
+/* #undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC */
+
+/* Define to 1 if the system has the type `struct statfs'. */
+#define HAVE_STRUCT_STATFS 1
+
+/* Define to 1 if the system has the type `struct statfs64'. */
+#define HAVE_STRUCT_STATFS64 1
+
+/* Define to 1 if `f_flags' is a member of `struct statfs64'. */
+#define HAVE_STRUCT_STATFS64_F_FLAGS 1
+
+/* Define to 1 if `f_frsize' is a member of `struct statfs64'. */
+#define HAVE_STRUCT_STATFS64_F_FRSIZE 1
+
+/* Define to 1 if `f_fsid.val' is a member of `struct statfs64'. */
+#define HAVE_STRUCT_STATFS64_F_FSID_VAL 1
+
+/* Define to 1 if `f_fsid.__val' is a member of `struct statfs64'. */
+/* #undef HAVE_STRUCT_STATFS64_F_FSID___VAL */
+
+/* Define to 1 if `f_flags' is a member of `struct statfs'. */
+#define HAVE_STRUCT_STATFS_F_FLAGS 1
+
+/* Define to 1 if `f_frsize' is a member of `struct statfs'. */
+#define HAVE_STRUCT_STATFS_F_FRSIZE 1
+
+/* Define to 1 if `f_fsid.val' is a member of `struct statfs'. */
+#define HAVE_STRUCT_STATFS_F_FSID_VAL 1
+
+/* Define to 1 if `f_fsid.__val' is a member of `struct statfs'. */
+/* #undef HAVE_STRUCT_STATFS_F_FSID___VAL */
+
+/* Define to 1 if `st_mtime_nsec' is a member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
+
+/* Define to 1 if `tai' is a member of `struct timex'. */
+#define HAVE_STRUCT_TIMEX_TAI 1
+
+/* Define to 1 if the system has the type `struct user_desc'. */
+/* #undef HAVE_STRUCT_USER_DESC */
+
+/* Define to 1 if `domainname' is a member of `struct utsname'. */
+#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1
+
+/* Define to 1 if `buffersize' is a member of `struct v4l2_sdr_format'. */
+#define HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE 1
+
+/* Define to 1 if `global_alpha' is a member of `struct v4l2_window'. */
+#define HAVE_STRUCT_V4L2_WINDOW_GLOBAL_ALPHA 1
+
+/* Define to 1 if the system has the type `struct __kernel_flock'. */
+/* #undef HAVE_STRUCT___KERNEL_FLOCK */
+
+/* Define to 1 if the system has the type `struct __kernel_flock64'. */
+/* #undef HAVE_STRUCT___KERNEL_FLOCK64 */
+
+/* Define to 1 if the system has the type `struct __old_kernel_stat'. */
+/* #undef HAVE_STRUCT___OLD_KERNEL_STAT */
+
+/* Define to 1 if you have the `sync_file_range' function. */
+#define HAVE_SYNC_FILE_RANGE 1
+
+/* Define to 1 if you have the <sys/conf.h> header file. */
+/* #undef HAVE_SYS_CONF_H */
+
+/* Define to 1 if you have the <sys/eventfd.h> header file. */
+#define HAVE_SYS_EVENTFD_H 1
+
+/* Define to 1 if you have the <sys/fanotify.h> header file. */
+/* #undef HAVE_SYS_FANOTIFY_H */
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/msg.h> header file. */
+#define HAVE_SYS_MSG_H 1
+
+/* Define to 1 if you have the <sys/quota.h> header file. */
+#define HAVE_SYS_QUOTA_H 1
+
+/* Define to 1 if you have the <sys/reg.h> header file. */
+#define HAVE_SYS_REG_H 1
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+#define HAVE_SYS_SEM_H 1
+
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#define HAVE_SYS_SHM_H 1
+
+/* Define to 1 if you have the <sys/signalfd.h> header file. */
+#define HAVE_SYS_SIGNALFD_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/xattr.h> header file. */
+#define HAVE_SYS_XATTR_H 1
+
+/* Define to 1 if typeof works with your compiler. */
+#define HAVE_TYPEOF 1
+
+/* Define to 1 if union bpf_attr.attach_flags initialization works */
+#define HAVE_UNION_BPF_ATTR_ATTACH_FLAGS 1
+
+/* Define to 1 if union bpf_attr.bpf_fd initialization works */
+#define HAVE_UNION_BPF_ATTR_BPF_FD 1
+
+/* Define to 1 if union bpf_attr.log_buf initialization works */
+#define HAVE_UNION_BPF_ATTR_LOG_BUF 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <ustat.h> header file. */
+/* #undef HAVE_USTAT_H */
+
+/* Define to 1 if you have the `utimensat' function. */
+#define HAVE_UTIMENSAT 1
+
+/* Define to 1 if the system provides __builtin_popcount function */
+#define HAVE___BUILTIN_POPCOUNT 1
+
+/* Define to 1 if the system has the type `__kernel_long_t'. */
+#define HAVE___KERNEL_LONG_T 1
+
+/* Define to 1 if the system has the type `__kernel_ulong_t'. */
+#define HAVE___KERNEL_ULONG_T 1
+
+/* Define for the HPPA architecture. */
+/* #undef HPPA */
+
+/* Define for the i386 architecture. */
+/* #undef I386 */
+
+/* Define for the IA64 architecture. */
+/* #undef IA64 */
+
+/* Define for _ABIN32. */
+/* #undef LINUX_MIPSN32 */
+
+/* Define for _ABI64. */
+/* #undef LINUX_MIPSN64 */
+
+/* Define for _ABIO32. */
+/* #undef LINUX_MIPSO32 */
+
+/* Define for the m68k architecture. */
+/* #undef M68K */
+
+/* Define for the Meta architecture. */
+/* #undef METAG */
+
+/* Define for the MicroBlaze architecture. */
+/* #undef MICROBLAZE */
+
+/* Define for the MIPS architecture. */
+/* #undef MIPS */
+
+/* Define for the Nios-II architecture. */
+/* #undef NIOS2 */
+
+/* Define for the OpenRISC 1000 architecture. */
+/* #undef OR1K */
+
+/* Name of package */
+#define PACKAGE "strace"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "strace-devel@lists.sourceforge.net"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "strace"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "strace 4.18"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "strace"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://strace.io"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "4.18"
+
+/* Define for the PowerPC architecture. */
+/* #undef POWERPC */
+
+/* Define for the PowerPC64 architecture. */
+/* #undef POWERPC64 */
+
+/* Define for the RISC-V architecture */
+/* #undef RISCV */
+
+/* Define for the S390 architecture. */
+/* #undef S390 */
+
+/* Define for the S390x architecture. */
+/* #undef S390X */
+
+/* Define for the SH architecture. */
+/* #undef SH */
+
+/* Define for the SH64 architecture. */
+/* #undef SH64 */
+
+/* The size of `kernel_long_t', as computed by sizeof. */
+/* #undef SIZEOF_KERNEL_LONG_T */
+
+/* The size of `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of `long long', as computed by sizeof. */
+/* #undef SIZEOF_LONG_LONG */
+
+/* The size of `off_t', as computed by sizeof. */
+/* #undef SIZEOF_OFF_T */
+
+/* The size of `struct i64_i32', as computed by sizeof. */
+#define SIZEOF_STRUCT_I64_I32 16
+
+/* Define for the SPARC architecture. */
+/* #undef SPARC */
+
+/* Define for the SPARC64 architecture. */
+/* #undef SPARC64 */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define for the Tile architecture */
+/* #undef TILE */
+
+/* Compile stack tracing functionality */
+/* #undef USE_LIBUNWIND */
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Version number of package */
+#define VERSION "4.18"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Define for the 32bit AMD x86-64 architecture. */
+/* #undef X32 */
+
+/* Define for the 64bit AMD x86-64 architecture. */
+/* #undef X86_64 */
+
+/* Define for the Xtensa architecture */
+/* #undef XTENSA */
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef gid_t */
+
+/* Define to __typeof__ if your compiler spells it that way. */
+/* #undef typeof */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef uid_t */
diff --git a/config.h.in b/config.h.in
index 54b9892..f639455 100644
--- a/config.h.in
+++ b/config.h.in
@@ -717,6 +717,9 @@
 /* Define to 1 if you have the <linux/filter.h> header file. */
 #undef HAVE_LINUX_FILTER_H
 
+/* Define to 1 if you have the <linux/genetlink.h> header file. */
+#undef HAVE_LINUX_GENETLINK_H
+
 /* Define to 1 if you have the <linux/hiddev.h> header file. */
 #undef HAVE_LINUX_HIDDEV_H
 
@@ -754,6 +757,9 @@
    file. */
 #undef HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H
 
+/* Define to 1 if you have the <linux/netfilter/nfnetlink.h> header file. */
+#undef HAVE_LINUX_NETFILTER_NFNETLINK_H
+
 /* Define to 1 if you have the <linux/nsfs.h> header file. */
 #undef HAVE_LINUX_NSFS_H
 
@@ -843,6 +849,9 @@
 /* Define to 1 if you have the `process_vm_readv' function. */
 #undef HAVE_PROCESS_VM_READV
 
+/* Define to 1 if the system provides program_invocation_name variable */
+#undef HAVE_PROGRAM_INVOCATION_NAME
+
 /* Define to 1 if you have the `pwritev' function. */
 #undef HAVE_PWRITEV
 
@@ -885,6 +894,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
 /* Define to 1 if you have the <stropts.h> header file. */
 #undef HAVE_STROPTS_H
 
diff --git a/configure b/configure
index 9a1c087..c85be08 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for strace 4.17.
+# Generated by GNU Autoconf 2.69 for strace 4.18.
 #
 # Report bugs to <strace-devel@lists.sourceforge.net>.
 #
@@ -11,7 +11,7 @@
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 #
-# Copyright (C) 1999-2017 The strace developers.
+# Copyright (c) 1999-2017 The strace developers.
 ## -------------------- ##
 ## M4sh Initialization. ##
 ## -------------------- ##
@@ -582,8 +582,8 @@
 # Identity of this package.
 PACKAGE_NAME='strace'
 PACKAGE_TARNAME='strace'
-PACKAGE_VERSION='4.17'
-PACKAGE_STRING='strace 4.17'
+PACKAGE_VERSION='4.18'
+PACKAGE_STRING='strace 4.18'
 PACKAGE_BUGREPORT='strace-devel@lists.sourceforge.net'
 PACKAGE_URL='https://strace.io'
 
@@ -1346,7 +1346,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures strace 4.17 to adapt to many kinds of systems.
+\`configure' configures strace 4.18 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1416,7 +1416,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of strace 4.17:";;
+     short | recursive ) echo "Configuration of strace 4.18:";;
    esac
   cat <<\_ACEOF
 
@@ -1528,14 +1528,14 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-strace configure 4.17
+strace configure 4.18
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 
-Copyright (C) 1999-2017 The strace developers.
+Copyright (c) 1999-2017 The strace developers.
 _ACEOF
   exit
 fi
@@ -2268,7 +2268,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by strace $as_me 4.17, which was
+It was created by strace $as_me 4.18, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3138,7 +3138,7 @@
 
 # Define the identity of the package.
  PACKAGE='strace'
- VERSION='4.17'
+ VERSION='4.18'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -8397,7 +8397,7 @@
 
 fi
 
-				CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
+				CODE_COVERAGE_CPPFLAGS="-DENABLE_COVERAGE_GCOV -DNDEBUG"
 		CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
 		CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
 		CODE_COVERAGE_LDFLAGS="-lgcov"
@@ -9203,7 +9203,7 @@
 fi
 
 
-for ac_func in accept4 fallocate fanotify_mark fopen64 fork fputs_unlocked fstatat ftruncate futimens if_indextoname open64 prctl preadv process_vm_readv pwritev readahead signalfd stpcpy strerror strsignal sync_file_range utimensat
+for ac_func in accept4 fallocate fanotify_mark fopen64 fork fputs_unlocked fstatat ftruncate futimens if_indextoname open64 prctl preadv process_vm_readv pwritev readahead signalfd stpcpy strerror strndup strsignal sync_file_range utimensat
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -9678,7 +9678,7 @@
 fi
 
 
-for ac_header in asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h inttypes.h linux/bsg.h linux/dm-ioctl.h linux/dqblk_xfs.h linux/falloc.h linux/fiemap.h linux/filter.h linux/hiddev.h linux/ip_vs.h linux/ipc.h linux/mmtimer.h linux/msg.h linux/nsfs.h linux/perf_event.h linux/quota.h linux/seccomp.h linux/securebits.h linux/sem.h linux/shm.h linux/userfaultfd.h linux/utsname.h mqueue.h netinet/sctp.h netipx/ipx.h scsi/sg.h stropts.h sys/conf.h sys/eventfd.h sys/fanotify.h sys/ipc.h sys/msg.h sys/quota.h sys/reg.h sys/sem.h sys/shm.h sys/signalfd.h sys/xattr.h ustat.h
+for ac_header in asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h inttypes.h linux/bsg.h linux/dm-ioctl.h linux/dqblk_xfs.h linux/falloc.h linux/fiemap.h linux/filter.h linux/genetlink.h linux/hiddev.h linux/ip_vs.h linux/ipc.h linux/mmtimer.h linux/msg.h linux/netfilter/nfnetlink.h linux/nsfs.h linux/perf_event.h linux/quota.h linux/seccomp.h linux/securebits.h linux/sem.h linux/shm.h linux/userfaultfd.h linux/utsname.h mqueue.h netinet/sctp.h netipx/ipx.h scsi/sg.h stropts.h sys/conf.h sys/eventfd.h sys/fanotify.h sys/ipc.h sys/msg.h sys/quota.h sys/reg.h sys/sem.h sys/shm.h sys/signalfd.h sys/xattr.h ustat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -10069,7 +10069,7 @@
 
 fi
 
-        ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_NONE" "ac_cv_have_decl_BTRFS_COMPRESS_NONE" " #include <stdio.h>
+	ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_NONE" "ac_cv_have_decl_BTRFS_COMPRESS_NONE" " #include <stdio.h>
 #include <linux/btrfs.h>
 "
 if test "x$ac_cv_have_decl_BTRFS_COMPRESS_NONE" = xyes; then :
@@ -12182,7 +12182,7 @@
   st_cv_SIGRTMIN="$(echo SIGRTMIN |
 			$CPP $CPPFLAGS -P -imacros asm/signal.h - |
 			grep '^[0-9]')"
-	         test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no
+		 test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_SIGRTMIN" >&5
 $as_echo "$st_cv_SIGRTMIN" >&6; }
@@ -12201,7 +12201,7 @@
   st_cv_SA_RESTORER="$(echo SA_RESTORER |
 			$CPP $CPPFLAGS -P -imacros asm/signal.h - |
 			grep ^0x)"
-	        test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no
+		test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_SA_RESTORER" >&5
 $as_echo "$st_cv_SA_RESTORER" >&6; }
@@ -12245,6 +12245,38 @@
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for program_invocation_name" >&5
+$as_echo_n "checking for program_invocation_name... " >&6; }
+if ${st_cv_have_program_invocation_name+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+int
+main ()
+{
+return !*program_invocation_name
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  st_cv_have_program_invocation_name=yes
+else
+  st_cv_have_program_invocation_name=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_have_program_invocation_name" >&5
+$as_echo "$st_cv_have_program_invocation_name" >&6; }
+if test "x$st_cv_have_program_invocation_name" = xyes; then
+
+$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in -ldl" >&5
 $as_echo_n "checking for dladdr in -ldl... " >&6; }
 if ${ac_cv_lib_dl_dladdr+:} false; then :
@@ -12342,11 +12374,11 @@
 # Check whether --with-libunwind was given.
 if test "${with_libunwind+set}" = set; then :
   withval=$with_libunwind; case "${withval}" in
-             yes|no|check) ;;
-             *) with_libunwind=yes
-                libunwind_CPPFLAGS="-I${withval}/include"
-                libunwind_LDFLAGS="-L${withval}/lib" ;;
-             esac
+	     yes|no|check) ;;
+	     *) with_libunwind=yes
+		libunwind_CPPFLAGS="-I${withval}/include"
+		libunwind_LDFLAGS="-L${withval}/lib" ;;
+	     esac
 else
   with_libunwind=check
 
@@ -12366,16 +12398,16 @@
 #define HAVE_LIBUNWIND_PTRACE_H 1
 _ACEOF
  saved_LDFLAGS="$LDFLAGS"
-          LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
+	  LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
 
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lunwind" >&5
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lunwind" >&5
 $as_echo_n "checking for backtrace in -lunwind... " >&6; }
 if ${ac_cv_lib_unwind_backtrace+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lunwind $libunwind_LIBS
-           $LIBS"
+	   $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -12408,12 +12440,12 @@
 if test "x$ac_cv_lib_unwind_backtrace" = xyes; then :
   libunwind_LIBS="-lunwind $libunwind_LIBS"
 
-             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_create_addr_space in libunwind-generic" >&5
+	     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_create_addr_space in libunwind-generic" >&5
 $as_echo_n "checking for unw_create_addr_space in libunwind-generic... " >&6; }
-             saved_LIBS="$LIBS"
-             LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
+	     saved_LIBS="$LIBS"
+	     LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
 
-             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <libunwind-ptrace.h>
 int
@@ -12428,16 +12460,16 @@
 if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-                libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
+		libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
 
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _UPT_create in -lunwind-ptrace" >&5
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _UPT_create in -lunwind-ptrace" >&5
 $as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; }
 if ${ac_cv_lib_unwind_ptrace__UPT_create+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lunwind-ptrace $libunwind_LIBS
-                 $LIBS"
+		 $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -12469,15 +12501,15 @@
 $as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; }
 if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = xyes; then :
   libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
-                   use_libunwind=yes
+		   use_libunwind=yes
 
 else
   if test "x$with_libunwind" != xcheck; then
-                     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+		     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to find _UPT_create in libunwind-ptrace
 See \`config.log' for more details" "$LINENO" 5; }
-                   fi
+		   fi
 
 fi
 
@@ -12485,40 +12517,40 @@
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-                if test "x$with_libunwind" != xcheck; then
-                  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+		if test "x$with_libunwind" != xcheck; then
+		  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to find unw_create_addr_space in libunwind-generic
 See \`config.log' for more details" "$LINENO" 5; }
-                fi
+		fi
 
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
-             LIBS="$saved_LIBS"
+	     LIBS="$saved_LIBS"
 
 else
   if test "x$with_libunwind" != xcheck; then
-               { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+	       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to find libunwind
 See \`config.log' for more details" "$LINENO" 5; }
-             fi
+	     fi
 
 fi
 
 
-          LDFLAGS="$saved_LDFLAGS"
+	  LDFLAGS="$saved_LDFLAGS"
 
 else
   if test "x$with_libunwind" != xcheck; then
-            { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+	    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to find libunwind-ptrace.h
 See \`config.log' for more details" "$LINENO" 5; }
-          fi
+	  fi
 
 
 fi
@@ -14198,7 +14230,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by strace $as_me 4.17, which was
+This file was extended by strace $as_me 4.18, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14265,7 +14297,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-strace config.status 4.17
+strace config.status 4.18
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 620a33b..eb7b0e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@
 	[strace],
 	[https://strace.io])
 m4_define([copyright_year], m4_esyscmd([./copyright-year-gen .year]))
-AC_COPYRIGHT([Copyright (C) 1999-]copyright_year[ The strace developers.])
+AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
 AC_CONFIG_SRCDIR([strace.c])
 AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_HEADERS([config.h])
@@ -283,6 +283,7 @@
 	signalfd
 	stpcpy
 	strerror
+	strndup
 	strsignal
 	sync_file_range
 	utimensat
@@ -366,11 +367,13 @@
 	linux/falloc.h
 	linux/fiemap.h
 	linux/filter.h
+	linux/genetlink.h
 	linux/hiddev.h
 	linux/ip_vs.h
 	linux/ipc.h
 	linux/mmtimer.h
 	linux/msg.h
+	linux/netfilter/nfnetlink.h
 	linux/nsfs.h
 	linux/perf_event.h
 	linux/quota.h
@@ -487,8 +490,8 @@
 		struct btrfs_ioctl_search_args_v2.buf_size
 		]),,, [ #include <stdio.h>
 #include <linux/btrfs.h>])
-        AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB,
-	                        BTRFS_COMPRESS_LZO]),,,[ #include <stdio.h>
+	AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB,
+				BTRFS_COMPRESS_LZO]),,,[ #include <stdio.h>
 #include <linux/btrfs.h>])])
 
 AC_CHECK_DECLS([sys_errlist])
@@ -682,7 +685,7 @@
 	       [[st_cv_SIGRTMIN="$(echo SIGRTMIN |
 			$CPP $CPPFLAGS -P -imacros asm/signal.h - |
 			grep '^[0-9]')"
-	         test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]])
+		 test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no]])
 if test "x$st_cv_SIGRTMIN" != xno; then
 	AC_DEFINE_UNQUOTED([ASM_SIGRTMIN], [$st_cv_SIGRTMIN],
 			   [SIGRTMIN defined in <asm/signal.h>])
@@ -691,7 +694,7 @@
 	       [st_cv_SA_RESTORER="$(echo SA_RESTORER |
 			$CPP $CPPFLAGS -P -imacros asm/signal.h - |
 			grep ^0x)"
-	        test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no])
+		test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no])
 if test "x$st_cv_SA_RESTORER" != xno; then
 	AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_SA_RESTORER],
 			   [SA_RESTORER defined in <asm/signal.h>])
@@ -706,6 +709,16 @@
 		  [Define to 1 if the system provides __builtin_popcount function])
 fi
 
+AC_CACHE_CHECK([for program_invocation_name], [st_cv_have_program_invocation_name],
+	       [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]],
+						[[return !*program_invocation_name]])],
+			       [st_cv_have_program_invocation_name=yes],
+			       [st_cv_have_program_invocation_name=no])])
+if test "x$st_cv_have_program_invocation_name" = xyes; then
+	AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
+		  [Define to 1 if the system provides program_invocation_name variable])
+fi
+
 AC_CHECK_LIB([dl], [dladdr], [dl_LIBS='-ldl'], [dl_LIBS=])
 if test "x$ac_cv_lib_dl_dladdr" = xyes; then
 	AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if the system provides dladdr])
@@ -719,15 +732,15 @@
 libunwind_LDFLAGS=
 libunwind_LIBS=
 AC_ARG_WITH([libunwind],
-            [AS_HELP_STRING([--with-libunwind],
-                            [use libunwind to implement stack tracing support])],
-            [case "${withval}" in
-             yes|no|check) ;;
-             *) with_libunwind=yes
-                libunwind_CPPFLAGS="-I${withval}/include"
-                libunwind_LDFLAGS="-L${withval}/lib" ;;
-             esac],
-            [with_libunwind=check]
+	    [AS_HELP_STRING([--with-libunwind],
+			    [use libunwind to implement stack tracing support])],
+	    [case "${withval}" in
+	     yes|no|check) ;;
+	     *) with_libunwind=yes
+		libunwind_CPPFLAGS="-I${withval}/include"
+		libunwind_LDFLAGS="-L${withval}/lib" ;;
+	     esac],
+	    [with_libunwind=check]
 )
 
 use_libunwind=no
@@ -736,56 +749,56 @@
        CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS"
 
        AC_CHECK_HEADERS([libunwind-ptrace.h],
-         [saved_LDFLAGS="$LDFLAGS"
-          LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
+	 [saved_LDFLAGS="$LDFLAGS"
+	  LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
 
-          AC_CHECK_LIB([unwind], [backtrace],
-            [libunwind_LIBS="-lunwind $libunwind_LIBS"
+	  AC_CHECK_LIB([unwind], [backtrace],
+	    [libunwind_LIBS="-lunwind $libunwind_LIBS"
 
-             AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic])
-             saved_LIBS="$LIBS"
-             LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
+	     AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic])
+	     saved_LIBS="$LIBS"
+	     LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
 
-             AC_LINK_IFELSE(
-               [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]],
-                                [[return !unw_create_addr_space(0, 0)]])
-               ],
-               [AC_MSG_RESULT([yes])
-                libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
+	     AC_LINK_IFELSE(
+	       [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]],
+				[[return !unw_create_addr_space(0, 0)]])
+	       ],
+	       [AC_MSG_RESULT([yes])
+		libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
 
-                AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
-                  [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
-                   use_libunwind=yes
-                  ],
-                  [if test "x$with_libunwind" != xcheck; then
-                     AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace])
-                   fi
-                  ],
-                  [$libunwind_LIBS]
-                )
-               ],
-               [AC_MSG_RESULT([no])
-                if test "x$with_libunwind" != xcheck; then
-                  AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic])
-                fi
-               ]
-             )
+		AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
+		  [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
+		   use_libunwind=yes
+		  ],
+		  [if test "x$with_libunwind" != xcheck; then
+		     AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace])
+		   fi
+		  ],
+		  [$libunwind_LIBS]
+		)
+	       ],
+	       [AC_MSG_RESULT([no])
+		if test "x$with_libunwind" != xcheck; then
+		  AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic])
+		fi
+	       ]
+	     )
 
-             LIBS="$saved_LIBS"
-            ],
-            [if test "x$with_libunwind" != xcheck; then
-               AC_MSG_FAILURE([failed to find libunwind])
-             fi
-            ],
-            [$libunwind_LIBS]
-          )
+	     LIBS="$saved_LIBS"
+	    ],
+	    [if test "x$with_libunwind" != xcheck; then
+	       AC_MSG_FAILURE([failed to find libunwind])
+	     fi
+	    ],
+	    [$libunwind_LIBS]
+	  )
 
-          LDFLAGS="$saved_LDFLAGS"
-         ],
-         [if test "x$with_libunwind" != xcheck; then
-            AC_MSG_FAILURE([failed to find libunwind-ptrace.h])
-          fi
-         ]
+	  LDFLAGS="$saved_LDFLAGS"
+	 ],
+	 [if test "x$with_libunwind" != xcheck; then
+	    AC_MSG_FAILURE([failed to find libunwind-ptrace.h])
+	  fi
+	 ]
        )
 
        CPPFLAGS="$saved_CPPFLAGS"
diff --git a/count.c b/count.c
index 1af9336..f5e4f12 100644
--- a/count.c
+++ b/count.c
@@ -77,7 +77,7 @@
 			/* Initialize it.  */
 			struct itimerval it;
 
-			memset(&it, 0, sizeof it);
+			memset(&it, 0, sizeof(it));
 			it.it_interval.tv_usec = 1;
 			setitimer(ITIMER_REAL, &it, NULL);
 			getitimer(ITIMER_REAL, &it);
diff --git a/debian/changelog b/debian/changelog
index d891a6f..25dcc0f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,14 @@
-strace (4.17-1) experimental; urgency=low
+strace (4.18-1) experimental; urgency=low
 
-  * strace 4.17 snapshot.
+  * strace 4.18 snapshot.
 
- -- Strace <strace-devel@lists.sourceforge.net>  Thu, 25 May 2017 15:09:49 -0700
+ -- Strace <strace-devel@lists.sourceforge.net>  Wed, 05 Jul 2017 07:35:28 +0000
+
+strace (4.17-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Dmitry V. Levin <ldv@altlinux.org>  Wed, 24 May 2017 16:17:18 +0000
 
 strace (4.16-1) unstable; urgency=medium
 
diff --git a/debian/changelog.in b/debian/changelog.in
index 8aab9d9..1b28572 100644
--- a/debian/changelog.in
+++ b/debian/changelog.in
@@ -4,6 +4,12 @@
 
  -- Strace <@PACKAGE_BUGREPORT@>  @DEB_CHANGELOGTIME@
 
+strace (4.17-1) unstable; urgency=medium
+
+  * New upstream version.
+
+ -- Dmitry V. Levin <ldv@altlinux.org>  Wed, 24 May 2017 16:17:18 +0000
+
 strace (4.16-1) unstable; urgency=medium
 
   * New upstream version.
diff --git a/debian/copyright b/debian/copyright
index fd35507..e227efd 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -10,7 +10,7 @@
 Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
 Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
 Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
-Copyright (C) 1998-2003 Wichert Akkerman <wakkerma@deephackmode.org>
+Copyright (c) 1998-2003 Wichert Akkerman <wakkerma@deephackmode.org>
 Copyright (c) 2002-2008 Roland McGrath  <roland@redhat.com>
 Copyright (c) 2003-2008 Dmitry V. Levin <ldv@altlinux.org>
 Copyright (c) 2007-2008 Jan Kratochvil  <jan.kratochvil@redhat.com>
diff --git a/defs.h b/defs.h
index fb3a603..b3a315f 100644
--- a/defs.h
+++ b/defs.h
@@ -2,7 +2,7 @@
  * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
- * Copyright (C) 2001-2017 The strace developers.
+ * Copyright (c) 2001-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,8 +54,9 @@
 #include <sys/time.h>
 
 #include "kernel_types.h"
-#include "mpers_type.h"
 #include "gcc_compat.h"
+#include "macros.h"
+#include "mpers_type.h"
 #include "sysent.h"
 
 #ifndef HAVE_STRERROR
@@ -75,8 +76,6 @@
 	(offsetof(type, member) + sizeof(((type *)NULL)->member))
 #endif
 
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]) + MUST_BE_ARRAY(a))
-
 /* macros */
 #ifndef MAX
 # define MAX(a, b)		(((a) > (b)) ? (a) : (b))
@@ -106,7 +105,7 @@
  *
  * Make sure that all entries in all syscallent.h files have nargs <= MAX_ARGS!
  * linux/<ARCH>/syscallent*.h:
- * 	all have nargs <= 6 except mips o32 which has nargs <= 7.
+ *	all have nargs <= 6 except mips o32 which has nargs <= 7.
  */
 #ifndef MAX_ARGS
 # ifdef LINUX_MIPSO32
@@ -234,11 +233,11 @@
 	struct timeval etime;	/* Syscall entry time */
 
 #ifdef USE_LIBUNWIND
-	struct UPT_info* libunwind_ui;
-	struct mmap_cache_t* mmap_cache;
+	struct UPT_info *libunwind_ui;
+	struct mmap_cache_t *mmap_cache;
 	unsigned int mmap_cache_size;
 	unsigned int mmap_cache_generation;
-	struct queue_t* queue;
+	struct queue_t *queue;
 #endif
 };
 
@@ -249,17 +248,13 @@
 /*
  * Are we in system call entry or in syscall exit?
  *
- * This bit is set after all syscall entry processing is done.
- * Therefore, this bit will be set when next ptrace stop occurs,
- * which should be syscall exit stop. Other stops which are possible
- * directly after syscall entry (death, ptrace event stop)
- * are simpler and handled without calling trace_syscall(), therefore
- * the places where TCB_INSYSCALL can be set but we aren't in syscall stop
- * are limited to trace(), this condition is never observed in trace_syscall()
- * and below.
- * The bit is cleared after all syscall exit processing is done.
+ * This bit is set in syscall_entering_finish() and cleared in
+ * syscall_exiting_finish().
+ * Other stops which are possible directly after syscall entry (death, ptrace
+ * event stop) are handled without calling syscall_{entering,exiting}_*().
  *
- * Use entering(tcp) / exiting(tcp) to check this bit to make code more readable.
+ * Use entering(tcp) / exiting(tcp) to check this bit to make code more
+ * readable.
  */
 #define TCB_INSYSCALL	0x04
 #define TCB_ATTACHED	0x08	/* We attached to it already */
@@ -295,7 +290,9 @@
 extern const struct xlat at_flags[];
 extern const struct xlat clocknames[];
 extern const struct xlat dirent_types[];
+extern const struct xlat ethernet_protocols[];
 extern const struct xlat evdev_abs[];
+extern const struct xlat inet_protocols[];
 extern const struct xlat msg_flags[];
 extern const struct xlat netlink_protocols[];
 extern const struct xlat open_access_modes[];
@@ -304,6 +301,7 @@
 extern const struct xlat setns_types[];
 extern const struct xlat sg_io_info[];
 extern const struct xlat socketlayers[];
+extern const struct xlat socktypes[];
 extern const struct xlat whence_codes[];
 
 /* Format of syscall return values */
@@ -384,7 +382,7 @@
 extern unsigned max_strlen;
 extern unsigned os_release;
 #undef KERNEL_VERSION
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
 
 void error_msg(const char *fmt, ...) ATTRIBUTE_FORMAT((printf, 1, 2));
 void perror_msg(const char *fmt, ...) ATTRIBUTE_FORMAT((printf, 1, 2));
@@ -394,7 +392,6 @@
 	ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
 void perror_msg_and_die(const char *fmt, ...)
 	ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
-void die_out_of_memory(void) ATTRIBUTE_NORETURN;
 
 void *xmalloc(size_t size) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1));
 void *xcalloc(size_t nmemb, size_t size)
@@ -402,13 +399,22 @@
 void *xreallocarray(void *ptr, size_t nmemb, size_t size)
 	ATTRIBUTE_ALLOC_SIZE((2, 3));
 char *xstrdup(const char *str) ATTRIBUTE_MALLOC;
+char *xstrndup(const char *str, size_t n) ATTRIBUTE_MALLOC;
 
 extern int read_int_from_file(const char *, int *);
 
 extern void set_sortby(const char *);
 extern void set_overhead(int);
 extern void print_pc(struct tcb *);
-extern int trace_syscall(struct tcb *, unsigned int *);
+
+extern int syscall_entering_decode(struct tcb *);
+extern int syscall_entering_trace(struct tcb *, unsigned int *);
+extern void syscall_entering_finish(struct tcb *, int);
+
+extern int syscall_exiting_decode(struct tcb *, struct timeval *);
+extern int syscall_exiting_trace(struct tcb *, struct timeval, int);
+extern void syscall_exiting_finish(struct tcb *);
+
 extern void count_syscall(struct tcb *, const struct timeval *);
 extern void call_summary(FILE *);
 
@@ -446,28 +452,28 @@
 }
 
 extern int
-umoven(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, void *laddr);
+umoven(struct tcb *, kernel_ulong_t addr, unsigned int len, void *laddr);
 #define umove(pid, addr, objp)	\
 	umoven((pid), (addr), sizeof(*(objp)), (void *) (objp))
 
 extern int
-umoven_or_printaddr(struct tcb *tcp, kernel_ulong_t addr,
+umoven_or_printaddr(struct tcb *, kernel_ulong_t addr,
 		    unsigned int len, void *laddr);
 #define umove_or_printaddr(pid, addr, objp)	\
 	umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
 
 extern int
-umoven_or_printaddr_ignore_syserror(struct tcb *tcp, kernel_ulong_t addr,
+umoven_or_printaddr_ignore_syserror(struct tcb *, kernel_ulong_t addr,
 				    unsigned int len, void *laddr);
 
 extern int
-umovestr(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, char *laddr);
+umovestr(struct tcb *, kernel_ulong_t addr, unsigned int len, char *laddr);
 
 extern int upeek(int pid, unsigned long, kernel_ulong_t *);
 extern int upoke(int pid, unsigned long, kernel_ulong_t);
 
 extern bool
-print_array(struct tcb *tcp,
+print_array(struct tcb *,
 	    kernel_ulong_t start_addr,
 	    size_t nmemb,
 	    void *elem_buf,
@@ -494,11 +500,20 @@
 extern void pathtrace_select(const char *);
 extern int pathtrace_match(struct tcb *);
 extern int getfdpath(struct tcb *, int, char *, unsigned);
+extern unsigned long getfdinode(struct tcb *, int);
 extern enum sock_proto getfdproto(struct tcb *, int);
 
 extern const char *xlookup(const struct xlat *, const uint64_t);
 extern const char *xlat_search(const struct xlat *, const size_t, const uint64_t);
 
+struct dyxlat;
+struct dyxlat *dyxlat_alloc(size_t nmemb);
+void dyxlat_free(struct dyxlat *);
+const struct xlat *dyxlat_get(const struct dyxlat *);
+void dyxlat_add_pair(struct dyxlat *, uint64_t val, const char *str, size_t len);
+
+const struct xlat *genl_families_xlat(void);
+
 extern unsigned long get_pagesize(void);
 extern int
 string_to_uint_ex(const char *str, char **endptr,
@@ -511,10 +526,24 @@
 }
 extern int next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits);
 
-#define QUOTE_0_TERMINATED                      0x01
-#define QUOTE_OMIT_LEADING_TRAILING_QUOTES      0x02
-#define QUOTE_OMIT_TRAILING_0                   0x08
-#define QUOTE_FORCE_HEX                         0x10
+/*
+ * Returns STR if it does not start with PREFIX,
+ * or a pointer to the first char in STR after PREFIX.
+ * The length of PREFIX is specified by PREFIX_LEN.
+ */
+static inline const char *
+str_strip_prefix_len(const char *str, const char *prefix, size_t prefix_len)
+{
+	return strncmp(str, prefix, prefix_len) ? str : str + prefix_len;
+}
+
+#define STR_STRIP_PREFIX(str, prefix)	\
+	str_strip_prefix_len((str), (prefix), sizeof(prefix) - 1)
+
+#define QUOTE_0_TERMINATED			0x01
+#define QUOTE_OMIT_LEADING_TRAILING_QUOTES	0x02
+#define QUOTE_OMIT_TRAILING_0			0x08
+#define QUOTE_FORCE_HEX				0x10
 
 extern int string_quote(const char *, char *, unsigned int, unsigned int);
 extern int print_quoted_string(const char *, unsigned int, unsigned int);
@@ -523,10 +552,10 @@
  * b refers to the higher numbered u_arg
  */
 #ifdef WORDS_BIGENDIAN
-# define ULONG_LONG(a,b) \
+# define ULONG_LONG(a, b) \
 	((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32))
 #else
-# define ULONG_LONG(a,b) \
+# define ULONG_LONG(a, b) \
 	((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32))
 #endif
 extern int getllval(struct tcb *, unsigned long long *, int);
@@ -545,7 +574,8 @@
 extern int printargs_d(struct tcb *);
 
 extern void addflags(const struct xlat *, uint64_t);
-extern int printflags64(const struct xlat *, uint64_t, const char *);
+extern int printflags_ex(uint64_t, const char *, const struct xlat *, ...)
+	ATTRIBUTE_SENTINEL;
 extern const char *sprintflags(const char *, const struct xlat *, uint64_t);
 extern const char *sprinttime(long long sec);
 extern const char *sprinttime_nsec(long long sec, unsigned long long nsec);
@@ -581,9 +611,11 @@
 #define TIMESPEC_TEXT_BUFSIZE \
 		(sizeof(long long) * 3 * 2 + sizeof("{tv_sec=-, tv_nsec=}"))
 extern void printfd(struct tcb *, int);
-extern void print_sockaddr(struct tcb *tcp, const void *, int);
-extern bool print_sockaddr_by_inode(const unsigned long, const enum sock_proto);
-extern bool print_sockaddr_by_inode_cached(const unsigned long);
+extern void print_sockaddr(struct tcb *, const void *sa, int len);
+extern bool
+print_inet_addr(int af, const void *addr, unsigned int len, const char *var_name);
+extern const char *get_sockaddr_by_inode(struct tcb *, int fd, unsigned long inode);
+extern bool print_sockaddr_by_inode(struct tcb *, int fd, unsigned long inode);
 extern void print_dirfd(struct tcb *, int);
 
 extern int
@@ -606,7 +638,7 @@
 		enum iov_decode, kernel_ulong_t data_size);
 
 extern void
-decode_netlink(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len);
+decode_netlink(struct tcb *, int fd, kernel_ulong_t addr, kernel_ulong_t len);
 
 extern void tprint_open_modes(unsigned int);
 extern const char *sprint_open_modes(unsigned int);
@@ -618,7 +650,7 @@
 print_seccomp_fprog(struct tcb *, kernel_ulong_t addr, unsigned short len);
 
 struct strace_stat;
-extern void print_struct_stat(struct tcb *tcp, const struct strace_stat *const st);
+extern void print_struct_stat(struct tcb *, const struct strace_stat *const st);
 
 struct strace_statfs;
 
@@ -655,6 +687,17 @@
 
 extern int decode_sg_io_v4(struct tcb *, const kernel_ulong_t arg);
 
+struct nlmsghdr;
+
+typedef bool (*netlink_decoder_t)(struct tcb *, const struct nlmsghdr *,
+				  kernel_ulong_t addr, kernel_ulong_t len);
+
+#define DECL_NETLINK(name)						\
+extern bool								\
+decode_netlink_ ## name(struct tcb *, const struct nlmsghdr *,		\
+			kernel_ulong_t addr, kernel_ulong_t len)
+DECL_NETLINK(sock_diag);
+
 extern int tv_nz(const struct timeval *);
 extern int tv_cmp(const struct timeval *, const struct timeval *);
 extern double tv_float(const struct timeval *);
@@ -665,11 +708,11 @@
 
 #ifdef USE_LIBUNWIND
 extern void unwind_init(void);
-extern void unwind_tcb_init(struct tcb *tcp);
-extern void unwind_tcb_fin(struct tcb *tcp);
-extern void unwind_cache_invalidate(struct tcb* tcp);
-extern void unwind_print_stacktrace(struct tcb* tcp);
-extern void unwind_capture_stacktrace(struct tcb* tcp);
+extern void unwind_tcb_init(struct tcb *);
+extern void unwind_tcb_fin(struct tcb *);
+extern void unwind_cache_invalidate(struct tcb *);
+extern void unwind_print_stacktrace(struct tcb *);
+extern void unwind_capture_stacktrace(struct tcb *);
 #endif
 
 static inline void
@@ -685,6 +728,12 @@
 }
 
 static inline int
+printflags64(const struct xlat *x, uint64_t flags, const char *dflt)
+{
+	return printflags_ex(flags, dflt, x, NULL);
+}
+
+static inline int
 printflags(const struct xlat *x, unsigned int flags, const char *dflt)
 {
 	return printflags64(x, flags, dflt);
@@ -716,10 +765,10 @@
 
 extern void print_timeval32_t(const timeval32_t *);
 extern void printrusage32(struct tcb *, kernel_ulong_t);
-extern const char *sprint_timeval32(struct tcb *tcp, kernel_ulong_t);
-extern void print_timeval32(struct tcb *tcp, kernel_ulong_t);
-extern void print_timeval32_utimes(struct tcb *tcp, kernel_ulong_t);
-extern void print_itimerval32(struct tcb *tcp, kernel_ulong_t);
+extern const char *sprint_timeval32(struct tcb *, kernel_ulong_t addr);
+extern void print_timeval32(struct tcb *, kernel_ulong_t addr);
+extern void print_timeval32_utimes(struct tcb *, kernel_ulong_t addr);
+extern void print_itimerval32(struct tcb *, kernel_ulong_t addr);
 #endif
 
 #ifdef HAVE_STRUCT_USER_DESC
diff --git a/desc.c b/desc.c
index d52afc4..52e58c8 100644
--- a/desc.c
+++ b/desc.c
@@ -164,8 +164,7 @@
 						);
 						first = 0;
 						sep = ", ";
-					}
-					else {
+					} else {
 						outptr += sprintf(outptr, " %u", j);
 					}
 				}
diff --git a/dirent.c b/dirent.c
index d413ed6..71963ec 100644
--- a/dirent.c
+++ b/dirent.c
@@ -133,7 +133,7 @@
 				d->d_reclen);
 
 			if (print_quoted_string(d->d_name, d_name_len,
-					        QUOTE_0_TERMINATED) > 0) {
+						QUOTE_0_TERMINATED) > 0) {
 				tprints("...");
 			}
 
diff --git a/dirent64.c b/dirent64.c
index e2a4253..d54cb9e 100644
--- a/dirent64.c
+++ b/dirent64.c
@@ -106,7 +106,7 @@
 
 			tprints(", d_name=");
 			if (print_quoted_string(d->d_name, d_name_len,
-					        QUOTE_0_TERMINATED) > 0) {
+						QUOTE_0_TERMINATED) > 0) {
 				tprints("...");
 			}
 
diff --git a/dm.c b/dm.c
index 26dcb22..2413626 100644
--- a/dm.c
+++ b/dm.c
@@ -374,7 +374,7 @@
 
 static void
 dm_decode_dm_target_msg(struct tcb *const tcp, const kernel_ulong_t addr,
-		        const struct dm_ioctl *const ioc)
+			const struct dm_ioctl *const ioc)
 {
 	if (ioc->data_start == ioc->data_size)
 		return;
diff --git a/dyxlat.c b/dyxlat.c
new file mode 100644
index 0000000..ef6bef4
--- /dev/null
+++ b/dyxlat.c
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2017 The strace developers.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "defs.h"
+
+struct dyxlat {
+	size_t used;
+	size_t allocated;
+	struct xlat *xlat;
+};
+
+#define MARK_END(xlat)				\
+	do {					\
+		(xlat).val = 0;			\
+		(xlat).str = 0;			\
+	} while (0)
+
+struct dyxlat *
+dyxlat_alloc(const size_t nmemb)
+{
+	struct dyxlat *const dyxlat = xmalloc(sizeof(*dyxlat));
+
+	dyxlat->used = 1;
+	dyxlat->allocated = nmemb ? nmemb : 16;
+	dyxlat->xlat = xcalloc(dyxlat->allocated, sizeof(struct xlat));
+	MARK_END(dyxlat->xlat[0]);
+
+	return dyxlat;
+}
+
+void
+dyxlat_free(struct dyxlat *const dyxlat)
+{
+	size_t i;
+
+	for (i = 0; i < dyxlat->used - 1; ++i) {
+		free((void *) dyxlat->xlat[i].str);
+		dyxlat->xlat[i].str = NULL;
+	}
+
+	free(dyxlat->xlat);
+	dyxlat->xlat = NULL;
+	free(dyxlat);
+}
+
+const struct xlat *
+dyxlat_get(const struct dyxlat *const dyxlat)
+{
+	return dyxlat->xlat;
+}
+
+void
+dyxlat_add_pair(struct dyxlat *const dyxlat, const uint64_t val,
+		const char *const str, const size_t len)
+{
+	size_t i;
+
+	for (i = 0; i < dyxlat->used - 1; ++i) {
+		if (dyxlat->xlat[i].val == val) {
+			if (strncmp(dyxlat->xlat[i].str, str, len) == 0
+			    && dyxlat->xlat[i].str[len] == '\0')
+				return;
+
+			free((void *) dyxlat->xlat[i].str);
+			dyxlat->xlat[i].str = xstrndup(str, len);
+			return;
+		}
+	}
+
+	if (dyxlat->used >= dyxlat->allocated) {
+		dyxlat->allocated *= 2;
+		dyxlat->xlat = xreallocarray(dyxlat->xlat, dyxlat->allocated,
+					     sizeof(struct xlat));
+	}
+
+	dyxlat->xlat[dyxlat->used - 1].val = val;
+	dyxlat->xlat[dyxlat->used - 1].str = xstrndup(str, len);
+	MARK_END(dyxlat->xlat[dyxlat->used]);
+	dyxlat->used++;
+}
diff --git a/evdev.c b/evdev.c
index 6874551..983bf14 100644
--- a/evdev.c
+++ b/evdev.c
@@ -517,7 +517,7 @@
 MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *const tcp,
 		   const unsigned int code, const kernel_ulong_t arg)
 {
-	switch(_IOC_DIR(code)) {
+	switch (_IOC_DIR(code)) {
 		case _IOC_READ:
 			if (entering(tcp))
 				return 0;
diff --git a/fetch_struct_statfs.c b/fetch_struct_statfs.c
index 454e5b4..4fba0f7 100644
--- a/fetch_struct_statfs.c
+++ b/fetch_struct_statfs.c
@@ -84,7 +84,7 @@
 {
 	struct_statfs64 b;
 
-        if (sizeof(b) != size
+	if (sizeof(b) != size
 #ifdef COMPAT_STATFS64_PADDED_SIZE
 	    && sizeof(b) != COMPAT_STATFS64_PADDED_SIZE
 #endif
diff --git a/file_ioctl.c b/file_ioctl.c
index fec2f69..cc2378f 100644
--- a/file_ioctl.c
+++ b/file_ioctl.c
@@ -36,11 +36,11 @@
 #endif
 
 #ifndef FICLONE
-# define FICLONE         _IOW(0x94, 9, int)
+# define FICLONE	_IOW(0x94, 9, int)
 #endif
 
 #ifndef FICLONERANGE
-# define FICLONERANGE    _IOW(0x94, 13, struct file_clone_range)
+# define FICLONERANGE	_IOW(0x94, 13, struct file_clone_range)
 struct file_clone_range {
 	int64_t src_fd;
 	uint64_t src_offset;
@@ -50,7 +50,7 @@
 #endif
 
 #ifndef FIDEDUPERANGE
-# define FIDEDUPERANGE   _IOWR(0x94, 54, struct file_dedupe_range)
+# define FIDEDUPERANGE	_IOWR(0x94, 54, struct file_dedupe_range)
 struct file_dedupe_range_info {
 	int64_t dest_fd;	/* in - destination file */
 	uint64_t dest_offset;	/* in - start of extent in destination */
diff --git a/gcc_compat.h b/gcc_compat.h
index 08e8117..956aff1 100644
--- a/gcc_compat.h
+++ b/gcc_compat.h
@@ -84,7 +84,7 @@
 #if GNUC_PREREQ(4, 1)
 # define ALIGNOF(t_)	__alignof__(t_)
 #else
-# define ALIGNOF(t_)	(sizeof(struct {char x_; t_ y_;}) - sizeof(t_))
+# define ALIGNOF(t_)	(sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
 #endif
 
 #if GNUC_PREREQ(4, 3)
diff --git a/io.c b/io.c
index acac455..9ce1cf5 100644
--- a/io.c
+++ b/io.c
@@ -70,7 +70,7 @@
 	kernel_ulong_t iov_buf[2], len;
 	struct print_iovec_config *c = data;
 
-        if (elem_size < sizeof(iov_buf)) {
+	if (elem_size < sizeof(iov_buf)) {
 		iov_buf[0] = ((unsigned int *) elem_buf)[0];
 		iov_buf[1] = ((unsigned int *) elem_buf)[1];
 		iov = iov_buf;
@@ -95,7 +95,8 @@
 				len = c->data_size;
 			if (c->data_size != (kernel_ulong_t) -1)
 				c->data_size -= len;
-			decode_netlink(tcp, iov[0], len);
+			/* assume that the descriptor is 1st syscall argument */
+			decode_netlink(tcp, tcp->u_arg[0], iov[0], len);
 			break;
 		default:
 			printaddr(iov[0]);
@@ -117,8 +118,9 @@
 		const kernel_ulong_t data_size)
 {
 	kernel_ulong_t iov[2];
-	struct print_iovec_config config =
-		{ .decode_iov = decode_iov, .data_size = data_size };
+	struct print_iovec_config config = {
+		.decode_iov = decode_iov, .data_size = data_size
+	};
 
 	print_array(tcp, addr, len, iov, current_wordsize * 2,
 		    umoven_or_printaddr_ignore_syserror, print_iovec, &config);
diff --git a/ioctlsort.c b/ioctlsort.c
index 9bab978..932c667 100644
--- a/ioctlsort.c
+++ b/ioctlsort.c
@@ -56,7 +56,7 @@
 }
 
 static int
-compare_name_info(const void* a, const void* b)
+compare_name_info(const void *a, const void *b)
 {
 	int rc;
 
@@ -93,7 +93,7 @@
 }
 
 static int
-compare_code_name(const void* a, const void* b)
+compare_code_name(const void *a, const void *b)
 {
 	unsigned int code1 = code((struct ioctlent *) a);
 	unsigned int code2 = code((struct ioctlent *) b);
diff --git a/ipc_defs.h b/ipc_defs.h
index fc5d88f..740fd9d 100644
--- a/ipc_defs.h
+++ b/ipc_defs.h
@@ -41,8 +41,11 @@
 # define IPC_64 0x100
 #endif
 
-#define PRINTCTL(flagset, arg, dflt) \
-	if ((arg) & IPC_64) tprints("IPC_64|"); \
-	printxval((flagset), (arg) &~ IPC_64, dflt)
+#define PRINTCTL(flagset, arg, dflt)				\
+	do {							\
+		if ((arg) & IPC_64)				\
+			tprints("IPC_64|");			\
+		printxval((flagset), (arg) & ~IPC_64, dflt);	\
+	} while (0)
 
 #endif /* !STRACE_IPC_DEFS_H */
diff --git a/kcmp.c b/kcmp.c
index 8c0994b..962952b 100644
--- a/kcmp.c
+++ b/kcmp.c
@@ -40,7 +40,7 @@
 	tprintf("%d, %d, ", pid1, pid2);
 	printxval(kcmp_types, type, "KCMP_???");
 
-	switch(type) {
+	switch (type) {
 		case KCMP_FILE:
 			tprintf(", %u, %u", (unsigned) idx1, (unsigned) idx2);
 			break;
diff --git a/kexec.c b/kexec.c
index c11113d..8157cc9 100644
--- a/kexec.c
+++ b/kexec.c
@@ -44,7 +44,7 @@
 	const kernel_ulong_t *seg;
 	kernel_ulong_t seg_buf[4];
 
-        if (elem_size < sizeof(seg_buf)) {
+	if (elem_size < sizeof(seg_buf)) {
 		unsigned int i;
 
 		for (i = 0; i < ARRAY_SIZE(seg_buf); ++i)
diff --git a/linux/32/ioctls_inc_align16.h b/linux/32/ioctls_inc_align16.h
index d509dc6..c16d5a8 100644
--- a/linux/32/ioctls_inc_align16.h
+++ b/linux/32/ioctls_inc_align16.h
@@ -186,7 +186,7 @@
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
-{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 },
+{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
@@ -233,6 +233,7 @@
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2", _IOC_WRITE, 0x6469, 0x40 },
+{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2_WR", _IOC_READ|_IOC_WRITE, 0x6469, 0x40 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_APERTURE", _IOC_READ, 0x6463, 0x10 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_CACHING", _IOC_READ|_IOC_WRITE, 0x6470, 0x08 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6462, 0x10 },
@@ -487,6 +488,8 @@
 { "linux/apm_bios.h", "APM_IOC_SUSPEND", _IOC_NONE, 0x4102, 0x00 },
 { "linux/arcfb.h", "FBIO_GETCONTROL2", _IOC_READ, 0x4689, 0x04 },
 { "linux/arcfb.h", "FBIO_WAITEVENT", _IOC_NONE, 0x4688, 0x00 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_GET_SIZE", _IOC_READ|_IOC_WRITE, 0xb200, 0x10 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_MAP", _IOC_WRITE, 0xb201, 0x10 },
 { "linux/atm_eni.h", "ENI_MEMDUMP", _IOC_WRITE, 0x6160, 0x0c },
 { "linux/atm_eni.h", "ENI_SETMULT", _IOC_WRITE, 0x6167, 0x0c },
 { "linux/atm_he.h", "HE_GET_REG", _IOC_WRITE, 0x6160, 0x0c },
@@ -974,6 +977,7 @@
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 },
+{ "linux/fsmap.h", "FS_IOC_GETFSMAP", _IOC_READ|_IOC_WRITE, 0x583b, 0xc0 },
 { "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 },
@@ -1506,6 +1510,12 @@
 { "linux/omapfb.h", "OMAPFB_VSYNC", _IOC_NONE, 0x4f26, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORGO", _IOC_NONE, 0x4f3c, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORVSYNC", _IOC_NONE, 0x4f39, 0x00 },
+{ "linux/pcitest.h", "PCITEST_BAR", _IOC_NONE, 0x5001, 0x00 },
+{ "linux/pcitest.h", "PCITEST_COPY", _IOC_WRITE, 0x5006, 0x04 },
+{ "linux/pcitest.h", "PCITEST_LEGACY_IRQ", _IOC_NONE, 0x5002, 0x00 },
+{ "linux/pcitest.h", "PCITEST_MSI", _IOC_WRITE, 0x5003, 0x04 },
+{ "linux/pcitest.h", "PCITEST_READ", _IOC_WRITE, 0x5005, 0x04 },
+{ "linux/pcitest.h", "PCITEST_WRITE", _IOC_WRITE, 0x5004, 0x04 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 },
@@ -1940,6 +1950,12 @@
 { "linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", _IOC_NONE, 0x330b, 0x00 },
 { "linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", _IOC_WRITE, 0x330d, 0x0c },
 { "linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", _IOC_NONE, 0x3302, 0x00 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_CTL", _IOC_READ|_IOC_WRITE, 0x5743, 0x28 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_SUMMARY", _IOC_READ, 0x5742, 0x198 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_INFO", _IOC_READ, 0x5740, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_PART_INFO", _IOC_READ|_IOC_WRITE, 0x5741, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PFF_TO_PORT", _IOC_READ|_IOC_WRITE, 0x5744, 0x0c },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PORT_TO_PFF", _IOC_READ|_IOC_WRITE, 0x5745, 0x0c },
 { "linux/sync_file.h", "SYNC_IOC_FILE_INFO", _IOC_READ|_IOC_WRITE, 0x3e04, 0x38 },
 { "linux/sync_file.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e03, 0x30 },
 { "linux/synclink.h", "MGSL_IOCCLRMODCOUNT", _IOC_NONE, 0x6d0f, 0x00 },
@@ -1962,6 +1978,14 @@
 { "linux/synclink.h", "MGSL_IOCTXENABLE", _IOC_NONE, 0x6d04, 0x00 },
 { "linux/synclink.h", "MGSL_IOCWAITEVENT", _IOC_READ|_IOC_WRITE, 0x6d08, 0x04 },
 { "linux/synclink.h", "MGSL_IOCWAITGPIO", _IOC_READ|_IOC_WRITE, 0x6d12, 0x10 },
+{ "linux/tee.h", "TEE_IOC_CANCEL", _IOC_READ, 0xa404, 0x08 },
+{ "linux/tee.h", "TEE_IOC_CLOSE_SESSION", _IOC_READ, 0xa405, 0x04 },
+{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
+{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
+{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
 { "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
 { "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
 { "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
@@ -2690,17 +2714,8 @@
 { "staging/android/ashmem.h", "ASHMEM_SET_PROT_MASK", _IOC_WRITE, 0x7705, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_SET_SIZE", _IOC_WRITE, 0x7703, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_UNPIN", _IOC_WRITE, 0x7708, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 },
-{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
+{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x18 },
 { "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
-{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SYNC", _IOC_READ|_IOC_WRITE, 0x4907, 0x08 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
 { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
 { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
 { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
diff --git a/linux/32/ioctls_inc_align32.h b/linux/32/ioctls_inc_align32.h
index b1b0339..7caf8e8 100644
--- a/linux/32/ioctls_inc_align32.h
+++ b/linux/32/ioctls_inc_align32.h
@@ -186,7 +186,7 @@
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
-{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 },
+{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
@@ -233,6 +233,7 @@
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2", _IOC_WRITE, 0x6469, 0x40 },
+{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2_WR", _IOC_READ|_IOC_WRITE, 0x6469, 0x40 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_APERTURE", _IOC_READ, 0x6463, 0x10 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_CACHING", _IOC_READ|_IOC_WRITE, 0x6470, 0x08 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6462, 0x10 },
@@ -487,6 +488,8 @@
 { "linux/apm_bios.h", "APM_IOC_SUSPEND", _IOC_NONE, 0x4102, 0x00 },
 { "linux/arcfb.h", "FBIO_GETCONTROL2", _IOC_READ, 0x4689, 0x04 },
 { "linux/arcfb.h", "FBIO_WAITEVENT", _IOC_NONE, 0x4688, 0x00 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_GET_SIZE", _IOC_READ|_IOC_WRITE, 0xb200, 0x10 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_MAP", _IOC_WRITE, 0xb201, 0x10 },
 { "linux/atm_eni.h", "ENI_MEMDUMP", _IOC_WRITE, 0x6160, 0x0c },
 { "linux/atm_eni.h", "ENI_SETMULT", _IOC_WRITE, 0x6167, 0x0c },
 { "linux/atm_he.h", "HE_GET_REG", _IOC_WRITE, 0x6160, 0x0c },
@@ -974,6 +977,7 @@
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 },
+{ "linux/fsmap.h", "FS_IOC_GETFSMAP", _IOC_READ|_IOC_WRITE, 0x583b, 0xc0 },
 { "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 },
@@ -1506,6 +1510,12 @@
 { "linux/omapfb.h", "OMAPFB_VSYNC", _IOC_NONE, 0x4f26, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORGO", _IOC_NONE, 0x4f3c, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORVSYNC", _IOC_NONE, 0x4f39, 0x00 },
+{ "linux/pcitest.h", "PCITEST_BAR", _IOC_NONE, 0x5001, 0x00 },
+{ "linux/pcitest.h", "PCITEST_COPY", _IOC_WRITE, 0x5006, 0x04 },
+{ "linux/pcitest.h", "PCITEST_LEGACY_IRQ", _IOC_NONE, 0x5002, 0x00 },
+{ "linux/pcitest.h", "PCITEST_MSI", _IOC_WRITE, 0x5003, 0x04 },
+{ "linux/pcitest.h", "PCITEST_READ", _IOC_WRITE, 0x5005, 0x04 },
+{ "linux/pcitest.h", "PCITEST_WRITE", _IOC_WRITE, 0x5004, 0x04 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 },
@@ -1940,6 +1950,12 @@
 { "linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", _IOC_NONE, 0x330b, 0x00 },
 { "linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", _IOC_WRITE, 0x330d, 0x0c },
 { "linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", _IOC_NONE, 0x3302, 0x00 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_CTL", _IOC_READ|_IOC_WRITE, 0x5743, 0x28 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_SUMMARY", _IOC_READ, 0x5742, 0x198 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_INFO", _IOC_READ, 0x5740, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_PART_INFO", _IOC_READ|_IOC_WRITE, 0x5741, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PFF_TO_PORT", _IOC_READ|_IOC_WRITE, 0x5744, 0x0c },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PORT_TO_PFF", _IOC_READ|_IOC_WRITE, 0x5745, 0x0c },
 { "linux/sync_file.h", "SYNC_IOC_FILE_INFO", _IOC_READ|_IOC_WRITE, 0x3e04, 0x38 },
 { "linux/sync_file.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e03, 0x30 },
 { "linux/synclink.h", "MGSL_IOCCLRMODCOUNT", _IOC_NONE, 0x6d0f, 0x00 },
@@ -1962,6 +1978,14 @@
 { "linux/synclink.h", "MGSL_IOCTXENABLE", _IOC_NONE, 0x6d04, 0x00 },
 { "linux/synclink.h", "MGSL_IOCWAITEVENT", _IOC_READ|_IOC_WRITE, 0x6d08, 0x04 },
 { "linux/synclink.h", "MGSL_IOCWAITGPIO", _IOC_READ|_IOC_WRITE, 0x6d12, 0x10 },
+{ "linux/tee.h", "TEE_IOC_CANCEL", _IOC_READ, 0xa404, 0x08 },
+{ "linux/tee.h", "TEE_IOC_CLOSE_SESSION", _IOC_READ, 0xa405, 0x04 },
+{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
+{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
+{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
 { "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
 { "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
 { "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
@@ -2690,17 +2714,8 @@
 { "staging/android/ashmem.h", "ASHMEM_SET_PROT_MASK", _IOC_WRITE, 0x7705, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_SET_SIZE", _IOC_WRITE, 0x7703, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_UNPIN", _IOC_WRITE, 0x7708, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 },
-{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
+{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x18 },
 { "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
-{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SYNC", _IOC_READ|_IOC_WRITE, 0x4907, 0x08 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
 { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
 { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
 { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
diff --git a/linux/32/ioctls_inc_align64.h b/linux/32/ioctls_inc_align64.h
index ac97f5f..8f8c240 100644
--- a/linux/32/ioctls_inc_align64.h
+++ b/linux/32/ioctls_inc_align64.h
@@ -186,7 +186,7 @@
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
-{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 },
+{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
@@ -233,6 +233,7 @@
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2", _IOC_WRITE, 0x6469, 0x40 },
+{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2_WR", _IOC_READ|_IOC_WRITE, 0x6469, 0x40 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_APERTURE", _IOC_READ, 0x6463, 0x10 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_CACHING", _IOC_READ|_IOC_WRITE, 0x6470, 0x08 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6462, 0x10 },
@@ -487,6 +488,8 @@
 { "linux/apm_bios.h", "APM_IOC_SUSPEND", _IOC_NONE, 0x4102, 0x00 },
 { "linux/arcfb.h", "FBIO_GETCONTROL2", _IOC_READ, 0x4689, 0x04 },
 { "linux/arcfb.h", "FBIO_WAITEVENT", _IOC_NONE, 0x4688, 0x00 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_GET_SIZE", _IOC_READ|_IOC_WRITE, 0xb200, 0x10 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_MAP", _IOC_WRITE, 0xb201, 0x10 },
 { "linux/atm_eni.h", "ENI_MEMDUMP", _IOC_WRITE, 0x6160, 0x0c },
 { "linux/atm_eni.h", "ENI_SETMULT", _IOC_WRITE, 0x6167, 0x0c },
 { "linux/atm_he.h", "HE_GET_REG", _IOC_WRITE, 0x6160, 0x0c },
@@ -974,6 +977,7 @@
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 },
+{ "linux/fsmap.h", "FS_IOC_GETFSMAP", _IOC_READ|_IOC_WRITE, 0x583b, 0xc0 },
 { "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 },
@@ -1506,6 +1510,12 @@
 { "linux/omapfb.h", "OMAPFB_VSYNC", _IOC_NONE, 0x4f26, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORGO", _IOC_NONE, 0x4f3c, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORVSYNC", _IOC_NONE, 0x4f39, 0x00 },
+{ "linux/pcitest.h", "PCITEST_BAR", _IOC_NONE, 0x5001, 0x00 },
+{ "linux/pcitest.h", "PCITEST_COPY", _IOC_WRITE, 0x5006, 0x04 },
+{ "linux/pcitest.h", "PCITEST_LEGACY_IRQ", _IOC_NONE, 0x5002, 0x00 },
+{ "linux/pcitest.h", "PCITEST_MSI", _IOC_WRITE, 0x5003, 0x04 },
+{ "linux/pcitest.h", "PCITEST_READ", _IOC_WRITE, 0x5005, 0x04 },
+{ "linux/pcitest.h", "PCITEST_WRITE", _IOC_WRITE, 0x5004, 0x04 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 },
@@ -1940,6 +1950,12 @@
 { "linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", _IOC_NONE, 0x330b, 0x00 },
 { "linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", _IOC_WRITE, 0x330d, 0x0c },
 { "linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", _IOC_NONE, 0x3302, 0x00 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_CTL", _IOC_READ|_IOC_WRITE, 0x5743, 0x28 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_SUMMARY", _IOC_READ, 0x5742, 0x198 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_INFO", _IOC_READ, 0x5740, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_PART_INFO", _IOC_READ|_IOC_WRITE, 0x5741, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PFF_TO_PORT", _IOC_READ|_IOC_WRITE, 0x5744, 0x0c },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PORT_TO_PFF", _IOC_READ|_IOC_WRITE, 0x5745, 0x0c },
 { "linux/sync_file.h", "SYNC_IOC_FILE_INFO", _IOC_READ|_IOC_WRITE, 0x3e04, 0x38 },
 { "linux/sync_file.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e03, 0x30 },
 { "linux/synclink.h", "MGSL_IOCCLRMODCOUNT", _IOC_NONE, 0x6d0f, 0x00 },
@@ -1962,6 +1978,14 @@
 { "linux/synclink.h", "MGSL_IOCTXENABLE", _IOC_NONE, 0x6d04, 0x00 },
 { "linux/synclink.h", "MGSL_IOCWAITEVENT", _IOC_READ|_IOC_WRITE, 0x6d08, 0x04 },
 { "linux/synclink.h", "MGSL_IOCWAITGPIO", _IOC_READ|_IOC_WRITE, 0x6d12, 0x10 },
+{ "linux/tee.h", "TEE_IOC_CANCEL", _IOC_READ, 0xa404, 0x08 },
+{ "linux/tee.h", "TEE_IOC_CLOSE_SESSION", _IOC_READ, 0xa405, 0x04 },
+{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
+{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
+{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
 { "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
 { "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
 { "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
@@ -2690,17 +2714,8 @@
 { "staging/android/ashmem.h", "ASHMEM_SET_PROT_MASK", _IOC_WRITE, 0x7705, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_SET_SIZE", _IOC_WRITE, 0x7703, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_UNPIN", _IOC_WRITE, 0x7708, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 },
-{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
+{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x18 },
 { "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
-{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SYNC", _IOC_READ|_IOC_WRITE, 0x4907, 0x08 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
 { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
 { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
 { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
diff --git a/linux/64/ioctls_inc.h b/linux/64/ioctls_inc.h
index 995c8ce..2e9e9ad 100644
--- a/linux/64/ioctls_inc.h
+++ b/linux/64/ioctls_inc.h
@@ -186,7 +186,7 @@
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
-{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 },
+{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
@@ -233,6 +233,7 @@
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2", _IOC_WRITE, 0x6469, 0x40 },
+{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2_WR", _IOC_READ|_IOC_WRITE, 0x6469, 0x40 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_APERTURE", _IOC_READ, 0x6463, 0x10 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_CACHING", _IOC_READ|_IOC_WRITE, 0x6470, 0x08 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6462, 0x10 },
@@ -487,6 +488,8 @@
 { "linux/apm_bios.h", "APM_IOC_SUSPEND", _IOC_NONE, 0x4102, 0x00 },
 { "linux/arcfb.h", "FBIO_GETCONTROL2", _IOC_READ, 0x4689, 0x08 },
 { "linux/arcfb.h", "FBIO_WAITEVENT", _IOC_NONE, 0x4688, 0x00 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_GET_SIZE", _IOC_READ|_IOC_WRITE, 0xb200, 0x10 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_MAP", _IOC_WRITE, 0xb201, 0x10 },
 { "linux/atm_eni.h", "ENI_MEMDUMP", _IOC_WRITE, 0x6160, 0x10 },
 { "linux/atm_eni.h", "ENI_SETMULT", _IOC_WRITE, 0x6167, 0x10 },
 { "linux/atm_he.h", "HE_GET_REG", _IOC_WRITE, 0x6160, 0x10 },
@@ -974,6 +977,7 @@
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 },
+{ "linux/fsmap.h", "FS_IOC_GETFSMAP", _IOC_READ|_IOC_WRITE, 0x583b, 0xc0 },
 { "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 },
@@ -1506,6 +1510,12 @@
 { "linux/omapfb.h", "OMAPFB_VSYNC", _IOC_NONE, 0x4f26, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORGO", _IOC_NONE, 0x4f3c, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORVSYNC", _IOC_NONE, 0x4f39, 0x00 },
+{ "linux/pcitest.h", "PCITEST_BAR", _IOC_NONE, 0x5001, 0x00 },
+{ "linux/pcitest.h", "PCITEST_COPY", _IOC_WRITE, 0x5006, 0x08 },
+{ "linux/pcitest.h", "PCITEST_LEGACY_IRQ", _IOC_NONE, 0x5002, 0x00 },
+{ "linux/pcitest.h", "PCITEST_MSI", _IOC_WRITE, 0x5003, 0x04 },
+{ "linux/pcitest.h", "PCITEST_READ", _IOC_WRITE, 0x5005, 0x08 },
+{ "linux/pcitest.h", "PCITEST_WRITE", _IOC_WRITE, 0x5004, 0x08 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x08 },
@@ -1940,6 +1950,12 @@
 { "linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", _IOC_NONE, 0x330b, 0x00 },
 { "linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", _IOC_WRITE, 0x330d, 0x0c },
 { "linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", _IOC_NONE, 0x3302, 0x00 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_CTL", _IOC_READ|_IOC_WRITE, 0x5743, 0x28 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_SUMMARY", _IOC_READ, 0x5742, 0x198 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_INFO", _IOC_READ, 0x5740, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_PART_INFO", _IOC_READ|_IOC_WRITE, 0x5741, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PFF_TO_PORT", _IOC_READ|_IOC_WRITE, 0x5744, 0x0c },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PORT_TO_PFF", _IOC_READ|_IOC_WRITE, 0x5745, 0x0c },
 { "linux/sync_file.h", "SYNC_IOC_FILE_INFO", _IOC_READ|_IOC_WRITE, 0x3e04, 0x38 },
 { "linux/sync_file.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e03, 0x30 },
 { "linux/synclink.h", "MGSL_IOCCLRMODCOUNT", _IOC_NONE, 0x6d0f, 0x00 },
@@ -1962,6 +1978,14 @@
 { "linux/synclink.h", "MGSL_IOCTXENABLE", _IOC_NONE, 0x6d04, 0x00 },
 { "linux/synclink.h", "MGSL_IOCWAITEVENT", _IOC_READ|_IOC_WRITE, 0x6d08, 0x04 },
 { "linux/synclink.h", "MGSL_IOCWAITGPIO", _IOC_READ|_IOC_WRITE, 0x6d12, 0x10 },
+{ "linux/tee.h", "TEE_IOC_CANCEL", _IOC_READ, 0xa404, 0x08 },
+{ "linux/tee.h", "TEE_IOC_CLOSE_SESSION", _IOC_READ, 0xa405, 0x04 },
+{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
+{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
+{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
 { "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
 { "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
 { "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
@@ -2690,17 +2714,8 @@
 { "staging/android/ashmem.h", "ASHMEM_SET_PROT_MASK", _IOC_WRITE, 0x7705, 0x08 },
 { "staging/android/ashmem.h", "ASHMEM_SET_SIZE", _IOC_WRITE, 0x7703, 0x08 },
 { "staging/android/ashmem.h", "ASHMEM_UNPIN", _IOC_WRITE, 0x7708, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x20 },
-{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x10 },
-{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
+{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x18 },
 { "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
-{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SYNC", _IOC_READ|_IOC_WRITE, 0x4907, 0x08 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
 { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
 { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
 { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
diff --git a/linux/aarch64/arch_regs.c b/linux/aarch64/arch_regs.c
index 4ccb1f5..5d805fb 100644
--- a/linux/aarch64/arch_regs.c
+++ b/linux/aarch64/arch_regs.c
@@ -1,31 +1,31 @@
 struct arm_pt_regs {
-        uint32_t uregs[18];
+	uint32_t uregs[18];
 };
-#define ARM_cpsr       uregs[16]
-#define ARM_pc         uregs[15]
-#define ARM_lr         uregs[14]
-#define ARM_sp         uregs[13]
-#define ARM_ip         uregs[12]
-#define ARM_fp         uregs[11]
-#define ARM_r10        uregs[10]
-#define ARM_r9         uregs[9]
-#define ARM_r8         uregs[8]
-#define ARM_r7         uregs[7]
-#define ARM_r6         uregs[6]
-#define ARM_r5         uregs[5]
-#define ARM_r4         uregs[4]
-#define ARM_r3         uregs[3]
-#define ARM_r2         uregs[2]
-#define ARM_r1         uregs[1]
-#define ARM_r0         uregs[0]
-#define ARM_ORIG_r0    uregs[17]
+#define ARM_cpsr	uregs[16]
+#define ARM_pc		uregs[15]
+#define ARM_lr		uregs[14]
+#define ARM_sp		uregs[13]
+#define ARM_ip		uregs[12]
+#define ARM_fp		uregs[11]
+#define ARM_r10		uregs[10]
+#define ARM_r9		uregs[9]
+#define ARM_r8		uregs[8]
+#define ARM_r7		uregs[7]
+#define ARM_r6		uregs[6]
+#define ARM_r5		uregs[5]
+#define ARM_r4		uregs[4]
+#define ARM_r3		uregs[3]
+#define ARM_r2		uregs[2]
+#define ARM_r1		uregs[1]
+#define ARM_r0		uregs[0]
+#define ARM_ORIG_r0	uregs[17]
 
 static union {
 	struct user_pt_regs aarch64_r;
 	struct arm_pt_regs  arm_r;
 } arm_regs_union;
-#define aarch64_regs arm_regs_union.aarch64_r
-#define arm_regs     arm_regs_union.arm_r
+#define aarch64_regs	arm_regs_union.aarch64_r
+#define arm_regs	arm_regs_union.arm_r
 
 uint64_t *const aarch64_sp_ptr = (uint64_t *) &aarch64_regs.sp;
 uint32_t *const arm_sp_ptr = &arm_regs.ARM_sp;
diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h
index 848c323..ae7821f 100644
--- a/linux/alpha/syscallent.h
+++ b/linux/alpha/syscallent.h
@@ -75,7 +75,7 @@
 [ 45] = { 3,	TD|TF,		SEN(open),			"open"			},
 [ 46] = { 5,	0,		SEN(printargs),			"osf_old_sigaction"	}, /* not implemented */
 [ 47] = { 0,	NF,		SEN(getxgid),			"getxgid"		},
-[ 48] = { 2,	TS,		SEN(sigprocmask),		"osf_sigprocmask"	},
+[ 48] = { 2,	TS,		SEN(osf_sigprocmask),		"osf_sigprocmask"	},
 [ 49] = { 5,	0,		SEN(printargs),			"osf_getlogin"		}, /* not implemented */
 [ 50] = { 5,	0,		SEN(printargs),			"osf_setlogin"		}, /* not implemented */
 [ 51] = { 1,	TF,		SEN(acct),			"acct"			},
diff --git a/linux/arc/arch_regs.c b/linux/arc/arch_regs.c
index 9a5c2df..88bb799 100644
--- a/linux/arc/arch_regs.c
+++ b/linux/arc/arch_regs.c
@@ -1,4 +1,4 @@
 static struct user_regs_struct arc_regs;
-unsigned long *const arc_sp_ptr = &arc_regs.sp;
+unsigned long *const arc_sp_ptr = &arc_regs.scratch.sp;
 #define ARCH_REGS_FOR_GETREGSET arc_regs
 #define ARCH_PC_REG arc_regs.efa
diff --git a/linux/arm/arch_sigreturn.c b/linux/arm/arch_sigreturn.c
index b60dad8..a2b7100 100644
--- a/linux/arm/arch_sigreturn.c
+++ b/linux/arm/arch_sigreturn.c
@@ -9,7 +9,7 @@
 #ifdef AARCH64
 		tcp->currpers == 0 ?
 			(*aarch64_sp_ptr + SIZEOF_STRUCT_SIGINFO +
-			 offsetof(struct ucontext, uc_sigmask)) :
+			 offsetof(ucontext_t, uc_sigmask)) :
 #endif
 			(*arm_sp_ptr +
 			 OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK);
diff --git a/linux/arm/get_scno.c b/linux/arm/get_scno.c
index 3440782..5f68069 100644
--- a/linux/arm/get_scno.c
+++ b/linux/arm/get_scno.c
@@ -58,7 +58,7 @@
 		/* Fixup the syscall number */
 		scno &= 0x000fffff;
 	} else {
-	scno_in_r7:
+scno_in_r7:
 		scno = arm_regs.ARM_r7;
 	}
 #else /* __ARM_EABI__ || !ENABLE_ARM_OABI */
diff --git a/linux/bfin/get_syscall_args.c b/linux/bfin/get_syscall_args.c
index 13d58bd..69613d4 100644
--- a/linux/bfin/get_syscall_args.c
+++ b/linux/bfin/get_syscall_args.c
@@ -2,8 +2,9 @@
 static int
 get_syscall_args(struct tcb *tcp)
 {
-	static const int argreg[MAX_ARGS] =
-		{ PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5 };
+	static const int argreg[MAX_ARGS] = {
+		PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5
+	};
 	unsigned int i;
 
 	for (i = 0; i < tcp->s_ent->nargs; ++i)
diff --git a/linux/inet_diag.h b/linux/inet_diag.h
index 69012af..24302db 100644
--- a/linux/inet_diag.h
+++ b/linux/inet_diag.h
@@ -14,7 +14,17 @@
 	uint32_t idiag_cookie[2];
 };
 
-/* Request structure */
+/* Request structures */
+struct inet_diag_req {
+	uint8_t idiag_family;
+	uint8_t idiag_src_len;
+	uint8_t idiag_dst_len;
+	uint8_t idiag_ext;
+	struct inet_diag_sockid id;
+	uint32_t idiag_states;
+	uint32_t idiag_dbs;
+};
+
 struct inet_diag_req_v2 {
 	uint8_t sdiag_family;
 	uint8_t sdiag_protocol;
@@ -24,6 +34,11 @@
 	struct inet_diag_sockid id;
 };
 
+enum {
+	INET_DIAG_REQ_NONE,
+	INET_DIAG_REQ_BYTECODE,
+};
+
 /* Info structure */
 struct inet_diag_msg {
 	uint8_t idiag_family;
@@ -40,4 +55,59 @@
 	uint32_t idiag_inode;
 };
 
+/* Extensions */
+enum {
+	INET_DIAG_NONE,
+	INET_DIAG_MEMINFO,
+	INET_DIAG_INFO,
+	INET_DIAG_VEGASINFO,
+	INET_DIAG_CONG,
+	INET_DIAG_TOS,
+	INET_DIAG_TCLASS,
+	INET_DIAG_SKMEMINFO,
+	INET_DIAG_SHUTDOWN,
+	INET_DIAG_DCTCPINFO,
+	INET_DIAG_PROTOCOL,  /* response attribute only */
+	INET_DIAG_SKV6ONLY,
+	INET_DIAG_LOCALS,
+	INET_DIAG_PEERS,
+	INET_DIAG_PAD,
+	INET_DIAG_MARK,
+	INET_DIAG_BBRINFO,
+};
+
+/* INET_DIAG_MEM */
+struct inet_diag_meminfo {
+	uint32_t idiag_rmem;
+	uint32_t idiag_wmem;
+	uint32_t idiag_fmem;
+	uint32_t idiag_tmem;
+};
+
+/* INET_DIAG_VEGASINFO */
+struct tcpvegas_info {
+	uint32_t tcpv_enabled;
+	uint32_t tcpv_rttcnt;
+	uint32_t tcpv_rtt;
+	uint32_t tcpv_minrtt;
+};
+
+/* INET_DIAG_DCTCPINFO */
+struct tcp_dctcp_info {
+	uint16_t dctcp_enabled;
+	uint16_t dctcp_ce_state;
+	uint32_t dctcp_alpha;
+	uint32_t dctcp_ab_ecn;
+	uint32_t dctcp_ab_tot;
+};
+
+/* INET_DIAG_BBRINFO */
+struct tcp_bbr_info {
+	uint32_t bbr_bw_lo;
+	uint32_t bbr_bw_hi;
+	uint32_t bbr_min_rtt;
+	uint32_t bbr_pacing_gain;
+	uint32_t bbr_cwnd_gain;
+};
+
 #endif /* !STRACE_LINUX_INET_DIAG_H */
diff --git a/linux/mips/syscallent-n32-stub.h b/linux/mips/syscallent-n32-stub.h
deleted file mode 100644
index 4cfa682..0000000
--- a/linux/mips/syscallent-n32-stub.h
+++ /dev/null
@@ -1,331 +0,0 @@
-[6000] = { 3,	TD,		SEN(printargs), "n32:read"			}, /* start of Linux N32 */
-[6001] = { 3,	TD,		SEN(printargs), "n32:write"			},
-[6002] = { 3,	TD|TF,		SEN(printargs), "n32:open"			},
-[6003] = { 1,	TD,		SEN(printargs), "n32:close"			},
-[6004] = { 2,	TF|TST|TSTA,	SEN(printargs), "n32:stat"			},
-[6005] = { 2,	TD|TFST|TSTA,	SEN(printargs), "n32:fstat"			},
-[6006] = { 2,	TF|TLST|TSTA,	SEN(printargs), "n32:lstat"			},
-[6007] = { 3,	TD,		SEN(printargs), "n32:poll"			},
-[6008] = { 3,	TD,		SEN(printargs), "n32:lseek"			},
-[6009] = { 6,	TD|TM|SI,	SEN(printargs), "n32:mmap"			},
-[6010] = { 3,	TM|SI,		SEN(printargs), "n32:mprotect"		},
-[6011] = { 2,	TM|SI,		SEN(printargs), "n32:munmap"		},
-[6012] = { 1,	TM|SI,		SEN(printargs), "n32:brk"			},
-[6013] = { 4,	TS,		SEN(printargs), "n32:rt_sigaction"		},
-[6014] = { 4,	TS,		SEN(printargs), "n32:rt_sigprocmask"	},
-[6015] = { 3,	TD,		SEN(printargs), "n32:ioctl"			},
-[6016] = { 4,	TD,		SEN(printargs), "n32:pread64"		},
-[6017] = { 4,	TD,		SEN(printargs), "n32:pwrite64"		},
-[6018] = { 3,	TD,		SEN(printargs), "n32:readv"			},
-[6019] = { 3,	TD,		SEN(printargs), "n32:writev"		},
-[6020] = { 2,	TF,		SEN(printargs), "n32:access"		},
-[6021] = { 0,	TD,		SEN(printargs), "n32:pipe"			},
-[6022] = { 5,	TD,		SEN(printargs), "n32:_newselect"		},
-[6023] = { 0,	0,		SEN(printargs), "n32:sched_yield"		},
-[6024] = { 5,	TM|SI,		SEN(printargs), "n32:mremap"		},
-[6025] = { 3,	TM,		SEN(printargs), "n32:msync"			},
-[6026] = { 3,	TM,		SEN(printargs), "n32:mincore"		},
-[6027] = { 3,	TM,		SEN(printargs), "n32:madvise"		},
-[6028] = { 3,	TI,		SEN(printargs), "n32:shmget"		},
-[6029] = { 3,	TI|TM|SI,	SEN(printargs), "n32:shmat"			},
-[6030] = { 3,	TI,		SEN(printargs), "n32:shmctl"		},
-[6031] = { 1,	TD,		SEN(printargs), "n32:dup"			},
-[6032] = { 2,	TD,		SEN(printargs), "n32:dup2"			},
-[6033] = { 0,	TS,		SEN(printargs), "n32:pause"			},
-[6034] = { 2,	0,		SEN(printargs), "n32:nanosleep"		},
-[6035] = { 2,	0,		SEN(printargs), "n32:getitimer"		},
-[6036] = { 3,	0,		SEN(printargs), "n32:setitimer"		},
-[6037] = { 1,	0,		SEN(printargs), "n32:alarm"			},
-[6038] = { 0,	NF,		SEN(printargs), "n32:getpid"		},
-[6039] = { 4,	TD|TN,		SEN(printargs), "n32:sendfile"		},
-[6040] = { 3,	TN,		SEN(printargs), "n32:socket"		},
-[6041] = { 3,	TN,		SEN(printargs), "n32:connect"		},
-[6042] = { 3,	TN,		SEN(printargs), "n32:accept"		},
-[6043] = { 6,	TN,		SEN(printargs), "n32:sendto"		},
-[6044] = { 6,	TN,		SEN(printargs), "n32:recvfrom"		},
-[6045] = { 3,	TN,		SEN(printargs), "n32:sendmsg"		},
-[6046] = { 3,	TN,		SEN(printargs), "n32:recvmsg"		},
-[6047] = { 2,	TN,		SEN(printargs), "n32:shutdown"		},
-[6048] = { 3,	TN,		SEN(printargs), "n32:bind"			},
-[6049] = { 2,	TN,		SEN(printargs), "n32:listen"		},
-[6050] = { 3,	TN,		SEN(printargs), "n32:getsockname"		},
-[6051] = { 3,	TN,		SEN(printargs), "n32:getpeername"		},
-[6052] = { 4,	TN,		SEN(printargs), "n32:socketpair"		},
-[6053] = { 5,	TN,		SEN(printargs), "n32:setsockopt"		},
-[6054] = { 5,	TN,		SEN(printargs), "n32:getsockopt"		},
-[6055] = { 5,	TP,		SEN(printargs), "n32:clone"			},
-[6056] = { 0,	TP,		SEN(printargs), "n32:fork"			},
-[6057] = { 3,	TF|TP|SE|SI,	SEN(printargs), "n32:execve"		},
-[6058] = { 1,	TP|SE,		SEN(printargs), "n32:exit"			},
-[6059] = { 4,	TP,		SEN(printargs), "n32:wait4"			},
-[6060] = { 2,	TS,		SEN(printargs), "n32:kill"			},
-[6061] = { 1,	0,		SEN(printargs), "n32:uname"			},
-[6062] = { 3,	TI,		SEN(printargs), "n32:semget"		},
-[6063] = { 3,	TI,		SEN(printargs), "n32:semop"			},
-[6064] = { 4,	TI,		SEN(printargs), "n32:semctl"		},
-[6065] = { 1,	TI|TM|SI,	SEN(printargs), "n32:shmdt"			},
-[6066] = { 2,	TI,		SEN(printargs), "n32:msgget"		},
-[6067] = { 4,	TI,		SEN(printargs), "n32:msgsnd"		},
-[6068] = { 5,	TI,		SEN(printargs), "n32:msgrcv"		},
-[6069] = { 3,	TI,		SEN(printargs), "n32:msgctl"		},
-[6070] = { 3,	TD,		SEN(printargs), "n32:fcntl"			},
-[6071] = { 2,	TD,		SEN(printargs), "n32:flock"			},
-[6072] = { 1,	TD,		SEN(printargs), "n32:fsync"			},
-[6073] = { 1,	TD,		SEN(printargs), "n32:fdatasync"		},
-[6074] = { 2,	TF,		SEN(printargs), "n32:truncate"		},
-[6075] = { 2,	TD,		SEN(printargs), "n32:ftruncate"		},
-[6076] = { 3,	TD,		SEN(printargs), "n32:getdents"		},
-[6077] = { 2,	TF,		SEN(printargs), "n32:getcwd"		},
-[6078] = { 1,	TF,		SEN(printargs), "n32:chdir"			},
-[6079] = { 1,	TD,		SEN(printargs), "n32:fchdir"		},
-[6080] = { 2,	TF,		SEN(printargs), "n32:rename"		},
-[6081] = { 2,	TF,		SEN(printargs), "n32:mkdir"			},
-[6082] = { 1,	TF,		SEN(printargs), "n32:rmdir"			},
-[6083] = { 2,	TD|TF,		SEN(printargs), "n32:creat"			},
-[6084] = { 2,	TF,		SEN(printargs), "n32:link"			},
-[6085] = { 1,	TF,		SEN(printargs), "n32:unlink"		},
-[6086] = { 2,	TF,		SEN(printargs), "n32:symlink"		},
-[6087] = { 3,	TF,		SEN(printargs), "n32:readlink"		},
-[6088] = { 2,	TF,		SEN(printargs), "n32:chmod"			},
-[6089] = { 2,	TD,		SEN(printargs), "n32:fchmod"		},
-[6090] = { 3,	TF,		SEN(printargs), "n32:chown"			},
-[6091] = { 3,	TD,		SEN(printargs), "n32:fchown"		},
-[6092] = { 3,	TF,		SEN(printargs), "n32:lchown"		},
-[6093] = { 1,	NF,		SEN(printargs), "n32:umask"			},
-[6094] = { 2,	0,		SEN(printargs), "n32:gettimeofday"		},
-[6095] = { 2,	0,		SEN(printargs), "n32:getrlimit"		},
-[6096] = { 2,	0,		SEN(printargs), "n32:getrusage"		},
-[6097] = { 1,	0,		SEN(printargs), "n32:sysinfo"		},
-[6098] = { 1,	0,		SEN(printargs), "n32:times"			},
-[6099] = { 4,	0,		SEN(printargs), "n32:ptrace"		},
-[6100] = { 0,	NF,		SEN(printargs), "n32:getuid"		},
-[6101] = { 3,	0,		SEN(printargs), "n32:syslog"		},
-[6102] = { 0,	NF,		SEN(printargs), "n32:getgid"		},
-[6103] = { 1,	0,		SEN(printargs), "n32:setuid"		},
-[6104] = { 1,	0,		SEN(printargs), "n32:setgid"		},
-[6105] = { 0,	NF,		SEN(printargs), "n32:geteuid"		},
-[6106] = { 0,	NF,		SEN(printargs), "n32:getegid"		},
-[6107] = { 2,	0,		SEN(printargs), "n32:setpgid"		},
-[6108] = { 0,	NF,		SEN(printargs), "n32:getppid"		},
-[6109] = { 0,	0,		SEN(printargs), "n32:getpgrp"		},
-[6110] = { 0,	0,		SEN(printargs), "n32:setsid"		},
-[6111] = { 2,	0,		SEN(printargs), "n32:setreuid"		},
-[6112] = { 2,	0,		SEN(printargs), "n32:setregid"		},
-[6113] = { 2,	0,		SEN(printargs), "n32:getgroups"		},
-[6114] = { 2,	0,		SEN(printargs), "n32:setgroups"		},
-[6115] = { 3,	0,		SEN(printargs), "n32:setresuid"		},
-[6116] = { 3,	0,		SEN(printargs), "n32:getresuid"		},
-[6117] = { 3,	0,		SEN(printargs), "n32:setresgid"		},
-[6118] = { 3,	0,		SEN(printargs), "n32:getresgid"		},
-[6119] = { 1,	0,		SEN(printargs), "n32:getpgid"		},
-[6120] = { 1,	NF,		SEN(printargs), "n32:setfsuid"		},
-[6121] = { 1,	NF,		SEN(printargs), "n32:setfsgid"		},
-[6122] = { 1,	0,		SEN(printargs), "n32:getsid"		},
-[6123] = { 2,	0,		SEN(printargs), "n32:capget"		},
-[6124] = { 2,	0,		SEN(printargs), "n32:capset"		},
-[6125] = { 2,	TS,		SEN(printargs), "n32:rt_sigpending"		},
-[6126] = { 4,	TS,		SEN(printargs), "n32:rt_sigtimedwait"	},
-[6127] = { 3,	TS,		SEN(printargs), "n32:rt_sigqueueinfo"	},
-[6128] = { 2,	TS,		SEN(printargs), "n32:rt_sigsuspend"		},
-[6129] = { 2,	TS,		SEN(printargs), "n32:sigaltstack"		},
-[6130] = { 2,	TF,		SEN(printargs), "n32:utime"			},
-[6131] = { 3,	TF,		SEN(printargs), "n32:mknod"			},
-[6132] = { 1,	NF,		SEN(printargs), "n32:personality"		},
-[6133] = { 2,	TSFA,		SEN(printargs), "n32:ustat"			},
-[6134] = { 2,	TF|TSF|TSFA,	SEN(printargs), "n32:statfs"		},
-[6135] = { 2,	TD|TFSF|TSFA,	SEN(printargs), "n32:fstatfs"		},
-[6136] = { 3,	0,		SEN(printargs), "n32:sysfs"			},
-[6137] = { 2,	0,		SEN(printargs), "n32:getpriority"		},
-[6138] = { 3,	0,		SEN(printargs), "n32:setpriority"		},
-[6139] = { 2,	0,		SEN(printargs), "n32:sched_setparam"	},
-[6140] = { 2,	0,		SEN(printargs), "n32:sched_getparam"	},
-[6141] = { 3,	0,		SEN(printargs), "n32:sched_setscheduler"	},
-[6142] = { 1,	0,		SEN(printargs), "n32:sched_getscheduler"	},
-[6143] = { 1,	0,		SEN(printargs), "n32:sched_get_priority_max"},
-[6144] = { 1,	0,		SEN(printargs), "n32:sched_get_priority_min"},
-[6145] = { 2,	0,		SEN(printargs), "n32:sched_rr_get_interval"	},
-[6146] = { 2,	TM,		SEN(printargs), "n32:mlock"			},
-[6147] = { 2,	TM,		SEN(printargs), "n32:munlock"		},
-[6148] = { 1,	TM,		SEN(printargs), "n32:mlockall"		},
-[6149] = { 0,	TM,		SEN(printargs), "n32:munlockall"		},
-[6150] = { 0,	0,		SEN(printargs), "n32:vhangup"		},
-[6151] = { 2,	TF,		SEN(printargs), "n32:pivot_root"		},
-[6152] = { 1,	0,		SEN(printargs), "n32:_sysctl"		},
-[6153] = { 5,	0,		SEN(printargs), "n32:prctl"			},
-[6154] = { 1,	0,		SEN(printargs), "n32:adjtimex"		},
-[6155] = { 2,	0,		SEN(printargs), "n32:setrlimit"		},
-[6156] = { 1,	TF,		SEN(printargs), "n32:chroot"		},
-[6157] = { 0,	0,		SEN(printargs), "n32:sync"			},
-[6158] = { 1,	TF,		SEN(printargs), "n32:acct"			},
-[6159] = { 2,	0,		SEN(printargs), "n32:settimeofday"		},
-[6160] = { 5,	TF,		SEN(printargs), "n32:mount"			},
-[6161] = { 2,	TF,		SEN(printargs), "n32:umount2"		},
-[6162] = { 2,	TF,		SEN(printargs), "n32:swapon"		},
-[6163] = { 1,	TF,		SEN(printargs), "n32:swapoff"		},
-[6164] = { 4,	0,		SEN(printargs), "n32:reboot"		},
-[6165] = { 2,	0,		SEN(printargs), "n32:sethostname"		},
-[6166] = { 2,	0,		SEN(printargs), "n32:setdomainname"		},
-[6167] = { 2,	0,		SEN(printargs), "n32:create_module"		},
-[6168] = { 3,	0,		SEN(printargs), "n32:init_module"		},
-[6169] = { 2,	0,		SEN(printargs), "n32:delete_module"		},
-[6170] = { 1,	0,		SEN(printargs), "n32:get_kernel_syms"	},
-[6171] = { 5,	0,		SEN(printargs), "n32:query_module"		},
-[6172] = { 4,	TF,		SEN(printargs), "n32:quotactl"		},
-[6173] = { 3,	0,		SEN(printargs), "n32:nfsservctl"		},
-[6174] = { 5,	TN,		SEN(printargs), "n32:getpmsg"		},
-[6175] = { 5,	TN,		SEN(printargs), "n32:putpmsg"		},
-[6176] = { 0,	0,		SEN(printargs), "n32:afs_syscall"		},
-[6177] = { 0,	0,		SEN(printargs), "n32:reserved177"		},
-[6178] = { 0,	NF,		SEN(printargs), "n32:gettid"		},
-[6179] = { 3,	TD,		SEN(printargs), "n32:readahead"		},
-[6180] = { 5,	TF,		SEN(printargs), "n32:setxattr"		},
-[6181] = { 5,	TF,		SEN(printargs), "n32:lsetxattr"		},
-[6182] = { 5,	TD,		SEN(printargs), "n32:fsetxattr"		},
-[6183] = { 4,	TF,		SEN(printargs), "n32:getxattr"		},
-[6184] = { 4,	TF,		SEN(printargs), "n32:lgetxattr"		},
-[6185] = { 4,	TD,		SEN(printargs), "n32:fgetxattr"		},
-[6186] = { 3,	TF,		SEN(printargs), "n32:listxattr"		},
-[6187] = { 3,	TF,		SEN(printargs), "n32:llistxattr"		},
-[6188] = { 3,	TD,		SEN(printargs), "n32:flistxattr"		},
-[6189] = { 2,	TF,		SEN(printargs), "n32:removexattr"		},
-[6190] = { 2,	TF,		SEN(printargs), "n32:lremovexattr"		},
-[6191] = { 2,	TD,		SEN(printargs), "n32:fremovexattr"		},
-[6192] = { 2,	TS,		SEN(printargs), "n32:tkill"			},
-[6193] = { 1,	0,		SEN(printargs), "n32:time"			},
-[6194] = { 6,	0,		SEN(printargs), "n32:futex"			},
-[6195] = { 3,	0,		SEN(printargs), "n32:sched_setaffinity"	},
-[6196] = { 3,	0,		SEN(printargs), "n32:sched_getaffinity"	},
-[6197] = { 3,	0,		SEN(printargs), "n32:cacheflush"		},
-[6198] = { 3,	0,		SEN(printargs), "n32:cachectl"		},
-[6199] = { 4,	0,		SEN(printargs), "n32:sysmips"		},
-[6200] = { 2,	TM,		SEN(printargs), "n32:io_setup"		},
-[6201] = { 1,	TM,		SEN(printargs), "n32:io_destroy"		},
-[6202] = { 5,	0,		SEN(printargs), "n32:io_getevents"		},
-[6203] = { 3,	0,		SEN(printargs), "n32:io_submit"		},
-[6204] = { 3,	0,		SEN(printargs), "n32:io_cancel"		},
-[6205] = { 1,	TP|SE,		SEN(printargs), "n32:exit_group"		},
-[6206] = { 3,	0,		SEN(printargs), "n32:lookup_dcookie"	},
-[6207] = { 1,	TD,		SEN(printargs), "n32:epoll_create"		},
-[6208] = { 4,	TD,		SEN(printargs), "n32:epoll_ctl"		},
-[6209] = { 4,	TD,		SEN(printargs), "n32:epoll_wait"		},
-[6210] = { 5,	TM|SI,		SEN(printargs), "n32:remap_file_pages"	},
-[6211] = { 0,	TS,		SEN(printargs), "n32:rt_sigreturn"		},
-[6212] = { 3,	TD,		SEN(printargs), "n32:fcntl64"		},
-[6213] = { 1,	0,		SEN(printargs), "n32:set_tid_address"	},
-[6214] = { 0,	0,		SEN(printargs), "n32:restart_syscall"	},
-[6215] = { 4,	TI,		SEN(printargs), "n32:semtimedop"		},
-[6216] = { 4,	TD,		SEN(printargs), "n32:fadvise64"		},
-[6217] = { 3,	TF|TSF|TSFA,	SEN(printargs), "n32:statfs64"		},
-[6218] = { 3,	TD|TFSF|TSFA,	SEN(printargs), "n32:fstatfs64"		},
-[6219] = { 4,	TD|TN,		SEN(printargs), "n32:sendfile64"		},
-[6220] = { 3,	0,		SEN(printargs), "n32:timer_create"		},
-[6221] = { 4,	0,		SEN(printargs), "n32:timer_settime"		},
-[6222] = { 2,	0,		SEN(printargs), "n32:timer_gettime"		},
-[6223] = { 1,	0,		SEN(printargs), "n32:timer_getoverrun"	},
-[6224] = { 1,	0,		SEN(printargs), "n32:timer_delete"		},
-[6225] = { 2,	0,		SEN(printargs), "n32:clock_settime"		},
-[6226] = { 2,	0,		SEN(printargs), "n32:clock_gettime"		},
-[6227] = { 2,	0,		SEN(printargs), "n32:clock_getres"		},
-[6228] = { 4,	0,		SEN(printargs), "n32:clock_nanosleep"	},
-[6229] = { 3,	TS,		SEN(printargs), "n32:tgkill"		},
-[6230] = { 2,	TF,		SEN(printargs), "n32:utimes"		},
-[6231] = { 6,	TM,		SEN(printargs), "n32:mbind"			},
-[6232] = { 5,	TM,		SEN(printargs), "n32:get_mempolicy"		},
-[6233] = { 3,	TM,		SEN(printargs), "n32:set_mempolicy"		},
-[6234] = { 4,	0,		SEN(printargs), "n32:mq_open"		},
-[6235] = { 1,	0,		SEN(printargs), "n32:mq_unlink"		},
-[6236] = { 5,	0,		SEN(printargs), "n32:mq_timedsend"		},
-[6237] = { 5,	0,		SEN(printargs), "n32:mq_timedreceive"	},
-[6238] = { 2,	0,		SEN(printargs), "n32:mq_notify"		},
-[6239] = { 3,	0,		SEN(printargs), "n32:mq_getsetattr"		},
-[6240] = { 5,	0,		SEN(printargs), "n32:vserver"		},
-[6241] = { 5,	TP,		SEN(printargs), "n32:waitid"		},
-[6242] = { },
-[6243] = { 5,	0,		SEN(printargs), "n32:add_key"		},
-[6244] = { 4,	0,		SEN(printargs), "n32:request_key"		},
-[6245] = { 5,	0,		SEN(printargs), "n32:keyctl"		},
-[6246] = { 1,	0,		SEN(printargs), "n32:set_thread_area"	},
-[6247] = { 0,	TD,		SEN(printargs), "n32:inotify_init"		},
-[6248] = { 3,	TD,		SEN(printargs), "n32:inotify_add_watch"	},
-[6249] = { 2,	TD,		SEN(printargs), "n32:inotify_rm_watch"	},
-[6250] = { 4,	TM,		SEN(printargs), "n32:migrate_pages"		},
-[6251] = { 4,	TD|TF,		SEN(printargs), "n32:openat"		},
-[6252] = { 3,	TD|TF,		SEN(printargs), "n32:mkdirat"		},
-[6253] = { 4,	TD|TF,		SEN(printargs), "n32:mknodat"		},
-[6254] = { 5,	TD|TF,		SEN(printargs), "n32:fchownat"		},
-[6255] = { 3,	TD|TF,		SEN(printargs), "n32:futimesat"		},
-[6256] = { 4,	TD|TF|TFST|TSTA,SEN(printargs), "n32:newfstatat"		},
-[6257] = { 3,	TD|TF,		SEN(printargs), "n32:unlinkat"		},
-[6258] = { 4,	TD|TF,		SEN(printargs), "n32:renameat"		},
-[6259] = { 5,	TD|TF,		SEN(printargs), "n32:linkat"		},
-[6260] = { 3,	TD|TF,		SEN(printargs), "n32:symlinkat"		},
-[6261] = { 4,	TD|TF,		SEN(printargs), "n32:readlinkat"		},
-[6262] = { 3,	TD|TF,		SEN(printargs), "n32:fchmodat"		},
-[6263] = { 3,	TD|TF,		SEN(printargs), "n32:faccessat"		},
-[6264] = { 6,	TD,		SEN(printargs), "n32:pselect6"		},
-[6265] = { 5,	TD,		SEN(printargs), "n32:ppoll"			},
-[6266] = { 1,	TP,		SEN(printargs), "n32:unshare"		},
-[6267] = { 6,	TD,		SEN(printargs), "n32:splice"		},
-[6268] = { 4,	TD,		SEN(printargs), "n32:sync_file_range"	},
-[6269] = { 4,	TD,		SEN(printargs), "n32:tee"			},
-[6270] = { 4,	TD,		SEN(printargs), "n32:vmsplice"		},
-[6271] = { 6,	TM,		SEN(printargs), "n32:move_pages"		},
-[6272] = { 2,	0,		SEN(printargs), "n32:set_robust_list"	},
-[6273] = { 3,	0,		SEN(printargs), "n32:get_robust_list"	},
-[6274] = { 4,	0,		SEN(printargs), "n32:kexec_load"		},
-[6275] = { 3,	0,		SEN(printargs), "n32:getcpu"		},
-[6276] = { 6,	TD,		SEN(printargs), "n32:epoll_pwait"		},
-[6277] = { 3,	0,		SEN(printargs), "n32:ioprio_set"		},
-[6278] = { 2,	0,		SEN(printargs), "n32:ioprio_get"		},
-[6279] = { 4,	TD|TF,		SEN(printargs), "n32:utimensat"		},
-[6280] = { 3,	TD|TS,		SEN(printargs), "n32:signalfd"		},
-[6281] = { 4,	TD,		SEN(printargs), "n32:timerfd"		},
-[6282] = { 1,	TD,		SEN(printargs), "n32:eventfd"		},
-[6283] = { 4,	TD,		SEN(printargs), "n32:fallocate"		},
-[6284] = { 2,	TD,		SEN(printargs), "n32:timerfd_create"	},
-[6285] = { 2,	TD,		SEN(printargs), "n32:timerfd_gettime"	},
-[6286] = { 4,	TD,		SEN(printargs), "n32:timerfd_settime"	},
-[6287] = { 4,	TD|TS,		SEN(printargs), "n32:signalfd4"		},
-[6288] = { 2,	TD,		SEN(printargs), "n32:eventfd2"		},
-[6289] = { 1,	TD,		SEN(printargs), "n32:epoll_create1"		},
-[6290] = { 3,	TD,		SEN(printargs), "n32:dup3"			},
-[6291] = { 2,	TD,		SEN(printargs), "n32:pipe2"			},
-[6292] = { 1,	TD,		SEN(printargs), "n32:inotify_init1"		},
-[6293] = { 4,	TD,		SEN(printargs), "n32:preadv"		},
-[6294] = { 4,	TD,		SEN(printargs), "n32:pwritev"		},
-[6295] = { 4,	TP|TS,		SEN(printargs), "n32:rt_tgsigqueueinfo"	},
-[6296] = { 5,	TD,		SEN(printargs), "n32:perf_event_open"	},
-[6297] = { 4,	TN,		SEN(printargs), "n32:accept4"		},
-[6298] = { 5,	TN,		SEN(printargs), "n32:recvmmsg"		},
-[6299] = { 3,	TD,		SEN(printargs), "n32:getdents64"		},
-[6300] = { 2,	TD,		SEN(printargs), "n32:fanotify_init"		},
-[6301] = { 5,	TD|TF,		SEN(printargs), "n32:fanotify_mark"		},
-[6302] = { 4,	0,		SEN(printargs), "n32:prlimit64"		},
-[6303] = { 5,	TD|TF,		SEN(printargs), "n32:name_to_handle_at"	},
-[6304] = { 3,	TD,		SEN(printargs), "n32:open_by_handle_at"	},
-[6305] = { 2,	0,		SEN(printargs), "n32:clock_adjtime"		},
-[6306] = { 1,	TD,		SEN(printargs), "n32:syncfs"		},
-[6307] = { 4,	TN,		SEN(printargs), "n32:sendmmsg"		},
-[6308] = { 2,	TD,		SEN(printargs), "n32:setns"			},
-[6309] = { 6,	0,		SEN(printargs), "n32:process_vm_readv"	},
-[6310] = { 6,	0,		SEN(printargs), "n32:process_vm_writev"	},
-[6311] = { 5,	0,		SEN(printargs), "n32:kcmp"			},
-[6312] = { 3,	TD,		SEN(printargs), "n32:finit_module"		},
-[6313] = { 3,	0,		SEN(printargs), "n32:sched_setattr"		},
-[6314] = { 4,	0,		SEN(printargs), "n32:sched_getattr"		},
-[6315] = { 5,	TD|TF,		SEN(printargs), "n32:renameat2"		},
-[6316] = { 3,	0,		SEN(printargs), "n32:seccomp"		},
-[6317] = { 3,	0,		SEN(printargs), "n32:getrandom"		},
-[6318] = { 2,	TD,		SEN(printargs), "n32:memfd_create"		},
-[6319] = { 3,	TD,		SEN(printargs), "n32:bpf"			},
-[6320] = { 5,	TD|TF|TP|SE|SI,	SEN(printargs), "n32:execveat"		},
-[6321] = { 1,	TD,		SEN(printargs), "n32:userfaultfd"		},
-[6322] = { 2,	0,		SEN(printargs), "n32:membarrier"		},
-[6323] = { 3,	TM,		SEN(printargs), "n32:mlock2"		},
-[6324] = { 6,	TD,		SEN(printargs), "n32:copy_file_range"	},
-[6325] = { 6,	TD,		SEN(printargs), "n32:preadv2"		},
-[6326] = { 6,	TD,		SEN(printargs), "n32:pwritev2"		},
-[6327] = { 4,	TM|SI,		SEN(printargs), "n32:pkey_mprotect"		},
-[6328] = { 2,	0,		SEN(printargs), "n32:pkey_alloc"		},
-[6329] = { 1,	0,		SEN(printargs), "n32:pkey_free"		},
-[6330] = { 5,	TD|TF|TSTA,	SEN(printargs), "n32:statx"			},
diff --git a/linux/mips/syscallent-n64-stub.h b/linux/mips/syscallent-n64-stub.h
deleted file mode 100644
index 4853e8e..0000000
--- a/linux/mips/syscallent-n64-stub.h
+++ /dev/null
@@ -1,327 +0,0 @@
-[5000] = { 3,	TD,		SEN(printargs), "n64:read"			}, /* start of Linux N64 */
-[5001] = { 3,	TD,		SEN(printargs), "n64:write"			},
-[5002] = { 3,	TD|TF,		SEN(printargs), "n64:open"			},
-[5003] = { 1,	TD,		SEN(printargs), "n64:close"			},
-[5004] = { 2,	TF|TST|TSTA,	SEN(printargs), "n64:stat"			},
-[5005] = { 2,	TD|TFST|TSTA,	SEN(printargs), "n64:fstat"			},
-[5006] = { 2,	TF|TLST|TSTA,	SEN(printargs), "n64:lstat"			},
-[5007] = { 3,	TD,		SEN(printargs), "n64:poll"			},
-[5008] = { 3,	TD,		SEN(printargs), "n64:lseek"			},
-[5009] = { 6,	TD|TM|SI,	SEN(printargs), "n64:mmap"			},
-[5010] = { 3,	TM|SI,		SEN(printargs), "n64:mprotect"		},
-[5011] = { 2,	TM|SI,		SEN(printargs), "n64:munmap"		},
-[5012] = { 1,	TM|SI,		SEN(printargs), "n64:brk"			},
-[5013] = { 4,	TS,		SEN(printargs), "n64:rt_sigaction"		},
-[5014] = { 4,	TS,		SEN(printargs), "n64:rt_sigprocmask"	},
-[5015] = { 3,	TD,		SEN(printargs), "n64:ioctl"			},
-[5016] = { 4,	TD,		SEN(printargs), "n64:pread64"		},
-[5017] = { 4,	TD,		SEN(printargs), "n64:pwrite64"		},
-[5018] = { 3,	TD,		SEN(printargs), "n64:readv"			},
-[5019] = { 3,	TD,		SEN(printargs), "n64:writev"		},
-[5020] = { 2,	TF,		SEN(printargs), "n64:access"		},
-[5021] = { 0,	TD,		SEN(printargs), "n64:pipe"			},
-[5022] = { 5,	TD,		SEN(printargs), "n64:_newselect"		},
-[5023] = { 0,	0,		SEN(printargs), "n64:sched_yield"		},
-[5024] = { 5,	TM|SI,		SEN(printargs), "n64:mremap"		},
-[5025] = { 3,	TM,		SEN(printargs), "n64:msync"			},
-[5026] = { 3,	TM,		SEN(printargs), "n64:mincore"		},
-[5027] = { 3,	TM,		SEN(printargs), "n64:madvise"		},
-[5028] = { 3,	TI,		SEN(printargs), "n64:shmget"		},
-[5029] = { 3,	TI|TM|SI,	SEN(printargs), "n64:shmat"			},
-[5030] = { 3,	TI,		SEN(printargs), "n64:shmctl"		},
-[5031] = { 1,	TD,		SEN(printargs), "n64:dup"			},
-[5032] = { 2,	TD,		SEN(printargs), "n64:dup2"			},
-[5033] = { 0,	TS,		SEN(printargs), "n64:pause"			},
-[5034] = { 2,	0,		SEN(printargs), "n64:nanosleep"		},
-[5035] = { 2,	0,		SEN(printargs), "n64:getitimer"		},
-[5036] = { 3,	0,		SEN(printargs), "n64:setitimer"		},
-[5037] = { 1,	0,		SEN(printargs), "n64:alarm"			},
-[5038] = { 0,	NF,		SEN(printargs), "n64:getpid"		},
-[5039] = { 4,	TD|TN,		SEN(printargs), "n64:sendfile"		},
-[5040] = { 3,	TN,		SEN(printargs), "n64:socket"		},
-[5041] = { 3,	TN,		SEN(printargs), "n64:connect"		},
-[5042] = { 3,	TN,		SEN(printargs), "n64:accept"		},
-[5043] = { 6,	TN,		SEN(printargs), "n64:sendto"		},
-[5044] = { 6,	TN,		SEN(printargs), "n64:recvfrom"		},
-[5045] = { 3,	TN,		SEN(printargs), "n64:sendmsg"		},
-[5046] = { 3,	TN,		SEN(printargs), "n64:recvmsg"		},
-[5047] = { 2,	TN,		SEN(printargs), "n64:shutdown"		},
-[5048] = { 3,	TN,		SEN(printargs), "n64:bind"			},
-[5049] = { 2,	TN,		SEN(printargs), "n64:listen"		},
-[5050] = { 3,	TN,		SEN(printargs), "n64:getsockname"		},
-[5051] = { 3,	TN,		SEN(printargs), "n64:getpeername"		},
-[5052] = { 4,	TN,		SEN(printargs), "n64:socketpair"		},
-[5053] = { 5,	TN,		SEN(printargs), "n64:setsockopt"		},
-[5054] = { 5,	TN,		SEN(printargs), "n64:getsockopt"		},
-[5055] = { 5,	TP,		SEN(printargs), "n64:clone"			},
-[5056] = { 0,	TP,		SEN(printargs), "n64:fork"			},
-[5057] = { 3,	TF|TP|SE|SI,	SEN(printargs), "n64:execve"		},
-[5058] = { 1,	TP|SE,		SEN(printargs), "n64:exit"			},
-[5059] = { 4,	TP,		SEN(printargs), "n64:wait4"			},
-[5060] = { 2,	TS,		SEN(printargs), "n64:kill"			},
-[5061] = { 1,	0,		SEN(printargs), "n64:uname"			},
-[5062] = { 3,	TI,		SEN(printargs), "n64:semget"		},
-[5063] = { 3,	TI,		SEN(printargs), "n64:semop"			},
-[5064] = { 4,	TI,		SEN(printargs), "n64:semctl"		},
-[5065] = { 1,	TI|TM|SI,	SEN(printargs), "n64:shmdt"			},
-[5066] = { 2,	TI,		SEN(printargs), "n64:msgget"		},
-[5067] = { 4,	TI,		SEN(printargs), "n64:msgsnd"		},
-[5068] = { 5,	TI,		SEN(printargs), "n64:msgrcv"		},
-[5069] = { 3,	TI,		SEN(printargs), "n64:msgctl"		},
-[5070] = { 3,	TD,		SEN(printargs), "n64:fcntl"			},
-[5071] = { 2,	TD,		SEN(printargs), "n64:flock"			},
-[5072] = { 1,	TD,		SEN(printargs), "n64:fsync"			},
-[5073] = { 1,	TD,		SEN(printargs), "n64:fdatasync"		},
-[5074] = { 2,	TF,		SEN(printargs), "n64:truncate"		},
-[5075] = { 2,	TD,		SEN(printargs), "n64:ftruncate"		},
-[5076] = { 3,	TD,		SEN(printargs), "n64:getdents"		},
-[5077] = { 2,	TF,		SEN(printargs), "n64:getcwd"		},
-[5078] = { 1,	TF,		SEN(printargs), "n64:chdir"			},
-[5079] = { 1,	TD,		SEN(printargs), "n64:fchdir"		},
-[5080] = { 2,	TF,		SEN(printargs), "n64:rename"		},
-[5081] = { 2,	TF,		SEN(printargs), "n64:mkdir"			},
-[5082] = { 1,	TF,		SEN(printargs), "n64:rmdir"			},
-[5083] = { 2,	TD|TF,		SEN(printargs), "n64:creat"			},
-[5084] = { 2,	TF,		SEN(printargs), "n64:link"			},
-[5085] = { 1,	TF,		SEN(printargs), "n64:unlink"		},
-[5086] = { 2,	TF,		SEN(printargs), "n64:symlink"		},
-[5087] = { 3,	TF,		SEN(printargs), "n64:readlink"		},
-[5088] = { 2,	TF,		SEN(printargs), "n64:chmod"			},
-[5089] = { 2,	TD,		SEN(printargs), "n64:fchmod"		},
-[5090] = { 3,	TF,		SEN(printargs), "n64:chown"			},
-[5091] = { 3,	TD,		SEN(printargs), "n64:fchown"		},
-[5092] = { 3,	TF,		SEN(printargs), "n64:lchown"		},
-[5093] = { 1,	NF,		SEN(printargs), "n64:umask"			},
-[5094] = { 2,	0,		SEN(printargs), "n64:gettimeofday"		},
-[5095] = { 2,	0,		SEN(printargs), "n64:getrlimit"		},
-[5096] = { 2,	0,		SEN(printargs), "n64:getrusage"		},
-[5097] = { 1,	0,		SEN(printargs), "n64:sysinfo"		},
-[5098] = { 1,	0,		SEN(printargs), "n64:times"			},
-[5099] = { 4,	0,		SEN(printargs), "n64:ptrace"		},
-[5100] = { 0,	NF,		SEN(printargs), "n64:getuid"		},
-[5101] = { 3,	0,		SEN(printargs), "n64:syslog"		},
-[5102] = { 0,	NF,		SEN(printargs), "n64:getgid"		},
-[5103] = { 1,	0,		SEN(printargs), "n64:setuid"		},
-[5104] = { 1,	0,		SEN(printargs), "n64:setgid"		},
-[5105] = { 0,	NF,		SEN(printargs), "n64:geteuid"		},
-[5106] = { 0,	NF,		SEN(printargs), "n64:getegid"		},
-[5107] = { 2,	0,		SEN(printargs), "n64:setpgid"		},
-[5108] = { 0,	NF,		SEN(printargs), "n64:getppid"		},
-[5109] = { 0,	0,		SEN(printargs), "n64:getpgrp"		},
-[5110] = { 0,	0,		SEN(printargs), "n64:setsid"		},
-[5111] = { 2,	0,		SEN(printargs), "n64:setreuid"		},
-[5112] = { 2,	0,		SEN(printargs), "n64:setregid"		},
-[5113] = { 2,	0,		SEN(printargs), "n64:getgroups"		},
-[5114] = { 2,	0,		SEN(printargs), "n64:setgroups"		},
-[5115] = { 3,	0,		SEN(printargs), "n64:setresuid"		},
-[5116] = { 3,	0,		SEN(printargs), "n64:getresuid"		},
-[5117] = { 3,	0,		SEN(printargs), "n64:setresgid"		},
-[5118] = { 3,	0,		SEN(printargs), "n64:getresgid"		},
-[5119] = { 1,	0,		SEN(printargs), "n64:getpgid"		},
-[5120] = { 1,	NF,		SEN(printargs), "n64:setfsuid"		},
-[5121] = { 1,	NF,		SEN(printargs), "n64:setfsgid"		},
-[5122] = { 1,	0,		SEN(printargs), "n64:getsid"		},
-[5123] = { 2,	0,		SEN(printargs), "n64:capget"		},
-[5124] = { 2,	0,		SEN(printargs), "n64:capset"		},
-[5125] = { 2,	TS,		SEN(printargs), "n64:rt_sigpending"		},
-[5126] = { 4,	TS,		SEN(printargs), "n64:rt_sigtimedwait"	},
-[5127] = { 3,	TS,		SEN(printargs), "n64:rt_sigqueueinfo"	},
-[5128] = { 2,	TS,		SEN(printargs), "n64:rt_sigsuspend"		},
-[5129] = { 2,	TS,		SEN(printargs), "n64:sigaltstack"		},
-[5130] = { 2,	TF,		SEN(printargs), "n64:utime"			},
-[5131] = { 3,	TF,		SEN(printargs), "n64:mknod"			},
-[5132] = { 1,	NF,		SEN(printargs), "n64:personality"		},
-[5133] = { 2,	TSFA,		SEN(printargs), "n64:ustat"			},
-[5134] = { 2,	TF|TSF|TSFA,	SEN(printargs), "n64:statfs"		},
-[5135] = { 2,	TD|TFSF|TSFA,	SEN(printargs), "n64:fstatfs"		},
-[5136] = { 3,	0,		SEN(printargs), "n64:sysfs"			},
-[5137] = { 2,	0,		SEN(printargs), "n64:getpriority"		},
-[5138] = { 3,	0,		SEN(printargs), "n64:setpriority"		},
-[5139] = { 2,	0,		SEN(printargs), "n64:sched_setparam"	},
-[5140] = { 2,	0,		SEN(printargs), "n64:sched_getparam"	},
-[5141] = { 3,	0,		SEN(printargs), "n64:sched_setscheduler"	},
-[5142] = { 1,	0,		SEN(printargs), "n64:sched_getscheduler"	},
-[5143] = { 1,	0,		SEN(printargs), "n64:sched_get_priority_max"},
-[5144] = { 1,	0,		SEN(printargs), "n64:sched_get_priority_min"},
-[5145] = { 2,	0,		SEN(printargs), "n64:sched_rr_get_interval"	},
-[5146] = { 2,	TM,		SEN(printargs), "n64:mlock"			},
-[5147] = { 2,	TM,		SEN(printargs), "n64:munlock"		},
-[5148] = { 1,	TM,		SEN(printargs), "n64:mlockall"		},
-[5149] = { 0,	TM,		SEN(printargs), "n64:munlockall"		},
-[5150] = { 0,	0,		SEN(printargs), "n64:vhangup"		},
-[5151] = { 2,	TF,		SEN(printargs), "n64:pivot_root"		},
-[5152] = { 1,	0,		SEN(printargs), "n64:_sysctl"		},
-[5153] = { 5,	0,		SEN(printargs), "n64:prctl"			},
-[5154] = { 1,	0,		SEN(printargs), "n64:adjtimex"		},
-[5155] = { 2,	0,		SEN(printargs), "n64:setrlimit"		},
-[5156] = { 1,	TF,		SEN(printargs), "n64:chroot"		},
-[5157] = { 0,	0,		SEN(printargs), "n64:sync"			},
-[5158] = { 1,	TF,		SEN(printargs), "n64:acct"			},
-[5159] = { 2,	0,		SEN(printargs), "n64:settimeofday"		},
-[5160] = { 5,	TF,		SEN(printargs), "n64:mount"			},
-[5161] = { 2,	TF,		SEN(printargs), "n64:umount2"		},
-[5162] = { 2,	TF,		SEN(printargs), "n64:swapon"		},
-[5163] = { 1,	TF,		SEN(printargs), "n64:swapoff"		},
-[5164] = { 4,	0,		SEN(printargs), "n64:reboot"		},
-[5165] = { 2,	0,		SEN(printargs), "n64:sethostname"		},
-[5166] = { 2,	0,		SEN(printargs), "n64:setdomainname"		},
-[5167] = { 2,	0,		SEN(printargs), "n64:create_module"		},
-[5168] = { 3,	0,		SEN(printargs), "n64:init_module"		},
-[5169] = { 2,	0,		SEN(printargs), "n64:delete_module"		},
-[5170] = { 1,	0,		SEN(printargs), "n64:get_kernel_syms"	},
-[5171] = { 5,	0,		SEN(printargs), "n64:query_module"		},
-[5172] = { 4,	TF,		SEN(printargs), "n64:quotactl"		},
-[5173] = { 3,	0,		SEN(printargs), "n64:nfsservctl"		},
-[5174] = { 5,	TN,		SEN(printargs), "n64:getpmsg"		},
-[5175] = { 5,	TN,		SEN(printargs), "n64:putpmsg"		},
-[5176] = { 0,	0,		SEN(printargs), "n64:afs_syscall"		},
-[5177] = { 0,	0,		SEN(printargs), "n64:reserved177"		},
-[5178] = { 0,	NF,		SEN(printargs), "n64:gettid"		},
-[5179] = { 3,	TD,		SEN(printargs), "n64:readahead"		},
-[5180] = { 5,	TF,		SEN(printargs), "n64:setxattr"		},
-[5181] = { 5,	TF,		SEN(printargs), "n64:lsetxattr"		},
-[5182] = { 5,	TD,		SEN(printargs), "n64:fsetxattr"		},
-[5183] = { 4,	TF,		SEN(printargs), "n64:getxattr"		},
-[5184] = { 4,	TF,		SEN(printargs), "n64:lgetxattr"		},
-[5185] = { 4,	TD,		SEN(printargs), "n64:fgetxattr"		},
-[5186] = { 3,	TF,		SEN(printargs), "n64:listxattr"		},
-[5187] = { 3,	TF,		SEN(printargs), "n64:llistxattr"		},
-[5188] = { 3,	TD,		SEN(printargs), "n64:flistxattr"		},
-[5189] = { 2,	TF,		SEN(printargs), "n64:removexattr"		},
-[5190] = { 2,	TF,		SEN(printargs), "n64:lremovexattr"		},
-[5191] = { 2,	TD,		SEN(printargs), "n64:fremovexattr"		},
-[5192] = { 2,	TS,		SEN(printargs), "n64:tkill"			},
-[5193] = { 1,	0,		SEN(printargs), "n64:time"			},
-[5194] = { 6,	0,		SEN(printargs), "n64:futex"			},
-[5195] = { 3,	0,		SEN(printargs), "n64:sched_setaffinity"	},
-[5196] = { 3,	0,		SEN(printargs), "n64:sched_getaffinity"	},
-[5197] = { 3,	0,		SEN(printargs), "n64:cacheflush"		},
-[5198] = { 3,	0,		SEN(printargs), "n64:cachectl"		},
-[5199] = { 4,	0,		SEN(printargs), "n64:sysmips"		},
-[5200] = { 2,	TM,		SEN(printargs), "n64:io_setup"		},
-[5201] = { 1,	TM,		SEN(printargs), "n64:io_destroy"		},
-[5202] = { 5,	0,		SEN(printargs), "n64:io_getevents"		},
-[5203] = { 3,	0,		SEN(printargs), "n64:io_submit"		},
-[5204] = { 3,	0,		SEN(printargs), "n64:io_cancel"		},
-[5205] = { 1,	TP|SE,		SEN(printargs), "n64:exit_group"		},
-[5206] = { 3,	0,		SEN(printargs), "n64:lookup_dcookie"	},
-[5207] = { 1,	TD,		SEN(printargs), "n64:epoll_create"		},
-[5208] = { 4,	TD,		SEN(printargs), "n64:epoll_ctl"		},
-[5209] = { 4,	TD,		SEN(printargs), "n64:epoll_wait"		},
-[5210] = { 5,	TM|SI,		SEN(printargs), "n64:remap_file_pages"	},
-[5211] = { 0,	TS,		SEN(printargs), "n64:rt_sigreturn"		},
-[5212] = { 1,	0,		SEN(printargs), "n64:set_tid_address"	},
-[5213] = { 0,	0,		SEN(printargs), "n64:restart_syscall"	},
-[5214] = { 4,	TI,		SEN(printargs), "n64:semtimedop"		},
-[5215] = { 4,	TD,		SEN(printargs), "n64:fadvise64"		},
-[5216] = { 3,	0,		SEN(printargs), "n64:timer_create"		},
-[5217] = { 4,	0,		SEN(printargs), "n64:timer_settime"		},
-[5218] = { 2,	0,		SEN(printargs), "n64:timer_gettime"		},
-[5219] = { 1,	0,		SEN(printargs), "n64:timer_getoverrun"	},
-[5220] = { 1,	0,		SEN(printargs), "n64:timer_delete"		},
-[5221] = { 2,	0,		SEN(printargs), "n64:clock_settime"		},
-[5222] = { 2,	0,		SEN(printargs), "n64:clock_gettime"		},
-[5223] = { 2,	0,		SEN(printargs), "n64:clock_getres"		},
-[5224] = { 4,	0,		SEN(printargs), "n64:clock_nanosleep"	},
-[5225] = { 3,	TS,		SEN(printargs), "n64:tgkill"		},
-[5226] = { 2,	TF,		SEN(printargs), "n64:utimes"		},
-[5227] = { 6,	TM,		SEN(printargs), "n64:mbind"			},
-[5228] = { 5,	TM,		SEN(printargs), "n64:get_mempolicy"		},
-[5229] = { 3,	TM,		SEN(printargs), "n64:set_mempolicy"		},
-[5230] = { 4,	0,		SEN(printargs), "n64:mq_open"		},
-[5231] = { 1,	0,		SEN(printargs), "n64:mq_unlink"		},
-[5232] = { 5,	0,		SEN(printargs), "n64:mq_timedsend"		},
-[5233] = { 5,	0,		SEN(printargs), "n64:mq_timedreceive"	},
-[5234] = { 2,	0,		SEN(printargs), "n64:mq_notify"		},
-[5235] = { 3,	0,		SEN(printargs), "n64:mq_getsetattr"		},
-[5236] = { 5,	0,		SEN(printargs), "n64:vserver"		},
-[5237] = { 5,	TP,		SEN(printargs), "n64:waitid"		},
-[5238] = { },
-[5239] = { 5,	0,		SEN(printargs), "n64:add_key"		},
-[5240] = { 4,	0,		SEN(printargs), "n64:request_key"		},
-[5241] = { 5,	0,		SEN(printargs), "n64:keyctl"		},
-[5242] = { 1,	0,		SEN(printargs), "n64:set_thread_area"	},
-[5243] = { 0,	TD,		SEN(printargs), "n64:inotify_init"		},
-[5244] = { 3,	TD,		SEN(printargs), "n64:inotify_add_watch"	},
-[5245] = { 2,	TD,		SEN(printargs), "n64:inotify_rm_watch"	},
-[5246] = { 4,	TM,		SEN(printargs), "n64:migrate_pages"		},
-[5247] = { 4,	TD|TF,		SEN(printargs), "n64:openat"		},
-[5248] = { 3,	TD|TF,		SEN(printargs), "n64:mkdirat"		},
-[5249] = { 4,	TD|TF,		SEN(printargs), "n64:mknodat"		},
-[5250] = { 5,	TD|TF,		SEN(printargs), "n64:fchownat"		},
-[5251] = { 3,	TD|TF,		SEN(printargs), "n64:futimesat"		},
-[5252] = { 4,	TD|TF|TFST|TSTA,SEN(printargs), "n64:newfstatat"		},
-[5253] = { 3,	TD|TF,		SEN(printargs), "n64:unlinkat"		},
-[5254] = { 4,	TD|TF,		SEN(printargs), "n64:renameat"		},
-[5255] = { 5,	TD|TF,		SEN(printargs), "n64:linkat"		},
-[5256] = { 3,	TD|TF,		SEN(printargs), "n64:symlinkat"		},
-[5257] = { 4,	TD|TF,		SEN(printargs), "n64:readlinkat"		},
-[5258] = { 3,	TD|TF,		SEN(printargs), "n64:fchmodat"		},
-[5259] = { 3,	TD|TF,		SEN(printargs), "n64:faccessat"		},
-[5260] = { 6,	TD,		SEN(printargs), "n64:pselect6"		},
-[5261] = { 5,	TD,		SEN(printargs), "n64:ppoll"			},
-[5262] = { 1,	TP,		SEN(printargs), "n64:unshare"		},
-[5263] = { 6,	TD,		SEN(printargs), "n64:splice"		},
-[5264] = { 4,	TD,		SEN(printargs), "n64:sync_file_range"	},
-[5265] = { 4,	TD,		SEN(printargs), "n64:tee"			},
-[5266] = { 4,	TD,		SEN(printargs), "n64:vmsplice"		},
-[5267] = { 6,	TM,		SEN(printargs), "n64:move_pages"		},
-[5268] = { 2,	0,		SEN(printargs), "n64:set_robust_list"	},
-[5269] = { 3,	0,		SEN(printargs), "n64:get_robust_list"	},
-[5270] = { 4,	0,		SEN(printargs), "n64:kexec_load"		},
-[5271] = { 3,	0,		SEN(printargs), "n64:getcpu"		},
-[5272] = { 6,	TD,		SEN(printargs), "n64:epoll_pwait"		},
-[5273] = { 3,	0,		SEN(printargs), "n64:ioprio_set"		},
-[5274] = { 2,	0,		SEN(printargs), "n64:ioprio_get"		},
-[5275] = { 4,	TD|TF,		SEN(printargs), "n64:utimensat"		},
-[5276] = { 3,	TD|TS,		SEN(printargs), "n64:signalfd"		},
-[5277] = { 4,	TD,		SEN(printargs), "n64:timerfd"		},
-[5278] = { 1,	TD,		SEN(printargs), "n64:eventfd"		},
-[5279] = { 4,	TD,		SEN(printargs), "n64:fallocate"		},
-[5280] = { 2,	TD,		SEN(printargs), "n64:timerfd_create"	},
-[5281] = { 2,	TD,		SEN(printargs), "n64:timerfd_gettime"	},
-[5282] = { 4,	TD,		SEN(printargs), "n64:timerfd_settime"	},
-[5283] = { 4,	TD|TS,		SEN(printargs), "n64:signalfd4"		},
-[5284] = { 2,	TD,		SEN(printargs), "n64:eventfd2"		},
-[5285] = { 1,	TD,		SEN(printargs), "n64:epoll_create1"		},
-[5286] = { 3,	TD,		SEN(printargs), "n64:dup3"			},
-[5287] = { 2,	TD,		SEN(printargs), "n64:pipe2"			},
-[5288] = { 1,	TD,		SEN(printargs), "n64:inotify_init1"		},
-[5289] = { 4,	TD,		SEN(printargs), "n64:preadv"		},
-[5290] = { 4,	TD,		SEN(printargs), "n64:pwritev"		},
-[5291] = { 4,	TP|TS,		SEN(printargs), "n64:rt_tgsigqueueinfo"	},
-[5292] = { 5,	TD,		SEN(printargs), "n64:perf_event_open"	},
-[5293] = { 4,	TN,		SEN(printargs), "n64:accept4"		},
-[5294] = { 5,	TN,		SEN(printargs), "n64:recvmmsg"		},
-[5295] = { 2,	TD,		SEN(printargs), "n64:fanotify_init"		},
-[5296] = { 5,	TD|TF,		SEN(printargs), "n64:fanotify_mark"		},
-[5297] = { 4,	0,		SEN(printargs), "n64:prlimit64"		},
-[5298] = { 5,	TD|TF,		SEN(printargs), "n64:name_to_handle_at"	},
-[5299] = { 3,	TD,		SEN(printargs), "n64:open_by_handle_at"	},
-[5300] = { 2,	0,		SEN(printargs), "n64:clock_adjtime"		},
-[5301] = { 1,	TD,		SEN(printargs), "n64:syncfs"		},
-[5302] = { 4,	TN,		SEN(printargs), "n64:sendmmsg"		},
-[5303] = { 2,	TD,		SEN(printargs), "n64:setns"			},
-[5304] = { 6,	0,		SEN(printargs), "n64:process_vm_readv"	},
-[5305] = { 6,	0,		SEN(printargs), "n64:process_vm_writev"	},
-[5306] = { 5,	0,		SEN(printargs), "n64:kcmp"			},
-[5307] = { 3,	TD,		SEN(printargs), "n64:finit_module"		},
-[5308] = { 3,	TD,		SEN(printargs), "n64:getdents64"		},
-[5309] = { 3,	0,		SEN(printargs), "n64:sched_setattr"		},
-[5310] = { 4,	0,		SEN(printargs), "n64:sched_getattr"		},
-[5311] = { 5,	TD|TF,		SEN(printargs), "n64:renameat2"		},
-[5312] = { 3,	0,		SEN(printargs), "n64:seccomp"		},
-[5313] = { 3,	0,		SEN(printargs), "n64:getrandom"		},
-[5314] = { 2,	TD,		SEN(printargs), "n64:memfd_create"		},
-[5315] = { 3,	TD,		SEN(printargs), "n64:bpf"			},
-[5316] = { 5,	TD|TF|TP|SE|SI,	SEN(printargs), "n64:execveat"		},
-[5317] = { 1,	TD,		SEN(printargs), "n64:userfaultfd"		},
-[5318] = { 2,	0,		SEN(printargs), "n64:membarrier"		},
-[5319] = { 3,	TM,		SEN(printargs), "n64:mlock2"		},
-[5320] = { 6,	TD,		SEN(printargs), "n64:copy_file_range"	},
-[5321] = { 6,	TD,		SEN(printargs), "n64:preadv2"		},
-[5322] = { 6,	TD,		SEN(printargs), "n64:pwritev2"		},
-[5323] = { 4,	TM|SI,		SEN(printargs), "n64:pkey_mprotect"		},
-[5324] = { 2,	0,		SEN(printargs), "n64:pkey_alloc"		},
-[5325] = { 1,	0,		SEN(printargs), "n64:pkey_free"		},
-[5326] = { 5,	TD|TF|TSTA,	SEN(printargs), "n64:statx"			},
diff --git a/linux/mips/syscallent-o32-stub.h b/linux/mips/syscallent-o32-stub.h
deleted file mode 100644
index 04296fa..0000000
--- a/linux/mips/syscallent-o32-stub.h
+++ /dev/null
@@ -1,367 +0,0 @@
-[4000] = { MA,	0,		SEN(printargs), "o32:syscall"		}, /* start of Linux o32 */
-[4001] = { 1,	TP|SE,		SEN(printargs), "o32:exit"			},
-[4002] = { 0,	TP,		SEN(printargs), "o32:fork"			},
-[4003] = { 3,	TD,		SEN(printargs), "o32:read"			},
-[4004] = { 3,	TD,		SEN(printargs), "o32:write"			},
-[4005] = { 3,	TD|TF,		SEN(printargs), "o32:open"			},
-[4006] = { 1,	TD,		SEN(printargs), "o32:close"			},
-[4007] = { 3,	TP,		SEN(printargs), "o32:waitpid"		},
-[4008] = { 2,	TD|TF,		SEN(printargs), "o32:creat"			},
-[4009] = { 2,	TF,		SEN(printargs), "o32:link"			},
-[4010] = { 1,	TF,		SEN(printargs), "o32:unlink"		},
-[4011] = { 3,	TF|TP|SE|SI,	SEN(printargs), "o32:execve"		},
-[4012] = { 1,	TF,		SEN(printargs), "o32:chdir"			},
-[4013] = { 1,	0,		SEN(printargs), "o32:time"			},
-[4014] = { 3,	TF,		SEN(printargs), "o32:mknod"			},
-[4015] = { 2,	TF,		SEN(printargs), "o32:chmod"			},
-[4016] = { 3,	TF,		SEN(printargs), "o32:lchown"		},
-[4017] = { 0,	TM,		SEN(printargs), "o32:break"			},
-[4018] = { 2,	TF|TST|TSTA,	SEN(printargs), "o32:oldstat"		},
-[4019] = { 3,	TD,		SEN(printargs), "o32:lseek"			},
-[4020] = { 0,	NF,		SEN(printargs), "o32:getpid"		},
-[4021] = { 5,	TF,		SEN(printargs), "o32:mount"			},
-[4022] = { 1,	TF,		SEN(printargs), "o32:umount"		},
-[4023] = { 1,	0,		SEN(printargs), "o32:setuid"		},
-[4024] = { 0,	NF,		SEN(printargs), "o32:getuid"		},
-[4025] = { 1,	0,		SEN(printargs), "o32:stime"			},
-[4026] = { 4,	0,		SEN(printargs), "o32:ptrace"		},
-[4027] = { 1,	0,		SEN(printargs), "o32:alarm"			},
-[4028] = { 2,	TD|TFST|TSTA,	SEN(printargs), "o32:oldfstat"		},
-[4029] = { 0,	TS,		SEN(printargs), "o32:pause"			},
-[4030] = { 2,	TF,		SEN(printargs), "o32:utime"			},
-[4031] = { 0,	0,		SEN(printargs), "o32:stty"			},
-[4032] = { 0,	0,		SEN(printargs), "o32:gtty"			},
-[4033] = { 2,	TF,		SEN(printargs), "o32:access"		},
-[4034] = { 1,	0,		SEN(printargs), "o32:nice"			},
-[4035] = { 1,	0,		SEN(printargs), "o32:ftime"			},
-[4036] = { 0,	0,		SEN(printargs), "o32:sync"			},
-[4037] = { 2,	TS,		SEN(printargs), "o32:kill"			},
-[4038] = { 2,	TF,		SEN(printargs), "o32:rename"		},
-[4039] = { 2,	TF,		SEN(printargs), "o32:mkdir"			},
-[4040] = { 1,	TF,		SEN(printargs), "o32:rmdir"			},
-[4041] = { 1,	TD,		SEN(printargs), "o32:dup"			},
-[4042] = { 0,	TD,		SEN(printargs), "o32:pipe"			},
-[4043] = { 1,	0,		SEN(printargs), "o32:times"			},
-[4044] = { 0,	0,		SEN(printargs), "o32:prof"			},
-[4045] = { 1,	TM|SI,		SEN(printargs), "o32:brk"			},
-[4046] = { 1,	0,		SEN(printargs), "o32:setgid"		},
-[4047] = { 0,	NF,		SEN(printargs), "o32:getgid"		},
-[4048] = { 2,	TS,		SEN(printargs), "o32:signal"		},
-[4049] = { 0,	NF,		SEN(printargs), "o32:geteuid"		},
-[4050] = { 0,	NF,		SEN(printargs), "o32:getegid"		},
-[4051] = { 1,	TF,		SEN(printargs), "o32:acct"			},
-[4052] = { 2,	TF,		SEN(printargs), "o32:umount2"		},
-[4053] = { 0,	0,		SEN(printargs), "o32:lock"			},
-[4054] = { 3,	TD,		SEN(printargs), "o32:ioctl"			},
-[4055] = { 3,	TD,		SEN(printargs), "o32:fcntl"			},
-[4056] = { 0,	0,		SEN(printargs), "o32:mpx"			},
-[4057] = { 2,	0,		SEN(printargs), "o32:setpgid"		},
-[4058] = { 0,	0,		SEN(printargs), "o32:ulimit"		},
-[4059] = { 1,	0,		SEN(printargs), "o32:oldolduname"		},
-[4060] = { 1,	NF,		SEN(printargs), "o32:umask"			},
-[4061] = { 1,	TF,		SEN(printargs), "o32:chroot"		},
-[4062] = { 2,	TSFA,		SEN(printargs), "o32:ustat"			},
-[4063] = { 2,	TD,		SEN(printargs), "o32:dup2"			},
-[4064] = { 0,	NF,		SEN(printargs), "o32:getppid"		},
-[4065] = { 0,	0,		SEN(printargs), "o32:getpgrp"		},
-[4066] = { 0,	0,		SEN(printargs), "o32:setsid"		},
-[4067] = { 3,	TS,		SEN(printargs), "o32:sigaction"		},
-[4068] = { 0,	TS,		SEN(printargs), "o32:sgetmask"		},
-[4069] = { 1,	TS,		SEN(printargs), "o32:ssetmask"		},
-[4070] = { 2,	0,		SEN(printargs), "o32:setreuid"		},
-[4071] = { 2,	0,		SEN(printargs), "o32:setregid"		},
-[4072] = { 1,	TS,		SEN(printargs), "o32:sigsuspend"		},
-[4073] = { 1,	TS,		SEN(printargs), "o32:sigpending"		},
-[4074] = { 2,	0,		SEN(printargs), "o32:sethostname"		},
-[4075] = { 2,	0,		SEN(printargs), "o32:setrlimit"		},
-[4076] = { 2,	0,		SEN(printargs), "o32:getrlimit"		},
-[4077] = { 2,	0,		SEN(printargs), "o32:getrusage"		},
-[4078] = { 2,	0,		SEN(printargs), "o32:gettimeofday"		},
-[4079] = { 2,	0,		SEN(printargs), "o32:settimeofday"		},
-[4080] = { 2,	0,		SEN(printargs), "o32:getgroups"		},
-[4081] = { 2,	0,		SEN(printargs), "o32:setgroups"		},
-[4082] = { 0,	0,		SEN(printargs), "o32:reserved82"		},
-[4083] = { 2,	TF,		SEN(printargs), "o32:symlink"		},
-[4084] = { 2,	TF|TLST|TSTA,	SEN(printargs), "o32:oldlstat"		},
-[4085] = { 3,	TF,		SEN(printargs), "o32:readlink"		},
-[4086] = { 1,	TF,		SEN(printargs), "o32:uselib"		},
-[4087] = { 2,	TF,		SEN(printargs), "o32:swapon"		},
-[4088] = { 4,	0,		SEN(printargs), "o32:reboot"		},
-[4089] = { 3,	TD,		SEN(printargs), "o32:readdir"		},
-[4090] = { 6,	TD|TM|SI,	SEN(printargs), "o32:mmap"			},
-[4091] = { 2,	TM|SI,		SEN(printargs), "o32:munmap"		},
-[4092] = { 2,	TF,		SEN(printargs), "o32:truncate"		},
-[4093] = { 2,	TD,		SEN(printargs), "o32:ftruncate"		},
-[4094] = { 2,	TD,		SEN(printargs), "o32:fchmod"		},
-[4095] = { 3,	TD,		SEN(printargs), "o32:fchown"		},
-[4096] = { 2,	0,		SEN(printargs), "o32:getpriority"		},
-[4097] = { 3,	0,		SEN(printargs), "o32:setpriority"		},
-[4098] = { 0,	0,		SEN(printargs), "o32:profil"		},
-[4099] = { 2,	TF|TSF|TSFA,	SEN(printargs), "o32:statfs"		},
-[4100] = { 2,	TD|TFSF|TSFA,	SEN(printargs), "o32:fstatfs"		},
-[4101] = { 3,	0,		SEN(printargs), "o32:ioperm"		},
-[4102] = { 2,	TD,		SEN(printargs), "o32:socketcall"		},
-[4103] = { 3,	0,		SEN(printargs), "o32:syslog"		},
-[4104] = { 3,	0,		SEN(printargs), "o32:setitimer"		},
-[4105] = { 2,	0,		SEN(printargs), "o32:getitimer"		},
-[4106] = { 2,	TF|TST|TSTA,	SEN(printargs), "o32:stat"			},
-[4107] = { 2,	TF|TLST|TSTA,	SEN(printargs), "o32:lstat"			},
-[4108] = { 2,	TD|TFST|TSTA,	SEN(printargs), "o32:fstat"			},
-[4109] = { 1,	0,		SEN(printargs), "o32:olduname"		},
-[4110] = { 1,	0,		SEN(printargs), "o32:iopl"			},
-[4111] = { 0,	0,		SEN(printargs), "o32:vhangup"		},
-[4112] = { 0,	0,		SEN(printargs), "o32:idle"			},
-[4113] = { 5,	0,		SEN(printargs), "o32:vm86"			},
-[4114] = { 4,	TP,		SEN(printargs), "o32:wait4"			},
-[4115] = { 1,	TF,		SEN(printargs), "o32:swapoff"		},
-[4116] = { 1,	0,		SEN(printargs), "o32:sysinfo"		},
-[4117] = { 6,	TI,		SEN(printargs), "o32:ipc"			},
-[4118] = { 1,	TD,		SEN(printargs), "o32:fsync"			},
-[4119] = { 0,	TS,		SEN(printargs), "o32:sigreturn"		},
-[4120] = { 5,	TP,		SEN(printargs), "o32:clone"			},
-[4121] = { 2,	0,		SEN(printargs), "o32:setdomainname"		},
-[4122] = { 1,	0,		SEN(printargs), "o32:uname"			},
-[4123] = { 0,	0,		SEN(printargs), "o32:modify_ldt"		},
-[4124] = { 1,	0,		SEN(printargs), "o32:adjtimex"		},
-[4125] = { 3,	TM|SI,		SEN(printargs), "o32:mprotect"		},
-[4126] = { 3,	TS,		SEN(printargs), "o32:sigprocmask"		},
-[4127] = { 2,	0,		SEN(printargs), "o32:create_module"		},
-[4128] = { 3,	0,		SEN(printargs), "o32:init_module"		},
-[4129] = { 2,	0,		SEN(printargs), "o32:delete_module"		},
-[4130] = { 1,	0,		SEN(printargs), "o32:get_kernel_syms"	},
-[4131] = { 4,	TF,		SEN(printargs), "o32:quotactl"		},
-[4132] = { 1,	0,		SEN(printargs), "o32:getpgid"		},
-[4133] = { 1,	TD,		SEN(printargs), "o32:fchdir"		},
-[4134] = { 2,	0,		SEN(printargs), "o32:bdflush"		},
-[4135] = { 3,	0,		SEN(printargs), "o32:sysfs"			},
-[4136] = { 1,	NF,		SEN(printargs), "o32:personality"		},
-[4137] = { 0,	0,		SEN(printargs), "o32:afs_syscall"		},
-[4138] = { 1,	NF,		SEN(printargs), "o32:setfsuid"		},
-[4139] = { 1,	NF,		SEN(printargs), "o32:setfsgid"		},
-[4140] = { 5,	TD,		SEN(printargs), "o32:_llseek"		},
-[4141] = { 3,	TD,		SEN(printargs), "o32:getdents"		},
-[4142] = { 5,	TD,		SEN(printargs), "o32:_newselect"		},
-[4143] = { 2,	TD,		SEN(printargs), "o32:flock"			},
-[4144] = { 3,	TM,		SEN(printargs), "o32:msync"			},
-[4145] = { 3,	TD,		SEN(printargs), "o32:readv"			},
-[4146] = { 3,	TD,		SEN(printargs), "o32:writev"		},
-[4147] = { 3,	0,		SEN(printargs), "o32:cacheflush"		},
-[4148] = { 3,	0,		SEN(printargs), "o32:cachectl"		},
-[4149] = { 4,	0,		SEN(printargs), "o32:sysmips"		},
-[4150] = { 0,	0,		SEN(printargs), "o32:setup"			},
-[4151] = { 1,	0,		SEN(printargs), "o32:getsid"		},
-[4152] = { 1,	TD,		SEN(printargs), "o32:fdatasync"		},
-[4153] = { 1,	0,		SEN(printargs), "o32:_sysctl"		},
-[4154] = { 2,	TM,		SEN(printargs), "o32:mlock"			},
-[4155] = { 2,	TM,		SEN(printargs), "o32:munlock"		},
-[4156] = { 1,	TM,		SEN(printargs), "o32:mlockall"		},
-[4157] = { 0,	TM,		SEN(printargs), "o32:munlockall"		},
-[4158] = { 2,	0,		SEN(printargs), "o32:sched_setparam"	},
-[4159] = { 2,	0,		SEN(printargs), "o32:sched_getparam"	},
-[4160] = { 3,	0,		SEN(printargs), "o32:sched_setscheduler"	},
-[4161] = { 1,	0,		SEN(printargs), "o32:sched_getscheduler"	},
-[4162] = { 0,	0,		SEN(printargs), "o32:sched_yield"		},
-[4163] = { 1,	0,		SEN(printargs), "o32:sched_get_priority_max"},
-[4164] = { 1,	0,		SEN(printargs), "o32:sched_get_priority_min"},
-[4165] = { 2,	0,		SEN(printargs), "o32:sched_rr_get_interval"	},
-[4166] = { 2,	0,		SEN(printargs), "o32:nanosleep"		},
-[4167] = { 5,	TM|SI,		SEN(printargs), "o32:mremap"		},
-[4168] = { 3,	TN,		SEN(printargs), "o32:accept"		},
-[4169] = { 3,	TN,		SEN(printargs), "o32:bind"			},
-[4170] = { 3,	TN,		SEN(printargs), "o32:connect"		},
-[4171] = { 3,	TN,		SEN(printargs), "o32:getpeername"		},
-[4172] = { 3,	TN,		SEN(printargs), "o32:getsockname"		},
-[4173] = { 5,	TN,		SEN(printargs), "o32:getsockopt"		},
-[4174] = { 2,	TN,		SEN(printargs), "o32:listen"		},
-[4175] = { 4,	TN,		SEN(printargs), "o32:recv"			},
-[4176] = { 6,	TN,		SEN(printargs), "o32:recvfrom"		},
-[4177] = { 3,	TN,		SEN(printargs), "o32:recvmsg"		},
-[4178] = { 4,	TN,		SEN(printargs), "o32:send"			},
-[4179] = { 3,	TN,		SEN(printargs), "o32:sendmsg"		},
-[4180] = { 6,	TN,		SEN(printargs), "o32:sendto"		},
-[4181] = { 5,	TN,		SEN(printargs), "o32:setsockopt"		},
-[4182] = { 2,	TN,		SEN(printargs), "o32:shutdown"		},
-[4183] = { 3,	TN,		SEN(printargs), "o32:socket"		},
-[4184] = { 4,	TN,		SEN(printargs), "o32:socketpair"		},
-[4185] = { 3,	0,		SEN(printargs), "o32:setresuid"		},
-[4186] = { 3,	0,		SEN(printargs), "o32:getresuid"		},
-[4187] = { 5,	0,		SEN(printargs), "o32:query_module"		},
-[4188] = { 3,	TD,		SEN(printargs), "o32:poll"			},
-[4189] = { 3,	0,		SEN(printargs), "o32:nfsservctl"		},
-[4190] = { 3,	0,		SEN(printargs), "o32:setresgid"		},
-[4191] = { 3,	0,		SEN(printargs), "o32:getresgid"		},
-[4192] = { 5,	0,		SEN(printargs), "o32:prctl"			},
-[4193] = { 0,	TS,		SEN(printargs), "o32:rt_sigreturn"		},
-[4194] = { 4,	TS,		SEN(printargs), "o32:rt_sigaction"		},
-[4195] = { 4,	TS,		SEN(printargs), "o32:rt_sigprocmask"	},
-[4196] = { 2,	TS,		SEN(printargs), "o32:rt_sigpending"		},
-[4197] = { 4,	TS,		SEN(printargs), "o32:rt_sigtimedwait"	},
-[4198] = { 3,	TS,		SEN(printargs), "o32:rt_sigqueueinfo"	},
-[4199] = { 2,	TS,		SEN(printargs), "o32:rt_sigsuspend"		},
-[4200] = { 6,	TD,		SEN(printargs), "o32:pread64"		},
-[4201] = { 6,	TD,		SEN(printargs), "o32:pwrite64"		},
-[4202] = { 3,	TF,		SEN(printargs), "o32:chown"			},
-[4203] = { 2,	TF,		SEN(printargs), "o32:getcwd"		},
-[4204] = { 2,	0,		SEN(printargs), "o32:capget"		},
-[4205] = { 2,	0,		SEN(printargs), "o32:capset"		},
-[4206] = { 2,	TS,		SEN(printargs), "o32:sigaltstack"		},
-[4207] = { 4,	TD|TN,		SEN(printargs), "o32:sendfile"		},
-[4208] = { 5,	TN,		SEN(printargs), "o32:getpmsg"		},
-[4209] = { 5,	TN,		SEN(printargs), "o32:putpmsg"		},
-[4210] = { 6,	TD|TM|SI,	SEN(printargs), "o32:mmap2"			},
-[4211] = { 4,	TF,		SEN(printargs), "o32:truncate64"		},
-[4212] = { 4,	TD,		SEN(printargs), "o32:ftruncate64"		},
-[4213] = { 2,	TF|TST|TSTA,	SEN(printargs), "o32:stat64"		},
-[4214] = { 2,	TF|TLST|TSTA,	SEN(printargs), "o32:lstat64"		},
-[4215] = { 2,	TD|TFST|TSTA,	SEN(printargs), "o32:fstat64"		},
-[4216] = { 2,	TF,		SEN(printargs), "o32:pivot_root"		},
-[4217] = { 3,	TM,		SEN(printargs), "o32:mincore"		},
-[4218] = { 3,	TM,		SEN(printargs), "o32:madvise"		},
-[4219] = { 3,	TD,		SEN(printargs), "o32:getdents64"		},
-[4220] = { 3,	TD,		SEN(printargs), "o32:fcntl64"		},
-[4221] = { },
-[4222] = { 0,	NF,		SEN(printargs), "o32:gettid"		},
-[4223] = { 5,	TD,		SEN(printargs), "o32:readahead"		},
-[4224] = { 5,	TF,		SEN(printargs), "o32:setxattr"		},
-[4225] = { 5,	TF,		SEN(printargs), "o32:lsetxattr"		},
-[4226] = { 5,	TD,		SEN(printargs), "o32:fsetxattr"		},
-[4227] = { 4,	TF,		SEN(printargs), "o32:getxattr"		},
-[4228] = { 4,	TF,		SEN(printargs), "o32:lgetxattr"		},
-[4229] = { 4,	TD,		SEN(printargs), "o32:fgetxattr"		},
-[4230] = { 3,	TF,		SEN(printargs), "o32:listxattr"		},
-[4231] = { 3,	TF,		SEN(printargs), "o32:llistxattr"		},
-[4232] = { 3,	TD,		SEN(printargs), "o32:flistxattr"		},
-[4233] = { 2,	TF,		SEN(printargs), "o32:removexattr"		},
-[4234] = { 2,	TF,		SEN(printargs), "o32:lremovexattr"		},
-[4235] = { 2,	TD,		SEN(printargs), "o32:fremovexattr"		},
-[4236] = { 2,	TS,		SEN(printargs), "o32:tkill"			},
-[4237] = { 4,	TD|TN,		SEN(printargs), "o32:sendfile64"		},
-[4238] = { 6,	0,		SEN(printargs), "o32:futex"			},
-[4239] = { 3,	0,		SEN(printargs), "o32:sched_setaffinity"	},
-[4240] = { 3,	0,		SEN(printargs), "o32:sched_getaffinity"	},
-[4241] = { 2,	TM,		SEN(printargs), "o32:io_setup"		},
-[4242] = { 1,	TM,		SEN(printargs), "o32:io_destroy"		},
-[4243] = { 5,	0,		SEN(printargs), "o32:io_getevents"		},
-[4244] = { 3,	0,		SEN(printargs), "o32:io_submit"		},
-[4245] = { 3,	0,		SEN(printargs), "o32:io_cancel"		},
-[4246] = { 1,	TP|SE,		SEN(printargs), "o32:exit_group"		},
-[4247] = { 4,	0,		SEN(printargs), "o32:lookup_dcookie"	},
-[4248] = { 1,	TD,		SEN(printargs), "o32:epoll_create"		},
-[4249] = { 4,	TD,		SEN(printargs), "o32:epoll_ctl"		},
-[4250] = { 4,	TD,		SEN(printargs), "o32:epoll_wait"		},
-[4251] = { 5,	TM|SI,		SEN(printargs), "o32:remap_file_pages"	},
-[4252] = { 1,	0,		SEN(printargs), "o32:set_tid_address"	},
-[4253] = { 0,	0,		SEN(printargs), "o32:restart_syscall"	},
-[4254] = { 7,	TD,		SEN(printargs), "o32:fadvise64"		},
-[4255] = { 3,	TF|TSF|TSFA,	SEN(printargs), "o32:statfs64"		},
-[4256] = { 3,	TD|TFSF|TSFA,	SEN(printargs), "o32:fstatfs64"		},
-[4257] = { 3,	0,		SEN(printargs), "o32:timer_create"		},
-[4258] = { 4,	0,		SEN(printargs), "o32:timer_settime"		},
-[4259] = { 2,	0,		SEN(printargs), "o32:timer_gettime"		},
-[4260] = { 1,	0,		SEN(printargs), "o32:timer_getoverrun"	},
-[4261] = { 1,	0,		SEN(printargs), "o32:timer_delete"		},
-[4262] = { 2,	0,		SEN(printargs), "o32:clock_settime"		},
-[4263] = { 2,	0,		SEN(printargs), "o32:clock_gettime"		},
-[4264] = { 2,	0,		SEN(printargs), "o32:clock_getres"		},
-[4265] = { 4,	0,		SEN(printargs), "o32:clock_nanosleep"	},
-[4266] = { 3,	TS,		SEN(printargs), "o32:tgkill"		},
-[4267] = { 2,	TF,		SEN(printargs), "o32:utimes"		},
-[4268] = { 6,	TM,		SEN(printargs), "o32:mbind"			},
-[4269] = { 5,	TM,		SEN(printargs), "o32:get_mempolicy"		},
-[4270] = { 3,	TM,		SEN(printargs), "o32:set_mempolicy"		},
-[4271] = { 4,	0,		SEN(printargs), "o32:mq_open"		},
-[4272] = { 1,	0,		SEN(printargs), "o32:mq_unlink"		},
-[4273] = { 5,	0,		SEN(printargs), "o32:mq_timedsend"		},
-[4274] = { 5,	0,		SEN(printargs), "o32:mq_timedreceive"	},
-[4275] = { 2,	0,		SEN(printargs), "o32:mq_notify"		},
-[4276] = { 3,	0,		SEN(printargs), "o32:mq_getsetattr"		},
-[4277] = { 5,	0,		SEN(printargs), "o32:vserver"		},
-[4278] = { 5,	TP,		SEN(printargs), "o32:waitid"		},
-[4279] = { },
-[4280] = { 5,	0,		SEN(printargs), "o32:add_key"		},
-[4281] = { 4,	0,		SEN(printargs), "o32:request_key"		},
-[4282] = { 5,	0,		SEN(printargs), "o32:keyctl"		},
-[4283] = { 1,	0,		SEN(printargs), "o32:set_thread_area"	},
-[4284] = { 0,	TD,		SEN(printargs), "o32:inotify_init"		},
-[4285] = { 3,	TD,		SEN(printargs), "o32:inotify_add_watch"	},
-[4286] = { 2,	TD,		SEN(printargs), "o32:inotify_rm_watch"	},
-[4287] = { 4,	TM,		SEN(printargs), "o32:migrate_pages"		},
-[4288] = { 4,	TD|TF,		SEN(printargs), "o32:openat"		},
-[4289] = { 3,	TD|TF,		SEN(printargs), "o32:mkdirat"		},
-[4290] = { 4,	TD|TF,		SEN(printargs), "o32:mknodat"		},
-[4291] = { 5,	TD|TF,		SEN(printargs), "o32:fchownat"		},
-[4292] = { 3,	TD|TF,		SEN(printargs), "o32:futimesat"		},
-[4293] = { 4,	TD|TF|TFST|TSTA,SEN(printargs), "o32:fstatat64"		},
-[4294] = { 3,	TD|TF,		SEN(printargs), "o32:unlinkat"		},
-[4295] = { 4,	TD|TF,		SEN(printargs), "o32:renameat"		},
-[4296] = { 5,	TD|TF,		SEN(printargs), "o32:linkat"		},
-[4297] = { 3,	TD|TF,		SEN(printargs), "o32:symlinkat"		},
-[4298] = { 4,	TD|TF,		SEN(printargs), "o32:readlinkat"		},
-[4299] = { 3,	TD|TF,		SEN(printargs), "o32:fchmodat"		},
-[4300] = { 3,	TD|TF,		SEN(printargs), "o32:faccessat"		},
-[4301] = { 6,	TD,		SEN(printargs), "o32:pselect6"		},
-[4302] = { 5,	TD,		SEN(printargs), "o32:ppoll"			},
-[4303] = { 1,	TP,		SEN(printargs), "o32:unshare"		},
-[4304] = { 6,	TD,		SEN(printargs), "o32:splice"		},
-[4305] = { 7,	TD,		SEN(printargs), "o32:sync_file_range"	},
-[4306] = { 4,	TD,		SEN(printargs), "o32:tee"			},
-[4307] = { 4,	TD,		SEN(printargs), "o32:vmsplice"		},
-[4308] = { 6,	TM,		SEN(printargs), "o32:move_pages"		},
-[4309] = { 2,	0,		SEN(printargs), "o32:set_robust_list"	},
-[4310] = { 3,	0,		SEN(printargs), "o32:get_robust_list"	},
-[4311] = { 4,	0,		SEN(printargs), "o32:kexec_load"		},
-[4312] = { 3,	0,		SEN(printargs), "o32:getcpu"		},
-[4313] = { 6,	TD,		SEN(printargs), "o32:epoll_pwait"		},
-[4314] = { 3,	0,		SEN(printargs), "o32:ioprio_set"		},
-[4315] = { 2,	0,		SEN(printargs), "o32:ioprio_get"		},
-[4316] = { 4,	TD|TF,		SEN(printargs), "o32:utimensat"		},
-[4317] = { 3,	TD|TS,		SEN(printargs), "o32:signalfd"		},
-[4318] = { 4,	TD,		SEN(printargs), "o32:timerfd"		},
-[4319] = { 1,	TD,		SEN(printargs), "o32:eventfd"		},
-[4320] = { 6,	TD,		SEN(printargs), "o32:fallocate"		},
-[4321] = { 2,	TD,		SEN(printargs), "o32:timerfd_create"	},
-[4322] = { 2,	TD,		SEN(printargs), "o32:timerfd_gettime"	},
-[4323] = { 4,	TD,		SEN(printargs), "o32:timerfd_settime"	},
-[4324] = { 4,	TD|TS,		SEN(printargs), "o32:signalfd4"		},
-[4325] = { 2,	TD,		SEN(printargs), "o32:eventfd2"		},
-[4326] = { 1,	TD,		SEN(printargs), "o32:epoll_create1"		},
-[4327] = { 3,	TD,		SEN(printargs), "o32:dup3"			},
-[4328] = { 2,	TD,		SEN(printargs), "o32:pipe2"			},
-[4329] = { 1,	TD,		SEN(printargs), "o32:inotify_init1"		},
-[4330] = { 5,	TD,		SEN(printargs), "o32:preadv"		},
-[4331] = { 5,	TD,		SEN(printargs), "o32:pwritev"		},
-[4332] = { 4,	TP|TS,		SEN(printargs), "o32:rt_tgsigqueueinfo"	},
-[4333] = { 5,	TD,		SEN(printargs), "o32:perf_event_open"	},
-[4334] = { 4,	TN,		SEN(printargs), "o32:accept4"		},
-[4335] = { 5,	TN,		SEN(printargs), "o32:recvmmsg"		},
-[4336] = { 2,	TD,		SEN(printargs), "o32:fanotify_init"		},
-[4337] = { 6,	TD|TF,		SEN(printargs), "o32:fanotify_mark"		},
-[4338] = { 4,	0,		SEN(printargs), "o32:prlimit64"		},
-[4339] = { 5,	TD|TF,		SEN(printargs), "o32:name_to_handle_at"	},
-[4340] = { 3,	TD,		SEN(printargs), "o32:open_by_handle_at"	},
-[4341] = { 2,	0,		SEN(printargs), "o32:clock_adjtime"		},
-[4342] = { 1,	TD,		SEN(printargs), "o32:syncfs"		},
-[4343] = { 4,	TN,		SEN(printargs), "o32:sendmmsg"		},
-[4344] = { 2,	TD,		SEN(printargs), "o32:setns"			},
-[4345] = { 6,	0,		SEN(printargs), "o32:process_vm_readv"	},
-[4346] = { 6,	0,		SEN(printargs), "o32:process_vm_writev"	},
-[4347] = { 5,	0,		SEN(printargs), "o32:kcmp"			},
-[4348] = { 3,	TD,		SEN(printargs), "o32:finit_module"		},
-[4349] = { 3,	0,		SEN(printargs), "o32:sched_setattr"		},
-[4350] = { 4,	0,		SEN(printargs), "o32:sched_getattr"		},
-[4351] = { 5,	TD|TF,		SEN(printargs), "o32:renameat2"		},
-[4352] = { 3,	0,		SEN(printargs), "o32:seccomp"		},
-[4353] = { 3,	0,		SEN(printargs), "o32:getrandom"		},
-[4354] = { 2,	TD,		SEN(printargs), "o32:memfd_create"		},
-[4355] = { 3,	TD,		SEN(printargs), "o32:bpf"			},
-[4356] = { 5,	TD|TF|TP|SE|SI,	SEN(printargs), "o32:execveat"		},
-[4357] = { 1,	TD,		SEN(printargs), "o32:userfaultfd"		},
-[4358] = { 2,	0,		SEN(printargs), "o32:membarrier"		},
-[4359] = { 3,	TM,		SEN(printargs), "o32:mlock2"		},
-[4360] = { 6,	TD,		SEN(printargs), "o32:copy_file_range"	},
-[4361] = { 6,	TD,		SEN(printargs), "o32:preadv2"		},
-[4362] = { 6,	TD,		SEN(printargs), "o32:pwritev2"		},
-[4363] = { 4,	TM|SI,		SEN(printargs), "o32:pkey_mprotect"		},
-[4364] = { 2,	0,		SEN(printargs), "o32:pkey_alloc"		},
-[4365] = { 1,	0,		SEN(printargs), "o32:pkey_free"		},
-[4366] = { 5,	TD|TF|TSTA,	SEN(printargs), "o32:statx"			},
diff --git a/linux/netlink_diag.h b/linux/netlink_diag.h
index a52507c..88dde22 100644
--- a/linux/netlink_diag.h
+++ b/linux/netlink_diag.h
@@ -23,7 +23,33 @@
 	uint32_t ndiag_cookie[2];
 };
 
-#define NDIAG_SHOW_MEMINFO           0x00000001
-#define NDIAG_PROTO_ALL              ((uint8_t) ~0)
+struct netlink_diag_ring {
+	uint32_t ndr_block_size;
+	uint32_t ndr_block_nr;
+	uint32_t ndr_frame_size;
+	uint32_t ndr_frame_nr;
+};
+
+enum {
+	NETLINK_DIAG_MEMINFO,
+	NETLINK_DIAG_GROUPS,
+	NETLINK_DIAG_RX_RING,
+	NETLINK_DIAG_TX_RING,
+	NETLINK_DIAG_FLAGS,
+};
+
+#define NDIAG_SHOW_MEMINFO		0x00000001
+#define NDIAG_SHOW_GROUPS		0x00000002
+#define NDIAG_SHOW_RING_CFG		0x00000004 /* deprecated since 4.6 */
+#define NDIAG_SHOW_FLAGS		0x00000008
+#define NDIAG_PROTO_ALL			((uint8_t) ~0)
+
+/* flags */
+#define NDIAG_FLAG_CB_RUNNING		0x00000001
+#define NDIAG_FLAG_PKTINFO		0x00000002
+#define NDIAG_FLAG_BROADCAST_ERROR	0x00000004
+#define NDIAG_FLAG_NO_ENOBUFS		0x00000008
+#define NDIAG_FLAG_LISTEN_ALL_NSID	0x00000010
+#define NDIAG_FLAG_CAP_ACK		0x00000020
 
 #endif /* !STRACE_LINUX_NETLINK_DIAG_H */
diff --git a/linux/nios2/arch_regs.c b/linux/nios2/arch_regs.c
index 8a668bc..c18a3aa 100644
--- a/linux/nios2/arch_regs.c
+++ b/linux/nios2/arch_regs.c
@@ -1,4 +1,4 @@
 static struct user_pt_regs nios2_regs;
-unsigned long *const nios2_sp_ptr = &nios2_regs.sp;
+unsigned int *const nios2_sp_ptr = &nios2_regs.regs[PTR_SP];
 # define ARCH_REGS_FOR_GETREGSET nios2_regs
 #define ARCH_PC_REG nios2_regs.regs[PTR_EA]
diff --git a/linux/nios2/arch_regs.h b/linux/nios2/arch_regs.h
index 7f344b5..c4230ed 100644
--- a/linux/nios2/arch_regs.h
+++ b/linux/nios2/arch_regs.h
@@ -1 +1 @@
-extern unsigned long *const nios2_sp_ptr;
+extern unsigned int *const nios2_sp_ptr;
diff --git a/linux/packet_diag.h b/linux/packet_diag.h
new file mode 100644
index 0000000..3e8120b
--- /dev/null
+++ b/linux/packet_diag.h
@@ -0,0 +1,40 @@
+#ifndef STRACE_LINUX_PACKET_DIAG_H
+#define STRACE_LINUX_PACKET_DIAG_H
+
+struct packet_diag_req {
+	uint8_t sdiag_family;
+	uint8_t sdiag_protocol;
+	uint16_t pad;
+	uint32_t pdiag_ino;
+	uint32_t pdiag_show;
+	uint32_t pdiag_cookie[2];
+};
+
+#define PACKET_SHOW_INFO	0x00000001
+#define PACKET_SHOW_MCLIST	0x00000002
+#define PACKET_SHOW_RING_CFG	0x00000004
+#define PACKET_SHOW_FANOUT	0x00000008
+#define PACKET_SHOW_MEMINFO	0x00000010
+#define PACKET_SHOW_FILTER	0x00000020
+
+struct packet_diag_msg {
+	uint8_t pdiag_family;
+	uint8_t pdiag_type;
+	uint16_t pdiag_num;
+
+	uint32_t pdiag_ino;
+	uint32_t pdiag_cookie[2];
+};
+
+enum {
+	PACKET_DIAG_INFO,
+	PACKET_DIAG_MCLIST,
+	PACKET_DIAG_RX_RING,
+	PACKET_DIAG_TX_RING,
+	PACKET_DIAG_FANOUT,
+	PACKET_DIAG_UID,
+	PACKET_DIAG_MEMINFO,
+	PACKET_DIAG_FILTER,
+};
+
+#endif /* !STRACE_LINUX_PACKET_DIAG_H */
diff --git a/linux/personality.h b/linux/personality.h
index 9971703..09b35c6 100644
--- a/linux/personality.h
+++ b/linux/personality.h
@@ -8,8 +8,8 @@
  * These occupy the top three bytes.
  */
 enum {
-	UNAME26	=               0x0020000,
-	ADDR_NO_RANDOMIZE = 	0x0040000,	/* disable randomization of VA space */
+	UNAME26 =		0x0020000,
+	ADDR_NO_RANDOMIZE =	0x0040000,	/* disable randomization of VA space */
 	FDPIC_FUNCPTRS =	0x0080000,	/* userspace function ptrs point to descriptors
 						 * (signal handling)
 						 */
@@ -19,8 +19,8 @@
 	ADDR_LIMIT_32BIT =	0x0800000,
 	SHORT_INODE =		0x1000000,
 	WHOLE_SECONDS =		0x2000000,
-	STICKY_TIMEOUTS	=	0x4000000,
-	ADDR_LIMIT_3GB = 	0x8000000,
+	STICKY_TIMEOUTS =	0x4000000,
+	ADDR_LIMIT_3GB =	0x8000000,
 };
 
 /*
diff --git a/linux/ptp_clock.h b/linux/ptp_clock.h
index 2f92eb6..248f3ce 100644
--- a/linux/ptp_clock.h
+++ b/linux/ptp_clock.h
@@ -1,7 +1,7 @@
 /*
  * PTP 1588 clock support - user space interface
  *
- * Copyright (C) 2010 OMICRON electronics GmbH
+ * Copyright (c) 2010 OMICRON electronics GmbH
  * Copyright (c) 2010-2017 The strace developers.
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -90,7 +90,7 @@
 #define PTP_SYS_OFFSET     _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset)
 
 struct ptp_extts_event {
-	struct ptp_clock_time t; /* Time event occured. */
+	struct ptp_clock_time t; /* Time event occurred. */
 	unsigned int index;      /* Which channel produced the event. */
 	unsigned int flags;      /* Reserved for future use. */
 	unsigned int rsv[2];     /* Reserved for future use. */
diff --git a/linux/sh64/arch_regs.h b/linux/sh64/arch_regs.h
index 7f64b49..670cdb6 100644
--- a/linux/sh64/arch_regs.h
+++ b/linux/sh64/arch_regs.h
@@ -1,15 +1,15 @@
 /* SH64 Linux - this code assumes the following kernel API for system calls:
-        PC           Offset 0
-        System Call  Offset 16 (actually, (syscall no.) | (0x1n << 16),
-                     where n = no. of parameters.
-        Other regs   Offset 24+
+	PC           Offset 0
+	System Call  Offset 16 (actually, (syscall no.) | (0x1n << 16),
+		     where n = no. of parameters.
+	Other regs   Offset 24+
 
-        On entry:    R2-7 = parameters 1-6 (as many as necessary)
-        On return:   R9   = result.
+	On entry:    R2-7 = parameters 1-6 (as many as necessary)
+	On return:   R9   = result.
 */
 
 /* Offset for peeks of registers */
-#define REG_OFFSET         (24)
-#define REG_GENERAL(x)     (8*(x)+REG_OFFSET)
-#define REG_PC             (0*8)
-#define REG_SYSCALL        (2*8)
+#define REG_OFFSET	(24)
+#define REG_GENERAL(x)	(8*(x)+REG_OFFSET)
+#define REG_PC		(0*8)
+#define REG_SYSCALL	(2*8)
diff --git a/linux/smc_diag.h b/linux/smc_diag.h
new file mode 100644
index 0000000..aea7d32
--- /dev/null
+++ b/linux/smc_diag.h
@@ -0,0 +1,33 @@
+#ifndef STRACE_LINUX_SMC_DIAG_H
+#define STRACE_LINUX_SMC_DIAG_H
+
+#include <linux/inet_diag.h>
+
+/* Request structure */
+struct smc_diag_req {
+	uint8_t diag_family;
+	uint8_t pad[2];
+	uint8_t diag_ext;		/* Query extended information */
+	struct inet_diag_sockid	id;
+};
+
+struct smc_diag_msg {
+	uint8_t diag_family;
+	uint8_t diag_state;
+	uint8_t diag_fallback;
+	uint8_t diag_shutdown;
+	struct inet_diag_sockid id;
+
+	uint32_t diag_uid;
+	uint64_t diag_inode;
+};
+
+/* Extensions */
+enum {
+	SMC_DIAG_NONE,
+	SMC_DIAG_CONNINFO,
+	SMC_DIAG_LGRINFO,
+	SMC_DIAG_SHUTDOWN,
+};
+
+#endif /* !STRACE_LINUX_SMC_DIAG_H */
diff --git a/linux/sock_diag.h b/linux/sock_diag.h
index ba0c114..f69c385 100644
--- a/linux/sock_diag.h
+++ b/linux/sock_diag.h
@@ -2,6 +2,9 @@
 #define STRACE_LINUX_SOCK_DIAG_H
 
 #define SOCK_DIAG_BY_FAMILY 20
+#define SOCK_DESTROY 21
+
+#define SK_MEMINFO_VARS		9
 
 struct sock_diag_req {
 	uint8_t	sdiag_family;
diff --git a/linux/tile/arch_sigreturn.c b/linux/tile/arch_sigreturn.c
index 1c687db..7042cfd 100644
--- a/linux/tile/arch_sigreturn.c
+++ b/linux/tile/arch_sigreturn.c
@@ -4,7 +4,7 @@
 	/* offset of ucontext in the kernel's sigframe structure */
 #define SIGFRAME_UC_OFFSET C_ABI_SAVE_AREA_SIZE + sizeof(siginfo_t)
 	const unsigned long addr = tile_regs.sp + SIGFRAME_UC_OFFSET +
-				   offsetof(struct ucontext, uc_sigmask);
+				   offsetof(ucontext_t, uc_sigmask);
 
 	tprints("{mask=");
 	print_sigset_addr(tcp, addr);
diff --git a/linux/ubi-user.h b/linux/ubi-user.h
index 7bae56e..0f5c775 100644
--- a/linux/ubi-user.h
+++ b/linux/ubi-user.h
@@ -1,5 +1,5 @@
 /*
- * Copyright © International Business Machines Corp., 2006
+ * Copyright (c) International Business Machines Corp., 2006
  * Copyright (c) 2006-2017 The strace developers.
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/linux/unix_diag.h b/linux/unix_diag.h
index 0c3da5b..f1a7fc0 100644
--- a/linux/unix_diag.h
+++ b/linux/unix_diag.h
@@ -12,7 +12,11 @@
 };
 
 #define UDIAG_SHOW_NAME		0x01
+#define UDIAG_SHOW_VFS		0x02
 #define UDIAG_SHOW_PEER		0x04
+#define UDIAG_SHOW_ICONS	0x08
+#define UDIAG_SHOW_RQLEN	0x10
+#define UDIAG_SHOW_MEMINFO	0x20
 
 struct unix_diag_msg {
 	uint8_t	 udiag_family;
@@ -23,7 +27,24 @@
 	uint32_t udiag_cookie[2];
 };
 
-#define UNIX_DIAG_NAME 0
-#define UNIX_DIAG_PEER 2
+enum {
+	UNIX_DIAG_NAME,
+	UNIX_DIAG_VFS,
+	UNIX_DIAG_PEER,
+	UNIX_DIAG_ICONS,
+	UNIX_DIAG_RQLEN,
+	UNIX_DIAG_MEMINFO,
+	UNIX_DIAG_SHUTDOWN,
+};
+
+struct unix_diag_vfs {
+	uint32_t udiag_vfs_ino;
+	uint32_t udiag_vfs_dev;
+};
+
+struct unix_diag_rqlen {
+	uint32_t udiag_rqueue;
+	uint32_t udiag_wqueue;
+};
 
 #endif /* !STRACE_LINUX_UNIX_DIAG_H */
diff --git a/linux/x32/ioctls_inc0.h b/linux/x32/ioctls_inc0.h
index 37d7076..9bdcb8b 100644
--- a/linux/x32/ioctls_inc0.h
+++ b/linux/x32/ioctls_inc0.h
@@ -186,7 +186,7 @@
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 },
-{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 },
+{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x38 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 },
 { "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 },
@@ -233,6 +233,7 @@
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2", _IOC_WRITE, 0x6469, 0x40 },
+{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2_WR", _IOC_READ|_IOC_WRITE, 0x6469, 0x40 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_APERTURE", _IOC_READ, 0x6463, 0x10 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_CACHING", _IOC_READ|_IOC_WRITE, 0x6470, 0x08 },
 { "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6462, 0x10 },
@@ -487,6 +488,8 @@
 { "linux/apm_bios.h", "APM_IOC_SUSPEND", _IOC_NONE, 0x4102, 0x00 },
 { "linux/arcfb.h", "FBIO_GETCONTROL2", _IOC_READ, 0x4689, 0x04 },
 { "linux/arcfb.h", "FBIO_WAITEVENT", _IOC_NONE, 0x4688, 0x00 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_GET_SIZE", _IOC_READ|_IOC_WRITE, 0xb200, 0x10 },
+{ "linux/aspeed-lpc-ctrl.h", "ASPEED_LPC_CTRL_IOCTL_MAP", _IOC_WRITE, 0xb201, 0x10 },
 { "linux/atm_eni.h", "ENI_MEMDUMP", _IOC_WRITE, 0x6160, 0x0c },
 { "linux/atm_eni.h", "ENI_SETMULT", _IOC_WRITE, 0x6167, 0x0c },
 { "linux/atm_he.h", "HE_GET_REG", _IOC_WRITE, 0x6160, 0x0c },
@@ -974,6 +977,7 @@
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 },
 { "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 },
+{ "linux/fsmap.h", "FS_IOC_GETFSMAP", _IOC_READ|_IOC_WRITE, 0x583b, 0xc0 },
 { "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 },
 { "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 },
@@ -1506,6 +1510,12 @@
 { "linux/omapfb.h", "OMAPFB_VSYNC", _IOC_NONE, 0x4f26, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORGO", _IOC_NONE, 0x4f3c, 0x00 },
 { "linux/omapfb.h", "OMAPFB_WAITFORVSYNC", _IOC_NONE, 0x4f39, 0x00 },
+{ "linux/pcitest.h", "PCITEST_BAR", _IOC_NONE, 0x5001, 0x00 },
+{ "linux/pcitest.h", "PCITEST_COPY", _IOC_WRITE, 0x5006, 0x04 },
+{ "linux/pcitest.h", "PCITEST_LEGACY_IRQ", _IOC_NONE, 0x5002, 0x00 },
+{ "linux/pcitest.h", "PCITEST_MSI", _IOC_WRITE, 0x5003, 0x04 },
+{ "linux/pcitest.h", "PCITEST_READ", _IOC_WRITE, 0x5005, 0x04 },
+{ "linux/pcitest.h", "PCITEST_WRITE", _IOC_WRITE, 0x5004, 0x04 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 },
 { "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 },
@@ -1940,6 +1950,12 @@
 { "linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", _IOC_NONE, 0x330b, 0x00 },
 { "linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", _IOC_WRITE, 0x330d, 0x0c },
 { "linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", _IOC_NONE, 0x3302, 0x00 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_CTL", _IOC_READ|_IOC_WRITE, 0x5743, 0x28 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_EVENT_SUMMARY", _IOC_READ, 0x5742, 0x198 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_INFO", _IOC_READ, 0x5740, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_FLASH_PART_INFO", _IOC_READ|_IOC_WRITE, 0x5741, 0x10 },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PFF_TO_PORT", _IOC_READ|_IOC_WRITE, 0x5744, 0x0c },
+{ "linux/switchtec_ioctl.h", "SWITCHTEC_IOCTL_PORT_TO_PFF", _IOC_READ|_IOC_WRITE, 0x5745, 0x0c },
 { "linux/sync_file.h", "SYNC_IOC_FILE_INFO", _IOC_READ|_IOC_WRITE, 0x3e04, 0x38 },
 { "linux/sync_file.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e03, 0x30 },
 { "linux/synclink.h", "MGSL_IOCCLRMODCOUNT", _IOC_NONE, 0x6d0f, 0x00 },
@@ -1962,6 +1978,14 @@
 { "linux/synclink.h", "MGSL_IOCTXENABLE", _IOC_NONE, 0x6d04, 0x00 },
 { "linux/synclink.h", "MGSL_IOCWAITEVENT", _IOC_READ|_IOC_WRITE, 0x6d08, 0x04 },
 { "linux/synclink.h", "MGSL_IOCWAITGPIO", _IOC_READ|_IOC_WRITE, 0x6d12, 0x10 },
+{ "linux/tee.h", "TEE_IOC_CANCEL", _IOC_READ, 0xa404, 0x08 },
+{ "linux/tee.h", "TEE_IOC_CLOSE_SESSION", _IOC_READ, 0xa405, 0x04 },
+{ "linux/tee.h", "TEE_IOC_INVOKE", _IOC_READ, 0xa403, 0x10 },
+{ "linux/tee.h", "TEE_IOC_OPEN_SESSION", _IOC_READ, 0xa402, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SHM_ALLOC", _IOC_READ|_IOC_WRITE, 0xa401, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_RECV", _IOC_READ, 0xa406, 0x10 },
+{ "linux/tee.h", "TEE_IOC_SUPPL_SEND", _IOC_READ, 0xa407, 0x10 },
+{ "linux/tee.h", "TEE_IOC_VERSION", _IOC_READ, 0xa400, 0x0c },
 { "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 },
 { "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 },
 { "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 },
@@ -2690,17 +2714,8 @@
 { "staging/android/ashmem.h", "ASHMEM_SET_PROT_MASK", _IOC_WRITE, 0x7705, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_SET_SIZE", _IOC_WRITE, 0x7703, 0x04 },
 { "staging/android/ashmem.h", "ASHMEM_UNPIN", _IOC_WRITE, 0x7708, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 },
-{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 },
+{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x18 },
 { "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 },
-{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 },
-{ "staging/android/ion.h", "ION_IOC_SYNC", _IOC_READ|_IOC_WRITE, 0x4907, 0x08 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 },
-{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 },
 { "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 },
 { "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 },
 { "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 },
diff --git a/linux/x86_64/get_scno.c b/linux/x86_64/get_scno.c
index 2354fb2..687f843 100644
--- a/linux/x86_64/get_scno.c
+++ b/linux/x86_64/get_scno.c
@@ -57,7 +57,7 @@
 	 * solely by looking at __X32_SYSCALL_BIT:
 	 * arch/x86/include/asm/compat.h::is_x32_task():
 	 * if (task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT)
-	 *         return true;
+	 *	return true;
 	 */
 	if (x86_io.iov_len == sizeof(i386_regs)) {
 		scno = i386_regs.orig_eax;
@@ -93,7 +93,9 @@
 	 */
 	scno = x86_64_regs.orig_rax;
 	switch (x86_64_regs.cs) {
-		case 0x23: currpers = 1; break;
+		case 0x23:
+			currpers = 1;
+			break;
 		case 0x33:
 			if (x86_64_regs.ds == 0x2b) {
 				currpers = 2;
@@ -123,9 +125,13 @@
 		perror_msg("ptrace_peektext failed");
 	switch (call & 0xffff) {
 		/* x86-64: syscall = 0x0f 0x05 */
-		case 0x050f: currpers = 0; break;
+		case 0x050f:
+			currpers = 0;
+			break;
 		/* i386: int 0x80 = 0xcd 0x80 */
-		case 0x80cd: currpers = 1; break;
+		case 0x80cd:
+			currpers = 1;
+			break;
 		default:
 			currpers = current_personality;
 			error_msg("Unknown syscall opcode (0x%04X) while "
diff --git a/linux/x86_64/set_error.c b/linux/x86_64/set_error.c
index 123c895..6c31bd8 100644
--- a/linux/x86_64/set_error.c
+++ b/linux/x86_64/set_error.c
@@ -10,13 +10,13 @@
 arch_set_error(struct tcb *tcp)
 {
 #ifdef HAVE_GETREGS_OLD
-	x86_64_regs.rax = - (long long) tcp->u_error;
+	x86_64_regs.rax = -(long long) tcp->u_error;
 	return upoke(tcp->pid, 8 * RAX, x86_64_regs.rax);
 #else
 	if (x86_io.iov_len == sizeof(i386_regs))
 		return i386_set_error(tcp);
 
-	x86_64_regs.rax = - (long long) tcp->u_error;
+	x86_64_regs.rax = -(long long) tcp->u_error;
 	return set_regs(tcp->pid);
 #endif
 }
diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4
index 93dfce3..3d417f0 100644
--- a/m4/ax_code_coverage.m4
+++ b/m4/ax_code_coverage.m4
@@ -140,7 +140,7 @@
 		])
 
 		dnl Build the code coverage flags
-		CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
+		CODE_COVERAGE_CPPFLAGS="-DENABLE_COVERAGE_GCOV -DNDEBUG"
 		CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
 		CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
 		CODE_COVERAGE_LDFLAGS="-lgcov"
diff --git a/macros.h b/macros.h
new file mode 100644
index 0000000..2913d60
--- /dev/null
+++ b/macros.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2001-2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef STRACE_MACROS_H
+#define STRACE_MACROS_H
+
+#include "gcc_compat.h"
+
+#define ARRAY_SIZE(a_)	(sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
+
+#define STRINGIFY(...)		#__VA_ARGS__
+#define STRINGIFY_VAL(...)	STRINGIFY(__VA_ARGS__)
+
+#endif /* !STRACE_MACROS_H */
diff --git a/mem.c b/mem.c
index fb29ec1..00f5610 100644
--- a/mem.c
+++ b/mem.c
@@ -331,7 +331,7 @@
 static bool
 print_protmap_entry(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
 {
-	tprintf("%#08x", * (unsigned int *) elem_buf);
+	tprintf("%#08x", *(unsigned int *) elem_buf);
 
 	return true;
 }
diff --git a/mpers.am b/mpers.am
new file mode 100644
index 0000000..8771776
--- /dev/null
+++ b/mpers.am
@@ -0,0 +1,2 @@
+# Generated by ./generate_mpers_am.sh; do not edit.
+mpers_source_files = block.c btrfs.c dirent.c evdev.c fetch_seccomp_fprog.c fetch_struct_flock.c fetch_struct_mmsghdr.c fetch_struct_msghdr.c fetch_struct_stat.c fetch_struct_stat64.c fetch_struct_statfs.c hdio.c ipc_msgctl.c ipc_shmctl.c loop.c mtd.c print_mq_attr.c print_msgbuf.c print_sg_req_info.c print_sigevent.c print_time.c print_timespec.c print_timeval.c print_timex.c printrusage.c printsiginfo.c rt_sigreturn.c rtc.c sg_io_v3.c sigaltstack.c sock.c sysinfo.c times.c ustat.c utime.c v4l2.c 
diff --git a/mpers_type.h b/mpers_type.h
index ecb1efa..64201c7 100644
--- a/mpers_type.h
+++ b/mpers_type.h
@@ -30,8 +30,9 @@
 #ifndef STRACE_MPERS_TYPE_H
 #define STRACE_MPERS_TYPE_H
 
+#include "macros.h"
+
 #ifdef IN_MPERS
-# define STRINGIFY(a) #a
 # define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
 # ifdef MPERS_IS_m32
 #  define MPERS_PREFIX m32_
diff --git a/msghdr.c b/msghdr.c
index 56ba549..d263866 100644
--- a/msghdr.c
+++ b/msghdr.c
@@ -96,6 +96,27 @@
 }
 
 static void
+print_scm_timestamp(struct tcb *tcp, const void *cmsg_data,
+		    const unsigned int data_len)
+{
+	print_struct_timeval_data_size(cmsg_data, data_len);
+}
+
+static void
+print_scm_timestampns(struct tcb *tcp, const void *cmsg_data,
+		      const unsigned int data_len)
+{
+	print_struct_timespec_data_size(cmsg_data, data_len);
+}
+
+static void
+print_scm_timestamping(struct tcb *tcp, const void *cmsg_data,
+		       const unsigned int data_len)
+{
+	print_struct_timespec_array_data_size(cmsg_data, 3, data_len);
+}
+
+static void
 print_cmsg_ip_pktinfo(struct tcb *tcp, const void *cmsg_data,
 		      const unsigned int data_len)
 {
@@ -191,7 +212,10 @@
 } cmsg_socket_printers[] = {
 	[SCM_RIGHTS] = { print_scm_rights, sizeof(int) },
 	[SCM_CREDENTIALS] = { print_scm_creds, sizeof(struct ucred) },
-	[SCM_SECURITY] = { print_scm_security, 1 }
+	[SCM_SECURITY] = { print_scm_security, 1 },
+	[SCM_TIMESTAMP] = { print_scm_timestamp, 1 },
+	[SCM_TIMESTAMPNS] = { print_scm_timestampns, 1 },
+	[SCM_TIMESTAMPING] = { print_scm_timestamping, 1 }
 }, cmsg_ip_printers[] = {
 	[IP_PKTINFO] = { print_cmsg_ip_pktinfo, sizeof(struct in_pktinfo) },
 	[IP_TTL] = { print_cmsg_uint, sizeof(unsigned int) },
@@ -305,7 +329,7 @@
 
 		print_cmsg_type_data(tcp, cmsg_level, cmsg_type,
 				     (const void *) (u.ptr + cmsg_size),
-				     len > cmsg_size ? len - cmsg_size: 0);
+				     len > cmsg_size ? len - cmsg_size : 0);
 		tprints("}");
 
 		if (len < cmsg_size) {
diff --git a/native_printer_decls.h b/native_printer_decls.h
index 7698834..19badf1 100644
--- a/native_printer_decls.h
+++ b/native_printer_decls.h
@@ -19,11 +19,14 @@
 extern void tprint_msgbuf(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t count);
 extern int decode_sg_req_info(struct tcb *const tcp, const kernel_ulong_t arg);
 extern void print_sigevent(struct tcb *const tcp, const kernel_ulong_t addr);
+extern _Bool print_struct_timespec_data_size(const void *arg, const size_t size);
+extern _Bool print_struct_timespec_array_data_size(const void *arg, const unsigned int nmemb, const size_t size);
 extern void print_timespec(struct tcb *const tcp, const kernel_ulong_t addr);
 extern const char * sprint_timespec(struct tcb *const tcp, const kernel_ulong_t addr);
 extern void print_timespec_utime_pair(struct tcb *const tcp, const kernel_ulong_t addr);
 extern void print_itimerspec(struct tcb *const tcp, const kernel_ulong_t addr);
 extern void print_struct_timeval(const void *arg);
+extern _Bool print_struct_timeval_data_size(const void *arg, const size_t size);
 extern void print_timeval(struct tcb *const tcp, const kernel_ulong_t addr);
 extern void print_timeval_utimes(struct tcb *const tcp, const kernel_ulong_t addr);
 extern const char * sprint_timeval(struct tcb *const tcp, const kernel_ulong_t addr);
diff --git a/native_printer_defs.h b/native_printer_defs.h
index 6377031..ef43c93 100644
--- a/native_printer_defs.h
+++ b/native_printer_defs.h
@@ -19,11 +19,14 @@
 .tprint_msgbuf = tprint_msgbuf,
 .decode_sg_req_info = decode_sg_req_info,
 .print_sigevent = print_sigevent,
+.print_struct_timespec_data_size = print_struct_timespec_data_size,
+.print_struct_timespec_array_data_size = print_struct_timespec_array_data_size,
 .print_timespec = print_timespec,
 .sprint_timespec = sprint_timespec,
 .print_timespec_utime_pair = print_timespec_utime_pair,
 .print_itimerspec = print_itimerspec,
 .print_struct_timeval = print_struct_timeval,
+.print_struct_timeval_data_size = print_struct_timeval_data_size,
 .print_timeval = print_timeval,
 .print_timeval_utimes = print_timeval_utimes,
 .sprint_timeval = sprint_timeval,
diff --git a/net.c b/net.c
index 01ab16b..8dc47fc 100644
--- a/net.c
+++ b/net.c
@@ -56,7 +56,7 @@
 #if defined(HAVE_LINUX_IP_VS_H)
 # include <linux/ip_vs.h>
 #endif
-#include <linux/netlink.h>
+#include "netlink.h"
 #if defined(HAVE_LINUX_NETFILTER_ARP_ARP_TABLES_H)
 # include <linux/netfilter_arp/arp_tables.h>
 #endif
@@ -81,7 +81,6 @@
 #include "xlat/socketlayers.h"
 
 #include "xlat/inet_protocols.h"
-#include "xlat/netlink_protocols.h"
 
 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
 # include <bluetooth/bluetooth.h>
@@ -111,7 +110,7 @@
 
 	switch (verbose(tcp) ? getfdproto(tcp, fd) : SOCK_PROTO_UNKNOWN) {
 	case SOCK_PROTO_NETLINK:
-		decode_netlink(tcp, addr, addrlen);
+		decode_netlink(tcp, fd, addr, addrlen);
 		break;
 	default:
 		printstrn(tcp, addr, addrlen);
@@ -649,13 +648,10 @@
 	if (umove_or_printaddr(tcp, addr, &mreq))
 		return;
 
-	tprints("{imr_multiaddr=inet_addr(");
-	print_quoted_string(inet_ntoa(mreq.imr_multiaddr),
-			    16, QUOTE_0_TERMINATED);
-	tprints("), imr_interface=inet_addr(");
-	print_quoted_string(inet_ntoa(mreq.imr_interface),
-			    16, QUOTE_0_TERMINATED);
-	tprints(")}");
+	tprintf("{imr_multiaddr=inet_addr(\"%s\")",
+		inet_ntoa(mreq.imr_multiaddr));
+	tprintf(", imr_interface=inet_addr(\"%s\")}",
+		inet_ntoa(mreq.imr_interface));
 }
 #endif /* IP_ADD_MEMBERSHIP */
 
@@ -666,27 +662,20 @@
 {
 	struct ipv6_mreq mreq;
 
-	if (len < sizeof(mreq))
-		goto fail;
-
+	if (len < sizeof(mreq)) {
+		printstrn(tcp, addr, len);
+		return;
+	}
 	if (umove_or_printaddr(tcp, addr, &mreq))
 		return;
 
-	const struct in6_addr *in6 = &mreq.ipv6mr_multiaddr;
-	char address[INET6_ADDRSTRLEN];
+	tprints("{");
+	print_inet_addr(AF_INET6, &mreq.ipv6mr_multiaddr,
+			sizeof(mreq.ipv6mr_multiaddr), "ipv6mr_multiaddr");
 
-	if (!inet_ntop(AF_INET6, in6, address, sizeof(address)))
-		goto fail;
-
-	tprints("{ipv6mr_multiaddr=inet_pton(");
-	print_quoted_string(address, sizeof(address), QUOTE_0_TERMINATED);
-	tprints("), ipv6mr_interface=");
+	tprints(", ipv6mr_interface=");
 	print_ifindex(mreq.ipv6mr_interface);
 	tprints("}");
-	return;
-
-fail:
-	printstrn(tcp, addr, len);
 }
 #endif /* IPV6_ADD_MEMBERSHIP */
 
diff --git a/netlink.c b/netlink.c
index 10ca82c..f74c3a0 100644
--- a/netlink.c
+++ b/netlink.c
@@ -28,13 +28,22 @@
  */
 
 #include "defs.h"
-#include <sys/socket.h>
-#include <linux/netlink.h>
+#include "netlink.h"
+#include <linux/audit.h>
+#include <linux/rtnetlink.h>
+#include <linux/xfrm.h>
 #include "xlat/netlink_flags.h"
+#include "xlat/netlink_get_flags.h"
+#include "xlat/netlink_new_flags.h"
+#include "xlat/netlink_protocols.h"
 #include "xlat/netlink_types.h"
-
-#undef NLMSG_HDRLEN
-#define NLMSG_HDRLEN NLMSG_ALIGN(sizeof(struct nlmsghdr))
+#include "xlat/nl_audit_types.h"
+#include "xlat/nl_netfilter_msg_types.h"
+#include "xlat/nl_netfilter_subsys_ids.h"
+#include "xlat/nl_route_types.h"
+#include "xlat/nl_selinux_types.h"
+#include "xlat/nl_sock_diag_types.h"
+#include "xlat/nl_xfrm_types.h"
 
 /*
  * Fetch a struct nlmsghdr from the given address.
@@ -54,35 +63,233 @@
 	return true;
 }
 
+enum {
+	NL_FAMILY_ERROR = -1,
+	NL_FAMILY_DEFAULT = -2
+};
+
+static int
+get_fd_nl_family(struct tcb *const tcp, const int fd)
+{
+	const unsigned long inode = getfdinode(tcp, fd);
+	if (!inode)
+		return NL_FAMILY_ERROR;
+
+	const char *const details = get_sockaddr_by_inode(tcp, fd, inode);
+	if (!details)
+		return NL_FAMILY_ERROR;
+
+	const char *const nl_details = STR_STRIP_PREFIX(details, "NETLINK:[");
+	if (nl_details == details)
+		return NL_FAMILY_ERROR;
+
+	const struct xlat *xlats = netlink_protocols;
+	for (; xlats->str; ++xlats) {
+		const char *name = STR_STRIP_PREFIX(xlats->str, "NETLINK_");
+		if (!strncmp(nl_details, name, strlen(name)))
+			return xlats->val;
+	}
+
+	if (*nl_details >= '0' && *nl_details <= '9')
+		return atoi(nl_details);
+
+	return NL_FAMILY_ERROR;
+}
+
 static void
-print_nlmsghdr(struct tcb *tcp, const struct nlmsghdr *const nlmsghdr)
+decode_nlmsg_type_default(const struct xlat *const xlat,
+			  const uint16_t type,
+			  const char *const dflt)
+{
+	printxval(xlat, type, dflt);
+}
+
+static void
+decode_nlmsg_type_generic(const struct xlat *const xlat,
+			  const uint16_t type,
+			  const char *const dflt)
+{
+	printxval(genl_families_xlat(), type, dflt);
+}
+
+static void
+decode_nlmsg_type_netfilter(const struct xlat *const xlat,
+			    const uint16_t type,
+			    const char *const dflt)
+{
+	/* Reserved control nfnetlink messages first. */
+	const char *const text = xlookup(nl_netfilter_msg_types, type);
+	if (text) {
+		tprints(text);
+		return;
+	}
+
+	/*
+	 * Other netfilter message types are split
+	 * in two pieces: 8 bits subsystem and 8 bits type.
+	 */
+	const uint8_t subsys_id = (uint8_t) (type >> 8);
+	const uint8_t msg_type = (uint8_t) type;
+
+	printxval(xlat, subsys_id, dflt);
+
+	/*
+	 * The type is subsystem specific,
+	 * print it in numeric format for now.
+	 */
+	tprintf("<<8|%#x", msg_type);
+}
+
+typedef void (*nlmsg_types_decoder_t)(const struct xlat *,
+				      uint16_t type,
+				      const char *dflt);
+
+static const struct {
+	const nlmsg_types_decoder_t decoder;
+	const struct xlat *const xlat;
+	const char *const dflt;
+} nlmsg_types[] = {
+	[NETLINK_AUDIT] = { NULL, nl_audit_types, "AUDIT_???" },
+	[NETLINK_GENERIC] = {
+		decode_nlmsg_type_generic,
+		NULL,
+		"GENERIC_FAMILY_???"
+	},
+	[NETLINK_NETFILTER] = {
+		decode_nlmsg_type_netfilter,
+		nl_netfilter_subsys_ids,
+		"NFNL_SUBSYS_???"
+	},
+	[NETLINK_ROUTE] = { NULL, nl_route_types, "RTM_???" },
+	[NETLINK_SELINUX] = { NULL, nl_selinux_types, "SELNL_MSG_???" },
+	[NETLINK_SOCK_DIAG] = { NULL, nl_sock_diag_types, "SOCK_DIAG_???" },
+	[NETLINK_XFRM] = { NULL, nl_xfrm_types, "XFRM_MSG_???" }
+};
+
+/*
+ * As all valid netlink families are positive integers, use unsigned int
+ * for family here to filter out NL_FAMILY_ERROR and NL_FAMILY_DEFAULT.
+ */
+static void
+decode_nlmsg_type(const uint16_t type, const unsigned int family)
+{
+	nlmsg_types_decoder_t decoder = decode_nlmsg_type_default;
+	const struct xlat *xlat = netlink_types;
+	const char *dflt = "NLMSG_???";
+
+	if (type != NLMSG_DONE && family < ARRAY_SIZE(nlmsg_types)) {
+		if (nlmsg_types[family].decoder)
+			decoder = nlmsg_types[family].decoder;
+		if (nlmsg_types[family].xlat)
+			xlat = nlmsg_types[family].xlat;
+		if (nlmsg_types[family].dflt)
+			dflt = nlmsg_types[family].dflt;
+	}
+
+	decoder(xlat, type, dflt);
+}
+
+static void
+decode_nlmsg_flags(const uint16_t flags, const uint16_t type, const int family)
+{
+	const struct xlat *table = NULL;
+
+	if (type == NLMSG_DONE)
+		goto end;
+
+	switch (family) {
+	case NETLINK_SOCK_DIAG:
+		table = netlink_get_flags;
+		break;
+	case NETLINK_ROUTE:
+		if (type == RTM_DELACTION) {
+			table = netlink_get_flags;
+			break;
+		}
+		switch (type & 3) {
+		case  0:
+			table = netlink_new_flags;
+			break;
+		case  2:
+			table = netlink_get_flags;
+			break;
+		}
+		break;
+	case NETLINK_XFRM:
+		switch (type) {
+		case XFRM_MSG_NEWSA:
+		case XFRM_MSG_NEWPOLICY:
+		case XFRM_MSG_NEWAE:
+		case XFRM_MSG_NEWSADINFO:
+		case XFRM_MSG_NEWSPDINFO:
+			table = netlink_new_flags;
+			break;
+
+		case XFRM_MSG_GETSA:
+		case XFRM_MSG_GETPOLICY:
+		case XFRM_MSG_GETAE:
+		case XFRM_MSG_GETSADINFO:
+		case XFRM_MSG_GETSPDINFO:
+			table = netlink_get_flags;
+			break;
+		}
+		break;
+	}
+
+end:
+	printflags_ex(flags, "NLM_F_???", netlink_flags, table, NULL);
+}
+
+static int
+print_nlmsghdr(struct tcb *tcp,
+	       const int fd,
+	       int family,
+	       const struct nlmsghdr *const nlmsghdr)
 {
 	/* print the whole structure regardless of its nlmsg_len */
 
 	tprintf("{len=%u, type=", nlmsghdr->nlmsg_len);
 
-	printxval(netlink_types, nlmsghdr->nlmsg_type, "NLMSG_???");
+	const int hdr_family = (nlmsghdr->nlmsg_type < NLMSG_MIN_TYPE
+				&& nlmsghdr->nlmsg_type != NLMSG_DONE)
+			       ? NL_FAMILY_DEFAULT
+			       : (family != NL_FAMILY_DEFAULT
+				  ? family : get_fd_nl_family(tcp, fd));
+
+	decode_nlmsg_type(nlmsghdr->nlmsg_type, hdr_family);
 
 	tprints(", flags=");
-	printflags(netlink_flags, nlmsghdr->nlmsg_flags, "NLM_F_???");
+	decode_nlmsg_flags(nlmsghdr->nlmsg_flags,
+			   nlmsghdr->nlmsg_type, hdr_family);
 
 	tprintf(", seq=%u, pid=%u}", nlmsghdr->nlmsg_seq,
 		nlmsghdr->nlmsg_pid);
+
+	return family != NL_FAMILY_DEFAULT ? family : hdr_family;
 }
 
 static void
 decode_nlmsghdr_with_payload(struct tcb *const tcp,
+			     const int fd,
+			     int family,
 			     const struct nlmsghdr *const nlmsghdr,
 			     const kernel_ulong_t addr,
 			     const kernel_ulong_t len);
 
 static void
 decode_nlmsgerr(struct tcb *const tcp,
-	       kernel_ulong_t addr,
-	       kernel_ulong_t len)
+		const int fd,
+		const int family,
+		kernel_ulong_t addr,
+		kernel_ulong_t len)
 {
 	struct nlmsgerr err;
 
+	if (len < sizeof(err.error)) {
+		printstrn(tcp, addr, len);
+		return;
+	}
+
 	if (umove_or_printaddr(tcp, addr, &err.error))
 		return;
 
@@ -99,49 +306,77 @@
 	if (len) {
 		tprints(", msg=");
 		if (fetch_nlmsghdr(tcp, &err.msg, addr, len)) {
-			decode_nlmsghdr_with_payload(tcp, &err.msg, addr, len);
+			decode_nlmsghdr_with_payload(tcp, fd, family,
+						     &err.msg, addr, len);
 		}
 	}
 
 	tprints("}");
 }
 
+static const netlink_decoder_t netlink_decoders[] = {
+	[NETLINK_SOCK_DIAG] = decode_netlink_sock_diag
+};
+
 static void
 decode_payload(struct tcb *const tcp,
+	       const int fd,
+	       const int family,
 	       const struct nlmsghdr *const nlmsghdr,
 	       const kernel_ulong_t addr,
 	       const kernel_ulong_t len)
 {
-	if (nlmsghdr->nlmsg_type == NLMSG_ERROR && len >= sizeof(int)) {
-		decode_nlmsgerr(tcp, addr, len);
-	} else {
-		printstrn(tcp, addr, len);
+	if (nlmsghdr->nlmsg_type == NLMSG_ERROR) {
+		decode_nlmsgerr(tcp, fd, family, addr, len);
+		return;
 	}
+
+	if ((unsigned int) family < ARRAY_SIZE(netlink_decoders)
+	    && netlink_decoders[family]
+	    && netlink_decoders[family](tcp, nlmsghdr, addr, len)) {
+		return;
+	}
+
+	if (nlmsghdr->nlmsg_type == NLMSG_DONE && len == sizeof(int)) {
+		int num;
+
+		if (!umove_or_printaddr(tcp, addr, &num))
+			tprintf("%d", num);
+		return;
+	}
+
+	printstrn(tcp, addr, len);
 }
 
 static void
 decode_nlmsghdr_with_payload(struct tcb *const tcp,
+			     const int fd,
+			     int family,
 			     const struct nlmsghdr *const nlmsghdr,
 			     const kernel_ulong_t addr,
 			     const kernel_ulong_t len)
 {
-	tprints("{");
-
-	print_nlmsghdr(tcp, nlmsghdr);
-
-	unsigned int nlmsg_len =
+	const unsigned int nlmsg_len =
 		nlmsghdr->nlmsg_len > len ? len : nlmsghdr->nlmsg_len;
+
+	if (nlmsg_len > NLMSG_HDRLEN)
+		tprints("{");
+
+	family = print_nlmsghdr(tcp, fd, family, nlmsghdr);
+
 	if (nlmsg_len > NLMSG_HDRLEN) {
 		tprints(", ");
-		decode_payload(tcp, nlmsghdr, addr + NLMSG_HDRLEN,
-					 nlmsg_len - NLMSG_HDRLEN);
+		decode_payload(tcp, fd, family, nlmsghdr, addr + NLMSG_HDRLEN,
+						     nlmsg_len - NLMSG_HDRLEN);
+		tprints("}");
 	}
-
-	tprints("}");
 }
 
 void
-decode_netlink(struct tcb *const tcp, kernel_ulong_t addr, kernel_ulong_t len)
+decode_netlink(struct tcb *const tcp,
+	       const int fd,
+	       kernel_ulong_t addr,
+	       kernel_ulong_t len)
 {
 	struct nlmsghdr nlmsghdr;
 	bool print_array = false;
@@ -169,7 +404,8 @@
 			print_array = true;
 		}
 
-		decode_nlmsghdr_with_payload(tcp, &nlmsghdr, addr, len);
+		decode_nlmsghdr_with_payload(tcp, fd, NL_FAMILY_DEFAULT,
+					     &nlmsghdr, addr, len);
 
 		if (!next_addr)
 			break;
diff --git a/netlink.h b/netlink.h
new file mode 100644
index 0000000..5943229
--- /dev/null
+++ b/netlink.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen <chenjingpiao@gmail.com>
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef STRACE_NETLINK_H
+#define STRACE_NETLINK_H
+
+#include <sys/socket.h>
+#include <linux/netlink.h>
+
+#ifndef NETLINK_SOCK_DIAG
+# define NETLINK_SOCK_DIAG 4
+#endif
+
+#undef NLMSG_HDRLEN
+#define NLMSG_HDRLEN ((unsigned int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
+
+#ifndef NLMSG_MIN_TYPE
+# define NLMSG_MIN_TYPE		0x10
+#endif
+
+#ifndef NLA_ALIGN
+# define NLA_ALIGN(len) (((len) + 3) & ~3)
+#endif
+
+#undef NLA_HDRLEN
+#define NLA_HDRLEN ((unsigned int) NLA_ALIGN(sizeof(struct nlattr)))
+
+#ifndef NLA_TYPE_MASK
+# define NLA_F_NESTED		(1 << 15)
+# define NLA_F_NET_BYTEORDER	(1 << 14)
+# define NLA_TYPE_MASK		~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
+#endif
+
+#endif /* !STRACE_NETLINK_H */
diff --git a/netlink_sock_diag.c b/netlink_sock_diag.c
new file mode 100644
index 0000000..3888934
--- /dev/null
+++ b/netlink_sock_diag.c
@@ -0,0 +1,885 @@
+/*
+ * Copyright (c) 2016 Fabien Siron <fabien.siron@epita.fr>
+ * Copyright (c) 2017 JingPiao Chen <chenjingpiao@gmail.com>
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "defs.h"
+#include "netlink.h"
+#include "nlattr.h"
+#include "print_fields.h"
+
+#include <arpa/inet.h>
+#include <linux/inet_diag.h>
+#include <linux/netlink_diag.h>
+#include <linux/packet_diag.h>
+#ifdef AF_SMC
+# include <linux/smc_diag.h>
+#endif
+#include <linux/sock_diag.h>
+#include <linux/unix_diag.h>
+
+#include "xlat/inet_diag_attrs.h"
+#include "xlat/inet_diag_extended_flags.h"
+#include "xlat/inet_diag_req_attrs.h"
+
+#include "xlat/tcp_states.h"
+#include "xlat/tcp_state_flags.h"
+
+#include "xlat/netlink_diag_attrs.h"
+#include "xlat/netlink_diag_show.h"
+#include "xlat/netlink_socket_flags.h"
+#include "xlat/netlink_states.h"
+
+#include "xlat/packet_diag_attrs.h"
+#include "xlat/packet_diag_show.h"
+
+#ifdef AF_SMC
+# include "xlat/smc_diag_attrs.h"
+# include "xlat/smc_diag_extended_flags.h"
+# include "xlat/smc_states.h"
+#endif
+
+#include "xlat/unix_diag_attrs.h"
+#include "xlat/unix_diag_show.h"
+
+static void
+decode_family(struct tcb *const tcp, const uint8_t family,
+	      const kernel_ulong_t addr, const kernel_ulong_t len)
+{
+	tprints("{family=");
+	printxval(addrfams, family, "AF_???");
+	if (len > sizeof(family)) {
+		tprints(", ");
+		printstrn(tcp, addr + sizeof(family),
+			  len - sizeof(family));
+	}
+	tprints("}");
+}
+
+static void
+decode_unix_diag_req(struct tcb *const tcp,
+		     const struct nlmsghdr *const nlmsghdr,
+		     const uint8_t family,
+		     const kernel_ulong_t addr,
+		     const kernel_ulong_t len)
+{
+	struct unix_diag_req req = { .sdiag_family = family };
+	const size_t offset = sizeof(req.sdiag_family);
+
+	PRINT_FIELD_XVAL("{", req, sdiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(req)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(req) - offset,
+					 (void *) &req + offset)) {
+			PRINT_FIELD_U("", req, sdiag_protocol);
+			PRINT_FIELD_FLAGS(", ", req, udiag_states,
+					  tcp_state_flags, "1<<TCP_???");
+			PRINT_FIELD_U(", ", req, udiag_ino);
+			PRINT_FIELD_FLAGS(", ", req, udiag_show,
+					  unix_diag_show, "UDIAG_SHOW_???");
+			PRINT_FIELD_COOKIE(", ", req, udiag_cookie);
+		}
+	} else
+		tprints("...");
+	tprints("}");
+}
+
+static bool
+print_meminfo(struct tcb *const tcp,
+	      void *const elem_buf,
+	      const size_t elem_size,
+	      void *const opaque_data)
+{
+	tprintf("%" PRIu32, *(uint32_t *) elem_buf);
+
+	return true;
+}
+
+static bool
+decode_meminfo(struct tcb *const tcp,
+	       const kernel_ulong_t addr,
+	       const kernel_ulong_t len,
+	       const void *const opaque_data)
+{
+	uint32_t mem;
+	size_t nmemb = len / sizeof(mem);
+
+	if (!nmemb)
+		return false;
+
+	if (nmemb > SK_MEMINFO_VARS)
+		nmemb = SK_MEMINFO_VARS;
+
+	print_array(tcp, addr, nmemb, &mem, sizeof(mem),
+		    umoven_or_printaddr, print_meminfo, 0);
+
+	return true;
+}
+
+static bool
+decode_unix_diag_vfs(struct tcb *const tcp,
+		     const kernel_ulong_t addr,
+		     const kernel_ulong_t len,
+		     const void *const opaque_data)
+{
+	struct unix_diag_vfs uv;
+
+	if (len < sizeof(uv))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &uv))
+		return true;
+
+	tprints("{udiag_vfs_dev=");
+	print_dev_t(uv.udiag_vfs_dev);
+	PRINT_FIELD_U(", ", uv, udiag_vfs_ino);
+	tprints("}");
+
+	return true;
+}
+
+static bool
+print_inode(struct tcb *const tcp,
+	    void *const elem_buf,
+	    const size_t elem_size,
+	    void *const opaque_data)
+{
+	tprintf("%" PRIu32, *(uint32_t *) elem_buf);
+
+	return true;
+}
+
+static bool
+decode_unix_diag_inode(struct tcb *const tcp,
+		       const kernel_ulong_t addr,
+		       const kernel_ulong_t len,
+		       const void *const opaque_data)
+{
+	uint32_t inode;
+	const size_t nmemb = len / sizeof(inode);
+
+	if (!nmemb)
+		return false;
+
+	print_array(tcp, addr, nmemb, &inode, sizeof(inode),
+		    umoven_or_printaddr, print_inode, 0);
+
+	return true;
+}
+
+static bool
+decode_unix_diag_rqlen(struct tcb *const tcp,
+		       const kernel_ulong_t addr,
+		       const kernel_ulong_t len,
+		       const void *const opaque_data)
+{
+	struct unix_diag_rqlen rql;
+
+	if (len < sizeof(rql))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &rql))
+		return true;
+
+	PRINT_FIELD_U("{", rql, udiag_rqueue);
+	PRINT_FIELD_U(", ", rql, udiag_wqueue);
+	tprints("}");
+
+	return true;
+}
+
+static const nla_decoder_t unix_diag_msg_nla_decoders[] = {
+	[UNIX_DIAG_NAME]	= decode_nla_str,
+	[UNIX_DIAG_VFS]		= decode_unix_diag_vfs,
+	[UNIX_DIAG_PEER]	= decode_nla_u32,
+	[UNIX_DIAG_ICONS]	= decode_unix_diag_inode,
+	[UNIX_DIAG_RQLEN]	= decode_unix_diag_rqlen,
+	[UNIX_DIAG_MEMINFO]	= decode_meminfo,
+	[UNIX_DIAG_SHUTDOWN]	= decode_nla_u8
+};
+
+static void
+decode_unix_diag_msg(struct tcb *const tcp,
+		     const struct nlmsghdr *const nlmsghdr,
+		     const uint8_t family,
+		     const kernel_ulong_t addr,
+		     const kernel_ulong_t len)
+{
+	struct unix_diag_msg msg = { .udiag_family = family };
+	size_t offset = sizeof(msg.udiag_family);
+	bool decode_nla = false;
+
+	PRINT_FIELD_XVAL("{", msg, udiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(msg)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(msg) - offset,
+					 (void *) &msg + offset)) {
+			PRINT_FIELD_XVAL("", msg, udiag_type,
+					 socktypes, "SOCK_???");
+			PRINT_FIELD_XVAL(", ", msg, udiag_state,
+					 tcp_states, "TCP_???");
+			PRINT_FIELD_U(", ", msg, udiag_ino);
+			PRINT_FIELD_COOKIE(", ", msg, udiag_cookie);
+			decode_nla = true;
+		}
+	} else
+		tprints("...");
+	tprints("}");
+
+	offset = NLMSG_ALIGN(sizeof(msg));
+	if (decode_nla && len > offset) {
+		tprints(", ");
+		decode_nlattr(tcp, addr + offset, len - offset,
+			      unix_diag_attrs, "UNIX_DIAG_???",
+			      unix_diag_msg_nla_decoders,
+			      ARRAY_SIZE(unix_diag_msg_nla_decoders), NULL);
+	}
+}
+
+static void
+decode_netlink_diag_req(struct tcb *const tcp,
+			const struct nlmsghdr *const nlmsghdr,
+			const uint8_t family,
+			const kernel_ulong_t addr,
+			const kernel_ulong_t len)
+{
+	struct netlink_diag_req req = { .sdiag_family = family };
+	const size_t offset = sizeof(req.sdiag_family);
+
+	PRINT_FIELD_XVAL("{", req, sdiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(req)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(req) - offset,
+					 (void *) &req + offset)) {
+			if (NDIAG_PROTO_ALL == req.sdiag_protocol)
+				tprintf("%s=%s",
+					"sdiag_protocol", "NDIAG_PROTO_ALL");
+			else
+				PRINT_FIELD_XVAL("", req, sdiag_protocol,
+						 netlink_protocols,
+						 "NETLINK_???");
+			PRINT_FIELD_U(", ", req, ndiag_ino);
+			PRINT_FIELD_FLAGS(", ", req, ndiag_show,
+					  netlink_diag_show, "NDIAG_SHOW_???");
+			PRINT_FIELD_COOKIE(", ", req, ndiag_cookie);
+		}
+	} else
+		tprints("...");
+	tprints("}");
+}
+
+static bool
+print_group(struct tcb *const tcp,
+	    void *const elem_buf,
+	    const size_t elem_size,
+	    void *const opaque_data)
+{
+	if (elem_size < sizeof(kernel_ulong_t))
+		tprintf("%#0*x", (int) elem_size * 2 + 2,
+			*(unsigned int *) elem_buf);
+	else
+		tprintf("%#0*" PRI_klx, (int) elem_size * 2 + 2,
+			*(kernel_ulong_t *) elem_buf);
+
+	return true;
+}
+
+static bool
+decode_netlink_diag_groups(struct tcb *const tcp,
+			   const kernel_ulong_t addr,
+			   const kernel_ulong_t len,
+			   const void *const opaque_data)
+{
+	kernel_ulong_t buf;
+	const size_t nmemb = len / current_wordsize;
+
+	if (!nmemb)
+		return false;
+
+	print_array(tcp, addr, nmemb, &buf, current_wordsize,
+		    umoven_or_printaddr, print_group, 0);
+
+	return true;
+}
+
+static bool
+decode_netlink_diag_ring(struct tcb *const tcp,
+			 const kernel_ulong_t addr,
+			 const kernel_ulong_t len,
+			 const void *const opaque_data)
+{
+	struct netlink_diag_ring ndr;
+
+	if (len < sizeof(ndr))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &ndr))
+		return true;
+
+	PRINT_FIELD_U("{", ndr, ndr_block_size);
+	PRINT_FIELD_U(", ", ndr, ndr_block_nr);
+	PRINT_FIELD_U(", ", ndr, ndr_frame_size);
+	PRINT_FIELD_U(", ", ndr, ndr_frame_nr);
+	tprints("}");
+
+	return true;
+}
+
+static bool
+decode_netlink_diag_flags(struct tcb *const tcp,
+			  const kernel_ulong_t addr,
+			  const kernel_ulong_t len,
+			  const void *const opaque_data)
+{
+	uint32_t flags;
+
+	if (len < sizeof(flags))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &flags))
+		return true;
+
+	printflags(netlink_socket_flags, flags, "NDIAG_FLAG_???");
+
+	return true;
+}
+
+static const nla_decoder_t netlink_diag_msg_nla_decoders[] = {
+	[NETLINK_DIAG_MEMINFO]	= decode_meminfo,
+	[NETLINK_DIAG_GROUPS]	= decode_netlink_diag_groups,
+	[NETLINK_DIAG_RX_RING]	= decode_netlink_diag_ring,
+	[NETLINK_DIAG_TX_RING]	= decode_netlink_diag_ring,
+	[NETLINK_DIAG_FLAGS]	= decode_netlink_diag_flags
+};
+
+static void
+decode_netlink_diag_msg(struct tcb *const tcp,
+			const struct nlmsghdr *const nlmsghdr,
+			const uint8_t family,
+			const kernel_ulong_t addr,
+			const kernel_ulong_t len)
+{
+	struct netlink_diag_msg msg = { .ndiag_family = family };
+	size_t offset = sizeof(msg.ndiag_family);
+	bool decode_nla = false;
+
+	PRINT_FIELD_XVAL("{", msg, ndiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(msg)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(msg) - offset,
+					 (void *) &msg + offset)) {
+			PRINT_FIELD_XVAL("", msg, ndiag_type,
+					 socktypes, "SOCK_???");
+			PRINT_FIELD_XVAL(", ", msg, ndiag_protocol,
+					 netlink_protocols, "NETLINK_???");
+			PRINT_FIELD_XVAL(", ", msg, ndiag_state,
+					 netlink_states, "NETLINK_???");
+			PRINT_FIELD_U(", ", msg, ndiag_portid);
+			PRINT_FIELD_U(", ", msg, ndiag_dst_portid);
+			PRINT_FIELD_U(", ", msg, ndiag_dst_group);
+			PRINT_FIELD_U(", ", msg, ndiag_ino);
+			PRINT_FIELD_COOKIE(", ", msg, ndiag_cookie);
+			decode_nla = true;
+		}
+	} else
+		tprints("...");
+	tprints("}");
+
+	offset = NLA_ALIGN(sizeof(msg));
+	if (decode_nla && len > offset) {
+		tprints(", ");
+		decode_nlattr(tcp, addr + offset, len - offset,
+			      netlink_diag_attrs, "NETLINK_DIAG_???",
+			      netlink_diag_msg_nla_decoders,
+			      ARRAY_SIZE(netlink_diag_msg_nla_decoders), NULL);
+	}
+}
+
+static void
+decode_packet_diag_req(struct tcb *const tcp,
+		       const struct nlmsghdr *const nlmsghdr,
+		       const uint8_t family,
+		       const kernel_ulong_t addr,
+		       const kernel_ulong_t len)
+{
+	struct packet_diag_req req = { .sdiag_family = family };
+	const size_t offset = sizeof(req.sdiag_family);
+
+	PRINT_FIELD_XVAL("{", req, sdiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(req)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(req) - offset,
+					 (void *) &req + offset)) {
+			PRINT_FIELD_XVAL("", req, sdiag_protocol,
+					 ethernet_protocols, "ETH_P_???");
+			PRINT_FIELD_U(", ", req, pdiag_ino);
+			PRINT_FIELD_FLAGS(", ", req, pdiag_show,
+					  packet_diag_show, "PACKET_SHOW_???");
+			PRINT_FIELD_COOKIE(", ", req, pdiag_cookie);
+		}
+	} else
+		tprints("...");
+	tprints("}");
+}
+
+static void
+decode_packet_diag_msg(struct tcb *const tcp,
+		       const struct nlmsghdr *const nlmsghdr,
+		       const uint8_t family,
+		       const kernel_ulong_t addr,
+		       const kernel_ulong_t len)
+{
+	struct packet_diag_msg msg = { .pdiag_family = family };
+	size_t offset = sizeof(msg.pdiag_family);
+	bool decode_nla = false;
+
+	PRINT_FIELD_XVAL("{", msg, pdiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(msg)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(msg) - offset,
+					 (void *) &msg + offset)) {
+			PRINT_FIELD_XVAL("", msg, pdiag_type,
+					 socktypes, "SOCK_???");
+			PRINT_FIELD_U(", ", msg, pdiag_num);
+			PRINT_FIELD_U(", ", msg, pdiag_ino);
+			PRINT_FIELD_COOKIE(", ", msg, pdiag_cookie);
+			decode_nla = true;
+		}
+	} else
+		tprints("...");
+	tprints("}");
+
+	offset = NLA_ALIGN(sizeof(msg));
+	if (decode_nla && len > offset) {
+		tprints(", ");
+		decode_nlattr(tcp, addr + offset, len - offset,
+			      packet_diag_attrs, "PACKET_DIAG_???",
+			      NULL, 0, NULL);
+	}
+}
+
+static void
+print_inet_diag_sockid(const struct inet_diag_sockid *id, const uint8_t family)
+{
+	tprintf("{idiag_sport=htons(%u), idiag_dport=htons(%u)",
+		ntohs(id->idiag_sport), ntohs(id->idiag_dport));
+
+	tprints(", ");
+	print_inet_addr(family, id->idiag_src,
+			sizeof(id->idiag_src), "idiag_src");
+	tprints(", ");
+	print_inet_addr(family, id->idiag_dst,
+			sizeof(id->idiag_dst), "idiag_dst");
+
+	tprints(", idiag_if=");
+	print_ifindex(id->idiag_if);
+
+	PRINT_FIELD_COOKIE(", ", *id, idiag_cookie);
+
+	tprints("}");
+}
+
+static void
+decode_inet_diag_req_compat(struct tcb *const tcp,
+			    const struct nlmsghdr *const nlmsghdr,
+			    const uint8_t family,
+			    const kernel_ulong_t addr,
+			    const kernel_ulong_t len)
+{
+	struct inet_diag_req req = { .idiag_family = family };
+	size_t offset = sizeof(req.idiag_family);
+	bool decode_nla = false;
+
+	PRINT_FIELD_XVAL("{", req, idiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(req)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(req) - offset,
+					 (void *) &req + offset)) {
+			PRINT_FIELD_U("", req, idiag_src_len);
+			PRINT_FIELD_U(", ", req, idiag_dst_len);
+			PRINT_FIELD_FLAGS(", ", req, idiag_ext,
+					  inet_diag_extended_flags,
+					  "1<<INET_DIAG_\?\?\?-1");
+			tprints(", id=");
+			print_inet_diag_sockid(&req.id, req.idiag_family);
+			PRINT_FIELD_FLAGS(", ", req, idiag_states,
+					  tcp_state_flags, "1<<TCP_???");
+			PRINT_FIELD_U(", ", req, idiag_dbs);
+			decode_nla = true;
+		}
+	} else
+		tprints("...");
+	tprints("}");
+
+	offset = NLA_ALIGN(sizeof(req));
+	if (decode_nla && len > offset) {
+		tprints(", ");
+		decode_nlattr(tcp, addr + offset, len - offset,
+			      inet_diag_req_attrs, "INET_DIAG_REQ_???",
+			      NULL, 0, NULL);
+	}
+}
+
+static void
+decode_inet_diag_req_v2(struct tcb *const tcp,
+			const struct nlmsghdr *const nlmsghdr,
+			const uint8_t family,
+			const kernel_ulong_t addr,
+			const kernel_ulong_t len)
+{
+	struct inet_diag_req_v2 req = { .sdiag_family = family };
+	size_t offset = sizeof(req.sdiag_family);
+	bool decode_nla = false;
+
+	PRINT_FIELD_XVAL("{", req, sdiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(req)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(req) - offset,
+					 (void *) &req + offset)) {
+			PRINT_FIELD_XVAL("", req, sdiag_protocol,
+					 inet_protocols, "IPPROTO_???");
+			PRINT_FIELD_FLAGS(", ", req, idiag_ext,
+					  inet_diag_extended_flags,
+					  "1<<INET_DIAG_\?\?\?-1");
+			PRINT_FIELD_FLAGS(", ", req, idiag_states,
+					  tcp_state_flags, "1<<TCP_???");
+			tprints(", id=");
+			print_inet_diag_sockid(&req.id, req.sdiag_family);
+			decode_nla = true;
+		}
+	} else
+		tprints("...");
+	tprints("}");
+
+	offset = NLA_ALIGN(sizeof(req));
+	if (decode_nla && len > offset) {
+		tprints(", ");
+		decode_nlattr(tcp, addr + offset, len - offset,
+			      inet_diag_req_attrs, "INET_DIAG_REQ_???",
+			      NULL, 0, NULL);
+	}
+}
+
+static void
+decode_inet_diag_req(struct tcb *const tcp,
+		     const struct nlmsghdr *const nlmsghdr,
+		     const uint8_t family,
+		     const kernel_ulong_t addr,
+		     const kernel_ulong_t len)
+{
+	if (nlmsghdr->nlmsg_type == TCPDIAG_GETSOCK
+	    || nlmsghdr->nlmsg_type == DCCPDIAG_GETSOCK)
+		return decode_inet_diag_req_compat(tcp, nlmsghdr,
+						   family, addr, len);
+	else
+		return decode_inet_diag_req_v2(tcp, nlmsghdr,
+					       family, addr, len);
+}
+
+static bool
+decode_inet_diag_meminfo(struct tcb *const tcp,
+			 const kernel_ulong_t addr,
+			 const kernel_ulong_t len,
+			 const void *const opaque_data)
+{
+	struct inet_diag_meminfo minfo;
+
+	if (len < sizeof(minfo))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &minfo))
+		return true;
+
+	PRINT_FIELD_U("{", minfo, idiag_rmem);
+	PRINT_FIELD_U(", ", minfo, idiag_wmem);
+	PRINT_FIELD_U(", ", minfo, idiag_fmem);
+	PRINT_FIELD_U(", ", minfo, idiag_tmem);
+	tprints("}");
+
+	return true;
+}
+
+static bool
+decode_tcpvegas_info(struct tcb *const tcp,
+		     const kernel_ulong_t addr,
+		     const kernel_ulong_t len,
+		     const void *const opaque_data)
+{
+	struct tcpvegas_info vegas;
+
+	if (len < sizeof(vegas))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &vegas))
+		return true;
+
+	PRINT_FIELD_U("{", vegas, tcpv_enabled);
+	PRINT_FIELD_U(", ", vegas, tcpv_rttcnt);
+	PRINT_FIELD_U(", ", vegas, tcpv_rtt);
+	PRINT_FIELD_U(", ", vegas, tcpv_minrtt);
+	tprints("}");
+
+	return true;
+}
+
+static bool
+decode_tcp_dctcp_info(struct tcb *const tcp,
+		      const kernel_ulong_t addr,
+		      const kernel_ulong_t len,
+		      const void *const opaque_data)
+{
+	struct tcp_dctcp_info dctcp;
+
+	if (len < sizeof(dctcp))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &dctcp))
+		return true;
+
+	PRINT_FIELD_U("{", dctcp, dctcp_enabled);
+	PRINT_FIELD_U(", ", dctcp, dctcp_ce_state);
+	PRINT_FIELD_U(", ", dctcp, dctcp_alpha);
+	PRINT_FIELD_U(", ", dctcp, dctcp_ab_ecn);
+	PRINT_FIELD_U(", ", dctcp, dctcp_ab_tot);
+	tprints("}");
+
+	return true;
+}
+
+static bool
+decode_tcp_bbr_info(struct tcb *const tcp,
+		    const kernel_ulong_t addr,
+		    const kernel_ulong_t len,
+		    const void *const opaque_data)
+{
+	struct tcp_bbr_info bbr;
+
+	if (len < sizeof(bbr))
+		return false;
+	if (umove_or_printaddr(tcp, addr, &bbr))
+		return true;
+
+	PRINT_FIELD_X("{", bbr, bbr_bw_lo);
+	PRINT_FIELD_X(", ", bbr, bbr_bw_hi);
+	PRINT_FIELD_U(", ", bbr, bbr_min_rtt);
+	PRINT_FIELD_U(", ", bbr, bbr_pacing_gain);
+	PRINT_FIELD_U(", ", bbr, bbr_cwnd_gain);
+	tprints("}");
+
+	return true;
+}
+
+static const nla_decoder_t inet_diag_msg_nla_decoders[] = {
+	[INET_DIAG_MEMINFO]	= decode_inet_diag_meminfo,
+	[INET_DIAG_INFO]	= NULL,			/* unimplemented */
+	[INET_DIAG_VEGASINFO]	= decode_tcpvegas_info,
+	[INET_DIAG_CONG]	= decode_nla_str,
+	[INET_DIAG_TOS]		= decode_nla_u8,
+	[INET_DIAG_TCLASS]	= decode_nla_u8,
+	[INET_DIAG_SKMEMINFO]	= decode_meminfo,
+	[INET_DIAG_SHUTDOWN]	= decode_nla_u8,
+	[INET_DIAG_DCTCPINFO]	= decode_tcp_dctcp_info,
+	[INET_DIAG_PROTOCOL]	= decode_nla_u8,
+	[INET_DIAG_SKV6ONLY]	= decode_nla_u8,
+	[INET_DIAG_LOCALS]	= NULL,			/* unimplemented */
+	[INET_DIAG_PEERS]	= NULL,			/* unimplemented */
+	[INET_DIAG_PAD]		= NULL,
+	[INET_DIAG_MARK]	= decode_nla_u32,
+	[INET_DIAG_BBRINFO]	= decode_tcp_bbr_info
+};
+
+static void
+decode_inet_diag_msg(struct tcb *const tcp,
+		     const struct nlmsghdr *const nlmsghdr,
+		     const uint8_t family,
+		     const kernel_ulong_t addr,
+		     const kernel_ulong_t len)
+{
+	struct inet_diag_msg msg = { .idiag_family = family };
+	size_t offset = sizeof(msg.idiag_family);
+	bool decode_nla = false;
+
+	PRINT_FIELD_XVAL("{", msg, idiag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(msg)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(msg) - offset,
+					 (void *) &msg + offset)) {
+			PRINT_FIELD_XVAL("", msg, idiag_state,
+					 tcp_states, "TCP_???");
+			PRINT_FIELD_U(", ", msg, idiag_timer);
+			PRINT_FIELD_U(", ", msg, idiag_retrans);
+			tprints(", id=");
+			print_inet_diag_sockid(&msg.id, msg.idiag_family);
+			PRINT_FIELD_U(", ", msg, idiag_expires);
+			PRINT_FIELD_U(", ", msg, idiag_rqueue);
+			PRINT_FIELD_U(", ", msg, idiag_wqueue);
+			PRINT_FIELD_U(", ", msg, idiag_uid);
+			PRINT_FIELD_U(", ", msg, idiag_inode);
+			decode_nla = true;
+		}
+	} else
+		tprints("...");
+	tprints("}");
+
+	offset = NLA_ALIGN(sizeof(msg));
+	if (decode_nla && len > offset) {
+		tprints(", ");
+		decode_nlattr(tcp, addr + offset, len - offset,
+			      inet_diag_attrs, "INET_DIAG_???",
+			      inet_diag_msg_nla_decoders,
+			      ARRAY_SIZE(inet_diag_msg_nla_decoders), NULL);
+	}
+}
+
+#ifdef AF_SMC
+static void
+decode_smc_diag_req(struct tcb *const tcp,
+		    const struct nlmsghdr *const nlmsghdr,
+		    const uint8_t family,
+		    const kernel_ulong_t addr,
+		    const kernel_ulong_t len)
+{
+	struct smc_diag_req req = { .diag_family = family };
+	const size_t offset = sizeof(req.diag_family);
+
+	PRINT_FIELD_XVAL("{", req, diag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(req)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(req) - offset,
+					 (void *) &req + offset)) {
+			PRINT_FIELD_FLAGS("", req, diag_ext,
+					  smc_diag_extended_flags,
+					  "1<<SMC_DIAG_\?\?\?-1");
+			tprints(", id=");
+			/*
+			 * AF_SMC protocol family socket handler
+			 * keeping the AF_INET sock address.
+			 */
+			print_inet_diag_sockid(&req.id, AF_INET);
+		}
+	} else
+		tprints("...");
+	tprints("}");
+}
+
+static void
+decode_smc_diag_msg(struct tcb *const tcp,
+		    const struct nlmsghdr *const nlmsghdr,
+		    const uint8_t family,
+		    const kernel_ulong_t addr,
+		    const kernel_ulong_t len)
+{
+	struct smc_diag_msg msg = { .diag_family = family };
+	size_t offset = sizeof(msg.diag_family);
+	bool decode_nla = false;
+
+	PRINT_FIELD_XVAL("{", msg, diag_family, addrfams, "AF_???");
+	tprints(", ");
+	if (len >= sizeof(msg)) {
+		if (!umoven_or_printaddr(tcp, addr + offset,
+					 sizeof(msg) - offset,
+					 (void *) &msg + offset)) {
+			PRINT_FIELD_XVAL("", msg, diag_state,
+					 smc_states, "SMC_???");
+			PRINT_FIELD_U(", ", msg, diag_fallback);
+			PRINT_FIELD_U(", ", msg, diag_shutdown);
+			tprints(", id=");
+			/*
+			 * AF_SMC protocol family socket handler
+			 * keeping the AF_INET sock address.
+			 */
+			print_inet_diag_sockid(&msg.id, AF_INET);
+			PRINT_FIELD_U(", ", msg, diag_uid);
+			PRINT_FIELD_U(", ", msg, diag_inode);
+			decode_nla = true;
+		}
+	} else
+		tprints("...");
+	tprints("}");
+
+	offset = NLA_ALIGN(sizeof(msg));
+	if (decode_nla && len > offset) {
+		tprints(", ");
+		decode_nlattr(tcp, addr + offset, len - offset,
+			      smc_diag_attrs, "SMC_DIAG_???",
+			      NULL, 0, NULL);
+	}
+}
+#endif
+
+typedef void (*netlink_diag_decoder_t)(struct tcb *,
+				       const struct nlmsghdr *,
+				       uint8_t family,
+				       kernel_ulong_t addr,
+				       kernel_ulong_t len);
+
+static const struct {
+	const netlink_diag_decoder_t request, response;
+} diag_decoders[] = {
+	[AF_INET] = { decode_inet_diag_req, decode_inet_diag_msg },
+	[AF_INET6] = { decode_inet_diag_req, decode_inet_diag_msg },
+	[AF_NETLINK] = { decode_netlink_diag_req, decode_netlink_diag_msg },
+	[AF_PACKET] = { decode_packet_diag_req, decode_packet_diag_msg },
+#ifdef AF_SMC
+	[AF_SMC] = { decode_smc_diag_req, decode_smc_diag_msg },
+#endif
+	[AF_UNIX] = { decode_unix_diag_req, decode_unix_diag_msg }
+};
+
+bool
+decode_netlink_sock_diag(struct tcb *const tcp,
+			 const struct nlmsghdr *const nlmsghdr,
+			 const kernel_ulong_t addr,
+			 const kernel_ulong_t len)
+{
+	uint8_t family;
+
+	if (nlmsghdr->nlmsg_type == NLMSG_DONE)
+		return false;
+
+	if (!umove_or_printaddr(tcp, addr, &family)) {
+		if (family < ARRAY_SIZE(diag_decoders)
+		    && len > sizeof(family)) {
+			const netlink_diag_decoder_t decoder =
+				(nlmsghdr->nlmsg_flags & NLM_F_REQUEST)
+				? diag_decoders[family].request
+				: diag_decoders[family].response;
+
+			if (decoder) {
+				decoder(tcp, nlmsghdr, family, addr, len);
+				return true;
+			}
+		}
+
+		decode_family(tcp, family, addr, len);
+	}
+
+	return true;
+}
diff --git a/nlattr.c b/nlattr.c
new file mode 100644
index 0000000..ef3d762
--- /dev/null
+++ b/nlattr.c
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2016 Fabien Siron <fabien.siron@epita.fr>
+ * Copyright (c) 2017 JingPiao Chen <chenjingpiao@gmail.com>
+ * Copyright (c) 2016-2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "defs.h"
+#include "netlink.h"
+#include "nlattr.h"
+
+static bool
+fetch_nlattr(struct tcb *const tcp, struct nlattr *const nlattr,
+	     const kernel_ulong_t addr, const kernel_ulong_t len)
+{
+	if (len < sizeof(struct nlattr)) {
+		printstrn(tcp, addr, len);
+		return false;
+	}
+
+	if (umove_or_printaddr(tcp, addr, nlattr))
+		return false;
+
+	return true;
+}
+
+static void
+print_nlattr(const struct nlattr *const nla,
+	     const struct xlat *const table,
+	     const char *const dflt)
+{
+	tprintf("{nla_len=%u, nla_type=", nla->nla_len);
+	if (nla->nla_type & NLA_F_NESTED)
+		tprints("NLA_F_NESTED|");
+	if (nla->nla_type & NLA_F_NET_BYTEORDER)
+		tprints("NLA_F_NET_BYTEORDER|");
+	printxval(table, nla->nla_type & NLA_TYPE_MASK, dflt);
+	tprints("}");
+}
+
+static void
+decode_nlattr_with_data(struct tcb *const tcp,
+			const struct nlattr *const nla,
+			const kernel_ulong_t addr,
+			const kernel_ulong_t len,
+			const struct xlat *const table,
+			const char *const dflt,
+			const nla_decoder_t *const decoders,
+			const unsigned int size,
+			const void *const opaque_data)
+{
+	const unsigned int nla_len = nla->nla_len > len ? len : nla->nla_len;
+
+	if (nla_len > NLA_HDRLEN)
+		tprints("{");
+
+	print_nlattr(nla, table, dflt);
+
+	if (nla_len > NLA_HDRLEN) {
+		tprints(", ");
+		if (!decoders
+		    || nla->nla_type >= size
+		    || !decoders[nla->nla_type]
+		    || !decoders[nla->nla_type](tcp, addr + NLA_HDRLEN,
+						nla_len - NLA_HDRLEN,
+						opaque_data))
+			printstrn(tcp, addr + NLA_HDRLEN, len - NLA_HDRLEN);
+		tprints("}");
+	}
+}
+
+void
+decode_nlattr(struct tcb *const tcp,
+	      kernel_ulong_t addr,
+	      kernel_ulong_t len,
+	      const struct xlat *const table,
+	      const char *const dflt,
+	      const nla_decoder_t *const decoders,
+	      const unsigned int size,
+	      const void *const opaque_data)
+{
+	struct nlattr nla;
+	bool print_array = false;
+	unsigned int elt;
+
+	for (elt = 0; fetch_nlattr(tcp, &nla, addr, len); elt++) {
+		if (abbrev(tcp) && elt == max_strlen) {
+			tprints("...");
+			break;
+		}
+
+		const unsigned long nla_len = NLA_ALIGN(nla.nla_len);
+		kernel_ulong_t next_addr = 0;
+		kernel_ulong_t next_len = 0;
+
+		if (nla.nla_len >= NLA_HDRLEN) {
+			next_len = (len >= nla_len) ? len - nla_len : 0;
+
+			if (next_len && addr + nla_len > addr)
+				next_addr = addr + nla_len;
+		}
+
+		if (!print_array && next_addr) {
+			tprints("[");
+			print_array = true;
+		}
+
+		decode_nlattr_with_data(tcp, &nla, addr, len, table, dflt,
+					decoders, size, opaque_data);
+
+		if (!next_addr)
+			break;
+
+		tprints(", ");
+		addr = next_addr;
+		len = next_len;
+	}
+
+	if (print_array) {
+		tprints("]");
+	}
+}
+
+bool
+decode_nla_str(struct tcb *const tcp,
+	       const kernel_ulong_t addr,
+	       const kernel_ulong_t len,
+	       const void *const opaque_data)
+{
+	printstr_ex(tcp, addr, len, QUOTE_0_TERMINATED);
+
+	return true;
+}
+
+bool
+decode_nla_strn(struct tcb *const tcp,
+		const kernel_ulong_t addr,
+		const kernel_ulong_t len,
+		const void *const opaque_data)
+{
+	printstrn(tcp, addr, len);
+
+	return true;
+}
+
+#define DECODE_NLA_INTEGER(name, type, fmt)		\
+bool							\
+decode_nla_ ## name(struct tcb *const tcp,		\
+		    const kernel_ulong_t addr,		\
+		    const kernel_ulong_t len,		\
+		    const void *const opaque_data)	\
+{							\
+	type num;					\
+							\
+	if (len < sizeof(num))				\
+		return false;				\
+	if (!umove_or_printaddr(tcp, addr, &num))	\
+		tprintf(fmt, num);			\
+	return true;					\
+}
+
+DECODE_NLA_INTEGER(u8, uint8_t, "%" PRIu8)
+DECODE_NLA_INTEGER(u16, uint16_t, "%" PRIu16)
+DECODE_NLA_INTEGER(u32, uint32_t, "%" PRIu32)
+DECODE_NLA_INTEGER(u64, uint64_t, "%" PRIu64)
+DECODE_NLA_INTEGER(s8, int8_t, "%" PRId8)
+DECODE_NLA_INTEGER(s16, int16_t, "%" PRId16)
+DECODE_NLA_INTEGER(s32, int32_t, "%" PRId32)
+DECODE_NLA_INTEGER(s64, int64_t, "%" PRId64)
diff --git a/nlattr.h b/nlattr.h
new file mode 100644
index 0000000..40a476f
--- /dev/null
+++ b/nlattr.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2016 Fabien Siron <fabien.siron@epita.fr>
+ * Copyright (c) 2017 JingPiao Chen <chenjingpiao@gmail.com>
+ * Copyright (c) 2016-2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef STRACE_NLATTR_H
+#define STRACE_NLATTR_H
+
+typedef bool (*nla_decoder_t)(struct tcb *, kernel_ulong_t addr,
+			      kernel_ulong_t len, const void *opaque_data);
+extern void
+decode_nlattr(struct tcb *,
+	      kernel_ulong_t addr,
+	      kernel_ulong_t len,
+	      const struct xlat *,
+	      const char *dflt,
+	      const nla_decoder_t *,
+	      unsigned int size,
+	      const void *opaque_data);
+
+#define DECL_NLA(name)					\
+extern bool						\
+decode_nla_ ## name(struct tcb *, kernel_ulong_t addr,	\
+		    kernel_ulong_t len, const void *)
+DECL_NLA(u8);
+DECL_NLA(u16);
+DECL_NLA(u32);
+DECL_NLA(u64);
+DECL_NLA(s8);
+DECL_NLA(s16);
+DECL_NLA(s32);
+DECL_NLA(s64);
+DECL_NLA(str);
+DECL_NLA(strn);
+
+#endif /* !STRACE_NLATTR_H */
diff --git a/numa.c b/numa.c
index a4b28f4..7564d87 100644
--- a/numa.c
+++ b/numa.c
@@ -34,10 +34,10 @@
 {
 	if (elem_size < sizeof(kernel_ulong_t)) {
 		tprintf("%#0*x", (int) elem_size * 2 + 2,
-			* (unsigned int *) elem_buf);
+			*(unsigned int *) elem_buf);
 	} else {
 		tprintf("%#0*" PRI_klx, (int) elem_size * 2 + 2,
-			* (kernel_ulong_t *) elem_buf);
+			*(kernel_ulong_t *) elem_buf);
 	}
 
 	return true;
@@ -127,9 +127,9 @@
 	kernel_ulong_t addr;
 
 	if (elem_size < sizeof(addr)) {
-		addr = * (unsigned int *) elem_buf;
+		addr = *(unsigned int *) elem_buf;
 	} else {
-		addr = * (kernel_ulong_t *) elem_buf;
+		addr = *(kernel_ulong_t *) elem_buf;
 	}
 
 	printaddr(addr);
@@ -140,7 +140,7 @@
 static bool
 print_status(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
 {
-	const int status = * (int *) elem_buf;
+	const int status = *(int *) elem_buf;
 
 	if (status < 0 && (unsigned) -status < nerrnos)
 		tprintf("-%s", errnoent[-status]);
@@ -153,7 +153,7 @@
 static bool
 print_int(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
 {
-	tprintf("%d", * (int *) elem_buf);
+	tprintf("%d", *(int *) elem_buf);
 
 	return true;
 }
diff --git a/open.c b/open.c
index 222965b..2822266 100644
--- a/open.c
+++ b/open.c
@@ -42,7 +42,7 @@
 #define O_ACCMODE 03
 
 #ifdef O_LARGEFILE
-# if O_LARGEFILE == 0          /* biarch platforms in 64-bit mode */
+# if O_LARGEFILE == 0		/* biarch platforms in 64-bit mode */
 #  undef O_LARGEFILE
 #  ifdef SPARC64
 #   define O_LARGEFILE 0x40000
@@ -56,7 +56,7 @@
 #include "xlat/open_mode_flags.h"
 
 #ifndef AT_FDCWD
-# define AT_FDCWD                -100
+# define AT_FDCWD	-100
 #endif
 
 /* The fd is an "int", so when decoding x86 on x86_64, we need to force sign
diff --git a/or1k_atomic.c b/or1k_atomic.c
index fb6aff3..738cc2e 100644
--- a/or1k_atomic.c
+++ b/or1k_atomic.c
@@ -31,22 +31,22 @@
 
 #ifdef OR1K
 
-#define OR1K_ATOMIC_SWAP        1
-#define OR1K_ATOMIC_CMPXCHG     2
-#define OR1K_ATOMIC_XCHG        3
-#define OR1K_ATOMIC_ADD         4
-#define OR1K_ATOMIC_DECPOS      5
-#define OR1K_ATOMIC_AND         6
-#define OR1K_ATOMIC_OR          7
-#define OR1K_ATOMIC_UMAX        8
-#define OR1K_ATOMIC_UMIN        9
+#define OR1K_ATOMIC_SWAP	1
+#define OR1K_ATOMIC_CMPXCHG	2
+#define OR1K_ATOMIC_XCHG	3
+#define OR1K_ATOMIC_ADD		4
+#define OR1K_ATOMIC_DECPOS	5
+#define OR1K_ATOMIC_AND		6
+#define OR1K_ATOMIC_OR		7
+#define OR1K_ATOMIC_UMAX	8
+#define OR1K_ATOMIC_UMIN	9
 
 #include "xlat/atomic_ops.h"
 
 SYS_FUNC(or1k_atomic)
 {
 	printxval64(atomic_ops, tcp->u_arg[0], "???");
-	switch(tcp->u_arg[0]) {
+	switch (tcp->u_arg[0]) {
 	case OR1K_ATOMIC_SWAP:
 		tprintf(", 0x%lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
 		break;
diff --git a/pathtrace.c b/pathtrace.c
index ea48825..9cb0ba7 100644
--- a/pathtrace.c
+++ b/pathtrace.c
@@ -33,8 +33,8 @@
 
 #include "syscall.h"
 
-const char **paths_selected = NULL;
-static unsigned num_selected = 0;
+const char **paths_selected;
+static unsigned int num_selected;
 
 /*
  * Return true if specified path matches one that we're tracing.
@@ -59,7 +59,7 @@
 {
 	char path[PATH_MAX + 1];
 
-	return umovestr(tcp, upath, sizeof path, path) > 0 &&
+	return umovestr(tcp, upath, sizeof(path), path) > 0 &&
 		pathmatch(path);
 }
 
diff --git a/perf.c b/perf.c
index 98f2ae1..6af0f42 100644
--- a/perf.c
+++ b/perf.c
@@ -168,7 +168,7 @@
 
 		if (use_new_size > 0)
 			printxval(perf_attr_size, new_size,
-			          "PERF_ATTR_SIZE_???");
+				  "PERF_ATTR_SIZE_???");
 		else
 			tprints("???");
 	}
@@ -176,17 +176,17 @@
 	switch (attr->type) {
 	case PERF_TYPE_HARDWARE:
 		PRINT_XLAT(", config=", perf_hw_id, attr->config,
-		           "PERF_COUNT_HW_???");
+			   "PERF_COUNT_HW_???");
 		break;
 	case PERF_TYPE_SOFTWARE:
 		PRINT_XLAT(", config=", perf_sw_ids, attr->config,
-		           "PERF_COUNT_SW_???");
+			   "PERF_COUNT_SW_???");
 		break;
 	case PERF_TYPE_TRACEPOINT:
 		/*
 		 * "The value to use in config can be obtained from under
-		 * debugfs tracing/events/../../id if ftrace is enabled in the
-                 * kernel."
+		 * debugfs tracing/events/../../id if ftrace is enabled
+		 * in the kernel."
 		 */
 		tprintf(", config=%" PRIu64, attr->config);
 		break;
@@ -196,9 +196,9 @@
 		 * (perf_hw_cache_op_result_id << 16)
 		 */
 		PRINT_XLAT(", config=", perf_hw_cache_id, attr->config & 0xFF,
-		           "PERF_COUNT_HW_CACHE_???");
+			   "PERF_COUNT_HW_CACHE_???");
 		PRINT_XLAT("|", perf_hw_cache_op_id, (attr->config >> 8) & 0xFF,
-		           "PERF_COUNT_HW_CACHE_OP_???");
+			   "PERF_COUNT_HW_CACHE_OP_???");
 		/*
 		 * Current code (see set_ext_hw_attr in arch/x86/events/core.c,
 		 * tile_map_cache_event in arch/tile/kernel/perf_event.c,
@@ -215,8 +215,8 @@
 		 * that cache result is 8 bits in size.
 		 */
 		PRINT_XLAT("<<8|", perf_hw_cache_op_result_id,
-		           (attr->config >> 16) & 0xFF,
-		           "PERF_COUNT_HW_CACHE_RESULT_???");
+			   (attr->config >> 16) & 0xFF,
+			   "PERF_COUNT_HW_CACHE_RESULT_???");
 		tprints("<<16");
 		if (attr->config >> 24) {
 			tprintf("|%#" PRIx64 "<<24", attr->config >> 24);
@@ -262,60 +262,60 @@
 		"PERF_FORMAT_???");
 
 	tprintf(", disabled=%u"
-	        ", inherit=%u"
-	        ", pinned=%u"
-	        ", exclusive=%u"
-	        ", exclusive_user=%u"
-	        ", exclude_kernel=%u"
-	        ", exclude_hv=%u"
-	        ", exclude_idle=%u"
-	        ", mmap=%u"
-	        ", comm=%u"
-	        ", freq=%u"
-	        ", inherit_stat=%u"
-	        ", enable_on_exec=%u"
-	        ", task=%u"
-	        ", watermark=%u"
-	        ", precise_ip=%u",
-	        attr->disabled,
-	        attr->inherit,
-	        attr->pinned,
-	        attr->exclusive,
-	        attr->exclude_user,
-	        attr->exclude_kernel,
-	        attr->exclude_hv,
-	        attr->exclude_idle,
-	        attr->mmap,
-	        attr->comm,
-	        attr->freq,
-	        attr->inherit_stat,
-	        attr->enable_on_exec,
-	        attr->task,
-	        attr->watermark,
-	        attr->precise_ip);
+		", inherit=%u"
+		", pinned=%u"
+		", exclusive=%u"
+		", exclusive_user=%u"
+		", exclude_kernel=%u"
+		", exclude_hv=%u"
+		", exclude_idle=%u"
+		", mmap=%u"
+		", comm=%u"
+		", freq=%u"
+		", inherit_stat=%u"
+		", enable_on_exec=%u"
+		", task=%u"
+		", watermark=%u"
+		", precise_ip=%u",
+		attr->disabled,
+		attr->inherit,
+		attr->pinned,
+		attr->exclusive,
+		attr->exclude_user,
+		attr->exclude_kernel,
+		attr->exclude_hv,
+		attr->exclude_idle,
+		attr->mmap,
+		attr->comm,
+		attr->freq,
+		attr->inherit_stat,
+		attr->enable_on_exec,
+		attr->task,
+		attr->watermark,
+		attr->precise_ip);
 	tprints_comment(precise_ip_desc[attr->precise_ip]);
 	tprintf(", mmap_data=%u"
-	        ", sample_id_all=%u"
-	        ", exclude_host=%u"
-	        ", exclude_guest=%u"
-	        ", exclude_callchain_kernel=%u"
-	        ", exclude_callchain_user=%u"
-	        ", mmap2=%u"
-	        ", comm_exec=%u"
-	        ", use_clockid=%u"
-	        ", context_switch=%u"
-	        ", write_backward=%u",
-	        attr->mmap_data,
-	        attr->sample_id_all,
-	        attr->exclude_host,
-	        attr->exclude_guest,
-	        attr->exclude_callchain_kernel,
-	        attr->exclude_callchain_user,
-	        attr->mmap2,
-	        attr->comm_exec,
-	        attr->use_clockid,
-	        attr->context_switch,
-	        attr->write_backward);
+		", sample_id_all=%u"
+		", exclude_host=%u"
+		", exclude_guest=%u"
+		", exclude_callchain_kernel=%u"
+		", exclude_callchain_user=%u"
+		", mmap2=%u"
+		", comm_exec=%u"
+		", use_clockid=%u"
+		", context_switch=%u"
+		", write_backward=%u",
+		attr->mmap_data,
+		attr->sample_id_all,
+		attr->exclude_host,
+		attr->exclude_guest,
+		attr->exclude_callchain_kernel,
+		attr->exclude_callchain_user,
+		attr->mmap2,
+		attr->comm_exec,
+		attr->use_clockid,
+		attr->context_switch,
+		attr->write_backward);
 
 	/*
 	 * Print it only in case it is non-zero, since it may contain flags we
@@ -323,7 +323,7 @@
 	 */
 	if (attr->__reserved_1) {
 		tprintf(", __reserved_1=%#" PRIx64,
-		        (uint64_t) attr->__reserved_1);
+			(uint64_t) attr->__reserved_1);
 		tprints_comment("Bits 63..28");
 	}
 
@@ -335,10 +335,10 @@
 	if (attr->type == PERF_TYPE_BREAKPOINT)
 		/* Any combination of R/W with X is deemed invalid */
 		PRINT_XLAT(", bp_type=", hw_breakpoint_type, attr->bp_type,
-		           (attr->bp_type <=
-		                   (HW_BREAKPOINT_X | HW_BREAKPOINT_RW)) ?
-		                           "HW_BREAKPOINT_INVALID" :
-		                           "HW_BREAKPOINT_???");
+			   (attr->bp_type <=
+				   (HW_BREAKPOINT_X | HW_BREAKPOINT_RW)) ?
+					   "HW_BREAKPOINT_INVALID" :
+					   "HW_BREAKPOINT_???");
 
 	if (attr->type == PERF_TYPE_BREAKPOINT)
 		tprintf(", bp_addr=%#" PRIx64, attr->bp_addr);
@@ -360,7 +360,7 @@
 	if (attr->sample_type & PERF_SAMPLE_BRANCH_STACK) {
 		tprints(", branch_sample_type=");
 		printflags64(perf_branch_sample_type, attr->branch_sample_type,
-		             "PERF_SAMPLE_BRANCH_???");
+			     "PERF_SAMPLE_BRANCH_???");
 	}
 
 	_PERF_CHECK_FIELD(sample_regs_user);
@@ -379,7 +379,7 @@
 	 */
 	if (attr->sample_type & PERF_SAMPLE_STACK_USER)
 		tprintf(", sample_stack_user=%#" PRIx32,
-		        attr->sample_stack_user);
+			attr->sample_stack_user);
 
 	if (attr->use_clockid) {
 		_PERF_CHECK_FIELD(clockid);
diff --git a/perf_event_struct.h b/perf_event_struct.h
index 161f638..b5a15bb 100644
--- a/perf_event_struct.h
+++ b/perf_event_struct.h
@@ -13,34 +13,34 @@
 	};
 	uint64_t sample_type;
 	uint64_t read_format;
-	uint64_t disabled                 :1,
-	         inherit                  :1,
-		 pinned                   :1,
-		 exclusive                :1,
-	         exclude_user             :1,
-	         exclude_kernel           :1,
-	         exclude_hv               :1,
-	         exclude_idle             :1,
-	         mmap                     :1,
-	         comm                     :1,
-	         freq                     :1,
-	         inherit_stat             :1,
-	         enable_on_exec           :1,
-	         task                     :1,
-	         watermark                :1,
-	         precise_ip               :2,
-	         mmap_data                :1,
-	         sample_id_all            :1,
-	         exclude_host             :1,
-	         exclude_guest            :1,
-	         exclude_callchain_kernel :1,
-	         exclude_callchain_user   :1,
-	         mmap2                    :1,
-	         comm_exec                :1,
-	         use_clockid              :1,
-	         context_switch           :1,
-	         write_backward           :1,
-	         __reserved_1             :36;
+	uint64_t disabled			:1,
+		 inherit			:1,
+		 pinned				:1,
+		 exclusive			:1,
+		 exclude_user			:1,
+		 exclude_kernel			:1,
+		 exclude_hv			:1,
+		 exclude_idle			:1,
+		 mmap				:1,
+		 comm				:1,
+		 freq				:1,
+		 inherit_stat			:1,
+		 enable_on_exec			:1,
+		 task				:1,
+		 watermark			:1,
+		 precise_ip			:2,
+		 mmap_data			:1,
+		 sample_id_all			:1,
+		 exclude_host			:1,
+		 exclude_guest			:1,
+		 exclude_callchain_kernel	:1,
+		 exclude_callchain_user		:1,
+		 mmap2				:1,
+		 comm_exec			:1,
+		 use_clockid			:1,
+		 context_switch			:1,
+		 write_backward			:1,
+		 __reserved_1			:36;
 	union {
 		uint32_t wakeup_events;
 		uint32_t wakeup_watermark;
diff --git a/print_fields.h b/print_fields.h
new file mode 100644
index 0000000..92b8a8a
--- /dev/null
+++ b/print_fields.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2016-2017 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef STRACE_PRINT_FIELDS_H
+#define STRACE_PRINT_FIELDS_H
+
+/*
+ * The printf-like function to use in header files
+ * shared between strace and its tests.
+ */
+#ifndef STRACE_PRINTF
+# define STRACE_PRINTF tprintf
+#endif
+
+#define PRINT_FIELD_D(prefix_, where_, field_)				\
+	STRACE_PRINTF("%s%s=%lld", (prefix_), #field_,			\
+		      sign_extend_unsigned_to_ll((where_).field_))
+
+#define PRINT_FIELD_U(prefix_, where_, field_)				\
+	STRACE_PRINTF("%s%s=%llu", (prefix_), #field_,			\
+		      zero_extend_signed_to_ull((where_).field_))
+
+#define PRINT_FIELD_X(prefix_, where_, field_)				\
+	STRACE_PRINTF("%s%s=%#llx", (prefix_), #field_,			\
+		      zero_extend_signed_to_ull((where_).field_))
+
+#define PRINT_FIELD_COOKIE(prefix_, where_, field_)			\
+	STRACE_PRINTF("%s%s=[%llu, %llu]", (prefix_), #field_,		\
+		      zero_extend_signed_to_ull((where_).field_[0]),	\
+		      zero_extend_signed_to_ull((where_).field_[1]))
+
+#define PRINT_FIELD_FLAGS(prefix_, where_, field_, xlat_, dflt_)	\
+	do {								\
+		STRACE_PRINTF("%s%s=", (prefix_), #field_);		\
+		printflags((xlat_), (where_).field_, (dflt_));		\
+	} while (0)
+
+#define PRINT_FIELD_XVAL(prefix_, where_, field_, xlat_, dflt_)		\
+	do {								\
+		STRACE_PRINTF("%s%s=", (prefix_), #field_);		\
+		printxval((xlat_), (where_).field_, (dflt_));		\
+	} while (0)
+
+#endif /* !STRACE_PRINT_FIELDS_H */
diff --git a/print_timespec.c b/print_timespec.c
index 1e99074..c8ab5b7 100644
--- a/print_timespec.c
+++ b/print_timespec.c
@@ -68,6 +68,42 @@
 	}
 }
 
+MPERS_PRINTER_DECL(bool, print_struct_timespec_data_size,
+		   const void *arg, const size_t size)
+{
+	if (size < sizeof(timespec_t)) {
+		tprints("?");
+		return false;
+	}
+
+	print_timespec_t(arg);
+	return true;
+}
+
+MPERS_PRINTER_DECL(bool, print_struct_timespec_array_data_size,
+		   const void *arg, const unsigned int nmemb,
+		   const size_t size)
+{
+	const timespec_t *ts = arg;
+	unsigned int i;
+
+	if (nmemb > size / sizeof(timespec_t)) {
+		tprints("?");
+		return false;
+	}
+
+	tprints("[");
+
+	for (i = 0; i < nmemb; i++) {
+		if (i)
+			tprints(", ");
+		print_timespec_t(&ts[i]);
+	}
+
+	tprints("]");
+	return true;
+}
+
 MPERS_PRINTER_DECL(void, print_timespec,
 		   struct tcb *const tcp, const kernel_ulong_t addr)
 {
diff --git a/print_timeval.c b/print_timeval.c
index 8d62554..8e0708f 100644
--- a/print_timeval.c
+++ b/print_timeval.c
@@ -55,6 +55,18 @@
 	print_timeval_t(arg);
 }
 
+MPERS_PRINTER_DECL(bool, print_struct_timeval_data_size,
+		   const void *arg, const size_t size)
+{
+	if (size < sizeof(timeval_t)) {
+		tprints("?");
+		return false;
+	}
+
+	print_timeval_t(arg);
+	return true;
+}
+
 MPERS_PRINTER_DECL(void, print_timeval,
 		   struct tcb *const tcp, const kernel_ulong_t addr)
 {
diff --git a/printers.h b/printers.h
index c775092..6bf0860 100644
--- a/printers.h
+++ b/printers.h
@@ -60,6 +60,12 @@
  void (*print_sigevent)(struct tcb *const tcp, const kernel_ulong_t addr);
 #define print_sigevent MPERS_PRINTER_NAME(print_sigevent)
 
+ _Bool (*print_struct_timespec_data_size)(const void *arg, const size_t size);
+#define print_struct_timespec_data_size MPERS_PRINTER_NAME(print_struct_timespec_data_size)
+
+ _Bool (*print_struct_timespec_array_data_size)(const void *arg, const unsigned int nmemb, const size_t size);
+#define print_struct_timespec_array_data_size MPERS_PRINTER_NAME(print_struct_timespec_array_data_size)
+
  void (*print_timespec)(struct tcb *const tcp, const kernel_ulong_t addr);
 #define print_timespec MPERS_PRINTER_NAME(print_timespec)
 
@@ -75,6 +81,9 @@
  void (*print_struct_timeval)(const void *arg);
 #define print_struct_timeval MPERS_PRINTER_NAME(print_struct_timeval)
 
+ _Bool (*print_struct_timeval_data_size)(const void *arg, const size_t size);
+#define print_struct_timeval_data_size MPERS_PRINTER_NAME(print_struct_timeval_data_size)
+
  void (*print_timeval)(struct tcb *const tcp, const kernel_ulong_t addr);
 #define print_timeval MPERS_PRINTER_NAME(print_timeval)
 
diff --git a/qualify.c b/qualify.c
index 30888e6..3df4805 100644
--- a/qualify.c
+++ b/qualify.c
@@ -414,18 +414,6 @@
 	}
 }
 
-/*
- * Returns NULL if STR does not start with PREFIX,
- * or a pointer to the first char in STR after PREFIX.
- */
-static const char *
-strip_prefix(const char *prefix, const char *str)
-{
-	size_t len = strlen(prefix);
-
-	return strncmp(prefix, str, len) ? NULL : str + len;
-}
-
 static int
 find_errno_by_name(const char *name)
 {
@@ -446,9 +434,9 @@
 	const char *val;
 	int intval;
 
-	if ((val = strip_prefix("when=", token))) {
+	if ((val = STR_STRIP_PREFIX(token, "when=")) != token) {
 		/*
-		 * 	== 1+1
+		 *	== 1+1
 		 * F	== F+0
 		 * F+	== F+1
 		 * F+S
@@ -476,7 +464,7 @@
 			/* F == F+0 */
 			fopts->step = 0;
 		}
-	} else if ((val = strip_prefix("error=", token))) {
+	} else if ((val = STR_STRIP_PREFIX(token, "error=")) != token) {
 		if (fopts->rval != INJECT_OPTS_RVAL_DEFAULT)
 			return false;
 		intval = string_to_uint_upto(val, MAX_ERRNO_VALUE);
@@ -485,14 +473,16 @@
 		if (intval < 1)
 			return false;
 		fopts->rval = -intval;
-	} else if (!fault_tokens_only && (val = strip_prefix("retval=", token))) {
+	} else if (!fault_tokens_only
+		   && (val = STR_STRIP_PREFIX(token, "retval=")) != token) {
 		if (fopts->rval != INJECT_OPTS_RVAL_DEFAULT)
 			return false;
 		intval = string_to_uint(val);
 		if (intval < 0)
 			return false;
 		fopts->rval = intval;
-	} else if (!fault_tokens_only && (val = strip_prefix("signal=", token))) {
+	} else if (!fault_tokens_only
+		   && (val = STR_STRIP_PREFIX(token, "signal=")) != token) {
 		intval = sigstr_to_uint(val);
 		if (intval < 1 || intval > NSIG_BYTES * 8)
 			return false;
@@ -677,14 +667,14 @@
 	unsigned int i;
 
 	for (i = 0; i < ARRAY_SIZE(qual_options); ++i) {
-		const char *p = qual_options[i].name;
-		unsigned int len = strlen(p);
+		const char *name = qual_options[i].name;
+		const size_t len = strlen(name);
+		const char *val = str_strip_prefix_len(str, name, len);
 
-		if (strncmp(str, p, len) || str[len] != '=')
+		if (val == str || *val != '=')
 			continue;
-
+		str = val + 1;
 		opt = &qual_options[i];
-		str += len + 1;
 		break;
 	}
 
diff --git a/quota.c b/quota.c
index 19f391f..7607ae0 100644
--- a/quota.c
+++ b/quota.c
@@ -30,6 +30,7 @@
  */
 
 #include "defs.h"
+#include "print_fields.h"
 
 #define SUBCMDMASK  0x00ff
 #define SUBCMDSHIFT 8
@@ -55,8 +56,7 @@
  * leads to problems when it is used on 32-bit tracee which does not have such
  * padding.
  */
-struct if_dqblk
-{
+struct if_dqblk {
 	uint64_t dqb_bhardlimit;
 	uint64_t dqb_bsoftlimit;
 	uint64_t dqb_curspace;
@@ -81,10 +81,9 @@
 	uint32_t dqb_id;
 };
 
-struct xfs_dqblk
-{
+struct xfs_dqblk {
 	int8_t  d_version;		/* version of this structure */
-	int8_t  d_flags;		/* XFS_{USER,PROJ,GROUP}_QUOTA */
+	uint8_t  d_flags;		/* XFS_{USER,PROJ,GROUP}_QUOTA */
 	uint16_t d_fieldmask;		/* field specifier */
 	uint32_t d_id;			/* user, project, or group ID */
 	uint64_t d_blk_hardlimit;	/* absolute limit on disk blks */
@@ -107,23 +106,20 @@
 	char    d_padding4[8];		/* yet more padding */
 };
 
-struct if_dqinfo
-{
+struct if_dqinfo {
 	uint64_t dqi_bgrace;
 	uint64_t dqi_igrace;
 	uint32_t dqi_flags;
 	uint32_t dqi_valid;
 };
 
-typedef struct fs_qfilestat
-{
+typedef struct fs_qfilestat {
 	uint64_t qfs_ino;	/* inode number */
 	uint64_t qfs_nblks;	/* number of BBs 512-byte-blks */
 	uint32_t qfs_nextents;	/* number of extents */
 } fs_qfilestat_t;
 
-struct xfs_dqstats
-{
+struct xfs_dqstats {
 	int8_t  qs_version;		/* version number for future changes */
 	uint16_t qs_flags;		/* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */
 	int8_t  qs_pad;			/* unused */
@@ -158,18 +154,6 @@
 	uint64_t qs_pad2[8];
 };
 
-#define PRINT_FIELD_D(prefix, where, field)	\
-	tprintf("%s%s=%lld", (prefix), #field,	\
-		sign_extend_unsigned_to_ll((where).field))
-
-#define PRINT_FIELD_U(prefix, where, field)	\
-	tprintf("%s%s=%llu", (prefix), #field,	\
-		zero_extend_signed_to_ull((where).field))
-
-#define PRINT_FIELD_X(prefix, where, field)	\
-	tprintf("%s%s=%#llx", (prefix), #field,	\
-		zero_extend_signed_to_ull((where).field))
-
 static int
 decode_cmd_data(struct tcb *tcp, uint32_t id, uint32_t cmd, kernel_ulong_t data)
 {
@@ -213,9 +197,8 @@
 		if (!abbrev(tcp)) {
 			PRINT_FIELD_U(", ", dq, dqb_btime);
 			PRINT_FIELD_U(", ", dq, dqb_itime);
-			tprints(", dqb_valid=");
-			printflags(if_dqblk_valid,
-				   dq.dqb_valid, "QIF_???");
+			PRINT_FIELD_FLAGS(", ", dq, dqb_valid,
+					  if_dqblk_valid, "QIF_???");
 		} else {
 			tprints(", ...");
 		}
@@ -244,9 +227,8 @@
 		if (!abbrev(tcp)) {
 			PRINT_FIELD_U(", ", dq, dqb_btime);
 			PRINT_FIELD_U(", ", dq, dqb_itime);
-			tprints(", dqb_valid=");
-			printflags(if_dqblk_valid,
-				   dq.dqb_valid, "QIF_???");
+			PRINT_FIELD_FLAGS(", ", dq, dqb_valid,
+					  if_dqblk_valid, "QIF_???");
 			PRINT_FIELD_U(", ", dq, dqb_id);
 		} else {
 			PRINT_FIELD_U(", ", dq, dqb_id);
@@ -277,9 +259,8 @@
 		if (umove_or_printaddr(tcp, data, &dq))
 			break;
 		PRINT_FIELD_D("{", dq, d_version);
-		tprints(", d_flags=");
-		printflags(xfs_dqblk_flags,
-			   (uint8_t) dq.d_flags, "XFS_???_QUOTA");
+		PRINT_FIELD_FLAGS(", ", dq, d_flags,
+				  xfs_dqblk_flags, "XFS_???_QUOTA");
 		PRINT_FIELD_X(", ", dq, d_fieldmask);
 		PRINT_FIELD_U(", ", dq, d_id);
 		PRINT_FIELD_U(", ", dq, d_blk_hardlimit);
@@ -340,10 +321,8 @@
 			break;
 		PRINT_FIELD_U("{", dq, dqi_bgrace);
 		PRINT_FIELD_U(", ", dq, dqi_igrace);
-		tprints(", dqi_flags=");
-		printflags(if_dqinfo_flags, dq.dqi_flags, "DQF_???");
-		tprints(", dqi_valid=");
-		printflags(if_dqinfo_valid, dq.dqi_valid, "IIF_???");
+		PRINT_FIELD_FLAGS(", ", dq, dqi_flags, if_dqinfo_flags, "DQF_???");
+		PRINT_FIELD_FLAGS(", ", dq, dqi_valid, if_dqinfo_valid, "IIF_???");
 		tprints("}");
 		break;
 	}
@@ -361,9 +340,8 @@
 			break;
 		PRINT_FIELD_D("{", dq, qs_version);
 		if (!abbrev(tcp)) {
-			tprints(", qs_flags=");
-			printflags(xfs_quota_flags,
-				   dq.qs_flags, "XFS_QUOTA_???");
+			PRINT_FIELD_FLAGS(", ", dq, qs_flags,
+					  xfs_quota_flags, "XFS_QUOTA_???");
 			PRINT_FIELD_U(", ", dq, qs_incoredqs);
 			PRINT_FIELD_U(", qs_uquota={", dq.qs_uquota, qfs_ino);
 			PRINT_FIELD_U(", ", dq.qs_uquota, qfs_nblks);
@@ -396,9 +374,8 @@
 			break;
 		PRINT_FIELD_D("{", dq, qs_version);
 		if (!abbrev(tcp)) {
-			tprints(", qs_flags=");
-			printflags(xfs_quota_flags,
-				   dq.qs_flags, "XFS_QUOTA_???");
+			PRINT_FIELD_FLAGS(", ", dq, qs_flags,
+					  xfs_quota_flags, "XFS_QUOTA_???");
 			PRINT_FIELD_U(", ", dq, qs_incoredqs);
 			PRINT_FIELD_U(", qs_uquota={", dq.qs_uquota, qfs_ino);
 			PRINT_FIELD_U(", ", dq.qs_uquota, qfs_nblks);
diff --git a/resource.c b/resource.c
index ab36752..27d653e 100644
--- a/resource.c
+++ b/resource.c
@@ -120,8 +120,7 @@
 	if (entering(tcp)) {
 		printxval(resources, tcp->u_arg[0], "RLIMIT_???");
 		tprints(", ");
-	}
-	else {
+	} else {
 		decode_rlimit(tcp, tcp->u_arg[1]);
 	}
 	return 0;
@@ -157,8 +156,7 @@
 	if (entering(tcp)) {
 		printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
 		tprints(", ");
-	}
-	else
+	} else
 		printrusage(tcp, tcp->u_arg[1]);
 	return 0;
 }
@@ -169,8 +167,7 @@
 	if (entering(tcp)) {
 		printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
 		tprints(", ");
-	}
-	else
+	} else
 		printrusage32(tcp, tcp->u_arg[1]);
 	return 0;
 }
diff --git a/scno.am b/scno.am
new file mode 100644
index 0000000..ee3db59
--- /dev/null
+++ b/scno.am
@@ -0,0 +1,44 @@
+# scno.h make rules for strace.
+#
+# Copyright (c) 2017 Dmitry V. Levin <ldv@altlinux.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+		$(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
+
+syscallent.i: $(top_builddir)/config.h $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h
+	$(CPP) -P $(SCNO_CPPFLAGS) -include $^ -o $@
+
+digits = [[:digit:]][[:digit:]]*
+al_nums = [[:alnum:]_][[:alnum:]_]*
+SCNO_SED = /TRACE_INDIRECT_SUBCALL/d; s/^\[[[:space:]]*\($(digits)\)\][[:space:]]*=[[:space:]]*{[^,]*,[^,]*,[^,]*,[[:space:]]*"\($(al_nums)\)"[[:space:]]*},.*/\#ifndef __NR_\2\n\# define __NR_\2 (SYSCALL_BIT | \1)\n\#endif/p
+
+scno.h: $(top_srcdir)/scno.head syscallent.i
+	echo '/* Generated by Makefile from $^; do not edit. */' > $@-t
+	cat $< >> $@-t
+	LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t
+	mv $@-t $@
+
+CLEANFILES += syscallent.i scno.h
diff --git a/signal.c b/signal.c
index 2c21f90..b14124e 100644
--- a/signal.c
+++ b/signal.c
@@ -6,7 +6,7 @@
  * Copyright (c) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
  *                     Linux for s390 port by D.J. Barrow
  *                    <barrow_dj@mail.yahoo.com,djbarrow@de.ibm.com>
- * Copyright (C) 2001-2017 The strace developers.
+ * Copyright (c) 2001-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -289,8 +289,7 @@
 {
 	if (entering(tcp)) {
 		tprint_old_sigmask_val("", (unsigned) tcp->u_arg[0]);
-	}
-	else if (!syserror(tcp)) {
+	} else if (!syserror(tcp)) {
 		tcp->auxstr = sprint_old_sigmask_val("old mask ",
 						     (unsigned) tcp->u_rval);
 		return RVAL_HEX | RVAL_STR;
@@ -300,30 +299,25 @@
 
 struct old_sigaction {
 	/* sa_handler may be a libc #define, need to use other name: */
-#ifdef MIPS
+#if defined MIPS
 	unsigned int sa_flags;
 	unsigned long sa_handler__;
-	/* Kernel treats sa_mask as an array of longs. */
-	unsigned long sa_mask[NSIG / sizeof(long)];
+	unsigned long sa_mask;
+#elif defined ALPHA
+	unsigned long sa_handler__;
+	unsigned long sa_mask;
+	unsigned int sa_flags;
 #else
 	unsigned long sa_handler__;
 	unsigned long sa_mask;
 	unsigned long sa_flags;
-#endif /* !MIPS */
-#if HAVE_SA_RESTORER
 	unsigned long sa_restorer;
 #endif
-};
-
-struct old_sigaction32 {
-	/* sa_handler may be a libc #define, need to use other name: */
-	uint32_t sa_handler__;
-	uint32_t sa_mask;
-	uint32_t sa_flags;
-#if HAVE_SA_RESTORER
-	uint32_t sa_restorer;
+}
+#ifdef ALPHA
+	ATTRIBUTE_PACKED
 #endif
-};
+;
 
 static void
 decode_old_sigaction(struct tcb *const tcp, const kernel_ulong_t addr)
@@ -332,7 +326,12 @@
 
 #ifndef current_wordsize
 	if (current_wordsize < sizeof(sa.sa_handler__)) {
-		struct old_sigaction32 sa32;
+		struct old_sigaction32 {
+			uint32_t sa_handler__;
+			uint32_t sa_mask;
+			uint32_t sa_flags;
+			uint32_t sa_restorer;
+		} sa32;
 
 		if (umove_or_printaddr(tcp, addr, &sa32))
 			return;
@@ -340,9 +339,7 @@
 		memset(&sa, 0, sizeof(sa));
 		sa.sa_handler__ = sa32.sa_handler__;
 		sa.sa_flags = sa32.sa_flags;
-#if HAVE_SA_RESTORER && defined SA_RESTORER
 		sa.sa_restorer = sa32.sa_restorer;
-#endif
 		sa.sa_mask = sa32.sa_mask;
 	} else
 #endif
@@ -352,15 +349,11 @@
 	tprints("{sa_handler=");
 	print_sa_handler(sa.sa_handler__);
 	tprints(", sa_mask=");
-#ifdef MIPS
-	tprintsigmask_addr("", sa.sa_mask);
-#else
-	tprintsigmask_val("", sa.sa_mask);
-#endif
+	tprint_old_sigmask_val("", sa.sa_mask);
 	tprints(", sa_flags=");
 	printflags(sigact_flags, sa.sa_flags, "SA_???");
-#if HAVE_SA_RESTORER && defined SA_RESTORER
-	if (sa.sa_flags & SA_RESTORER) {
+#if !(defined ALPHA || defined MIPS)
+	if (sa.sa_flags & 0x04000000U) {
 		tprints(", sa_restorer=");
 		printaddr(sa.sa_restorer);
 	}
@@ -371,7 +364,14 @@
 SYS_FUNC(sigaction)
 {
 	if (entering(tcp)) {
-		printsignal(tcp->u_arg[0]);
+		int signo = tcp->u_arg[0];
+#if defined SPARC || defined SPARC64
+		if (signo < 0) {
+			tprints("-");
+			signo = -signo;
+		}
+#endif
+		printsignal(signo);
 		tprints(", ");
 		decode_old_sigaction(tcp, tcp->u_arg[1]);
 		tprints(", ");
@@ -415,42 +415,46 @@
 	return RVAL_DECODED;
 }
 
-/* "Old" sigprocmask, which operates with word-sized signal masks */
-SYS_FUNC(sigprocmask)
+#ifdef ALPHA
+/*
+ * The OSF/1 sigprocmask is different: it doesn't pass in two pointers,
+ * but rather passes in the new bitmask as an argument and then returns
+ * the old bitmask.  This "works" because we only have 64 signals to worry
+ * about.  If you want more, use of the rt_sigprocmask syscall is required.
+ *
+ * Alpha:
+ *	old = osf_sigprocmask(how, new);
+ * Everyone else:
+ *	ret = sigprocmask(how, &new, &old, ...);
+ */
+SYS_FUNC(osf_sigprocmask)
 {
-# ifdef ALPHA
 	if (entering(tcp)) {
-		/*
-		 * Alpha/OSF is different: it doesn't pass in two pointers,
-		 * but rather passes in the new bitmask as an argument and
-		 * then returns the old bitmask.  This "works" because we
-		 * only have 64 signals to worry about.  If you want more,
-		 * use of the rt_sigprocmask syscall is required.
-		 * Alpha:
-		 *	old = osf_sigprocmask(how, new);
-		 * Everyone else:
-		 *	ret = sigprocmask(how, &new, &old, ...);
-		 */
 		printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
 		tprintsigmask_val(", ", tcp->u_arg[1]);
-	}
-	else if (!syserror(tcp)) {
+	} else if (!syserror(tcp)) {
 		tcp->auxstr = sprintsigmask_val("old mask ", tcp->u_rval);
 		return RVAL_HEX | RVAL_STR;
 	}
-# else /* !ALPHA */
+	return 0;
+}
+
+#else /* !ALPHA */
+
+/* "Old" sigprocmask, which operates with word-sized signal masks */
+SYS_FUNC(sigprocmask)
+{
 	if (entering(tcp)) {
 		printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
 		tprints(", ");
 		print_sigset_addr_len(tcp, tcp->u_arg[1], current_wordsize);
 		tprints(", ");
-	}
-	else {
+	} else {
 		print_sigset_addr_len(tcp, tcp->u_arg[2], current_wordsize);
 	}
-# endif /* !ALPHA */
 	return 0;
 }
+#endif /* !ALPHA */
 
 SYS_FUNC(kill)
 {
@@ -486,8 +490,7 @@
 		tprints(", ");
 		print_sigset_addr_len(tcp, tcp->u_arg[1], tcp->u_arg[3]);
 		tprints(", ");
-	}
-	else {
+	} else {
 		print_sigset_addr_len(tcp, tcp->u_arg[2], tcp->u_arg[3]);
 		tprintf(", %" PRI_klu, tcp->u_arg[3]);
 	}
@@ -495,8 +498,7 @@
 }
 
 /* Structure describing the action to be taken when a signal arrives.  */
-struct new_sigaction
-{
+struct new_sigaction {
 	/* sa_handler may be a libc #define, need to use other name: */
 #ifdef MIPS
 	unsigned int sa_flags;
@@ -512,8 +514,7 @@
 	unsigned long sa_mask[NSIG / sizeof(long)];
 };
 /* Same for i386-on-x86_64 and similar cases */
-struct new_sigaction32
-{
+struct new_sigaction32 {
 	uint32_t sa_handler__;
 	uint32_t sa_flags;
 #if HAVE_SA_RESTORER
diff --git a/sockaddr.c b/sockaddr.c
index 174108c..bfbe585 100644
--- a/sockaddr.c
+++ b/sockaddr.c
@@ -35,7 +35,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include <linux/netlink.h>
+#include "netlink.h"
 #include <linux/if_packet.h>
 #include <linux/if_arp.h>
 #include <linux/if_ether.h>
@@ -81,6 +81,34 @@
 	}
 }
 
+bool
+print_inet_addr(const int af,
+		const void *const addr,
+		const unsigned int len,
+		const char *const var_name)
+{
+	const char *af_name = NULL;
+	char buf[INET6_ADDRSTRLEN];
+
+	switch (af) {
+	case AF_INET:
+		af_name = "AF_INET";
+		break;
+	case AF_INET6:
+		af_name = "AF_INET6";
+		break;
+	}
+
+	if (af_name && inet_ntop(af, addr, buf, sizeof(buf))) {
+		tprintf("inet_pton(%s, \"%s\", &%s)", af_name, buf, var_name);
+		return true;
+	} else {
+		tprintf("%s=", var_name);
+		print_quoted_string(addr, len, 0);
+		return false;
+	}
+}
+
 static void
 print_sockaddr_data_in(const void *const buf, const int addrlen)
 {
@@ -97,13 +125,10 @@
 {
 	const struct sockaddr_in6 *const sa_in6 = buf;
 
-	char string_addr[100];
-	inet_ntop(AF_INET6, &sa_in6->sin6_addr,
-		  string_addr, sizeof(string_addr));
-	tprintf("sin6_port=htons(%u), inet_pton(AF_INET6"
-		", \"%s\", &sin6_addr), sin6_flowinfo=htonl(%u)",
-		ntohs(sa_in6->sin6_port), string_addr,
-		ntohl(sa_in6->sin6_flowinfo));
+	tprintf("sin6_port=htons(%u), ", ntohs(sa_in6->sin6_port));
+	print_inet_addr(AF_INET6, &sa_in6->sin6_addr,
+			sizeof(sa_in6->sin6_addr), "sin6_addr");
+	tprintf(", sin6_flowinfo=htonl(%u)", ntohl(sa_in6->sin6_flowinfo));
 
 	if (addrlen <= (int) SIN6_MIN_LEN)
 		return;
diff --git a/socketutils.c b/socketutils.c
index ef8269c..ce4e524 100644
--- a/socketutils.c
+++ b/socketutils.c
@@ -31,22 +31,21 @@
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
-#include <linux/netlink.h>
+#include "netlink.h"
 #include <linux/sock_diag.h>
 #include <linux/inet_diag.h>
 #include <linux/unix_diag.h>
 #include <linux/netlink_diag.h>
 #include <linux/rtnetlink.h>
+#if HAVE_LINUX_GENETLINK_H
+#include <linux/genetlink.h>
+#endif
 
 #include <sys/un.h>
 #ifndef UNIX_PATH_MAX
 # define UNIX_PATH_MAX sizeof(((struct sockaddr_un *) 0)->sun_path)
 #endif
 
-#ifndef NETLINK_SOCK_DIAG
-# define NETLINK_SOCK_DIAG 4
-#endif
-
 typedef struct {
 	unsigned long inode;
 	char *details;
@@ -57,23 +56,29 @@
 #define CACHE_MASK (CACHE_SIZE - 1)
 
 static int
-cache_and_print_inode_details(const unsigned long inode, char *const details)
+cache_inode_details(const unsigned long inode, char *const details)
 {
 	cache_entry *e = &cache[inode & CACHE_MASK];
 	free(e->details);
 	e->inode = inode;
 	e->details = details;
 
-	tprints(details);
 	return 1;
 }
 
-bool
-print_sockaddr_by_inode_cached(const unsigned long inode)
+static const char *
+get_sockaddr_by_inode_cached(const unsigned long inode)
 {
 	const cache_entry *const e = &cache[inode & CACHE_MASK];
-	if (e && inode == e->inode) {
-		tprints(e->details);
+	return (e && inode == e->inode) ? e->details : NULL;
+}
+
+static bool
+print_sockaddr_by_inode_cached(const unsigned long inode)
+{
+	const char *const details = get_sockaddr_by_inode_cached(inode);
+	if (details) {
+		tprints(details);
 		return true;
 	}
 	return false;
@@ -128,9 +133,10 @@
 }
 
 static int
-inet_parse_response(const char *const proto_name, const void *const data,
-		    const int data_len, const unsigned long inode)
+inet_parse_response(const void *const data, const int data_len,
+		    const unsigned long inode, void *opaque_data)
 {
+	const char *const proto_name = opaque_data;
 	const struct inet_diag_msg *const diag_msg = data;
 	static const char zero_addr[sizeof(struct in6_addr)];
 	socklen_t addr_size, text_size;
@@ -140,7 +146,7 @@
 	if (diag_msg->idiag_inode != inode)
 		return 0;
 
-	switch(diag_msg->idiag_family) {
+	switch (diag_msg->idiag_family) {
 		case AF_INET:
 			addr_size = sizeof(struct in_addr);
 			text_size = INET_ADDRSTRLEN;
@@ -178,14 +184,15 @@
 			return false;
 	}
 
-	return cache_and_print_inode_details(inode, details);
+	return cache_inode_details(inode, details);
 }
 
 static bool
 receive_responses(const int fd, const unsigned long inode,
-		  const char *proto_name,
-		  int (* parser) (const char *, const void *,
-				  int, unsigned long))
+		  const unsigned long expected_msg_type,
+		  int (*parser)(const void *, int,
+				unsigned long, void *),
+		  void *opaque_data)
 {
 	static union {
 		struct nlmsghdr hdr;
@@ -220,10 +227,10 @@
 		if (!NLMSG_OK(h, ret))
 			return false;
 		for (; NLMSG_OK(h, ret); h = NLMSG_NEXT(h, ret)) {
-			if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY)
+			if (h->nlmsg_type != expected_msg_type)
 				return false;
-			const int rc = parser(proto_name, NLMSG_DATA(h),
-					      h->nlmsg_len, inode);
+			const int rc = parser(NLMSG_DATA(h),
+					      h->nlmsg_len, inode, opaque_data);
 			if (rc > 0)
 				return true;
 			if (rc < 0)
@@ -234,14 +241,6 @@
 }
 
 static bool
-inet_print(const int fd, const int family, const int protocol,
-	   const unsigned long inode, const char *proto_name)
-{
-	return inet_send_query(fd, family, protocol)
-		&& receive_responses(fd, inode, proto_name, inet_parse_response);
-}
-
-static bool
 unix_send_query(const int fd, const unsigned long inode)
 {
 	struct {
@@ -264,9 +263,10 @@
 }
 
 static int
-unix_parse_response(const char *proto_name, const void *data,
-		    const int data_len, const unsigned long inode)
+unix_parse_response(const void *data, const int data_len,
+		    const unsigned long inode, void *opaque_data)
 {
+	const char *proto_name = opaque_data;
 	const struct unix_diag_msg *diag_msg = data;
 	struct rtattr *attr;
 	int rta_len = data_len - NLMSG_LENGTH(sizeof(*diag_msg));
@@ -337,7 +337,7 @@
 		     peer_str, path_str) < 0)
 		return -1;
 
-	return cache_and_print_inode_details(inode, details);
+	return cache_inode_details(inode, details);
 }
 
 static bool
@@ -362,9 +362,10 @@
 }
 
 static int
-netlink_parse_response(const char *proto_name, const void *data,
-		    const int data_len, const unsigned long inode)
+netlink_parse_response(const void *data, const int data_len,
+		       const unsigned long inode, void *opaque_data)
 {
+	const char *proto_name = opaque_data;
 	const struct netlink_diag_msg *const diag_msg = data;
 	const char *netlink_proto;
 	char *details;
@@ -381,12 +382,7 @@
 				diag_msg->ndiag_protocol);
 
 	if (netlink_proto) {
-		static const char netlink_prefix[] = "NETLINK_";
-		const size_t netlink_prefix_len =
-			sizeof(netlink_prefix) -1;
-		if (strncmp(netlink_proto, netlink_prefix,
-			    netlink_prefix_len) == 0)
-			netlink_proto += netlink_prefix_len;
+		netlink_proto = STR_STRIP_PREFIX(netlink_proto, "NETLINK_");
 		if (asprintf(&details, "%s:[%s:%u]", proto_name,
 			     netlink_proto, diag_msg->ndiag_portid) < 0)
 			return -1;
@@ -396,58 +392,71 @@
 			return -1;
 	}
 
-	return cache_and_print_inode_details(inode, details);
+	return cache_inode_details(inode, details);
 }
 
-static bool
-unix_print(const int fd, const unsigned long inode)
+static const char *
+unix_get(const int fd, const unsigned long inode)
 {
 	return unix_send_query(fd, inode)
-		&& receive_responses(fd, inode, "UNIX", unix_parse_response);
+		&& receive_responses(fd, inode, SOCK_DIAG_BY_FAMILY,
+				     unix_parse_response, (void *) "UNIX")
+		? get_sockaddr_by_inode_cached(inode) : NULL;
 }
 
-static bool
-tcp_v4_print(const int fd, const unsigned long inode)
+static const char *
+inet_get(const int fd, const int family, const int protocol,
+	 const unsigned long inode, const char *proto_name)
 {
-	return inet_print(fd, AF_INET, IPPROTO_TCP, inode, "TCP");
+	return inet_send_query(fd, family, protocol)
+		&& receive_responses(fd, inode, SOCK_DIAG_BY_FAMILY,
+				     inet_parse_response, (void *) proto_name)
+		? get_sockaddr_by_inode_cached(inode) : NULL;
 }
 
-static bool
-udp_v4_print(const int fd, const unsigned long inode)
+static const char *
+tcp_v4_get(const int fd, const unsigned long inode)
 {
-	return inet_print(fd, AF_INET, IPPROTO_UDP, inode, "UDP");
+	return inet_get(fd, AF_INET, IPPROTO_TCP, inode, "TCP");
 }
 
-static bool
-tcp_v6_print(const int fd, const unsigned long inode)
+static const char *
+udp_v4_get(const int fd, const unsigned long inode)
 {
-	return inet_print(fd, AF_INET6, IPPROTO_TCP, inode, "TCPv6");
+	return inet_get(fd, AF_INET, IPPROTO_UDP, inode, "UDP");
 }
 
-static bool
-udp_v6_print(const int fd, const unsigned long inode)
+static const char *
+tcp_v6_get(const int fd, const unsigned long inode)
 {
-	return inet_print(fd, AF_INET6, IPPROTO_UDP, inode, "UDPv6");
+	return inet_get(fd, AF_INET6, IPPROTO_TCP, inode, "TCPv6");
 }
 
-static bool
-netlink_print(const int fd, const unsigned long inode)
+static const char *
+udp_v6_get(const int fd, const unsigned long inode)
+{
+	return inet_get(fd, AF_INET6, IPPROTO_UDP, inode, "UDPv6");
+}
+
+static const char *
+netlink_get(const int fd, const unsigned long inode)
 {
 	return netlink_send_query(fd, inode)
-		&& receive_responses(fd, inode, "NETLINK",
-				     netlink_parse_response);
+		&& receive_responses(fd, inode, SOCK_DIAG_BY_FAMILY,
+				     netlink_parse_response, (void *) "NETLINK")
+		? get_sockaddr_by_inode_cached(inode) : NULL;
 }
 
 static const struct {
 	const char *const name;
-	bool (*const print)(int, unsigned long);
+	const char * (*const get)(int, unsigned long);
 } protocols[] = {
-	[SOCK_PROTO_UNIX] = { "UNIX", unix_print },
-	[SOCK_PROTO_TCP] = { "TCP", tcp_v4_print },
-	[SOCK_PROTO_UDP] = { "UDP", udp_v4_print },
-	[SOCK_PROTO_TCPv6] = { "TCPv6", tcp_v6_print },
-	[SOCK_PROTO_UDPv6] = { "UDPv6", udp_v6_print },
-	[SOCK_PROTO_NETLINK] = { "NETLINK", netlink_print }
+	[SOCK_PROTO_UNIX] = { "UNIX", unix_get },
+	[SOCK_PROTO_TCP] = { "TCP", tcp_v4_get },
+	[SOCK_PROTO_UDP] = { "UDP", udp_v4_get },
+	[SOCK_PROTO_TCPv6] = { "TCPv6", tcp_v6_get },
+	[SOCK_PROTO_UDPv6] = { "UDPv6", udp_v6_get },
+	[SOCK_PROTO_NETLINK] = { "NETLINK", netlink_get }
 };
 
 enum sock_proto
@@ -462,39 +471,179 @@
 	return SOCK_PROTO_UNKNOWN;
 }
 
-/* Given an inode number of a socket, print out the details
- * of the ip address and port. */
-
-bool
-print_sockaddr_by_inode(const unsigned long inode, const enum sock_proto proto)
+static const char *
+get_sockaddr_by_inode_uncached(const unsigned long inode,
+			       const enum sock_proto proto)
 {
 	if ((unsigned int) proto >= ARRAY_SIZE(protocols) ||
-	    (proto != SOCK_PROTO_UNKNOWN && !protocols[proto].print))
-		return false;
+	    (proto != SOCK_PROTO_UNKNOWN && !protocols[proto].get))
+		return NULL;
 
 	const int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG);
 	if (fd < 0)
-		return false;
-	bool r = false;
+		return NULL;
+	const char *details = NULL;
 
 	if (proto != SOCK_PROTO_UNKNOWN) {
-		r = protocols[proto].print(fd, inode);
-		if (!r) {
-			tprintf("%s:[%lu]", protocols[proto].name, inode);
-			r = true;
-		}
+		details = protocols[proto].get(fd, inode);
 	} else {
 		unsigned int i;
 		for (i = (unsigned int) SOCK_PROTO_UNKNOWN + 1;
 		     i < ARRAY_SIZE(protocols); ++i) {
-			if (!protocols[i].print)
+			if (!protocols[i].get)
 				continue;
-			r = protocols[i].print(fd, inode);
-			if (r)
+			details = protocols[i].get(fd, inode);
+			if (details)
 				break;
 		}
 	}
 
 	close(fd);
-	return r;
+	return details;
 }
+
+static bool
+print_sockaddr_by_inode_uncached(const unsigned long inode,
+				 const enum sock_proto proto)
+{
+	const char *details = get_sockaddr_by_inode_uncached(inode, proto);
+
+	if (details) {
+		tprints(details);
+		return true;
+	}
+
+	if ((unsigned int) proto < ARRAY_SIZE(protocols) &&
+	    protocols[proto].name) {
+		tprintf("%s:[%lu]", protocols[proto].name, inode);
+		return true;
+	}
+
+	return false;
+}
+
+/* Given an inode number of a socket, return its protocol details.  */
+const char *
+get_sockaddr_by_inode(struct tcb *const tcp, const int fd,
+		      const unsigned long inode)
+{
+	const char *details = get_sockaddr_by_inode_cached(inode);
+	return details ? details :
+		get_sockaddr_by_inode_uncached(inode, getfdproto(tcp, fd));
+}
+
+/* Given an inode number of a socket, print out its protocol details.  */
+bool
+print_sockaddr_by_inode(struct tcb *const tcp, const int fd,
+			const unsigned long inode)
+{
+	return print_sockaddr_by_inode_cached(inode) ? true :
+		print_sockaddr_by_inode_uncached(inode, getfdproto(tcp, fd));
+}
+
+#ifdef HAVE_LINUX_GENETLINK_H
+/*
+ * Managing the cache for decoding communications of Netlink GENERIC protocol
+ *
+ * As name shown Netlink GENERIC protocol is generic protocol. The
+ * numbers of msg types used in the protocol are not defined
+ * statically. Kernel defines them on demand.  So the xlat converted
+ * from header files doesn't help for decoding the protocol. Following
+ * codes are building xlat(dyxlat) at runtime.
+ */
+static bool
+genl_send_dump_families(const int fd)
+{
+	struct {
+		const struct nlmsghdr nlh;
+		struct genlmsghdr gnlh;
+	} req = {
+		.nlh = {
+			.nlmsg_len = sizeof(req),
+			.nlmsg_type = GENL_ID_CTRL,
+			.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST,
+		},
+		.gnlh = {
+			.cmd = CTRL_CMD_GETFAMILY,
+		}
+	};
+	return send_query(fd, &req, sizeof(req));
+}
+
+static int
+genl_parse_families_response(const void *const data,
+			     const int data_len, const unsigned long inode,
+			     void *opaque_data)
+{
+	struct dyxlat *const dyxlat = opaque_data;
+	const struct genlmsghdr *const gnlh = data;
+	struct rtattr *attr;
+	int rta_len = data_len - NLMSG_LENGTH(sizeof(*gnlh));
+
+	char *name = NULL;
+	unsigned int name_len = 0;
+	uint16_t *id = NULL;
+
+	if (rta_len < 0)
+		return -1;
+	if (gnlh->cmd != CTRL_CMD_NEWFAMILY)
+		return -1;
+	if (gnlh->version != 2)
+		return -1;
+
+	for (attr = (struct rtattr *) (gnlh + 1);
+	     RTA_OK(attr, rta_len);
+	     attr = RTA_NEXT(attr, rta_len)) {
+		switch (attr->rta_type) {
+		case CTRL_ATTR_FAMILY_NAME:
+			if (!name) {
+				name = RTA_DATA(attr);
+				name_len = RTA_PAYLOAD(attr);
+			}
+			break;
+		case CTRL_ATTR_FAMILY_ID:
+			if (!id && RTA_PAYLOAD(attr) == sizeof(*id))
+				id = RTA_DATA(attr);
+			break;
+		}
+
+		if (name && id) {
+			dyxlat_add_pair(dyxlat, *id, name, name_len);
+			name = NULL;
+			id = NULL;
+		}
+	}
+
+	return 0;
+}
+
+const struct xlat *
+genl_families_xlat(void)
+{
+	static struct dyxlat *dyxlat;
+
+	if (!dyxlat) {
+		dyxlat = dyxlat_alloc(32);
+
+		int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
+		if (fd < 0)
+			goto out;
+
+		if (genl_send_dump_families(fd))
+			receive_responses(fd, 0, GENL_ID_CTRL,
+					  genl_parse_families_response, dyxlat);
+		close(fd);
+	}
+
+out:
+	return dyxlat_get(dyxlat);
+}
+
+#else /* !HAVE_LINUX_GENETLINK_H */
+
+const struct xlat *
+genl_families_xlat(void)
+{
+	return NULL;
+}
+#endif
diff --git a/statx.c b/statx.c
index 6e91387..c78b173 100644
--- a/statx.c
+++ b/statx.c
@@ -26,6 +26,7 @@
  */
 
 #include "defs.h"
+#include "print_fields.h"
 #include "statx.h"
 
 #include <sys/stat.h>
@@ -54,9 +55,6 @@
 		printflags(statx_masks, tcp->u_arg[3], "STATX_???");
 		tprints(", ");
 	} else {
-#define PRINT_FIELD_U(field) \
-	tprintf(", %s=%llu", #field, (unsigned long long) stx.field)
-
 #define PRINT_FIELD_TIME(field)						\
 	do {								\
 		tprintf(", " #field "={tv_sec=%" PRId64			\
@@ -74,13 +72,13 @@
 		printflags(statx_masks, stx.stx_mask, "STATX_???");
 
 		if (!abbrev(tcp))
-			PRINT_FIELD_U(stx_blksize);
+			PRINT_FIELD_U(", ", stx, stx_blksize);
 
 		tprints(", stx_attributes=");
 		printflags(statx_attrs, stx.stx_attributes, "STATX_ATTR_???");
 
 		if (!abbrev(tcp)) {
-			PRINT_FIELD_U(stx_nlink);
+			PRINT_FIELD_U(", ", stx, stx_nlink);
 			printuid(", stx_uid=", stx.stx_uid);
 			printuid(", stx_gid=", stx.stx_gid);
 		}
@@ -89,12 +87,12 @@
 		print_symbolic_mode_t(stx.stx_mode);
 
 		if (!abbrev(tcp))
-			PRINT_FIELD_U(stx_ino);
+			PRINT_FIELD_U(", ", stx, stx_ino);
 
-		PRINT_FIELD_U(stx_size);
+		PRINT_FIELD_U(", ", stx, stx_size);
 
 		if (!abbrev(tcp)) {
-			PRINT_FIELD_U(stx_blocks);
+			PRINT_FIELD_U(", ", stx, stx_blocks);
 
 			tprints(", stx_attributes_mask=");
 			printflags(statx_attrs, stx.stx_attributes_mask,
@@ -104,10 +102,10 @@
 			PRINT_FIELD_TIME(stx_btime);
 			PRINT_FIELD_TIME(stx_ctime);
 			PRINT_FIELD_TIME(stx_mtime);
-			PRINT_FIELD_U(stx_rdev_major);
-			PRINT_FIELD_U(stx_rdev_minor);
-			PRINT_FIELD_U(stx_dev_major);
-			PRINT_FIELD_U(stx_dev_minor);
+			PRINT_FIELD_U(", ", stx, stx_rdev_major);
+			PRINT_FIELD_U(", ", stx, stx_rdev_minor);
+			PRINT_FIELD_U(", ", stx, stx_dev_major);
+			PRINT_FIELD_U(", ", stx, stx_dev_minor);
 		} else {
 			tprints(", ...");
 		}
diff --git a/statx.h b/statx.h
index 2037287..bd5b047 100644
--- a/statx.h
+++ b/statx.h
@@ -40,7 +40,7 @@
 	uint32_t stx_mask; /* What results were written [uncond] */
 	uint32_t stx_blksize; /* Preferred general I/O size [uncond] */
 	uint64_t stx_attributes; /* Flags conveying information about the file
-	                            [uncond] */
+				    [uncond] */
 
 	uint32_t stx_nlink; /* Number of hard links */
 	uint32_t stx_uid; /* User ID of owner */
@@ -52,7 +52,7 @@
 	uint64_t stx_size; /* File size */
 	uint64_t stx_blocks; /* Number of 512-byte blocks allocated */
 	uint64_t stx_attributes_mask; /* Mask to show what's supported in
-	                                 stx_attributes */
+					 stx_attributes */
 
 	struct_statx_timestamp stx_atime; /* Last access time */
 	struct_statx_timestamp stx_btime; /* File creation time */
diff --git a/strace-graph b/strace-graph
index 9056dce..045f5e4 100755
--- a/strace-graph
+++ b/strace-graph
@@ -9,7 +9,8 @@
 # The script can also handle the output with strace -t, -tt, or -ttt.
 # It will add elapsed time for each process in that case.
 
-# This script is Copyright (C) 1998 by Richard Braakman <dark@xs4all.nl>.
+# Copyright (c) 1998 by Richard Braakman <dark@xs4all.nl>.
+# Copyright (c) 1998-2017 The strace developers.
 
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
diff --git a/strace.c b/strace.c
index fc16551..955a1c9 100644
--- a/strace.c
+++ b/strace.c
@@ -57,7 +57,7 @@
 
 #ifdef USE_LIBUNWIND
 /* if this is true do the stack trace for every system call */
-bool stack_trace_enabled = false;
+bool stack_trace_enabled;
 #endif
 
 #define my_tkill(tid, sig) syscall(__NR_tkill, (tid), (sig))
@@ -74,27 +74,27 @@
 const unsigned int syscall_trap_sig = SIGTRAP | 0x80;
 
 cflag_t cflag = CFLAG_NONE;
-unsigned int followfork = 0;
+unsigned int followfork;
 unsigned int ptrace_setoptions = PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC
 				 | PTRACE_O_TRACEEXIT;
-unsigned int xflag = 0;
-bool debug_flag = 0;
-bool Tflag = 0;
-bool iflag = 0;
-bool count_wallclock = 0;
-unsigned int qflag = 0;
-static unsigned int tflag = 0;
-static bool rflag = 0;
-static bool print_pid_pfx = 0;
+unsigned int xflag;
+bool debug_flag;
+bool Tflag;
+bool iflag;
+bool count_wallclock;
+unsigned int qflag;
+static unsigned int tflag;
+static bool rflag;
+static bool print_pid_pfx;
 
 /* -I n */
 enum {
-    INTR_NOT_SET        = 0,
-    INTR_ANYWHERE       = 1, /* don't block/ignore any signals */
-    INTR_WHILE_WAIT     = 2, /* block fatal signals while decoding syscall. default */
-    INTR_NEVER          = 3, /* block fatal signals. default if '-o FILE PROG' */
-    INTR_BLOCK_TSTP_TOO = 4, /* block fatal signals and SIGTSTP (^Z) */
-    NUM_INTR_OPTS
+	INTR_NOT_SET        = 0,
+	INTR_ANYWHERE       = 1, /* don't block/ignore any signals */
+	INTR_WHILE_WAIT     = 2, /* block fatal signals while decoding syscall. default */
+	INTR_NEVER          = 3, /* block fatal signals. default if '-o FILE PROG' */
+	INTR_BLOCK_TSTP_TOO = 4, /* block fatal signals and SIGTSTP (^Z) */
+	NUM_INTR_OPTS
 };
 static int opt_intr;
 /* We play with signal mask only if this mode is active: */
@@ -112,7 +112,7 @@
  * wait() etc. Without -D, strace process gets lodged in between,
  * disrupting parent<->child link.
  */
-static bool daemonized_tracer = 0;
+static bool daemonized_tracer;
 
 #if USE_SEIZE
 static int post_attach_sigstop = TCB_IGNORE_ONE_SIGSTOP;
@@ -123,18 +123,18 @@
 #endif
 
 /* Sometimes we want to print only succeeding syscalls. */
-bool not_failing_only = 0;
+bool not_failing_only;
 
 /* Show path associated with fd arguments */
-unsigned int show_fd_path = 0;
+unsigned int show_fd_path;
 
-static bool detach_on_execve = 0;
+static bool detach_on_execve;
 
 static int exit_code;
-static int strace_child = 0;
-static int strace_tracer_pid = 0;
+static int strace_child;
+static int strace_tracer_pid;
 
-static char *username = NULL;
+static char *username;
 static uid_t run_uid;
 static gid_t run_gid;
 
@@ -142,23 +142,26 @@
 static int acolumn = DEFAULT_ACOLUMN;
 static char *acolumn_spaces;
 
-static char *outfname = NULL;
+static char *outfname;
 /* If -ff, points to stderr. Else, it's our common output log */
 static FILE *shared_log;
 
-struct tcb *printing_tcp = NULL;
+struct tcb *printing_tcp;
 static struct tcb *current_tcp;
 
 static struct tcb **tcbtab;
 static unsigned int nprocs, tcbtabsize;
-static const char *progname;
+
+#ifndef HAVE_PROGRAM_INVOCATION_NAME
+char *program_invocation_name;
+#endif
 
 unsigned os_release; /* generated from uname()'s u.release */
 
 static void detach(struct tcb *tcp);
 static void cleanup(void);
 static void interrupt(int sig);
-static sigset_t empty_set, blocked_set;
+static sigset_t start_set, blocked_set;
 
 #ifdef HAVE_SIG_ATOMIC_T
 static volatile sig_atomic_t interrupted;
@@ -191,7 +194,7 @@
 print_version(void)
 {
 	printf("%s -- version %s\n"
-	       "Copyright (C) 1991-%s The strace developers <%s>.\n"
+	       "Copyright (c) 1991-%s The strace developers <%s>.\n"
 	       "This is free software; see the source for copying conditions.  There is NO\n"
 	       "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
 	       PACKAGE_NAME, PACKAGE_VERSION, COPYRIGHT_YEAR, PACKAGE_URL);
@@ -298,13 +301,15 @@
 	msg = NULL;
 	if (vasprintf(&msg, fmt, p) >= 0) {
 		if (err_no)
-			fprintf(stderr, "%s: %s: %s\n", progname, msg, strerror(err_no));
+			fprintf(stderr, "%s: %s: %s\n",
+				program_invocation_name, msg, strerror(err_no));
 		else
-			fprintf(stderr, "%s: %s\n", progname, msg);
+			fprintf(stderr, "%s: %s\n",
+				program_invocation_name, msg);
 		free(msg);
 	} else {
 		/* malloc in vasprintf failed, try it without malloc */
-		fprintf(stderr, "%s: ", progname);
+		fprintf(stderr, "%s: ", program_invocation_name);
 		vfprintf(stderr, fmt, p);
 		if (err_no)
 			fprintf(stderr, ": %s\n", strerror(err_no));
@@ -339,7 +344,8 @@
 		va_start(p, fmt);
 		verror_msg(0, fmt, p);
 	}
-	fprintf(stderr, "Try '%s -h' for more information.\n", progname);
+	fprintf(stderr, "Try '%s -h' for more information.\n",
+		program_invocation_name);
 	die();
 }
 
@@ -520,7 +526,7 @@
 	return fp;
 }
 
-static int popen_pid = 0;
+static int popen_pid;
 
 #ifndef _PATH_BSHELL
 # define _PATH_BSHELL "/bin/sh"
@@ -566,7 +572,7 @@
 	swap_uid();
 	fp = fdopen(fds[1], "w");
 	if (!fp)
-		die_out_of_memory();
+		perror_msg_and_die("fdopen");
 	return fp;
 }
 
@@ -690,12 +696,10 @@
 			tprintf("%6ld.%06ld ",
 				(long) dtv.tv_sec, (long) dtv.tv_usec);
 			otv = tv;
-		}
-		else if (tflag > 2) {
+		} else if (tflag > 2) {
 			tprintf("%ld.%06ld ",
 				(long) tv.tv_sec, (long) tv.tv_usec);
-		}
-		else {
+		} else {
 			time_t local = tv.tv_sec;
 			strftime(str, sizeof(str), "%T", localtime(&local));
 			if (tflag > 1)
@@ -919,8 +923,7 @@
 			goto wait_loop;
 		if (errno != ESRCH)
 			perror_msg("detach: ptrace(PTRACE_INTERRUPT,%u)", tcp->pid);
-	}
-	else {
+	} else {
 		error = my_tkill(tcp->pid, SIGSTOP);
 		if (!error)
 			goto wait_loop;
@@ -1032,7 +1035,7 @@
 		 * pidof uses space as delim, pgrep uses newline. :(
 		 */
 		int pid;
-		char *delim = opt + strcspn(opt, ", \n\t");
+		char *delim = opt + strcspn(opt, "\n\t ,");
 		char c = *delim;
 
 		*delim = '\0';
@@ -1128,7 +1131,7 @@
 	 * We rely on cleanup() from this point on.
 	 */
 	if (interactive)
-		sigprocmask(SIG_BLOCK, &blocked_set, NULL);
+		sigprocmask(SIG_SETMASK, &blocked_set, NULL);
 
 	if (daemonized_tracer) {
 		pid_t pid = fork();
@@ -1170,10 +1173,10 @@
 		attach_tcb(tcp);
 
 		if (interactive) {
-			sigprocmask(SIG_SETMASK, &empty_set, NULL);
+			sigprocmask(SIG_SETMASK, &start_set, NULL);
 			if (interrupted)
 				goto ret;
-			sigprocmask(SIG_BLOCK, &blocked_set, NULL);
+			sigprocmask(SIG_SETMASK, &blocked_set, NULL);
 		}
 	} /* for each tcbtab[] */
 
@@ -1188,7 +1191,7 @@
 
  ret:
 	if (interactive)
-		sigprocmask(SIG_SETMASK, &empty_set, NULL);
+		sigprocmask(SIG_SETMASK, &start_set, NULL);
 }
 
 /* Stack-o-phobic exec helper, in the hope to work around
@@ -1200,6 +1203,7 @@
 	gid_t run_egid;
 	char **argv;
 	char *pathname;
+	struct sigaction child_sa;
 };
 static struct exec_params params_for_tracee;
 
@@ -1230,8 +1234,7 @@
 		if (setreuid(run_uid, params->run_euid) < 0) {
 			perror_msg_and_die("setreuid");
 		}
-	}
-	else if (geteuid() != 0)
+	} else if (geteuid() != 0)
 		if (setreuid(run_uid, run_uid) < 0) {
 			perror_msg_and_die("setreuid");
 		}
@@ -1254,6 +1257,9 @@
 		alarm(0);
 	}
 
+	if (params_for_tracee.child_sa.sa_handler != SIG_DFL)
+		sigaction(SIGCHLD, &params_for_tracee.child_sa, NULL);
+
 	execv(params->pathname, params->argv);
 	perror_msg_and_die("exec");
 }
@@ -1360,15 +1366,13 @@
 			if (colon) {
 				n = colon - path;
 				m = n + 1;
-			}
-			else
+			} else
 				m = n = strlen(path);
 			if (n == 0) {
 				if (!getcwd(pathname, PATH_MAX))
 					continue;
 				len = strlen(pathname);
-			}
-			else if (n > sizeof pathname - 1)
+			} else if (n > sizeof(pathname) - 1)
 				continue;
 			else {
 				strncpy(pathname, path, n);
@@ -1462,8 +1466,7 @@
 			    | TCB_SKIP_DETACH_ON_FIRST_EXEC
 			    | (NOMMU_SYSTEM ? 0 : (TCB_HIDE_LOG | post_attach_sigstop));
 		newoutf(tcp);
-	}
-	else {
+	} else {
 		/* With -D, we are *child* here, the tracee is our parent. */
 		strace_child = strace_tracer_pid;
 		strace_tracer_pid = getpid();
@@ -1578,12 +1581,12 @@
 			error_msg_and_die("Bad OS release string: '%s'", u.release);
 		/* Note: this open-codes KERNEL_VERSION(): */
 		rel = (rel << 8) | atoi(p);
-		if (rel >= KERNEL_VERSION(1,0,0))
+		if (rel >= KERNEL_VERSION(1, 0, 0))
 			break;
 		while (*p >= '0' && *p <= '9')
 			p++;
 		if (*p != '.') {
-			if (rel >= KERNEL_VERSION(0,1,0)) {
+			if (rel >= KERNEL_VERSION(0, 1, 0)) {
 				/* "X.Y-something" means "X.Y.0" */
 				rel <<= 8;
 				break;
@@ -1595,6 +1598,17 @@
 	return rel;
 }
 
+static void
+set_sigaction(int signo, void (*sighandler)(int), struct sigaction *oldact)
+{
+	/* if signal handler is a function, add the signal to blocked_set */
+	if (sighandler != SIG_IGN && sighandler != SIG_DFL)
+		sigaddset(&blocked_set, signo);
+
+	const struct sigaction sa = { .sa_handler = sighandler };
+	sigaction(signo, &sa, oldact);
+}
+
 /*
  * Initialization part of main() was eating much stack (~0.5k),
  * which was unused after init.
@@ -1608,16 +1622,12 @@
 {
 	int c, i;
 	int optF = 0;
-	struct sigaction sa;
 
-	progname = argv[0] ? argv[0] : "strace";
-
-	/* Make sure SIGCHLD has the default action so that waitpid
-	   definitely works without losing track of children.  The user
-	   should not have given us a bogus state to inherit, but he might
-	   have.  Arguably we should detect SIG_IGN here and pass it on
-	   to children, but probably noone really needs that.  */
-	signal(SIGCHLD, SIG_DFL);
+	if (!program_invocation_name || !*program_invocation_name) {
+		static char name[] = "strace";
+		program_invocation_name =
+			(argv[0] && *argv[0]) ? argv[0] : name;
+	}
 
 	strace_tracer_pid = getpid();
 
@@ -1733,7 +1743,7 @@
 			break;
 		case 's':
 			i = string_to_uint(optarg);
-			if (i < 0)
+			if (i < 0 || (unsigned int) i > -1U / 4)
 				error_opt_arg(c, optarg);
 			max_strlen = i;
 			break;
@@ -1750,7 +1760,7 @@
 #endif
 		case 'E':
 			if (putenv(optarg) < 0)
-				die_out_of_memory();
+				perror_msg_and_die("putenv");
 			break;
 		case 'I':
 			opt_intr = string_to_uint_upto(optarg, NUM_INTR_OPTS - 1);
@@ -1762,14 +1772,11 @@
 			break;
 		}
 	}
+
 	argv += optind;
-	/* argc -= optind; - no need, argc is not used below */
+	argc -= optind;
 
-	acolumn_spaces = xmalloc(acolumn + 1);
-	memset(acolumn_spaces, ' ', acolumn);
-	acolumn_spaces[acolumn] = '\0';
-
-	if (!argv[0] && !nprocs) {
+	if (argc < 0 || (!argv[0] && !nprocs)) {
 		error_msg_and_help("must have PROG [ARGS] or -p PID");
 	}
 
@@ -1811,6 +1818,15 @@
 		tflag = 1;
 	}
 
+	acolumn_spaces = xmalloc(acolumn + 1);
+	memset(acolumn_spaces, ' ', acolumn);
+	acolumn_spaces[acolumn] = '\0';
+
+	sigprocmask(SIG_SETMASK, NULL, &start_set);
+	memcpy(&blocked_set, &start_set, sizeof(blocked_set));
+
+	set_sigaction(SIGCHLD, SIG_DFL, &params_for_tracee.child_sa);
+
 #ifdef USE_LIBUNWIND
 	if (stack_trace_enabled) {
 		unsigned int tcbi;
@@ -1835,8 +1851,7 @@
 		}
 		run_uid = pent->pw_uid;
 		run_gid = pent->pw_gid;
-	}
-	else {
+	} else {
 		run_uid = getuid();
 		run_gid = getgid();
 	}
@@ -1873,8 +1888,7 @@
 			if (followfork >= 2)
 				error_msg_and_help("piping the output and -ff are mutually exclusive");
 			shared_log = strace_popen(outfname + 1);
-		}
-		else if (followfork < 2)
+		} else if (followfork < 2)
 			shared_log = strace_fopen(outfname);
 	} else {
 		/* -ff without -o FILE is the same as single -f */
@@ -1885,6 +1899,15 @@
 	if (!outfname || outfname[0] == '|' || outfname[0] == '!') {
 		setvbuf(shared_log, NULL, _IOLBF, 0);
 	}
+
+	/*
+	 * argv[0]	-pPID	-oFILE	Default interactive setting
+	 * yes		*	0	INTR_WHILE_WAIT
+	 * no		1	0	INTR_WHILE_WAIT
+	 * yes		*	1	INTR_NEVER
+	 * no		1	1	INTR_WHILE_WAIT
+	 */
+
 	if (outfname && argv[0]) {
 		if (!opt_intr)
 			opt_intr = INTR_NEVER;
@@ -1894,17 +1917,8 @@
 	if (!opt_intr)
 		opt_intr = INTR_WHILE_WAIT;
 
-	/* argv[0]	-pPID	-oFILE	Default interactive setting
-	 * yes		*	0	INTR_WHILE_WAIT
-	 * no		1	0	INTR_WHILE_WAIT
-	 * yes		*	1	INTR_NEVER
-	 * no		1	1	INTR_WHILE_WAIT
-	 */
-
-	sigemptyset(&empty_set);
-	sigemptyset(&blocked_set);
-
-	/* startup_child() must be called before the signal handlers get
+	/*
+	 * startup_child() must be called before the signal handlers get
 	 * installed below as they are inherited into the spawned process.
 	 * Also we do not need to be protected by them as during interruption
 	 * in the startup_child() mode we kill the spawned process anyway.
@@ -1913,35 +1927,24 @@
 		startup_child(argv);
 	}
 
-	sa.sa_handler = SIG_IGN;
-	sigemptyset(&sa.sa_mask);
-	sa.sa_flags = 0;
-	sigaction(SIGTTOU, &sa, NULL); /* SIG_IGN */
-	sigaction(SIGTTIN, &sa, NULL); /* SIG_IGN */
+	set_sigaction(SIGTTOU, SIG_IGN, NULL);
+	set_sigaction(SIGTTIN, SIG_IGN, NULL);
 	if (opt_intr != INTR_ANYWHERE) {
 		if (opt_intr == INTR_BLOCK_TSTP_TOO)
-			sigaction(SIGTSTP, &sa, NULL); /* SIG_IGN */
+			set_sigaction(SIGTSTP, SIG_IGN, NULL);
 		/*
 		 * In interactive mode (if no -o OUTFILE, or -p PID is used),
 		 * fatal signals are blocked while syscall stop is processed,
 		 * and acted on in between, when waiting for new syscall stops.
 		 * In non-interactive mode, signals are ignored.
 		 */
-		if (opt_intr == INTR_WHILE_WAIT) {
-			sigaddset(&blocked_set, SIGHUP);
-			sigaddset(&blocked_set, SIGINT);
-			sigaddset(&blocked_set, SIGQUIT);
-			sigaddset(&blocked_set, SIGPIPE);
-			sigaddset(&blocked_set, SIGTERM);
-			sa.sa_handler = interrupt;
-		}
-		/* SIG_IGN, or set handler for these */
-		sigaction(SIGHUP, &sa, NULL);
-		sigaction(SIGINT, &sa, NULL);
-		sigaction(SIGQUIT, &sa, NULL);
-		sigaction(SIGPIPE, &sa, NULL);
-		sigaction(SIGTERM, &sa, NULL);
+		set_sigaction(SIGHUP, interactive ? interrupt : SIG_IGN, NULL);
+		set_sigaction(SIGINT, interactive ? interrupt : SIG_IGN, NULL);
+		set_sigaction(SIGQUIT, interactive ? interrupt : SIG_IGN, NULL);
+		set_sigaction(SIGPIPE, interactive ? interrupt : SIG_IGN, NULL);
+		set_sigaction(SIGTERM, interactive ? interrupt : SIG_IGN, NULL);
 	}
+
 	if (nprocs != 0 || daemonized_tracer)
 		startup_attach();
 
@@ -2025,11 +2028,6 @@
 		sprintf(buf, "WIFEXITED,exitcode=%u", WEXITSTATUS(status));
 	if (WIFSTOPPED(status))
 		sprintf(buf, "WIFSTOPPED,sig=%s", signame(WSTOPSIG(status)));
-#ifdef WIFCONTINUED
-	/* Should never be seen */
-	if (WIFCONTINUED(status))
-		strcpy(buf, "WIFCONTINUED");
-#endif
 	evbuf[0] = '\0';
 	if (event != 0) {
 		static const char *const event_names[] = {
@@ -2251,25 +2249,79 @@
 	line_ended();
 }
 
-/* Returns true iff the main trace loop has to continue. */
-static bool
-trace(void)
+enum trace_event {
+	/* Break the main loop. */
+	TE_BREAK,
+
+	/* Call next_event() again. */
+	TE_NEXT,
+
+	/* Restart the tracee with signal 0 and call next_event() again. */
+	TE_RESTART,
+
+	/*
+	 * For all the events below, current_tcp is set to current tracee's
+	 * tcb.  All the suggested actions imply that you want to continue
+	 * tracing of the current tracee; alternatively, you can detach it.
+	 */
+
+	/*
+	 * Syscall entry or exit.
+	 * Restart the tracee with signal 0, or with an injected signal number.
+	 */
+	TE_SYSCALL_STOP,
+
+	/*
+	 * Tracee received signal with number WSTOPSIG(*pstatus); signal info
+	 * is written to *si.  Restart the tracee (with that signal number
+	 * if you want to deliver it).
+	 */
+	TE_SIGNAL_DELIVERY_STOP,
+
+	/*
+	 * Tracee was killed by a signal with number WTERMSIG(*pstatus).
+	 */
+	TE_SIGNALLED,
+
+	/*
+	 * Tracee was stopped by a signal with number WSTOPSIG(*pstatus).
+	 * Restart the tracee with that signal number.
+	 */
+	TE_GROUP_STOP,
+
+	/*
+	 * Tracee exited with status WEXITSTATUS(*pstatus).
+	 */
+	TE_EXITED,
+
+	/*
+	 * Tracee is going to perform execve().
+	 * Restart the tracee with signal 0.
+	 */
+	TE_STOP_BEFORE_EXECVE,
+
+	/*
+	 * Tracee is going to terminate.
+	 * Restart the tracee with signal 0.
+	 */
+	TE_STOP_BEFORE_EXIT,
+};
+
+static enum trace_event
+next_event(int *pstatus, siginfo_t *si)
 {
 	int pid;
 	int wait_errno;
 	int status;
-	bool stopped;
-	unsigned int sig;
-	unsigned int event;
 	struct tcb *tcp;
 	struct rusage ru;
 
 	if (interrupted)
-		return false;
+		return TE_BREAK;
 
 	/*
 	 * Used to exit simply when nprocs hits zero, but in this testcase:
-	 *  int main() { _exit(!!fork()); }
+	 *  int main(void) { _exit(!!fork()); }
 	 * under strace -f, parent sometimes (rarely) manages
 	 * to exit before we see the first stop of the child,
 	 * and we are losing track of it:
@@ -2285,21 +2337,21 @@
 		 * on exit. Oh well...
 		 */
 		if (nprocs == 0)
-			return false;
+			return TE_BREAK;
 	}
 
 	if (interactive)
-		sigprocmask(SIG_SETMASK, &empty_set, NULL);
-	pid = wait4(-1, &status, __WALL, (cflag ? &ru : NULL));
+		sigprocmask(SIG_SETMASK, &start_set, NULL);
+	pid = wait4(-1, pstatus, __WALL, (cflag ? &ru : NULL));
 	wait_errno = errno;
 	if (interactive)
-		sigprocmask(SIG_BLOCK, &blocked_set, NULL);
+		sigprocmask(SIG_SETMASK, &blocked_set, NULL);
 
 	if (pid < 0) {
 		if (wait_errno == EINTR)
-			return true;
+			return TE_NEXT;
 		if (nprocs == 0 && wait_errno == ECHILD)
-			return false;
+			return TE_BREAK;
 		/*
 		 * If nprocs > 0, ECHILD is not expected,
 		 * treat it as any other error here:
@@ -2308,10 +2360,12 @@
 		perror_msg_and_die("wait4(__WALL)");
 	}
 
+	status = *pstatus;
+
 	if (pid == popen_pid) {
 		if (!WIFSTOPPED(status))
 			popen_pid = 0;
-		return true;
+		return TE_NEXT;
 	}
 
 	if (debug_flag)
@@ -2323,14 +2377,179 @@
 	if (!tcp) {
 		tcp = maybe_allocate_tcb(pid, status);
 		if (!tcp)
-			return true;
+			return TE_NEXT;
 	}
 
 	clear_regs();
 
-	event = (unsigned int) status >> 16;
+	/* Set current output file */
+	current_tcp = tcp;
 
-	if (event == PTRACE_EVENT_EXEC) {
+	if (cflag) {
+		tv_sub(&tcp->dtime, &ru.ru_stime, &tcp->stime);
+		tcp->stime = ru.ru_stime;
+	}
+
+	if (WIFSIGNALED(status))
+		return TE_SIGNALLED;
+
+	if (WIFEXITED(status))
+		return TE_EXITED;
+
+	/*
+	 * As WCONTINUED flag has not been specified to wait4,
+	 * it cannot be WIFCONTINUED(status), so the only case
+	 * that remains is WIFSTOPPED(status).
+	 */
+
+	/* Is this the very first time we see this tracee stopped? */
+	if (tcp->flags & TCB_STARTUP)
+		startup_tcb(tcp);
+
+	const unsigned int sig = WSTOPSIG(status);
+	const unsigned int event = (unsigned int) status >> 16;
+
+	switch (event) {
+	case 0:
+		/*
+		 * Is this post-attach SIGSTOP?
+		 * Interestingly, the process may stop
+		 * with STOPSIG equal to some other signal
+		 * than SIGSTOP if we happened to attach
+		 * just before the process takes a signal.
+		 */
+		if (sig == SIGSTOP && (tcp->flags & TCB_IGNORE_ONE_SIGSTOP)) {
+			if (debug_flag)
+				error_msg("ignored SIGSTOP on pid %d", tcp->pid);
+			tcp->flags &= ~TCB_IGNORE_ONE_SIGSTOP;
+			return TE_RESTART;
+		} else if (sig == syscall_trap_sig) {
+			return TE_SYSCALL_STOP;
+		} else {
+			*si = (siginfo_t) {};
+			/*
+			 * True if tracee is stopped by signal
+			 * (as opposed to "tracee received signal").
+			 * TODO: shouldn't we check for errno == EINVAL too?
+			 * We can get ESRCH instead, you know...
+			 */
+			bool stopped = ptrace(PTRACE_GETSIGINFO, pid, 0, si) < 0;
+			return stopped ? TE_GROUP_STOP : TE_SIGNAL_DELIVERY_STOP;
+		}
+		break;
+#if USE_SEIZE
+	case PTRACE_EVENT_STOP:
+		/*
+		 * PTRACE_INTERRUPT-stop or group-stop.
+		 * PTRACE_INTERRUPT-stop has sig == SIGTRAP here.
+		 */
+		switch (sig) {
+		case SIGSTOP:
+		case SIGTSTP:
+		case SIGTTIN:
+		case SIGTTOU:
+			return TE_GROUP_STOP;
+		}
+		return TE_RESTART;
+#endif
+	case PTRACE_EVENT_EXEC:
+		return TE_STOP_BEFORE_EXECVE;
+	case PTRACE_EVENT_EXIT:
+		return TE_STOP_BEFORE_EXIT;
+	default:
+		return TE_RESTART;
+	}
+}
+
+static int
+trace_syscall(struct tcb *tcp, unsigned int *sig)
+{
+	if (entering(tcp)) {
+		int res = syscall_entering_decode(tcp);
+		switch (res) {
+		case 0:
+			return 0;
+		case 1:
+			res = syscall_entering_trace(tcp, sig);
+		}
+		syscall_entering_finish(tcp, res);
+		return res;
+	} else {
+		struct timeval tv = {};
+		int res = syscall_exiting_decode(tcp, &tv);
+		if (res != 0) {
+			res = syscall_exiting_trace(tcp, tv, res);
+		}
+		syscall_exiting_finish(tcp);
+		return res;
+	}
+}
+
+/* Returns true iff the main trace loop has to continue. */
+static bool
+dispatch_event(enum trace_event ret, int *pstatus, siginfo_t *si)
+{
+	unsigned int restart_op = PTRACE_SYSCALL;
+	unsigned int restart_sig = 0;
+
+	switch (ret) {
+	case TE_BREAK:
+		return false;
+
+	case TE_NEXT:
+		return true;
+
+	case TE_RESTART:
+		break;
+
+	case TE_SYSCALL_STOP:
+		if (trace_syscall(current_tcp, &restart_sig) < 0) {
+			/*
+			 * ptrace() failed in trace_syscall().
+			 * Likely a result of process disappearing mid-flight.
+			 * Observed case: exit_group() or SIGKILL terminating
+			 * all processes in thread group.
+			 * We assume that ptrace error was caused by process death.
+			 * We used to detach(current_tcp) here, but since we no
+			 * longer implement "detach before death" policy/hack,
+			 * we can let this process to report its death to us
+			 * normally, via WIFEXITED or WIFSIGNALED wait status.
+			 */
+			return true;
+		}
+		break;
+
+	case TE_SIGNAL_DELIVERY_STOP:
+		restart_sig = WSTOPSIG(*pstatus);
+		print_stopped(current_tcp, si, restart_sig);
+		break;
+
+	case TE_SIGNALLED:
+		print_signalled(current_tcp, current_tcp->pid, *pstatus);
+		droptcb(current_tcp);
+		return true;
+
+	case TE_GROUP_STOP:
+		restart_sig = WSTOPSIG(*pstatus);
+		print_stopped(current_tcp, NULL, restart_sig);
+		if (use_seize) {
+			/*
+			 * This ends ptrace-stop, but does *not* end group-stop.
+			 * This makes stopping signals work properly on straced
+			 * process (that is, process really stops. It used to
+			 * continue to run).
+			 */
+			restart_op = PTRACE_LISTEN;
+			restart_sig = 0;
+		}
+		break;
+
+	case TE_EXITED:
+		print_exited(current_tcp, current_tcp->pid, *pstatus);
+		droptcb(current_tcp);
+		return true;
+
+	case TE_STOP_BEFORE_EXECVE:
 		/*
 		 * Under Linux, execve changes pid to thread leader's pid,
 		 * and we see this changed pid on EVENT_EXEC and later,
@@ -2346,181 +2565,43 @@
 		 * PTRACE_GETEVENTMSG returns old pid starting from Linux 3.0.
 		 * On 2.6 and earlier, it can return garbage.
 		 */
-		if (os_release >= KERNEL_VERSION(3,0,0))
-			tcp = maybe_switch_tcbs(tcp, pid);
+		if (os_release >= KERNEL_VERSION(3, 0, 0))
+			current_tcp = maybe_switch_tcbs(current_tcp, current_tcp->pid);
 
 		if (detach_on_execve) {
-			if (tcp->flags & TCB_SKIP_DETACH_ON_FIRST_EXEC) {
-				tcp->flags &= ~TCB_SKIP_DETACH_ON_FIRST_EXEC;
+			if (current_tcp->flags & TCB_SKIP_DETACH_ON_FIRST_EXEC) {
+				current_tcp->flags &= ~TCB_SKIP_DETACH_ON_FIRST_EXEC;
 			} else {
-				detach(tcp); /* do "-b execve" thingy */
+				detach(current_tcp); /* do "-b execve" thingy */
 				return true;
 			}
 		}
-	}
+		break;
 
-	/* Set current output file */
-	current_tcp = tcp;
-
-	if (cflag) {
-		tv_sub(&tcp->dtime, &ru.ru_stime, &tcp->stime);
-		tcp->stime = ru.ru_stime;
-	}
-
-	if (WIFSIGNALED(status)) {
-		print_signalled(tcp, pid, status);
-		droptcb(tcp);
-		return true;
-	}
-
-	if (WIFEXITED(status)) {
-		print_exited(tcp, pid, status);
-		droptcb(tcp);
-		return true;
-	}
-
-	if (!WIFSTOPPED(status)) {
-		/*
-		 * Neither signalled, exited or stopped.
-		 * How could that be?
-		 */
-		error_msg("pid %u not stopped!", pid);
-		droptcb(tcp);
-		return true;
-	}
-
-	/* Is this the very first time we see this tracee stopped? */
-	if (tcp->flags & TCB_STARTUP) {
-		startup_tcb(tcp);
-	}
-
-	sig = WSTOPSIG(status);
-
-	switch (event) {
-		case 0:
-			break;
-		case PTRACE_EVENT_EXIT:
-			print_event_exit(tcp);
-			goto restart_tracee_with_sig_0;
-#if USE_SEIZE
-		case PTRACE_EVENT_STOP:
-			/*
-			 * PTRACE_INTERRUPT-stop or group-stop.
-			 * PTRACE_INTERRUPT-stop has sig == SIGTRAP here.
-			 */
-			switch (sig) {
-				case SIGSTOP:
-				case SIGTSTP:
-				case SIGTTIN:
-				case SIGTTOU:
-					stopped = true;
-					goto show_stopsig;
-			}
-			/* fall through */
-#endif
-		default:
-			goto restart_tracee_with_sig_0;
-	}
-
-	/*
-	 * Is this post-attach SIGSTOP?
-	 * Interestingly, the process may stop
-	 * with STOPSIG equal to some other signal
-	 * than SIGSTOP if we happend to attach
-	 * just before the process takes a signal.
-	 */
-	if (sig == SIGSTOP && (tcp->flags & TCB_IGNORE_ONE_SIGSTOP)) {
-		if (debug_flag)
-			error_msg("ignored SIGSTOP on pid %d", tcp->pid);
-		tcp->flags &= ~TCB_IGNORE_ONE_SIGSTOP;
-		goto restart_tracee_with_sig_0;
-	}
-
-	if (sig != syscall_trap_sig) {
-		siginfo_t si = {};
-
-		/*
-		 * True if tracee is stopped by signal
-		 * (as opposed to "tracee received signal").
-		 * TODO: shouldn't we check for errno == EINVAL too?
-		 * We can get ESRCH instead, you know...
-		 */
-		stopped = ptrace(PTRACE_GETSIGINFO, pid, 0, &si) < 0;
-#if USE_SEIZE
-show_stopsig:
-#endif
-		print_stopped(tcp, stopped ? NULL : &si, sig);
-
-		if (!stopped)
-			/* It's signal-delivery-stop. Inject the signal */
-			goto restart_tracee;
-
-		/* It's group-stop */
-		if (use_seize) {
-			/*
-			 * This ends ptrace-stop, but does *not* end group-stop.
-			 * This makes stopping signals work properly on straced process
-			 * (that is, process really stops. It used to continue to run).
-			 */
-			if (ptrace_restart(PTRACE_LISTEN, tcp, 0) < 0) {
-				/* Note: ptrace_restart emitted error message */
-				exit_code = 1;
-				return false;
-			}
-			return true;
-		}
-		/* We don't have PTRACE_LISTEN support... */
-		goto restart_tracee;
+	case TE_STOP_BEFORE_EXIT:
+		print_event_exit(current_tcp);
+		break;
 	}
 
 	/* We handled quick cases, we are permitted to interrupt now. */
 	if (interrupted)
 		return false;
 
-	/*
-	 * This should be syscall entry or exit.
-	 * Handle it.
-	 */
-	sig = 0;
-	if (trace_syscall(tcp, &sig) < 0) {
-		/*
-		 * ptrace() failed in trace_syscall().
-		 * Likely a result of process disappearing mid-flight.
-		 * Observed case: exit_group() or SIGKILL terminating
-		 * all processes in thread group.
-		 * We assume that ptrace error was caused by process death.
-		 * We used to detach(tcp) here, but since we no longer
-		 * implement "detach before death" policy/hack,
-		 * we can let this process to report its death to us
-		 * normally, via WIFEXITED or WIFSIGNALED wait status.
-		 */
-		return true;
-	}
-	goto restart_tracee;
-
-restart_tracee_with_sig_0:
-	sig = 0;
-
-restart_tracee:
-	if (ptrace_restart(PTRACE_SYSCALL, tcp, sig) < 0) {
+	if (ptrace_restart(restart_op, current_tcp, restart_sig) < 0) {
 		/* Note: ptrace_restart emitted error message */
 		exit_code = 1;
 		return false;
 	}
-
 	return true;
 }
 
-int
-main(int argc, char *argv[])
+#ifdef ENABLE_COVERAGE_GCOV
+extern void __gcov_flush(void);
+#endif
+
+static void ATTRIBUTE_NORETURN
+terminate(void)
 {
-	init(argc, argv);
-
-	exit_code = !nprocs;
-
-	while (trace())
-		;
-
 	cleanup();
 	fflush(NULL);
 	if (shared_log != stderr)
@@ -2537,11 +2618,37 @@
 		/* Child was killed by a signal, mimic that.  */
 		exit_code &= 0xff;
 		signal(exit_code, SIG_DFL);
+#ifdef ENABLE_COVERAGE_GCOV
+		__gcov_flush();
+#endif
 		raise(exit_code);
+
+		/* Unblock the signal.  */
+		sigset_t mask;
+		sigemptyset(&mask);
+		sigaddset(&mask, exit_code);
+#ifdef ENABLE_COVERAGE_GCOV
+		__gcov_flush();
+#endif
+		sigprocmask(SIG_UNBLOCK, &mask, NULL);
+
 		/* Paranoia - what if this signal is not fatal?
 		   Exit with 128 + signo then.  */
 		exit_code += 128;
 	}
+	exit(exit_code);
+}
 
-	return exit_code;
+int
+main(int argc, char *argv[])
+{
+	init(argc, argv);
+
+	exit_code = !nprocs;
+
+	int status;
+	siginfo_t si;
+	while (dispatch_event(next_event(&status, &si), &status, &si))
+		;
+	terminate();
 }
diff --git a/strace.spec b/strace.spec
index 1c27aa4..963b2f2 100644
--- a/strace.spec
+++ b/strace.spec
@@ -1,6 +1,6 @@
 Summary: Tracks and displays system calls associated with a running process
 Name: strace
-Version: 4.17
+Version: 4.18
 Release: 1%{?dist}
 License: BSD
 Group: Development/Debuggers
@@ -101,8 +101,11 @@
 %endif
 
 %changelog
-* Thu May 25 2017 strace-devel@lists.sourceforge.net - 4.17-1
-- strace 4.17 snapshot.
+* Wed Jul 05 2017 strace-devel@lists.sourceforge.net - 4.18-1
+- strace 4.18 snapshot.
+
+* Wed May 24 2017 Dmitry V. Levin <ldv@altlinux.org> - 4.17-1
+- v4.16 -> v4.17.
 
 * Tue Feb 14 2017 Dmitry V. Levin <ldv@altlinux.org> - 4.16-1
 - v4.15 -> v4.16.
diff --git a/strace.spec.in b/strace.spec.in
index 6fc2689..76f28bb 100644
--- a/strace.spec.in
+++ b/strace.spec.in
@@ -104,6 +104,9 @@
 * @RPM_CHANGELOGTIME@ @PACKAGE_BUGREPORT@ - @PACKAGE_VERSION@-1
 - @PACKAGE_STRING@ snapshot.
 
+* Wed May 24 2017 Dmitry V. Levin <ldv@altlinux.org> - 4.17-1
+- v4.16 -> v4.17.
+
 * Tue Feb 14 2017 Dmitry V. Levin <ldv@altlinux.org> - 4.16-1
 - v4.15 -> v4.16.
 
diff --git a/syscall.c b/syscall.c
index a34f640..02626c7 100644
--- a/syscall.c
+++ b/syscall.c
@@ -651,25 +651,29 @@
 	return 0;
 }
 
-static int
-trace_syscall_entering(struct tcb *tcp, unsigned int *sig)
+/*
+ * Returns:
+ * 0: "ignore this ptrace stop", bail out silently.
+ * 1: ok, decoded; call
+ *    syscall_entering_finish(tcp, syscall_entering_trace(tcp, ...)).
+ * other: error; call syscall_entering_finish(tcp, res), where res is the value
+ *    returned.
+ */
+int
+syscall_entering_decode(struct tcb *tcp)
 {
 	int res = get_scno(tcp);
 	if (res == 0)
 		return res;
-
 	int scno_good = res;
-	if (res == 1)
-		res = get_syscall_args(tcp);
-
-	if (res != 1) {
+	if (res != 1 || (res = get_syscall_args(tcp)) != 1) {
 		printleader(tcp);
 		tprintf("%s(", scno_good == 1 ? tcp->s_ent->sys_name : "????");
 		/*
 		 * " <unavailable>" will be added later by the code which
 		 * detects ptrace errors.
 		 */
-		goto ret;
+		return res;
 	}
 
 #ifdef LINUX_MIPSO32
@@ -692,6 +696,12 @@
 	}
 #endif
 
+	return 1;
+}
+
+int
+syscall_entering_trace(struct tcb *tcp, unsigned int *sig)
+{
 	/* Restrain from fault injection while the trace executes strace code. */
 	if (hide_log(tcp)) {
 		tcp->qual_flg &= ~QUAL_INJECT;
@@ -710,24 +720,21 @@
 	if (!(tcp->qual_flg & QUAL_TRACE)
 	 || (tracing_paths && !pathtrace_match(tcp))
 	) {
-		tcp->flags |= TCB_INSYSCALL | TCB_FILTERED;
-		tcp->sys_func_rval = 0;
+		tcp->flags |= TCB_FILTERED;
 		return 0;
 	}
 
 	tcp->flags &= ~TCB_FILTERED;
 
 	if (hide_log(tcp)) {
-		res = 0;
-		goto ret;
+		return 0;
 	}
 
 	if (tcp->qual_flg & QUAL_INJECT)
 		tamper_with_syscall_entering(tcp, sig);
 
 	if (cflag == CFLAG_ONLY_STATS) {
-		res = 0;
-		goto ret;
+		return 0;
 	}
 
 #ifdef USE_LIBUNWIND
@@ -739,19 +746,20 @@
 
 	printleader(tcp);
 	tprintf("%s(", tcp->s_ent->sys_name);
-	if (tcp->qual_flg & QUAL_RAW)
-		res = printargs(tcp);
-	else
-		res = tcp->s_ent->sys_func(tcp);
-
+	int res = (tcp->qual_flg & QUAL_RAW)
+		? printargs(tcp) : tcp->s_ent->sys_func(tcp);
 	fflush(tcp->outf);
- ret:
+	return res;
+}
+
+void
+syscall_entering_finish(struct tcb *tcp, int res)
+{
 	tcp->flags |= TCB_INSYSCALL;
 	tcp->sys_func_rval = res;
 	/* Measure the entrance time as late as possible to avoid errors. */
-	if (Tflag || cflag)
+	if ((Tflag || cflag) && !filtered(tcp))
 		gettimeofday(&tcp->etime, NULL);
-	return res;
 }
 
 static bool
@@ -760,14 +768,20 @@
 	return tcp->flags & TCB_TAMPERED;
 }
 
-static int
-trace_syscall_exiting(struct tcb *tcp)
+/* Returns:
+ * 0: "bail out".
+ * 1: ok.
+ * -1: error in one of ptrace ops.
+ *
+ * If not 0, call syscall_exiting_trace(tcp, res), where res is the return
+ *    value. Anyway, call syscall_exiting_finish(tcp) then.
+ */
+int
+syscall_exiting_decode(struct tcb *tcp, struct timeval *ptv)
 {
-	struct timeval tv;
-
 	/* Measure the exit time as early as possible to avoid errors. */
 	if ((Tflag || cflag) && !(filtered(tcp) || hide_log(tcp)))
-		gettimeofday(&tv, NULL);
+		gettimeofday(ptv, NULL);
 
 #ifdef USE_LIBUNWIND
 	if (stack_trace_enabled) {
@@ -777,21 +791,25 @@
 #endif
 
 	if (filtered(tcp) || hide_log(tcp))
-		goto ret;
+		return 0;
 
 	get_regs(tcp->pid);
 #if SUPPORTED_PERSONALITIES > 1
 	update_personality(tcp, tcp->currpers);
 #endif
-	int res = (get_regs_error ? -1 : get_syscall_result(tcp));
+	return get_regs_error ? -1 : get_syscall_result(tcp);
+}
 
+int
+syscall_exiting_trace(struct tcb *tcp, struct timeval tv, int res)
+{
 	if (syserror(tcp) && syscall_tampered(tcp))
 		tamper_with_syscall_exiting(tcp);
 
 	if (cflag) {
 		count_syscall(tcp, &tv);
 		if (cflag == CFLAG_ONLY_STATS) {
-			goto ret;
+			return 0;
 		}
 	}
 
@@ -818,9 +836,6 @@
 		tabto();
 		tprints("= ? <unavailable>\n");
 		line_ended();
-		tcp->flags &= ~(TCB_INSYSCALL | TCB_TAMPERED);
-		tcp->sys_func_rval = 0;
-		free_tcb_priv_data(tcp);
 		return res;
 	}
 	tcp->s_prev_ent = tcp->s_ent;
@@ -832,13 +847,13 @@
 	/* FIXME: not_failing_only (IOW, option -z) is broken:
 	 * failure of syscall is known only after syscall return.
 	 * Thus we end up with something like this on, say, ENOENT:
-	 *     open("doesnt_exist", O_RDONLY <unfinished ...>
+	 *     open("does_not_exist", O_RDONLY <unfinished ...>
 	 *     {next syscall decode}
 	 * whereas the intended result is that open(...) line
 	 * is not shown at all.
 	 */
 		if (not_failing_only && tcp->u_error)
-			goto ret;	/* ignore failed syscalls */
+			return 0;	/* ignore failed syscalls */
 		if (tcp->sys_func_rval & RVAL_DECODED)
 			sys_res = tcp->sys_func_rval;
 		else
@@ -857,8 +872,7 @@
 		}
 		if (syscall_tampered(tcp))
 			tprints(" (INJECTED)");
-	}
-	else if (!(sys_res & RVAL_NONE) && u_error) {
+	} else if (!(sys_res & RVAL_NONE) && u_error) {
 		const char *u_error_str;
 
 		switch (u_error) {
@@ -929,8 +943,7 @@
 			tprints(" (INJECTED)");
 		if ((sys_res & RVAL_STR) && tcp->auxstr)
 			tprintf(" (%s)", tcp->auxstr);
-	}
-	else {
+	} else {
 		if (sys_res & RVAL_NONE)
 			tprints("= ?");
 		else {
@@ -968,8 +981,7 @@
 				if (show_fd_path) {
 					tprints("= ");
 					printfd(tcp, tcp->u_rval);
-				}
-				else
+				} else
 					tprintf("= %" PRI_kld, tcp->u_rval);
 				break;
 			default:
@@ -995,19 +1007,15 @@
 	if (stack_trace_enabled)
 		unwind_print_stacktrace(tcp);
 #endif
-
- ret:
-	tcp->flags &= ~(TCB_INSYSCALL | TCB_TAMPERED);
-	tcp->sys_func_rval = 0;
-	free_tcb_priv_data(tcp);
 	return 0;
 }
 
-int
-trace_syscall(struct tcb *tcp, unsigned int *signo)
+void
+syscall_exiting_finish(struct tcb *tcp)
 {
-	return exiting(tcp) ?
-		trace_syscall_exiting(tcp) : trace_syscall_entering(tcp, signo);
+	tcp->flags &= ~(TCB_INSYSCALL | TCB_TAMPERED);
+	tcp->sys_func_rval = 0;
+	free_tcb_priv_data(tcp);
 }
 
 bool
@@ -1230,10 +1238,11 @@
 
 /*
  * Returns:
- * 0: "ignore this ptrace stop", bail out of trace_syscall_entering() silently.
- * 1: ok, continue in trace_syscall_entering().
- * other: error, trace_syscall_entering() should print error indicator
- *    ("????" etc) and bail out.
+ * 0: "ignore this ptrace stop", syscall_entering_decode() should return a "bail
+ *    out silently" code.
+ * 1: ok, continue in syscall_entering_decode().
+ * other: error, syscall_entering_decode() should print error indicator
+ *    ("????" etc) and return an appropriate code.
  */
 int
 get_scno(struct tcb *tcp)
@@ -1277,8 +1286,8 @@
 #endif
 
 /* Returns:
- * 1: ok, continue in trace_syscall_exiting().
- * -1: error, trace_syscall_exiting() should print error indicator
+ * 1: ok, continue in syscall_exiting_trace().
+ * -1: error, syscall_exiting_trace() should print error indicator
  *    ("????" etc) and bail out.
  */
 static int
@@ -1313,5 +1322,5 @@
 	if (current_personality == X32_PERSONALITY_NUMBER)
 		scno &= ~__X32_SYSCALL_BIT;
 #endif
-	return scno_is_valid(scno) ? sysent[scno].sys_name: NULL;
+	return scno_is_valid(scno) ? sysent[scno].sys_name : NULL;
 }
diff --git a/sysctl.c b/sysctl.c
index 6459415..176973a 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -155,7 +155,7 @@
 		default:
 			goto out;
 		}
-	out:
+out:
 		max_cnt = info.nlen;
 		if (abbrev(tcp) && max_cnt > max_strlen)
 			max_cnt = max_strlen;
diff --git a/tests-m32/Makefile b/tests-m32/Makefile
deleted file mode 100644
index 1bfab92..0000000
--- a/tests-m32/Makefile
+++ /dev/null
@@ -1,7114 +0,0 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
-# tests-m32/Makefile.  Generated from Makefile.in by configure.
-
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-# Automake input for strace tests.
-#
-# Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
-# Copyright (c) 2011-2017 The strace developers.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-#    derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# scno.h make rules for strace.
-#
-# Copyright (c) 2017 Dmitry V. Levin <ldv@altlinux.org>
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-#    derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/strace
-pkgincludedir = $(includedir)/strace
-pkglibdir = $(libdir)/strace
-pkglibexecdir = $(libexecdir)/strace
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = x86_64-pc-linux-gnu
-host_triplet = x86_64-pc-linux-gnu
-DIST_COMMON = $(srcdir)/pure_executables.am $(srcdir)/gen_tests.am \
-	$(srcdir)/../scno.am $(srcdir)/Makefile.in \
-	$(srcdir)/Makefile.am $(top_srcdir)/depcomp \
-	$(top_srcdir)/test-driver
-check_PROGRAMS = $(am__EXEEXT_1) answer$(EXEEXT) attach-f-p$(EXEEXT) \
-	attach-f-p-cmd$(EXEEXT) attach-p-cmd-cmd$(EXEEXT) \
-	attach-p-cmd-p$(EXEEXT) caps-abbrev$(EXEEXT) count-f$(EXEEXT) \
-	execve-v$(EXEEXT) execveat-v$(EXEEXT) \
-	filter-unavailable$(EXEEXT) fork-f$(EXEEXT) getpid$(EXEEXT) \
-	getppid$(EXEEXT) gettid$(EXEEXT) int_0x80$(EXEEXT) \
-	ioctl_dm-v$(EXEEXT) ioctl_evdev-v$(EXEEXT) \
-	ioctl_loop-nv$(EXEEXT) ioctl_loop-v$(EXEEXT) \
-	ioctl_nsfs$(EXEEXT) ioctl_rtc-v$(EXEEXT) ksysent$(EXEEXT) \
-	mmsg-silent$(EXEEXT) mmsg_name-v$(EXEEXT) \
-	msg_control-v$(EXEEXT) net-accept-connect$(EXEEXT) \
-	netlink_inet_diag$(EXEEXT) netlink_netlink_diag$(EXEEXT) \
-	netlink_unix_diag$(EXEEXT) nsyscalls$(EXEEXT) pc$(EXEEXT) \
-	perf_event_open_nonverbose$(EXEEXT) \
-	perf_event_open_unabbrev$(EXEEXT) ppoll-v$(EXEEXT) \
-	prctl-seccomp-filter-v$(EXEEXT) prctl-seccomp-strict$(EXEEXT) \
-	print_maxfd$(EXEEXT) qual_fault$(EXEEXT) \
-	qual_inject-error-signal$(EXEEXT) qual_inject-retval$(EXEEXT) \
-	qual_inject-signal$(EXEEXT) qual_signal$(EXEEXT) \
-	quotactl-v$(EXEEXT) quotactl-xfs-v$(EXEEXT) \
-	redirect-fds$(EXEEXT) restart_syscall$(EXEEXT) \
-	scm_rights$(EXEEXT) seccomp-filter-v$(EXEEXT) \
-	seccomp-strict$(EXEEXT) set_ptracer_any$(EXEEXT) \
-	signal_receive$(EXEEXT) sleep$(EXEEXT) stack-fcall$(EXEEXT) \
-	threads-execve$(EXEEXT) unix-pair-send-recv$(EXEEXT) \
-	unix-pair-sendto-recvfrom$(EXEEXT) vfork-f$(EXEEXT) \
-	wait4-v$(EXEEXT) waitid-v$(EXEEXT)
-TESTS = $(GEN_TESTS) $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_2)
-subdir = tests-m32
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \
-	$(top_srcdir)/m4/ax_prog_cc_for_build.m4 \
-	$(top_srcdir)/m4/ax_valgrind_check.m4 \
-	$(top_srcdir)/m4/mpers.m4 \
-	$(top_srcdir)/m4/st_save_restore_var.m4 \
-	$(top_srcdir)/m4/st_warn_cflags.m4 \
-	$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AR = ar
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_$(V))
-am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
-am__v_AR_0 = @echo "  AR      " $@;
-am__v_AR_1 = 
-libtests_a_AR = $(AR) $(ARFLAGS)
-libtests_a_LIBADD =
-am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \
-	libtests_a-error_msg.$(OBJEXT) \
-	libtests_a-fill_memory.$(OBJEXT) \
-	libtests_a-get_page_size.$(OBJEXT) \
-	libtests_a-get_sigset_size.$(OBJEXT) \
-	libtests_a-hexdump_strdup.$(OBJEXT) \
-	libtests_a-hexquote_strndup.$(OBJEXT) \
-	libtests_a-inode_of_sockfd.$(OBJEXT) \
-	libtests_a-libmmsg.$(OBJEXT) \
-	libtests_a-libsocketcall.$(OBJEXT) \
-	libtests_a-overflowuid.$(OBJEXT) \
-	libtests_a-pipe_maxfd.$(OBJEXT) \
-	libtests_a-print_quoted_string.$(OBJEXT) \
-	libtests_a-print_time.$(OBJEXT) \
-	libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \
-	libtests_a-signal2name.$(OBJEXT) \
-	libtests_a-skip_unavailable.$(OBJEXT) \
-	libtests_a-sprintrc.$(OBJEXT) libtests_a-tail_alloc.$(OBJEXT) \
-	libtests_a-tprintf.$(OBJEXT)
-libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
-am__EXEEXT_1 = _newselect$(EXEEXT) accept$(EXEEXT) accept4$(EXEEXT) \
-	access$(EXEEXT) acct$(EXEEXT) add_key$(EXEEXT) \
-	adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) bpf$(EXEEXT) \
-	brk$(EXEEXT) btrfs$(EXEEXT) caps$(EXEEXT) chmod$(EXEEXT) \
-	chown$(EXEEXT) chown32$(EXEEXT) chroot$(EXEEXT) \
-	clock_adjtime$(EXEEXT) clock_nanosleep$(EXEEXT) \
-	clock_xettime$(EXEEXT) copy_file_range$(EXEEXT) creat$(EXEEXT) \
-	delete_module$(EXEEXT) dup$(EXEEXT) dup2$(EXEEXT) \
-	dup3$(EXEEXT) epoll_create$(EXEEXT) epoll_create1$(EXEEXT) \
-	epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) epoll_wait$(EXEEXT) \
-	erestartsys$(EXEEXT) eventfd$(EXEEXT) execve$(EXEEXT) \
-	execveat$(EXEEXT) faccessat$(EXEEXT) fadvise64$(EXEEXT) \
-	fadvise64_64$(EXEEXT) fallocate$(EXEEXT) \
-	fanotify_init$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \
-	fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \
-	fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \
-	fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \
-	file_ioctl$(EXEEXT) finit_module$(EXEEXT) flock$(EXEEXT) \
-	fstat$(EXEEXT) fstat64$(EXEEXT) fstatat64$(EXEEXT) \
-	fstatfs$(EXEEXT) fstatfs64$(EXEEXT) fsync$(EXEEXT) \
-	ftruncate$(EXEEXT) ftruncate64$(EXEEXT) futex$(EXEEXT) \
-	futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcpu$(EXEEXT) \
-	getcwd$(EXEEXT) getdents$(EXEEXT) getdents64$(EXEEXT) \
-	getegid$(EXEEXT) getegid32$(EXEEXT) geteuid$(EXEEXT) \
-	geteuid32$(EXEEXT) getgid$(EXEEXT) getgid32$(EXEEXT) \
-	getgroups$(EXEEXT) getgroups32$(EXEEXT) getpeername$(EXEEXT) \
-	getpgrp$(EXEEXT) getpid$(EXEEXT) getppid$(EXEEXT) \
-	getrandom$(EXEEXT) getresgid$(EXEEXT) getresgid32$(EXEEXT) \
-	getresuid$(EXEEXT) getresuid32$(EXEEXT) getrlimit$(EXEEXT) \
-	getrusage$(EXEEXT) getsid$(EXEEXT) getsockname$(EXEEXT) \
-	getuid$(EXEEXT) getuid32$(EXEEXT) getxxid$(EXEEXT) \
-	inet-cmsg$(EXEEXT) init_module$(EXEEXT) inotify$(EXEEXT) \
-	inotify_init1$(EXEEXT) ioctl$(EXEEXT) ioctl_block$(EXEEXT) \
-	ioctl_dm$(EXEEXT) ioctl_evdev$(EXEEXT) ioctl_loop$(EXEEXT) \
-	ioctl_mtd$(EXEEXT) ioctl_rtc$(EXEEXT) ioctl_scsi$(EXEEXT) \
-	ioctl_sg_io_v3$(EXEEXT) ioctl_sg_io_v4$(EXEEXT) \
-	ioctl_sock_gifconf$(EXEEXT) ioctl_uffdio$(EXEEXT) \
-	ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \
-	ioprio$(EXEEXT) ip_mreq$(EXEEXT) ipc$(EXEEXT) ipc_msg$(EXEEXT) \
-	ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \
-	kcmp$(EXEEXT) kexec_file_load$(EXEEXT) kexec_load$(EXEEXT) \
-	keyctl$(EXEEXT) kill$(EXEEXT) lchown$(EXEEXT) \
-	lchown32$(EXEEXT) link$(EXEEXT) linkat$(EXEEXT) \
-	llseek$(EXEEXT) lookup_dcookie$(EXEEXT) lseek$(EXEEXT) \
-	lstat$(EXEEXT) lstat64$(EXEEXT) madvise$(EXEEXT) \
-	mbind$(EXEEXT) membarrier$(EXEEXT) memfd_create$(EXEEXT) \
-	migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \
-	mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \
-	mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \
-	mmap64$(EXEEXT) mmsg$(EXEEXT) mmsg_name$(EXEEXT) \
-	mount$(EXEEXT) move_pages$(EXEEXT) mq$(EXEEXT) \
-	mq_sendrecv$(EXEEXT) mq_sendrecv-read$(EXEEXT) \
-	mq_sendrecv-write$(EXEEXT) msg_control$(EXEEXT) \
-	msg_name$(EXEEXT) munlockall$(EXEEXT) nanosleep$(EXEEXT) \
-	net-icmp_filter$(EXEEXT) net-sockaddr$(EXEEXT) \
-	net-y-unix$(EXEEXT) net-yy-inet$(EXEEXT) \
-	net-yy-netlink$(EXEEXT) net-yy-unix$(EXEEXT) \
-	netlink_protocol$(EXEEXT) newfstatat$(EXEEXT) \
-	old_mmap$(EXEEXT) oldfstat$(EXEEXT) oldlstat$(EXEEXT) \
-	oldselect$(EXEEXT) oldstat$(EXEEXT) open$(EXEEXT) \
-	openat$(EXEEXT) osf_utimes$(EXEEXT) pause$(EXEEXT) \
-	perf_event_open$(EXEEXT) personality$(EXEEXT) pipe$(EXEEXT) \
-	pipe2$(EXEEXT) pkey_alloc$(EXEEXT) pkey_free$(EXEEXT) \
-	pkey_mprotect$(EXEEXT) poll$(EXEEXT) ppoll$(EXEEXT) \
-	prctl-arg2-intptr$(EXEEXT) prctl-dumpable$(EXEEXT) \
-	prctl-name$(EXEEXT) prctl-no-args$(EXEEXT) \
-	prctl-pdeathsig$(EXEEXT) prctl-securebits$(EXEEXT) \
-	prctl-tid_address$(EXEEXT) prctl-tsc$(EXEEXT) \
-	pread64-pwrite64$(EXEEXT) preadv$(EXEEXT) \
-	preadv-pwritev$(EXEEXT) preadv2-pwritev2$(EXEEXT) \
-	printstr$(EXEEXT) prlimit64$(EXEEXT) process_vm_readv$(EXEEXT) \
-	process_vm_writev$(EXEEXT) pselect6$(EXEEXT) ptrace$(EXEEXT) \
-	pwritev$(EXEEXT) quotactl$(EXEEXT) quotactl-xfs$(EXEEXT) \
-	read-write$(EXEEXT) readahead$(EXEEXT) readdir$(EXEEXT) \
-	readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \
-	reboot$(EXEEXT) recvfrom$(EXEEXT) recvmmsg-timeout$(EXEEXT) \
-	recvmsg$(EXEEXT) remap_file_pages$(EXEEXT) rename$(EXEEXT) \
-	renameat$(EXEEXT) renameat2$(EXEEXT) request_key$(EXEEXT) \
-	rmdir$(EXEEXT) rt_sigpending$(EXEEXT) rt_sigprocmask$(EXEEXT) \
-	rt_sigqueueinfo$(EXEEXT) rt_sigreturn$(EXEEXT) \
-	rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \
-	rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \
-	sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \
-	sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \
-	sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \
-	seccomp-filter$(EXEEXT) select$(EXEEXT) semop$(EXEEXT) \
-	sendfile$(EXEEXT) sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \
-	setdomainname$(EXEEXT) setfsgid$(EXEEXT) setfsgid32$(EXEEXT) \
-	setfsuid$(EXEEXT) setfsuid32$(EXEEXT) setgid$(EXEEXT) \
-	setgid32$(EXEEXT) setgroups$(EXEEXT) setgroups32$(EXEEXT) \
-	sethostname$(EXEEXT) setns$(EXEEXT) setregid$(EXEEXT) \
-	setregid32$(EXEEXT) setresgid$(EXEEXT) setresgid32$(EXEEXT) \
-	setresuid$(EXEEXT) setresuid32$(EXEEXT) setreuid$(EXEEXT) \
-	setreuid32$(EXEEXT) setrlimit$(EXEEXT) setuid$(EXEEXT) \
-	setuid32$(EXEEXT) shmxt$(EXEEXT) shutdown$(EXEEXT) \
-	sigaction$(EXEEXT) sigaltstack$(EXEEXT) siginfo$(EXEEXT) \
-	signalfd4$(EXEEXT) sigreturn$(EXEEXT) sigsuspend$(EXEEXT) \
-	socketcall$(EXEEXT) splice$(EXEEXT) stat$(EXEEXT) \
-	stat64$(EXEEXT) statfs$(EXEEXT) statfs64$(EXEEXT) \
-	statx$(EXEEXT) swap$(EXEEXT) sxetmask$(EXEEXT) \
-	symlink$(EXEEXT) symlinkat$(EXEEXT) sync$(EXEEXT) \
-	sync_file_range$(EXEEXT) sync_file_range2$(EXEEXT) \
-	sysinfo$(EXEEXT) syslog$(EXEEXT) tee$(EXEEXT) time$(EXEEXT) \
-	timer_create$(EXEEXT) timer_xettime$(EXEEXT) \
-	timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \
-	truncate$(EXEEXT) truncate64$(EXEEXT) ugetrlimit$(EXEEXT) \
-	uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \
-	umoven-illptr$(EXEEXT) umovestr$(EXEEXT) \
-	umovestr-illptr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \
-	uname$(EXEEXT) unlink$(EXEEXT) unlinkat$(EXEEXT) \
-	unshare$(EXEEXT) userfaultfd$(EXEEXT) ustat$(EXEEXT) \
-	utime$(EXEEXT) utimensat$(EXEEXT) utimes$(EXEEXT) \
-	vhangup$(EXEEXT) vmsplice$(EXEEXT) wait4$(EXEEXT) \
-	waitid$(EXEEXT) waitpid$(EXEEXT) xattr$(EXEEXT) \
-	xattr-strings$(EXEEXT) xet_robust_list$(EXEEXT) \
-	xetitimer$(EXEEXT) xetpgid$(EXEEXT) xetpriority$(EXEEXT) \
-	xettimeofday$(EXEEXT)
-_newselect_SOURCES = _newselect.c
-_newselect_OBJECTS = _newselect.$(OBJEXT)
-_newselect_LDADD = $(LDADD)
-_newselect_DEPENDENCIES = libtests.a
-accept_SOURCES = accept.c
-accept_OBJECTS = accept.$(OBJEXT)
-accept_LDADD = $(LDADD)
-accept_DEPENDENCIES = libtests.a
-accept4_SOURCES = accept4.c
-accept4_OBJECTS = accept4.$(OBJEXT)
-accept4_LDADD = $(LDADD)
-accept4_DEPENDENCIES = libtests.a
-access_SOURCES = access.c
-access_OBJECTS = access.$(OBJEXT)
-access_LDADD = $(LDADD)
-access_DEPENDENCIES = libtests.a
-acct_SOURCES = acct.c
-acct_OBJECTS = acct.$(OBJEXT)
-acct_LDADD = $(LDADD)
-acct_DEPENDENCIES = libtests.a
-add_key_SOURCES = add_key.c
-add_key_OBJECTS = add_key.$(OBJEXT)
-add_key_LDADD = $(LDADD)
-add_key_DEPENDENCIES = libtests.a
-adjtimex_SOURCES = adjtimex.c
-adjtimex_OBJECTS = adjtimex.$(OBJEXT)
-adjtimex_LDADD = $(LDADD)
-adjtimex_DEPENDENCIES = libtests.a
-aio_SOURCES = aio.c
-aio_OBJECTS = aio.$(OBJEXT)
-aio_LDADD = $(LDADD)
-aio_DEPENDENCIES = libtests.a
-alarm_SOURCES = alarm.c
-alarm_OBJECTS = alarm.$(OBJEXT)
-alarm_LDADD = $(LDADD)
-alarm_DEPENDENCIES = libtests.a
-answer_SOURCES = answer.c
-answer_OBJECTS = answer.$(OBJEXT)
-answer_LDADD = $(LDADD)
-answer_DEPENDENCIES = libtests.a
-attach_f_p_SOURCES = attach-f-p.c
-attach_f_p_OBJECTS = attach-f-p.$(OBJEXT)
-attach_f_p_DEPENDENCIES = $(LDADD)
-attach_f_p_cmd_SOURCES = attach-f-p-cmd.c
-attach_f_p_cmd_OBJECTS = attach-f-p-cmd.$(OBJEXT)
-attach_f_p_cmd_LDADD = $(LDADD)
-attach_f_p_cmd_DEPENDENCIES = libtests.a
-attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c
-attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT)
-attach_p_cmd_cmd_LDADD = $(LDADD)
-attach_p_cmd_cmd_DEPENDENCIES = libtests.a
-attach_p_cmd_p_SOURCES = attach-p-cmd-p.c
-attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT)
-attach_p_cmd_p_LDADD = $(LDADD)
-attach_p_cmd_p_DEPENDENCIES = libtests.a
-bpf_SOURCES = bpf.c
-bpf_OBJECTS = bpf.$(OBJEXT)
-bpf_LDADD = $(LDADD)
-bpf_DEPENDENCIES = libtests.a
-brk_SOURCES = brk.c
-brk_OBJECTS = brk.$(OBJEXT)
-brk_LDADD = $(LDADD)
-brk_DEPENDENCIES = libtests.a
-btrfs_SOURCES = btrfs.c
-btrfs_OBJECTS = btrfs.$(OBJEXT)
-btrfs_LDADD = $(LDADD)
-btrfs_DEPENDENCIES = libtests.a
-caps_SOURCES = caps.c
-caps_OBJECTS = caps.$(OBJEXT)
-caps_LDADD = $(LDADD)
-caps_DEPENDENCIES = libtests.a
-caps_abbrev_SOURCES = caps-abbrev.c
-caps_abbrev_OBJECTS = caps-abbrev.$(OBJEXT)
-caps_abbrev_LDADD = $(LDADD)
-caps_abbrev_DEPENDENCIES = libtests.a
-chmod_SOURCES = chmod.c
-chmod_OBJECTS = chmod.$(OBJEXT)
-chmod_LDADD = $(LDADD)
-chmod_DEPENDENCIES = libtests.a
-chown_SOURCES = chown.c
-chown_OBJECTS = chown.$(OBJEXT)
-chown_LDADD = $(LDADD)
-chown_DEPENDENCIES = libtests.a
-chown32_SOURCES = chown32.c
-chown32_OBJECTS = chown32.$(OBJEXT)
-chown32_LDADD = $(LDADD)
-chown32_DEPENDENCIES = libtests.a
-chroot_SOURCES = chroot.c
-chroot_OBJECTS = chroot.$(OBJEXT)
-chroot_LDADD = $(LDADD)
-chroot_DEPENDENCIES = libtests.a
-clock_adjtime_SOURCES = clock_adjtime.c
-clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT)
-clock_adjtime_LDADD = $(LDADD)
-clock_adjtime_DEPENDENCIES = libtests.a
-clock_nanosleep_SOURCES = clock_nanosleep.c
-clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT)
-clock_nanosleep_LDADD = $(LDADD)
-clock_nanosleep_DEPENDENCIES = libtests.a
-clock_xettime_SOURCES = clock_xettime.c
-clock_xettime_OBJECTS = clock_xettime.$(OBJEXT)
-clock_xettime_DEPENDENCIES = $(LDADD)
-copy_file_range_SOURCES = copy_file_range.c
-copy_file_range_OBJECTS = copy_file_range.$(OBJEXT)
-copy_file_range_LDADD = $(LDADD)
-copy_file_range_DEPENDENCIES = libtests.a
-count_f_SOURCES = count-f.c
-count_f_OBJECTS = count-f.$(OBJEXT)
-count_f_DEPENDENCIES = $(LDADD)
-creat_SOURCES = creat.c
-creat_OBJECTS = creat.$(OBJEXT)
-creat_LDADD = $(LDADD)
-creat_DEPENDENCIES = libtests.a
-delete_module_SOURCES = delete_module.c
-delete_module_OBJECTS = delete_module.$(OBJEXT)
-delete_module_LDADD = $(LDADD)
-delete_module_DEPENDENCIES = libtests.a
-dup_SOURCES = dup.c
-dup_OBJECTS = dup.$(OBJEXT)
-dup_LDADD = $(LDADD)
-dup_DEPENDENCIES = libtests.a
-dup2_SOURCES = dup2.c
-dup2_OBJECTS = dup2.$(OBJEXT)
-dup2_LDADD = $(LDADD)
-dup2_DEPENDENCIES = libtests.a
-dup3_SOURCES = dup3.c
-dup3_OBJECTS = dup3.$(OBJEXT)
-dup3_LDADD = $(LDADD)
-dup3_DEPENDENCIES = libtests.a
-epoll_create_SOURCES = epoll_create.c
-epoll_create_OBJECTS = epoll_create.$(OBJEXT)
-epoll_create_LDADD = $(LDADD)
-epoll_create_DEPENDENCIES = libtests.a
-epoll_create1_SOURCES = epoll_create1.c
-epoll_create1_OBJECTS = epoll_create1.$(OBJEXT)
-epoll_create1_LDADD = $(LDADD)
-epoll_create1_DEPENDENCIES = libtests.a
-epoll_ctl_SOURCES = epoll_ctl.c
-epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT)
-epoll_ctl_LDADD = $(LDADD)
-epoll_ctl_DEPENDENCIES = libtests.a
-epoll_pwait_SOURCES = epoll_pwait.c
-epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT)
-epoll_pwait_LDADD = $(LDADD)
-epoll_pwait_DEPENDENCIES = libtests.a
-epoll_wait_SOURCES = epoll_wait.c
-epoll_wait_OBJECTS = epoll_wait.$(OBJEXT)
-epoll_wait_LDADD = $(LDADD)
-epoll_wait_DEPENDENCIES = libtests.a
-erestartsys_SOURCES = erestartsys.c
-erestartsys_OBJECTS = erestartsys.$(OBJEXT)
-erestartsys_LDADD = $(LDADD)
-erestartsys_DEPENDENCIES = libtests.a
-eventfd_SOURCES = eventfd.c
-eventfd_OBJECTS = eventfd.$(OBJEXT)
-eventfd_LDADD = $(LDADD)
-eventfd_DEPENDENCIES = libtests.a
-execve_SOURCES = execve.c
-execve_OBJECTS = execve.$(OBJEXT)
-execve_LDADD = $(LDADD)
-execve_DEPENDENCIES = libtests.a
-execve_v_SOURCES = execve-v.c
-execve_v_OBJECTS = execve-v.$(OBJEXT)
-execve_v_LDADD = $(LDADD)
-execve_v_DEPENDENCIES = libtests.a
-execveat_SOURCES = execveat.c
-execveat_OBJECTS = execveat.$(OBJEXT)
-execveat_LDADD = $(LDADD)
-execveat_DEPENDENCIES = libtests.a
-execveat_v_SOURCES = execveat-v.c
-execveat_v_OBJECTS = execveat-v.$(OBJEXT)
-execveat_v_LDADD = $(LDADD)
-execveat_v_DEPENDENCIES = libtests.a
-faccessat_SOURCES = faccessat.c
-faccessat_OBJECTS = faccessat.$(OBJEXT)
-faccessat_LDADD = $(LDADD)
-faccessat_DEPENDENCIES = libtests.a
-fadvise64_SOURCES = fadvise64.c
-fadvise64_OBJECTS = fadvise64.$(OBJEXT)
-fadvise64_LDADD = $(LDADD)
-fadvise64_DEPENDENCIES = libtests.a
-fadvise64_64_SOURCES = fadvise64_64.c
-fadvise64_64_OBJECTS = fadvise64_64.$(OBJEXT)
-fadvise64_64_LDADD = $(LDADD)
-fadvise64_64_DEPENDENCIES = libtests.a
-fallocate_SOURCES = fallocate.c
-fallocate_OBJECTS = fallocate.$(OBJEXT)
-fallocate_LDADD = $(LDADD)
-fallocate_DEPENDENCIES = libtests.a
-fanotify_init_SOURCES = fanotify_init.c
-fanotify_init_OBJECTS = fanotify_init.$(OBJEXT)
-fanotify_init_LDADD = $(LDADD)
-fanotify_init_DEPENDENCIES = libtests.a
-fanotify_mark_SOURCES = fanotify_mark.c
-fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT)
-fanotify_mark_LDADD = $(LDADD)
-fanotify_mark_DEPENDENCIES = libtests.a
-fchdir_SOURCES = fchdir.c
-fchdir_OBJECTS = fchdir.$(OBJEXT)
-fchdir_LDADD = $(LDADD)
-fchdir_DEPENDENCIES = libtests.a
-fchmod_SOURCES = fchmod.c
-fchmod_OBJECTS = fchmod.$(OBJEXT)
-fchmod_LDADD = $(LDADD)
-fchmod_DEPENDENCIES = libtests.a
-fchmodat_SOURCES = fchmodat.c
-fchmodat_OBJECTS = fchmodat.$(OBJEXT)
-fchmodat_LDADD = $(LDADD)
-fchmodat_DEPENDENCIES = libtests.a
-fchown_SOURCES = fchown.c
-fchown_OBJECTS = fchown.$(OBJEXT)
-fchown_LDADD = $(LDADD)
-fchown_DEPENDENCIES = libtests.a
-fchown32_SOURCES = fchown32.c
-fchown32_OBJECTS = fchown32.$(OBJEXT)
-fchown32_LDADD = $(LDADD)
-fchown32_DEPENDENCIES = libtests.a
-fchownat_SOURCES = fchownat.c
-fchownat_OBJECTS = fchownat.$(OBJEXT)
-fchownat_LDADD = $(LDADD)
-fchownat_DEPENDENCIES = libtests.a
-fcntl_SOURCES = fcntl.c
-fcntl_OBJECTS = fcntl.$(OBJEXT)
-fcntl_LDADD = $(LDADD)
-fcntl_DEPENDENCIES = libtests.a
-fcntl64_SOURCES = fcntl64.c
-fcntl64_OBJECTS = fcntl64.$(OBJEXT)
-fcntl64_LDADD = $(LDADD)
-fcntl64_DEPENDENCIES = libtests.a
-fdatasync_SOURCES = fdatasync.c
-fdatasync_OBJECTS = fdatasync.$(OBJEXT)
-fdatasync_LDADD = $(LDADD)
-fdatasync_DEPENDENCIES = libtests.a
-file_handle_SOURCES = file_handle.c
-file_handle_OBJECTS = file_handle.$(OBJEXT)
-file_handle_LDADD = $(LDADD)
-file_handle_DEPENDENCIES = libtests.a
-file_ioctl_SOURCES = file_ioctl.c
-file_ioctl_OBJECTS = file_ioctl.$(OBJEXT)
-file_ioctl_LDADD = $(LDADD)
-file_ioctl_DEPENDENCIES = libtests.a
-filter_unavailable_SOURCES = filter-unavailable.c
-filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT)
-filter_unavailable_DEPENDENCIES = $(LDADD)
-finit_module_SOURCES = finit_module.c
-finit_module_OBJECTS = finit_module.$(OBJEXT)
-finit_module_LDADD = $(LDADD)
-finit_module_DEPENDENCIES = libtests.a
-flock_SOURCES = flock.c
-flock_OBJECTS = flock.$(OBJEXT)
-flock_LDADD = $(LDADD)
-flock_DEPENDENCIES = libtests.a
-fork_f_SOURCES = fork-f.c
-fork_f_OBJECTS = fork-f.$(OBJEXT)
-fork_f_LDADD = $(LDADD)
-fork_f_DEPENDENCIES = libtests.a
-fstat_SOURCES = fstat.c
-fstat_OBJECTS = fstat.$(OBJEXT)
-fstat_LDADD = $(LDADD)
-fstat_DEPENDENCIES = libtests.a
-fstat64_SOURCES = fstat64.c
-fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT)
-fstat64_LDADD = $(LDADD)
-fstat64_DEPENDENCIES = libtests.a
-fstatat64_SOURCES = fstatat64.c
-fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT)
-fstatat64_LDADD = $(LDADD)
-fstatat64_DEPENDENCIES = libtests.a
-fstatfs_SOURCES = fstatfs.c
-fstatfs_OBJECTS = fstatfs.$(OBJEXT)
-fstatfs_LDADD = $(LDADD)
-fstatfs_DEPENDENCIES = libtests.a
-fstatfs64_SOURCES = fstatfs64.c
-fstatfs64_OBJECTS = fstatfs64.$(OBJEXT)
-fstatfs64_LDADD = $(LDADD)
-fstatfs64_DEPENDENCIES = libtests.a
-fsync_SOURCES = fsync.c
-fsync_OBJECTS = fsync.$(OBJEXT)
-fsync_LDADD = $(LDADD)
-fsync_DEPENDENCIES = libtests.a
-ftruncate_SOURCES = ftruncate.c
-ftruncate_OBJECTS = ftruncate.$(OBJEXT)
-ftruncate_LDADD = $(LDADD)
-ftruncate_DEPENDENCIES = libtests.a
-ftruncate64_SOURCES = ftruncate64.c
-ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT)
-ftruncate64_LDADD = $(LDADD)
-ftruncate64_DEPENDENCIES = libtests.a
-futex_SOURCES = futex.c
-futex_OBJECTS = futex.$(OBJEXT)
-futex_LDADD = $(LDADD)
-futex_DEPENDENCIES = libtests.a
-futimesat_SOURCES = futimesat.c
-futimesat_OBJECTS = futimesat.$(OBJEXT)
-futimesat_LDADD = $(LDADD)
-futimesat_DEPENDENCIES = libtests.a
-get_mempolicy_SOURCES = get_mempolicy.c
-get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT)
-get_mempolicy_LDADD = $(LDADD)
-get_mempolicy_DEPENDENCIES = libtests.a
-getcpu_SOURCES = getcpu.c
-getcpu_OBJECTS = getcpu.$(OBJEXT)
-getcpu_LDADD = $(LDADD)
-getcpu_DEPENDENCIES = libtests.a
-getcwd_SOURCES = getcwd.c
-getcwd_OBJECTS = getcwd.$(OBJEXT)
-getcwd_LDADD = $(LDADD)
-getcwd_DEPENDENCIES = libtests.a
-getdents_SOURCES = getdents.c
-getdents_OBJECTS = getdents.$(OBJEXT)
-getdents_LDADD = $(LDADD)
-getdents_DEPENDENCIES = libtests.a
-getdents64_SOURCES = getdents64.c
-getdents64_OBJECTS = getdents64.$(OBJEXT)
-getdents64_LDADD = $(LDADD)
-getdents64_DEPENDENCIES = libtests.a
-getegid_SOURCES = getegid.c
-getegid_OBJECTS = getegid.$(OBJEXT)
-getegid_LDADD = $(LDADD)
-getegid_DEPENDENCIES = libtests.a
-getegid32_SOURCES = getegid32.c
-getegid32_OBJECTS = getegid32.$(OBJEXT)
-getegid32_LDADD = $(LDADD)
-getegid32_DEPENDENCIES = libtests.a
-geteuid_SOURCES = geteuid.c
-geteuid_OBJECTS = geteuid.$(OBJEXT)
-geteuid_LDADD = $(LDADD)
-geteuid_DEPENDENCIES = libtests.a
-geteuid32_SOURCES = geteuid32.c
-geteuid32_OBJECTS = geteuid32.$(OBJEXT)
-geteuid32_LDADD = $(LDADD)
-geteuid32_DEPENDENCIES = libtests.a
-getgid_SOURCES = getgid.c
-getgid_OBJECTS = getgid.$(OBJEXT)
-getgid_LDADD = $(LDADD)
-getgid_DEPENDENCIES = libtests.a
-getgid32_SOURCES = getgid32.c
-getgid32_OBJECTS = getgid32.$(OBJEXT)
-getgid32_LDADD = $(LDADD)
-getgid32_DEPENDENCIES = libtests.a
-getgroups_SOURCES = getgroups.c
-getgroups_OBJECTS = getgroups.$(OBJEXT)
-getgroups_LDADD = $(LDADD)
-getgroups_DEPENDENCIES = libtests.a
-getgroups32_SOURCES = getgroups32.c
-getgroups32_OBJECTS = getgroups32.$(OBJEXT)
-getgroups32_LDADD = $(LDADD)
-getgroups32_DEPENDENCIES = libtests.a
-getpeername_SOURCES = getpeername.c
-getpeername_OBJECTS = getpeername.$(OBJEXT)
-getpeername_LDADD = $(LDADD)
-getpeername_DEPENDENCIES = libtests.a
-getpgrp_SOURCES = getpgrp.c
-getpgrp_OBJECTS = getpgrp.$(OBJEXT)
-getpgrp_LDADD = $(LDADD)
-getpgrp_DEPENDENCIES = libtests.a
-getpid_SOURCES = getpid.c
-getpid_OBJECTS = getpid.$(OBJEXT)
-getpid_LDADD = $(LDADD)
-getpid_DEPENDENCIES = libtests.a
-getppid_SOURCES = getppid.c
-getppid_OBJECTS = getppid.$(OBJEXT)
-getppid_LDADD = $(LDADD)
-getppid_DEPENDENCIES = libtests.a
-getrandom_SOURCES = getrandom.c
-getrandom_OBJECTS = getrandom.$(OBJEXT)
-getrandom_LDADD = $(LDADD)
-getrandom_DEPENDENCIES = libtests.a
-getresgid_SOURCES = getresgid.c
-getresgid_OBJECTS = getresgid.$(OBJEXT)
-getresgid_LDADD = $(LDADD)
-getresgid_DEPENDENCIES = libtests.a
-getresgid32_SOURCES = getresgid32.c
-getresgid32_OBJECTS = getresgid32.$(OBJEXT)
-getresgid32_LDADD = $(LDADD)
-getresgid32_DEPENDENCIES = libtests.a
-getresuid_SOURCES = getresuid.c
-getresuid_OBJECTS = getresuid.$(OBJEXT)
-getresuid_LDADD = $(LDADD)
-getresuid_DEPENDENCIES = libtests.a
-getresuid32_SOURCES = getresuid32.c
-getresuid32_OBJECTS = getresuid32.$(OBJEXT)
-getresuid32_LDADD = $(LDADD)
-getresuid32_DEPENDENCIES = libtests.a
-getrlimit_SOURCES = getrlimit.c
-getrlimit_OBJECTS = getrlimit.$(OBJEXT)
-getrlimit_LDADD = $(LDADD)
-getrlimit_DEPENDENCIES = libtests.a
-getrusage_SOURCES = getrusage.c
-getrusage_OBJECTS = getrusage.$(OBJEXT)
-getrusage_LDADD = $(LDADD)
-getrusage_DEPENDENCIES = libtests.a
-getsid_SOURCES = getsid.c
-getsid_OBJECTS = getsid.$(OBJEXT)
-getsid_LDADD = $(LDADD)
-getsid_DEPENDENCIES = libtests.a
-getsockname_SOURCES = getsockname.c
-getsockname_OBJECTS = getsockname.$(OBJEXT)
-getsockname_LDADD = $(LDADD)
-getsockname_DEPENDENCIES = libtests.a
-gettid_SOURCES = gettid.c
-gettid_OBJECTS = gettid.$(OBJEXT)
-gettid_LDADD = $(LDADD)
-gettid_DEPENDENCIES = libtests.a
-getuid_SOURCES = getuid.c
-getuid_OBJECTS = getuid.$(OBJEXT)
-getuid_LDADD = $(LDADD)
-getuid_DEPENDENCIES = libtests.a
-getuid32_SOURCES = getuid32.c
-getuid32_OBJECTS = getuid32.$(OBJEXT)
-getuid32_LDADD = $(LDADD)
-getuid32_DEPENDENCIES = libtests.a
-getxxid_SOURCES = getxxid.c
-getxxid_OBJECTS = getxxid.$(OBJEXT)
-getxxid_LDADD = $(LDADD)
-getxxid_DEPENDENCIES = libtests.a
-inet_cmsg_SOURCES = inet-cmsg.c
-inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT)
-inet_cmsg_LDADD = $(LDADD)
-inet_cmsg_DEPENDENCIES = libtests.a
-init_module_SOURCES = init_module.c
-init_module_OBJECTS = init_module.$(OBJEXT)
-init_module_LDADD = $(LDADD)
-init_module_DEPENDENCIES = libtests.a
-inotify_SOURCES = inotify.c
-inotify_OBJECTS = inotify.$(OBJEXT)
-inotify_LDADD = $(LDADD)
-inotify_DEPENDENCIES = libtests.a
-inotify_init1_SOURCES = inotify_init1.c
-inotify_init1_OBJECTS = inotify_init1.$(OBJEXT)
-inotify_init1_LDADD = $(LDADD)
-inotify_init1_DEPENDENCIES = libtests.a
-int_0x80_SOURCES = int_0x80.c
-int_0x80_OBJECTS = int_0x80.$(OBJEXT)
-int_0x80_LDADD = $(LDADD)
-int_0x80_DEPENDENCIES = libtests.a
-ioctl_SOURCES = ioctl.c
-ioctl_OBJECTS = ioctl.$(OBJEXT)
-ioctl_LDADD = $(LDADD)
-ioctl_DEPENDENCIES = libtests.a
-ioctl_block_SOURCES = ioctl_block.c
-ioctl_block_OBJECTS = ioctl_block.$(OBJEXT)
-ioctl_block_LDADD = $(LDADD)
-ioctl_block_DEPENDENCIES = libtests.a
-ioctl_dm_SOURCES = ioctl_dm.c
-ioctl_dm_OBJECTS = ioctl_dm.$(OBJEXT)
-ioctl_dm_LDADD = $(LDADD)
-ioctl_dm_DEPENDENCIES = libtests.a
-ioctl_dm_v_SOURCES = ioctl_dm-v.c
-ioctl_dm_v_OBJECTS = ioctl_dm-v.$(OBJEXT)
-ioctl_dm_v_LDADD = $(LDADD)
-ioctl_dm_v_DEPENDENCIES = libtests.a
-ioctl_evdev_SOURCES = ioctl_evdev.c
-ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT)
-ioctl_evdev_LDADD = $(LDADD)
-ioctl_evdev_DEPENDENCIES = libtests.a
-ioctl_evdev_v_SOURCES = ioctl_evdev-v.c
-ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT)
-ioctl_evdev_v_LDADD = $(LDADD)
-ioctl_evdev_v_DEPENDENCIES = libtests.a
-ioctl_loop_SOURCES = ioctl_loop.c
-ioctl_loop_OBJECTS = ioctl_loop.$(OBJEXT)
-ioctl_loop_LDADD = $(LDADD)
-ioctl_loop_DEPENDENCIES = libtests.a
-ioctl_loop_nv_SOURCES = ioctl_loop-nv.c
-ioctl_loop_nv_OBJECTS = ioctl_loop-nv.$(OBJEXT)
-ioctl_loop_nv_LDADD = $(LDADD)
-ioctl_loop_nv_DEPENDENCIES = libtests.a
-ioctl_loop_v_SOURCES = ioctl_loop-v.c
-ioctl_loop_v_OBJECTS = ioctl_loop-v.$(OBJEXT)
-ioctl_loop_v_LDADD = $(LDADD)
-ioctl_loop_v_DEPENDENCIES = libtests.a
-ioctl_mtd_SOURCES = ioctl_mtd.c
-ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT)
-ioctl_mtd_LDADD = $(LDADD)
-ioctl_mtd_DEPENDENCIES = libtests.a
-ioctl_nsfs_SOURCES = ioctl_nsfs.c
-ioctl_nsfs_OBJECTS = ioctl_nsfs.$(OBJEXT)
-ioctl_nsfs_LDADD = $(LDADD)
-ioctl_nsfs_DEPENDENCIES = libtests.a
-ioctl_rtc_SOURCES = ioctl_rtc.c
-ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT)
-ioctl_rtc_LDADD = $(LDADD)
-ioctl_rtc_DEPENDENCIES = libtests.a
-ioctl_rtc_v_SOURCES = ioctl_rtc-v.c
-ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT)
-ioctl_rtc_v_LDADD = $(LDADD)
-ioctl_rtc_v_DEPENDENCIES = libtests.a
-ioctl_scsi_SOURCES = ioctl_scsi.c
-ioctl_scsi_OBJECTS = ioctl_scsi.$(OBJEXT)
-ioctl_scsi_LDADD = $(LDADD)
-ioctl_scsi_DEPENDENCIES = libtests.a
-ioctl_sg_io_v3_SOURCES = ioctl_sg_io_v3.c
-ioctl_sg_io_v3_OBJECTS = ioctl_sg_io_v3.$(OBJEXT)
-ioctl_sg_io_v3_LDADD = $(LDADD)
-ioctl_sg_io_v3_DEPENDENCIES = libtests.a
-ioctl_sg_io_v4_SOURCES = ioctl_sg_io_v4.c
-ioctl_sg_io_v4_OBJECTS = ioctl_sg_io_v4.$(OBJEXT)
-ioctl_sg_io_v4_LDADD = $(LDADD)
-ioctl_sg_io_v4_DEPENDENCIES = libtests.a
-ioctl_sock_gifconf_SOURCES = ioctl_sock_gifconf.c
-ioctl_sock_gifconf_OBJECTS = ioctl_sock_gifconf.$(OBJEXT)
-ioctl_sock_gifconf_LDADD = $(LDADD)
-ioctl_sock_gifconf_DEPENDENCIES = libtests.a
-ioctl_uffdio_SOURCES = ioctl_uffdio.c
-ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT)
-ioctl_uffdio_LDADD = $(LDADD)
-ioctl_uffdio_DEPENDENCIES = libtests.a
-ioctl_v4l2_SOURCES = ioctl_v4l2.c
-ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT)
-ioctl_v4l2_LDADD = $(LDADD)
-ioctl_v4l2_DEPENDENCIES = libtests.a
-ioperm_SOURCES = ioperm.c
-ioperm_OBJECTS = ioperm.$(OBJEXT)
-ioperm_LDADD = $(LDADD)
-ioperm_DEPENDENCIES = libtests.a
-iopl_SOURCES = iopl.c
-iopl_OBJECTS = iopl.$(OBJEXT)
-iopl_LDADD = $(LDADD)
-iopl_DEPENDENCIES = libtests.a
-ioprio_SOURCES = ioprio.c
-ioprio_OBJECTS = ioprio.$(OBJEXT)
-ioprio_LDADD = $(LDADD)
-ioprio_DEPENDENCIES = libtests.a
-ip_mreq_SOURCES = ip_mreq.c
-ip_mreq_OBJECTS = ip_mreq.$(OBJEXT)
-ip_mreq_LDADD = $(LDADD)
-ip_mreq_DEPENDENCIES = libtests.a
-ipc_SOURCES = ipc.c
-ipc_OBJECTS = ipc.$(OBJEXT)
-ipc_LDADD = $(LDADD)
-ipc_DEPENDENCIES = libtests.a
-ipc_msg_SOURCES = ipc_msg.c
-ipc_msg_OBJECTS = ipc_msg.$(OBJEXT)
-ipc_msg_LDADD = $(LDADD)
-ipc_msg_DEPENDENCIES = libtests.a
-ipc_msgbuf_SOURCES = ipc_msgbuf.c
-ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT)
-ipc_msgbuf_LDADD = $(LDADD)
-ipc_msgbuf_DEPENDENCIES = libtests.a
-ipc_sem_SOURCES = ipc_sem.c
-ipc_sem_OBJECTS = ipc_sem.$(OBJEXT)
-ipc_sem_LDADD = $(LDADD)
-ipc_sem_DEPENDENCIES = libtests.a
-ipc_shm_SOURCES = ipc_shm.c
-ipc_shm_OBJECTS = ipc_shm.$(OBJEXT)
-ipc_shm_LDADD = $(LDADD)
-ipc_shm_DEPENDENCIES = libtests.a
-kcmp_SOURCES = kcmp.c
-kcmp_OBJECTS = kcmp.$(OBJEXT)
-kcmp_LDADD = $(LDADD)
-kcmp_DEPENDENCIES = libtests.a
-kexec_file_load_SOURCES = kexec_file_load.c
-kexec_file_load_OBJECTS = k