2019-09-25  Dmitry V. Levin  <ldv@altlinux.org>

	Prepare for 5.3 release.
	* NEWS: Update for 5.3 release.

	tests: workaround systemd-nspawn habit of disabling unimplemented syscalls
	* tests/clone3.c (do_clone3_): Do not assume that unimplemented
	syscalls always fail with ENOSYS.

	Update copyright headers.
	Headers updated automatically using maint/update_copyright_years.sh
	script.

2019-09-25  Dmitry V. Levin  <ldv@altlinux.org>

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

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

2019-09-25  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Update NEWS.

2019-09-25  Chen Jingpiao  <chenjingpiao@gmail.com>
	    Paul Chaignon  <paul.chaignon@gmail.com>

	tests: check seccomp-assisted syscall filtering.
	Test filter_seccomp-perf checks whether seccomp-filter is actually
	enabled by comparing the number of syscalls performed in a time interval
	when seccomp-filter is enabled vs. disabled.  The number of syscalls
	should be at least one order of magnitude higher when seccomp-filter
	is enabled.

	Test filter_seccomp-flag ensures the audit_arch_vec[].flag constants do
	not conflict with syscall numbers.  If this test fails, then the number
	of syscalls grew high enough that the code for seccomp-filter needs to
	be updated.

	* tests/init.sh (test_prog_set): New function.
	* tests/status-none-f.c: New file.
	* tests/filter_seccomp.in: Likewise.
	* tests/filter_seccomp.sh: Likewise.
	* tests/filter_seccomp-perf.c: Likewise.
	* tests/filter_seccomp-flag.c: Likewise.
	* tests/filter_seccomp-perf.test: New test.
	* tests/Makefile.am (EXTRA_DIST): Add filter_seccomp.in and
	filter_seccomp.sh.
	(MISC_TESTS): Add filter_seccomp-perf.test.
	(check_PROGRAMS): Add filter_seccomp-perf and filter_seccomp-flag.
	* tests/pure_executables.list: Add status-none-f.
	* tests/.gitignore: Add status-none-f, filter_seccomp-perf, and
	filter_seccomp-flag.
	* tests/gen_tests.in (filter_seccomp, filter_seccomp-flag): New entries.

	Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>

2019-09-25  Paul Chaignon  <paul.chaignon@gmail.com>

	filter_seccomp: skip seccomp setup when there's nothing to filter.
	If the trace_set set is complete (no syscalls are filtered), seccomp
	filtering is disabled.  This patch adds a new is_complete_set_array
	function to check whether all sets of a set array are complete.

	* number_set.c (is_complete_set_array): New function.
	* number_set.h (is_complete_set_array): New prototype.
	* filter_seccomp.c (check_seccomp_filter): Skip seccomp setup if there is
	nothing to filter.

2019-09-25  Chen Jingpiao  <chenjingpiao@gmail.com>
	    Paul Chaignon  <paul.chaignon@gmail.com>

	Introduce seccomp-assisted syscall filtering.
	With this patch, strace can rely on seccomp to only be stopped at syscalls
	of interest, instead of stopping at all syscalls.  The seccomp filtering
	of syscalls is opt-in only; it must be enabled with the --seccomp-bpf
	option.  Kernel support is first checked with check_seccomp_filter(),
	which also ensures the BPF program derived from the syscalls to filter
	is not larger than the kernel's limit.

	The --seccomp-bpf option implies -f, but a warning is emitted if -f is not
	explicitly specified.  Since a task's children inherit its seccomp
	filters, we want to ensure all children are also traced to avoid their
	syscalls failing with ENOSYS (cf. SECCOMP_RET_TRACE in seccomp man page).

	Fork/vfork/clone children of traced processes are marked as not having a
	seccomp filter until we receive a first seccomp-stop.  They are therefore
	stopped at every syscall entries and exits until that first seccomp-stop.

	The current BPF program implements a simple linear match of the syscall
	numbers.  Contiguous sequences of syscall numbers are however matched as
	an interval, with two instructions only.  The algorithm can be improved
	or replaced in the future without impacting user-observed behavior.

	The behavior of SECCOMP_RET_TRACE changed between Linux 4.7 and 4.8
	(cf. PTRACE_EVENT_SECCOMP in ptrace man page).  This patch supports both
	behaviors by checking the kernel's actual behavior before installing the
	seccomp filter.

	* filter_seccomp.c: New file.
	* filter_seccomp.h: New file.
	* Makefile.am (strace_SOURCES): Add filter_seccomp.c and
	filter_seccomp.h.
	* linux/aarch64/arch_defs_.h (PERSONALITY0_AUDIT_ARCH,
	PERSONALITY1_AUDIT_ARCH): Define for aarch64.
	* linux/powerpc64/arch_defs_.h (PERSONALITY0_AUDIT_ARCH,
	PERSONALITY1_AUDIT_ARCH): Likewise for powerpc64.
	* linux/s390x/arch_defs_.h (PERSONALITY0_AUDIT_ARCH,
	* linux/sparc64/arch_defs_.h (PERSONALITY0_AUDIT_ARCH,
	PERSONALITY1_AUDIT_ARCH): Likewise for sparc64.
	PERSONALITY1_AUDIT_ARCH): Likewise for s390x.
	* linux/tile/arch_defs_.h (PERSONALITY0_AUDIT_ARCH,
	PERSONALITY1_AUDIT_ARCH): Likewise for tile.
	* linux/x32/arch_defs_.h (PERSONALITY0_AUDIT_ARCH,
	PERSONALITY1_AUDIT_ARCH): Likewise for x32.
	* linux/x86_64/arch_defs_.h (PERSONALITY0_AUDIT_ARCH,
	PERSONALITY1_AUDIT_ARCH, PERSONALITY2_AUDIT_ARCH): Likewise for x86_64.
	* linux/ia64/arch_defs_.h (PERSONALITY0_AUDIT_ARCH): Likewise for IA64.
	* strace.c (usage): Document --seccomp-bpf option.
	(startup_child): Mark process has having seccomp filter.
	(exec_or_die): Initialize seccomp filtering if requested.
	(init): Handle --seccomp-bpf option and check that seccomp can be
	enabled.
	(print_debug_info): Handle PTRACE_EVENT_SECCOMP.
	(next_event): Capture PTRACE_EVENT_SECCOMP event.
	(dispatch_event): Handle PTRACE_EVENT_SECCOMP event.
	* trace_event.h (trace_event): New enumeration entity.
	* strace.1.in: Document new --seccomp-bpf option.
	* NEWS: Mention this change.

	Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>

