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

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

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

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

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

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

	pkeys: use the generic printargs_d printer for pkey_free syscall.
	There is no need to use a specific printer for pkey_free syscall,
	printargs_d does the right thing.

	* src/pkeys.c (SYS_FUNC(pkey_free)): Remove.
	* src/syscall_dummy.h (sys_pkey_free): Alias to printargs_d.

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

	iopl: use the generic printargs_d printer.
	There is no need for the specific printer, printargs_d does the right
	thing.

	* src/iopl.c: Remove.
	* src/Makefile.am (libstrace_a_SOURCES): Remove iopl.c.
	* src/syscall_dummy.h (sys_iopl): Alias to printargs_d.

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

	Switch to use bundled <asm-generic/fcntl.h> and <asm/fcntl.h>
	Linux kernel commit v5.10-rc1~111^2~13 changed the value of O_NONBLOCK
	on hppa from 0200004 to 0200000, breaking the following build assertion:

	    xlat/open_mode_flags.h:158:1: error: static assertion failed: "O_NONBLOCK != 0200004"

	Address this issue by switching to use bundled fcntl.h files where
	appropriate.

	* NEWS: Mention this.
	* bundled/linux/include/uapi/asm-generic/fcntl.h: New file, copied
	from Linux kernel v5.11.
	* bundled/linux/arch/alpha/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/arm/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/arm64/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/ia64/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/m68k/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/mips/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/parisc/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/powerpc/include/uapi/asm/fcntl.h: Likewise.
	* bundled/linux/arch/sparc/include/uapi/asm/fcntl.h: Likewise.
	* bundled/Makefile.am (EXTRA_DIST): Add them.
	(dist-hook): New rule.
	* configure.ac: Invoke AC_PROG_LN_S.
	* src/kernel_fcntl.h: New file.
	* src/Makefile.am (libstrace_a_SOURCES): Add kernel_fcntl.h.
	* src/open.c: Include "kernel_fcntl.h" instead of <asm/fcntl.h>,
	remove redefinitions of O_ACCMODE and O_LARGEFILE.
	* src/open_tree.c: Include "kernel_fcntl.h" instead of
	"xlat/open_mode_flags.h".
	* src/bjm.c: Include "kernel_fcntl.h" instead of <fcntl.h>.
	* src/epoll.c: Likewise.
	* src/inotify.c: Likewise.
	* src/pidfd_open.c: Likewise.
	* src/time.c: Likewise.
	* src/userfaultfd.c: Likewise.
	* src/eventfd.c: Include "kernel_fcntl.h" instead of <fcntl.h> and
	<sys/eventfd.h>.
	* src/signalfd.c: Include "kernel_fcntl.h" instead of <fcntl.h> and
	<sys/signalfd.h>.
	* src/xlat/open_mode_flags.in: Add #unconditional, remove fallback
	definitions.
	(O_ASYNC, O_RSYNC, O_NDELAY): Remove.
	* src/xlat/open_access_modes.in: remove fallback definitions.
	* src/xlat/efd_flags.in (EFD_CLOEXEC): Define unconditionally.
	* src/xlat/epollflags.in (EPOLL_CLOEXEC): Likewise.
	* src/xlat/inotify_init_flags.in (IN_CLOEXEC): Likewise.
	* src/xlat/sfd_flags.in (SFD_CLOEXEC): Likewise.
	* src/xlat/timerfdflags.in (TFD_CLOEXEC): Likewise.
	* tests/dup3.c: Include "kernel_fcntl.h" instead of <fcntl.h>,
	assume O_CLOEXEC is defined.
	(main) [__sparc__]: Remove special handling of O_NDELAY.
	* tests/mq_sendrecv.c: Include "kernel_fcntl.h" instead of <fcntl.h>.
	(main): Replace S_IRWXU with 0700.
	* tests/accept4.c: Include "kernel_fcntl.h" instead of <fcntl.h>,
	assume O_CLOEXEC is defined.
	* tests/epoll_create1.c: Likewise.
	* tests/eventfd.c: Likewise.
	* tests/inotify_init1.c: Likewise.
	* tests/signalfd4.c: Likewise.
	* tests/timerfd_xettime.c: Likewise.
	* tests/userfaultfd.c: Likewise.
	* tests/delete_module.c: Include "kernel_fcntl.h" instead of <fcntl.h>.
	* tests/pipe2.c: Likewise.
	* tests/open_tree.c: Include "kernel_fcntl.h", assume O_CLOEXEC is
	defined.
	* tests/pidfd_open.c: Include "kernel_fcntl.h".

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

	tests: fix fork--pidns-translation test on sparc and sparc64.
	On sparc/sparc64, the value returned by syscall(__NR_fork) to the child
	process is not 0 but the pid of the parent process in the init
	namespace, so a simple check for non-zero is not a correct way
	to distinguish the parent process from its child process.

	* tests/fork--pidns-translation.c (fork_chain): When syscall(__NR_fork)
	returns a non-zero value, do not assume blindly that it's the child process,
	double check using waitpid.
	(main): Call perror_msg_and_fail instead of perror.
	* NEWS: Mention this.

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

	Implement decoding of epoll_pwait2 syscall.
	Introduced by Linux kernel commits v5.11-rc1~61^2~3 and
	v5.11-rc1~61^2~2.

	* src/epoll.c (epoll_wait_common): Add print_timeout argument, use it
	to print tcp->u_arg[3].
	(print_timeout_int): New function.
	(SYS_FUNC(epoll_wait)): Pass it to epoll_wait_common.
	(epoll_pwait_common): New function.
	(SYS_FUNC(epoll_pwait)): Use it.
	(SYS_FUNC(epoll_pwait2)): New function.
	* src/linux/generic/syscallent-common.h [BASE_NR + 441]: Wire up
	epoll_pwait2.
	* NEWS: Mention this change.
	* tests/epoll_pwait2.c: New file.
	* tests/epoll_pwait2-P.c: Likewise.
	* tests/epoll_pwait2-y.c: Likewise.
	* tests/gen_tests.in (epoll_pwait2, epoll_pwait2-P, epoll_pwait2-y):
	New entries.
	* tests/pure_executables.list: Add epoll_pwait2, epoll_pwait2-P,
	and epoll_pwait2-y.
	* tests/.gitignore: Likewise.

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

	Remove src/types infrastructure.
	All its former users have been converted to use bundled Linux uapi
	header files.

	* src/types/gen.sh: Remove.
	* src/types/find_last_type_fields.awk: Likewise.
	* Makefile.am (ACLOCAL_AMFLAGS): Remove "-I src/types".
	* bootstrap: Remove ./src/types/gen.sh invocation.
	* configure.ac: Remove st_CHECK_TYPES invocation.
	* src/Makefile.am: Do not include types/Makemodule.am.
	(EXTRA_DIST): Remove types/find_last_type_fields.awk and types/gen.sh.

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

	rtnl_rule: switch to use bundled <linux/fib_rules.h>
	* src/types/fib_rules.h: Remove.
	* bundled/linux/include/uapi/linux/fib_rules.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/rtnl_rule.c: Include <linux/fib_rules.h> instead of
	"types/fib_rules.h".
	(decode_rule_addr): Replace struct_fib_rule_hdr with struct
	fib_rule_hdr.
	(decode_fib_rule_uid_range): Replace struct_fib_rule_uid_range with
	struct fib_rule_uid_range.
	(decode_rule_port_range): Replace struct_fib_rule_port_range with
	struct fib_rule_port_range.
	(decode_fib_rule_hdr): Replace struct_fib_rule_hdr with struct
	fib_rule_hdr.
	* src/xlat/fib_rule_actions.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/fib_rule_flags.in: Likewise.
	* src/xlat/rtnl_rule_attrs.in: Likewise.
	* tests/netlink_route.c: Include <linux/fib_rules.h> unconditionally,
	assume all its constants, structures and their fields are available.
	* tests/nlattr_fib_rule_hdr.c: Compile unconditionally, remove fallback
	definitions of constants and structures, assume all <linux/fib_rules.h>
	constants, structures and their fields are available.

	rtnl_mdb: switch to use bundled <linux/if_bridge.h>
	* src/types/rtnl_mdb.h: Remove.
	* bundled/linux/include/uapi/linux/if_bridge.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/linux/include/uapi/linux/in6.h: Likewise.
	* bundled/linux/include/uapi/linux/libc-compat.h: Likewise.
	* bundled/Makefile.am (EXTRA_DIST): Add them.
	* configure.ac (AC_CHECK_MEMBERS): Remove struct br_mdb_entry.flags and
	struct br_mdb_entry.vid.
	* src/rtnl_mdb.c: Include <netinet/in.h> and <linux/if_bridge.h>
	instead of "types/rtnl_mdb.h".
	(decode_mdba_mdb_entry_info): Replace struct_br_mdb_entry with struct
	br_mdb_entry.
	(decode_br_port_msg): Replace struct_br_port_msg with struct
	br_port_msg.
	* src/xlat/mdb_flags.in: Add #unconditional.
	* src/xlat/mdb_states.in: Add #unconditional and #value_indexed.
	* src/xlat/multicast_router_types.in: Add #unconditional, remove
	fallback definitions.
	* src/xlat/rtnl_mdb_attrs.in: Likewise.
	* src/xlat/rtnl_mdba_mdb_attrs.in: Likewise.
	* src/xlat/rtnl_mdba_mdb_eattr_attrs.in: Likewise.
	* src/xlat/rtnl_mdba_mdb_entry_attrs.in: Likewise.
	* src/xlat/rtnl_mdba_router_attrs.in: Likewise.
	* src/xlat/rtnl_mdba_router_pattr_attrs.in: Likewise.
	* tests/netlink_route.c: Do not include <netinet/in.h>,
	Assume all <linux/if_bridge.h> constants, structures and their fields
	are available.
	* tests/nlattr_br_port_msg.c: Compile unconditionally, do not include
	<netinet/in.h>, Assume all <linux/if_bridge.h> constants, structures
	and their fields are available.
	* tests/nlattr_mdba_mdb_entry.c: Likewise.
	* tests/nlattr_mdba_router_port.c: Likewise.

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

	xlat: update RTAX_* constants.
	* src/xlat/rtnl_rta_metrics_attrs.in (RTAX_FASTOPEN_NO_COOKIE):
	New constant introduced by Linux kernel commit v4.15-rc1~84^2~339.
	* NEWS: Mention this change.

	xlat: update RTA_* constants.
	* src/xlat/rtnl_route_attrs.in (RTA_NH_ID): New constant introduced
	by Linux kernel commit v5.3-rc1~140^2~411^2~5.
	* NEWS: Mention this change.

	xlat: update RTM_* constants.
	* src/xlat/nl_route_types.in (RTM_NEWNEXTHOP, RTM_DELNEXTHOP,
	RTM_GETNEXTHOP): New constants introduced by Linux kernel commit
	v5.3-rc1~140^2~411^2~5.
	(RTM_NEWLINKPROP, RTM_DELLINKPROP, RTM_GETLINKPROP): New constants
	introduced by Linux kernel commit v5.5-rc1~174^2~448^2~4.
	(RTM_NEWVLAN, RTM_DELVLAN, RTM_GETVLAN): New constants introduced
	by Linux kernel commit v5.6-rc1~151^2~90^2~5.
	* NEWS: Mention this change.

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

	rtnl_route: switch to use bundled <linux/rtnetlink.h>
	* src/types/rtnl_route.h: Remove.
	* bundled/linux/include/uapi/linux/rtnetlink.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/rtnl_route.c: Include <linux/rtnetlink.h> instead of
	"types/rtnl_route.h".
	(decode_rta_mfc_stats): Replace struct_rta_mfc_stats with struct
	rta_mfc_stats.
	(decode_rtvia): Replace struct_rtvia with struct rtvia.
	* src/xlat/nl_route_types.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/route_nexthop_flags.in: Likewise.
	* src/xlat/routing_flags.in: Likewise.
	* src/xlat/routing_protocols.in: Likewise.
	* src/xlat/routing_scopes.in: Likewise.
	* src/xlat/routing_table_ids.in: Likewise.
	* src/xlat/routing_types.in: Likewise.
	* src/xlat/rtnl_route_attrs.in: Likewise.
	* src/xlat/rtnl_rta_metrics_attrs.in: Likewise.
	* src/xlat/rtnl_tc_attrs.in: Likewise.
	* tests/netlink_route.c: Assume RTM_NEWNSID is available.
	* tests/nlattr_rtgenmsg.c: Assume RTM_GETNSID is available.
	* tests/nlattr_rtmsg.c: Assume RTA_ENCAP_TYPE, struct rta_mfc_stats,
	and struct rtvia are available.
	* tests/nlattr_tca_stab.c: Assume TCA_STAB is available.

	rtnl_neigh: switch to use bundled <linux/neighbour.h>
	* src/types/rtnl_neightbl.h: Remove.
	* bundled/linux/include/uapi/linux/neighbour.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Remove linux/neighbour.h.
	* src/rtnl_neigh.c: Include <linux/neighbour.h> instead of
	<linux/rtnetlink.h>.
	* src/rtnl_neightbl.c: Include <linux/neighbour.h> instead of
	"types/rtnl_neightbl.h".
	(decode_ndt_config): Replace struct_ndt_config with struct ndt_config.
	(decode_ndt_stats): Replace struct_ndt_stats with struct ndt_stats.
	* src/xlat/neighbor_cache_entry_flags.in: Add #unconditional.
	* src/xlat/neighbor_cache_entry_states.in: Likewise.
	* src/xlat/rtnl_neigh_attrs.in: Add #unconditional, remove fallback
	definitions.
	* tests/netlink_route.c Include <linux/neighbour.h> unconditionally.
	* tests/nlattr_ndmsg.c: Likewise.
	(NDA_PORT): Remove.
	* tests/nlattr_ndtmsg.c: Include <linux/neighbour.h> unconditionally,
	assume all <linux/neighbour.h> types are properly defined, remove
	fallback definitions for constants defined in <linux/neighbour.h>.

	rtnl_link: switch to use bundled <linux/if_link.h>
	* src/types/rtnl_link.h: Remove.
	* bundled/linux/include/uapi/linux/if_link.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Remove linux/if_link.h.
	(AC_CHECK_TYPES): Remove struct ifla_cacheinfo.
	* src/rtnl_link.c: Include <linux/if_link.h> instead of
	"types/rtnl_link.h".
	(decode_rtnl_link_stats): Replace struct_rtnl_link_stats with struct
	rtnl_link_stats.
	(decode_rtnl_link_stats64): Replace struct_rtnl_link_stats64 with struct
	rtnl_link_stats64.
	(decode_ifla_bridge_id): Use struct ifla_bridge_id.
	(decode_ifla_port_vsi): Replace struct_ifla_port_vsi with struct
	ifla_port_vsi.
	* src/xlat/in6_addr_gen_mode.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/rtnl_ifla_af_spec_inet6_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_af_spec_inet_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_brport_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_events.in: Likewise.
	* src/xlat/rtnl_ifla_info_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_info_data_bridge_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_info_data_tun_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_port_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_vf_port_attrs.in: Likewise.
	* src/xlat/rtnl_ifla_xdp_attached_mode.in: Add #unconditional, remove
	fallback definitions, #enum and #include.
	* src/xlat/rtnl_ifla_xdp_attrs.in: Likewise.
	* src/xlat/rtnl_link_attrs.in: Likewise.
	* tests/nlattr_ifinfomsg.c: Include <linux/if_link.h> unconditionally,
	assume all <linux/if_link.h> types are properly defined, remove
	fallback definitions for constants defined in <linux/if_link.h>.
	* tests/nlattr_ifla_af_spec.c: Likewise.
	* tests/nlattr_ifla_brport.c: Likewise.
	* tests/nlattr_ifla_linkinfo.c: Likewise.
	* tests/nlattr_ifla_port.c: Likewise.
	* tests/nlattr_ifla_xdp.c: Likewise.

	rtnl_addr: switch to use bundled <linux/if_addr.h>
	* bundled/linux/include/uapi/linux/if_addr.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Remove linux/if_addr.h.
	* src/rtnl_addr.c: Include <linux/if_addr.h> unconditionally.
	* src/xlat/ifaddrflags.in: Add #unconditional.
	* src/xlat/rtnl_addr_attrs.in: Add #unconditional, remove fallback
	definitions.
	* tests/netlink_route.c: Include <linux/if_addr.h> unconditionally.
	* tests/nlattr_ifaddrmsg.c: Likewise.
	(IFA_FLAGS): Remove.

	netlink.h: switch to use bundled <linux/netlink.h> and <linux/socket.h>
	* bundled/linux/include/uapi/linux/netlink.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/linux/include/uapi/linux/socket.h: Likewise.
	* bundled/Makefile.am (EXTRA_DIST): Add them.
	* src/netlink.h: Remove fallback definitions of constants defined
	in <linux/netlink.h>.
	* src/xlat/netlink_delete_flags.in: Add #unconditional.
	* src/xlat/netlink_get_flags.in: Likewise.
	* src/xlat/netlink_new_flags.in: Likewise.
	* src/xlat/netlink_flags.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/netlink_ack_flags.in: Likewise.
	* src/xlat/netlink_protocols.in: Likewise.
	* src/xlat/netlink_types.in: Likewise.
	* src/xlat/nlmsgerr_attrs.in: Likewise.
	* src/xlat/sock_netlink_options.in: Likewise.

