2021-03-25 08:24:00

by Christoph Hellwig

[permalink] [raw]
Subject: split receive_fd_replace from __receive_fd

The receive_fd_replace case shares almost no logic with the more general
__receive_fd case, so split it into a separate function.

BTW, I'm not sure if receive_fd_replace is such a useful primitive to
start with, why not just open code it in seccomp?


2021-03-25 08:24:18

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH] fs: split receive_fd_replace from __receive_fd

receive_fd_replace shares almost no code with the general case, so split
it out. Also remove the "Bump the sock usage counts" comment from
both copies, as that is now what __receive_sock actually does.

Signed-off-by: Christoph Hellwig <[email protected]>
---
fs/file.c | 39 +++++++++++++++++++--------------------
include/linux/file.h | 11 ++++-------
2 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/fs/file.c b/fs/file.c
index f3a4bac2cbe915..d8ccb95a7f4138 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1068,8 +1068,6 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)

/**
* __receive_fd() - Install received file into file descriptor table
- *
- * @fd: fd to install into (if negative, a new fd will be allocated)
* @file: struct file that was received from another process
* @ufd: __user pointer to write new fd number to
* @o_flags: the O_* flags to apply to the new fd entry
@@ -1083,7 +1081,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
*
* Returns newly install fd or -ve on error.
*/
-int __receive_fd(int fd, struct file *file, int __user *ufd, unsigned int o_flags)
+int __receive_fd(struct file *file, int __user *ufd, unsigned int o_flags)
{
int new_fd;
int error;
@@ -1092,32 +1090,33 @@ int __receive_fd(int fd, struct file *file, int __user *ufd, unsigned int o_flag
if (error)
return error;

- if (fd < 0) {
- new_fd = get_unused_fd_flags(o_flags);
- if (new_fd < 0)
- return new_fd;
- } else {
- new_fd = fd;
- }
+ new_fd = get_unused_fd_flags(o_flags);
+ if (new_fd < 0)
+ return new_fd;

if (ufd) {
error = put_user(new_fd, ufd);
if (error) {
- if (fd < 0)
- put_unused_fd(new_fd);
+ put_unused_fd(new_fd);
return error;
}
}

- if (fd < 0) {
- fd_install(new_fd, get_file(file));
- } else {
- error = replace_fd(new_fd, file, o_flags);
- if (error)
- return error;
- }
+ fd_install(new_fd, get_file(file));
+ __receive_sock(file);
+ return new_fd;
+}

- /* Bump the sock usage counts, if any. */
+int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags)
+{
+ int error;
+
+ error = security_file_receive(file);
+ if (error)
+ return error;
+ error = replace_fd(new_fd, file, o_flags);
+ if (error)
+ return error;
__receive_sock(file);
return new_fd;
}
diff --git a/include/linux/file.h b/include/linux/file.h
index 225982792fa20e..2de2e4613d7bc3 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -92,23 +92,20 @@ extern void put_unused_fd(unsigned int fd);

extern void fd_install(unsigned int fd, struct file *file);

-extern int __receive_fd(int fd, struct file *file, int __user *ufd,
+extern int __receive_fd(struct file *file, int __user *ufd,
unsigned int o_flags);
static inline int receive_fd_user(struct file *file, int __user *ufd,
unsigned int o_flags)
{
if (ufd == NULL)
return -EFAULT;
- return __receive_fd(-1, file, ufd, o_flags);
+ return __receive_fd(file, ufd, o_flags);
}
static inline int receive_fd(struct file *file, unsigned int o_flags)
{
- return __receive_fd(-1, file, NULL, o_flags);
-}
-static inline int receive_fd_replace(int fd, struct file *file, unsigned int o_flags)
-{
- return __receive_fd(fd, file, NULL, o_flags);
+ return __receive_fd(file, NULL, o_flags);
}
+int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags);

extern void flush_delayed_fput(void);
extern void __fput_sync(struct file *);
--
2.30.1

2021-03-25 08:32:29

by Christian Brauner

[permalink] [raw]
Subject: Re: split receive_fd_replace from __receive_fd

On Thu, Mar 25, 2021 at 09:22:08AM +0100, Christoph Hellwig wrote:
> The receive_fd_replace case shares almost no logic with the more general
> __receive_fd case, so split it into a separate function.
>
> BTW, I'm not sure if receive_fd_replace is such a useful primitive to
> start with, why not just open code it in seccomp?

I tend to agree and argued in a similar fashion back when we added this
but we ultimately decided to add it. So now we're back to the original
argument. :)

Christian

2021-03-29 07:23:52

by kernel test robot

[permalink] [raw]
Subject: [fs] d7b0df2133: kernel-selftests.seccomp.seccomp_bpf.fail



Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: d7b0df2133729b8f9c9473d4af742d08e1d89453 ("[PATCH] fs: split receive_fd_replace from __receive_fd")
url: https://github.com/0day-ci/linux/commits/Christoph-Hellwig/fs-split-receive_fd_replace-from-__receive_fd/20210325-162437
base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git e138138003eb3b3d06cc91cf2e8c5dec77e2a31e

in testcase: kernel-selftests
version: kernel-selftests-x86_64-76bfc185-1_20210326
with following parameters:

group: group-s
ucode: 0xe2

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):




If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>

