Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:push_stack

Proto:static struct bpf_verifier_state *push_stack(struct bpf_verifier_env *env, int insn_idx, int prev_insn_idx, bool speculative)

Type:struct bpf_verifier_state

Parameter:

TypeParameterName
struct bpf_verifier_env *env
intinsn_idx
intprev_insn_idx
boolspeculative
862  cur = current verifier state
866  elem = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
867  If Not elem Then Go to 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  If err Then Go to err
878  speculative |= speculative
879  If umber of states to be processed > BPF_COMPLEXITY_LIMIT_JMP_SEQ Then
880  verbose(env, "The sequence of %d jumps is too complex.\n", umber of states to be processed )
882  Go to err
884  If parent Then
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  Return 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  When Not pop_stack(env, NULL, NULL) cycle
902  Return NULL
Caller
NameDescribe
sanitize_ptr_alu
check_cond_jmp_op