函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:push_stack

函数原型:static struct bpf_verifier_state *push_stack(struct bpf_verifier_env *env, int insn_idx, int prev_insn_idx, bool speculative)

返回类型:struct bpf_verifier_state

参数:

类型参数名称
struct bpf_verifier_env *env
intinsn_idx
intprev_insn_idx
boolspeculative
862  cur等于current verifier state
866  elem等于分配内存并置零
867  如果非elem则转到:err
870  insn_idx等于insn_idx
871  prev_insn_idx等于prev_insn_idx
872  next等于stack of verifier states to be processed
873  stack of verifier states to be processed 等于elem
874  umber of states to be processed 自加
875  err等于copy_verifier_state( & verifer state is 'st'* before processing instruction 'insn_idx'* and after processing instruction 'prev_insn_idx', cur)
876  如果err则转到:err
878  speculative或等于speculative
879  如果umber of states to be processed 大于BPF_COMPLEXITY_LIMIT_JMP_SEQ
880  verbose(env, "The sequence of %d jumps is too complex.\n", umber of states to be processed )
882  转到:err
884  如果parent
885  * 'branches' field is the number of branches left to explore: * 0 - all possible paths from this state reached bpf_exit or * were safely pruned * 1 - at least one path is being explored. * This state hasn't reached bpf_exit * 2 - at least two paths are bei先自加
896  返回:verifer state is 'st'* before processing instruction 'insn_idx'* and after processing instruction 'prev_insn_idx'
897  err :
898  free_verifier_state(current verifier state , true)
899  current verifier state = NULL
901  当非pop_stack(env, NULL, NULL)循环
902  返回:NULL
调用者
名称描述
sanitize_ptr_alu
check_cond_jmp_op