KERNEL SELFTESTS: linux_headers_dir is /usr/src/linux-headers-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453
2021-03-26 22:48:28 ln -sf /usr/bin/clang
2021-03-26 22:48:28 ln -sf /usr/bin/llc
2021-03-26 22:48:28 sed -i s/default_timeout=45/default_timeout=300/ kselftest/runner.sh
safesetid test: not in Makefile
2021-03-26 22:48:28 make TARGETS=safesetid
make --no-builtin-rules ARCH=x86 -C ../../.. headers_install
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453'
HOSTCC scripts/basic/fixdep
HOSTCC scripts/unifdef
WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h
WRAP arch/x86/include/generated/uapi/asm/errno.h
WRAP arch/x86/include/generated/uapi/asm/fcntl.h
WRAP arch/x86/include/generated/uapi/asm/ioctl.h
WRAP arch/x86/include/generated/uapi/asm/ioctls.h
WRAP arch/x86/include/generated/uapi/asm/ipcbuf.h
WRAP arch/x86/include/generated/uapi/asm/param.h
WRAP arch/x86/include/generated/uapi/asm/poll.h
WRAP arch/x86/include/generated/uapi/asm/resource.h
WRAP arch/x86/include/generated/uapi/asm/socket.h
WRAP arch/x86/include/generated/uapi/asm/sockios.h
WRAP arch/x86/include/generated/uapi/asm/termbits.h
WRAP arch/x86/include/generated/uapi/asm/termios.h
WRAP arch/x86/include/generated/uapi/asm/types.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
UPD include/generated/uapi/linux/version.h
HDRINST usr/include/video/uvesafb.h
HDRINST usr/include/video/sisfb.h
HDRINST usr/include/video/edid.h
HDRINST usr/include/drm/virtgpu_drm.h
HDRINST usr/include/drm/sis_drm.h
HDRINST usr/include/drm/vgem_drm.h
HDRINST usr/include/drm/drm_fourcc.h
HDRINST usr/include/drm/via_drm.h
HDRINST usr/include/drm/tegra_drm.h
HDRINST usr/include/drm/exynos_drm.h
HDRINST usr/include/drm/msm_drm.h
HDRINST usr/include/drm/omap_drm.h
HDRINST usr/include/drm/armada_drm.h
HDRINST usr/include/drm/nouveau_drm.h
HDRINST usr/include/drm/vc4_drm.h
HDRINST usr/include/drm/drm_mode.h
HDRINST usr/include/drm/qxl_drm.h
HDRINST usr/include/drm/amdgpu_drm.h
HDRINST usr/include/drm/drm.h
HDRINST usr/include/drm/i810_drm.h
HDRINST usr/include/drm/i915_drm.h
HDRINST usr/include/drm/radeon_drm.h
HDRINST usr/include/drm/savage_drm.h
HDRINST usr/include/drm/vmwgfx_drm.h
HDRINST usr/include/drm/mga_drm.h
HDRINST usr/include/drm/r128_drm.h
HDRINST usr/include/drm/panfrost_drm.h
HDRINST usr/include/drm/etnaviv_drm.h
HDRINST usr/include/drm/v3d_drm.h
HDRINST usr/include/drm/drm_sarea.h
HDRINST usr/include/drm/lima_drm.h
HDRINST usr/include/mtd/mtd-user.h
HDRINST usr/include/mtd/mtd-abi.h
HDRINST usr/include/mtd/nftl-user.h
HDRINST usr/include/mtd/inftl-user.h
HDRINST usr/include/mtd/ubi-user.h
HDRINST usr/include/xen/gntdev.h
HDRINST usr/include/xen/evtchn.h
HDRINST usr/include/xen/gntalloc.h
HDRINST usr/include/xen/privcmd.h
HDRINST usr/include/asm-generic/ioctl.h
HDRINST usr/include/asm-generic/mman-common.h
HDRINST usr/include/asm-generic/types.h
HDRINST usr/include/asm-generic/errno-base.h
HDRINST usr/include/asm-generic/int-ll64.h
HDRINST usr/include/asm-generic/ucontext.h
HDRINST usr/include/asm-generic/ipcbuf.h
HDRINST usr/include/asm-generic/sembuf.h
HDRINST usr/include/asm-generic/stat.h
HDRINST usr/include/asm-generic/errno.h
HDRINST usr/include/asm-generic/kvm_para.h
HDRINST usr/include/asm-generic/shmbuf.h
HDRINST usr/include/asm-generic/posix_types.h
HDRINST usr/include/asm-generic/auxvec.h
HDRINST usr/include/asm-generic/poll.h
HDRINST usr/include/asm-generic/swab.h
HDRINST usr/include/asm-generic/sockios.h
HDRINST usr/include/asm-generic/hugetlb_encode.h
HDRINST usr/include/asm-generic/bpf_perf_event.h
HDRINST usr/include/asm-generic/socket.h
HDRINST usr/include/asm-generic/siginfo.h
HDRINST usr/include/asm-generic/signal-defs.h
HDRINST usr/include/asm-generic/termbits.h
HDRINST usr/include/asm-generic/msgbuf.h
HDRINST usr/include/asm-generic/termios.h
HDRINST usr/include/asm-generic/signal.h
HDRINST usr/include/asm-generic/unistd.h
HDRINST usr/include/asm-generic/bitsperlong.h
HDRINST usr/include/asm-generic/resource.h
HDRINST usr/include/asm-generic/fcntl.h
HDRINST usr/include/asm-generic/statfs.h
HDRINST usr/include/asm-generic/mman.h
HDRINST usr/include/asm-generic/ioctls.h
HDRINST usr/include/asm-generic/int-l64.h
HDRINST usr/include/asm-generic/param.h
HDRINST usr/include/asm-generic/setup.h
HDRINST usr/include/rdma/mlx5_user_ioctl_verbs.h
HDRINST usr/include/rdma/ib_user_mad.h
HDRINST usr/include/rdma/qedr-abi.h
HDRINST usr/include/rdma/ocrdma-abi.h
HDRINST usr/include/rdma/bnxt_re-abi.h
HDRINST usr/include/rdma/rvt-abi.h
HDRINST usr/include/rdma/ib_user_ioctl_cmds.h
HDRINST usr/include/rdma/efa-abi.h
HDRINST usr/include/rdma/rdma_user_ioctl.h
HDRINST usr/include/rdma/siw-abi.h
HDRINST usr/include/rdma/vmw_pvrdma-abi.h
HDRINST usr/include/rdma/i40iw-abi.h
HDRINST usr/include/rdma/rdma_user_rxe.h
HDRINST usr/include/rdma/hns-abi.h
HDRINST usr/include/rdma/ib_user_verbs.h
HDRINST usr/include/rdma/ib_user_sa.h
HDRINST usr/include/rdma/mthca-abi.h
HDRINST usr/include/rdma/rdma_user_cm.h
HDRINST usr/include/rdma/cxgb4-abi.h
HDRINST usr/include/rdma/mlx4-abi.h
HDRINST usr/include/rdma/mlx5_user_ioctl_cmds.h
HDRINST usr/include/rdma/mlx5-abi.h
HDRINST usr/include/rdma/rdma_user_ioctl_cmds.h
HDRINST usr/include/rdma/rdma_netlink.h
HDRINST usr/include/rdma/ib_user_ioctl_verbs.h
HDRINST usr/include/rdma/hfi/hfi1_user.h
HDRINST usr/include/rdma/hfi/hfi1_ioctl.h
HDRINST usr/include/misc/xilinx_sdfec.h
HDRINST usr/include/misc/uacce/uacce.h
HDRINST usr/include/misc/uacce/hisi_qm.h
HDRINST usr/include/misc/fastrpc.h
HDRINST usr/include/misc/cxl.h
HDRINST usr/include/misc/habanalabs.h
HDRINST usr/include/misc/ocxl.h
HDRINST usr/include/misc/pvpanic.h
HDRINST usr/include/linux/ioctl.h
HDRINST usr/include/linux/vbox_vmmdev_types.h
HDRINST usr/include/linux/ipmi_msgdefs.h
HDRINST usr/include/linux/if_x25.h
HDRINST usr/include/linux/phantom.h
HDRINST usr/include/linux/connector.h
HDRINST usr/include/linux/remoteproc_cdev.h
HDRINST usr/include/linux/seg6.h
HDRINST usr/include/linux/if_link.h
HDRINST usr/include/linux/tls.h
HDRINST usr/include/linux/tcp.h
HDRINST usr/include/linux/tc_ematch/tc_em_text.h
HDRINST usr/include/linux/tc_ematch/tc_em_meta.h
HDRINST usr/include/linux/tc_ematch/tc_em_nbyte.h
HDRINST usr/include/linux/tc_ematch/tc_em_ipt.h
HDRINST usr/include/linux/tc_ematch/tc_em_cmp.h
HDRINST usr/include/linux/reboot.h
HDRINST usr/include/linux/pci.h
HDRINST usr/include/linux/map_to_7segment.h
HDRINST usr/include/linux/io_uring.h
HDRINST usr/include/linux/dn.h
HDRINST usr/include/linux/hsi/cs-protocol.h
HDRINST usr/include/linux/hsi/hsi_char.h
HDRINST usr/include/linux/virtio_mem.h
HDRINST usr/include/linux/sonypi.h
HDRINST usr/include/linux/acct.h
HDRINST usr/include/linux/idxd.h
HDRINST usr/include/linux/mpls_iptunnel.h
HDRINST usr/include/linux/sonet.h
HDRINST usr/include/linux/rpl_iptunnel.h
HDRINST usr/include/linux/patchkey.h
HDRINST usr/include/linux/pkt_cls.h
HDRINST usr/include/linux/zorro_ids.h
HDRINST usr/include/linux/uhid.h
HDRINST usr/include/linux/watch_queue.h
HDRINST usr/include/linux/i8k.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_REJECT.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_ttl.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_TTL.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_ecn.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_LOG.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_ah.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_ECN.h
HDRINST usr/include/linux/netfilter_ipv4/ip_tables.h
HDRINST usr/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h
HDRINST usr/include/linux/virtio_balloon.h
HDRINST usr/include/linux/serial_reg.h
HDRINST usr/include/linux/module.h
HDRINST usr/include/linux/netfilter.h
HDRINST usr/include/linux/if.h
HDRINST usr/include/linux/ppp-ioctl.h
HDRINST usr/include/linux/in.h
HDRINST usr/include/linux/atmioc.h
HDRINST usr/include/linux/ila.h
HDRINST usr/include/linux/dcbnl.h
HDRINST usr/include/linux/eventpoll.h
HDRINST usr/include/linux/um_timetravel.h
HDRINST usr/include/linux/userfaultfd.h
HDRINST usr/include/linux/fuse.h
HDRINST usr/include/linux/elf-em.h
HDRINST usr/include/linux/net_namespace.h
HDRINST usr/include/linux/hdlc/ioctl.h
HDRINST usr/include/linux/loop.h
HDRINST usr/include/linux/nexthop.h
HDRINST usr/include/linux/virtio_ring.h
HDRINST usr/include/linux/atm_nicstar.h
HDRINST usr/include/linux/sock_diag.h
HDRINST usr/include/linux/suspend_ioctls.h
HDRINST usr/include/linux/switchtec_ioctl.h
HDRINST usr/include/linux/limits.h
HDRINST usr/include/linux/atm_eni.h
HDRINST usr/include/linux/cuda.h
HDRINST usr/include/linux/posix_acl.h
HDRINST usr/include/linux/netlink.h
HDRINST usr/include/linux/cec.h
HDRINST usr/include/linux/arcfb.h
HDRINST usr/include/linux/pkt_sched.h
HDRINST usr/include/linux/mpls.h
HDRINST usr/include/linux/elf-fdpic.h
HDRINST usr/include/linux/xilinx-v4l2-controls.h
HDRINST usr/include/linux/netconf.h
HDRINST usr/include/linux/mmc/ioctl.h
HDRINST usr/include/linux/virtio_rng.h
HDRINST usr/include/linux/icmp.h
HDRINST usr/include/linux/nfc.h
HDRINST usr/include/linux/ppp-comp.h
HDRINST usr/include/linux/tipc_netlink.h
HDRINST usr/include/linux/types.h
HDRINST usr/include/linux/netfilter_decnet.h
HDRINST usr/include/linux/packet_diag.h
HDRINST usr/include/linux/membarrier.h
HDRINST usr/include/linux/gameport.h
HDRINST usr/include/linux/time.h
HDRINST usr/include/linux/firewire-constants.h
HDRINST usr/include/linux/personality.h
HDRINST usr/include/linux/serial.h
HDRINST usr/include/linux/ipmi.h
HDRINST usr/include/linux/devlink.h
HDRINST usr/include/linux/blkzoned.h
HDRINST usr/include/linux/kcov.h
HDRINST usr/include/linux/fb.h
HDRINST usr/include/linux/dvb/osd.h
HDRINST usr/include/linux/dvb/dmx.h
HDRINST usr/include/linux/dvb/frontend.h
HDRINST usr/include/linux/dvb/ca.h
HDRINST usr/include/linux/dvb/audio.h
HDRINST usr/include/linux/dvb/version.h
HDRINST usr/include/linux/dvb/video.h
HDRINST usr/include/linux/dvb/net.h
HDRINST usr/include/linux/const.h
HDRINST usr/include/linux/genetlink.h
HDRINST usr/include/linux/lp.h
HDRINST usr/include/linux/if_vlan.h
HDRINST usr/include/linux/sed-opal.h
HDRINST usr/include/linux/if_xdp.h
HDRINST usr/include/linux/futex.h
HDRINST usr/include/linux/fdreg.h
HDRINST usr/include/linux/btrfs.h
HDRINST usr/include/linux/kfd_ioctl.h
HDRINST usr/include/linux/nilfs2_api.h
HDRINST usr/include/linux/aspeed-p2a-ctrl.h
HDRINST usr/include/linux/cdrom.h
HDRINST usr/include/linux/un.h
HDRINST usr/include/linux/nfs.h
HDRINST usr/include/linux/hw_breakpoint.h
HDRINST usr/include/linux/fanotify.h
HDRINST usr/include/linux/tipc_config.h
HDRINST usr/include/linux/nfsacl.h
HDRINST usr/include/linux/kernelcapi.h
HDRINST usr/include/linux/a.out.h
HDRINST usr/include/linux/mroute6.h
HDRINST usr/include/linux/spi/spi.h
HDRINST usr/include/linux/spi/spidev.h
HDRINST usr/include/linux/nilfs2_ondisk.h
HDRINST usr/include/linux/romfs_fs.h
HDRINST usr/include/linux/kernel.h
HDRINST usr/include/linux/pidfd.h
HDRINST usr/include/linux/cfm_bridge.h
HDRINST usr/include/linux/smc_diag.h
HDRINST usr/include/linux/ipsec.h
HDRINST usr/include/linux/atm_tcp.h
HDRINST usr/include/linux/nfs2.h
HDRINST usr/include/linux/ptp_clock.h
HDRINST usr/include/linux/sem.h
HDRINST usr/include/linux/if_hippi.h
HDRINST usr/include/linux/nvram.h
HDRINST usr/include/linux/vfio_zdev.h
HDRINST usr/include/linux/coff.h
HDRINST usr/include/linux/vt.h
HDRINST usr/include/linux/smc.h
HDRINST usr/include/linux/raw.h
HDRINST usr/include/linux/cciss_ioctl.h
HDRINST usr/include/linux/joystick.h
HDRINST usr/include/linux/chio.h
HDRINST usr/include/linux/irqnr.h
HDRINST usr/include/linux/pfkeyv2.h
HDRINST usr/include/linux/vm_sockets.h
HDRINST usr/include/linux/virtio_blk.h
HDRINST usr/include/linux/raid/md_u.h
HDRINST usr/include/linux/raid/md_p.h
HDRINST usr/include/linux/ivtvfb.h
HDRINST usr/include/linux/vdpa.h
HDRINST usr/include/linux/ipx.h
HDRINST usr/include/linux/videodev2.h
HDRINST usr/include/linux/virtio_config.h
HDRINST usr/include/linux/netrom.h
HDRINST usr/include/linux/stat.h
HDRINST usr/include/linux/tc_act/tc_sample.h
HDRINST usr/include/linux/tc_act/tc_gact.h
HDRINST usr/include/linux/tc_act/tc_csum.h
HDRINST usr/include/linux/tc_act/tc_skbedit.h
HDRINST usr/include/linux/tc_act/tc_vlan.h
HDRINST usr/include/linux/tc_act/tc_ctinfo.h
HDRINST usr/include/linux/tc_act/tc_mirred.h
HDRINST usr/include/linux/tc_act/tc_tunnel_key.h
HDRINST usr/include/linux/tc_act/tc_gate.h
HDRINST usr/include/linux/tc_act/tc_pedit.h
HDRINST usr/include/linux/tc_act/tc_skbmod.h
HDRINST usr/include/linux/tc_act/tc_nat.h
HDRINST usr/include/linux/tc_act/tc_bpf.h
HDRINST usr/include/linux/tc_act/tc_defact.h
HDRINST usr/include/linux/tc_act/tc_mpls.h
HDRINST usr/include/linux/tc_act/tc_connmark.h
HDRINST usr/include/linux/tc_act/tc_ct.h
HDRINST usr/include/linux/tc_act/tc_ife.h
HDRINST usr/include/linux/tc_act/tc_ipt.h
HDRINST usr/include/linux/errno.h
HDRINST usr/include/linux/libc-compat.h
HDRINST usr/include/linux/rxrpc.h
HDRINST usr/include/linux/gpio.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_NPT.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_frag.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_srh.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_hl.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_HL.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_LOG.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_rt.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_opts.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_mh.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
HDRINST usr/include/linux/netfilter_ipv6/ip6_tables.h
HDRINST usr/include/linux/netfilter_ipv6/ip6t_ah.h
HDRINST usr/include/linux/gen_stats.h
HDRINST usr/include/linux/apm_bios.h
HDRINST usr/include/linux/kvm_para.h
HDRINST usr/include/linux/blkpg.h
HDRINST usr/include/linux/media.h
HDRINST usr/include/linux/rtnetlink.h
HDRINST usr/include/linux/cn_proc.h
HDRINST usr/include/linux/pg.h
HDRINST usr/include/linux/mei.h
HDRINST usr/include/linux/pci_regs.h
HDRINST usr/include/linux/virtio_pmem.h
HDRINST usr/include/linux/dma-heap.h
HDRINST usr/include/linux/ip6_tunnel.h
HDRINST usr/include/linux/qrtr.h
HDRINST usr/include/linux/cec-funcs.h
HDRINST usr/include/linux/dlm.h
HDRINST usr/include/linux/virtio_crypto.h
HDRINST usr/include/linux/timerfd.h
HDRINST usr/include/linux/rtc.h
HDRINST usr/include/linux/cyclades.h
HDRINST usr/include/linux/tipc.h
HDRINST usr/include/linux/rpmsg_types.h
HDRINST usr/include/linux/scif_ioctl.h
HDRINST usr/include/linux/nfs4.h
HDRINST usr/include/linux/ncsi.h
HDRINST usr/include/linux/auto_dev-ioctl.h
HDRINST usr/include/linux/udp.h
HDRINST usr/include/linux/sysctl.h
HDRINST usr/include/linux/sound.h
HDRINST usr/include/linux/in_route.h
HDRINST usr/include/linux/if_cablemodem.h
HDRINST usr/include/linux/if_phonet.h
HDRINST usr/include/linux/vbox_err.h
HDRINST usr/include/linux/openat2.h
HDRINST usr/include/linux/pktcdvd.h
HDRINST usr/include/linux/cycx_cfm.h
HDRINST usr/include/linux/time_types.h
HDRINST usr/include/linux/ndctl.h
HDRINST usr/include/linux/audit.h
HDRINST usr/include/linux/netfilter_arp/arpt_mangle.h
HDRINST usr/include/linux/netfilter_arp/arp_tables.h
HDRINST usr/include/linux/ax25.h
HDRINST usr/include/linux/hash_info.h
HDRINST usr/include/linux/uleds.h
HDRINST usr/include/linux/btf.h
HDRINST usr/include/linux/parport.h
HDRINST usr/include/linux/ipmi_bmc.h
HDRINST usr/include/linux/mmtimer.h
HDRINST usr/include/linux/netdevice.h
HDRINST usr/include/linux/can.h
HDRINST usr/include/linux/llc.h
HDRINST usr/include/linux/fou.h
HDRINST usr/include/linux/matroxfb.h
HDRINST usr/include/linux/affs_hardblocks.h
HDRINST usr/include/linux/if_pppol2tp.h
HDRINST usr/include/linux/uvcvideo.h
HDRINST usr/include/linux/fadvise.h
HDRINST usr/include/linux/cifs/cifs_netlink.h
HDRINST usr/include/linux/cifs/cifs_mount.h
HDRINST usr/include/linux/elf.h
HDRINST usr/include/linux/quota.h
HDRINST usr/include/linux/lightnvm.h
HDRINST usr/include/linux/batadv_packet.h
HDRINST usr/include/linux/qnx4_fs.h
HDRINST usr/include/linux/kdev_t.h
HDRINST usr/include/linux/phonet.h
HDRINST usr/include/linux/rseq.h
HDRINST usr/include/linux/mii.h
HDRINST usr/include/linux/selinux_netlink.h
HDRINST usr/include/linux/if_alg.h
HDRINST usr/include/linux/if_ether.h
HDRINST usr/include/linux/toshiba.h
HDRINST usr/include/linux/wireguard.h
HDRINST usr/include/linux/ultrasound.h
HDRINST usr/include/linux/userio.h
HDRINST usr/include/linux/f2fs.h
HDRINST usr/include/linux/if_plip.h
HDRINST usr/include/linux/nfs_idmap.h
HDRINST usr/include/linux/seg6_iptunnel.h
HDRINST usr/include/linux/posix_types.h
HDRINST usr/include/linux/dm-ioctl.h
HDRINST usr/include/linux/pmu.h
HDRINST usr/include/linux/udf_fs_i.h
HDRINST usr/include/linux/blktrace_api.h
HDRINST usr/include/linux/virtio_vsock.h
HDRINST usr/include/linux/erspan.h
HDRINST usr/include/linux/kvm.h
HDRINST usr/include/linux/auxvec.h
HDRINST usr/include/linux/poll.h
HDRINST usr/include/linux/stm.h
HDRINST usr/include/linux/random.h
HDRINST usr/include/linux/atm_he.h
HDRINST usr/include/linux/wait.h
HDRINST usr/include/linux/swab.h
HDRINST usr/include/linux/netfilter_ipv4.h
HDRINST usr/include/linux/atmarp.h
HDRINST usr/include/linux/if_team.h
HDRINST usr/include/linux/capability.h
HDRINST usr/include/linux/n_r3964.h
HDRINST usr/include/linux/if_addrlabel.h
HDRINST usr/include/linux/bsg.h
HDRINST usr/include/linux/route.h
HDRINST usr/include/linux/sockios.h
HDRINST usr/include/linux/mroute.h
HDRINST usr/include/linux/fsi.h
HDRINST usr/include/linux/reiserfs_xattr.h
HDRINST usr/include/linux/rfkill.h
HDRINST usr/include/linux/genwqe/genwqe_card.h
HDRINST usr/include/linux/kexec.h
HDRINST usr/include/linux/virtio_types.h
HDRINST usr/include/linux/usbdevice_fs.h
HDRINST usr/include/linux/pps.h
HDRINST usr/include/linux/x25.h
HDRINST usr/include/linux/dqblk_xfs.h
HDRINST usr/include/linux/surface_aggregator/cdev.h
HDRINST usr/include/linux/if_fddi.h
HDRINST usr/include/linux/mqueue.h
HDRINST usr/include/linux/bpf_perf_event.h
HDRINST usr/include/linux/pcitest.h
HDRINST usr/include/linux/atmsap.h
HDRINST usr/include/linux/nfsd/stats.h
HDRINST usr/include/linux/nfsd/cld.h
HDRINST usr/include/linux/nfsd/export.h
HDRINST usr/include/linux/nfsd/nfsfh.h
HDRINST usr/include/linux/nfsd/debug.h
HDRINST usr/include/linux/keyboard.h
HDRINST usr/include/linux/nl80211.h
HDRINST usr/include/linux/pr.h
HDRINST usr/include/linux/ip.h
HDRINST usr/include/linux/kd.h
HDRINST usr/include/linux/i2o-dev.h
HDRINST usr/include/linux/posix_acl_xattr.h
HDRINST usr/include/linux/socket.h
HDRINST usr/include/linux/media-bus-format.h
HDRINST usr/include/linux/nfs_mount.h
HDRINST usr/include/linux/can/netlink.h
HDRINST usr/include/linux/can/raw.h
HDRINST usr/include/linux/can/vxcan.h
HDRINST usr/include/linux/can/isotp.h
HDRINST usr/include/linux/can/j1939.h
HDRINST usr/include/linux/can/error.h
HDRINST usr/include/linux/can/bcm.h
HDRINST usr/include/linux/can/gw.h
HDRINST usr/include/linux/memfd.h
HDRINST usr/include/linux/nbd.h
HDRINST usr/include/linux/rio_mport_cdev.h
HDRINST usr/include/linux/neighbour.h
HDRINST usr/include/linux/smiapp.h
HDRINST usr/include/linux/tty.h
HDRINST usr/include/linux/jffs2.h
HDRINST usr/include/linux/fsmap.h
HDRINST usr/include/linux/bpqether.h
HDRINST usr/include/linux/prctl.h
HDRINST usr/include/linux/fsverity.h
HDRINST usr/include/linux/reiserfs_fs.h
HDRINST usr/include/linux/lwtunnel.h
HDRINST usr/include/linux/fs.h
HDRINST usr/include/linux/hpet.h
HDRINST usr/include/linux/psp-sev.h
HDRINST usr/include/linux/virtio_mmio.h
HDRINST usr/include/linux/vmcore.h
HDRINST usr/include/linux/cryptouser.h
HDRINST usr/include/linux/v4l2-mediabus.h
HDRINST usr/include/linux/oom.h
HDRINST usr/include/linux/radeonfb.h
HDRINST usr/include/linux/psample.h
HDRINST usr/include/linux/taskstats.h
HDRINST usr/include/linux/firewire-cdev.h
HDRINST usr/include/linux/coresight-stm.h
HDRINST usr/include/linux/nfs4_mount.h
HDRINST usr/include/linux/sched/types.h
HDRINST usr/include/linux/aspeed-lpc-ctrl.h
HDRINST usr/include/linux/netfilter_bridge/ebt_arpreply.h
HDRINST usr/include/linux/netfilter_bridge/ebt_ip6.h
HDRINST usr/include/linux/netfilter_bridge/ebt_ip.h
HDRINST usr/include/linux/netfilter_bridge/ebt_mark_m.h
HDRINST usr/include/linux/netfilter_bridge/ebtables.h
HDRINST usr/include/linux/netfilter_bridge/ebt_nflog.h
HDRINST usr/include/linux/netfilter_bridge/ebt_stp.h
HDRINST usr/include/linux/netfilter_bridge/ebt_nat.h
HDRINST usr/include/linux/netfilter_bridge/ebt_pkttype.h
HDRINST usr/include/linux/netfilter_bridge/ebt_mark_t.h
HDRINST usr/include/linux/netfilter_bridge/ebt_802_3.h
HDRINST usr/include/linux/netfilter_bridge/ebt_limit.h
HDRINST usr/include/linux/netfilter_bridge/ebt_log.h
HDRINST usr/include/linux/netfilter_bridge/ebt_redirect.h
HDRINST usr/include/linux/netfilter_bridge/ebt_vlan.h
HDRINST usr/include/linux/netfilter_bridge/ebt_arp.h
HDRINST usr/include/linux/netfilter_bridge/ebt_among.h
HDRINST usr/include/linux/virtio_net.h
HDRINST usr/include/linux/v4l2-controls.h
HDRINST usr/include/linux/lirc.h
HDRINST usr/include/linux/gfs2_ondisk.h
HDRINST usr/include/linux/gsmmux.h
HDRINST usr/include/linux/tipc_sockets_diag.h
HDRINST usr/include/linux/acrn.h
HDRINST usr/include/linux/if_packet.h
HDRINST usr/include/linux/shm.h
HDRINST usr/include/linux/capi.h
HDRINST usr/include/linux/minix_fs.h
HDRINST usr/include/linux/agpgart.h
HDRINST usr/include/linux/xfrm.h
HDRINST usr/include/linux/mtio.h
HDRINST usr/include/linux/bcache.h
HDRINST usr/include/linux/input-event-codes.h
HDRINST usr/include/linux/bfs_fs.h
HDRINST usr/include/linux/ethtool_netlink.h
HDRINST usr/include/linux/atmdev.h
HDRINST usr/include/linux/efs_fs_sb.h
HDRINST usr/include/linux/netlink_diag.h
HDRINST usr/include/linux/cgroupstats.h
HDRINST usr/include/linux/sched.h
HDRINST usr/include/linux/virtio_console.h
HDRINST usr/include/linux/mount.h
HDRINST usr/include/linux/times.h
HDRINST usr/include/linux/dma-buf.h
HDRINST usr/include/linux/ipc.h
HDRINST usr/include/linux/fiemap.h
HDRINST usr/include/linux/falloc.h
HDRINST usr/include/linux/signalfd.h
HDRINST usr/include/linux/kcm.h
HDRINST usr/include/linux/binfmts.h
HDRINST usr/include/linux/inotify.h
HDRINST usr/include/linux/seg6_genl.h
HDRINST usr/include/linux/mempolicy.h
HDRINST usr/include/linux/rkisp1-config.h
HDRINST usr/include/linux/mrp_bridge.h
HDRINST usr/include/linux/ivtv.h
HDRINST usr/include/linux/byteorder/little_endian.h
HDRINST usr/include/linux/byteorder/big_endian.h
HDRINST usr/include/linux/cciss_defs.h
HDRINST usr/include/linux/dlm_device.h
HDRINST usr/include/linux/termios.h
HDRINST usr/include/linux/fd.h
HDRINST usr/include/linux/bpf_common.h
HDRINST usr/include/linux/i2c.h
HDRINST usr/include/linux/sync_file.h
HDRINST usr/include/linux/thermal.h
HDRINST usr/include/linux/xdp_diag.h
HDRINST usr/include/linux/sysinfo.h
HDRINST usr/include/linux/keyctl.h
HDRINST usr/include/linux/adb.h
HDRINST usr/include/linux/netfilter/xt_TPROXY.h
HDRINST usr/include/linux/netfilter/nf_conntrack_tcp.h
HDRINST usr/include/linux/netfilter/xt_connbytes.h
HDRINST usr/include/linux/netfilter/xt_CLASSIFY.h
HDRINST usr/include/linux/netfilter/xt_owner.h
HDRINST usr/include/linux/netfilter/xt_ecn.h
HDRINST usr/include/linux/netfilter/nfnetlink.h
HDRINST usr/include/linux/netfilter/xt_mark.h
HDRINST usr/include/linux/netfilter/xt_tcpudp.h
HDRINST usr/include/linux/netfilter/xt_esp.h
HDRINST usr/include/linux/netfilter/xt_recent.h
HDRINST usr/include/linux/netfilter/xt_TEE.h
HDRINST usr/include/linux/netfilter/nf_conntrack_sctp.h
HDRINST usr/include/linux/netfilter/xt_time.h
HDRINST usr/include/linux/netfilter/xt_pkttype.h
HDRINST usr/include/linux/netfilter/xt_CHECKSUM.h
HDRINST usr/include/linux/netfilter/xt_realm.h
HDRINST usr/include/linux/netfilter/xt_CONNMARK.h
HDRINST usr/include/linux/netfilter/xt_helper.h
HDRINST usr/include/linux/netfilter/nfnetlink_compat.h
HDRINST usr/include/linux/netfilter/xt_socket.h
HDRINST usr/include/linux/netfilter/xt_policy.h
HDRINST usr/include/linux/netfilter/xt_NFLOG.h
HDRINST usr/include/linux/netfilter/xt_quota.h
HDRINST usr/include/linux/netfilter/xt_SECMARK.h
HDRINST usr/include/linux/netfilter/xt_DSCP.h
HDRINST usr/include/linux/netfilter/xt_ipvs.h
HDRINST usr/include/linux/netfilter/xt_AUDIT.h
HDRINST usr/include/linux/netfilter/nf_conntrack_tuple_common.h
HDRINST usr/include/linux/netfilter/nfnetlink_queue.h
HDRINST usr/include/linux/netfilter/nf_conntrack_common.h
HDRINST usr/include/linux/netfilter/xt_LED.h
HDRINST usr/include/linux/netfilter/xt_ipcomp.h
HDRINST usr/include/linux/netfilter/xt_mac.h
HDRINST usr/include/linux/netfilter/xt_IDLETIMER.h
HDRINST usr/include/linux/netfilter/xt_cluster.h
HDRINST usr/include/linux/netfilter/xt_LOG.h
HDRINST usr/include/linux/netfilter/nf_conntrack_ftp.h
HDRINST usr/include/linux/netfilter/nf_tables.h
HDRINST usr/include/linux/netfilter/ipset/ip_set.h
HDRINST usr/include/linux/netfilter/ipset/ip_set_hash.h
HDRINST usr/include/linux/netfilter/ipset/ip_set_bitmap.h
HDRINST usr/include/linux/netfilter/ipset/ip_set_list.h
HDRINST usr/include/linux/netfilter/xt_rpfilter.h
HDRINST usr/include/linux/netfilter/xt_connmark.h
HDRINST usr/include/linux/netfilter/xt_addrtype.h
HDRINST usr/include/linux/netfilter/nf_nat.h
HDRINST usr/include/linux/netfilter/xt_RATEEST.h
HDRINST usr/include/linux/netfilter/xt_u32.h
HDRINST usr/include/linux/netfilter/xt_cgroup.h
HDRINST usr/include/linux/netfilter/nfnetlink_log.h
HDRINST usr/include/linux/netfilter/xt_tcpmss.h
HDRINST usr/include/linux/netfilter/xt_connlabel.h
HDRINST usr/include/linux/netfilter/x_tables.h
HDRINST usr/include/linux/netfilter/xt_conntrack.h
HDRINST usr/include/linux/netfilter/xt_MARK.h
HDRINST usr/include/linux/netfilter/nfnetlink_osf.h
HDRINST usr/include/linux/netfilter/nfnetlink_conntrack.h
HDRINST usr/include/linux/netfilter/nf_tables_compat.h
HDRINST usr/include/linux/netfilter/xt_nfacct.h
HDRINST usr/include/linux/netfilter/xt_bpf.h
HDRINST usr/include/linux/netfilter/xt_physdev.h
HDRINST usr/include/linux/netfilter/xt_TCPMSS.h
HDRINST usr/include/linux/netfilter/xt_limit.h
HDRINST usr/include/linux/netfilter/xt_CONNSECMARK.h
HDRINST usr/include/linux/netfilter/xt_SYNPROXY.h
HDRINST usr/include/linux/netfilter/nf_log.h
HDRINST usr/include/linux/netfilter/xt_TCPOPTSTRIP.h
HDRINST usr/include/linux/netfilter/xt_set.h
HDRINST usr/include/linux/netfilter/nfnetlink_acct.h
HDRINST usr/include/linux/netfilter/xt_connlimit.h
HDRINST usr/include/linux/netfilter/xt_l2tp.h
HDRINST usr/include/linux/netfilter/xt_NFQUEUE.h
HDRINST usr/include/linux/netfilter/xt_state.h
HDRINST usr/include/linux/netfilter/xt_sctp.h
HDRINST usr/include/linux/netfilter/xt_devgroup.h
HDRINST usr/include/linux/netfilter/nfnetlink_cthelper.h
HDRINST usr/include/linux/netfilter/nf_synproxy.h
HDRINST usr/include/linux/netfilter/xt_cpu.h
HDRINST usr/include/linux/netfilter/xt_dccp.h
HDRINST usr/include/linux/netfilter/xt_comment.h
HDRINST usr/include/linux/netfilter/xt_statistic.h
HDRINST usr/include/linux/netfilter/xt_string.h
HDRINST usr/include/linux/netfilter/xt_iprange.h
HDRINST usr/include/linux/netfilter/nfnetlink_cttimeout.h
HDRINST usr/include/linux/netfilter/xt_CT.h
HDRINST usr/include/linux/netfilter/xt_dscp.h
HDRINST usr/include/linux/netfilter/xt_osf.h
HDRINST usr/include/linux/netfilter/xt_rateest.h
HDRINST usr/include/linux/netfilter/xt_multiport.h
HDRINST usr/include/linux/netfilter/xt_HMARK.h
HDRINST usr/include/linux/netfilter/xt_length.h
HDRINST usr/include/linux/netfilter/xt_hashlimit.h
HDRINST usr/include/linux/dm-log-userspace.h
HDRINST usr/include/linux/omap3isp.h
HDRINST usr/include/linux/v4l2-dv-timings.h
HDRINST usr/include/linux/stddef.h
HDRINST usr/include/linux/seccomp.h
HDRINST usr/include/linux/if_addr.h
HDRINST usr/include/linux/vfio_ccw.h
HDRINST usr/include/linux/signal.h
HDRINST usr/include/linux/isdn/capicmd.h
HDRINST usr/include/linux/virtio_input.h
HDRINST usr/include/linux/inet_diag.h
HDRINST usr/include/linux/v4l2-common.h
HDRINST usr/include/linux/dns_resolver.h
HDRINST usr/include/linux/fib_rules.h
HDRINST usr/include/linux/if_bridge.h
HDRINST usr/include/linux/android/binderfs.h
HDRINST usr/include/linux/android/binder.h
HDRINST usr/include/linux/if_eql.h
HDRINST usr/include/linux/if_macsec.h
HDRINST usr/include/linux/unistd.h
HDRINST usr/include/linux/mdio.h
HDRINST usr/include/linux/atmapi.h
HDRINST usr/include/linux/utime.h
HDRINST usr/include/linux/seg6_local.h
HDRINST usr/include/linux/igmp.h
HDRINST usr/include/linux/vboxguest.h
HDRINST usr/include/linux/uuid.h
HDRINST usr/include/linux/baycom.h
HDRINST usr/include/linux/serio.h
HDRINST usr/include/linux/vfio.h
HDRINST usr/include/linux/if_fc.h
HDRINST usr/include/linux/qemu_fw_cfg.h
HDRINST usr/include/linux/atmsvc.h
HDRINST usr/include/linux/msdos_fs.h
HDRINST usr/include/linux/openvswitch.h
HDRINST usr/include/linux/atm.h
HDRINST usr/include/linux/ife.h
HDRINST usr/include/linux/resource.h
HDRINST usr/include/linux/edd.h
HDRINST usr/include/linux/nfs_fs.h
HDRINST usr/include/linux/rpl.h
HDRINST usr/include/linux/gtp.h
HDRINST usr/include/linux/atm_zatm.h
HDRINST usr/include/linux/virtio_ids.h
HDRINST usr/include/linux/max2175.h
HDRINST usr/include/linux/arm_sdei.h
HDRINST usr/include/linux/atmclip.h
HDRINST usr/include/linux/if_arcnet.h
HDRINST usr/include/linux/virtio_pci.h
HDRINST usr/include/linux/atm_idt77105.h
HDRINST usr/include/linux/target_core_user.h
HDRINST usr/include/linux/if_tunnel.h
HDRINST usr/include/linux/vhost.h
HDRINST usr/include/linux/atmmpc.h
HDRINST usr/include/linux/fcntl.h
HDRINST usr/include/linux/tty_flags.h
HDRINST usr/include/linux/icmpv6.h
HDRINST usr/include/linux/vsockmon.h
HDRINST usr/include/linux/watchdog.h
HDRINST usr/include/linux/iommu.h
HDRINST usr/include/linux/hsr_netlink.h
HDRINST usr/include/linux/btrfs_tree.h
HDRINST usr/include/linux/iio/types.h
HDRINST usr/include/linux/iio/events.h
HDRINST usr/include/linux/qnxtypes.h
HDRINST usr/include/linux/if_pppox.h
HDRINST usr/include/linux/sunrpc/debug.h
HDRINST usr/include/linux/errqueue.h
HDRINST usr/include/linux/i2c-dev.h
HDRINST usr/include/linux/fsl_hypervisor.h
HDRINST usr/include/linux/filter.h
HDRINST usr/include/linux/mman.h
HDRINST usr/include/linux/batman_adv.h
HDRINST usr/include/linux/v4l2-subdev.h
HDRINST usr/include/linux/if_slip.h
HDRINST usr/include/linux/dccp.h
HDRINST usr/include/linux/fscrypt.h
HDRINST usr/include/linux/uinput.h
HDRINST usr/include/linux/aio_abi.h
HDRINST usr/include/linux/dlm_netlink.h
HDRINST usr/include/linux/netfilter_ipv6.h
HDRINST usr/include/linux/rds.h
HDRINST usr/include/linux/nubus.h
HDRINST usr/include/linux/dlm_plock.h
HDRINST usr/include/linux/nvme_ioctl.h
HDRINST usr/include/linux/l2tp.h
HDRINST usr/include/linux/psci.h
HDRINST usr/include/linux/fsl_mc.h
HDRINST usr/include/linux/if_infiniband.h
HDRINST usr/include/linux/caif/caif_socket.h
HDRINST usr/include/linux/caif/if_caif.h
HDRINST usr/include/linux/securebits.h
HDRINST usr/include/linux/nsfs.h
HDRINST usr/include/linux/synclink.h
HDRINST usr/include/linux/hid.h
HDRINST usr/include/linux/virtio_scsi.h
HDRINST usr/include/linux/unix_diag.h
HDRINST usr/include/linux/sctp.h
HDRINST usr/include/linux/ccs.h
HDRINST usr/include/linux/hdlcdrv.h
HDRINST usr/include/linux/net_dropmon.h
HDRINST usr/include/linux/atmlec.h
HDRINST usr/include/linux/ppp_defs.h
HDRINST usr/include/linux/coda.h
HDRINST usr/include/linux/ipv6.h
HDRINST usr/include/linux/auto_fs.h
HDRINST usr/include/linux/snmp.h
HDRINST usr/include/linux/hyperv.h
HDRINST usr/include/linux/ethtool.h
HDRINST usr/include/linux/msg.h
HDRINST usr/include/linux/rose.h
HDRINST usr/include/linux/nfs3.h
HDRINST usr/include/linux/screen_info.h
HDRINST usr/include/linux/usbip.h
HDRINST usr/include/linux/in6.h
HDRINST usr/include/linux/magic.h
HDRINST usr/include/linux/cm4000_cs.h
HDRINST usr/include/linux/wmi.h
HDRINST usr/include/linux/bpf.h
HDRINST usr/include/linux/vtpm_proxy.h
HDRINST usr/include/linux/atmppp.h
HDRINST usr/include/linux/if_arp.h
HDRINST usr/include/linux/vhost_types.h
HDRINST usr/include/linux/virtio_9p.h
HDRINST usr/include/linux/dlmconstants.h
HDRINST usr/include/linux/if_ppp.h
HDRINST usr/include/linux/vm_sockets_diag.h
HDRINST usr/include/linux/auto_fs4.h
HDRINST usr/include/linux/netfilter_arp.h
HDRINST usr/include/linux/nitro_enclaves.h
HDRINST usr/include/linux/netfilter_bridge.h
HDRINST usr/include/linux/kernel-page-flags.h
HDRINST usr/include/linux/xattr.h
HDRINST usr/include/linux/omapfb.h
HDRINST usr/include/linux/hdreg.h
HDRINST usr/include/linux/udmabuf.h
HDRINST usr/include/linux/hiddev.h
HDRINST usr/include/linux/adfs_fs.h
HDRINST usr/include/linux/if_tun.h
HDRINST usr/include/linux/rio_cm_cdev.h
HDRINST usr/include/linux/meye.h
HDRINST usr/include/linux/timex.h
HDRINST usr/include/linux/soundcard.h
HDRINST usr/include/linux/rpmsg.h
HDRINST usr/include/linux/nbd-netlink.h
HDRINST usr/include/linux/veth.h
HDRINST usr/include/linux/bpfilter.h
HDRINST usr/include/linux/ptrace.h
HDRINST usr/include/linux/cramfs_fs.h
HDRINST usr/include/linux/ip_vs.h
HDRINST usr/include/linux/close_range.h
HDRINST usr/include/linux/mptcp.h
HDRINST usr/include/linux/if_bonding.h
HDRINST usr/include/linux/tiocl.h
HDRINST usr/include/linux/kcmp.h
HDRINST usr/include/linux/iso_fs.h
HDRINST usr/include/linux/tee.h
HDRINST usr/include/linux/major.h
HDRINST usr/include/linux/ipv6_route.h
HDRINST usr/include/linux/cxl_mem.h
HDRINST usr/include/linux/tcp_metrics.h
HDRINST usr/include/linux/seg6_hmac.h
HDRINST usr/include/linux/wireless.h
HDRINST usr/include/linux/string.h
HDRINST usr/include/linux/atmbr2684.h
HDRINST usr/include/linux/scc.h
HDRINST usr/include/linux/am437x-vpfe.h
HDRINST usr/include/linux/bt-bmc.h
HDRINST usr/include/linux/net.h
HDRINST usr/include/linux/param.h
HDRINST usr/include/linux/virtio_fs.h
HDRINST usr/include/linux/virtio_gpu.h
HDRINST usr/include/linux/net_tstamp.h
HDRINST usr/include/linux/fpga-dfl.h
HDRINST usr/include/linux/ppdev.h
HDRINST usr/include/linux/perf_event.h
HDRINST usr/include/linux/uio.h
HDRINST usr/include/linux/atalk.h
HDRINST usr/include/linux/misc/bcm_vk.h
HDRINST usr/include/linux/hdlc.h
HDRINST usr/include/linux/usb/raw_gadget.h
HDRINST usr/include/linux/usb/cdc-wdm.h
HDRINST usr/include/linux/usb/ch9.h
HDRINST usr/include/linux/usb/g_uvc.h
HDRINST usr/include/linux/usb/midi.h
HDRINST usr/include/linux/usb/functionfs.h
HDRINST usr/include/linux/usb/tmc.h
HDRINST usr/include/linux/usb/cdc.h
HDRINST usr/include/linux/usb/ch11.h
HDRINST usr/include/linux/usb/audio.h
HDRINST usr/include/linux/usb/gadgetfs.h
HDRINST usr/include/linux/usb/video.h
HDRINST usr/include/linux/usb/g_printer.h
HDRINST usr/include/linux/usb/charger.h
HDRINST usr/include/linux/zorro.h
HDRINST usr/include/linux/bcm933xx_hcs.h
HDRINST usr/include/linux/input.h
HDRINST usr/include/linux/utsname.h
HDRINST usr/include/linux/virtio_iommu.h
HDRINST usr/include/linux/if_ltalk.h
HDRINST usr/include/linux/serial_core.h
HDRINST usr/include/linux/isst_if.h
HDRINST usr/include/linux/hidraw.h
HDRINST usr/include/sound/tlv.h
HDRINST usr/include/sound/firewire.h
HDRINST usr/include/sound/sof/abi.h
HDRINST usr/include/sound/sof/header.h
HDRINST usr/include/sound/sof/tokens.h
HDRINST usr/include/sound/sof/fw.h
HDRINST usr/include/sound/sb16_csp.h
HDRINST usr/include/sound/asequencer.h
HDRINST usr/include/sound/sfnt_info.h
HDRINST usr/include/sound/emu10k1.h
HDRINST usr/include/sound/hdsp.h
HDRINST usr/include/sound/asound_fm.h
HDRINST usr/include/sound/hdspm.h
HDRINST usr/include/sound/snd_sst_tokens.h
HDRINST usr/include/sound/asound.h
HDRINST usr/include/sound/compress_offload.h
HDRINST usr/include/sound/usb_stream.h
HDRINST usr/include/sound/asoc.h
HDRINST usr/include/sound/skl-tplg-interface.h
HDRINST usr/include/sound/compress_params.h
HDRINST usr/include/scsi/fc/fc_gs.h
HDRINST usr/include/scsi/fc/fc_fs.h
HDRINST usr/include/scsi/fc/fc_ns.h
HDRINST usr/include/scsi/fc/fc_els.h
HDRINST usr/include/scsi/scsi_bsg_ufs.h
HDRINST usr/include/scsi/scsi_netlink.h
HDRINST usr/include/scsi/cxlflash_ioctl.h
HDRINST usr/include/scsi/scsi_bsg_fc.h
HDRINST usr/include/scsi/scsi_netlink_fc.h
HDRINST usr/include/linux/version.h
HDRINST usr/include/asm/kvm_perf.h
HDRINST usr/include/asm/posix_types_64.h
HDRINST usr/include/asm/bootparam.h
HDRINST usr/include/asm/ptrace-abi.h
HDRINST usr/include/asm/posix_types_32.h
HDRINST usr/include/asm/hw_breakpoint.h
HDRINST usr/include/asm/a.out.h
HDRINST usr/include/asm/ucontext.h
HDRINST usr/include/asm/sembuf.h
HDRINST usr/include/asm/stat.h
HDRINST usr/include/asm/perf_regs.h
HDRINST usr/include/asm/kvm_para.h
HDRINST usr/include/asm/byteorder.h
HDRINST usr/include/asm/processor-flags.h
HDRINST usr/include/asm/e820.h
HDRINST usr/include/asm/hwcap2.h
HDRINST usr/include/asm/shmbuf.h
HDRINST usr/include/asm/posix_types.h
HDRINST usr/include/asm/kvm.h
HDRINST usr/include/asm/auxvec.h
HDRINST usr/include/asm/swab.h
HDRINST usr/include/asm/sigcontext.h
HDRINST usr/include/asm/mce.h
HDRINST usr/include/asm/msr.h
HDRINST usr/include/asm/prctl.h
HDRINST usr/include/asm/vm86.h
HDRINST usr/include/asm/vmx.h
HDRINST usr/include/asm/ist.h
HDRINST usr/include/asm/siginfo.h
HDRINST usr/include/asm/debugreg.h
HDRINST usr/include/asm/msgbuf.h
HDRINST usr/include/asm/boot.h
HDRINST usr/include/asm/signal.h
HDRINST usr/include/asm/unistd.h
HDRINST usr/include/asm/bitsperlong.h
HDRINST usr/include/asm/statfs.h
HDRINST usr/include/asm/mman.h
HDRINST usr/include/asm/sigcontext32.h
HDRINST usr/include/asm/svm.h
HDRINST usr/include/asm/mtrr.h
HDRINST usr/include/asm/ldt.h
HDRINST usr/include/asm/sgx.h
HDRINST usr/include/asm/ptrace.h
HDRINST usr/include/asm/vsyscall.h
HDRINST usr/include/asm/posix_types_x32.h
HDRINST usr/include/asm/setup.h
HDRINST usr/include/asm/unistd_x32.h
HDRINST usr/include/asm/unistd_64.h
HDRINST usr/include/asm/unistd_32.h
HDRINST usr/include/asm/types.h
HDRINST usr/include/asm/termios.h
HDRINST usr/include/asm/termbits.h
HDRINST usr/include/asm/sockios.h
HDRINST usr/include/asm/socket.h
HDRINST usr/include/asm/resource.h
HDRINST usr/include/asm/poll.h
HDRINST usr/include/asm/param.h
HDRINST usr/include/asm/ipcbuf.h
HDRINST usr/include/asm/ioctls.h
HDRINST usr/include/asm/ioctl.h
HDRINST usr/include/asm/fcntl.h
HDRINST usr/include/asm/errno.h
HDRINST usr/include/asm/bpf_perf_event.h
INSTALL ./usr/include
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453'
make[1]: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453/tools/testing/selftests/safesetid'
gcc -Wall -O2 safesetid-test.c -lcap -o /usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453/tools/testing/selftests/safesetid/safesetid-test
make[1]: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453/tools/testing/selftests/safesetid'
LKP WARN miss target safesetid
2021-03-26 22:48:57 make run_tests -C safesetid
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453/tools/testing/selftests/safesetid'
TAP version 13
1..1
# selftests: safesetid: safesetid-test.sh
# mounting securityfs failed
# safesetid-test.sh: done
ok 1 selftests: safesetid: safesetid-test.sh
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453/tools/testing/selftests/safesetid'
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:48:58 cp seccomp/settings /kselftests/seccomp/settings
2021-03-26 22:48:58 /kselftests/run_kselftest.sh -c seccomp
TAP version 13
1..2
# selftests: seccomp: seccomp_bpf
# TAP version 13
# 1..87
# # Starting 87 tests from 7 test cases.
# # RUN global.kcmp ...
# # OK global.kcmp
# ok 1 global.kcmp
# # RUN global.mode_strict_support ...
# # OK global.mode_strict_support
# ok 2 global.mode_strict_support
# # RUN global.mode_strict_cannot_call_prctl ...
# # OK global.mode_strict_cannot_call_prctl
# ok 3 global.mode_strict_cannot_call_prctl
# # RUN global.no_new_privs_support ...
# # OK global.no_new_privs_support
# ok 4 global.no_new_privs_support
# # RUN global.mode_filter_support ...
# # OK global.mode_filter_support
# ok 5 global.mode_filter_support
# # RUN global.mode_filter_without_nnp ...
# # OK global.mode_filter_without_nnp
# ok 6 global.mode_filter_without_nnp
# # RUN global.filter_size_limits ...
# # OK global.filter_size_limits
# ok 7 global.filter_size_limits
# # RUN global.filter_chain_limits ...
# # OK global.filter_chain_limits
# ok 8 global.filter_chain_limits
# # RUN global.mode_filter_cannot_move_to_strict ...
# # OK global.mode_filter_cannot_move_to_strict
# ok 9 global.mode_filter_cannot_move_to_strict
# # RUN global.mode_filter_get_seccomp ...
# # OK global.mode_filter_get_seccomp
# ok 10 global.mode_filter_get_seccomp
# # RUN global.ALLOW_all ...
# # OK global.ALLOW_all
# ok 11 global.ALLOW_all
# # RUN global.empty_prog ...
# # OK global.empty_prog
# ok 12 global.empty_prog
# # RUN global.log_all ...
# # OK global.log_all
# ok 13 global.log_all
# # RUN global.unknown_ret_is_kill_inside ...
# # OK global.unknown_ret_is_kill_inside
# ok 14 global.unknown_ret_is_kill_inside
# # RUN global.unknown_ret_is_kill_above_allow ...
# # OK global.unknown_ret_is_kill_above_allow
# ok 15 global.unknown_ret_is_kill_above_allow
# # RUN global.KILL_all ...
# # OK global.KILL_all
# ok 16 global.KILL_all
# # RUN global.KILL_one ...
# # OK global.KILL_one
# ok 17 global.KILL_one
# # RUN global.KILL_one_arg_one ...
# # OK global.KILL_one_arg_one
# ok 18 global.KILL_one_arg_one
# # RUN global.KILL_one_arg_six ...
# # OK global.KILL_one_arg_six
# ok 19 global.KILL_one_arg_six
# # RUN global.KILL_thread ...
# # OK global.KILL_thread
# ok 20 global.KILL_thread
# # RUN global.KILL_process ...
# # OK global.KILL_process
# ok 21 global.KILL_process
# # RUN global.KILL_unknown ...
# # OK global.KILL_unknown
# ok 22 global.KILL_unknown
# # RUN global.arg_out_of_range ...
# # OK global.arg_out_of_range
# ok 23 global.arg_out_of_range
# # RUN global.ERRNO_valid ...
# # OK global.ERRNO_valid
# ok 24 global.ERRNO_valid
# # RUN global.ERRNO_zero ...
# # OK global.ERRNO_zero
# ok 25 global.ERRNO_zero
# # RUN global.ERRNO_capped ...
# # OK global.ERRNO_capped
# ok 26 global.ERRNO_capped
# # RUN global.ERRNO_order ...
# # OK global.ERRNO_order
# ok 27 global.ERRNO_order
# # RUN global.negative_ENOSYS ...
# # OK global.negative_ENOSYS
# ok 28 global.negative_ENOSYS
# # RUN global.seccomp_syscall ...
# # OK global.seccomp_syscall
# ok 29 global.seccomp_syscall
# # RUN global.seccomp_syscall_mode_lock ...
# # OK global.seccomp_syscall_mode_lock
# ok 30 global.seccomp_syscall_mode_lock
# # RUN global.detect_seccomp_filter_flags ...
# # OK global.detect_seccomp_filter_flags
# ok 31 global.detect_seccomp_filter_flags
# # RUN global.TSYNC_first ...
# # OK global.TSYNC_first
# ok 32 global.TSYNC_first
# # RUN global.syscall_restart ...
# # OK global.syscall_restart
# ok 33 global.syscall_restart
# # RUN global.filter_flag_log ...
# # OK global.filter_flag_log
# ok 34 global.filter_flag_log
# # RUN global.get_action_avail ...
# # OK global.get_action_avail
# ok 35 global.get_action_avail
# # RUN global.get_metadata ...
# # OK global.get_metadata
# ok 36 global.get_metadata
# # RUN global.user_notification_basic ...
# # OK global.user_notification_basic
# ok 37 global.user_notification_basic
# # RUN global.user_notification_with_tsync ...
# # OK global.user_notification_with_tsync
# ok 38 global.user_notification_with_tsync
# # RUN global.user_notification_kill_in_middle ...
# # OK global.user_notification_kill_in_middle
# ok 39 global.user_notification_kill_in_middle
# # RUN global.user_notification_signal ...
# # OK global.user_notification_signal
# ok 40 global.user_notification_signal
# # RUN global.user_notification_closed_listener ...
# # OK global.user_notification_closed_listener
# ok 41 global.user_notification_closed_listener
# # RUN global.user_notification_child_pid_ns ...
# # OK global.user_notification_child_pid_ns
# ok 42 global.user_notification_child_pid_ns
# # RUN global.user_notification_sibling_pid_ns ...
# # OK global.user_notification_sibling_pid_ns
# ok 43 global.user_notification_sibling_pid_ns
# # RUN global.user_notification_fault_recv ...
# # OK global.user_notification_fault_recv
# ok 44 global.user_notification_fault_recv
# # RUN global.seccomp_get_notif_sizes ...
# # OK global.seccomp_get_notif_sizes
# ok 45 global.seccomp_get_notif_sizes
# # RUN global.user_notification_continue ...
# # OK global.user_notification_continue
# ok 46 global.user_notification_continue
# # RUN global.user_notification_filter_empty ...
# # OK global.user_notification_filter_empty
# ok 47 global.user_notification_filter_empty
# # RUN global.user_notification_filter_empty_threaded ...
# # OK global.user_notification_filter_empty_threaded
# ok 48 global.user_notification_filter_empty_threaded
# # RUN global.user_notification_addfd ...
# # seccomp_bpf.c:4022:user_notification_addfd:Expected fd (-1) >= 0 (0)
# # seccomp_bpf.c:4023:user_notification_addfd:Expected filecmp(getpid(), pid, memfd, fd) (-1) == 0 (0)
# # seccomp_bpf.c:4029:user_notification_addfd:Expected fd (-1) >= 0 (0)
# # user_notification_addfd: Test failed at step #5
# # FAIL global.user_notification_addfd
# not ok 49 global.user_notification_addfd
# # RUN global.user_notification_addfd_rlimit ...
# # seccomp_bpf.c:4117:user_notification_addfd_rlimit:Expected errno (9) == EMFILE (24)
# # user_notification_addfd_rlimit: Test failed at step #6
# # FAIL global.user_notification_addfd_rlimit
# not ok 50 global.user_notification_addfd_rlimit
# # RUN TRAP.dfl ...
# # OK TRAP.dfl
# ok 51 TRAP.dfl
# # RUN TRAP.ign ...
# # OK TRAP.ign
# ok 52 TRAP.ign
# # RUN TRAP.handler ...
# # OK TRAP.handler
# ok 53 TRAP.handler
# # RUN precedence.allow_ok ...
# # OK precedence.allow_ok
# ok 54 precedence.allow_ok
# # RUN precedence.kill_is_highest ...
# # OK precedence.kill_is_highest
# ok 55 precedence.kill_is_highest
# # RUN precedence.kill_is_highest_in_any_order ...
# # OK precedence.kill_is_highest_in_any_order
# ok 56 precedence.kill_is_highest_in_any_order
# # RUN precedence.trap_is_second ...
# # OK precedence.trap_is_second
# ok 57 precedence.trap_is_second
# # RUN precedence.trap_is_second_in_any_order ...
# # OK precedence.trap_is_second_in_any_order
# ok 58 precedence.trap_is_second_in_any_order
# # RUN precedence.errno_is_third ...
# # OK precedence.errno_is_third
# ok 59 precedence.errno_is_third
# # RUN precedence.errno_is_third_in_any_order ...
# # OK precedence.errno_is_third_in_any_order
# ok 60 precedence.errno_is_third_in_any_order
# # RUN precedence.trace_is_fourth ...
# # OK precedence.trace_is_fourth
# ok 61 precedence.trace_is_fourth
# # RUN precedence.trace_is_fourth_in_any_order ...
# # OK precedence.trace_is_fourth_in_any_order
# ok 62 precedence.trace_is_fourth_in_any_order
# # RUN precedence.log_is_fifth ...
# # OK precedence.log_is_fifth
# ok 63 precedence.log_is_fifth
# # RUN precedence.log_is_fifth_in_any_order ...
# # OK precedence.log_is_fifth_in_any_order
# ok 64 precedence.log_is_fifth_in_any_order
# # RUN TRACE_poke.read_has_side_effects ...
# # OK TRACE_poke.read_has_side_effects
# ok 65 TRACE_poke.read_has_side_effects
# # RUN TRACE_poke.getpid_runs_normally ...
# # OK TRACE_poke.getpid_runs_normally
# ok 66 TRACE_poke.getpid_runs_normally
# # RUN TRACE_syscall.ptrace.negative_ENOSYS ...
# # OK TRACE_syscall.ptrace.negative_ENOSYS
# ok 67 TRACE_syscall.ptrace.negative_ENOSYS
# # RUN TRACE_syscall.ptrace.syscall_allowed ...
# # OK TRACE_syscall.ptrace.syscall_allowed
# ok 68 TRACE_syscall.ptrace.syscall_allowed
# # RUN TRACE_syscall.ptrace.syscall_redirected ...
# # OK TRACE_syscall.ptrace.syscall_redirected
# ok 69 TRACE_syscall.ptrace.syscall_redirected
# # RUN TRACE_syscall.ptrace.syscall_errno ...
# # OK TRACE_syscall.ptrace.syscall_errno
# ok 70 TRACE_syscall.ptrace.syscall_errno
# # RUN TRACE_syscall.ptrace.syscall_faked ...
# # OK TRACE_syscall.ptrace.syscall_faked
# ok 71 TRACE_syscall.ptrace.syscall_faked
# # RUN TRACE_syscall.ptrace.skip_after ...
# # OK TRACE_syscall.ptrace.skip_after
# ok 72 TRACE_syscall.ptrace.skip_after
# # RUN TRACE_syscall.ptrace.kill_after ...
# # OK TRACE_syscall.ptrace.kill_after
# ok 73 TRACE_syscall.ptrace.kill_after
# # RUN TRACE_syscall.seccomp.negative_ENOSYS ...
# # OK TRACE_syscall.seccomp.negative_ENOSYS
# ok 74 TRACE_syscall.seccomp.negative_ENOSYS
# # RUN TRACE_syscall.seccomp.syscall_allowed ...
# # OK TRACE_syscall.seccomp.syscall_allowed
# ok 75 TRACE_syscall.seccomp.syscall_allowed
# # RUN TRACE_syscall.seccomp.syscall_redirected ...
# # OK TRACE_syscall.seccomp.syscall_redirected
# ok 76 TRACE_syscall.seccomp.syscall_redirected
# # RUN TRACE_syscall.seccomp.syscall_errno ...
# # OK TRACE_syscall.seccomp.syscall_errno
# ok 77 TRACE_syscall.seccomp.syscall_errno
# # RUN TRACE_syscall.seccomp.syscall_faked ...
# # OK TRACE_syscall.seccomp.syscall_faked
# ok 78 TRACE_syscall.seccomp.syscall_faked
# # RUN TRACE_syscall.seccomp.skip_after ...
# # OK TRACE_syscall.seccomp.skip_after
# ok 79 TRACE_syscall.seccomp.skip_after
# # RUN TRACE_syscall.seccomp.kill_after ...
# # OK TRACE_syscall.seccomp.kill_after
# ok 80 TRACE_syscall.seccomp.kill_after
# # RUN TSYNC.siblings_fail_prctl ...
# # OK TSYNC.siblings_fail_prctl
# ok 81 TSYNC.siblings_fail_prctl
# # RUN TSYNC.two_siblings_with_ancestor ...
# # OK TSYNC.two_siblings_with_ancestor
# ok 82 TSYNC.two_siblings_with_ancestor
# # RUN TSYNC.two_sibling_want_nnp ...
# # OK TSYNC.two_sibling_want_nnp
# ok 83 TSYNC.two_sibling_want_nnp
# # RUN TSYNC.two_siblings_with_no_filter ...
# # OK TSYNC.two_siblings_with_no_filter
# ok 84 TSYNC.two_siblings_with_no_filter
# # RUN TSYNC.two_siblings_with_one_divergence ...
# # OK TSYNC.two_siblings_with_one_divergence
# ok 85 TSYNC.two_siblings_with_one_divergence
# # RUN TSYNC.two_siblings_with_one_divergence_no_tid_in_err ...
# # OK TSYNC.two_siblings_with_one_divergence_no_tid_in_err
# ok 86 TSYNC.two_siblings_with_one_divergence_no_tid_in_err
# # RUN TSYNC.two_siblings_not_under_filter ...
# # OK TSYNC.two_siblings_not_under_filter
# ok 87 TSYNC.two_siblings_not_under_filter
# # FAILED: 85 / 87 tests passed.
# # Totals: pass:85 fail:2 xfail:0 xpass:0 skip:0 error:0
not ok 1 selftests: seccomp: seccomp_bpf # exit=1
# selftests: seccomp: seccomp_benchmark
# net.core.bpf_jit_enable = 1
# net.core.bpf_jit_harden = 0
# Current BPF sysctl settings:
# Calibrating sample size for 15 seconds worth of syscalls ...
# Benchmarking 17951400 syscalls...
# 14.787353562 - 0.997474248 = 13789879314 (13.8s)
# getpid native: 768 ns
# 28.919353611 - 14.787576073 = 14131777538 (14.1s)
# getpid RET_ALLOW 1 filter (bitmap): 787 ns
# 41.811151704 - 28.919561008 = 12891590696 (12.9s)
# getpid RET_ALLOW 2 filters (bitmap): 718 ns
# 57.568729311 - 41.811331923 = 15757397388 (15.8s)
# getpid RET_ALLOW 3 filters (full): 877 ns
# 74.191105888 - 57.568946778 = 16622159110 (16.6s)
# getpid RET_ALLOW 4 filters (full): 925 ns
# Estimated total seccomp overhead for 1 bitmapped filter: 19 ns
# Estimated total seccomp overhead for 2 bitmapped filters: 18446744073709551566 ns
# Saw unexpected benchmark result. Try running again with more samples?
ok 2 selftests: seccomp: seccomp_benchmark
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:50:14 /kselftests/run_kselftest.sh -c sigaltstack
TAP version 13
1..1
# selftests: sigaltstack: sas
# TAP version 13
# 1..3
# ok 1 Initial sigaltstack state was SS_DISABLE
# # [RUN] signal USR1
# ok 2 sigaltstack is disabled in sighandler
# # [RUN] switched to user ctx
# # [RUN] signal USR2
# # [OK] Stack preserved
# ok 3 sigaltstack is still SS_AUTODISARM after signal
# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 1 selftests: sigaltstack: sas
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:50:14 /kselftests/run_kselftest.sh -c size
TAP version 13
1..1
# selftests: size: get_size
# TAP version 13
# # Testing system size.
# ok 1 get runtime memory use
# # System runtime memory report (units in Kilobytes):
# ---
# Total: 32739088
# Free: 29326016
# Buffer: 4
# In use: 3413068
# ...
# 1..1
ok 1 selftests: size: get_size
LKP WARN miss target sparc64
2021-03-26 22:50:14 make run_tests -C sparc64
make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453/tools/testing/selftests/sparc64'
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-d7b0df2133729b8f9c9473d4af742d08e1d89453/tools/testing/selftests/sparc64'
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:50:14 cp splice/settings /kselftests/splice/settings
2021-03-26 22:50:14 /kselftests/run_kselftest.sh -c splice
TAP version 13
1..2
# selftests: splice: default_file_splice_read.sh
ok 1 selftests: splice: default_file_splice_read.sh
# selftests: splice: short_splice_read.sh
# splice: Invalid argument
# FAIL: /proc/10532/limits 4096
# splice: Invalid argument
# FAIL: /proc/10532/limits 2
# splice: Invalid argument
# FAIL: /proc/10532/comm 4096
# splice: Invalid argument
# FAIL: /proc/10532/comm 2
# ok: /proc/sys/fs/nr_open 4096
# ok: /proc/sys/fs/nr_open 2
# ok: /proc/sys/kernel/modprobe 4096
# ok: /proc/sys/kernel/modprobe 2
# ok: /proc/sys/kernel/version 4096
# ok: /proc/sys/kernel/version 2
# ok: /sys/module/test_module/coresize 4096
# ok: /sys/module/test_module/coresize 2
# ok: /sys/module/test_module/sections/.init.text 4096
# ok: /sys/module/test_module/sections/.init.text 2
not ok 2 selftests: splice: short_splice_read.sh # exit=1
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:50:15 /kselftests/run_kselftest.sh -c static_keys
TAP version 13
1..1
# selftests: static_keys: test_static_keys.sh
# static_key: ok
ok 1 selftests: static_keys: test_static_keys.sh
LKP WARN miss config CONFIG_SYNC= of sync/config
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:50:15 /kselftests/run_kselftest.sh -c sync
TAP version 13
1..1
# selftests: sync: sync_test
# TAP version 13
# 1..10
# # [RUN] Testing sync framework
# ok 1 [RUN] test_alloc_timeline
# ok 2 [RUN] test_alloc_fence
# ok 3 [RUN] test_alloc_fence_negative
# ok 4 [RUN] test_fence_one_timeline_wait
# ok 5 [RUN] test_fence_one_timeline_merge
# ok 6 [RUN] test_fence_merge_same_fence
# ok 7 [RUN] test_fence_multi_timeline_wait
# ok 8 [RUN] test_stress_two_threads_shared_timeline
# ok 9 [RUN] test_consumer_stress_multi_producer_single_consumer
# ok 10 [RUN] test_merge_stress_random_merge
# # Totals: pass:10 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 1 selftests: sync: sync_test
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:50:18 /kselftests/run_kselftest.sh -c syscall_user_dispatch
TAP version 13
1..2
# selftests: syscall_user_dispatch: sud_test
# TAP version 13
# 1..6
# # Starting 6 tests from 1 test cases.
# # RUN global.dispatch_trigger_sigsys ...
# # OK global.dispatch_trigger_sigsys
# ok 1 global.dispatch_trigger_sigsys
# # RUN global.bad_prctl_param ...
# # OK global.bad_prctl_param
# ok 2 global.bad_prctl_param
# # RUN global.dispatch_and_return ...
# # OK global.dispatch_and_return
# ok 3 global.dispatch_and_return
# # RUN global.bad_selector ...
# # OK global.bad_selector
# ok 4 global.bad_selector
# # RUN global.disable_dispatch ...
# # OK global.disable_dispatch
# ok 5 global.disable_dispatch
# # RUN global.direct_dispatch_range ...
# # OK global.direct_dispatch_range
# ok 6 global.direct_dispatch_range
# # PASSED: 6 / 6 tests passed.
# # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 1 selftests: syscall_user_dispatch: sud_test
# selftests: syscall_user_dispatch: sud_benchmark
# Enabling syscall trapping.
# Caught sys_ff00
# Calibrating test set to last ~5 seconds...
# test iterations = 4000000
# Avg syscall time 1344ns.
# trapped_call_count 1, native_call_count 0.
# Avg syscall time 1379ns.
# Interception overhead: 2.6% (+35ns).
ok 2 selftests: syscall_user_dispatch: sud_benchmark
source /lkp/lkp/src/lib/tests/kernel-selftests-ext.sh
2021-03-26 22:50:30 /kselftests/run_kselftest.sh -c sysctl
TAP version 13
1..1
# selftests: sysctl: sysctl.sh
# Checking production write strict setting ... ok
# Fri Mar 26 22:50:30 UTC 2021
# Running test: sysctl_test_0001 - run #0
# == Testing sysctl behavior against /proc/sys/debug/test_sysctl/int_0001 ==
# Writing test file ... ok
# Checking sysctl is not set to test value ... ok
# Writing sysctl from shell ... ok
# Resetting sysctl to original value ... ok
# Writing entire sysctl in single write ... ok
# Writing middle of sysctl after synchronized seek ... ok
# Writing beyond end of sysctl ... ok
# Writing sysctl with multiple long writes ... ok
# Testing that 0x0000000100000000 fails as expected...ok
# Testing that 0x0000000100000001 fails as expected...ok
# Testing that 0x00000001ffffffff fails as expected...ok
# Testing that 0x0000000180000000 fails as expected...ok
# Testing that 0x000000017fffffff fails as expected...ok
# Testing that 0xffffffff00000000 fails as expected...ok
# Testing that 0xffffffff00000001 fails as expected...ok
# Testing that 0xffffffffffffffff fails as expected...ok
# Testing that 0xffffffff80000000 fails as expected...ok
# Testing that 0xffffffff7fffffff fails as expected...ok
# Testing that -0x0000000100000000 fails as expected...ok
# Testing that -0x0000000100000001 fails as expected...ok
# Testing that -0x00000001ffffffff fails as expected...ok
# Testing that -0x0000000180000000 fails as expected...ok
# Testing that -0x000000017fffffff fails as expected...ok
# Testing that -0xffffffff00000000 fails as expected...ok
# Testing that -0xffffffff00000001 fails as expected...ok
# Testing that -0xffffffffffffffff fails as expected...ok
# Testing that -0xffffffff80000000 fails as expected...ok
# Testing that -0xffffffff7fffffff fails as expected...ok
# Checking ignoring spaces up to PAGE_SIZE works on write ...ok
# Checking passing PAGE_SIZE of spaces fails on write ...ok
# Fri Mar 26 22:50:30 UTC 2021
# Running test: sysctl_test_0002 - run #0
# == Testing sysctl behavior against /proc/sys/debug/test_sysctl/string_0001 ==
# Writing test file ... ok
# Checking sysctl is not set to test value ... ok
# Writing sysctl from shell ... ok
# Resetting sysctl to original value ... ok
# Writing entire sysctl in single write ... ok
# Writing middle of sysctl after synchronized seek ... ok
# Writing beyond end of sysctl ... ok
# Writing sysctl with multiple long writes ... ok
# Writing entire sysctl in short writes ... ok
# Writing middle of sysctl after unsynchronized seek ... ok
# Checking sysctl maxlen is at least 65 ... ok
# Checking sysctl keeps original string on overflow append ... ok
# Checking sysctl stays NULL terminated on write ... ok
# Checking sysctl stays NULL terminated on overwrite ... ok
# Fri Mar 26 22:50:31 UTC 2021
# Running test: sysctl_test_0003 - run #0
# == Testing sysctl behavior against /proc/sys/debug/test_sysctl/int_0002 ==
# Writing test file ... ok
# Checking sysctl is not set to test value ... ok
# Writing sysctl from shell ... ok
# Resetting sysctl to original value ... ok
# Writing entire sysctl in single write ... ok
# Writing middle of sysctl after synchronized seek ... ok
# Writing beyond end of sysctl ... ok
# Writing sysctl with multiple long writes ... ok
# Testing that 0x0000000100000000 fails as expected...ok
# Testing that 0x0000000100000001 fails as expected...ok
# Testing that 0x00000001ffffffff fails as expected...ok
# Testing that 0x0000000180000000 fails as expected...ok
# Testing that 0x000000017fffffff fails as expected...ok
# Testing that 0xffffffff00000000 fails as expected...ok
# Testing that 0xffffffff00000001 fails as expected...ok
# Testing that 0xffffffffffffffff fails as expected...ok
# Testing that 0xffffffff80000000 fails as expected...ok
# Testing that 0xffffffff7fffffff fails as expected...ok
# Testing that -0x0000000100000000 fails as expected...ok
# Testing that -0x0000000100000001 fails as expected...ok
# Testing that -0x00000001ffffffff fails as expected...ok
# Testing that -0x0000000180000000 fails as expected...ok
# Testing that -0x000000017fffffff fails as expected...ok
# Testing that -0xffffffff00000000 fails as expected...ok
# Testing that -0xffffffff00000001 fails as expected...ok
# Testing that -0xffffffffffffffff fails as expected...ok
# Testing that -0xffffffff80000000 fails as expected...ok
# Testing that -0xffffffff7fffffff fails as expected...ok
# Checking ignoring spaces up to PAGE_SIZE works on write ...ok
# Checking passing PAGE_SIZE of spaces fails on write ...ok
# Testing INT_MAX works ...ok
# Testing INT_MAX + 1 will fail as expected...ok
# Testing negative values will work as expected...ok
# Fri Mar 26 22:50:31 UTC 2021
# Running test: sysctl_test_0004 - run #0
# == Testing sysctl behavior against /proc/sys/debug/test_sysctl/uint_0001 ==
# Writing test file ... ok
# Checking sysctl is not set to test value ... ok
# Writing sysctl from shell ... ok
# Resetting sysctl to original value ... ok
# Writing entire sysctl in single write ... ok
# Writing middle of sysctl after synchronized seek ... ok
# Writing beyond end of sysctl ... ok
# Writing sysctl with multiple long writes ... ok
# Testing that 0x0000000100000000 fails as expected...ok
# Testing that 0x0000000100000001 fails as expected...ok
# Testing that 0x00000001ffffffff fails as expected...ok
# Testing that 0x0000000180000000 fails as expected...ok
# Testing that 0x000000017fffffff fails as expected...ok
# Testing that 0xffffffff00000000 fails as expected...ok
# Testing that 0xffffffff00000001 fails as expected...ok
# Testing that 0xffffffffffffffff fails as expected...ok
# Testing that 0xffffffff80000000 fails as expected...ok
# Testing that 0xffffffff7fffffff fails as expected...ok
# Testing that -0x0000000100000000 fails as expected...ok
# Testing that -0x0000000100000001 fails as expected...ok
# Testing that -0x00000001ffffffff fails as expected...ok
# Testing that -0x0000000180000000 fails as expected...ok
# Testing that -0x000000017fffffff fails as expected...ok
# Testing that -0xffffffff00000000 fails as expected...ok
# Testing that -0xffffffff00000001 fails as expected...ok
# Testing that -0xffffffffffffffff fails as expected...ok
# Testing that -0xffffffff80000000 fails as expected...ok
# Testing that -0xffffffff7fffffff fails as expected...ok
# Checking ignoring spaces up to PAGE_SIZE works on write ...ok
# Checking passing PAGE_SIZE of spaces fails on write ...ok
# Testing UINT_MAX works ...ok
# Testing UINT_MAX + 1 will fail as expected...ok
# Testing negative values will not work as expected ...ok
# Fri Mar 26 22:50:31 UTC 2021
# Running test: sysctl_test_0005 - run #0
# Testing array works as expected ... ok
# Testing skipping trailing array elements works ... ok
# Testing PAGE_SIZE limit on array works ... ok
# Testing exceeding PAGE_SIZE limit fails as expected ... ok
# Fri Mar 26 22:50:31 UTC 2021
# Running test: sysctl_test_0005 - run #1
# Testing array works as expected ... ok
# Testing skipping trailing array elements works ... ok
# Testing PAGE_SIZE limit on array works ... ok
# Testing exceeding PAGE_SIZE limit fails as expected ... ok
# Fri Mar 26 22:50:32 UTC 2021
# Running test: sysctl_test_0005 - run #2
# Testing array works as expected ... ok
# Testing skipping trailing array elements works ... ok
# Testing PAGE_SIZE limit on array works ... ok
# Testing exceeding PAGE_SIZE limit fails as expected ... ok
# Fri Mar 26 22:50:32 UTC 2021
# Running test: sysctl_test_0006 - run #0
# Checking bitmap handler... ok
# Fri Mar 26 22:50:33 UTC 2021
# Running test: sysctl_test_0006 - run #1
# Checking bitmap handler... ok
# Fri Mar 26 22:50:33 UTC 2021
# Running test: sysctl_test_0006 - run #2
# Checking bitmap handler... ok
# Fri Mar 26 22:50:34 UTC 2021
# Running test: sysctl_test_0006 - run #3
# Checking bitmap handler... ok
# Fri Mar 26 22:50:34 UTC 2021
# Running test: sysctl_test_0006 - run #4
# Checking bitmap handler... ok
# Fri Mar 26 22:50:34 UTC 2021
# Running test: sysctl_test_0006 - run #5
# Checking bitmap handler... ok
# Fri Mar 26 22:50:34 UTC 2021
# Running test: sysctl_test_0006 - run #6
# Checking bitmap handler... ok
# Fri Mar 26 22:50:36 UTC 2021
# Running test: sysctl_test_0006 - run #7
# Checking bitmap handler... ok
# Fri Mar 26 22:50:36 UTC 2021
# Running test: sysctl_test_0006 - run #8
# Checking bitmap handler... ok
# Fri Mar 26 22:50:38 UTC 2021
# Running test: sysctl_test_0006 - run #9
# Checking bitmap handler... ok
# Fri Mar 26 22:50:39 UTC 2021
# Running test: sysctl_test_0006 - run #10
# Checking bitmap handler... ok
# Fri Mar 26 22:50:40 UTC 2021
# Running test: sysctl_test_0006 - run #11
# Checking bitmap handler... ok
# Fri Mar 26 22:50:41 UTC 2021
# Running test: sysctl_test_0006 - run #12
# Checking bitmap handler... ok
# Fri Mar 26 22:50:42 UTC 2021
# Running test: sysctl_test_0006 - run #13
# Checking bitmap handler... ok
# Fri Mar 26 22:50:43 UTC 2021
# Running test: sysctl_test_0006 - run #14
# Checking bitmap handler... ok
# Fri Mar 26 22:50:44 UTC 2021
# Running test: sysctl_test_0006 - run #15
# Checking bitmap handler... ok
# Fri Mar 26 22:50:44 UTC 2021
# Running test: sysctl_test_0006 - run #16
# Checking bitmap handler... ok
# Fri Mar 26 22:50:45 UTC 2021
# Running test: sysctl_test_0006 - run #17
# Checking bitmap handler... ok
# Fri Mar 26 22:50:45 UTC 2021
# Running test: sysctl_test_0006 - run #18
# Checking bitmap handler... ok
# Fri Mar 26 22:50:46 UTC 2021
# Running test: sysctl_test_0006 - run #19
# Checking bitmap handler... ok
# Fri Mar 26 22:50:46 UTC 2021
# Running test: sysctl_test_0006 - run #20
# Checking bitmap handler... ok
# Fri Mar 26 22:50:47 UTC 2021
# Running test: sysctl_test_0006 - run #21
# Checking bitmap handler... ok
# Fri Mar 26 22:50:47 UTC 2021
# Running test: sysctl_test_0006 - run #22
# Checking bitmap handler... ok
# Fri Mar 26 22:50:47 UTC 2021
# Running test: sysctl_test_0006 - run #23
# Checking bitmap handler... ok
# Fri Mar 26 22:50:47 UTC 2021
# Running test: sysctl_test_0006 - run #24
# Checking bitmap handler... ok
# Fri Mar 26 22:50:47 UTC 2021
# Running test: sysctl_test_0006 - run #25
# Checking bitmap handler... ok
# Fri Mar 26 22:50:48 UTC 2021
# Running test: sysctl_test_0006 - run #26
# Checking bitmap handler... ok
# Fri Mar 26 22:50:50 UTC 2021
# Running test: sysctl_test_0006 - run #27
# Checking bitmap handler... ok
# Fri Mar 26 22:50:51 UTC 2021
# Running test: sysctl_test_0006 - run #28
# Checking bitmap handler... ok
# Fri Mar 26 22:50:51 UTC 2021
# Running test: sysctl_test_0006 - run #29
# Checking bitmap handler... ok
# Fri Mar 26 22:50:52 UTC 2021
# Running test: sysctl_test_0006 - run #30
# Checking bitmap handler... ok
# Fri Mar 26 22:50:53 UTC 2021
# Running test: sysctl_test_0006 - run #31
# Checking bitmap handler... ok
# Fri Mar 26 22:50:54 UTC 2021
# Running test: sysctl_test_0006 - run #32
# Checking bitmap handler... ok
# Fri Mar 26 22:50:54 UTC 2021
# Running test: sysctl_test_0006 - run #33
# Checking bitmap handler... ok
# Fri Mar 26 22:50:55 UTC 2021
# Running test: sysctl_test_0006 - run #34
# Checking bitmap handler... ok
# Fri Mar 26 22:50:55 UTC 2021
# Running test: sysctl_test_0006 - run #35
# Checking bitmap handler... ok
# Fri Mar 26 22:50:57 UTC 2021
# Running test: sysctl_test_0006 - run #36
# Checking bitmap handler... ok
# Fri Mar 26 22:50:57 UTC 2021
# Running test: sysctl_test_0006 - run #37
# Checking bitmap handler... ok
# Fri Mar 26 22:50:58 UTC 2021
# Running test: sysctl_test_0006 - run #38
# Checking bitmap handler... ok
# Fri Mar 26 22:50:58 UTC 2021
# Running test: sysctl_test_0006 - run #39
# Checking bitmap handler... ok
# Fri Mar 26 22:50:58 UTC 2021
# Running test: sysctl_test_0006 - run #40
# Checking bitmap handler... ok
# Fri Mar 26 22:50:59 UTC 2021
# Running test: sysctl_test_0006 - run #41
# Checking bitmap handler... ok
# Fri Mar 26 22:51:00 UTC 2021
# Running test: sysctl_test_0006 - run #42
# Checking bitmap handler... ok
# Fri Mar 26 22:51:02 UTC 2021
# Running test: sysctl_test_0006 - run #43
# Checking bitmap handler... ok
# Fri Mar 26 22:51:02 UTC 2021
# Running test: sysctl_test_0006 - run #44
# Checking bitmap handler... ok
# Fri Mar 26 22:51:02 UTC 2021
# Running test: sysctl_test_0006 - run #45
# Checking bitmap handler... ok
# Fri Mar 26 22:51:03 UTC 2021
# Running test: sysctl_test_0006 - run #46
# Checking bitmap handler... ok
# Fri Mar 26 22:51:03 UTC 2021
# Running test: sysctl_test_0006 - run #47
# Checking bitmap handler... ok
# Fri Mar 26 22:51:03 UTC 2021
# Running test: sysctl_test_0006 - run #48
# Checking bitmap handler... ok
# Fri Mar 26 22:51:04 UTC 2021
# Running test: sysctl_test_0006 - run #49
# Checking bitmap handler... ok
# Fri Mar 26 22:51:05 UTC 2021
# Running test: sysctl_test_0007 - run #0
# Testing if /proc/sys/debug/test_sysctl/boot_int is set to 1 ...ok
ok 1 selftests: sysctl: sysctl.sh



