Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:copy_verifier_state

Proto:static int copy_verifier_state(struct bpf_verifier_state *dst_state, const struct bpf_verifier_state *src)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_state *dst_state
const struct bpf_verifier_state *src
775  jmp_sz = sizeof(structbpf_idx_pair) * jmp_history_cnt
778  If jmp_history_cnt < jmp_history_cnt Then
779  kfree( jmp history recorded from first to last. * backtracking is using it to go from last to first. * For most states jmp_history_cnt is [0-3]. * For loops can go up to ~40.)
780  jmp history recorded from first to last. * backtracking is using it to go from last to first. * For most states jmp_history_cnt is [0-3]. * For loops can go up to ~40. = Allocation memory
781  If Not jmp history recorded from first to last. * backtracking is using it to go from last to first. * For most states jmp_history_cnt is [0-3]. * For loops can go up to ~40. Then Return -ENOMEM
784  No 3D Now!( jmp history recorded from first to last. * backtracking is using it to go from last to first. * For most states jmp_history_cnt is [0-3]. * For loops can go up to ~40., jmp history recorded from first to last. * backtracking is using it to go from last to first. * For most states jmp_history_cnt is [0-3]. * For loops can go up to ~40., jmp_sz)
785  jmp_history_cnt = jmp_history_cnt
788  When i <= curframe cycle
789  free_func_state( call stack tracking [i])
790  call stack tracking [i] = NULL
792  speculative = speculative
793  curframe = curframe
794  active_spin_lock = active_spin_lock
795  * '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 = * '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
796  parent = parent
797  first and last insn idx of this verifier state = first and last insn idx of this verifier state
798  last_insn_idx = last_insn_idx
799  When i <= curframe cycle
800  dst = call stack tracking [i]
801  If Not dst Then
803  If Not dst Then Return -ENOMEM
807  err = py verifier state from src to dst growing dst stack space* when necessary to accommodate larger src stack
808  If err Then Return err
811  Return 0
Caller
NameDescribe
pop_stack
push_stack
is_state_visited