2020-08-06  Dmitry V. Levin  <ldv@altlinux.org>

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

2020-08-04  Dmitry V. Levin  <ldv@altlinux.org>

	ci: use kernel headers from Linux kernel v5.8.
	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.

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

2020-08-03  Dmitry V. Levin  <ldv@altlinux.org>

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

2020-08-01  Dmitry V. Levin  <ldv@altlinux.org>

	tests: check decoding of tgkill syscall.
	* tests/tgkill.c: New file.
	* tests/gen_tests.in (tgkill): New entry.
	* tests/pure_executables.list: Add tgkill.
	* tests/.gitignore: Likewise.

	tests: check decoding of tkill syscall.
	* tests/tkill.c: New file.
	* tests/gen_tests.in (tkill): New entry.
	* tests/pure_executables.list: Add tkill.
	* tests/.gitignore: Likewise.

2020-08-01  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	Introduce SYS_FUNC(tkill)
	This is going to be needed to implement pidns support
	in tkill syscall decoder.

	syscallent*.h files are updated automatically by:
	  git grep -l 'SEN(kill).*"tkill"' |
	  xargs sed -i '/"tkill"/ s/SEN(kill)/SEN(tkill)/'

	* signal.c (SYS_FUNC(tkill)): New syscall decoder.
	* linux/32/syscallent.h: Use SEN(tkill) for "tkill" syscall.
	* 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.

2020-08-01  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	Add "struct tcb *" parameters to various functions.
	This is going to be needed to implement pidns support.

	* defs.h (print_sockaddr): Add a "struct tcb *" parameter.
	* printsiginfo.h (printsiginfo): Likewise.
	* fcntl.c (print_struct_flock64): Likewise.  All callers updated.
	* print_fields.h (PRINT_FIELD_SOCKADDR): Likewise.   All callers updated.
	* printsiginfo.c (printsigsource, print_si_info, printsiginfo): Likewise.
	All callers updated.
	* sockaddr.c (print_sockaddr_data_un, print_sockaddr_data_in,
	print_sockaddr_data_in6, print_sockaddr_data_ax25,
	print_sockaddr_data_ipx, print_sockaddr_data_x25,
	print_sockaddr_data_nl, print_sockaddr_data_ll,
	print_sockaddr_data_bt, sockaddr_printer, print_sockaddr): Likewise.
	All callers updated.

2020-07-30  Dmitry V. Levin  <ldv@altlinux.org>

	Use tprints instead of tprintf in a few more places.
	* bpf.c (BPF_PROG_LOAD, BPF_OBJ_PIN, BPF_OBJ_GET_INFO_BY_FD,
	BPF_RAW_TRACEPOINT_OPEN, BPF_TASK_FD_QUERY, BPF_MAP_LOOKUP_BATCH,
	BPF_MAP_UPDATE_BATCH, BPF_MAP_DELETE_BATCH): Replace tprintf
	with tprints for printing strings without format specifiers.
	* btrfs.c (btrfs_ioctl): Likewise.
	* ioctl.c (evdev_decode_number): Likewise.
	* perf_ioctl.c (perf_ioctl): Likewise.
	* rtnl_addr.c (decode_ifa_cacheinfo): Likewise.
	* v4l2.c (print_v4l2_capability, print_v4l2_requestbuffers,
	print_v4l2_streamparm): Likewise.

2020-07-24  Janosch Frank  <frankja@linux.ibm.com>

	s390x: sthyi: Fix section size requirement and error.
	Some old z/VM instances report only 40 bytes for the partition
	section, as they don't report the last three struct members.

	Let's lower the size check of that section to 40 to accommodate them.

	Also we expect a section to be at least x bytes, so we should make
	that clear in the error message.

	Reviewed-by: Eugene Syromyatnikov <evgsyr@gmail.com>

2020-07-21  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	Remove tcb parameter of read_int_from_file.
	* defs.h (read_int_from_file): Remove tcb parameter.
	* util.c (read_int_from_file): Likewise.
	* msghdr.c (get_optmem_max): Remove tcb parameter of read_int_from_file.

2020-07-18  Dmitry V. Levin  <ldv@altlinux.org>

	Consistently print process ids as signed integers.
	* block.c (block_ioctl): Print struct_blk_user_trace_setup.pid using
	PRINT_FIELD_D instead of PRINT_FIELD_U.
	* bpf.c (BPF_TASK_FD_QUERY): Print task_fd_query.pid using PRINT_FIELD_D
	instead of PRINT_FIELD_U.
	* ipc_msgctl.c (print_msqid_ds): Print msqid_ds.msg_lspid
	and msqid_ds.msg_lrpid using PRINT_FIELD_D.
	* ipc_shmctl.c (print_shmid_ds): Print shmid_ds.shm_cpid and shm_lpid
	using PRINT_FIELD_D.
	* msghdr.c (print_scm_creds): Print ucred.pid using PRINT_FIELD_D
	instead of PRINT_FIELD_U.
	* netlink.c (print_nlmsghdr): Print nlmsghdr.nlmsg_pid using %d format
	instead of %u.
	* tests/bpf.c (BPF_TASK_FD_QUERY_checks): Update expected output.
	* tests/ioctl_block.c (main): Update expected output.
	* tests/ipc_msg.c (main): Likewise.
	* tests/ipc_shm.c (main): Likewise.
	* tests/net-yy-netlink.c (main): Likewise.
	* tests/netlink_protocol.c (test_nlmsgerr): Likewise.

	Introduce PRINT_FIELD_NUMERIC_UMODE_T.
	* print_fields.h (PRINT_FIELD_NUMERIC_UMODE_T): New macro.
	* ipc_msgctl.c (print_msqid_ds): Use it instead of print_numeric_umode_t.
	* ipc_shmctl.c (print_shmid_ds): Likewise.
	* open.c (print_open_how): Use it instead of print_numeric_ll_umode_t.

	Fix printing of syscall return value in octal mode.
	* defs.h (print_numeric_long_umask): Remove.
	* printmode.c (print_numeric_long_umask): Likewise.
	* syscall.c (syscall_exiting_trace) <case RVAL_OCTAL>: Fix printing
	of tcp->u_rval when sizeof(tcp->u_rval) > sizeof(long) or when
	sizeof(tcp->u_rval) > current_klongsize.

	Rename print_numeric_umode_t_64 to print_numeric_ll_umode_t.
	* printmode.c (print_numeric_umode_t_64): Rename
	to print_numeric_ll_umode_t, change the type of its argument
	to unsigned long long.
	* defs.h: Likewise.
	* open.c (print_open_how): Use print_numeric_ll_umode_t instead of
	print_numeric_umode_t_64.

