函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\verifier.c Create Date:2022-07-27 14:10:17
Last Modify:2022-05-19 20:02:10 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Parentage chain of this register (or stack slot) should take care of all* issues like callee-saved registers, stack slot allocation time, etc.

函数原型:static int mark_reg_read(struct bpf_verifier_env *env, const struct bpf_reg_state *state, struct bpf_reg_state *parent, u8 flag)

返回类型:int

参数:

类型参数名称
struct bpf_verifier_env *env
const struct bpf_reg_state *state
struct bpf_reg_state *parent
u8flag
1266  writes等于parent恒等于 parentage chain for liveness checking
1267  cnt等于0
1269 parent循环
1271  如果writeslive按位与g was written first, screening off later reads 退出
1277  返回:负EFAULT
1282  如果live按位与REG_LIVE_READ的值恒等于flaglive按位与likewise, but full 64-bit content matters 退出
1295  live或等于flag
1297  如果flag恒等于likewise, but full 64-bit content matters live与等于g was read, so we're sensitive to initial value 的反
1299  state等于parent
1300  parent等于 parentage chain for liveness checking
1301  writes = true
1302  cnt自加
1305  如果longest register parentage chain walked for liveness marking 小于cntlongest register parentage chain walked for liveness marking 等于cnt
1307  返回:0
调用者
名称描述
check_reg_arg
check_stack_read
check_stack_boundarywhen register 'regno' is passed into function that will read 'access_size'* bytes from that pointer, make sure that it's within stack boundary* and all elements of stack are initialized
propagate_liveness_regReturn 0 if no propagation happened. Return negative error code if error* happened. Otherwise, return the propagated bit.