Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\bpf_verifier.h Create Date:2022-07-28 12:55:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cur_regs

Proto:static inline struct bpf_reg_state *cur_regs(struct bpf_verifier_env *env)

Type:struct bpf_reg_state

Parameter:

TypeParameterName
struct bpf_verifier_env *env
418  Return regs
Caller
NameDescribe
check_map_access_type
__check_map_accessheck read/write into map element returned by bpf_map_lookup_elem()
__check_packet_access
check_packet_access
check_sock_access
reg_state
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_helper_mem_access
process_spin_lockImplementation details:* bpf_map_lookup returns PTR_TO_MAP_VALUE_OR_NULL* Two bpf_map_lookups (even with the same key) will have different reg->id
check_func_arg
record_func_key
check_helper_call
adjust_scalar_min_max_valsWARNING: This function does calculations on 64-bit values, but the actual* execution may occur on 32-bit values. Therefore, things like bitshifts* need extra checks in the 32-bit case.
check_alu_opheck validity of 32-bit and 64-bit arithmetic operations
check_ld_immverify BPF_LD_IMM64 instruction
check_ld_absverify safety of LD_ABS|LD_IND instructions:* - they can only appear in the programs where ctx == skb* - since they are wrappers of function calls, they scratch R1-R5 registers,* preserve R6-R9, and store return value into R0* Implicit input:* ctx == skb
check_return_code
do_check