2020-07-17  Dmitry V. Levin  <ldv@altlinux.org>

	Use PRINT_FIELD_UID instead of printuid where appropriate.
	* ipc_msgctl.c: Include "print_fields.h".
	(print_msqid_ds): Use PRINT_FIELD_UID instead of printuid.
	* ipc_shmctl.c: Include "print_fields.h".
	(print_shmid_ds): Use PRINT_FIELD_UID instead of printuid.
	* statx.c (SYS_FUNC(statx)): Use PRINT_FIELD_UID instead of printuid.

	printsiginfo: fix printing of siginfo_t.si_pid and siginfo_t.si_uid.
	* printsiginfo.c (printsigsource): Print siginfo_t.si_pid using
	PRINT_FIELD_D, print siginfo_t.si_uid using PRINT_FIELD_UID.
	* tests/clone_ptrace.c (main): Update expected output.
	* tests/orphaned_process_group.c (main): Likewise.
	* tests/pidfd_send_signal.c (main): Likewise.
	* tests/ptrace.c (test_peeksiginfo): Likewise.
	* tests/rt_sigqueueinfo.c (main): Likewise.
	* tests/rt_tgsigqueueinfo.c (main): Likewise.
	* tests/siginfo.c (main): Likewise.
	* tests/waitid.c (sprint_siginfo): Likewise.

	statx: use PRINT_FIELD_FLAGS.
	* statx.c (SYS_FUNC(statx)): Use PRINT_FIELD_FLAGS instead of
	printflags.

2020-07-17  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	kcmp: fix KCMP_FILE decoding.
	* kcmp.c (SYS_FUNC(kcmp)): Fix KCMP_FILE pid arguments.

	Fixes: v4.20~66 ("kcmp: output fds using a separate function")

2020-07-13  Dmitry V. Levin  <ldv@altlinux.org>

	fcntl: use print_fields.h macros.
	* fcntl.c: Include "print_fields.h".
	(print_struct_flock64, print_f_owner_ex): Use PRINT_FIELD_* macros
	from print_fields.h.

	evdev_mpers: use print_fields.h macros.
	* evdev_mpers.c: Include "print_fields.h".
	(decode_envelope, ff_effect_ioctl): Use PRINT_FIELD_* macros
	from print_fields.h.
	* tests/ioctl_evdev.c (print_ffe_common): Update expected output.

2020-07-12  Dmitry V. Levin  <ldv@altlinux.org>

	ustat: use print_fields.h macros.
	* ustat.c: Include "print_fields.h".
	(SYS_FUNC(ustat)): Use PRINT_FIELD_* macros from print_fields.h.

	file_ioctl: use print_fields.h macros.
	* file_ioctl.c: Include "print_fields.h".
	(print_file_dedupe_range_info, print_fiemap_extent, file_ioctl): Use
	PRINT_FIELD_* macros from print_fields.h.

	evdev: use print_fields.h macros.
	* evdev.c (abs_ioctl, keycode_V2_ioctl): Use PRINT_FIELD_* macros
	from print_fields.h.

	evdev: fix formatting of struct input_id.
	* evdev.c (getid_ioctl): Use PRINT_FIELD_U.
	* tests/ioctl_evdev.c (main): Update expected output.

	btrfs: use PRINT_FIELD_X_ARRAY.
	* types/btrfs.h: New file.
	* btrfs.c: Include "types/btrfs.h".
	(btrfs_ioctl): Use struct_btrfs_ioctl_logical_ino_args and
	PRINT_FIELD_X_ARRAY.
	* configure.ac (AC_CHECK_MEMBERS): Remove
	struct btrfs_ioctl_search_args_v2.buf_size and
	struct btrfs_ioctl_logical_ino_args.flags.

2020-07-10  Dmitry V. Levin  <ldv@altlinux.org>

	travis: reintroduce ppc64le and s390x builds.
	Let's give travis another chance.
	This reverts commits 86a53f791ad34a825b8633eb0272d954647ce705
	and 36f32a255db09886f7f9ba08ec712b8742f0c312.

	* .travis.yml (arch: ppc64le, arch: s390x): New entries.

2020-07-10  Dmitry V. Levin  <ldv@altlinux.org>

	README.md: migrate from travis-ci.org to travis-ci.com.

