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

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

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

	print_ifindex: fix IFNAME_QUOTED_SZ definition.
	sizeof(IFNAMSIZ) instead of IFNAMSIZ was mistakenly used
	for IFNAME_QUOTED_SZ initial definition in commit v4.23~87
	"print_ifindex: respect xlat style settings".

	* src/print_ifindex.c (IFNAME_QUOTED_SZ): Use IFNAMSIZ
	instead of sizeof(IFNAMSIZ).
	* NEWS: Mention it.

	Reported-by: Paulo Andrade <pandrade@redhat.com>
	Suggested-by: Paulo Andrade <pandrade@redhat.com>
	Fixes: v4.23~87 "print_ifindex: respect xlat style settings"
	References: https://bugzilla.redhat.com/show_bug.cgi?id=2028146

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

	tests: move keyctl syscalls of keyctl tests into a subprocess.
	For some mysterious reason, this helps to workaround
	the following resource starvation issue on some systems:

	  $ ./keyctl >/dev/null && /bin/true
	  -sh: fork: retry: Resource temporarily unavailable
	  -sh: fork: retry: Resource temporarily unavailable
	  -sh: fork: retry: Resource temporarily unavailable
	  -sh: fork: retry: Resource temporarily unavailable
	  -sh: fork: Resource temporarily unavailable

	* tests/keyctl.c: Include <sys/wait.h>.
	(pid): New variable.
	(do_keyctl): Update expected output.
	(main): Fork a subprocess and move all keyctl syscalls there,
	update expected output.
	* tests/gen_tests.in (keyctl, keyctl-Xabbrev, keyctl-Xraw,
	keyctl-Xverbose): Add options: -f --signal='!chld'.

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

	tests/keyctl.c: make all global variables static.
	* tests/keyctl.c (nul_terminated_buf, buf_in_arg): Add static qualifier.

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

2021-12-01  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-12-01  Dmitry V. Levin  <ldv@strace.io>

	Fix typos found using codespell tool.
	* debian/changelog.in: Replace "archictectures" with "architectures".
	* tests/cur_audit_arch.h: Replace "arcitectures" with "architectures".

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

	tests: fix net-sockaddr test on older systems.
	* tests/net-sockaddr.c (check_ipx): Explicitly initialize ipx->sipx_zero
	before use.

	Fixes: v5.14-96-g8352a541f "sockaddr: print struct sockaddr_ipx.sipx_zero if it is non-zero"

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

	tests: robustify ioctl_hdio tests.
	* tests/ioctl_hdio.c (main): Do not assume 0xdeadbeef is an inaccessible
	pointer because sometimes this address is accessible, create an
	inaccessible pointer and use it instead of 0xdeadbeef.

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

	tests: disable tests for invalid msgctl and semctl commands on glibc >= 2.28
	Starting with commit glibc-2.32.9000-149-gbe9b0b9a012780a403a2,
	glibc skips msgctl syscall invocations and returns EINVAL
	for invalid msgctl commands.

	Likewise, starting with commit glibc-2.32.9000-147-ga16d2abd496bd974a882,
	glibc skips semctl syscall invocations and returns EINVAL
	for invalid semctl commands.

	These changes were later backported to vendor packages, e.g.:
	  * Thu Mar 18 2021 Carlos O'Donell <carlos@redhat.com> - 2.28-153
	  - Support SEM_STAT_ANY via semctl. Return EINVAL for unknown commands
	    to semctl, msgctl, and shmctl. (#1912670)

	* tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 28)] (TEST_MSGCTL_BOGUS_CMD):
	Define to 0.
	* tests/ipc_sem.c [GLIBC_PREREQ_GE(2, 28)] (TEST_SEMCTL_BOGUS_CMD):
	Likewise.

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

	upoken: workaround buggy process_vm_writev.
	The upoken implementation assumed that process_vm_writev could perform
	partial writes, but in older Linux kernel versions (my guess is in Linux
	before v3.15) process_vm_writev could not do partial writes properly.

	* src/ucopy.c (upoken): Fall back to upoken_pokedata when
	process_vm_writev fails with EFAULT or EIO.

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

	gcc_compat.h: bump required GCC version for diagnostic workarounds.
	Diagnostic push/pop pragmas were added only in gcc 4.6.

	* src/gcc_compat.h [!GNUC_PREREQ(4, 6)] (DIAG_PUSH_IGNORE_OVERRIDE_INIT,
	DIAG_POP_IGNORE_OVERRIDE_INIT, DIAG_PUSH_IGNORE_NONNULL,
	DIAG_POP_IGNORE_NONNULL): Define as empty.

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

	sttaic_assert: disable -Wnested-externs when the fallback is used.
	The fallback is only used with old compilers, and their diagnostics
	is less useful anyway.

	* src/static_assert.h [!HAVE_STATIC_ASSERT && !HAVE__STATIC_ASSERT &&
	__GNUC__]: Disable "-Wnested-externs" diagnostics.

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

	tests/sockaddr_xlat: explicitly nest anonymous union member initialisation
	Unfortunately, gcc 4.4.7 from RHEL 6 does not support designated
	initialisation of members of anonymous unions/structs without additional
	nesting brackets.

	* tests/sockaddr_xlat.c (check_ieee802154): Add curly brackets around
	short_addr/hwaddr field initialisation, prepend with pan_id field
	initialisation where needed.

	Complements: v5.14-167-g87ba9609f "sockaddr: implement decoding of AF_IEEE802154 socket addresses"

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

	socketutils: fix protocol lookup in get_sockaddr_by_inode_lookup.
	If getfdproto() fails to obtain system.sockprotoname attribute,
	it returns SOCK_PROTO_UNKNOWN.  When this happens,
	get_sockaddr_by_inode_lookup() receives no hints about the protocol
	number and falls back to iterating over the protocols table.
	Apparently, it failed to implement this properly.

	* src/socketutils.c (get_sockaddr_by_inode_lookup): When iterating
	over protocols table, pass data from protocols[i] instead of
	protocols[SOCK_PROTO_UNKNOWN] to protocols[i].get().

	Fixes: v4.25~37 "socketutils: store more information in protocols table"