2021-02-10  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

	Update ioctl entries from linux v5.11.
	* src/linux/32/ioctls_inc_align16.h: Update from src/linux v5.11-rc7
	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/arm/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.

2021-02-10  Gleb Fotengauer-Malinovskiy  <glebfm@altlinux.org>

	Drop leftover duplicate ioctl entry.
	* src/linux/32/ioctls_inc_align16.h (USBDEVFS_SUBMITURB): Remove.

	Complements: 7241233c9 ("maint: remove ioctl duplicates")

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

	xlat: update V4L2_* constants.
	* src/xlat/v4l2_control_classes.in (V4L2_CTRL_CLASS_MPEG): Rename to
	V4L2_CTRL_CLASS_CODEC following the change made by Linux kernel commit
	v5.11-rc1~203^2~85.
	(V4L2_CTRL_CLASS_CODEC_STATELESS): New constant introduced by Linux
	kernel commit v5.11-rc1~203^2~85.
	* src/xlat/v4l2_control_id_bases.in (V4L2_CID_MPEG_BASE): Rename to
	V4L2_CID_CODEC_BASE following the change made by Linux kernel commit
	v5.11-rc1~203^2~85.
	(V4L2_CID_USER_CODA_BASE): New constant introduced by Linux kernel
	commit v5.11-rc1~203^2~288.
	(V4L2_CID_CODEC_STATELESS_BASE): New constant introduced by Linux kernel
	commit v5.11-rc1~203^2~82
	* src/xlat/v4l2_control_types.in (V4L2_CTRL_TYPE_H264_SPS,
	V4L2_CTRL_TYPE_H264_PPS, V4L2_CTRL_TYPE_H264_SCALING_MATRIX,
	V4L2_CTRL_TYPE_H264_SLICE_PARAMS, V4L2_CTRL_TYPE_H264_DECODE_PARAMS,
	V4L2_CTRL_TYPE_H264_PRED_WEIGHTS): New constant introduced by Linux
	kernel commit v5.11-rc1~203^2~79.
	(V4L2_CTRL_TYPE_FWHT_PARAMS): New constant introduced by Linux kernel
	commit v5.11-rc1~203^2~72.
	* src/xlat/v4l2_meta_fmts.in (V4L2_META_FMT_RK_ISP1_PARAMS,
	V4L2_META_FMT_RK_ISP1_STAT_3A): New constant introduced by Linux kernel
	commit v5.11-rc1~203^2~269.
	* src/xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_H264_SLICE): New constant
	introduced by Linux kernel commit v5.11-rc1~203^2~81.
	* NEWS: Mention this change.
	* tests/ioctl_v4l2.c (main): Update expected output.
	* tests/ioctl_v4l2-success.c (main): Likewise.

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

	xlat: update UFFD_* constants.
	* src/xlat/uffd_flags.in (UFFD_USER_MODE_ONLY): New constant introduced
	by Linux kernel commit v5.11-rc1~170^2~21.
	* NEWS: Mention this change.
	* tests/userfaultfd.c: Check it.
	* tests/gen_tests.in (userfaultfd): Update -a option argument.

	xlat: update SCTP_* constants.
	* src/xlat/sock_sctp_options.in (SCTP_REMOTE_UDP_ENCAPS_PORT):
	New constant introduced by Linux kernel commit v5.11-rc1~169^2~420^2~8.
	* NEWS: Mention this change.

	xlat: update RTNH_* constants.
	* src/xlat/route_nexthop_flags.in (RTNH_F_TRAP): New constant introduced
	by Linux kernel commit v5.11-rc1~169^2~322^2~13.
	* NEWS: Mention this change.

	xlat: update PR_* constants.
	* src/xlat/prctl_options.in (PR_SET_SYSCALL_USER_DISPATCH): New constant
	introduced by Linux kernel commit v5.11-rc1~180^2~9.
	* NEWS: Mention this change.

	xlat: update KVM_* constants.
	* src/xlat/kvm_cap.in (KVM_CAP_SYS_HYPERV_CPUID): New constant
	introduced by Linux kernel commit v5.11-rc1~50^2~74.
	(KVM_CAP_DIRTY_LOG_RING): New constant introduced by Linux kernel commit
	v5.11-rc1~50^2~69.
	* src/xlat/kvm_exit_reason.in (KVM_EXIT_DIRTY_RING_FULL): Likewise.
	(KVM_EXIT_AP_RESET_HOLD): New constant introduced by Linux kernel commit
	v5.11-rc3~23^2~2.
	* NEWS: Mention this change.

	xlat: update IORING_* constants.
	* src/xlat/uring_ops.in (IORING_OP_SHUTDOWN): New constant introduced
	by Linux kernel commit v5.11-rc1~111^2~40.
	(IORING_OP_RENAMEAT): New constant introduced by Linux kernel commit
	v5.11-rc1~111^2~36.
	(IORING_OP_UNLINKAT): New constant introduced by Linux kernel commit
	v5.11-rc1~111^2~35.
	* src/xlat/uring_setup_features.in (IORING_FEAT_SQPOLL_NONFIXED):
	New constant introduced by Linux kernel commit v5.11-rc1~111^2~39.
	(IORING_FEAT_EXT_ARG): New constant introduced by Linux kernel commit
	v5.11-rc1~111^2~28.
	* src/xlat/uring_enter_flags.in (IORING_ENTER_EXT_ARG): Likewise.
	* NEWS: Mention this change.
	* tests/io_uring_enter.c (main): Update expected output.
	* tests/io_uring_register.c (main): Likewise.

	xlat: update ETH_* constants.
	* src/xlat/ethernet_protocols.in (ETH_P_CFM): New constant introduced
	by Linux kernel commit v5.11-rc1~169^2~446^2~7.
	* NEWS: Mention this change.

	xlat: update CLOSE_RANGE_* constants.
	* src/xlat/close_range_flags.in (CLOSE_RANGE_CLOEXEC): New constant
	introduced by Linux kernel commit v5.11-rc1~137^2~1.
	* NEWS: Mention this change.
	* tests/close_range.c (main): Update expected output.

	xlat: update BTRFS_* constants.
	* src/xlat/btrfs_features_incompat.in (BTRFS_FEATURE_INCOMPAT_RAID1C34):
	New constant introduced by Linux kernel commit v5.5-rc1~195^2~17.
	(BTRFS_FEATURE_INCOMPAT_ZONED): New constant introduced by Linux kernel
	commit v5.11-rc1~144^2~48.
	* NEWS: Mention this change.

	xlat: update BPF_* constants.
	* src/xlat/bpf_map_types.in (BPF_MAP_TYPE_TASK_STORAGE): New constant
	introduced by Linux kernel commit v5.11-rc1~169^2~259^2~23.
	* NEWS: Mention this change.
	* tests/bpf.c (BPF_MAP_CREATE_checks): Update.

	xlat: update SO_* constants.
	* src/xlat/sock_options.in (SO_PREFER_BUSY_POLL): New constant
	introduced by Linux kernel commit v5.11-rc1~169^2~124^2~17^2~9.
	(SO_BUSY_POLL_BUDGET): New constant introduced by Linux kernel commit
	v5.11-rc1~169^2~124^2~17^2~8.
	* NEWS: Mention this change.

	xlat: update SYS_* constants.
	* src/xlat/sigsys_codes.in (SYS_USER_DISPATCH): New constant introduced
	by Linux kernel commit v5.11-rc1~180^2~10.
	* NEWS: Mention this change.

	xlat: update PTRACE_* constants.
	* src/xlat/ptrace_cmds.in (PTRACE_PEEKMTETAGS, PTRACE_POKEMTETAGS): New
	aarch64 constants introduced by Linux kernel commit v5.10-rc1~49^2~9^2~8.
	* NEWS: Mention this change.

	close_range: switch to use bundled <linux/close_range.h>
	* bundled/linux/include/uapi/linux/close_range.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Remove linux/close_range.h.
	* src/close_range.c: Include <linux/close_range.h> unconditionally.
	* src/xlat/close_range_flags.in: Add #unconditional, remove fallback
	definitions.
	* tests/close_range.c: Include <linux/close_range.h> unconditionally,
	remove fallback definitions.

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

	src/linux: move generic and fallback files into generic subdirectory.
	* configure.ac: Replace linux/signal.h.in with
	linux/generic/signal.h.in, linux/linux/signal.h with
	linux/generic/linux/signal.h.
	[$arch == mips]: Update genstub.sh invocations.
	* src/.gitignore: Replace /linux/linux with /linux/generic/linux.
	* src/linux/*.c: Move to src/linux/generic/.
	* src/linux/*.h: Likewise.
	* src/linux/signal.h.in: Likewise.
	* src/linux/32/subcallent.h: Include "../generic/subcallent.h" instead
	of "../subcallent.h".
	* src/linux/64/subcallent.h: Likewise.
	* src/linux/i386/userent0.h: Include "../generic/userent0.h" instead of
	"../userent0.h".
	* src/linux/s390/userent1.h: Likewise.
	* src/linux/sh/userent0.h: Likewise.
	* src/linux/powerpc/errnoent.h: Include "../generic/errnoent.h" instead
	of "../errnoent.h".
	* src/linux/powerpc64/rt_sigframe.h: Include "../generic/rt_sigframe.h"
	instead of "../rt_sigframe.h".
	* src/linux/x86_64/asm_stat.h: Include "../generic/asm_stat.h" instead
	of "../asm_stat.h".
	* src/Makefile.am (AM_CPPFLAGS): Replace -I$(builddir)/$(OS)
	with -I$(builddir)/$(OS)/generic, -I$(srcdir)/$(OS)
	with -I$(srcdir)/$(OS)/generic.
	(libstrace_a_SOURCES, EXTRA_DIST): Update.
	(DISTCLEANFILES): Replace linux/linux/signal.h with
	linux/generic/linux/signal.h.
	* tests/Makefile.am (AM_CPPFLAGS): Replace -I$(top_builddir)/src/$(OS)
	with -I$(top_builddir)/src/$(OS)/generic, -I$(top_srcdir)/src/$(OS)
	with -I$(top_srcdir)/src/$(OS)/generic.

	src/linux: normalize cross-arch #include.
	Convert include paths automatically using the following command:
	$ git grep -l 'include[[:space:]]*"[[:alnum:]_]*/' src/linux |
	xargs -r sed -ri 's#(include[[:space:]]+")([[:alnum:]_]*/)#\1../\2#' --

	src/linux: include "../asm_stat.h" instead of "linux/asm_stat.h"
	* src/linux/x86_64/asm_stat.h: Include "../asm_stat.h" instead of
	"linux/asm_stat.h".

	src/linux: include "userent0.h" instead of "../userent0.h" where appropriate
	* src/linux/alpha/userent.h: Include "userent0.h" instead of
	"../userent0.h".
	* src/linux/arm/userent.h: Likewise.
	* src/linux/avr32/userent.h: Likewise.
	* src/linux/bfin/userent.h: Likewise.
	* src/linux/ia64/userent.h: Likewise.
	* src/linux/m68k/userent.h: Likewise.
	* src/linux/microblaze/userent.h: Likewise.
	* src/linux/mips/userent.h: Likewise.
	* src/linux/powerpc/userent.h: Likewise.
	* src/linux/sparc/userent.h: Likewise.
	* src/linux/sparc64/userent.h: Likewise.

	src/linux/syscallent-common-32.h: move to src/linux/32/
	* configure.ac [$arch == mips]: Update genstub.sh invocations.
	* src/Makefile.ama (EXTRA_DIST): Replace linux/syscallent-common-32.h
	with linux/32/syscallent-common-32.h.
	* src/linux/syscallent-common-32.h: Move to src/linux/32/,
	all users updated.
	* src/linux/arm/syscallent.h: Include "../32/syscallent-common-32.h"
	instead of "syscallent-common-32.h".
	* src/linux/hppa/syscallent.h: Likewise.
	* src/linux/i386/syscallent.h: Likewise.
	* src/linux/m68k/syscallent.h: Likewise.
	* src/linux/microblaze/syscallent.h: Likewise.
	* src/linux/mips/syscallent-n32.h: Likewise.
	* src/linux/mips/syscallent-o32.h: Likewise.
	* src/linux/powerpc/syscallent.h: Likewise.
	* src/linux/s390/syscallent.h: Likewise.
	* src/linux/sh/syscallent.h: Likewise.
	* src/linux/sparc/syscallent.h: Likewise.
	* src/linux/xtensa/syscallent.h: Likewise.

	src/linux: rename subcall.h, subcall32.h and subcall64.h.
	* src/linux/subcall.h: Rename to src/linux/subcallent.h.
	* src/linux/subcall32.h: Rename to src/linux/32/subcallent.h.
	* src/linux/subcall64.h: Rename to src/linux/64/subcallent.h
	* src/Makefile.am (EXTRA_DIST): Rename linux/subcall.h to
	linux/subcallent.h, linux/subcall32.h to linux/32/subcallent.h,
	linux/subcall64.h to linux/64/subcallent.h.  All users updated.
	(syscallent_names): Replace subcall.h with subcallent.h.

	Merge src/linux/arch_defs_.h into src/arch_defs.h.
	* src/arch_defs.h: Do not include "linux/arch_defs_.h" but import its
	contents.
	* src/linux/arch_defs_.h: Turn into an empty placeholder file.

	src: move linux/dummy.h to top level and rename to syscall_dummy.h.
	* src/linux/dummy.h: Rename to src/syscall_dummy.h.
	* src/Makefile.am (libstrace_a_SOURCES): Add syscall_dummy.h.
	(EXTRA_DIST): Remove linux/dummy.h.
	* src/syscall.h: Include "syscall_dummy.h" instead of "dummy.h".
	* src/linux/mips/syscallent.h: Likewise.

	src: move linux/syscall.h to top level.
	* src/linux/syscall.h: Rename to src/syscall.h.
	* src/Makefile.am (libstrace_a_SOURCES): Add syscall.h.
	(EXTRA_DIST): Remove linux/syscall.h.

	tee: switch to use bundled <linux/tee.h>
	* src/types/tee.h: Remove.
	* src/xlat/tee_ioctl_cmds.in: Likewise.
	* bundled/linux/include/uapi/linux/tee.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Remove linux/tee.h.
	* src/tee.c: Include <linux/tee.h> instead of "types/tee.h"
	and "xlat/tee_ioctl_cmds.h".
	Replace all struct_tee_* types with corresponding struct tee_*.
	(struct tee_ioctl_shm_register_fd_data): New type.
	(TEE_IOC_SHM_REGISTER_FD): New macro.
	* src/xlat/tee_ioctl_gen_caps.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/tee_ioctl_impl_ids.in: Likewise.
	* src/xlat/tee_ioctl_login_types.in: Likewise.
	* src/xlat/tee_ioctl_max_arg_size.in: Likewise.
	* src/xlat/tee_ioctl_optee_caps.in: Likewise.
	* src/xlat/tee_ioctl_param_attr_types.in: Likewise.
	* tests/ioctl_tee.c: Compile unconditionally, assume all <linux/tee.h>
	types and constants are available, remove fallback definitions for
	types and constants.

