2021-09-02  Dmitry V. Levin  <ldv@strace.io>

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

2021-09-01  Dmitry V. Levin  <ldv@strace.io>

	ci: use kernel headers from Linux kernel v5.14.
	When Linux kernel merge window opens, changes of all sorts start to pour
	down, breaking UAPI in various ways.  This does not work for strace,
	we need a stable UAPI.

	This change repeats commit v5.8~1.

	* .github/workflows/ci.yml (env): Add KBRANCH.
	* .gitlab-ci.yml (variables): Likewise.
	* .travis.yml (env:global): Likewise.

2021-08-31  Dmitry V. Levin  <ldv@strace.io>

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

2021-08-30  Dmitry V. Levin  <ldv@strace.io>

	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:]]' src tests |grep -v '\.sh$') |while read f; do
		cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
	done

2021-08-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: reduce thoroughness of qual_fault's when= check.
	The addition of the third inner loop to qual_fault test has pushed
	the test's execution time to the hight tens of seconds even on machines
	with fast fork/exec.  Let's reduce its thoroughness a bit by reducing
	the number of variants of first/last/step values being checked from six
	down to four;  that should decrease the number of check_fault_injection
	calls from 3040 down to 1200, a circa two-and-a-half-fold reduction.

	* tests/qual_fault.test: Remove two elements from each of the iteration
	lists for F, L, and S variables.

2021-08-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Call get_proc_pid instead of translate_pid where only proc_pid is needed
	That makes the code a bit simpler.

	* src/pathtrace.c (getfdpath_pid): Assign get_proc_pid result
	to proc_pid instead of passing the latter to the translate_pid call.
	* src/secontext.c (selinux_getpidcon, selinux_getfdcon,
	selinux_getfilecon): Likewise.

2021-08-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Pass PID instead of TCB pointer to get_proc_pid.
	This allows its use for use cases where we do not have TCB setup
	for a PID to get /proc name for.

	* src/defs.h (get_proc_pid): Accept pid instead of tcp.
	* src/pidns.c (get_proc_pid): Accept pid instead of tcp, pass pid
	instead of tcp->pid to the translate_pid call.
	* src/mmap_cache.c (mmap_cache_rebuild_if_invalid): Pass tcp->pid
	instead of tcp to the get_proc_pid call.
	* src/strace.c (attach_tcb): Likewise.
	* src/util.c (getfdproto): Likewise.

2021-08-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	util, pidns: generalise get_id_list.
	The parsing code implemented in it can be easily utilised for reading
	other /proc/pid/status fields (Uid/Gid, for example), so let's move it
	to util.c and make more generic.

	* src/defs.h (proc_status_get_id_list): New declaration.
	* src/util.c (proc_status_get_id_list): New function.
	* src/pidns.c (get_id_list): Implement as a proc_status_get_id_list
	wrapper.

2021-08-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	strace: make ptrace_attach_cmd local.
	Returning information from a function via a global variable is rather
	distasteful;  moreover, wasting a pointer worth of memory for a variable
	used for error reporting is quite wasteful.

	* src/strace.c (ptrace_attach_cmd): Remove.
	(ptrace_attach_or_seize): Add ptrace_attach_cmd argument, assign cmd
	string literal to a pointer pointed by it.
	(attach_tcb, startup_child): Add ptrace_attach_cmd local variable,
	pass it to ptrace_attach_or_seize.

2021-08-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: add prlimit64-success and prlimit64-success--pidns-translation.
	These may be useful in cases where prlimit64 syscall is not available.

	* tests/.gitignore: Add prlimit64-success
	and prlimit64-success--pidns-translation.
	* tests/Makefile.am (check_PROGRAMS): Likewise.
	* tests/gen_tests.in (prlimit64-success,
	prlimit64-success--pidns-translation): New tests.
	* tests/prlimit64-success--pidns-translation.c: New file.
	* tests/prlimit64-success.c: Likewise.
	* tests/prlimit64.c: Update to accomodate output when return value
	is injected.

2021-08-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	filter_qualify: fix indentation in check_inadvertent_fault_injection.
	* src/filter_qualify.c (check_inadvertent_fault_injection): De-indent.

	Complements: v5.13-74-gb0dc9a1b3 "filter_qualify: factor out inadvertent fault injection check routine"

2021-08-25  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

	Update ioctl entries from linux v5.14.
	* src/linux/32/ioctls_inc_align16.h: Update from linux
	v5.14-rc7-11-g6e764bcd1cf7 using ioctls_gen.sh.
	* src/linux/32/ioctls_inc_align32.h: Likewise.
	* src/linux/32/ioctls_inc_align64.h: Likewise.
	* src/linux/64/ioctls_inc.h: Likewise.
	* src/linux/x32/ioctls_inc0.h: Likewise.

2021-08-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: call setsockopt directly in sockopt-timestamp.
	While commit v5.13-10-g0211fdc "tests: change sockopt-timestamp test to
	use syscall(__NR_recvmsg)" has fixed issues with glibc-induced mangling
	on newer kernels, the combination of an older kernel and new glibc still
	causes issues, as glibc silently falls back to SO_TIMESTAMP{,NS}_OLD,
	as implemented in glibc-2.34~294 "linux: Add fallback for 64-bit time_t
	SO_TIMESTAMP{NS}".  Avoid that by calling setsockopt directly as well.

	* tests/sockopt-timestamp.c (SC_setsockopt): New macro constant.
	(k_setsockopt): New function.
	(test_sockopt): Call k_setsockopt instead of setsockopt.

	Complements: v5.13-10-g0211fdc "tests: change sockopt-timestamp test to use syscall(__NR_recvmsg)"

2021-08-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	filter_qualify: factor out inadvertent fault injection check routine.
	Move out a rather finicky inadvertent fault injection check
	in an attempt to make the humongous parse_inject_token function
	a bit more comprehensible.

	* src/filter_qualify.c (check_inadvertent_fault_injection): New
	function, factored out from...
	(parse_inject_token): ...here.  Call check_inadvertent_fault_injection.