2019-09-25  Dmitry V. Levin  <ldv@altlinux.org>

	Add support for long options.
	Recognize --help and --version options as aliases to -h and -V options,
	respectively.

	* strace.c: Include <getopt.h>.
	(init): Move short options to optstring, add longopts array, use
	getopt_long instead of getopt.
	(usage): Document --help and --version options.
	* strace.1.in: Likewise.
	* tests/strace-V.test: Check that "strace --version" output is the same
	as "strace -V" output.

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Handle xlat verbosity in evdev bitset printing.
	* defs.h (print_xint32_array_member, print_xint64_array_member): New
	function declarations.
	(print_xlong_array_member): New static inline function.
	* util.c (print_xint32_array_member, print_xint64_array_member): New
	functions.
	* evdev.c (decode_bitset): Handle xlat verbosity option.
	* tests/ioctl_evdev-Xabbrev.c: New file.
	* tests/ioctl_evdev-Xraw.c: Likewise.
	* tests/ioctl_evdev-Xverbose.c: Likewise.
	* tests/ioctl_evdev-success-Xabbrev.c: Likewise.
	* tests/ioctl_evdev-success-Xraw.c: Likewise.
	* tests/ioctl_evdev-success-Xverbose.c: Likewise.
	* tests/ioctl_evdev-success-v-Xabbrev.c: Likewise.
	* tests/ioctl_evdev-success-v-Xraw.c: Likewise.
	* tests/ioctl_evdev-success-v-Xverbose.c: Likewise.
	* tests/ioctl_evdev-v-Xabbrev.c: Likewise.
	* tests/ioctl_evdev-v-Xraw.c: Likewise.
	* tests/ioctl_evdev-v-Xverbose.c: Likewise.
	* tests/ioctl_evdev-success.c (test_evdev, print_getbit, main): Update
	expected output.
	* tests/ioctl_evdev.c (UNK_CMD): New macro.
	(print_ffe_common, main): Update expected output.
	* tests/Makefile.am (check_PROGRAMS): Add ioctl_evdev-success-Xabbrev,
	ioctl_evdev-success-Xraw, ioctl_evdev-success-Xverbose,
	ioctl_evdev-success-v-Xabbrev, ioctl_evdev-success-v-Xraw, and
	ioctl_evdev-success-v-Xverbose.
	* tests/gen_tests.in (ioctl_evdev-Xabbrev, ioctl_evdev-Xraw,
	ioctl_evdev-Xverbose, ioctl_evdev-v-Xabbrev, ioctl_evdev-v-Xraw,
	ioctl_evdev-v-Xverbose, ioctl_evdev-success-Xabbrev,
	ioctl_evdev-success-Xraw, ioctl_evdev-success-Xverbose,
	ioctl_evdev-success-v-Xabbrev, ioctl_evdev-success-v-Xraw,
	ioctl_evdev-success-v-Xverbose tests): New entries.
	(ioctl_evdev, ioctl_evdev-v): Add alignment option.
	* tests/pure_executables.list: Add ioctl_evdev-Xabbrev,
	ioctl_evdev-Xraw, ioctl_evdev-Xverbose, ioctl_evdev-v-Xabbrev,
	ioctl_evdev-v-Xraw, ioctl_evdev-v-Xverbose.
	* tests/.gitignore: Likewise.

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	ioctl: do not print comments twice in -Xverbose.
	Figure out whether the ioctl code is decoded inside a comment and adjust
	printflags/printxval calls accordingly.

	* ioctl.c (ioctl_print_code, evdev_decode_number): Add abbrev variable,
	set it to true if xlat style is not XLAT_STYLE_VERBOSE, do not provide
	dflt and set xlat style to XLAT_STYLE_ABBREV in printflags/printxval
	calls (that are now changed to printflags_ex/printxval_ex to accomodate
	the change).

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests/ioctl_evdev-success: rewrite ABS_MT check.
	Use null-terminating array instead of providing array size in the first
	element.

	* tests/ioctl_evdev-success.c (print_mtslots, main): Update
	mtslots_str/invalid_mtslot_str array usage.

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: add xlat verbosity support to printxval.
	* tests/Makefile.am (libtests_a_SOURCES): Remove printxval.c, add
	printxval-Xabbrev.c, printxval-Xraw.c, and printxval-Xverbose.c.
	(EXTRA_DIST): Add printxval.c.
	* tests/printxval.c [!XLAT_RAW] (lookup_xlat): New function.
	(printxval): Wrap in XLAT_NAME.
	(sprintxlat, sprintxval): New functions.
	* tests/printxval-Xabbrev.c: New file.
	* tests/printxval-Xraw.c: Likewise.
	* tests/printxval-Xverbose.c: Likewise.
	* tests/tests.h (printxval): Remove declaration.
	(printxval_abbrev, printxval_raw, printxval_verbose, sprintxlat_abbrev,
	sprintxlat_raw, sprintxlat_verbose, sprintxval_abbrev, sprintxval_raw,
	sprintxval_verbose): New declarations.
	(printxval, sprintxlat, sprintxval): New macros, defined based on values
	of XLAT_RAW amd XLAT_VERBOSE macros.
	* tests/ioprio.c: Simplify the printing code since printxval now has
	xlat verbosity support.

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests/tests.h: add XLAT_STR macro.
	XLAT_STR allows describing expected output succintly in some simple
	cases.

	* tests/tests.h (XLAT_STR): New macro.

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Add PAF_ARRAY_TRUNCATED flag for print_array_ex.
	PAF_ARRAY_TRUNCATED allows enforcing the fact that an array
	is truncated, which is useful for arrays in local memory that are known
	as being truncated.

	* defs.h (xlat_style_private_flag_bits): Add PAF_ARRAY_TRUNCATED_BIT.
	(xlat_style_private_flags): Add PAF_ARRAY_TRUNCATED.
	* util.c (print_array_ex): Handle PAF_ARRAY_TRUNCATED in flags.

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Add support for printing local arrays to print_array.
	* defs.h (print_array_ex): Describe parameters.
	(print_local_array): A wrapper for printing arrays in local memory
	via print_array_ex.
	* util.c (print_array_ex): Handle case of NULL tfetch_mem_func by
	printing elements of array in local memory pointed by start_addr
	parameter.

	tests: move ioctl_evdev-v binary to pure_executables.list.
	* tests/Makefile.am (check_PROGRAMS): Move ioctl_evdev-v ...
	* tests/pure_executables.list: ... here.

	tests: implement ioctl_evdev-success-v.test via ioctl_evdev-success.test
	* tests/ioctl_evdev-success-v.test: Remove.
	* tests/Makefile.am (DECODER_TESTS): Remove ioctl_evdev-success-v.test.
	* tests/gen_tests.in: Add ioctl_evdev-success-v as a wrapper for
	ioctl_evdev-success.test.
	* tests/ioctl_evdev-success.test: Save "$args" to $prog, increase -a
	parameter value to 26 columns, inject "$@" into run_strace arguments,
	call $prog instead of axplicit program name.

