Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:heck access to 'struct bpf_context' fields. Supports fixed offsets only

Proto:static int check_ctx_access(struct bpf_verifier_env *env, int insn_idx, int off, int size, enum bpf_access_type t, enum bpf_reg_type *reg_type, u32 *btf_id)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_env *env
intinsn_idx
intoff
intsize
enum bpf_access_typet
enum bpf_reg_type *reg_type
u32 *btf_id
2404  struct bpf_insn_access_aux info = {reg_type = * reg_type, r verbose logs = & log, }
2409  If is_valid_access && is_valid_access(off, size, t, BPF program being verified , & info) Then
2418  reg_type = reg_type
2420  If reg_type == g points to kernel struct Then btf_id = btf_id
2422  Else the ctx field size for load insn, maybe 0 = ctx_field_size
2425  If max_ctx_offset < off + size Then max_ctx_offset = off + size
2427  Return 0
2430  verbose(env, "invalid bpf_context access off=%d size=%d\n", off, size)
2431  Return -EACCES
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 &&