To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml
bin/lkp run compatible-job.yaml



---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation

Thanks,
Oliver Sang


Attachments:
(No filename) (75.09 kB)
config-5.12.0-rc4-00224-gd7b0df213372 (176.27 kB)
job-script (6.45 kB)
dmesg.xz (40.09 kB)
kernel-selftests (73.50 kB)
job.yaml (5.41 kB)
reproduce (634.00 B)
Download all attachments

2021-04-02 19:02:10

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH] fs: split receive_fd_replace from __receive_fd

On Thu, Mar 25, 2021 at 09:22:09AM +0100, Christoph Hellwig wrote:
> receive_fd_replace shares almost no code with the general case, so split
> it out. Also remove the "Bump the sock usage counts" comment from
> both copies, as that is now what __receive_sock actually does.
>
> Signed-off-by: Christoph Hellwig <[email protected]>

I'm okay with repeating code in fs/file.c. What I wanted to avoid was
open coded combinations in various callers.

So, sure, this can be split, but as-is the patch breaks SECCOMP_IOCTL_NOTIF_ADDFD:
https://lore.kernel.org/linux-fsdevel/20210329071939.GC3633@xsang-OptiPlex-9020/

-Kees

--
Kees Cook

2021-04-16 05:17:49

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] fs: split receive_fd_replace from __receive_fd

