函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:stacksafe

函数原型:static bool stacksafe(struct bpf_func_state *old, struct bpf_func_state *cur, struct idpair *idmap)

返回类型:bool

参数:

类型参数名称
struct bpf_func_state *old
struct bpf_func_state *cur
struct idpair *idmap
7207 i小于allocated_stack循环
7208  spi等于isize of eBPF register in bytes
7210  如果非live按位与REG_LIVE_READ的值则
7211  i加等于size of eBPF register in bytes 减1
7213  继续下一循环
7216  如果slot_type[i % size of eBPF register in bytes ]恒等于 nothing was stored in this stack slot 则继续下一循环
7222  如果i大于等于allocated_stack则返回:false
7229  如果slot_type[i % size of eBPF register in bytes ]恒等于 BPF program wrote some data into this slot slot_type[i % size of eBPF register in bytes ]恒等于 BPF program wrote constant zero 则继续下一循环
7232  如果slot_type[i % size of eBPF register in bytes ]不等于slot_type[i % size of eBPF register in bytes ]则返回:false
7240  如果i取模size of eBPF register in bytes 则继续下一循环
7242  如果slot_type[0]不等于 register spilled into stack 则继续下一循环
7244  如果非Returns true if (rold safe implies rcur safe) 则返回:false
7259  返回:true
调用者
名称描述
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