2019-09-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	riscv64: remove mpers support.
	There is no riscv32 Linux support in Linux mainline,
	and no compat support in riscv64 as well.

	* linux/riscv64/arch_defs_.h: Remove.
	* linux/riscv64/ioctls_arch1.h: Likewise.
	* linux/riscv64/ioctls_inc1.h: Likewise.
	* linux/riscv64/syscallent1.h: Likewise.
	* Makefile.am (EXTRA_DIST): Remove them.
	* configure.ac (st_MPERS([m32])): Remove riscv64.
	* strace.1.in (.SH "MULTIPLE PERSONALITY SUPPORT"): Remove RISC-V
	from the list.

	Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>

2019-09-23  Dmitry V. Levin  <ldv@altlinux.org>

	riscv: rename to riscv64.
	The only currently supported RISC-V architecture is the 64-bit RISC-V.
	As the generic name we use causes confusion [1], rename it to riscv64.

	[1] https://lists.strace.io/pipermail/strace-devel/2019-August/009057.html

	* Makefile.am (EXTRA_DIST): Rename linux/riscv to linux/riscv64.
	* configure.ac: Rename riscv to riscv64, RISCV to RISCV64.
	* linux/riscv: Rename to linux/riscv64.
	* riscv.c: Rename RISCV to RISCV64.
	* tests/options-syntax.test: Rename riscv to riscv64.
	* tests/qualify_personality.sh: Likewise.
	* tests/strace-V.test: Likewise.

2019-09-23  Eugene Syromyatnikov  <evgsyr@gmail.com>

	clone: implement clone3 syscall decoding.
	* configure.ac (AC_CHECK_HEADERS): Check for linux/sched.h presence.
	(AC_CHECK_TYPES): Check for struct clone_args in <linux/sched.h>.
	* clone.c: Include "print_fields.h".
	(struct strace_clone_args): New type.
	(print_nonzero_bytes): New function.
	(SYS_FUNC(clone3)): New decoder.
	* linux/syscallent-common.h ([BASE_NR + 435]): Wire up clone3.
	* NEWS: Mention this change.
	* tests/clone3.c: New file.
	* tests/clone3-Xabbrev.c: Likewise.
	* tests/clone3-Xraw.c: Likewise.
	* tests/clone3-Xverbose.c: Likewise.
	* tests/clone3-success.c: Likewise.
	* tests/clone3-success-Xabbrev.c: Likewise.
	* tests/clone3-success-Xraw.c: Likewise.
	* tests/clone3-success-Xverbose.c: Likewise.
	* tests/clone3-success.test: New test.
	* tests/Makefile.am (check_PROGRAMS): Add clone3-success,
	clone3-success-Xabbrev, clone3-success-Xraw, and
	clone3-success-Xverbose.
	(DECODER_TESTS): Add clone3-success.test.
	* tests/gen_tests.in (clone3, clone3-Xabbrev, clone3-Xraw,
	clone3-Xverbose, clone3-success-Xabbrev, clone3-success-Xraw,
	clone3-success-Xverbose): New entries.
	* tests/pure_executables.list: Add clone3, clone3-Xabbrev, clone3-Xraw,
	and clone3-Xverbose.
	* tests/.gitignore: Add clone3, clone3-Xabbrev, clone3-Xraw,
	clone3-Xverbose, clone3-success, clone3-success-Xabbrev,
	clone3-success-Xraw, and clone3-success-Xverbose.

	Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>

2019-09-23  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests/tests.h: add XLAT_KNOWN and XLAT_UNKNOWN macros.
	XLAT_KNOWN allows describing expected output succintly in some simple
	cases.

	* tests/tests.h (XLAT_KNOWN, XLAT_UNKNOWN): New macros, define based
	on values of XLAT_RAW and XLAT_VERBOSE macros.

2019-09-23  Dmitry V. Levin  <ldv@altlinux.org>

	tests: fix umovestr_cached.test when process_vm_readv is not implemented
	* tests/umovestr_cached.test: Run strace with -z option to filter out
	failing process_vm_readv invocations.

2019-09-23  Dmitry V. Levin  <ldv@altlinux.org>

	tests: disable umovestr_cached.test on ia64.
	ia64 invokes extra process_vm_readv syscalls to obtain syscall
	arguments, see linux/ia64/get_syscall_args.c for details.

	* tests/umovestr_cached.test [ $STRACE_ARCH == ia64 ]: Skip.

2019-09-15  Paul Chaignon  <paul.chaignon@gmail.com>

	tests: fix format warnings on x32.
	The type of __X32_SYSCALL_BIT changed from int to unsigned long by Linux
	kernel commit v5.3-rc1-1-g45e29d119e9923ff14dfb840e3482bef1667bbfb.
	Consequently, __NR_* macros are now defined to values of an unsigned long
	integer type on x32.

	tests/prctl-seccomp-filter-v.c (PRINT_ALLOW_SYSCALL, PRINT_DENY_SYSCALL):
	Fix format warning.
	tests/seccomp-filter-v.c (PRINT_ALLOW_SYSCALL, PRINT_DENY_SYSCALL):
	Likewise.

2019-09-15  Dmitry V. Levin  <ldv@altlinux.org>

	Implement memory caching for umove* functions.
	When the data to be fetched by vm_read_mem resides in a single memory
	page, fetch the whole page and cache it.  This implementation caches
	up to two memory pages.

	* defs.h (invalidate_umove_cache): New prototype.
	* strace.c (next_event): Call invalidate_umove_cache.
	* ucopy.c (cached_idx, cached_raddr): New static variables.
	(process_read_mem): New function.
	(vm_read_mem): Use them.  Implement fetched page caching.
	* tests/umovestr_cached.test: New test.
	* tests/Makefile.am (MISC_TESTS): Add umovestr_cached.test.
	* tests/umovestr_cached.c: New file.
	* tests/pure_executables.list: Add umovestr_cached.
	* tests/.gitignore: Likewise.