2021-08-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	src/unwind.c: avoid including libiberty.h.
	libiberty.h header that is pulled in by demangle.h is troublesome:
	it defines some macros and symbols that are also defined in strace's
	headers;  since the definitions from there are not actually needed
	by neither unwind.c nor demangle.h, let's try to avoid its inclusion
	by defining its header guard.

	* src/unwind.c [USE_DEMANGLE] (LIBIBERTY_H): Define.

2021-08-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	defs.h: fix whitespace alignment for INJECT_F_SIGNAL and INJECT_F_RETVAL
	* src/defs.h (INJECT_F_SIGNAL, INJECT_F_RETVAL): Fix spacing between
	the name and the value to align with other declarations.

	Complements: v5.0~98 "Fix preprocessor indentation"

2021-08-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	doc/strace.1.in: rewrite simultaneous signal and retval/error injection part
	It might as well be a bit clearer this way.

	* doc/strace.1.in (.SS Tampering): Rewrite description of the behaviour
	when both signal and retval/error injection are employed.

2021-08-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	src: use xobjdup/xarraydup.
	* src/mmap_cache.c (mmap_cache_rebuild_if_invalid): Use xobjdup to
	duplicate mmap cache.
	* src/sg_io_v3.c (decode_request): Use xobjdup to copy sg_io
	into entering_sq_io.
	* src/sg_io_v4.c (decode_request): Likewise.
	* src/strace.c (copy_trace_wait_data): Use xopbjdup to duplicate wd.
	* src/syscall.c (tamper_with_syscall_entering): Use xarraydup
	to duplicate inject_vec.

2021-08-24  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xmalloc: add xmemdup and xarraydup utility functions.
	There are multiple instances of using pair of x*alloc and memcpy calls
	to duplicate an entity;  sometimes they even utilise xcalloc and perform
	unnecessary zeroing of the memory.  Implement a separate routine
	that allows more compact code.

	* src/xmalloc.h (xmemdup, xarraydup): New declarations.
	(xobjdup): New macro, a wrapper for xmemdup.
	* src/xmalloc.c (xmemdup, xarraydup): New functions.

2021-08-22  Eugene Syromyatnikov  <evgsyr@gmail.com>

	syscall: use xallocarray instead of xcalloc for an array to be copied over
	* src/syscall.c (tamper_with_syscall_entering): Allocate
	tcp->inject_vec[current_personality] with xallocarray
	instead of xcalloc, as it is to be overwritten by memcpy.

	doc/strace.1.in: mention poke_enter/poke_exit as valid inject actions.
	* doc/strace.1.in (.SS Tampering): Add poke_enter and poke_exit
	to the list of actions of which at least one hast to be specified.

2021-08-22  Eugene Syromyatnikov  <evgsyr@gmail.com>

	trie: optimise fill_value calculation.
	A closer look at the fill_value calculation code revealed that it
	was not implemented in an expected way: instead of doubling the shift
	and bitwise-OR'ing with itself, it bitwise-OR's with the original value,
	which led to 64/item_size iterations instead of 6 - item_size_lg;
	so, let's prematurely optimise this code further.

	* src/trie.c (trie_create): Rewrite fill_value field calculation.

2021-08-20  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tee: rewrite num_params access in tee_fetch_buf_data.
	Pointer to num_params field of the fetched structure is passed in a
	separate function argument which provokes covscan complaints about
	uninitialised accesses and also tingles my aliasing rules senses.
	Rewrite to access it via the arg_struct argument which is fetched
	earlier in the function flow.

	* src/tee.c (TEE_FETCH_BUF_DATA): Change &arg_.num_params
	to offsetof(typeof(arg_), num_params).
	(tee_fetch_buf_data): Accept offset of the num_params field instead
	of pointer to it; reconstruct the num_params pointer using it.

2021-08-20  Eugene Syromyatnikov  <evgsyr@gmail.com>

	doc/strace.1.in: tfix.
	doc/strace.1.in: Remove an excess space character
	in "\-\-summary\-syscall\-overhead".

2021-08-20  Eugene Syromyatnikov  <evgsyr@gmail.com>

	signal: simplify an expression for calculating signal mask size a bit.
	With all the cool macros we have now it can be rewritten into something
	a bit more comprehensible and easier to read.

	* src/signal.c (sprintsigmask_n): Rewrite size calculation using
	  ROUNDUP_DIV and MIN.

2021-08-19  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

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

	maint: update for linux v5.14-rc6.
	* maint/ioctls_sym.sh (x86_list): Add KVM_[SG]ET_SREGS2 ioctls.

2021-08-19  Dmitry V. Levin  <ldv@strace.io>

	tests: replace AUDIO_STOP with NET_REMOVE_IF in ioctl_ubi test.
	Do not use constants defined in <linux/dvb/audio.h> as the latter was
	moved to staging by Linux kernel commit v5.14-rc1~165^2~129.

	* tests/ioctl_ubi.c (main): Replace AUDIO_STOP with NET_REMOVE_IF.

2021-08-19  Eugene Syromyatnikov  <evgsyr@gmail.com>

	trie: cache fill_value value instead of calculating it each time.
	trie_create_data_block may be a rather hot function if a trie is actively
	used;  it seems wasteful to re-calculate fill_value each time a new data
	block is allocated, considering the fact that it, as well as empty_value,
	remains constant after the trie creation.  Let's prematurely optimise it
	by pre-calculating the value in trie_create.

	* src/trie.h (struct trie): Add fill_value field.
	* src/trie.c (trie_create_data_block): Move fill_value calculation...
	(trie_create): ...here, assign it to the fill_value field.

2021-08-18  Eugene Syromyatnikov  <evgsyr@gmail.com>

	trie: use BIT* and MASK* macros.
	This makes reading the code a bit easier.  It also solves some issues
	where there is a hypothertical possibility of having bit shifts of size
	64, by virtue of using the *_SAFE macros (that should silence some
	reported "left shifting by more than 63 bits has undefined behavior"
	covscan issues).

	* src/trie.c (trie_create): Use BIT32, MASK64.
	(trie_create_data_block): Use BIT32, change iterator variable type
	to size_t.
	(trie_get_node): Use BIT64, MASK64.
	(trie_data_block_calc_pos): Use BIT32, MASK64, MASK64_SAFE.
	(trie_iterate_keys_node): Use BIT64, MASK64, MASK64_SAFE.
	(trie_free_node): Use BIT64.

