Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-28 12:54:02
Last Modify:2022-05-19 18:06:12 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_prog_query

Proto:static int bpf_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr)

Type:int

Parameter:

TypeParameterName
const union bpf_attr *attr
union bpf_attr __user *uattr
2208  If Not Check operation authority Then Return -EPERM
2210  If helper macro to check that unused fields 'union bpf_attr' are zero (BPF_PROG_QUERY) Then Return -EINVAL
2212  If query_flags & ~lags for BPF_PROG_QUERY Then Return -EINVAL
2216  Case attach_type == BPF_CGROUP_INET_INGRESS
2217  Case attach_type == BPF_CGROUP_INET_EGRESS
2218  Case attach_type == BPF_CGROUP_INET_SOCK_CREATE
2219  Case attach_type == BPF_CGROUP_INET4_BIND
2220  Case attach_type == BPF_CGROUP_INET6_BIND
2221  Case attach_type == BPF_CGROUP_INET4_POST_BIND
2222  Case attach_type == BPF_CGROUP_INET6_POST_BIND
2223  Case attach_type == BPF_CGROUP_INET4_CONNECT
2224  Case attach_type == BPF_CGROUP_INET6_CONNECT
2225  Case attach_type == BPF_CGROUP_UDP4_SENDMSG
2226  Case attach_type == BPF_CGROUP_UDP6_SENDMSG
2227  Case attach_type == BPF_CGROUP_UDP4_RECVMSG
2228  Case attach_type == BPF_CGROUP_UDP6_RECVMSG
2229  Case attach_type == BPF_CGROUP_SOCK_OPS
2230  Case attach_type == BPF_CGROUP_DEVICE
2231  Case attach_type == BPF_CGROUP_SYSCTL
2232  Case attach_type == BPF_CGROUP_GETSOCKOPT
2233  Case attach_type == BPF_CGROUP_SETSOCKOPT
2234  Break
2235  Case attach_type == BPF_LIRC_MODE2
2236  Return lirc_prog_query(attr, uattr)
2237  Case attach_type == BPF_FLOW_DISSECTOR
2238  Return skb_flow_dissector_prog_query(attr, uattr)
2239  Default
2240  Return -EINVAL
2243  Return cgroup_bpf_prog_query(attr, uattr)