On Thu, Mar 25, 2021 at 09:22:09AM +0100, Christoph Hellwig wrote:
> receive_fd_replace shares almost no code with the general case, so split
> it out. Also remove the "Bump the sock usage counts" comment from
> both copies, as that is now what __receive_sock actually does.

Nice, except that you've misread that, er, lovely API. This

> -static inline int receive_fd_replace(int fd, struct file *file, unsigned int o_flags)
> -{
> - return __receive_fd(fd, file, NULL, o_flags);
> + return __receive_fd(file, NULL, o_flags);
> }

can get called with negative fd (in which case it turns into an alias for
receive_fd(), of course). As the result, that ioctl got broken in case
when SECCOMP_ADDFD_FLAG_SETFD is not set. Trivially fixed by having the
only caller check the damn condition and call either receive_fd_replace()
or receive_fd().

2021-04-16 05:19:55

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] fs: split receive_fd_replace from __receive_fd

On Fri, Apr 02, 2021 at 12:01:05PM -0700, Kees Cook wrote:
> On Thu, Mar 25, 2021 at 09:22:09AM +0100, Christoph Hellwig wrote:
> > receive_fd_replace shares almost no code with the general case, so split
> > it out. Also remove the "Bump the sock usage counts" comment from
> > both copies, as that is now what __receive_sock actually does.
> >
> > Signed-off-by: Christoph Hellwig <[email protected]>
>
> I'm okay with repeating code in fs/file.c. What I wanted to avoid was
> open coded combinations in various callers.