2021-08-18  Eugene Syromyatnikov  <evgsyr@gmail.com>

	pidns: remove the remaining leftover mention of btree.
	It was an original (incorrect) name of the supporting structure;
	see also [1].

	[1] https://lists.strace.io/pipermail/strace-devel/2020-June/009805.html

	* src/pidns.c (ns_pid_to_proc_pid): Fix the comment.

2021-08-18  Eugene Syromyatnikov  <evgsyr@gmail.com>

	macros: expand BIT macros, add MASK macros; add *_SAFE macros.
	These macros might make reading a code that often converts between powers
	of 2 and values/masks a bit easier;  moreover, the *_SAFE versions should
	help in cases where the shift values are expected to be equal to the type
	bit width (which lead to UB otherwise).

	Switching from BIT to BIT32 should also clarify bitness, which may be somewhat
	murky at times (cf. printxval, printflags, and printxvals).

	* src/macros.h [!BIT] (BIT): Rename to...
	[!BIT32] (BIT32): ...this.
	[!BIT64] (BIT64): New macro.
	[!MASK32] (MASK32): Likewise.
	[!MASK64] (MASK64): Likewise.
	(BIT32_SAFE, BIT64_SAFE, MASK32_SAFE, MASK64_SAFE): New macros.
	(FLAG): Use BIT32.

2021-08-18  Eugene Syromyatnikov  <evgsyr@gmail.com>

	filter_qualify: free allocated data on the error path exit of parse_poke_token
	While not terribly required due to the fact that issues with option
	parsing lead to program termination, these changes avoid leaking data
	allocated in the function's scope and not stored elsewhere, which might
	come handy if it ever be used dynamically during the runtime.

	This also has been reported as resource leaks by covscan, and these
	changes should calm it.

	* src/filter_qualify.c (parse_poke_token): Go to err label instead of
	returning right away; free poke->data, poke, and str_tokenized before
	returning false.

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

2021-08-18  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: add prctl(PR_SET_PTRACER) tests.
	* tests/.gitignore: Add prctl-set-ptracer-success,
	prctl-set-ptracer-success-Xabbrev, prctl-set-ptracer-success-Xraw,
	prctl-set-ptracer-success-Xverbose,
	prctl-set-ptracer-success--pidns-translation,
	prctl-set-ptracer-success-Xabbrev--pidns-translation,
	prctl-set-ptracer-success-Xraw--pidns-translation,
	and prctl-set-ptracer-success-Xverbose--pidns-translation.
	* tests/Makefile.am (check_PROGRAMS): Likewise.
	* tests/gen_tests.in (prctl-set-ptracer-success,
	prctl-set-ptracer-success-Xabbrev, prctl-set-ptracer-success-Xraw,
	prctl-set-ptracer-success-Xverbose,
	prctl-set-ptracer-success--pidns-translation,
	prctl-set-ptracer-success-Xabbrev--pidns-translation,
	prctl-set-ptracer-success-Xraw--pidns-translation,
	prctl-set-ptracer-success-Xverbose--pidns-translation): New tests.
	* tests/prctl-set-ptracer-success--pidns-translation.c: New file.
	* tests/prctl-set-ptracer-success-Xabbrev--pidns-translation.c: Likewise.
	* tests/prctl-set-ptracer-success-Xabbrev.c: Likewise.
	* tests/prctl-set-ptracer-success-Xraw--pidns-translation.c: Likewise.
	* tests/prctl-set-ptracer-success-Xraw.c: Likewise.
	* tests/prctl-set-ptracer-success-Xverbose--pidns-translation.c: Likewise.
	* tests/prctl-set-ptracer-success-Xverbose.c: Likewise.
	* tests/prctl-set-ptracer-success.c: Likewise.

2021-08-18  Eugene Syromyatnikov  <evgsyr@gmail.com>

	prctl: implement PR_SCHED_CORE op decoding.
	Introduced by Linux commit v5.14-rc1~6^2~50.

	* src/xlat/pr_sched_core_cmds.in: New file.
	* src/xlat/pr_sched_core_pidtypes.in: Likewise.
	* src/xlat/prctl_options.in (PR_SCHED_CORE): New constant.
	* src/prctl.c: Include "xlat/pr_sched_core_cmds.h",
	"xlat/pr_sched_core_pidtypes.h".
	(SYS_FUNC(prctl)) <case PR_SCHED_CORE>: Implement decoding.
	* tests/prctl-sched-core--pidns-translation-Xabbrev.c: New file.
	* tests/prctl-sched-core--pidns-translation-Xraw.c: Likewise.
	* tests/prctl-sched-core--pidns-translation-Xverbose.c: Likewise.
	* tests/prctl-sched-core--pidns-translation.c: Likewise.
	* tests/prctl-sched-core-Xabbrev.c: Likewise.
	* tests/prctl-sched-core-Xraw.c: Likewise.
	* tests/prctl-sched-core-Xverbose.c: Likewise.
	* tests/prctl-sched-core-success--pidns-translation-Xabbrev.c: Likewise.
	* tests/prctl-sched-core-success--pidns-translation-Xraw.c: Likewise.
	* tests/prctl-sched-core-success--pidns-translation-Xverbose.c: Likewise.
	* tests/prctl-sched-core-success--pidns-translation.c: Likewise.
	* tests/prctl-sched-core-success-Xabbrev.c: Likewise.
	* tests/prctl-sched-core-success-Xraw.c: Likewise.
	* tests/prctl-sched-core-success-Xverbose.c: Likewise.
	* tests/prctl-sched-core-success.c: Likewise.
	* tests/prctl-sched-core.c: Likewise.
	* tests/.gitignore: Add prctl-sched-core, prctl-sched-core-Xabbrev,
	prctl-sched-core-Xraw, prctl-sched-core-Xverbose,
	prctl-sched-core--pidns-translation,
	prctl-sched-core--pidns-translation-Xabbrev,
	prctl-sched-core--pidns-translation-Xraw,
	prctl-sched-core--pidns-translation-Xverbose,
	prctl-sched-core-success, prctl-sched-core-success-Xabbrev,
	prctl-sched-core-success-Xraw, prctl-sched-core-success-Xverbose,
	prctl-sched-core-success--pidns-translation,
	prctl-sched-core-success--pidns-translation-Xabbrev,
	prctl-sched-core-success--pidns-translation-Xraw,
	and prctl-sched-core-success--pidns-translation-Xverbose.
	* tests/Makefile.am (check_PROGRAMS): Add
	prctl-sched-core--pidns-translation,
	prctl-sched-core--pidns-translation-Xabbrev,
	prctl-sched-core--pidns-translation-Xraw,
	prctl-sched-core--pidns-translation-Xverbose,
	prctl-sched-core-success, prctl-sched-core-success-Xabbrev,
	prctl-sched-core-success-Xraw, prctl-sched-core-success-Xverbose,
	prctl-sched-core-success--pidns-translation,
	prctl-sched-core-success--pidns-translation-Xabbrev,
	prctl-sched-core-success--pidns-translation-Xraw,
	and prctl-sched-core-success--pidns-translation-Xverbose.
	* tests/gen_tests.in (prctl-sched-core, prctl-sched-core-Xabbrev,
	prctl-sched-core-Xraw, prctl-sched-core-Xverbose,
	prctl-sched-core--pidns-translation,
	prctl-sched-core--pidns-translation-Xabbrev,
	prctl-sched-core--pidns-translation-Xraw,
	prctl-sched-core--pidns-translation-Xverbose,
	prctl-sched-core-success, prctl-sched-core-success-Xabbrev,
	prctl-sched-core-success-Xraw, prctl-sched-core-success-Xverbose,
	prctl-sched-core-success--pidns-translation,
	prctl-sched-core-success--pidns-translation-Xabbrev,
	prctl-sched-core-success--pidns-translation-Xraw,
	and prctl-sched-core-success--pidns-translation-Xverbose): New tests.
	* tests/pure_executables.list: Add prctl-sched-core,
	prctl-sched-core-Xabbrev, prctl-sched-core-Xraw,
	and prctl-sched-core-Xverbose.