2019-09-10  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

	Update ioctl entries from linux v5.3.
	* linux/32/ioctls_inc_align16.h: Update from linux v5.3-rc8
	using ioctls_gen.sh.
	* linux/32/ioctls_inc_align32.h: Likewise.
	* linux/32/ioctls_inc_align64.h: Likewise.
	* linux/64/ioctls_inc.h: Likewise.
	* linux/x32/ioctls_inc0.h: Likewise.
	* linux/i386/ioctls_arch0.h: Likewise.
	* linux/s390/ioctls_arch0.h: Likewise.
	* linux/s390x/ioctls_arch0.h: Likewise.
	* linux/x86_64/ioctls_arch0.h: Likewise.
	* NEWS: Mention this.

	maint: update for linux v5.3-rc8.
	* maint/ioctls_sym.sh (x86_list): Add KVM_SET_PMU_EVENT_FILTER.

2019-09-08  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Rewrite printnum_{slong,ulong,ptr,kptr} using dispatch_{word,klong}size.
	* defs.h (printnum_long_int, printnum_addr_long_int, printnum_addr_klong_int):
	Remove declaration.
	(printnum_slong, printnum_ulong): Implement unconditionally using
	dispatch_wordsize and opt_wordsize for the last argument.
	(printnum_ptr): Implement unconditionally using dispatch_wordsize.
	(printnum_kptr): Implement unconditionally using dispatch_klongsize.
	* util.c (printnum_long_int, printnum_addr_long_int, printnum_addr_klong_int):
	Remove.

	defs.h: introduce {opt,dispatch}_{word,klong}size.
	* defs.h (set_personality, current_personality, current_wordsize,
	current_klongsize, max_addr, max_kaddr): Move upwards.
	(opt_wordsize): New macro, calls the first or the second argument
	depending on the word size.
	(dispatch_wordsize): New macro, calls the first or the second function
	with the rest of macro parameters as arguments depending on the word
	size.
	(opt_klongsize): New macro, calls the first or the second argument
	depending on the kernel long size.
	(dispatch_klongsize): New macro, calls the first or the second function
	with the rest of macro parameters as arguments depending on the kernel
	long size.

2019-09-04  Eugene Syromyatnikov  <evgsyr@gmail.com>

	s390: fix PRINT_UNKNOWN_TAIL_EX.
	In the conversion of PRINT_UNKNOWN_TAIL into PRINT_UNKNOWN_TAIL_EX
	the usage of sizeof(*(hdr_)) hasn't been replaced to (hdr_size_)
	in all places.  Offset calculation also had to be changed.

	* s390.c (PRINT_UNKNOWN_TAIL_EX): Fix addr and len arguments
	in is_filled and print_quoted_string calls.

	Fixes: v5.2-97-g210593c "s390: update sthyi decoder"
	Reported-by: Dan Horák <dan@danny.cz>
	Resolves: https://github.com/strace/strace/issues/108

2019-09-03  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: add comment about CLONE_DETACHED to clone_flags.in.
	It's ignored by kernel, but present in the UAPI header.

	* xlat/clone_flags.in: Add a comment about CLONE_DETACHED.

2019-09-03  Eugene Syromyatnikov  <evgsyr@gmail.com>

	clone: fix print_tls_arg on x86.
	When strace is built for (32-bit) x86, it has HAVE_STRUCT_USER_DESC
	and SUPPORTED_PERSONALITIES == 1, which led to execution of the both
	branches.  Simplify the logic by including the SUPPORTED_PERSONALITIES
	into the condition.

	* clone.c (print_tls_arg): Include SUPPORTED_PERSONALITIES into the "if"
	condition.

2019-09-01  Eugene Syromyatnikov  <evgsyr@gmail.com>

	s390: update sthyi decoder.
	Sync up with the description[1].

	[1] https://www.ibm.com/support/knowledgecenter/SSB27U_6.4.0/com.ibm.zvm.v640.hcpb4/hcpb4sth.htm

	* s390.c (struct sthyi_machine): Add fields reserved_1__, infmplnm;
	update comment for the infmval1 field; update the related static_assert.
	(struct sthyi_partition): Update infpflg1 comment; update infpval1
	comment; add infpplnm field; update the related static_assert.
	(struct sthyi_hypervisor): Update infyflg1 field comment; add
	infyinsf and infyautf fields; update the related static_assert.
	(CHECK_SIZE_EX): Rename from CHECK_SIZE; add min_size_ argument, check size_
	against it.
	(CHECK_SIZE): New macro, a wrapper for CHECK_SIZE_EX.
	(PRINT_UNKNOWN_TAIL_EX): Rename from PRINT_UNKNOWN_TAIL, add hdr_size_
	argument.
	(PRINT_UNKNOWN_TAIL): New macro, a wrapper for PRINT_UNKNOWN_TAIL_EX.
	(print_sthyi_machine): New local variable last_decoded; use
	CHECK_SIZE_EX instead of CHECK_SIZE to check against the initial value
	of last_decoded; decode reserved_1__ and infmplnm fields if the returned
	size indicates that they are present; use PRINT_UNKNOWN_TAIL_EX for
	printing structure's tail.
	(print_sthyi_partition): New local variable last_decoded; use
	CHECK_SIZE_EX instead of CHECK_SIZE to check against the initial value
	of last_decoded; decode infpplnm field if the returned size indicates
	that it is present; use PRINT_UNKNOWN_TAIL_EX for printing structure's
	tail.
	(print_funcs): New function.
	(print_sthyi_hypervisor): New local variable last_decoded; use
	CHECK_SIZE_EX instead of CHECK_SIZE to check against the initial value
	of last_decoded; update infyflg1 field decoding; decode infyinsf
	and infyautf fields if the returned size indicates that they
	are present; use PRINT_UNKNOWN_TAIL_EX for printing structure's tail.
	(s390_sthyi): Update specification URL.
	* tests/s390_sthyi.c: Update expected output.