2021-11-29  Dmitry V. Levin  <ldv@strace.io>

	exec_or_die: fix race condition.
	* src/strace.c (exec_or_die): Repeat wait() invocation while it fails
	with EINTR.

	tests/count-f.c: fix race condition.
	* tests/count-f.c (main): Allow waitpid() to fail with EINTR.

	tests/attach-f-p.c: fix race condition.
	* tests/attach-f-p.c (thread): Allow read() to fail with EINTR.

2021-11-29  Dmitry V. Levin  <ldv@strace.io>

	m4: fix st_SELINUX check.
	* m4/st_selinux.m4: Make sure selinux support is enabled only if
	all expected functions are provided by libselinux.

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

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

	NEWS: mention --decode-fds={socket,dev,pidfd} behaviour fix.
	Complements: v5.14-193-g8d83c8270 "Do not decode fd path unless --decode-fds=path is specified"

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

	Document AT_FDCWD path decoding feature.
	* doc/strace.1.in (-e decode-fds, -y): Mention that current working
	directory is printed on AT_FDCWD occurrence in addition to fd path decoding.
	* NEWS: Mention it.

	Complements: v5.14-199-g48de116c2 "Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used"

2021-11-29  Renaud Métrich  <rmetrich@redhat.com>
	    Dmitry V. Levin  <ldv@strace.io>

	tests: check corner cases of AT_FDCWD path decoding.
	* tests/at_fdcwd-pathmax.c: New file.
	* tests/.gitignore: Add at_fdcwd-pathmax.
	* tests/pure_executables.list: Likewise.
	* tests/gen_tests.in (at_fdcwd-pathmax): New test.

2021-11-28  Renaud Métrich  <rmetrich@redhat.com>
	    Dmitry V. Levin  <ldv@strace.io>

	Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used.
	When syscalls use AT_FDCWD (e.g. openat()), the corresponding current
	working directory is not always obvious, one might need to search back
	for chdir() syscalls in the process or some of its parents.

	With this change, the current working directory corresponding to
	AT_FDCWD is printed when -y (--decode-fd=path) option is used, e.g.:

	openat(AT_FDCWD</home/rmetrich/GIT/strace>, "/lib64/libselinux.so.1" ...)

	* src/open.c: Include "number_set.h".
	(print_dirfd) <fd == AT_FDCWD>: Print the current working directory of
	tracee when DECODE_FD_PATH is set.
	* tests/dev-yy.c [!PRINT_AT_FDCWD_PATH] (PRINT_AT_FDCWD_PATH):
	New macro.
	(main): Update expected output.
	* tests/dev--decode-fds-all.c (PRINT_DEVNUM): New macro.
	Include "dev-yy.c" instead of "dev--decode-fds-dev.c".
	* tests/dev--decode-fds-dev.c (PRINT_AT_FDCWD_PATH): New macro.
	* tests/dev--decode-fds-path.c (PRINT_AT_FDCWD_PATH): Likewise.
	* tests/faccessat.c (AT_FDCWD_FMT, AT_FDCWD_ARG): New macros.
	(tests_with_existing_file, main): Update expected output.
	* tests/faccessat2.c (YFLAG): New macro.
	(main): Update expected output.
	* tests/fsconfig.c (test_fsconfig_set_path): Update expected output.
	* tests/fspick.c (main): Likewise.
	* tests/mount_setattr.c (main): Likewise.
	* tests/move_mount.c (main): Likewise.
	* tests/open_tree.c (main): Likewise.
	* tests/openat2.c (YFLAG, AT_FDCWD_FMT, AT_FDCWD_ARG): New macros.
	(main): Update expected output.

	Resolves: https://github.com/strace/strace/issues/194

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

	tests: fix bpf-obj_get_info_by_fd-prog-v expected output.
	Since we cannot reliably predict the value of xlated_prog_len field
	returned by the kernel, do not hard-code it.

	* tests/bpf-obj_get_info_by_fd.c (main): Print the value
	of the xlated_prog_len field returned by the kernel
	instead of hard-coding an expected value.

	Fixes: v5.14-46-g835c65c0e "bpf: fix bpf_prog_info.map_ids array printing"

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

	Make --decode-pids usage more in line with --decode-fds.
	Enable -e decode-pids syntax and document it in the man page.

	* src/filter_qualify.c (qual_options): Add "decode-pid" and "decode-pids"
	that associated with qualify_decode_pid decoder.
	* tests/options-syntax.test: Add option syntax checks for --decode-pids
	and -e decode-pids.
	* doc/strace.1.in (.BI "\-e " expr): Document decode-pids/decode-pid as
	a possible argument.
	(.SS Output format): Document -e decode-pids/--decode-pids.

	Complements: v5.14-184-gbac60e6a0 "Use traditional parser for --decode-pids option"

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

	src/strace.c: remove Yflag_qual.
	It is used only once, contrary to {y,q,t}flag_qual variables.

	* src/strace.c (init) <Yflag_qual>: Remove.
	(init) <case 'Y'>: Replace Yflag_qual with "comm" in the argument
	to qualify_decode_pid.

	Complements: v5.14-180-g255a59247 "Implement -Y/--decode-pids=comm option for printing command names for PIDs"

2021-11-28  Dmitry V. Levin  <ldv@strace.io>

	tests: remove ATTRIBUTE_ALLOC_SIZE from tail_alloc and tail_memdup.
	Many tests are intentionally feeding their target syscalls with garbage.
	Unfortunately, the compiler stands in the way, issuing tons of
	-Warray-bounds and -Wstringop-overread warnings when it is aware
	of the amount of memory allocated by tail_alloc and tail_memdup.

	* m4/st_broken_cc.m4: Remove.
	* configure.ac: Remove st_BROKEN_CC invocation.
	* tests/tests.h (tail_alloc, tail_memdup): Remove ATTRIBUTE_ALLOC_SIZE
	attribute.

	Resolves: https://github.com/strace/strace/issues/203