2021-08-17  Dmitry V. Levin  <ldv@strace.io>

	tests: use prctl_marker.
	* tests/prctl-arg2-intptr.c (main): Use prctl_marker.
	* tests/prctl-cap-ambient.c: Likewise.
	* tests/prctl-capbset.c: Likewise.
	* tests/prctl-dumpable.c: Likewise.
	* tests/prctl-fp-mode.c: Likewise.
	* tests/prctl-mce-kill.c: Likewise.
	* tests/prctl-name.c: Likewise.
	* tests/prctl-no-args.c: Likewise.
	* tests/prctl-pac-enabled-keys.c: Likewise.
	* tests/prctl-pac-reset-keys.c: Likewise.
	* tests/prctl-pdeathsig.c: Likewise.
	* tests/prctl-seccomp-filter-v.c: Likewise.
	* tests/prctl-seccomp-strict.c: Likewise.
	* tests/prctl-securebits.c: Likewise.
	* tests/prctl-spec-inject.c: Likewise.
	* tests/prctl-sve.c: Likewise.
	* tests/prctl-syscall-user-dispatch.c: Likewise.
	* tests/prctl-tagged-addr.c: Likewise.
	* tests/prctl-tid_address.c: Likewise.
	* tests/prctl-tsc.c: Likewise.
	* tests/prctl-unalign.c: Likewise.

2021-08-17  Dmitry V. Levin  <ldv@strace.io>

	tests: introduce prctl_marker.
	This helper invokes a prctl syscall with very specific arguments for use
	as a marker.

	* tests/prctl_marker.c: New file.
	* tests/Makefile.am (libtests_a_SOURCES): Add prctl_marker.c.
	* tests/tests.h (prctl_marker): New prototype.