... and that got you a lovely userland ABI, where you have

(1) newfd >= 0, SECCOMP_ADDFD_FLAG_SETFD is present => replace
(2) newfd < 0, SECCOMP_ADDFD_FLAG_SETFD is present => insert
(3) newfd == 0, SECCOMP_ADDFD_FLAG_SETFD not present => insert
(4) newfd != 0, SECCOMP_ADDFD_FLAG_SETFD not present => -EINVAL

IMO (2) is a bug. Whether we still can fix it or not... no idea, depends
on whether the actual userland has come to depend upon it.

I suggest turning (2) into an error (-EBADF is what you'd get from
attempt to set something at such descriptor) and seeing if anything
breaks. And having SECCOMP_ADDFD_FLAG_SETFD status passed into kaddfd
explicitly, with explicit check in seccomp_handle_addfd(). As in

commit 42eb0d54c08a0331d6d295420f602237968d792b
Author: Christoph Hellwig <[email protected]>
Date: Thu Mar 25 09:22:09 2021 +0100

fs: split receive_fd_replace from __receive_fd

receive_fd_replace shares almost no code with the general case, so split
it out. Also remove the "Bump the sock usage counts" comment from
both copies, as that is now what __receive_sock actually does.

[AV: ... and make the only user of receive_fd_replace() choose between
it and receive_fd() according to what userland had passed to it in
flags]

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Al Viro <[email protected]>