2021-11-28  Alex Xu (Hello71)  <alex_y_xu@yahoo.ca>

	tests: add shebang where necessary.
	musl does not implement the shell fallback for execvp, causing tests
	to fail.  It is also good practice to provide a shebang anyway.

	* tests/qual_fault-syscall.test: Add shebang.
	* tests/qual_inject-error-signal-syscall.test: Likewise.
	* tests/qual_inject-retval-syscall.test: Likewise.
	* tests/qual_inject-signal-syscall.test: Likewise.

	Resolves: https://github.com/strace/strace/issues/202

2021-11-27  Dmitry V. Levin  <ldv@strace.io>

	Do not decode fd path unless --decode-fds=path is specified.
	Before this change, --decode-fds with any argument would result to the
	file path corresponding to the file descriptor being printed even when
	the descriptor type does not match the type specified by the
	--decode-fds argument.  After this change, the file path corresponding
	to the file descriptor will be printed only when --decode-fds argument
	is not specified or contains "path".

	* src/util.c (print_quoted_string_in_angle_brackets): New function.
	(printfd_pid): Use it to print the file path when DECODE_FD_PATH is set.
	* tests/dev--decode-fds-all.c: New file.
	* tests/dev--decode-fds-none.c: Likewise.
	* tests/net--decode-fds-all-netlink.c: Likewise.
	* tests/pidfd_open--decode-fd-all.c: Likewise.
	* tests/pidfd_open--decode-fd-none.c: Likewise.
	* tests/dev--decode-fds-socket.c: Include "dev--decode-fds-none.c"
	instead of "dev-yy.c".
	(PRINT_DEVNUM): Remove.
	* tests/dev-yy.c: Add PRINT_PATH support.
	* tests/net--decode-fds-dev-netlink.c: Include
	"net--decode-fds-none-netlink.c" instead of net-yy-netlink.c.
	(PRINT_SOCK): Remove.
	* tests/pidfd_open--decode-fd-socket.c: Include
	"pidfd_open--decode-fd-none.c" instead of "pidfd_open-y.c".
	* tests/.gitignore: Add dev--decode-fds-all, dev--decode-fds-none,
	net--decode-fds-all-netlink, pidfd_open--decode-fd-all, and
	pidfd_open--decode-fd-none.
	* tests/pure_executables.list: Likewise.
	* tests/gen_tests.in (dev--decode-fds-all, dev--decode-fds-none,
	net--decode-fds-all-netlink, pidfd_open--decode-fd-all,
	pidfd_open--decode-fd-none): New tests.
	(dev--decode-fds-socket): Update argument for -a option.
	(net--decode-fds-dev-netlink): Add -a option.

	Reported-by: Renaud Métrich <rmetrich@redhat.com>
	Fixes: v5.6~168 "strace: add a long option alias for -y"

2021-11-27  Dmitry V. Levin  <ldv@strace.io>

	Move printing of angle brackets from printfd_pid to individual printers.
	This is required by the follow-up change.

	* src/defs.h (print_sockaddr_by_inode): Remove.
	* src/socketutils.c (print_sockaddr_by_inode_cached,
	print_sockaddr_by_inode_uncached, print_sockaddr_by_inode): Likewise.
	(get_sockaddr_by_inode_uncached): Rename to
	get_sockaddr_by_inode_lookup, implement get_sockaddr_by_inode_uncached
	on top of it.
	* src/util.c (printsocket): Rewrite using get_sockaddr_by_inode instead
	of print_sockaddr_by_inode, print angle brackets around the output
	string.
	(printdev, printpidfd): Print angle brackets around the output string.
	(printfd_pid): Do not print angle brackets around the output string.

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

	doc/strace.1: elaborate on support of multiple PIDs as a -p argument.
	While it was mentioned that -p "`pidof PROG`" syntax is supported,
	it was not explicitly stated what characters can be used as separators
	(like newline, which is used by pgrep, as noted in process_opt_p_list).

	* doc/strace.1.in (.SS Startup): Explicitly mention that multiple PIDs
	can be provided as an argument to a single -p option;  list all
	supported separator characters;  mention possible -p "$(pgrep PROG)"
	syntax.

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

	pidns: reorder struct translate_id_params fields.
	Moving output fields after input ones reduces the structure size
	by whopping 25 percents (from 32 down to 24 bytes) on 64-bit systems,
	and also makes the order of the fields a bit more natural.

	* src/pidns.c (struct translate_id_params) <result_id, pd>: Move
	to the end of the structure.
	(translate_pid) <tip>: Reorder field initialisation in order
	with the field order.

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

	src/linux/x32/syscallent.h: add TSD flag to execve#64 and execveat#64.
	They are to be always traced with seccomp-bpf, similarly to their x32
	counterparts.

	Fixes: v5.3~36 "Add seccomp filter syscall flag"

2021-11-24  Dmitry V. Levin  <ldv@strace.io>

	tests: check diagnostics that -k has no effect with -c.
	* tests/options-syntax.test: Check strace -c -k diagnostics.

2021-11-23  Dmitry V. Levin  <ldv@strace.io>

	Fix formatting of --decode-pids=comm output.
	Do not print an extra space between the pid number and the comm string
	when the number is less than 10000.

	* src/strace.c (printleader) <print_pid_pfx && len>: Print pid using %u
	format instead of %-5u.
	* tests/strace--decode-pids-comm.c (do_default_action): Update expected
	output.
	* tests/strace-p1-Y-p.c (main): Likewise.

2021-11-22  Dmitry V. Levin  <ldv@strace.io>

	tests: check that -p pid1 -Y -p pid2 prints /proc/$pid1/comm properly.
	* tests/strace-p1-Y-p.c: New file.
	* tests/strace-p-Y-p2.c: Likewise.
	* tests/strace-p-Y-p.test: New test.
	* tests/.gitignore: Add strace-p1-Y-p and strace-p-Y-p2.
	* tests/Makefile.am (check_PROGRAMS): Likewise.
	(MISC_TESTS): Add strace-p-Y-p.test.