2019-09-01  Eugene Syromyatnikov  <evgsyr@gmail.com>

	s390: replace structure size comments with static_assert's.
	* s390.c: Add static_assert statements for compile-time check of
	struct sthyi_hdr, struct sthyi_machine, struct sthyi_partition,
	struct sthyi_hypervisor, and struct sthyi_guest sizes.

2019-08-31  Dmitry V. Levin  <ldv@altlinux.org>

	tests: convert ksysent.test into a generated test.
	* tests/ksysent.test: Remove.
	* tests/Makefile.am (MISC_TESTS): Remove ksysent.test.
	* tests/gen_tests.in (ksysent): New entry.
	* ci/run-build-and-tests.sh: Replace ksysent.log with ksysent.gen.log.
	* strace.spec.in: Likewise.

2019-08-31  Paul Chaignon  <paul.chaignon@gmail.com>

	Add seccomp filter syscall flag.
	This commit adds a new syscall flag for syscall that are traced by default
	under seccomp filter.

	The syscallent changes can be reproduced with the following script:

	  git grep -l 'SEN(\(execv\|ipc\|socketcall\|ipc\)' |
	  xargs -r sed -i -e '/SEN(execv/ s/TP|/&TSD|/' \
	  -e '/SEN(ipc)/ s/TI/&|TSD/' -e '/SEN(socketcall)/ s/TD/&|TSD/' \
	  -e '/SEN(syscall)/ s/0,/TSD,/'

	* sysent.h (TRACE_SECCOMP_DEFAULT): Define new flag.
	* sysent_shorthand_defs.h (TSD): Define new flag shorthand.
	* linux/32/syscallent.h: Add TSD flag.
	* linux/64/syscallent.h: Likewise.
	* linux/alpha/syscallent.h: Likewise.
	* linux/arm/syscallent.h: Likewise.
	* linux/avr32/syscallent.h: Likewise.
	* linux/bfin/syscallent.h: Likewise.
	* linux/hppa/syscallent.h: Likewise.
	* linux/i386/syscallent.h: Likewise.
	* linux/ia64/syscallent.h: Likewise.
	* linux/m68k/syscallent.h: Likewise.
	* linux/microblaze/syscallent.h: Likewise.
	* linux/mips/syscallent-n32.h: Likewise.
	* linux/mips/syscallent-n64.h: Likewise.
	* linux/mips/syscallent-o32.h: Likewise.
	* linux/powerpc/syscallent.h: Likewise.
	* linux/powerpc64/syscallent.h: Likewise.
	* linux/s390/syscallent.h: Likewise.
	* linux/s390x/syscallent.h: Likewise.
	* linux/sh/syscallent.h: Likewise.
	* linux/sh64/syscallent.h: Likewise.
	* linux/sparc/syscallent.h: Likewise.
	* linux/sparc64/syscallent.h: Likewise.
	* linux/x32/syscallent.h: Likewise.
	* linux/x86_64/syscallent.h: Likewise.
	* linux/xtensa/syscallent.h: Likewise.

2019-08-29  Eugene Syromyatnikov  <evgsyr@gmail.com>

	strace.spec: lower CentOS version requirement for pkgconfig(bluez)
	bluez-libs-devel provides pkgconfig(bluez) and the actual headers both
	in RHEL 6 and RHEL 7, so the version condition for enablement
	of pkgconfig(bluez) in spec file can be lowered.  However, the package
	in question is in the "optional" repository in RHEL, and there seems to be
	no easy way to enable it in OBS (where this spec file is mainly used)
	so only %centos check is actually changed for now.

	* strace.spec.in: Change "0%{?centos} >= 8" to "0%{?centos} >= 6"
	for "BuildRequires: pkgconfig(bluez)" enablement.

	References: https://bugzilla.redhat.com/show_bug.cgi?id=1746885

2019-08-29  Eugene Syromyatnikov  <evgsyr@gmail.com>

	sockaddr: properly decode sockaddr_hci addresses without hci_channel.
	Before Linux commit v2.6.38-rc1~476^2~14^2~3^2~43^2~9,
	struct sockaddr_hci did not contain hci_channel field.

	* configure.ac (AC_CHECK_HEADERS([bluetooth/bluetooth.h])): Add check
	for struct sockaddr_hci.hci_channel.
	* sockaddr.c (print_sockaddr_data_bt): Decode struct sockaddr_hci
	without hci_channel field.
	* tests/net-sockaddr.c (check_hci): Add check for struct sockaddr_hci
	decoding without hci_channel field; guard hci_channel with #ifdef
	HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL.
	(check_raw): Remove "len++", as 4-byte AF_BLUETOOTH socket addresses are
	interpreted as struct sockaddr_hci without hci_channel field.

2019-08-27  Eugene Syromyatnikov  <evgsyr@gmail.com>

	strace.1.in: try to be more clear with -e trace=class deprecation notice
	It was reported that the current way of labelling of the percent-less
	-e trace=class syntax variant may be confusing, as it can be read
	as deprecation of the whole option and not specific syntax; try to be
	more clear by moving the deprecation notices into the option
	descriptions.

	* strace.1.in (.SS Filtering): Move the deprecation notice
	of -e trace={file,process,network,signal,ipc,desc,memory} syntax
	to the descriptions of the respective options.

	Reported-by: Alexey Gladkov <gladkov.alexey@gmail.com>

2019-08-26  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: normalise fsmagic formatting.
	For historical reasons, it was this way as there was no support for
	explicitly defined xlat values, which is no longer the case.

	The following command was used:

	    sed -ri \
	        -e 's/^\{ ([^]*),[[:space:]]*"([^"]*)"([[:space:]]*)\},$/\2\3\1/' \
	        -e 's/^([^\t]{14,15}\t)/\1\t/' \
	        xlat/fsmagic.in

	* xlat/fsmagic.in: Normalise the formatting.

2019-08-23  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>

	Add support for /dev/watchdog ioctls.
	* watchdog_ioctl.c: New file.
	* Makefile.am (strace_SOURCES): Add it.
	* defs.h (DECL_IOCTL): Add watchdog.
	* ioctl.c (ioctl_decode): Add 'W' case.
	* xlat/watchdog_ioctl_cmds.in: New file.
	* tests/ioctl_watchdog.c: New file.
	* tests/.gitignore: Add ioctl_watchdog.
	* tests/pure_executables.list: Likewise.
	* tests/gen_tests.in (ioctl_watchdog): New entry.