2020-07-08  Dmitry V. Levin  <ldv@altlinux.org>

	evdev: fix formatting of struct input_keymap_entry.scancode.
	* evdev.c (keycode_V2_ioctl): Use PRINT_FIELD_X_ARRAY.
	* tests/ioctl_evdev.c (main): Update expected output.

	x86_64/arch_kvm: use PRINT_FIELD_X_ARRAY.
	* linux/x86_64/arch_kvm.c (arch_print_kvm_sregs): Use PRINT_FIELD_X_ARRAY.

	loop: implement decoding of LOOP_CONFIGURE ioctl command.
	* types/loop.h: New file.
	* loop.c: Include it instead of <linux/ioctl.h> and <linux/loop.h>.
	(ecode_loop_config): New function.
	(loop_ioctl): Use it to decode LOOP_CONFIGURE ioctl command.
	* NEWS: Mention this change.
	* tests/ioctl_loop.c: Check it.

2020-07-08  Dmitry V. Levin  <ldv@altlinux.org>

	loop: factor out print_loop_info64.
	It is going to be used to implement LOOP_CONFIGURE decoding.

	* loop.c (print_loop_info64): New function.
	(decode_loop_info64): Use it.

2020-07-08  Dmitry V. Levin  <ldv@altlinux.org>

	loop: use print_fields.h macros.
	* loop.c (decode_loop_info, decode_loop_info64): Use PRINT_FIELD_*
	macros from print_fields.h.

	print_fields: introduce PRINT_FIELD_U_ARRAY and PRINT_FIELD_X_ARRAY.
	* print_fields.h: Include "static_assert.h".
	(PRINT_FIELD_UINT_ARRAY, PRINT_FIELD_U_ARRAY, PRINT_FIELD_X_ARRAY):
	New macros.
	(PRINT_FIELD_COOKIE): Rewrite using PRINT_FIELD_U_ARRAY.

2020-07-06  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

	Update ioctl entries from linux v5.8.
	* linux/32/ioctls_inc_align16.h: Update from linux v5.8-rc4
	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/powerpc/ioctls_arch0.h: Likewise.
	* NEWS: Mention this.
	* tests/ioctl_loop.c (main): Update.

2020-07-04  Dmitry V. Levin  <ldv@altlinux.org>

	Implement decoding of faccessat2 syscall.
	Introduced by Linux kernel commit v5.8-rc1~203^2.

	* xlat/faccessat_flags.in: New file.
	* access.c: Include "xlat/faccessat_flags.h".
	(decode_access): Change return type to void.
	(SYS_FUNC(access)): Return RVAL_DECODED.
	(decode_faccessat): New function.
	(SYS_FUNC(faccessat)): Use it.
	(SYS_FUNC(faccessat2)): New function.
	* pathtrace.c (pathtrace_match_set): Handle SEN_faccessat2.
	* linux/syscallent-common.h [BASE_NR + 439]: Wire up faccessat2.
	* NEWS: Mention this change.
	* tests/faccessat2.c: New file.
	* tests/faccessat2-P.c: Likewise.
	* tests/faccessat2-y.c: Likewise.
	* tests/faccessat2-yy.c: Likewise.
	* tests/faccessat2.test: New test.
	* tests/Makefile.am (DECODER_TESTS): Add faccessat2.test.
	* tests/gen_tests.in (faccessat2-P, faccessat2-y, faccessat2-yy): New
	entries.
	* tests/pure_executables.list: Add faccessat2, faccessat2-P,
	faccessat2-y, and faccessat2-yy.
	* tests/.gitignore: Likewise.

2020-07-04  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: rename access_flags to access_modes.
	Since faccessat2 syscall has both "mode" and "flags" arguments,
	rename access_flags to access_modes to avoid confusion.

	* xlat/access_flags.in: Rename to ...
	* xlat/access_modes.in: ... this file, add fallback definitions.
	(EFF_ONLY_OK, EX_OK): Remove non-Linux constants.
	* access.c: Include "xlat/access_modes.h" instead of
	"xlat/access_flags.h".
	(decode_access): Replace access_flags woth access_modes.

2020-07-04  Dmitry V. Levin  <ldv@altlinux.org>

	tests: check decoding of faccessat syscall in -P, -y, and -yy modes.
	* tests/faccessat.c: Rewrite.
	* tests/faccessat-P.c: New file.
	* tests/faccessat-y.c: Likewise.
	* tests/faccessat-yy.c: Likewise.
	* tests/faccessat.test: New test.
	* tests/Makefile.am (DECODER_TESTS): Add faccessat.test.
	* tests/gen_tests.in (faccessat): Remove.
	(faccessat-P, faccessat-y, faccessat-yy): New entries.
	* tests/pure_executables.list: Add faccessat-P, faccessat-y,
	and faccessat-yy.
	* tests/.gitignore: Likewise.