2021-08-17  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests/prctl-success.sh: match strace output with -a value more than 79.
	For some tests it is instructive to set -a to value more than 79; the
	issue is that this alignment width is more than the marker output, which
	leads to a match failure.  To avoid that, allow for arbitrary number
	of spaces before the syscall return value.

	* tests/prctl-success.sh: Relax the regular expression to allow
	for arbitrary (non-zero) number of spaces.

	Complements: v5.13-49-g6f0be228b "tests/prctl.sh: match strace output with -a value more than 79"

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

	tests/prctl.sh: match strace output with -a value more than 79.
	For some tests it is instructive to set -a to value more than 79; the
	issue is that this alignment width is more than the marker output, which
	leads to a match failure.  To avoid that, allow for arbitrary number
	of spaces before the syscall return value.

	* tests/prctl.sh: Relax the regular expression to allow for arbitrary
	(non-zero) number of spaces.

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

	tests: move scno tampering check to init.sh.
	And convert it to a function.

	* tests/init.sh (check_scno_tampering): New funtion, move the body
	from...
	* tests/scno_tampering.sh: ...here; call check_scno_tampering.

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

	prctl: print PR_SET_PTRACER_ANY numerical value as int.
	While it is declared as (unsigned long)-1, there's little sense to print
	it as it is, since the comparison is ultimately done against arg2 casted
	to int.

	* src/prctl.c (SYS_FUNC(prctl)) <case PR_SET_PTRACER>: Cast arg2 to int
	when passing to print_xlat_ex; use XLAT_STYLE_FMT_D style.

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

	tests: convert prctl-fp-mode and prctl-spec-inject into generated tests.
	And also avoid injecting values into prctl() calls issued by libc during
	process startup.

	* tests/Makefile.am (DECODER_TESTS): Remove prctl-fp-mode.test
	and prctl-spec-inject.test.
	* tests/gen_tests.in (prctl-fp-mode, prctl-spec-inject): New tests.
	* tests/prctl-fp-mode.test: Remove.
	* tests/prctl-spec-inject.test: Likewise.
	* tests/prctl-fp-mode.c: Implement injected return value locking sequence.
	* tests/prctl-spec-inject.c: Likewise.

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

	tests/prctl-success.sh: support error injection.
	* tests/prctl-success.sh: properly construct strace arguments and sed
	expression if an item that begins with "error=" occurs in PRCTL_INJECT_RETVALS.

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

	prctl: implement PR_PAC_[GS]ET_ENABLED_KEYS ops decoding.
	Introduced by Linux commit v5.13-rc1~17^2~18^2~1.

	* src/xlat/pr_pac_enabled_keys.in: New file.
	* src/xlat/pr_pac_keys.in (PR_PAC_APIAKEY, PR_PAC_APIBKEY,
	PR_PAC_APDAKEY, PR_PAC_APDBKEY): Remove entries that moved
	to src/xlat/pr_pac_enabled_keys.in.
	* src/prctl.c: Include "xlat/pr_pac_enabled_keys.h".
	(SYS_FUNC(prctl)) <case PR_PAC_SET_ENABLED_KEYS, case PR_PAC_GET_ENABLED_KEYS>:
	Implement decoding.
	(SYS_FUNC(prctl)) <case PR_PAC_RESET_KEYS>: Call printflags_ex with both
	pr_pac_enabled_keys and pr_pac_keys.
	* tests/.gitignore: Add prctl-pac-enabled-keys, prctl-pac-enabled-keys-Xabbrev,
	prctl-pac-enabled-keys-Xraw, prctl-pac-enabled-keys-Xverbose,
	prctl-pac-enabled-keys-success, prctl-pac-enabled-keys-success-Xabbrev,
	prctl-pac-enabled-keys-success-Xraw,
	and prctl-pac-enabled-keys-success-Xverbose.
	* tests/Makefile.am (check_PROGRAMS): Add prctl-pac-enabled-keys-success,
	prctl-pac-enabled-keys-success-Xabbrev,
	prctl-pac-enabled-keys-success-Xraw,
	and prctl-pac-enabled-keys-success-Xverbose.
	* tests/prctl-pac-enabled-keys-Xabbrev.c: New file.
	* tests/prctl-pac-enabled-keys-Xraw.c: Likewise.
	* tests/prctl-pac-enabled-keys-Xverbose.c: Likewise.
	* tests/prctl-pac-enabled-keys-success-Xabbrev.c: Likewise.
	* tests/prctl-pac-enabled-keys-success-Xraw.c: Likewise.
	* tests/prctl-pac-enabled-keys-success-Xverbose.c: Likewise.
	* tests/prctl-pac-enabled-keys-success.c: Likewise.
	* tests/prctl-pac-enabled-keys.c: Likewise.
	* tests/gen_tests.in (prctl-pac-enabled-keys, prctl-pac-enabled-keys-Xabbrev,
	prctl-pac-enabled-keys-Xraw, prctl-pac-enabled-keys-Xverbose,
	prctl-pac-enabled-keys-success, prctl-pac-enabled-keys-success-Xabbrev,
	prctl-pac-enabled-keys-success-Xraw, prctl-pac-enabled-keys-success-Xverbose):
	New tests.
	* tests/pure_executables.list: Add prctl-pac-enabled-keys,
	prctl-pac-enabled-keys-Xabbrev, prctl-pac-enabled-keys-Xraw,
	and prctl-pac-enabled-keys-Xverbose.

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

	prctl: use SPFF_AUXSTR_MODE for ops that use sprintflags for auxstr.
	and also return RVAL_HEX flag in addition to RVAL_STR.

	* src/prctl.c (SYS_FUNC(prctl)) <case PR_GET_SECUREBITS,
	case PR_GET_FP_MODE, case PR_GET_SPECULATION_CTRL>: Use sprintflags_ex,
	pass SPFF_AUXSTR_MODE flag, return RVAL_HEX flag in addition to
	RVAL_STR.
	* tests/prctl-fp-mode.c: Update expected output.
	* tests/prctl-securebits.c: Likewise.
	* tests/prctl-spec-inject.c: Likewise.
	* tests/prctl-spec-inject.test: Add check for the injected value of 32.

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

	tests: add prctl-securebits-success* tests.
	* tests/.gitignore: Add prctl-securebits-success,
	prctl-securebits-success-Xabbrev, prctl-securebits-success-Xraw,
	and prctl-securebits-success-Xverbose.
	* tests/Makefile.am (check_PROGRAMS): Likewise.
	* tests/gen_tests.in(prctl-securebits-success,
	prctl-securebits-success-Xabbrev, prctl-securebits-success-Xraw,
	prctl-securebits-success-Xverbose): New tests.
	* tests/prctl-securebits-success-Xabbrev.c: New file.
	* tests/prctl-securebits-success-Xraw.c: Likewise.
	* tests/prctl-securebits-success-Xverbose.c: Likewise.
	* tests/prctl-securebits-success.c: Likewise.
	* tests/prctl-securebits.c: Add injected-based and xlat-verbosity-varied
	checks support.

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

	xlat: add auxval mode to sprintflags_ex.
	sprintflags is often used to decode flag set returned by a syscall; it,
	however, looks somewhat ugly when collided with xlat styles (and even
	without it, somewhat superfluous[1] when values that do not match any flags
	are printed).  Introduce a special mode that makes sprintflags output
	more akin to XLAT_STYLE_VERBOSE comment (except when XLAT_STYLE_RAW
	is used).

	[1] It may be seen useful as the default return value format is decimal
	    and sprintflags uses hex, but at least fcntl always prints flags in
	    return values as RVAL_HEX anyway.

	* src/defs.h (enum xlat_style_private_flag_bits) <SPFF_AUXSTR_MODE_BIT>:
	New flag bit.
	(enum xlat_style_private_flags) <SPFF_AUXSTR_MODE>: New flag.
	* src/xlat.c (sprintflags_ex): Handle SPFF_AUXSTR_MODE flag in style.

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

	prctl: implement PR_[GS]ET_TAGGED_ADDR_CTRL op decoding.
	Introduced by Linux commit v5.4-rc1~100^2~6^9~8 and extended in Linux
	commits v5.10-rc1~49^2~9^2~12 and v5.10-rc1~49^2~9^2~11.

	* src/xlat/pr_tagged_addr_enable.in: New file.
	* src/xlat/pr_tagged_addr_mte_tcf.in: Likewise.
	* src/prctl.c: Include "xlat/pr_tagged_addr_enable.h" and
	"xlat/pr_tagged_addr_mte_tcf.h".
	(sprint_tagged_addr_val): New function.
	(SYS_FUNC(prctl)) <case PR_SET_TAGGED_ADDR_CTRL, case PR_GET_TAGGED_ADDR_CTRL>:
	Implement arg2/retval decoding.
	* tests/.gitignore: Add prctl-tagged-addr, prctl-tagged-addr-Xabbrev,
	prctl-tagged-addr-Xraw, prctl-tagged-addr-Xverbose, prctl-tagged-addr-success,
	prctl-tagged-addr-success-Xabbrev, prctl-tagged-addr-success-Xraw,
	and prctl-tagged-addr-success-Xverbose.
	* tests/Makefile.am (check_PROGRAMS): Add prctl-tagged-addr-success,
	prctl-tagged-addr-success-Xabbrev, prctl-tagged-addr-success-Xraw,
	and prctl-tagged-addr-success-Xverbose.
	(EXTRA_DIST): Add prctl-success.sh.
	* tests/gen_tests.in (prctl-tagged-addr, prctl-tagged-addr-Xabbrev,
	prctl-tagged-addr-Xraw, prctl-tagged-addr-Xverbose, prctl-tagged-addr-success,
	prctl-tagged-addr-success-Xabbrev, prctl-tagged-addr-success-Xraw,
	prctl-tagged-addr-success-Xverbose): New tests.
	* tests/prctl-no-args.c (main) <options>: Remove
	PR_GET_TAGGED_ADDR_CTRL.
	* tests/prctl-success.sh: New file.
	* tests/prctl-tagged-addr-Xabbrev.c: Likewise.
	* tests/prctl-tagged-addr-Xraw.c: Likewise.
	* tests/prctl-tagged-addr-Xverbose.c: Likewise.
	* tests/prctl-tagged-addr-success-Xabbrev.c: Likewise.
	* tests/prctl-tagged-addr-success-Xraw.c: Likewise.
	* tests/prctl-tagged-addr-success-Xverbose.c: Likewise.
	* tests/prctl-tagged-addr-success.c: Likewise.
	* tests/prctl-tagged-addr.c: Likewise.
	* tests/pure_executables.list: Add prctl-tagged-addr, prctl-tagged-addr-Xabbrev,
	prctl-tagged-addr-Xraw, and prctl-tagged-addr-Xverbose.

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

	xlat/gen.sh: call read with "-r" option.
	There is no need to support backslashes interpretation and the xlat
	input is somewhat user-provided, so it is better to safeguard it a bit.

	* src/xlat/gen.sh: Call read with "-r" option.