2019-08-16  Dmitry V. Levin  <ldv@altlinux.org>

	umoven: use error_func_msg instead of error_msg.
	* ucopy.c (umoven): Use error_func_msg instead of error_msg.

2019-08-15  Dmitry V. Levin  <ldv@altlinux.org>

	Use perror_func_msg instead of perror_msg where appropriate.
	* linux/aarch64/set_scno.c (arch_set_scno): Use perror_func_msg
	instead of perror_msg.
	* ucopy.c (umoven_peekdata, umoven, umovestr_peekdata, umovestr):
	Likewise.
	* upeek.c (upeek): Likewise.
	* upoke.c (upoke): Likewise.

2019-08-15  Dmitry V. Levin  <ldv@altlinux.org>

	Fix syscall tampering when PTRACE_GET_SYSCALL_INFO is in use on some architectures
	When PTRACE_GET_SYSCALL_INFO is in use on those architectures
	that invoke set_regs in arch_set_scno, get_regs is not called,
	so it has to be invoked explicitly before tampering.

	* linux/arc/set_scno.c (arch_set_scno): Explicitly call get_regs
	when PTRACE_GET_SYSCALL_INFO is in use.
	* linux/avr32/set_scno.c: Likewise.
	* linux/csky/set_scno.c: Likewise.
	* linux/ia64/set_scno.c: Likewise.
	* linux/m68k/set_scno.c: Likewise.
	* linux/metag/set_scno.c: Likewise.
	* linux/mips/set_scno.c: Likewise.
	* linux/nios2/set_scno.c: Likewise.
	* linux/or1k/set_scno.c: Likewise.
	* linux/riscv/set_scno.c: Likewise.
	* linux/s390/set_scno.c: Likewise.
	* linux/sparc/set_scno.c: Likewise.
	* linux/tile/set_scno.c: Likewise.
	* NEWS: Mention this fix.

	Thanks-to: Anatoly Pugachev <matorola@gmail.com>
	Fixes: v5.2~27 "sparc, sparc64: fix syscall tampering when PTRACE_GET_SYSCALL_INFO is in use"

2019-08-15  Dmitry V. Levin  <ldv@altlinux.org>

	sparc, sparc64: fix redundant get_regs invocation.
	An explicit get_regs invocation was added to arch_set_error and
	arch_set_success on sparc/sparc64 by commit v5.2~27 in attempt to fix
	syscall tampering on these architectures when PTRACE_GET_SYSCALL_INFO
	is in use.

	That change, however, did not fix the bug because set_error and
	set_success already invoke get_regs on all architectures where
	ptrace_setregset_or_setregs is defined, this includes sparc and sparc64.

	* linux/sparc/set_error.c (sparc_set_o0_psr): Do not invoke get_regs.
	* linux/sparc64/set_error.c (sparc64_set_o0_tstate): Likewise.
	* NEWS (5.2): Remove the statement about syscall tampering fix
	on sparc and sparc64 when PTRACE_GET_SYSCALL_INFO is in use.

2019-08-15  Eugene Syromyatnikov  <evgsyr@gmail.com>

	v4l2: avoid shifting left a signed number by 31 bit.
	cppcheck warns about it with the following diagnostics:

	    error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is
	    undefined behaviour

	* v4l2.c [!v4l2_fourcc_be] (v4l2_fourcc_be): Shift left 1U and not 1 in
	order to get 0x80000000.

2019-08-15  Eugene Syromyatnikov  <evgsyr@gmail.com>

	strace.spec.in: use SPDX shortname format in License: tag.
	Otherwise some rpm lintians complain about it:

	    strace.src: W: invalid-license LGPL-2.1-or-later
	    strace.src: W: invalid-license GPL-2.0-or-later

	* strace.spec.in (License): Change license description from
	"LGPL-2.1-or-later and GPL-2.0-or-later" to "LGPL-2.1+ and GPL-2.0+".

2019-08-15  Dmitry V. Levin  <ldv@altlinux.org>

	Implement decoding of pidfd_open syscall.
	... introduced by Linux kernel commits v5.3-rc1~142^2~2
	and v5.3-rc1~142^2~1.

	* pidfd_open.c: New file.
	* Makefile.am (strace_SOURCES): Add it.
	* pathtrace.c (pathtrace_match_set): Add SEN_pidfd_open.
	* linux/syscallent-common.h [BASE_NR + 434]: Wire up pidfd_open.
	* NEWS: Mention this change.
	* tests/pidfd_open.c: New file.
	* tests/pidfd_open-P.c: Likewise.
	* tests/pidfd_open-y.c: Likewise.
	* tests/gen_tests.in (pidfd_open, pidfd_open-P, pidfd_open-y): New
	entries.
	* tests/pure_executables.list: Add pidfd_open, pidfd_open-P, and
	pidfd_open-y.
	* tests/.gitignore: Likewise.

2019-08-14  Dmitry V. Levin  <ldv@altlinux.org>

	xlat/gen.sh: remove #stop support.
	There are no users of #stop directive anymore.

	* xlat/gen.sh (gen_header): Remove '#stop' support.

2019-08-14  Dmitry V. Levin  <ldv@altlinux.org>

	xlat/skf_off: use XLAT_MACROS_ONLY instead of #stop.
	* xlat/skf_off.in: Remove #stop.
	* bpf_sock_filter.c: Wrap "xlat/skf_off.h" inclusion in XLAT_MACROS_ONLY.

	xlat/scsi_sg_commands: use XLAT_MACROS_ONLY instead of #stop.
	* xlat/scsi_sg_commands.in: Remove #stop.
	* scsi.c: Wrap "xlat/scsi_sg_commands.h" inclusion in XLAT_MACROS_ONLY.
	* tests/ioctl_scsi.c: Likewise.
	* tests/ioctl_sg_io_v4.c: Likewise.