2020-06-30  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: update BPF_* constants.
	* xlat/bpf_attach_type.in (BPF_TRACE_ITER): New constant introduced
	by Linux kernel commit v5.8-rc1~165^2~185^2~16^2~19.
	(BPF_CGROUP_INET4_GETPEERNAME, BPF_CGROUP_INET6_GETPEERNAME,
	BPF_CGROUP_INET4_GETSOCKNAME, BPF_CGROUP_INET6_GETSOCKNAME): New
	constants introduced by Linux kernel commit v5.8-rc1~165^2~130^2~8^2~3.`
	(BPF_XDP_DEVMAP): New constant introduced by Linux kernel commit
	v5.8-rc1~165^2~6^2~9^2~3.
	* xlat/bpf_commands.in (BPF_LINK_GET_FD_BY_ID, BPF_LINK_GET_NEXT_ID):
	New constants introduced by Linux kernel commit
	v5.8-rc1~165^2~343^2~16^2~7.
	(BPF_ENABLE_STATS): New constant introduced by Linux kernel commit
	v5.8-rc1~165^2~343^2~3^2~2.
	(BPF_ITER_CREATE): New constant introduced by Linux kernel commit
	v5.8-rc1~165^2~185^2~16^2~15.
	* xlat/bpf_map_types.in (BPF_MAP_TYPE_RINGBUF): New constant introduced
	by Linux kernel commit v5.8-rc1~165^2~6^2~12^2~4.
	* NEWS: Mention this change.
	* tests/bpf.c: Update.

2020-06-29  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	.gitignore: add missing files that should be ignored.
	* .gitignore: Add .dirstamp.
	* tests/.gitignore: Add setpgrp-exec and stack-fcall-attach.

2020-06-29  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: update STATX_* constants.
	* xlat/statx_attrs.in (STATX_ATTR_MOUNT_ROOT): New constant introduced
	by Linux kernel commit v5.8-rc1~203^2~4.
	* xlat/statx_masks.in (STATX_MNT_ID): New constant introduced by Linux
	kernel commit v5.8-rc1~203^2~5.
	* NEWS: Mention this change.
	* tests/xstatx.c (main): Update expected output.

	xlat: update TCA_* constants.
	* xlat/rtnl_tc_attrs.in (TCA_DUMP_FLAGS): New constant introduced
	by Linux kernel commit v5.8-rc1~165^2~183^2~3.
	* rtnl_tc.c (tcmsg_nla_decoders): Add TCA_DUMP_FLAGS.
	* NEWS: Mention this change.

	xlat: update RTC_* constants.
	* xlat/rtc_vl_flags.in (RTC_VL_BACKUP_SWITCH): New constant introduced
	by Linux kernel commit v5.8-rc1~100^2~23.
	* NEWS: Mention this change.

2020-06-28  Dmitry V. Levin  <ldv@altlinux.org>

	xlat: update NDA_* constants.
	* xlat/rtnl_neigh_attrs.in (NDA_NH_ID): New constant introduced by Linux
	kernel commit v5.8-rc1~165^2~141^2~3.
	* rtnl_neigh.c (ndmsg_nla_decoders): Add NDA_NH_ID.
	* NEWS: Mention this change.

	xlat: update *_MAGIC constants.
	* xlat/fsmagic.in (DEVMEM_MAGIC): New constant introduced by Linux
	kernel commit v5.8-rc1~104^2~8.
	* NEWS: Mention this change.

	xlat: update LOOP_* constants.
	* xlat/loop_cmds.in (LOOP_CONFIGURE): New constant introduced by Linux
	kernel commit v5.8-rc1~191^2~11.
	* NEWS: Mention this change.

	xlat: update KVM_* constants.
	* xlat/kvm_cap.in (KVM_CAP_HALT_POLL): New constant introduced by Linux
	kernel commit v5.8-rc1~168^2~136.
	(KVM_CAP_ASYNC_PF_INT): New constant introduced by Linux kernel commit
	v5.8-rc1~168^2~14.
	* NEWS: Mention this change.

	xlat: update KEYCTL_* constants.
	* xlat/keyctl_commands.in (KEYCTL_WATCH_KEY): New constant introduced
	by Linux kernel commit v5.8-rc1~22^2~6.
	* xlat/keyctl_caps1.in (KEYCTL_CAPS1_NOTIFICATIONS): Likewise.
	* NEWS: Mention this change.

	xlat: update IORING_* constants.
	* xlat/uring_ops.in (IORING_OP_TEE): New constant introduced by Linux
	kernel commit v5.8-rc1~190^2~14.
	* tests/io_uring_register.c: Update expected output.

	xlat: update INET_DIAG_* constants.
	* linux/inet_diag.h (INET_DIAG_MD5SIG): New constant introduced
	by Linux kernel commit v4.14-rc1~130^2~39^2.
	(INET_DIAG_ULP_INFO): New constant introduced by Linux kernel commit
	v5.4-rc1~131^2~103^2~1.
	(INET_DIAG_SK_BPF_STORAGES): New constant introduced by Linux kernel
	commit v5.7-rc1~146^2~287^2^2.
	(INET_DIAG_CGROUP_ID): New constant introduced by Linux kernel commit
	v5.8-rc1~165^2~383^2~1.
	(INET_DIAG_BC_CGROUP_COND): New constant introduced by Linux kernel
	commit v5.8-rc1~165^2~383^2.
	* xlat/inet_diag_attrs.in (INET_DIAG_MD5SIG, INET_DIAG_ULP_INFO,
	INET_DIAG_SK_BPF_STORAGES, INET_DIAG_CGROUP_ID): Likewise.
	* xlat/inet_diag_bytecodes.in (INET_DIAG_BC_CGROUP_COND): Likewise.
	* xlat/inet_diag_extended_flags.in (1<<(INET_DIAG_MD5SIG-1),
	1<<(INET_DIAG_ULP_INFO-1), 1<<(INET_DIAG_SK_BPF_STORAGES-1),
	1<<(INET_DIAG_CGROUP_ID-1)): Likewise.
	* NEWS: Mention this change.

	xlat: update ETH_* constants.
	* xlat/ethernet_protocols.in (ETH_P_MRP): New constant introduced
	by Linux kernel commit v5.8-rc1~165^2~412^2~10.
	* NEWS: Mention this change.

	xlat: update CAP_* constants.
	* caps1.h (CAP_PERFMON): New constant introduced by Linux kernel commit
	v5.8-rc1~224^2~14^2~55.
	(CAP_BPF): New constant introduced by Linux kernel commit
	v5.8-rc1~165^2~181^2^2~2.
	* xlat/cap.in (CAP_PERFMON, CAP_BPF): Likewise.
	* xlat/cap_mask1.in (1<<CAP_PERFMON, 1<<CAP_BPF): Likewise.
	* NEWS: Mention this change.
	* tests/caps.awk: Update expected output.
	* tests/caps-abbrev.awk: Likewise.

	xlat: update AUDIT_* constants.
	* xlat/nl_audit_types.in (AUDIT_EVENT_LISTENER): New constant introduced
	by Linux kernel commit v5.8-rc1~188^2~5.
	* NEWS: Mention this change.

2020-06-27  Dmitry V. Levin  <ldv@altlinux.org>

	tests: workaround LTO in strace -k tests.
	Link time optimization in gcc 10 became too smart, resulting to most
	of function calls in strace -k tests being optimized out,
	subsequently breaking these tests.

	Make the functions more complex to bypass unwanted side effects
	of link time optimization in strace -k tests.

	* tests/stack-fcall.h: Include <unistd.h> and "scno.h".
	(COMPLEX_BODY): New macro.
	* tests/stack-fcall-0.c (f0): Use it.
	* tests/stack-fcall-1.c (f1): Likewise.
	* tests/stack-fcall-2.c (f2): Likewise.
	* tests/stack-fcall-3.c (f3): Likewise.  Rewrite switch.
	* tests/stack-fcall.c (main): Call f0 in a loop.

2020-06-16  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	Modify %process class: trace syscalls associated with process lifecycle.
	The description is rephrased as:
	"Trace system calls associated with process lifecycle
	(creation, exec, termination)."

	kill, tkill, tgkill, pidfd_send_signal and rt_sigqueueinfo are added,
	arch_prctl and unshare are removed from the %process class.

	syscallent*.h files are updated automatically by:
	find linux -name syscallent*.h -exec \
	sed -i -r -e '
	    /(arch_prctl|unshare)/ {
	        s/(\{[^,]*,\t[^,]*)TP\|/\1/
	        s/(\{[^,]*,\t[^,]*)\|TP/\1/
	        s/(\{[^,]*,\t[^,]*)TP,/\10,/
	    }
	' -e '
	    /(kill|pidfd_send_signal|rt_sigqueueinfo)/ {
	        s/(\{[^,]*,\t[^0][^,]*)/\1|TP/
	        s/(\{[^,]*,\s*)0/\1TP/
	    }
	' {} +

	[ldv: document this change in NEWS.]

	* strace.1.in: Rephrase %process description.
	* linux/32/syscallent.h: Add TP flag to *kill, pidfd_send_signal and
	rt_sigqueueinfo; remove TP flag from arch_prctl and unshare.
	* 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-compat.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/syscallent-common.h: Likewise.
	* linux/x32/syscallent.h: Likewise.
	* linux/x86_64/syscallent.h: Likewise.
	* linux/xtensa/syscallent.h: Likewise.
	* NEWS: Mention this change.

2020-06-16  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	tests/inject-nf.test: replace getpid with geteuid.
	Since we treat PIDs as signed integers, large values (>=2^31) will
	cause overflow when we use printpid.
	UIDs are treated as unsigned integers, so geteuid is a good alternative.
	(getuid would be problematic, as it does not exists on alpha).
	Also, on systems where geteuid32 exists, geteuid returns maximum 16 bit
	values, so we have to use geteuid32 in this case.

	[ldv: geteuid syscall was introduced on Alpha by Linux kernel commit
	v5.1-rc1~160^2~3^2~1, so this test will not work on old Alpha kernels.]

	* tests/inject-nf.c: Replace getpid with either geteuid32 or geteuid.
	[__alpha__]: Remove.
	[__NR_geteuid32]: New condition.
	* tests/inject-nf.test (SYSCALL): Replace getpid with '/^geteuid(32)?$'.
	Remove alpha workaround.

2020-06-16  Dmitry V. Levin  <ldv@altlinux.org>

	travis: remove s390x builds.
	They are currently unusable, permanently failing without any reason
	whatsoever.

	* .travis.yml (arch: s390x): Remove.

2020-06-16  Dmitry V. Levin  <ldv@altlinux.org>

	ci: re-enable testing with the latest mainline kernel headers.
	There should be no issues with v5.8-rc1.
	This reverts commit 734066585ba865740ab45651bc6e3e8ab249927f.

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

2020-06-16  Chris Packham  <chris.packham@alliedtelesis.co.nz>
	    Dmitry V. Levin  <ldv@altlinux.org>

	io_uring: Add io_cqring_offset flags.
	Add support for displaying struct io_cqring_offsets.flags introduced
	by Linux kernel commits v5.8-rc1~190^2~22 and v5.8-rc1~190^2~21.

	* types/io_uring.h (struct_io_cqring_offsets): Replace resv array
	with flags, resv1, and resv2 fields.
	* xlat/uring_cqring_flags.in: New file.
	* configure.ac (AC_CHECK_MEMBERS): Check struct io_cqring_offsets.flags.
	* io_uring.c: Include "xlat/uring_cqring_flags.h".
	(SYS_FUNC(io_uring_setup)): Replace printing of the resv array
	of struct io_cqring_offsets with flags, resv1, and resv2 fields.
	* tests/io_uring_setup.c: Check it.

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

2020-06-16  Chris Packham  <chris.packham@alliedtelesis.co.nz>

	io_uring: Remove struct io_cqring_offsets compile time asserts.
	The generated types/check-io_uring.c already checks the kernel's struct
	io_cqring_offsets for compatibility with the strace definition so
	there's no need for manual checks.

	* io_uring.c [HAVE_STRUCT_IO_CQRING_OFFSETS]: Remove static_asserts.

2020-06-16  Dmitry V. Levin  <ldv@altlinux.org>

	types: skip field lines that start with comments.
	This allows to exclude certain fields from type checks by placing
	comments at the beginning of the corresponding lines.

	* types/find_last_type_fields.awk: Skip lines starting with spaces
	followed by "/".

2020-06-14  Dmitry V. Levin  <ldv@altlinux.org>

	Add statx syscall to %fstat trace class.
	statx syscall with AT_EMPTY_PATH flag is similar to newfstatat/fstatat64
	syscall with AT_EMPTY_PATH flag.

	* linux/32/syscallent.h (statx): Add TFST flag.
	* linux/64/syscallent.h: Likewise.
	* linux/alpha/syscallent.h: Likewise.
	* linux/arm/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/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.
	* strace.1.in (.SS Filtering): Document it.
	* NEWS: Mention this fix.
	* tests/trace_fstat.in (statx): New entry.

2020-06-13  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	Move ilog* functions from util.c to defs.h.
	* util.c (ILOG2_ITER_, ilog2_klong, ilog2_64, ilog2_32): Move ...
	* defs.h: ... here.

	print_fields.h: add PRINT_FIELD_LEN macro.
	* print_fields.h (PRINT_FIELD_LEN): New macro.
	* net.c: (print_get_linger, print_get_ucred, print_tpacket_stats):
	Rewrite using PRINT_FIELD_LEN.

2020-06-10  Dmitry V. Levin  <ldv@altlinux.org>

	Move make-dist and make-dsc scripts to maint/
	* make-dsc: Rename to maint/make-dsc.
	* make-dist: Rename to maint/make-dist.
	* maint/README-release: Update.
	* dist/INSTALL: Likewise.

2020-06-07  Sven Schnelle  <svens@stackframe.org>

	tests: clone3 might return EBADF with invalid cgroup.
	Both on s390 and x86 linux-5.7 return EBADF when an invalid cgroup
	is supplied, so add that to the list of possible return values.


	* tests/clone3.c (main): Add EBADF to the list of possible
	CLONE_INTO_CGROUP return values.

2020-06-03  Dmitry V. Levin  <ldv@altlinux.org>

	ci: use kernel headers from Linux kernel v5.7.
	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.

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

2020-06-02  Dmitry V. Levin  <ldv@altlinux.org>

	s390: use a more appropriate regset type.
	* linux/s390/arch_regs.c (s390_regset): Change the type from
	struct user_regs_struct to s390_regs, the latter is the subset of
	struct user_regs_struct used by the kernel, it's also the type
	used on s390x.

2020-06-02  Steve Langasek  <steve.langasek@ubuntu.com>

	tests/perf_event_open: avoid unaligned access on ARM.
	The test suite already handles alignment requirements on POWER and
	Sparc, add ARM to the list as well.  Not all ARM environments raise
	SIGBUS on unaligned access, but some do.

	* tests/perf_event_open.c (ATTR_REC) [ARM]: Use aligned access.

2020-06-02  Dmitry V. Levin  <ldv@altlinux.org>

	tests/wait4: invoke wait4 syscall directly instead of using libc wait4.
	glibc-2.31.9000-312-g600f00b747ff42eb0aa778536d3ef602e8bcd550 introduced
	a change in its wait4 implementation that makes it unsuitable for the
	wait4 test.

	* tests/wait4.c: Include "kernel_rusage.h" instead of <sys/resource.h>.
	(sprint_rusage): Replace struct rusage with kernel_rusage_t,
	cast member values from kernel_long_t to unsigned long long
	using zero_extend_signed_to_ull, update format strings.
	(k_wait4): New function.
	(do_wait4, main): Use it instead of wait4.

2020-06-02  Dmitry V. Levin  <ldv@altlinux.org>

	Post-release administrivia.
	* NEWS: Add a header line for the next release.
	* debian/changelog.in: Add a changelog entry for 5.7-1.
	* strace.spec.in: Likewise.

2020-06-01  Dmitry V. Levin  <ldv@altlinux.org>

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

	.mailmap: add more entries to avoid duplication in CREDITS.

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

2020-06-01  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

	Update ioctl entries from linux v5.7.
	* linux/32/ioctls_inc_align16.h: Update from linux v5.7
	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/s390/ioctls_arch0.h: Likewise.
	* linux/s390x/ioctls_arch0.h: Likewise.
	* linux/x32/ioctls_inc0.h: Likewise.
	* NEWS: Mention this.

2020-05-31  Dmitry V. Levin  <ldv@altlinux.org>

	tests: increase default TIMEOUT_DURATION.
	* tests/init.sh (TIMEOUT_DURATION): Increase from 600 to 1500.
	* .travis.yml (matrix): Remove TIMEOUT_DURATION.

2020-05-31  Dmitry V. Levin  <ldv@altlinux.org>

	configure.ac: robustify linux headers checks.
	Some linux headers used to require other headers to be included
	beforehand.  While these linux headers are no longer insufficient
	nowadays, configure checks need to handle old headers properly.

	* configure.ac (AC_CHECK_TYPES): Include <sys/socket.h> before
	<linux/fib_rules.h>.
	(AC_CHECK_HEADERS): Include <sys/socket.h> and <linux/types.h>
	before linux/if_addr.h, linux/if_link.h, linux/neighbour.h.
	Include <linux/types.h> before other linux headers.

2020-05-31  Dmitry V. Levin  <ldv@altlinux.org>

	Include <linux/types.h> before <linux/fiemap.h> and <linux/hiddev.h>
	<linux/fiemap.h> and <linux/hiddev.h> used to require <linux/types.h>
	to be included beforehand.

	* file_ioctl.c [HAVE_LINUX_FIEMAP_H]: Include <linux/types.h>
	before <linux/fiemap.h>.
	* tests/file_ioctl.c: Likewise.
	* tests/ioctl.c: Include <linux/types.h> before <linux/hiddev.h>.

2020-05-31  Dmitry V. Levin  <ldv@altlinux.org>

	debian/rules: fix build-udeb/Makefile target.
	* debian/rules (build-udeb/Makefile): Rename --without-stacktrace
	to --disable-stacktrace.

2020-05-30  Dmitry V. Levin  <ldv@altlinux.org>

	Turn getfdpath and printfd functions into static inline wrappers.
	* defs.h (printfd): Copy here from util.c, turn into an inline wrapper.
	(getfdpath): Copy here from pathtrace.c, turn into an inline wrapper.
	* pathtrace.c (getfdpath): Remove.
	* util.c (printfd): Remove.

2020-05-30  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	tests/pidfd_getfd.c: test decoding of targetfd.
	* tests/pidfd_getfd.c (k_pidfd_getfd): Rename pid argument to pidfd.
	(main): Test decoding of targetfd.
	* tests/gen_tests.in: Add "-e signal=none" argument to pidfd_getfd
	tests.

2020-05-30  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	pidfd_getfd: fix decoder.
	The decoder incorrectly assumed the first argument being a pid,
	but actually it is a pidfd.

	The patch also makes the decoder be able to decode the targetfd
	(-y and -yy options).

	* pidfd_getfd.c: Include "number_set.h".
	(SYS_FUNC(pidfd_getfd)): Rewrite using pidfd_get_pid.

	Fixes: v5.6~46 "Implement pidfd_getfd syscall decoding"

2020-05-30  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	util.c: add pidfd_get_pid.
	* defs.h (pidfd_get_pid): New function declaration.
	* utils.c (pidfd_get_pid): New function, returns the pid of a pidfd.
	(printpidfd): Rewrite using pidfd_get_pid.
	(printfd_pid): Change printpidfd arguments.

2020-05-30  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	Rename print_pid_fd to printfd_pid_tracee_ns.
	To avoid confusion with the new printfd_pid fucntion.

	defs.h (print_pid_fd): Rename to printfd_pid_tracee_ns.
	util.c: Likewise.  All users updated.

2020-05-30  Ákos Uzonyi  <uzonyi.akos@gmail.com>

	util.c: add printfd_pid.
	defs.h (printfd_pid): New function definition.
	util.c (printfd_pid): New function printing the fd of an other process.
	(printfd): Rewritten using printfd_pid.

	pathtrace.c: add getfdpath_pid.
	* defs.h (getfdpath_pid): New function definition.
	* pathtrace.c (getfdpath_pid): New function, returns the path
	associated with fd of the process with pid.
	(getfdpath): Rewrite using getfdpath_pid.

2020-05-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: annotate btrfs_compress_types with #enum.
	* xlat/btrfs_compress_types.in: Add #enum, #include <stdio.h>,
	and #include <linux/btrfs.h>
	* configure.ac (AC_CHECK_DECL(BTRFS_COMPRESS_*)): Remove.

2020-05-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: annotate rtnl_ifla_xdp_attached_mode with #enum.
	And use proper checks in tests/nlattr_ifla_xdp.c.

	* xlat/rtnl_ifla_xdp_attached_mode.in: Add #enum, #include <netinet/in.h>,
	and #include <linux/rtnetlink.h> annotations.
	* tests/nlattr_ifla_xdp.c [!XDP_ATTACHED_NONE] (XDP_ATTACHED_NONE):
	Remove.
	[!XDP_ATTACHED_MULTI] (XDP_ATTACHED_MULTI): Remove.
	[!HAVE_DECL_XDP_ATTACHED_NONE] (XDP_ATTACHED_NONE): New enum definition.
	[!HAVE_DECL_XDP_ATTACHED_MULTI] (XDP_ATTACHED_MULTI): Likewise.

2020-05-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	rtnl_link: support IFLA_XDP_EXPECTED_FD attribute decoding.
	Introduced by Linux commit v5.7-rc1~146^2~10^2~13^2~3.

	* xlat/rtnl_ifla_xdp_attrs.in: Add #enum, #include <netlink/in.h>,
	and #include <linux/rtnetlink.h> annotations.
	(IFLA_XDP_EXPECTED_FD): New constant.
	* rtnl_link.c (ifla_xdp_nla_decoders): Add [IFLA_XDP_EXPECTED_FD], set
	value to decode_nla_fd.
	* tests/nlattr_ifla_xdp-y.c: New file.
	* tests/.gitignore: Add nlattr_ifla_xdp-y.
	* tests/Makefile.am (check_PROGRAMS): Likewise.
	* tests/gen_tests.in: Add nlattr_ifla_xdp-y test.
	* tests/nlattr_ifla_xdp.c: Include "xlat/rtnl_ifla_xdp_attrs.h" under
	XLAT_MACROS_ONLY definition.
	(IFLA_XDP_FD, IFLA_XDP_ATTACHED, IFLA_XDP_PROG_ID, IFLA_XDP_DRV_PROG_ID,
	IFLA_XDP_SKB_PROG_ID, IFLA_XDP_HW_PROG_ID): Remove.
	[!FD9_PATH] (FD9_PATH): New macro, define to empty string.
	(main): Add checks for IFLA_XDP_EXPECTED_FD.

2020-05-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	tests: support -y mode for sockfd printing.
	* tests/test_nlattr.h [!PRINT_SOCK] (PRINT_SOCK): New macro, define to 0.
	(print_sockfd): New function.
	(TEST_NLATTR_EX_): Call print_sockfd for sock fd printing.

	rtnl_tc_action: implement TCA_ACT_HW_STATS and TCA_ACT_USED_HW_STATS decoding
	* xlat/rtnl_tca_act_hw_stats.in: New file.
	* rtnl_tc_action.c: Include "xlat/rtnl_tca_act_hw_stats.h".
	(decode_tca_act_hw_stats): New function.
	(tcamsg_nla_decoders): Add [TCA_ACT_HW_STATS]
	and [TCA_ACT_USED_HW_STATS], set them to decode_tca_act_hw_stats.
	* tests/nlattr_tcamsg.c: Add checks, update expected output.
	* xlat/rtnl_tc_action_attrs.in (TCA_ACT_HW_STATS): New constant,
	introduced by Linux commit v5.7-rc1~146^2~230^2 and renamed in Linux
	commit v5.7-rc1~146^2~101.
	(TCA_ACT_USED_HW_STATS): New constant, introduced by Linux commit
	v5.7-rc1~146^2~25^2.

	xlat: annotate rtnl_tca_stab_attrs with #enum.
	* xlat/rtnl_tca_stab_attrs.in: Add #enum, #include <linux/types.h>,
	 #include <linux/pkt_sched.h>.
	* configure.ac (AC_CHECK_DECLS(TCA_STAB_DATA)): Remove.

	xlat: annotate rtnl_tca_stats_attrs with #enum.
	* xlat/rtnl_tca_stats_attrs.in: Add #enum, #include <linux/gen_stats.h>.
	* configure.ac (AC_CHECK_DECL(TCA_STATS_PKT64)): Remove.

	xlat: add #enum to v4l2 xlats.
	* xlat/v4l2_buf_types.in: Add #enum, #include <sys/time.h>, #include
	<linux/ioctl.h>, #include <linux/types.h>, and #include
	<linux/videodev2.h>.
	* xlat/v4l2_colorspaces.in: Likewise.
	* xlat/v4l2_control_types.in: Likewise.
	* xlat/v4l2_fields.in: Likewise.
	* xlat/v4l2_framesize_types.in: Likewise.
	* xlat/v4l2_memories.in: Likewise.
	* xlat/v4l2_tuner_types.in: Likewise.
	* configure.ac (AC_CHECK_DECL(V4L2_*)): Remove.

	xlat: annotate rtnl_link_attrs with #enum.
	* xlat/rtnl_link_attrs.in: Add #enum, #include <sys/socket.h>, #include
	<linux/rtnetlink.h>.
	* configure.ac (AC_CHECK_DECL(IFLA_*)): Remove.

	xlat: annotate rtnl_tc_action_attrs with #enum.
	* xlat/rtnl_tc_action_attrs.in: Add #enum, #include <linux/pkt_cls.h>
	* configure.ac (AC_CHECK_DECL(TCA_ACT_*)): Remove.

	xlat: annotate sysctl xlats with #enum.
	* configure.ac (AC_CHECK_DECL(CTL_* KERN_* NET_* VM_*)): Remove.
	* xlat/sysctl_kern.in: Add #enum, #include <sys/types.h>, #include
	<linux/sysctl.h> descriptors.
	* xlat/sysctl_net.in: Likewise.
	* xlat/sysctl_net_core.in: Likewise.
	* xlat/sysctl_net_ipv4.in: Likewise.
	* xlat/sysctl_net_ipv4_conf.in: Likewise.
	* xlat/sysctl_net_ipv4_route.in: Likewise.
	* xlat/sysctl_net_ipv6.in: Likewise.
	* xlat/sysctl_net_ipv6_route.in: Likewise.
	* xlat/sysctl_net_unix.in: Likewise.
	* xlat/sysctl_root.in: Likewise.
	* xlat/sysctl_vm.in: Likewise.

2020-05-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	configure: annotate waitid_types with #enum.
	This also syncs up the configure checks with the actual list of xlat
	values.

	* xlat/waitid_types.in: Add #enum, #include <sys/types.h>, and #include
	<sys/wait.h>.
	* configure.ac (AC_CHECK_DECL(P_*)): Remove.

	Complements: v5.4~82 "xlat: update waitid_types"

2020-05-30  Eugene Syromyatnikov  <evgsyr@gmail.com>

	xlat: mark loop_flags_options as #enum.
	* xlat/loop_flags_options.in: Add #enum and #include <linux/loop.h>
	descriptors.
	* configure.ac (AC_CHECK_DECLS(LO_FLAGS_*)): Remove.

	xlat: generate m4 checks for enumerations.
	* xlat/gen.sh (print_m4_record, gen_m4_entry): New functions.
	(print_xlat_pair): Accept macro name in the third argument.
	(print_xlat, print_xlat_pair): Call print_m4_record.
	(cond_xlat): Pass $m to print_xlat_pair call. Set first_enum to 0.
	(gen_header, gen_make, gen_git): Output the "generating ..." line
	to stderr.
	(gen_header): Get output_m4 as the fourth parameter, redirect fd 3
	to stdout, set enum to 1 if #enum is present and $output_m4 is set,
	append #include argument to includes, generate $output_m4 is $enum
	is set to 1, pass macro name to print_xlat_pair call, close fd 3.
	(gen_git): Add st_check_enums.m4 and "/*.m4".
	(main): Allow passing $output_m4 as the third argument, pass m4 file