2021-08-11  Eugene Syromyatnikov  <evgsyr@gmail.com>

	src/Makefile.am: whitespace fixes.
	* src/Makefile.am (libstrace_a_SOURCES, EXTRA_DIST): Remove spaces
	before tabs.

2021-08-11  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: silence clang's complaints about "tautological constant compares"
	For some reason, it complaints about not necessarily meaningful calculations
	stemmed from macro expansions, which seems overly zealous.

	* src/gcc_compat.h (DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE,
	DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE): New macros.
	* src/xlat/gen.sh: Add DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE/
	DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE pair around xlat array
	definition.

2021-08-07  Eugene Syromyatnikov  <evgsyr@gmail.com>

	prctl: print PR_SET_PTRACER as PID.
	* src/prctl.c (SYS_FUNC(prctl)) <case PR_SET_PTRACER>: Print
	non-negative arg2 as TGID.

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

	tests/tests.h: introduce XLAT_FMT_LL.
	For the cases when argument is 64-bit (unsigned long long is assumed
	in these cases).

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

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

	tests/prctl.sh: enable usage with -Xraw.
	* tests/prctl.sh: Make " \/\* PR_??? \*\/" part optional so it can be
	used with -Xraw tests.

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

	xstring: allow xsnprintf/xsprintf calls without format arguments.
	This is useful for the cases when xappendstr if used without format
	arguments.

	* src/xstring.h (xsnprintf, xsnprintf): Use "##__VA_ARGS__" instead
	of "__VA_ARGS__" to glue it to the comma.

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

	xlat/gen.sh: enable symbolic constants that start with "!"
	That allows defining symbolic constants that are negations of other
	constants.

	* src/xlat/gen.sh (gen_header) <2nd pass>: Allow "!" to start a symbolic
	constant.

2021-08-05  Eugene Syromyatnikov  <evgsyr@gmail.com>

	prctl: implement PR_PAC_RESET_KEYS decoding.
	Introduced by Linux commit v5.0-rc1~35^2~19.

	* src/xlat/pr_pac_keys.in: New file.
	* src/prctl.c: Include "xlat/pr_pac_keys.h".
	(SYS_FUNC(prctl)) <case PR_PAC_RESET_KEYS>: Implement decoding.
	* tests/prctl-pac-reset-keys.c: New file.
	* tests/.gitignore: Add prctl-pac-reset-keys.
	* tests/pure_executables.list: Likewise.
	* tests/gen_tests.in (prctl-pac-reset-keys): New test.

2021-08-04  Eugene Syromyatnikov  <evgsyr@gmail.com>

	prctl: implement PR_SET_SYSCALL_USER_DISPATCH op decoding.
	Introduced by Linux commit v5.11-rc1~180^2~9.

	* src/xlat/pr_sud_cmds.in: New file.
	* src/prctl.c: Include "xlat/pr_sud_cmds.h".
	(SYS_FUNC(prctl)): Remove #ifdef __ANDROID__ guard around arg4 and arg5
	definitions.
	(SYS_FUNC(prctl)) <case PR_SET_SYSCALL_USER_DISPATCH>: New decoder.
	* NEWS: Mention this.
	* tests/prctl-syscall-user-dispatch.c: New file.
	* tests/.gitignore: Add prctl-syscall-user-dispatch.
	* tests/pure_executables.list: Likewise.
	* tests/gen_tests.in (prctl-syscall-user-dispatch): New test.
	(prctl-*): Fix whitespace.