2019-08-14  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: mark as value indexed those files that meet certain criteria.
	Automatically prepend #value_indexed using the following script:

	for f in xlat/*.in; do
		awk -n 'BEGINFILE {if (FILENAME ~ /flag/) exit 1; nr=0}
			(nr == 0 && $1 ~ /^#/) {exit 1}
			$1 !~ /^[A-Z_0-9]/ {next}
			NF < 2 || $2 !~ /^[0-9]/ || ($2 - nr != 0 && $2 - nr != 1) {exit 1}
			{nr++}
			ENDFILE {if (nr < 2) exit 1}' "$f" &&
		sed -i '1i#value_indexed' "$f"
	done

	* xlat/blkpg_ops.in: Prepend #value_indexed.
	* xlat/btrfs_balance_ctl_cmds.in: Likewise.
	* xlat/btrfs_compress_types.in: Likewise.
	* xlat/btrfs_cont_reading_from_srcdev_mode.in: Likewise.
	* xlat/crypto_nl_attrs.in: Likewise.
	* xlat/dcb_commands.in: Likewise.
	* xlat/epollctls.in: Likewise.
	* xlat/f_owner_types.in: Likewise.
	* xlat/fib_rule_actions.in: Likewise.
	* xlat/futexwakecmps.in: Likewise.
	* xlat/futexwakeops.in: Likewise.
	* xlat/ioprio_class.in: Likewise.
	* xlat/ioprio_who.in: Likewise.
	* xlat/kcmp_types.in: Likewise.
	* xlat/keyctl_commands.in: Likewise.
	* xlat/lwtunnel_encap_types.in: Likewise.
	* xlat/mpol_modes.in: Likewise.
	* xlat/multicast_router_types.in: Likewise.
	* xlat/netfilter_versions.in: Likewise.
	* xlat/netlink_protocols.in: Likewise.
	* xlat/netlink_types.in: Likewise.
	* xlat/nf_acct_msg_types.in: Likewise.
	* xlat/nf_cthelper_msg_types.in: Likewise.
	* xlat/nf_ctnetlink_exp_msg_types.in: Likewise.
	* xlat/nf_ctnetlink_msg_types.in: Likewise.
	* xlat/nf_cttimeout_msg_types.in: Likewise.
	* xlat/nf_ipset_msg_types.in: Likewise.
	* xlat/nf_nftables_msg_types.in: Likewise.
	* xlat/nf_osf_msg_types.in: Likewise.
	* xlat/nf_queue_msg_types.in: Likewise.
	* xlat/nf_ulog_msg_types.in: Likewise.
	* xlat/nl_netfilter_subsys_ids.in: Likewise.
	* xlat/nlmsgerr_attrs.in: Likewise.
	* xlat/pr_cap_ambient.in: Likewise.
	* xlat/pr_dumpable.in: Likewise.
	* xlat/pr_mce_kill.in: Likewise.
	* xlat/pr_mce_kill_policy.in: Likewise.
	* xlat/pr_set_mm.in: Likewise.
	* xlat/pr_tsc.in: Likewise.
	* xlat/quota_formats.in: Likewise.
	* xlat/quotatypes.in: Likewise.
	* xlat/routing_types.in: Likewise.
	* xlat/rtnl_addr_attrs.in: Likewise.
	* xlat/rtnl_addrlabel_attrs.in: Likewise.
	* xlat/rtnl_dcb_attrs.in: Likewise.
	* xlat/rtnl_ifla_brport_attrs.in: Likewise.
	* xlat/rtnl_ifla_events.in: Likewise.
	* xlat/rtnl_ifla_info_attrs.in: Likewise.
	* xlat/rtnl_ifla_port_attrs.in: Likewise.
	* xlat/rtnl_ifla_vf_port_attrs.in: Likewise.
	* xlat/rtnl_ifla_xdp_attrs.in: Likewise.
	* xlat/rtnl_link_attrs.in: Likewise.
	* xlat/rtnl_mdb_attrs.in: Likewise.
	* xlat/rtnl_mdba_mdb_attrs.in: Likewise.
	* xlat/rtnl_mdba_mdb_eattr_attrs.in: Likewise.
	* xlat/rtnl_mdba_mdb_entry_attrs.in: Likewise.
	* xlat/rtnl_mdba_router_attrs.in: Likewise.
	* xlat/rtnl_mdba_router_pattr_attrs.in: Likewise.
	* xlat/rtnl_neigh_attrs.in: Likewise.
	* xlat/rtnl_neightbl_attrs.in: Likewise.
	* xlat/rtnl_neightbl_parms_attrs.in: Likewise.
	* xlat/rtnl_netconf_attrs.in: Likewise.
	* xlat/rtnl_route_attrs.in: Likewise.
	* xlat/rtnl_rta_metrics_attrs.in: Likewise.
	* xlat/rtnl_rule_attrs.in: Likewise.
	* xlat/rtnl_tc_action_attrs.in: Likewise.
	* xlat/rtnl_tc_attrs.in: Likewise.
	* xlat/rtnl_tca_stab_attrs.in: Likewise.
	* xlat/rtnl_tca_stats_attrs.in: Likewise.
	* xlat/s390_guarded_storage_commands.in: Likewise.
	* xlat/s390_runtime_instr_commands.in: Likewise.
	* xlat/seccomp_mode.in: Likewise.
	* xlat/seccomp_ops.in: Likewise.
	* xlat/shutdown_modes.in: Likewise.
	* xlat/sigchld_codes.in: Likewise.
	* xlat/sigev_value.in: Likewise.
	* xlat/sigpoll_codes.in: Likewise.
	* xlat/smc_link_group_roles.in: Likewise.
	* xlat/sock_netlink_options.in: Likewise.
	* xlat/sock_pnp_options.in: Likewise.
	* xlat/sock_tls_options.in: Likewise.
	* xlat/socketcalls.in: Likewise.
	* xlat/tcp_states.in: Likewise.
	* xlat/uring_register_opcodes.in: Likewise.
	* tests/socketcall.c (main): Update assertion.

2019-08-14  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Replace direct usage of err_name/errnoent with print_err.
	Introduce print_err function that prints error number respecting current
	xlat verbosity settings, and switch err_name/errnoent callers to use
	this new function instead.

	* defs.h (err_name): Remove.
	(print_err): New declaration.
	* print_fields.h (PRINT_FIELD_ERR_D, PRINT_FIELD_ERR_U): New macros.
	* syscall.c (err_name): Add static qualifier, change argument type
	to uint64_t.
	(print_err): New function.
	* keyctl.c (keyctl_reject_key): Use print_err for printing error
	argument.
	* net.c (print_get_error): Use print_err for printing err.
	* numa.c (print_status): Use print_err for printing errno.
	* netlink.c: Include "print_fields.h".
	(decode_nlmsgerr): Use PRINT_FIELD_ERR_D for printing errno field.
	* printsiginfo.c: Include "print_fields.h".
	(print_si_info): Use PRINT_FIELD_ERR_U for printing si_errno field.
	* ptrace_syscall_info.c (print_ptrace_syscall_info): Use
	PRINT_FIELD_ERR_D for printing info.exit.rval.
	* tests/pidfd_send_signal.c (main): Update expected output.
	* tests/ptrace.c (main): Likewise.

	Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>

2019-08-13  Dmitry V. Levin  <ldv@altlinux.org>

	netlink_unix_diag: implement UDIAG_SHOW_UID/UNIX_DIAG_UID decoding.
	... introduced by Linux kernel commit v5.3-rc1~140^2~467.

	* linux/unix_diag.h (UDIAG_SHOW_UID, UNIX_DIAG_FIRST_UNUSED): New macro
	constants.
	(UNIX_DIAG_UID): New enum constant.
	* xlat/unix_diag_attrs.in: Add UNIX_DIAG_UID.
	* xlat/unix_diag_show.in: Add UDIAG_SHOW_UID.
	* netlink_unix_diag.c (unix_diag_msg_nla_decoders): Handle
	UNIX_DIAG_UID.
	* NEWS: Mention this.
	* tests/nlattr.c (test_nlattr, test_nla_type): Replace
	UNIX_DIAG_SHUTDOWN + 1 with UNIX_DIAG_FIRST_UNUSED.

2019-08-13  Eugene Syromyatnikov  <evgsyr@gmail.com>

	netlink_route: implement RTM_{NEW,DEL,GET}CHAIN decoding.
	* xlat/nl_route_types.in (RTM_NEWCHAIN, RTM_DELCHAIN, RTM_GETCHAIN): New
	constants introduced by Linux kernel commit v4.19-rc1~140^2~279^2~9.
	* netlink_route.c (route_decoders) <[RTM_NEWCHAIN - RTM_BASE],
	[RTM_DELCHAIN - RTM_BASE], [RTM_GETCHAIN - RTM_BASE]>: Invoke
	decode_tcmsg.
	* NEWS: Mention this.

2019-08-13  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: update TCP_* constants.
	* xlat/sock_tcp_options.in (TCP_TX_DELAY): New constant introduced
	by Linux kernel commit v5.3-rc1~140^2~269.
	* NEWS: Mention this.

	xlat: update *_MAGIC constants.
	* xlat/fsmagic.in (Z3FOLD_MAGIC): New constant introduced
	by Linux kernel commit v5.3-rc1~31^2~30.
	(DMA_BUF_MAGIC): New constant introduced by Linux kernel commit
	v5.3-rc1~22^2~20^2~42.
	* NEWS: Mention this.

	xlat: update KVM_CAP_* constants.
	* xlat/kvm_cap.in (KVM_CAP_PMU_EVENT_FILTER): New constant introduced
	by Linux kernel commit v5.3-rc1~115^2~5.
	* NEWS: Mention this.

	xlat: update KEYCTL_* constants.
	* xlat/keyctl_commands.in (KEYCTL_PKEY_QUERY, KEYCTL_PKEY_ENCRYPT,
	KEYCTL_PKEY_DECRYPT, KEYCTL_PKEY_SIGN, KEYCTL_PKEY_VERIFY): New
	constants introduced by Linux kernel commit v4.20-rc1~29^2~20.
	(KEYCTL_MOVE): New constant introduced by Linux kernel commit
	v5.3-rc1~189^2~3.
	(KEYCTL_CAPABILITIES): New constant introduced by Linux kernel commit
	v5.3-rc1~189^2.
	* NEWS: Mention this.

	xlat: update BPF_* constants.
	* xlat/bpf_attach_type.in (BPF_CGROUP_GETSOCKOPT,
	BPF_CGROUP_SETSOCKOPT): New constants introduced by Linux kernel commit
	v5.3-rc1~140^2~65^2~8^2~8.
	* xlat/bpf_prog_flags.in (BPF_F_TEST_RND_HI32): New constant
	introduced by Linux kernel commit v5.3-rc1~140^2~371^2~28^2~12.
	* xlat/bpf_prog_types.in (BPF_PROG_TYPE_CGROUP_SOCKOPT): New constant
	introduced by Linux kernel commit v5.3-rc1~140^2~65^2~8^2~8.
	* NEWS: Mention this.
	* tests/bpf.c (print_BPF_PROG_LOAD_attr3, print_BPF_PROG_LOAD_attr4,
	BPF_PROG_LOAD_checks, BPF_PROG_QUERY_checks): Update expected output.
	* tests/kernel_version.c (print_bpf_attr, main): Likewise.

	xlat: update XDP_* constants.
	* xlat/sock_xdp_options.in (XDP_OPTIONS): New constant introduced
	by Linux kernel commit v5.3-rc1~140^2~65^2~9^2~13.

	xlat: update ETH_* constants.
	* xlat/ethernet_protocols.in (ETH_P_LLDP): New constant introduced
	by Linux kernel commit v5.3-rc1~140^2~329^2~6.

2019-08-11  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: update SO_* constants.
	* xlat/sock_options.in (SO_BINDTOIFINDEX): New constant introduced
	by Linux commit v5.1-rc1~178^2~508.
	(SO_RCVTIMEO_NEW, SO_SNDTIMEO_NEW): New constants introduced by Linux
	commit v5.1-rc1~178^2~363^2.
	(SO_DETACH_REUSEPORT_BPF): New constant introduced by Linux commit
	v5.3-rc1~140^2~179^2~12.

	* xlat/setsock_options.in: Regenerate using maint/gen_xlat_defs.sh.

2019-08-11  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: provide fallback definition for MAP_UNINITIALIZED.
	Linux commit v5.3-rc1~65^2~86 fixed the definition of MAP_UNINITIALIZED
	flag that used to depend on CONFIG_MMAP_ALLOW_UNINITIALIZED.

	* xlat/mmap_flags.in (MAP_UNINITIALIZED): Add fallback definition.

2019-08-08  Eugene Syromyatnikov  <evgsyr@gmail.com>

	count: add ability to sort on errors field.
	For completeness.

	* count.c (error_cmp): New function.
	(set_sortby): Add sort keys for errors field.
	* strace.1.in (.SH OPTIONS) <-S>: Document it.
	* strace.c (usage): Likewise.
	* tests/strace-S.test: Check it.

	Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>

2019-08-06  Eugene Syromyatnikov  <evgsyr@gmail.com>