2021-02-07  Elvira Khabirova  <lineprinter0@gmail.com>
	    Dmitry V. Levin  <ldv@altlinux.org>

	tests: check new tampering notes.
	* tests/tampering-notes.c: New file.
	* tests/tampering-notes.test: New test.
	* tests/Makefile.am (MISC_TESTS): Add tampering-notes.test.
	* tests/pure_executables.list: Add tampering-notes.
	* tests/.gitignore: Likewise.

	Print tampering notes for delayed and poked syscalls.
	* src/defs.h (TCB_TAMPERED_DELAYED, TCB_TAMPERED_POKED,
	syscall_tampered_delayed, syscall_tampered_poked): New macros.
	* src/delay.c (delay_tcb): Set TCB_TAMPERED_DELAYED flag.
	* src/poke.c (poke_tcb): Set TCB_TAMPERED_POKED flag if a poke was
	performed.
	* src/syscall.c (print_injected_note): New function to print different
	notes depending on whether an error/retval injection, delay injection,
	and/or poke injection were performed.
	(syscall_exiting_trace): Use it.
	(syscall_exiting_finish): Clear TCB_TAMPERED_DELAYED and
	TCB_TAMPERED_POKED flags.
	* tests/poke.c (main): Adjust for the new tampering note format.
	* tests/poke-sendfile.c: Likewise.

	tests: check poke injection functionality.
	* tests/poke.test: New test.
	* tests/poke-ptrace.test: Likewise.
	* tests/poke-range.test: Likewise.
	* tests/poke-unaligned.test: Likewise.
	* tests/poke-range.expected: New file.
	* tests/poke-unaligned.expected: Likewise.
	* tests/poke.c: New file.
	* tests/poke-sendfile.c: Likewise.
	* tests/gen_tests.in (poke-sendfile): New entry.
	(trace_personality_*): Skip poke executable.
	* tests/pure_executables.list: Add poke and poke-sendfile.
	* tests/.gitignore: Likewise.
	(EXTRA_DIST): Add poke-range.expected and poke-unaligned.expected.
	(MISC_TESTS): Add poke.test, poke-ptrace.test, poke-range.test,
	and poke-unaligned.test.
	* tests/qual_inject-syntax.test: Invoke with -efu,
	add checks for inject=SET:poke_{enter,exit} expression syntax.

	Add -e inject=<...>:poke_{enter,exit}=<...> functionality.
	* configure.ac (AC_CHECK_FUNCS): Add process_vm_writev.
	* src/poke.c: New file.
	* src/poke.h: Likewise.
	* src/Makefile.am (libstrace_a_SOURCES): Add poke.c and poke.h.
	* src/defs.h (INJECT_F_POKE_ENTER, INJECT_F_POKE_EXIT,
	TCB_INJECT_POKE_EXIT, inject_poke_exit): New macros.
	(INJECT_ACTION_FLAGS): Add INJECT_F_POKE_ENTER and INJECT_F_POKE_EXIT.
	(struct inject_data): Add poke_idx.
	(upoken): New prototype.
	* src/filter_qualify.c: Include "poke.h".
	(parse_poke_token): New function.
	(parse_inject_token): Use it.
	(qualify_inject_common): Initialize struct inject_opts.data.poke_idx.
	* src/syscall.c: Include "poke.h".
	(tamper_with_syscall_entering): Poke if INJECT_F_POKE_ENTER
	is set, set TCB_INJECT_POKE_EXIT if INJECT_F_POKE_EXIT is set.
	(syscall_exiting_trace): Call tamper_with_syscall_exiting
	if TCB_INJECT_POKE_EXIT is set.
	(tamper_with_syscall_exiting): Poke if INJECT_F_POKE_EXIT is set.
	(syscall_exiting_finish): Clear TCB_INJECT_POKE_EXIT flag.
	* src/ucopy.c (vm_write_mem, upoken_pokedata, upoken): New functions.
	[!HAVE_PROCESS_VM_WRITEV] (strace_process_vm_writev): New function.
	* src/strace.c: Mention poke injection.
	* doc/strace.1.in: Document poke injection.
	* NEWS: Mention the new functionality.

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

	tests: simplify sendfile test.
	* tests/sendfile.c (main): Turn p_off into a constant pointer
	to a kernel_ulong_t object at the end of page.

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

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

	v4l2: switch to use bundled <linux/videodev2.h>
	* src/types/v4l2.h: Remove.
	* src/xlat/v4l2_buf_flags_masks.in: Likewise.
	* src/xlat/v4l2_ioctl_cmds.in: Likewise.
	* bundled/linux/include/uapi/linux/v4l2-common.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/linux/include/uapi/linux/v4l2-controls.h: Likewise.
	* bundled/linux/include/uapi/linux/videodev2.h: Likewise.
	* bundled/Makefile.am (EXTRA_DIST): Add them.
	* configure.ac (AC_CHECK_MEMBERS): Remove struct v4l2_*.
	* src/kernel_v4l2_types.h: Include <linux/videodev2.h> instead of
	"types/v4l2.h".
	(V4L2_BUF_FLAG_INPUT, V4L2_CID_HCENTER, V4L2_CID_VCENTER,
	V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS,
	V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION): Define.
	(VIDIOC_QUERYBUF, VIDIOC_QBUF, VIDIOC_DQBUF, VIDIOC_PREPARE_BUF,
	VIDIOC_DQEVENT): Redefine.
	* src/v4l2.c: Do not include "static_assert.h",
	"xlat/v4l2_ioctl_cmds.h", and "xlat/v4l2_buf_flags_masks.h", remove
	static_assert checks, assume that all <linux/videodev2.h> constants,
	structures and their fields are available, remove fallback definitions
	for constants, replace all non-mpers struct_v4l2_* with corresponding
	struct v4l2_*.
	* src/xlat/v4l2_buf_flags.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/v4l2_buf_flags_ts_src.in: Likewise.
	* src/xlat/v4l2_buf_flags_ts_type.in: Likewise.
	* src/xlat/v4l2_capture_modes.in: Likewise.
	* src/xlat/v4l2_control_classes.in: Likewise.
	* src/xlat/v4l2_control_flags.in: Likewise.
	* src/xlat/v4l2_control_id_bases.in: Likewise.
	* src/xlat/v4l2_control_ids.in: Likewise.
	* src/xlat/v4l2_control_query_flags.in: Likewise.
	* src/xlat/v4l2_device_capabilities_flags.in: Likewise.
	* src/xlat/v4l2_format_description_flags.in: Likewise.
	* src/xlat/v4l2_frameinterval_types.in: Likewise.
	* src/xlat/v4l2_input_types.in: Likewise.
	* src/xlat/v4l2_meta_fmts.in: Likewise.
	* src/xlat/v4l2_pix_fmts.in: Likewise.
	* src/xlat/v4l2_sdr_fmts.in: Likewise.
	* src/xlat/v4l2_sliced_flags.in: Likewise.
	* src/xlat/v4l2_streaming_capabilities.in: Likewise.
	* src/xlat/v4l2_tuner_audmodes.in: Likewise.
	* src/xlat/v4l2_tuner_capabilities.in: Likewise.
	* src/xlat/v4l2_tuner_rxsubchanses.in: Likewise.
	* src/xlat/v4l2_vbi_flags.in: Likewise.
	* src/xlat/v4l2_buf_types.in: Add #unconditional, remove fallback
	definitions, #enum, and #include.
	* src/xlat/v4l2_colorspaces.in: Likewise.
	* src/xlat/v4l2_control_types.in: Likewise.
	* src/xlat/v4l2_fields.in: Likewise.
	* src/xlat/v4l2_framesize_types.in: Likewise.
	* src/xlat/v4l2_memories.in: Likewise.
	* src/xlat/v4l2_tuner_types.in: Likewise.
	* tests/ioctl_v4l2.c: Do not include "xlat/v4l2_ioctl_cmds.h", assume
	that all <linux/videodev2.h> constants, structures and their fields
	are available, remove fallback definitions for constants.
	* tests/ioctl_v4l2-success.c: Likewise.

	evdev: switch to use bundled <linux/input.h>
	* src/types/evdev.h: Remove.
	* src/xlat/evdev_ioctl_cmds.in: Likewise.
	* bundled/linux/include/uapi/linux/input.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/linux/include/uapi/linux/input-event-codes.h: Likewise.
	* bundled/Makefile.am (EXTRA_DIST): Add them.
	* src/evdev.c: Compile unconditionally, do not include "types/evdev.h"
	and "xlat/evdev_ioctl_cmds.h", assume all <linux/input.h> constants,
	structures and their fields are available, remove fallback definitions
	for constants, replace all struct_input_* with corresponding struct
	input_*.
	* src/evdev_mpers.c: Compile unconditionally.
	* src/ioctl.c (ioctl_decode) [!HAVE_LINUX_INPUT_H]: Remove.
	* src/xlat/evdev_abs.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/evdev_autorepeat.in: Likewise.
	* src/xlat/evdev_ev.in: Likewise.
	* src/xlat/evdev_ff_status.in: Likewise.
	* src/xlat/evdev_ff_types.in: Likewise.
	* src/xlat/evdev_keycode.in: Likewise.
	* src/xlat/evdev_leds.in: Likewise.
	* src/xlat/evdev_misc.in: Likewise.
	* src/xlat/evdev_mtslots.in: Likewise.
	* src/xlat/evdev_prop.in: Likewise.
	* src/xlat/evdev_relative_axes.in: Likewise.
	* src/xlat/evdev_snd.in: Likewise.
	* src/xlat/evdev_switch.in: Likewise.
	* tests/ioctl.c: Include <linux/input.h> unconditionally, assume
	EVIOCGBIT and EV_KEY are defined there.
	* tests/ioctl_evdev.c: Compile unconditionally, assume all
	<linux/input.h> constants are available, remove fallback definitions
	for constants.
	* tests/ioctl_evdev-success.c: Likewise.

	netlink_crypto: switch to use bundled <linux/cryptouser.h>
	* src/types/cryptouser.h: Remove.
	* src/xlat/crypto_msgs.in: Likewise.
	* bundled/linux/include/uapi/linux/cryptouser.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/netlink.c: Include <linux/cryptouser.h> instead of
	"xlat/crypto_msgs.h".
	* src/netlink_crypto.c: Include <linux/cryptouser.h> instead of
	"types/cryptouser.h" and "xlat/crypto_msgs.h".  Replace all
	struct_crypto_* with corresponding struct crypto_*.
	* src/xlat/crypto_nl_attrs.in: Add #unconditional, remove fallback
	definitions.
	* tests/netlink_crypto.c: Include "xlat/netlink_protocols.h" in
	[!HAVE_LINUX_CRYPTOUSER_H]: Remove.
	* tests/nlattr_crypto_user_alg.c: Include "xlat/netlink_protocols.h"
	in XLAT_MACROS_ONLY mode.
	[!HAVE_LINUX_CRYPTOUSER_H, !HAVE_STRUCT_CRYPTO_REPORT_HASH,
	!HAVE_STRUCT_CRYPTO_REPORT_BLKCIPHER, !HAVE_STRUCT_CRYPTO_REPORT_AEAD,
	!HAVE_STRUCT_CRYPTO_REPORT_RNG, !HAVE_STRUCT_CRYPTO_REPORT_CIPHER]:
	Likewise.

	io_uring: switch to use bundled <linux/io_uring.h>
	* src/types/io_uring.h: Remove.
	* bundled/linux/include/uapi/linux/io_uring.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/io_uring.c: Include <linux/io_uring.h> instead of "types/io_uring.h",
	Assume all io_uring constants, structures and their fields are available,
	Replace all struct_io_uring_* with corresponding struct io_uring_*.
	* src/xlat/uring_cqring_flags.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/uring_enter_flags.in: Likewise.
	* src/xlat/uring_op_flags.in: Likewise.
	* src/xlat/uring_setup_features.in: Likewise.
	* src/xlat/uring_setup_flags.in: Likewise.
	* src/xlat/uring_ops.in: Add #unconditional, remove #enum, #include,
	and fallback definitions.
	* src/xlat/uring_register_opcodes.in: Likewise.
	* tests/io_uring_register.c [!HAVE_LINUX_IO_URING_H,
	!HAVE_STRUCT_IO_URING_FILES_UPDATE, !HAVE_STRUCT_IO_URING_PROBE]: Remove.
	* tests/io_uring_setup.c [!HAVE_LINUX_IO_URING_H,
	!HAVE_STRUCT_IO_URING_PARAMS_WQ_FD,
	!HAVE_STRUCT_IO_URING_PARAMS_FEATURES,
	!HAVE_STRUCT_IO_CQRING_OFFSETS_FLAGS]: Likewise.

	btrfs: switch to use bundled <linux/btrfs.h> and <linux/btrfs_tree.h>
	* src/types/btrfs.h: Remove.
	* bundled/linux/include/uapi/linux/btrfs.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/linux/include/uapi/linux/btrfs_tree.h: Likewise.
	* bundled/Makefile.am (EXTRA_DIST): Add them.
	* configure.ac (AC_CHECK_HEADERS): Remove linux/btrfs.h.
	* src/btrfs.c: Compile unconditionally, include <linux/btrfs_tree.h>
	instead of <linux/btrfs.h> and "types/btrfs.h", assume all btrfs
	constants, structures and their fields are available, remove fallback
	definitions for constants and types, replace
	struct_btrfs_ioctl_logical_ino_args with struct
	btrfs_ioctl_logical_ino_args.
	* tests/btrfs.c: Likewise.  Include "xlat/fsmagic.h" in XLAT_MACROS_ONLY
	mode instead of <linux/magic.h>.
	* src/fs_0x94_ioctl.c (fs_0x94_ioctl) [!HAVE_LINUX_BTRFS_H]: Remove.
	* src/xlat/btrfs_compress_types.in: Remove #enum and #include.
	* src/xlat/btrfs_balance_args.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/btrfs_balance_ctl_cmds.in: Likewise.
	* src/xlat/btrfs_balance_flags.in: Likewise.
	* src/xlat/btrfs_balance_state.in: Likewise.
	* src/xlat/btrfs_cont_reading_from_srcdev_mode.in: Likewise.
	* src/xlat/btrfs_features_compat_ro.in: Likewise.
	* src/xlat/btrfs_key_types.in: Likewise.
	* src/xlat/btrfs_logical_ino_args_flags.in: Likewise.
	* src/xlat/btrfs_qgroup_limit_flags.in: Likewise.
	* src/xlat/btrfs_qgroup_status_flags.in: Likewise.
	* src/xlat/btrfs_scrub_flags.in: Likewise.
	* src/xlat/btrfs_send_flags.in: Likewise.
	* src/xlat/btrfs_space_info_flags.in: Likewise.
	* src/xlat/btrfs_tree_objectids.in: Likewise.
	* src/xlat/btrfs_defrag_flags.in: Add #unconditional.
	* src/xlat/btrfs_dev_replace_cmds.in: Likewise.
	* src/xlat/btrfs_dev_replace_results.in: Likewise.
	* src/xlat/btrfs_dev_replace_state.in: Likewise.
	* src/xlat/btrfs_dev_stats_flags.in: Likewise.
	* src/xlat/btrfs_features_incompat.in: Likewise.
	* src/xlat/btrfs_qgroup_ctl_cmds.in: Likewise.
	* src/xlat/btrfs_qgroup_inherit_flags.in: Likewise.
	* src/xlat/btrfs_snap_flags_v2.in: Likewise.

	fs_x_ioctl: switch to use bundled <linux/fs.h>
	* src/types/fs_x.h: Remove.
	* src/xlat/fs_x_ioctl_cmds.in: Likewise.
	* configure.ac (AC_CHECK_MEMBERS): Remove struct fsxattr.fsx_cowextsize.
	* src/fs_x_ioctl.c: Include <linux/fs.h> instead of "types/fs_x.h"
	and "xlat/fs_x_ioctl_cmds.h".
	(decode_fstrim_range): Replace struct_fstrim_range with struct
	fstrim_range.
	(decode_fsxattr): Replace struct_fsxattr with struct fsxattr.
	* src/xlat/fs_xflags.in: Add #unconditional, remove fallback
	definitions.
	* tests/ioctl_fs_x.c [!FIFREEZE, !HAVE_STRUCT_FSXATTR_FSX_COWEXTSIZE]:
	Remove.

	fs_f_ioctl: switch to use bundled <linux/fs.h>
	* src/xlat/fs_f_ioctl_cmds.in: Remove.
	* src/fs_f_ioctl.c: Do not include "xlat/fs_f_ioctl_cmds.h".
	* src/xlat/fs_ioc_flags.in: Add #unconditional, remove fallback
	definitions.
	* tests/ioctl_fs_f.c [!FS_IOC_GETFLAGS]: Remove.

	fs_0x94_ioctl: switch to use bundled <linux/fs.h>
	* src/types/fs_0x94.h: Remove.
	* src/xlat/fs_0x94_ioctl_cmds.in: Likewise.
	* src/fs_0x94_ioctl.c: Include <linux/fs.h> instead of "types/fs_0x94.h"
	and "xlat/fs_0x94_ioctl_cmds.h".
	(decode_file_clone_range): Replace struct_file_clone_range with
	struct file_clone_range.
	(print_file_dedupe_range_info, decode_file_dedupe_range): Replace
	struct_file_dedupe_range_info and struct_file_dedupe_range with
	struct file_dedupe_range_info and struct file_dedupe_range_info,
	respectively.
	(decode_fslabel): Replace fs_0x94_label_t with char[FSLABEL_MAX].
	* tests/btrfs.c [!FS_IOC_GETFSLABEL, !FS_IOC_SETFSLABEL,
	!FIDEDUPERANGE]: Remove.

	bundled: add <linux/fs.h> and <linux/fscrypt.h>
	* bundled/linux/include/uapi/linux/fs.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/linux/include/uapi/linux/fscrypt.h: Likewise.
	* bundled/Makefile.am (EXTRA_DIST): Add them.

	Switch to use bundled <linux/mount.h>
	* bundled/linux/include/uapi/linux/mount.h: New file, copied from
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* configure.ac (AC_CHECK_HEADERS): Remove linux/mount.h.
	* src/fsconfig.c: Include <linux/mount.h> unconditionally.
	* src/fsmount.c: Likewise.
	* src/fsopen.c: Likewise.
	* src/fspick.c: Likewise.
	* src/move_mount.c: Likewise.
	* src/open_tree.c: Likewise.  Include "xlat/open_mode_flags.h" in
	XLAT_MACROS_ONLY mode instead of <fcntl.h>.  to make sure O_CLOEXEC
	is properly defined.
	* src/xlat/fsconfig_cmds.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/fsmount_flags.in: Likewise.
	* src/xlat/fsopen_flags.in: Likewise.
	* src/xlat/fspick_flags.in: Likewise.
	* src/xlat/mount_attr_flags.in: Likewise.
	* src/xlat/move_mount_flags.in: Likewise.
	* src/xlat/open_tree_flags.in (OPEN_TREE_CLOEXEC): Define
	unconditionally.
	* tests/fsconfig.c: Include <linux/mount.h> instead of
	"xlat/fsconfig_cmds.h".

	fs_f_ioctl: switch to use bundled <linux/fiemap.h>
	* src/types/fiemap.h: Remove.
	* bundled/linux/include/uapi/linux/fiemap.h: New file, copied from
	headers_install'ed Linux kernel v5.11-rc6.
	* bundled/Makefile.am (EXTRA_DIST): Add it.
	* src/fs_f_ioctl.c: Include <linux/fiemap.h> instead of
	"types/fiemap.h".
	(print_fiemap_extent, decode_fiemap): Replace struct_fiemap_extent and
	struct_fiemap with struct fiemap_extent and struct fiemap, respectively.
	* src/xlat/fs_f_ioctl_cmds.in: Replace struct_fiemap with struct fiemap.
	* src/xlat/fiemap_extent_flags.in: Add #unconditional, remove fallback
	definitions.
	* src/xlat/fiemap_flags.in: Likewise.
	* tests/btrfs.c [!HAVE_LINUX_FIEMAP_H]: Remove.
	* tests/ioctl_fiemap.c [!HAVE_LINUX_FIEMAP_H]: Likewise.

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