2021-11-21  Dmitry V. Levin  <ldv@strace.io>

	Refactor printleader to reduce code duplication.
	* src/strace.c (print_comm_str): New function.
	(printleader, print_pid_comm): Use it to print command names obtained
	from /proc/$pid/comm.

2021-11-20  Dmitry V. Levin  <ldv@strace.io>

	Use traditional parser for --decode-pids option.
	Use the same method of handling --decode-pids arguments as for other
	options with bitset arguments.  This enables such options syntax as
	--decode-pids=comm,pidns and --decode-pids=all.

	* src/defs.h (pid_decoding, pid_decoding_flags): Remove.
	(maybe_printpid_comm): Rename to print_pid_comm.
	* src/filter_qualify.c (decode_pid_set): New variable.
	(decode_pid_str_to_uint): New function.
	(qualify_decode_pid): Rewrite using qualify_tokens.
	* src/filter_seccomp.c (traced_by_seccomp): Use decode_pid_set instead
	of pid_decoding.
	* src/pidns.c (printpid_translation): Likewise.
	* src/number_set.h (decode_pid_bits): New enum.
	(decode_pid_set): New variable declaration.
	* src/strace.c (pid_decoding): Remove.
	(printleader, maybe_load_task_comm, init): Use decode_pid_set instead of
	pid_decoding.
	(maybe_printpid_comm): Likewise, rename to print_pid_comm.
	* tests/options-syntax.test: Update expected output.

2021-11-14  Dmitry V. Levin  <ldv@strace.io>

	Properly escape strings printed by -Y/--decode-pids=comm option.
	Command names obtained from /proc/$pid/comm can contain arbitrary
	symbols and therefore require proper escaping.

	* src/strace.c (printleader): Print tcp->comm using
	print_quoted_string_ex.
	(maybe_printpid_comm): Print the data obtained from load_pid_comm
	using print_quoted_string_ex.
	* tests/strace--decode-pids-comm.c (do_default_action): Check it.

	Resolves: https://github.com/strace/strace/issues/191