2021-08-04  Eugene Syromyatnikov  <evgsyr@gmail.com>

	rtnl_mdb: decode MDBA_ROUTER_PATTR_INET{,6}_TIMER attributes.
	Introduced by Linux commit v5.14-rc1~119^2~549^2~1.

	* src/rtnl_mdb.c (mdba_router_pattr_nla_decoders)
	<[MDBA_ROUTER_PATTR_INET_TIMER], [MDBA_ROUTER_PATTR_INET6_TIMER]>: New
	docedors, call decode_nla_u32.
	* src/xlat/rtnl_mdba_router_pattr_attrs.in
	(MDBA_ROUTER_PATTR_INET_TIMER, MDBA_ROUTER_PATTR_INET6_TIMER): New
	constants.
	* NEWS: Mention this.
	* tests/nlattr_mdba_router_port.c: Add checks.

2021-08-04  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: update MOUNT_ATTR_* constants.
	* src/xlat/mount_attr_attr.in (MOUNT_ATTR_NOSYMFOLLOW): New constant,
	introduced by Linux commit v5.14-rc1~139^2~1.
	* NEWS: Mention this.
	* tests/mount_setattr.c (main): Update expected output.

2021-08-04  Eugene Syromyatnikov  <evgsyr@gmail.com>

	netlink: decode NFNL_SUBSYS_HOOK message types and flags.
	Introduced by Linux commit v5.14-rc1~119^2~257^2~4.

	* bundled/linux/include/uapi/linux/netfilter/nfnetlink_hook.h: New file,
	copied from headers_install'ed Linux kernel v5.14-rc4.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/xlat/nf_hook_msg_types.in: New file.
	* src/xlat/nl_netfilter_subsys_ids.in (NFNL_SUBSYS_HOOK): New constant.
	* src/netlink.c: Include <linux/netfilter/nfnetlink_hook.h> and
	"xlat/nf_hook_msg_types.h".
	(nf_nlmsg_types) <[NFNL_SUBSYS_HOOK]>: New record.
	(decode_nlmsg_flags_netfilter) <case NFNL_SUBSYS_HOOK>: Provide flags
	for NFNL_MSG_HOOK_GET.

2021-08-03  Eugene Syromyatnikov  <evgsyr@gmail.com>

	rtnl_link: decode IFLA_PARENT_DEV{,_BUS}_NAME attributes.
	Introduced by Linux commit v5.14-rc1~119^2~191^2~2.

	* src/rtnl_link.c (ifinfomsg_nla_decoders) <[IFLA_PARENT_DEV_NAME],
	[IFLA_PARENT_DEV_BUS_NAME]>: New decoders, call decode_nla_str.
	* src/xlat/rtnl_link_attrs.in (IFLA_PARENT_DEV_NAME,
	IFLA_PARENT_DEV_BUS_NAME): New constants.
	* tests/nlattr_ifinfomsg.c: Add checks.

2021-08-03  Eugene Syromyatnikov  <evgsyr@gmail.com>

	rtnl_link: implement IFLA_PROTO_DOWN_REASON attribute decoding.
	IFLA_PROTO_DOWN_REASON is a nested attribute introduced by Linux commit
	v5.9-rc1~133^2~77.

	* src/xlat/rtnl_ifla_proto_down_reason_attrs.in: New file.
	* src/rtnl_link.c: Include "xlat/rtnl_ifla_proto_down_reason_attrs.h".
	(ifla_proto_down_reason_nla_decoders): New decoder table.
	(decode_ifla_proto_down_reason): New function.
	(ifinfomsg_nla_decoders) <[IFLA_PROTO_DOWN_REASON]>: New decoder,
	calls decode_ifla_proto_down_reason.
	* NEWS: Mention this.
	* tests/nlattr_ifla_proto_down_reason.c: New file.
	* tests/.gitignore: Add nlattr_ifla_proto_down_reason.
	* tests/pure_executables.list: Likewise.
	* tests/gen_tests.in (nlattr_ifla_proto_down_reason): New test.

2021-08-02  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: update BPF_* constants.
	* src/xlat/bpf_attach_type.in (BPF_SK_REUSEPORT_SELECT,
	BPF_SK_REUSEPORT_SELECT_OR_MIGRATE): New constants, introduced by Linux
	commit v5.14-rc1~119^2~135^2~7^2~2.
	* src/xlat/bpf_prog_types.in (BPF_PROG_TYPE_SYSCALL): New constant,
	introduced by Linux commit v5.14-rc1~119^2~501^2~2^2~20.
	* NEWS: Mention this.
	* tests/bpf.c: Update the relevant checks.

	xlat: update IORING_* constants.
	* src/xlat/uring_register_opcodes.in (IORING_REGISTER_IOWQ_AFF,
	IORING_UNREGISTER_IOWQ_AFF): New constants, introduced by Linux commit
	v5.14-rc1~115^2~31.
	* NEWS: Mention this.
	* tests/io_uring_register.c: Update invalid ops check.

	xlat: update SCTP_* constants.
	* src/xlat/sock_sctp_options.in (SCTP_PLPMTUD_PROBE_INTERVAL): New
	constant, introduced by Linux commit v5.14-rc1~119^2~56^2~11.
	* NEWS: Mention this.

	xlat: update UFFD_* constants.
	* src/xlat/uffd_api_features.in (UFFD_FEATURE_MINOR_SHMEM): New
	constant, introduced by Linux commit v5.14-rc1~107^2~147.
	* NEWS: Mention this.

	xlat: update MADV_* constants.
	* src/xlat/madvise_cmds.in (MADV_POPULATE_READ, MADV_POPULATE_WRITE):
	New constants, introduced by Linux commit v5.14-rc1~107^2~91.
	* NEWS: Mention this.

2021-08-02  Eugene Syromyatnikov  <evgsyr@gmail.com>

	Implement memfd_secret syscall decoding.
	Introduced in Linux commit v5.14-rc1~40^2~43.

	* src/memfd_secret.c: New file.
	* src/Makefile.am (libstrace_a_SOURCES): Add it.
	* src/linux/generic/syscallent-common.h ([BASE_NR + 447]): New entry.
	* src/pathtrace.c (pathtrace_match_set): Ignore SEN_memfd_secret.
	* src/xlat/fsmagic.in (SECRETMEM_MAGIC): New constant.
	* src/xlat/memfd_secret_flags.in: New file.
	* NEWS: Mention this.
	* tests/Makefile.am (check_PROGRAMS): Add memfd_secret-success
	and memfd_secret-success-y.
	* tests/gen_tests.in (memfd_secret, memfd_secret-success,
	memfd_secret-success-y): New tests.
	* tests/.gitignore: Add them.
	* tests/memfd_secret.c: New file.
	* tests/memfd_secret-success.c: Likewise.
	* tests/memfd_secret-success-y.c: Likewise.
	* tests/pure_executables.list (memfd_secret): New entry.

