Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Mark the unknown part of a register (variable offset or scalar value) as* known to have the value @imm.

Proto:static void __mark_reg_known(struct bpf_reg_state *reg, u64 imm)

Type:void

Parameter:

TypeParameterName
struct bpf_reg_state *reg
u64imm
919  memset(((u8 * )reg) + size of Ordering of fields matters. See states_equal() , 0, offsetof(structbpf_reg_state, var_off) - size of Ordering of fields matters. See states_equal() )
921  For scalar types (SCALAR_VALUE), this represents our knowledge of * the actual value. * For pointer types, this represents the variable part of the offset * from the pointed-to object, and is shared with all bpf_reg_states * with the same id as us. = Represent a known constant as a tnum.
922  minimum possible (s64)value = imm
923  maximum possible (s64)value = imm
924  minimum possible (u64)value = imm
925  maximum possible (u64)value = imm
Caller
NameDescribe
__mark_reg_known_zeroMark the 'variable offset' part of a register as zero. This should be* used only on registers holding a pointer type.
__mark_reg_const_zero
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 &&
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.
adjust_reg_min_max_valsHandles ALU ops other than BPF_END, BPF_NEG and BPF_MOV: computes new min/max* and var_off.
check_alu_opheck validity of 32-bit and 64-bit arithmetic operations
reg_set_min_maxAdjusts the register min/max values in the case that the dst_reg is the* variable register that we are working on, and src_reg is a constant or we're* simply doing a BPF_K check.* In JEQ/JNE cases we also adjust the var_off values.
reg_set_min_max_invSame as above, but for the case that dst_reg holds a constant and src_reg is* the variable reg.
check_ld_immverify BPF_LD_IMM64 instruction