diff --git a/fs/file.c b/fs/file.c
index f3a4bac2cbe9..d8ccb95a7f41 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1068,8 +1068,6 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)

/**
* __receive_fd() - Install received file into file descriptor table
- *
- * @fd: fd to install into (if negative, a new fd will be allocated)
* @file: struct file that was received from another process
* @ufd: __user pointer to write new fd number to
* @o_flags: the O_* flags to apply to the new fd entry
@@ -1083,7 +1081,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
*
* Returns newly install fd or -ve on error.
*/
-int __receive_fd(int fd, struct file *file, int __user *ufd, unsigned int o_flags)
+int __receive_fd(struct file *file, int __user *ufd, unsigned int o_flags)
{
int new_fd;
int error;
@@ -1092,32 +1090,33 @@ int __receive_fd(int fd, struct file *file, int __user *ufd, unsigned int o_flag
if (error)
return error;

- if (fd < 0) {
- new_fd = get_unused_fd_flags(o_flags);
- if (new_fd < 0)
- return new_fd;
- } else {
- new_fd = fd;
- }
+ new_fd = get_unused_fd_flags(o_flags);
+ if (new_fd < 0)
+ return new_fd;

if (ufd) {
error = put_user(new_fd, ufd);
if (error) {
- if (fd < 0)
- put_unused_fd(new_fd);
+ put_unused_fd(new_fd);
return error;
}
}

- if (fd < 0) {
- fd_install(new_fd, get_file(file));
- } else {
- error = replace_fd(new_fd, file, o_flags);
- if (error)
- return error;
- }
+ fd_install(new_fd, get_file(file));
+ __receive_sock(file);
+ return new_fd;
+}

- /* Bump the sock usage counts, if any. */
+int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags)
+{
+ int error;
+
+ error = security_file_receive(file);
+ if (error)
+ return error;
+ error = replace_fd(new_fd, file, o_flags);
+ if (error)
+ return error;
__receive_sock(file);
return new_fd;
}
diff --git a/include/linux/file.h b/include/linux/file.h
index 225982792fa2..2de2e4613d7b 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -92,23 +92,20 @@ extern void put_unused_fd(unsigned int fd);