2021-11-14  Masatake YAMATO  <yamato@redhat.com>
	    Dmitry V. Levin  <ldv@strace.io>

	Extend -Y option to decode PIDs in arguments and return values.
	This change extends -Y/--decode-pids=comm option.  In addition to the
	information printed before this change, command names would be printed
	also for PIDs appeared in syscall arguments and return values.

	For example:

	  getppid()                  = 3781395<strace>
	  getpid()                   = 3781398<a.out>
	  pidfd_open(1<systemd>, 0)  = 3<pid:1<systemd>>

	NOTE: The code printing the pid in printclockname() is not changed in
	this commit.  CLOCKID_TO_FD macro used in printclockname() was removed
	from the kernel, so printclockname() may change drastically in the
	near future.

	* src/defs.h (maybe_printpid_comm): New function declaration.
	* src/strace.c (maybe_printpid_comm): New function printing
	command name for the given PID.
	* src/pidns.c (printpid_translation): Call `maybe_printpid_comm'.
	* tests/strace--decode-pids-comm.c (do_default_action): Update expected
	output.

2021-11-14  Masatake YAMATO  <yamato@redhat.com>
	    Dmitry V. Levin  <ldv@strace.io>

	tests: add tests for -Y/--decode-pids=comm option.
	* tests/strace--decode-pids-comm.c: New file.
	* tests/strace-Y-0123456789.c: Likewise.
	* tests/gen_tests.in (strace-Y-0123456789, strace--decode-pids-comm):
	New tests.
	* tests/Makefile.am (CHECK_PROGRAMS): Add strace-Y-0123456789 and
	strace--decode-pids-comm.
	* tests/.gitignore: Likewise.

2021-11-14  Masatake YAMATO  <yamato@redhat.com>
	    Dmitry V. Levin  <ldv@strace.io>

	Implement -Y/--decode-pids=comm option for printing command names for PIDs
	In some applications like qemu-kvm, threads change their
	command names to indicate their roles in the application.
	Users can access the command name via /proc/$pid/comm.
	The command name can be a great hint to understand the application
	behavior.

	This change introduces -Y/-decode-pids=comm option that enables
	printing command names where PIDs appear.

	For example (without -Y option):

	[pid 254329] ioctl(18, KVM_RUN <unfinished ...>
	[pid 254332] ioctl(21, KVM_RUN <unfinished ...>
	[pid 254331] ioctl(20, KVM_RUN <unfinished ...>
	[pid 254330] ioctl(19, KVM_RUN <unfinished ...>
	[pid 254309] poll([{fd=9, events=POLLOUT}], 1, 0) = 1 ...
	[pid 254309] poll([{fd=9, events=POLLOUT}], 1, 0) = 1 ...

	(with -Y option):

	[pid 254329<CPU 0/KVM>] ioctl(18, KVM_RUN <unfinished ...>
	[pid 254332<CPU 3/KVM>] ioctl(21, KVM_RUN <unfinished ...>
	[pid 254331<CPU 2/KVM>] ioctl(20, KVM_RUN <unfinished ...>
	[pid 254330<CPU 1/KVM>] ioctl(19, KVM_RUN <unfinished ...>
	[pid 254309<qemu-system-x86>] poll([{fd=9, events=POLLOUT}], 1, 0) = 1 ...
	[pid 254309<qemu-system-x86>] poll([{fd=9, events=POLLOUT}], 1, 0) = 1 ...

	This change considers only PIDs in the prefixes of trace lines.
	Printing command names for PIDs in arguments and return values
	will be implemented in a follow-up commit.

	* doc/strace.1.in (.SS Output format): Document -Y and
	--decode-pids=comm options.
	* src/strace.c (usage): Describe -Y and --decode-pids=comm options.
	(printleader): Print the command name for the given tcb.
	(init): Add -Y/--decode-pids=comm option.
	Call `qualify_decode_pid' when one of the options is given.
	Call `maybe_load_task_comm' to handle the case the options are given
	after -p option.
	* src/filter_qualify.c (qualify_decode_pid): Set PID_DECODING_COMM
	and PID_DECODING_NS_TRANSLATION flags to pid_decoding if "comm" is given.
	* NEWS: Mention this change.

	Enabling PID_DECODING_NS_TRANSLATION for "comm" argument is
	Suggested-by: Ákos Uzonyi <uzonyi.akos@gmail.com>.

2021-11-14  Masatake YAMATO  <yamato@redhat.com>
	    Dmitry V. Levin  <ldv@strace.io>

	Load /proc/$pid/comm into struct tcb.
	In preparation for the forthcoming -Y/--decode-pids=comm option.

	Load the content of /proc/$pid/comm to `comm', a newly introduced
	member of struct tcb.

	The loading is done when
	A. a tcb is initialized,
	B. execve or execveat is called, and
	C. prctl(PR_SET_NAME,...) is called.

	Limitation: this change is not enough for handling the case that
	someone writes a value to /proc/$pid/comm directly.
	(e.g. running echo "foo" > /proc/$pid/comm)

	* src/defs.h (struct tcb): New member `comm'.
	(enum pid_decoding_flags): Add PID_DECODING_COMM as a new flag.
	(PROC_COMM_LEN): New macro.
	(maybe_load_task_comm): New function declaration.
	* src/strace.c (strip_trailing_newlines): New function.
	(load_task_comm): New function loading the contents of /proc/$pid/comm
	into struct tcb.comm.
	(maybe_load_pid_comm): New function.
	(alloctcb): Call it for initializing the `comm' member.
	* src/syscall.c: Include <linux/prctl.h>.
	(syscall_exiting_decode): Call maybe_load_task_comm().
	* src/sysent.h (COMM_CHANGE): New macro.
	* src/sysent_shorthand_defs.h (CC): Likewise.
	* src/sysent_shorthand_undefs.h (CC): Undefine.
	* src/linux/32/syscallent.h: Add CC flag to syscalls changing
	/proc/$pid/comm.
	* 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.
	* src/filter_seccomp.c (traced_by_seccomp): Force tracing syscalls
	marked with `COMM_CHANGE' if `PID_DECODING_COMM' flag is set in
	`pid_decoding'.

2021-11-14  Masatake YAMATO  <yamato@redhat.com>
	    Dmitry V. Levin  <ldv@strace.io>

	Introduce --decode-pids=pidns as an alias for --pidns-translation.
	In preparation for the forthcoming -Y/--decode-pids=comm option.

	* doc/strace.1.in (.SS Output format): Document --decode-pids=pidns
	option.
	* src/defs.h (pidns_translation): Remove.
	(pid_decoding): New variable declaration.
	(enum pid_decoding_flags): New enum.
	(qualify_decode_pid): New function prototype.
	* src/strace.c (pidns_translation): Remove.
	(pid_decoding): New variable.
	(usage): Describe --decode-pids=pidns option.
	(init) <enum>: Add GETOPT_QUAL_DECODE_PID.
	<longopts>: Add --decode-pids as a long option.
	<case GETOPT_PIDNS_TRANSLATION>: Call qualify_decode_pid
	to update pid_decoding indirectly.
	<case GETOPT_QUAL_DECODE_PID>: New condition.
	* src/filter_qualify.c (qualify_decode_pid): New function.
	* src/pidns.c (printpid_translation): Refer to pid_decoding as
	the replacement for pidns_translation.
	* tests/init.sh (test_pidns_run_strace): Replace --pidns-translation
	with --decode-pids=pidns.
	* tests/options-syntax.test: Check invalid --decode-pids argument.
	* NEWS: Mention this change.

	Making --decode-pids option a super set of --pidns-translation option is
	Suggested-by: by Eugene Syromyatnikov <evgsyr@gmail.com>.

2021-11-14  Masatake YAMATO  <yamato@redhat.com>

	Use printpid for printing pid of pidfd.
	* src/util.c (printpidfd): Use printfd instead of
	PRINT_VAL_D.

	Suggested-by: Ákos Uzonyi <uzonyi.akos@gmail.com>

2021-11-13  Srikavin Ramkumar  <srikavinramkumar@gmail.com>
	    Dmitry V. Levin  <ldv@strace.io>

	hdio: improve HDIO support.
	Add decoders for HDIO_DRIVE_RESET, HDIO_GET_32BIT, HDIO_GET_ACOUSTIC,
	HDIO_GET_ADDRESS, HDIO_GET_BUSSTATE, HDIO_GET_DMA, HDIO_GET_IDENTITY,
	HDIO_GET_KEEPSETTINGS, HDIO_GET_MULTCOUNT, HDIO_GET_NICE, HDIO_GET_NOWERR,
	HDIO_GET_UNMASKINTR, HDIO_GET_WCACHE, HDIO_OBSOLETE_IDENTITY, HDIO_SCAN_HWIF,
	HDIO_SET_32BIT, HDIO_SET_ACOUSTIC, HDIO_SET_ADDRESS, HDIO_SET_BUSSTATE,
	HDIO_SET_DMA, HDIO_SET_KEEPSETTINGS, HDIO_SET_MULTCOUNT, HDIO_SET_NICE,
	HDIO_SET_NOWERR, HDIO_SET_PIO_MODE, HDIO_SET_UNMASKINTR, HDIO_SET_WCACHE,
	and HDIO_UNREGISTER_HWIF.

	[ldv: note that HDIO compat has never been supported by the kernel, so
	adjust HDIO ioctl decoder and its tests accordingly.]

	* maint/gen/defs/hdio.def: New file.
	* src/gen/gen_hdio.c: New generated file.
	* src/gen/generated.h: Likewise.
	* src/Makefile.am (libstrace_a_SOURCES): Add gen/generated.h and
	gen/gen_hdio.c.
	* src/hdio.c: Include "gen/generated.h".
	(hdio_ioctl): Call var_ioctl_HDIO for unimplemented commands.
	* src/xlat/hdio_busstates.in: New file.
	* src/xlat/hdio_ide_nice.in: Likewise.
	* tests/ioctl_hdio.c: Add tests for newly implemented commands.
	* NEWS: Mention this change.

	Resolves: https://github.com/strace/strace/issues/131

2021-11-13  Dmitry V. Levin  <ldv@strace.io>

	maint/gen: use print_xint_array_member to print uint32_t arrays.
	* maint/gen/defs/common.def (ptr[in, array[uint32_t, $1]]): Replace
	print_uint_array_member with print_xint_array_member.

2021-11-13  Dmitry V. Levin  <ldv@strace.io>

	maint/gen: use printflags64 and printxval64 instead of 32-bit versions.
	This is necessary to print 64-bit integer types properly.

	* maint/gen/codegen.c (generate_printer): Use printflags64 instead of
	printflags, use printxval64 instead of printxval.

2021-11-13  Dmitry V. Levin  <ldv@strace.io>

	maint/gen: cleanup.
	* maint/gen/xmalloc.c: New file.
	* maint/gen/xmalloc.h: Likewise.
	* maint/gen/Makefile: Rewrite.
	* maint/gen/codegen.c: Add copyright header, wrap very long lines,
	use CLEANUP_FREE, xstrdup, and xasprintf.
	* maint/gen/ast.c: Add copyright header, wrap very long lines,
	use xstrdup.
	* maint/gen/ast.h: Add copyright header, wrap very long lines.
	* maint/gen/deflang.h: Add copyright header and include guard,
	wrap very long lines, add attributes to prototypes.
	* maint/gen/lex.l: Add copyright header, wrap very long lines,
	fix warnings, use xstrdup.
	* maint/gen/parse.y: Add copyright header, wrap very long lines,
	fix warnings.
	* maint/gen/preprocess.c: Add copyright header, wrap very long lines.
	* maint/gen/preprocess.h: Include "ast.h".
	* maint/gen/symbols.c: Wrap very long lines, use xasprintf.
	* maint/gen/symbols.h: Wrap very long lines.
	* maint/gen/defs/common.def: Add copyright header.

2021-11-13  Srikavin Ramkumar  <srikavinramkumar@gmail.com>

	maint: add a definition-based syscall decoder generator.
	Implement a code generation tool capable of parsing system call definitions
	and generating system call decoders.

	* maint/gen/.gitignore: New file.
	* maint/gen/Makefile: Likewise.
	* maint/gen/README.md: Likewise.
	* maint/gen/ast.c: Likewise.
	* maint/gen/ast.h: Likewise.
	* maint/gen/codegen.c: Likewise.
	* maint/gen/deflang.h: Likewise.
	* maint/gen/defs/common.def: Likewise.
	* maint/gen/lex.l: Likewise.
	* maint/gen/parse.y: Likewise.
	* maint/gen/preprocess.c: Likewise.
	* maint/gen/preprocess.h: Likewise.
	* maint/gen/symbols.c: Likewise.
	* maint/gen/symbols.h: Likewise.

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

	rtnl_link: implement IFLA_AF_SPEC decoding for AF_BRIDGE.
	It is special with relation to the others as it employs a completely
	different structure, disregarding the existing one.

	* src/xlat/rtnl_ifla_af_spec_bridge_attrs.in: New file.
	* src/xlat/rtnl_ifla_af_spec_bridge_vlan_tunnel_info_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_bridge_flags.in: Likewise.
	* src/xlat/rtnl_ifla_bridge_modes.in: Likewise.
	* src/defs.h (nl_bridge_vlan_flags): New declaration.
	* src/rtnl_link.c: Include <linux/if_bridge.h>,
	"xlat/rtnl_ifla_af_spec_bridge_attrs.h",
	"xlat/rtnl_ifla_af_spec_bridge_vlan_tunnel_info_attrs.h",
	"xlat/rtnl_ifla_bridge_flags.h", and "xlat/rtnl_ifla_bridge_modes.h".
	(decode_ifla_bridge_flags, decode_ifla_bridge_mode,
	decode_ifla_bridge_vlan_info, decode_bridge_vlan_info_flags,
	decode_ifla_bridge_vlan_tunnel_info): New functions.
	(ifla_af_spec_bridge_vlan_tunnel_info_decoders,
	ifla_af_spec_bridge_nla_decoders): New decoder tables.
	(decode_ifla_af_spec): Add special handling for the ifi_family=AF_BRIDGE
	case by calling decode_nlattr directly with
	rtnl_ifla_af_spec_bridge_attrs and ifla_af_spec_bridge_nla_decoders.
	* tests/nlattr_ifla_af_spec.c: Include <linux/if_bridge.h>.
	(msg_af, msg_af_str): New static variables.
	(IFLA_AF): New macro, define to msg_af.
	(IFLA_AF_STR): New macro, define to msg_af_str.
	(init_IFLA_BRIDGE_VLAN_TUNNEL_INFO_msg,
	print_IFLA_BRIDGE_VLAN_TUNNEL_INFO_msg): New functions, defined
	via AF_SPEC_FUNCS.
	(main): Check unsupported IFLA_AF_SPEC address families for each
	ifinfomsg address family, skip AF_BRIDGE; add AF_BRIDGE IFLA_AF_SPEC
	checks.
	* NEWS: Mention it.

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

	tests: move ENUM_KNOWN to tests.h.
	Its definition is shared by several tests already.

	* tests/tests.h (ENUM_KNOWN): New macro, yet another wrapper
	for XLAT_KNOWN.
	* tests/nlattr_cachereport.c (ENUM_KNOWN): Remove.
	* tests/nlattr_ifla_brport.c (ENUM_KNOWN): Likewise.
	* tests/nlattr_ifla_vfinfo.c (ENUM_KNOWN): Likewise.

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

	sockaddr: enhance decoding of AF_NETLINK socket addresses.
	Before, the size limit was incorrect and padding was never printed.

	* src/sockaddr.c (print_sockaddr_data_nl): Print nl_pad field
	if it is non-zero.
	(sa_printers) <[AF_NETLINK]>: Fix the min_len field value.
	* tests/net-sockaddr.c (check_nl): Add checks for undersized sockaddr
	and non-zero nl_pad; explicitly initialise nl_pad to zero when needed.
	* NEWS: Mention it.

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

	sockaddr: implement decoding of AF_RXRPC socket addresses.
	* configure.ac (AC_CHECK_HEADERS): Add linux/rxrpc.h.
	* src/xlat/rxrpc_services.in: New file.
	* src/sockaddr.c: Include "xlat/rxrpc_services.h".
	(struct sockaddr_rxrpc): New type definition.
	(print_sockaddr_data_rxrpc): New function.
	(sa_printers) <[AF_RXRPC]>: New printer.
	* tests/sockaddr_xlat.c [HAVE_LINUX_RXRPC_H]: Include <linux/rxrpc.h>.
	[!HAVE_LINUX_RXRPC_H] (struct sockaddr_rxrpc): New type definition.
	(#include "xlat/addrfams.h"): Move out of XLAT_MACROS_ONLY definition.
	(check_rxrpc): New function.
	(main): Call it.
	* NEWS: Mention it.

	sockaddr: implement decoding of AF_IEEE802154 socket addresses.
	* src/xlat/ieee802154_addr_types.in: New file.
	* src/xlat/ieee802154_addrs.in: Likewise.
	* src/xlat/ieee802154_pan_ids.in: Likewise.
	* src/sockaddr.c: Include "xlat/ieee802154_addr_types.h",
	"xlat/ieee802154_addrs.h", and "xlat/ieee802154_pan_ids.h".
	(IEEE802154_ADDR_LEN): New macro.
	(struct ieee802154_addr_sa, struct sockaddr_ieee802154): New type
	definitions.
	(print_sockaddr_data_ieee802154): New function.
	(sa_printers) <[AF_IEEE802154]>: New printer.
	* tests/sockaddr_xlat.c (IEEE802154_ADDR_NONE, IEEE802154_ADDR_SHORT,
	IEEE802154_ADDR_LONG): New enum items.
	(IEEE802154_ADDR_LEN, IEEE802154_PANID_BROADCAST,
	IEEE802154_ADDR_BROADCAST, IEEE802154_ADDR_UNDEF): New macros.
	(struct ieee802154_addr_sa, struct sockaddr_ieee802154): New type
	definitions.
	(check_ieee802154): New function.
	(main): Call it.
	* NEWS: Mention it.

	sockaddr: implement decoding of AF_ALG socket addresses.
	* bundled/linux/include/uapi/linux/if_alg.h: New file, imported from
	headers_install'ed Linux kernel v5.15.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/xlat/alg_sockaddr_flags.in: New file.
	* configure.ac (AC_CHECK_HEADERS): Check for linux/if_alg.h.
	(AC_CHECK_TYPES): Check for struct sockaddr_alg_new.
	* src/sockaddr.c: Include <linux/if_alg.h>
	and "xlat/alg_sockaddr_flags.h".
	(print_sockaddr_data_alg): New functions.
	(sa_printers) <[AF_ALG]>: New printer.
	* tests/sockaddr_xlat.c [HAVE_LINUX_IF_ALG_H]: Include <linux/if_alg.h>.
	[!HAVE_LINUX_IF_ALG_H] (struct sockaddr_alg): New type definition.
	[!CRYPTO_ALG_KERN_DRIVER_ONLY] (CRYPTO_ALG_KERN_DRIVER_ONLY): New macro
	constant.
	[!HAVE_STRUCT_SOCKADDR_ALG_NEW] (struct sockaddr_alg_new): New type
	definition.
	(check_alg): New function.
	(main): Call it.
	* NEWS: Mention it.

	sockaddr: implement decoding of AF_NFC socket addresses.
	* bundled/linux/include/uapi/linux/nfc.h: New file, imported from
	headers_install'ed Linux kernel v5.15.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Add linux/nfc.h.
	* src/xlat/nfc_saps.in: New file.
	* src/xlat/nfc_sockaddr_protocols.in: Likewise.
	* src/sockaddr.c: Include <linux/nfc.h>, "xlat/nfc_saps.h",
	and "xlat/nfc_sockaddr_protocols.h".
	(print_sockaddr_data_nfc): New function.
	(sa_printers) <[AF_NFC]>: New printer.
	* tests/sockaddr_xlat.c [HAVE_LINUX_NFC_H]: Include <linux/nfc.h>.
	[!HAVE_LINUX_NFC_H] (NFC_LLCP_MAX_SERVICE_NAME): New macro.
	[!HAVE_LINUX_NFC_H] (struct sockaddr_nfc, struct sockaddr_nfc_llcp): New
	type definitions.
	(check_nfc): New function.
	(main): Call check_nfc.
	* NEWS: Mention it.

	sockaddr: implement decoding of AF_VSOCK socket addresses.
	* configure.ac (AC_CHECK_HEADERS): Add linux/vm_sockets.h.
	(AC_CHECK_TYPES): Check for struct sockaddr_vm.
	(AC_CHECK_MEMBERS): Check for struct sockaddr_vm.svm_flags.
	* src/xlat/vsock_cids.in: New file.
	* src/xlat/vsock_flags.in: Likewise.
	* src/xlat/vsock_ports.in: Likewise.
	* src/sockaddr.c: Include <linux/vm_sockets.h>, "xlat/vsock_cids.h",
	"xlat/vsock_flags.h", and "xlat/vsock_ports.h".
	(print_sockaddr_data_vsock): New function.
	(sa_printers) <[AF_VSOCK]>: New printer.
	* tests/sockaddr_xlat.c [HAVE_LINUX_VM_SOCKETS_H]: Include
	<linux/vm_sockets.h>.
	[!HAVE_STRUCT_SOCKADDR_VM] (struct sockaddr_vm): New type definition.
	(SVM_FLAGS, SVM_ZERO, SVM_ZERO_FIRST): New macros.
	(check_vsock): New function.
	(main): Call it.
	* NEWS: Mention it.

	sockaddr: implement decoding of AF_QIPCRTR socket addresses.
	* bundled/linux/include/uapi/linux/qrtr.h: New file, imported from
	headers_install'ed Linux kernel v5.15.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Add linux/qrtr.h.
	* src/xlat/qipcrtr_nodes.in: New file.
	* src/xlat/qipcrtr_ports.in: Likewise.
	* src/sockaddr.c: Include <linux/qrtr.h>, "xlat/qipcrtr_nodes.h",
	and "xlat/qipcrtr_ports.h".
	(print_sockaddr_data_qrtr): New function.
	(sa_printers) <[AF_QIPCRTR]>: New printer.
	* tests/sockaddr_xlat.c [HAVE_LINUX_QRTR_H]: Include <linux/qrtr.h>.
	[!HAVE_LINUX_QRTR_H] (struct sockaddr_qrtr): New type definition.
	(check_qrtr): New function.
	(main): Call check_qrtr.
	* NEWS: Mention it.

	sockaddr: implement decoding of AF_XDP socket addresses.
	* bundled/linux/include/uapi/linux/if_xdp.h: New file, imported from
	headers_install'ed Linux kernel v5.15.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Add linux/if_xdp.h.
	(AC_CHECK_TYPES): Check for struct sockaddr_xdp presence
	in <linux/if_xdp.h>.
	* src/xlat/xdp_sockaddr_flags.in: New file.
	* src/sockaddr.c: Include <linux/if_xdp.h> and "xlat/xdp_sockaddr_flags.h".
	(print_sockaddr_data_xdp): New function.
	(sa_printers) <[AF_XDP]>: New socket address decoding entry.
	* tests/sockaddr_xlat-Xabbrev-y.c: New file.
	* tests/sockaddr_xlat-Xraw-y.c: Likewise.
	* tests/sockaddr_xlat-Xverbose-y.c: Likewise.
	* tests/sockaddr_xlat.c: Include "xlat/xdp_sockaddr_flags.h".
	[HAVE_LINUX_IF_XDP_H]: Include <linux/if_xdp.h>.
	[!HAVE_STRUCT_SOCKADDR_XDP] (struct sockaddr_xdp): New type definition.
	[SKIP_IF_PROC_IS_UNAVAILABLE] (SKIP_IF_PROC_IS_UNAVAILABLE): New macro.
	[!FD0_PATH] (FD0_PATH): Likewise.
	[!FD7_PATH] (FD7_PATH): Likewise.
	(check_xdp): New function.
	(main): Add SKIP_IF_PROC_IS_UNAVAILABLE and check_xdp call.
	* tests/.gitignore: Add sockaddr_xlat-Xabbrev-y, sockaddr_xlat-Xraw-y,
	and sockaddr_xlat-Xverbose-y.
	* tests/pure_executables.list: Likewise.
	* tests/gen_tests.in (sockaddr_xlat-Xabbrev-y, sockaddr_xlat-Xraw-y,
	sockaddr_xlat-Xverbose-y): New tests.
	* NEWS: Mention it.

	net: add AF_VSOCK socket option names decoding support.
	* bundled/linux/include/uapi/linux/vm_sockets.h: New file, copied from
	headers_install'ed Linux kernel v5.15.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/xlat/sock_vsock_options.in: New file.
	* src/xlat/socketlayers.in (AF_VSOCK): New constant.
	* src/net.c: Include <linux/vm_sockets.h> and
	"xlat/sock_vsock_options.h".
	(print_sockopt_fd_level_name) <case AF_VSOCK>: Print AF_VSOCK socket
	options.

	net: decode SOL_CAN_RAW socket options.
	* xlat/sock_can_raw_options.in: New file.
	* net.c: Include "xlat/sock_can_raw_options.h".
	(print_sockopt_fd_level_name) <case SOL_CAN_RAW>: Print socket option
	name using sock_can_raw_options xlat.

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

	util: handle QUOTE_0_TERMINATED|QUOTE_EXPECT_TRAILING_0 in print_quoted_string_ex
	Similarly to the way it is done in printstr_ex.

	* src/util.c (print_quoted_string_ex): Print ellipsis if both
	QUOTE_0_TERMINATED and QUOTE_EXPECT_TRAILING_0 were set and string_quote
	returned non-zero.

2021-11-12  Dmitry V. Levin  <ldv@strace.io>
	    Victor Krapivensky  <krapivenskiy.va@phystech.edu>

	poke: add support of unaligned address/length when process_vm_writev is unavailable
	* src/ucopy.c (upoken_peekpoke): New function.
	(upoken_pokedata): Use it for unaligned address and length.
	* tests/poke.c (main): Update.
	* tests/poke.test: Likewise.
	* tests/poke-ptrace.test: Likewise.
	* tests/poke-unaligned.test: Likewise.
	* tests/poke-unaligned.expected: Update expected output.

	Complements: v5.11~49 "Add -e inject=<...>:poke_{enter,exit}=<...> functionality"

2021-11-12  Dmitry V. Levin  <ldv@strace.io>

	ucopy: introduce a data type for PTRACE_PEEKDATA operations.
	* src/ucopy.c (dissected_long_t): New type.
	(umoven_peekdata, umovestr_peekdata): Use it instead of open-coding it.

	Suggested-by: Elvira Khabirova <lineprinter@altlinux.org>

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

	strace: add --strings-in-hex=non-ascii-chars option.
	It seems that some people prefer hexadecimal numbers instead of octal
	in C string escape sequences;  unfortunately, before it also led
	to printing of the whole strings using escape sequences, which may
	negatively impacted the output comprehensibility in cases where only few
	characters are actually non-ASCII.  Add an option that satisfies
	that preference without any downsides.

	* doc/strace.1.in (.SS Output format): Add --strings-in-hex option
