函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns true if (rold safe implies rcur safe)

函数原型:static bool regsafe(struct bpf_reg_state *rold, struct bpf_reg_state *rcur, struct idpair *idmap)

返回类型:bool

参数:

类型参数名称
struct bpf_reg_state *rold
struct bpf_reg_state *rcur
struct idpair *idmap
7086  如果非live按位与REG_LIVE_READ的值则返回:true
7090  equal等于内存比较恒等于0
7092  如果 Ordering of fields matters. See states_equal() 恒等于g == frame_pointer + offset 则返回:equal Inside the callee two registers can be both PTR_TO_STACK like * R1=fp-8 and R2=fp-8, but one of them points to this function stack * while another to the caller's stack. To differentiate them 'frameno' * is used which is an index in bpf_verifier_state->fr恒等于 Inside the callee two registers can be both PTR_TO_STACK like * R1=fp-8 and R2=fp-8, but one of them points to this function stack * while another to the caller's stack. To differentiate them 'frameno' * is used which is an index in bpf_verifier_state->fr
7098  如果equal则返回:true
7101  如果 Ordering of fields matters. See states_equal() 恒等于hing was written into register 则返回:true
7104  如果 Ordering of fields matters. See states_equal() 恒等于hing was written into register 则返回:false
7107  : Ordering of fields matters. See states_equal() 恒等于g doesn't contain a valid pointer
7114  否则
7122  返回:false
7124  : Ordering of fields matters. See states_equal() 恒等于g points to map element value
7133  返回:内存比较恒等于0且heck %cur's range satisfies %old's Returns true if @b represents a subset of @a.
7136  : Ordering of fields matters. See states_equal() 恒等于points to map elem value or NULL
7144  如果 Ordering of fields matters. See states_equal() 不等于points to map elem value or NULL 则返回:false
7146  如果内存比较则返回:false
7149  返回:If in the old state two registers had the same id, then they need to have* the same id in the new state as well
7150  : Ordering of fields matters. See states_equal() 恒等于skb->data - meta_len
7151  : Ordering of fields matters. See states_equal() 恒等于g points to skb->data
7152  如果 Ordering of fields matters. See states_equal() 不等于 Ordering of fields matters. See states_equal() 则返回:false
7160  如果 valid when type == PTR_TO_PACKET 大于 valid when type == PTR_TO_PACKET 则返回:false
7165  如果 Fixed part of pointer offset, pointer types only 不等于 Fixed part of pointer offset, pointer types only 则返回:false
7168  如果 For PTR_TO_PACKET, used to find other pointers with the same variable * offset, so they can share range knowledge. * For PTR_TO_MAP_VALUE_OR_NULL this is used to share which map value we * came from, when one is tested for != NULL. * For PTR_TO_SOCKET thi且非If in the old state two registers had the same id, then they need to have* the same id in the new state as well则返回:false
7171  返回:heck %cur's range satisfies %old's Returns true if @b represents a subset of @a.
7173  : Ordering of fields matters. See states_equal() 恒等于g points to bpf_context
7174  : Ordering of fields matters. See states_equal() 恒等于g points to struct bpf_map
7175  : Ordering of fields matters. See states_equal() 恒等于skb->data + headlen
7176  : Ordering of fields matters. See states_equal() 恒等于g points to bpf_flow_keys
7177  : Ordering of fields matters. See states_equal() 恒等于g points to struct bpf_sock
7178  : Ordering of fields matters. See states_equal() 恒等于g points to struct bpf_sock or NULL
7179  : Ordering of fields matters. See states_equal() 恒等于g points to sock_common
7180  : Ordering of fields matters. See states_equal() 恒等于g points to sock_common or NULL
7181  : Ordering of fields matters. See states_equal() 恒等于g points to struct tcp_sock
7182  : Ordering of fields matters. See states_equal() 恒等于g points to struct tcp_sock or NULL
7183  : Ordering of fields matters. See states_equal() 恒等于g points to struct xdp_sock
7187  默认
7189  返回:false
7193  WARN_ON_ONCE(1)
7194  返回:false
调用者
名称描述
stacksafe
func_states_equalmpare two verifier states* all states stored in state_list are known to be valid, since* verifier reached 'bpf_exit' instruction through them* this function is called when verifier exploring different branches of* execution popped from the state stack