extern void fd_install(unsigned int fd, struct file *file);

-extern int __receive_fd(int fd, struct file *file, int __user *ufd,
+extern int __receive_fd(struct file *file, int __user *ufd,
unsigned int o_flags);
static inline int receive_fd_user(struct file *file, int __user *ufd,
unsigned int o_flags)
{
if (ufd == NULL)
return -EFAULT;
- return __receive_fd(-1, file, ufd, o_flags);
+ return __receive_fd(file, ufd, o_flags);
}
static inline int receive_fd(struct file *file, unsigned int o_flags)
{
- return __receive_fd(-1, file, NULL, o_flags);
-}
-static inline int receive_fd_replace(int fd, struct file *file, unsigned int o_flags)
-{
- return __receive_fd(fd, file, NULL, o_flags);
+ return __receive_fd(file, NULL, o_flags);
}
+int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags);

extern void flush_delayed_fput(void);
extern void __fput_sync(struct file *);
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 1d60fc2c9987..4fe19cecaa94 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -119,8 +119,11 @@ struct seccomp_kaddfd {
int fd;
unsigned int flags;

- /* To only be set on reply */
- int ret;
+ union {
+ bool setfd;
+ /* To only be set on reply */
+ int ret;
+ };
struct completion completion;
struct list_head list;
};
@@ -1069,7 +1072,11 @@ static void seccomp_handle_addfd(struct seccomp_kaddfd *addfd)
* that it has been handled.
*/
list_del_init(&addfd->list);
- addfd->ret = receive_fd_replace(addfd->fd, addfd->file, addfd->flags);
+ if (!addfd->setfd)
+ addfd->ret = receive_fd(addfd->file, addfd->flags);
+ else
+ addfd->ret = receive_fd_replace(addfd->fd, addfd->file,
+ addfd->flags);
complete(&addfd->completion);
}

