Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\verifier.c Create Date:2022-07-28 12:57:52
Last Modify:2022-05-19 20:02:10 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:may_access_direct_pkt_data

Proto:static bool may_access_direct_pkt_data(struct bpf_verifier_env *env, const struct bpf_call_arg_meta *meta, enum bpf_access_type t)

Type:bool

Parameter:

TypeParameterName
struct bpf_verifier_env *env
const struct bpf_call_arg_meta *meta
enum bpf_access_typet
2311  Case Type of BPF program == BPF_PROG_TYPE_LWT_IN
2312  Case Type of BPF program == BPF_PROG_TYPE_LWT_OUT
2313  Case Type of BPF program == BPF_PROG_TYPE_LWT_SEG6LOCAL
2314  Case Type of BPF program == BPF_PROG_TYPE_SK_REUSEPORT
2315  Case Type of BPF program == BPF_PROG_TYPE_FLOW_DISSECTOR
2316  Case Type of BPF program == BPF_PROG_TYPE_CGROUP_SKB
2317  If t == BPF_WRITE Then Return false
2322  Case Type of BPF program == BPF_PROG_TYPE_SCHED_CLS
2323  Case Type of BPF program == BPF_PROG_TYPE_SCHED_ACT
2324  Case Type of BPF program == BPF_PROG_TYPE_XDP
2325  Case Type of BPF program == BPF_PROG_TYPE_LWT_XMIT
2326  Case Type of BPF program == BPF_PROG_TYPE_SK_SKB
2327  Case Type of BPF program == BPF_PROG_TYPE_SK_MSG
2328  If meta Then Return pkt_access
2331  seen_direct_write = true
2332  Return true
2334  Case Type of BPF program == BPF_PROG_TYPE_CGROUP_SOCKOPT
2335  If t == BPF_WRITE Then seen_direct_write = true
2338  Return true
2340  Default
2341  Return false
Caller
NameDescribe
check_mem_accessheck whether memory at (regno + off) is accessible for t = (read | write)* if t==write, value_regno is a register which value is stored into memory* if t==read, value_regno is a register which will receive the value from memory* if t==write &&
check_func_arg