Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int mark_reg_read(struct bpf_verifier_env *env, const struct bpf_reg_state *state, struct bpf_reg_state *parent, u8 flag)

Type:int

Parameter:

TypeParameterName
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  When parent cycle
1271  If writes && live & g was written first, screening off later reads Then Break
1277  Return -EFAULT
1282  If (live & REG_LIVE_READ) == flag || live & likewise, but full 64-bit content matters Then Break
1295  live |= flag
1297  If flag == likewise, but full 64-bit content matters Then 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  If longest register parentage chain walked for liveness marking < cnt Then longest register parentage chain walked for liveness marking = cnt
1307  Return 0
Caller
NameDescribe
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.