@@ -1583,8 +1590,8 @@ static long seccomp_notify_addfd(struct seccomp_filter *filter,
return -EBADF;

kaddfd.flags = addfd.newfd_flags;
- kaddfd.fd = (addfd.flags & SECCOMP_ADDFD_FLAG_SETFD) ?
- addfd.newfd : -1;
+ kaddfd.setfd = addfd.flags & SECCOMP_ADDFD_FLAG_SETFD;
+ kaddfd.fd = addfd.newfd;
init_completion(&kaddfd.completion);

ret = mutex_lock_interruptible(&filter->notify_lock);

2021-04-16 14:21:59

by Christian Brauner

[permalink] [raw]
Subject: Re: [PATCH] fs: split receive_fd_replace from __receive_fd

On Fri, Apr 16, 2021 at 04:15:43AM +0000, Al Viro wrote:
> On Fri, Apr 02, 2021 at 12:01:05PM -0700, Kees Cook wrote:
> > On Thu, Mar 25, 2021 at 09:22:09AM +0100, Christoph Hellwig wrote:
> > > receive_fd_replace shares almost no code with the general case, so split
> > > it out. Also remove the "Bump the sock usage counts" comment from
> > > both copies, as that is now what __receive_sock actually does.
> > >
> > > Signed-off-by: Christoph Hellwig <[email protected]>
> >
> > I'm okay with repeating code in fs/file.c. What I wanted to avoid was
> > open coded combinations in various callers.
>
> ... and that got you a lovely userland ABI, where you have
>
> (1) newfd >= 0, SECCOMP_ADDFD_FLAG_SETFD is present => replace
> (2) newfd < 0, SECCOMP_ADDFD_FLAG_SETFD is present => insert
> (3) newfd == 0, SECCOMP_ADDFD_FLAG_SETFD not present => insert
> (4) newfd != 0, SECCOMP_ADDFD_FLAG_SETFD not present => -EINVAL
>
> IMO (2) is a bug. Whether we still can fix it or not... no idea, depends
> on whether the actual userland has come to depend upon it.

The number of users actively making use of this is rn more or less only
projects I maintain. There's a proposal to make that API part of another
project but they can just adapt to the new behavior too since there's no
released version. So we could just risk that change.

>
> I suggest turning (2) into an error (-EBADF is what you'd get from
> attempt to set something at such descriptor) and seeing if anything
> breaks. And having SECCOMP_ADDFD_FLAG_SETFD status passed into kaddfd
> explicitly, with explicit check in seccomp_handle_addfd(). As in
>
> commit 42eb0d54c08a0331d6d295420f602237968d792b
> Author: Christoph Hellwig <[email protected]>
> Date: Thu Mar 25 09:22:09 2021 +0100
>
> fs: split receive_fd_replace from __receive_fd
>
> receive_fd_replace shares almost no code with the general case, so split
> it out. Also remove the "Bump the sock usage counts" comment from
> both copies, as that is now what __receive_sock actually does.
>
> [AV: ... and make the only user of receive_fd_replace() choose between
> it and receive_fd() according to what userland had passed to it in
> flags]
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> Signed-off-by: Al Viro <[email protected]>
>
> diff --git a/fs/file.c b/fs/file.c
> index f3a4bac2cbe9..d8ccb95a7f41 100644
> --- a/fs/file.c
> +++ b/fs/file.c
> @@ -1068,8 +1068,6 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
>
> /**
> * __receive_fd() - Install received file into file descriptor table
> - *
> - * @fd: fd to install into (if negative, a new fd will be allocated)
> * @file: struct file that was received from another process
> * @ufd: __user pointer to write new fd number to
> * @o_flags: the O_* flags to apply to the new fd entry
> @@ -1083,7 +1081,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
> *
> * Returns newly install fd or -ve on error.
> */
> -int __receive_fd(int fd, struct file *file, int __user *ufd, unsigned int o_flags)
> +int __receive_fd(struct file *file, int __user *ufd, unsigned int o_flags)
> {
> int new_fd;
> int error;
> @@ -1092,32 +1090,33 @@ int __receive_fd(int fd, struct file *file, int __user *ufd, unsigned int o_flag
> if (error)
> return error;
>
> - if (fd < 0) {
> - new_fd = get_unused_fd_flags(o_flags);
> - if (new_fd < 0)
> - return new_fd;
> - } else {
> - new_fd = fd;
> - }
> + new_fd = get_unused_fd_flags(o_flags);
> + if (new_fd < 0)
> + return new_fd;
>
> if (ufd) {
> error = put_user(new_fd, ufd);
> if (error) {
> - if (fd < 0)
> - put_unused_fd(new_fd);
> + put_unused_fd(new_fd);
> return error;
> }
> }
>
> - if (fd < 0) {
> - fd_install(new_fd, get_file(file));
> - } else {
> - error = replace_fd(new_fd, file, o_flags);
> - if (error)
> - return error;
> - }
> + fd_install(new_fd, get_file(file));
> + __receive_sock(file);
> + return new_fd;
> +}
>
> - /* Bump the sock usage counts, if any. */
> +int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags)
> +{
> + int error;
> +
> + error = security_file_receive(file);
> + if (error)
> + return error;
> + error = replace_fd(new_fd, file, o_flags);
> + if (error)
> + return error;
> __receive_sock(file);
> return new_fd;
> }
> diff --git a/include/linux/file.h b/include/linux/file.h
> index 225982792fa2..2de2e4613d7b 100644
> --- a/include/linux/file.h
> +++ b/include/linux/file.h
> @@ -92,23 +92,20 @@ extern void put_unused_fd(unsigned int fd);
>
> extern void fd_install(unsigned int fd, struct file *file);
>
> -extern int __receive_fd(int fd, struct file *file, int __user *ufd,
> +extern int __receive_fd(struct file *file, int __user *ufd,
> unsigned int o_flags);
> static inline int receive_fd_user(struct file *file, int __user *ufd,
> unsigned int o_flags)
> {
> if (ufd == NULL)
> return -EFAULT;
> - return __receive_fd(-1, file, ufd, o_flags);
> + return __receive_fd(file, ufd, o_flags);
> }
> static inline int receive_fd(struct file *file, unsigned int o_flags)
> {
> - return __receive_fd(-1, file, NULL, o_flags);
> -}
> -static inline int receive_fd_replace(int fd, struct file *file, unsigned int o_flags)
> -{
> - return __receive_fd(fd, file, NULL, o_flags);
> + return __receive_fd(file, NULL, o_flags);
> }
> +int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags);
>
> extern void flush_delayed_fput(void);
> extern void __fput_sync(struct file *);
> diff --git a/kernel/seccomp.c b/kernel/seccomp.c
> index 1d60fc2c9987..4fe19cecaa94 100644
> --- a/kernel/seccomp.c
> +++ b/kernel/seccomp.c
> @@ -119,8 +119,11 @@ struct seccomp_kaddfd {
> int fd;
> unsigned int flags;
>
> - /* To only be set on reply */
> - int ret;
> + union {
> + bool setfd;
> + /* To only be set on reply */
> + int ret;
> + };
> struct completion completion;
> struct list_head list;
> };
> @@ -1069,7 +1072,11 @@ static void seccomp_handle_addfd(struct seccomp_kaddfd *addfd)
> * that it has been handled.
> */
> list_del_init(&addfd->list);
> - addfd->ret = receive_fd_replace(addfd->fd, addfd->file, addfd->flags);
> + if (!addfd->setfd)
> + addfd->ret = receive_fd(addfd->file, addfd->flags);
> + else
> + addfd->ret = receive_fd_replace(addfd->fd, addfd->file,
> + addfd->flags);
> complete(&addfd->completion);
> }
>
> @@ -1583,8 +1590,8 @@ static long seccomp_notify_addfd(struct seccomp_filter *filter,
> return -EBADF;
>
> kaddfd.flags = addfd.newfd_flags;
> - kaddfd.fd = (addfd.flags & SECCOMP_ADDFD_FLAG_SETFD) ?
> - addfd.newfd : -1;
> + kaddfd.setfd = addfd.flags & SECCOMP_ADDFD_FLAG_SETFD;
> + kaddfd.fd = addfd.newfd;
> init_completion(&kaddfd.completion);
>
> ret = mutex_lock_interruptible(&filter->notify_lock);