2021-08-02  Dmitry V. Levin  <ldv@strace.io>

	bundled: update linux UAPI headers to v5.14-rc4.
	* bundled/linux/include/uapi/linux/btrfs.h: Update to
	headers_install'ed Linux kernel v5.14-rc4.
	* bundled/linux/include/uapi/linux/btrfs_tree.h: Likewise.
	* bundled/linux/include/uapi/linux/if_bridge.h: Likewise.
	* bundled/linux/include/uapi/linux/if_link.h: Likewise.
	* bundled/linux/include/uapi/linux/io_uring.h: Likewise.
	* bundled/linux/include/uapi/linux/mount.h: Likewise.
	* bundled/linux/include/uapi/linux/netfilter/nf_tables.h: Likewise.
	* bundled/linux/include/uapi/linux/netfilter/nfnetlink.h: Likewise.
	* bundled/linux/include/uapi/linux/netfilter/nfnetlink_log.h: Likewise.
	* bundled/linux/include/uapi/linux/netfilter/nfnetlink_queue.h: Likewise.
	* bundled/linux/include/uapi/linux/netlink.h: Likewise.
	* bundled/linux/include/uapi/linux/prctl.h: Likewise.
	* bundled/linux/include/uapi/linux/seccomp.h: Likewise.
	* bundled/linux/include/uapi/linux/userfaultfd.h: Likewise.
	* bundled/linux/include/uapi/linux/v4l2-controls.h: Likewise.
	* bundled/linux/include/uapi/linux/version.h: Likewise.
	* bundled/linux/include/uapi/linux/videodev2.h: Likewise.

2021-08-01  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: replace simple syscall-tampering-enabled tests with generated ones
	* tests/Makefile.am (DECODER_TESTS): Remove bpf-success.test,
	bpf-success-v.test, clone3-success.test,
	landlock_create_ruleset-success.test, net-tpacket_stats-success.test,
	quotactl-success.test, quotactl-success-v.test,
	quotactl-xfs-success.test, and quotactl-xfs-success-v.test.
	* tests/gen_tests.in (bpf-success, bpf-success-v, clone3-success,
	landlock_create_ruleset-success, net-tpacket_stats-success,
	quotactl-success, quotactl-success-v, quotactl-xfs-success,
	quotactl-xfs-success-v): New tests.
	(clone3-success-Xabbrev, clone3-success-Xraw, clone3-success-Xverbose,
	landlock_create_ruleset-success): Rewrite to generate test directly
	instead of being a wrapper of a respective *-success test.
	* tests/bpf-success.test: Remove.
	* tests/bpf-success-v.test: Likewise.
	* tests/clone3-success.test: Likewise.
	* tests/landlock_create_ruleset-success.test: Likewise.
	* tests/net-tpacket_stats-success.test: Likewise.
	* tests/quotactl-success.test: Likewise.
	* tests/quotactl-success-v.test: Likewise.
	* tests/quotactl-xfs-success.test: Likewise.
	* tests/quotactl-xfs-success-v.test: Likewise.

2021-08-01  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: add special handling for -einject= in gen_tests.sh.
	When a new syscall-tampering-based is added, some amount of boilerplate
	is required, even though these tests are close to generic ones.  Let's
	add a logic that generates appropriate code for tests that include
	"-einject=..." as a first argument.

	* tests/gen_tests.sh <case "$arg0">: Handle "-einject=*" and "--inject=*":
	generate a script that includes "scno_tampering.sh", does not call
	run_prog (within run_strace_match_diff call), but rather a combination
	of run_strace (with prog name passed explicitly) and match_diff.

2021-08-01  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: handle "-etrace=*" in addition to "-e trace=*" and "--trace=*"
	Adjust the logic that recognises custom syscall tracing sets to include
	"-etrace=..." syntax as well as "-e trace=..." and "--trace=..." in
	order to allow uniform use of -e options within the sets of test
	descriptions.

	* tests/init.sh (run_strace_match_diff, run_strace_match_grep): Handle
	"-etrace=*" in addition to "-e trace=*" and "--trace=*" as a disablement
	of "-e trace=$NAME" heuristics.

2021-07-31  Eugene Syromyatnikov  <evgsyr@gmail.com>

	m4/mpers.m4: generate HAVE_*_SELINUX_RUNTIME config defines.
	While bootstrap has some provisions for mangling HAVE_SELINUX_RUNTIME
	into HAVE_{M32,MX32}_SELINUX_RUNTIME, and there is logic for checking
	SELinux runtime presence in non-native personalities, the relevant
	configuration definition is not ultimately generated, as it has to be
	defined explicitly, similarly to HAVE_*_MPERS.

	* m4/mpers.m4 (st_MPERS) [$st_cv_selinux_runtime == yes]: AC_DEFINE
	HAVE_SELINUX_RUNTIME.

	Complements: v5.12~49 "Implement --secontext[=full] option to display SELinux contexts"

2021-07-31  Eugene Syromyatnikov  <evgsyr@gmail.com>

	m4/mpers.m4: unquote mpers_name in AC_DEFINE.
	When mpers_name is quoted in AC_DEFINE, it is not substituted in the
	generated config.h macro description.

	* m4/mpers.m4 <AC_DEFINE(HAVE_MPERS)>: Do not quote "mpers_name" part.

2021-07-25  Dmitry V. Levin  <ldv@strace.io>

	Implement decoding of quotactl_fd syscall.
	This new syscall was introduced by Linux kernel commit v5.14-rc1~116^2~4.

	* src/quota.c (SYS_FUNC(quotactl_fd)): New function.
	* src/linux/generic/syscallent-common.h [BASE_NR + 441]: Wire up
	quotactl_fd.
