Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 12:59:37 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:check_func_call
Proto:static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_verifier_env * | env | |
struct bpf_insn * | insn | |
int * | insn_idx |
3951 | state = current verifier state |
3955 | If curframe + 1 >= MAX_CALL_FRAMES Then |
3961 | target_insn = insn_idx + signed immediate constant |
3962 | subprog = find_subprog(env, target_insn + 1) |
3963 | If subprog < 0 Then |
3964 | verbose(env, "verifier bug. No program starts at insn %d\n", target_insn + 1) |
3966 | Return -EFAULT |
3969 | caller = call stack tracking [curframe] |
3970 | If call stack tracking [curframe + 1] Then |
3976 | callee = 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). |
3979 | call stack tracking [curframe + 1] = callee |
3992 | err = transfer_reference_state(callee, caller) |
4003 | When i < CALLER_SAVED_REGS cycle |
4004 | mark_reg_not_init(env, regs, caller_saved[i]) |
4005 | check_reg_arg(env, caller_saved[i], DST_OP_NO_MARK) |
4009 | curframe++ |
4011 | If btf_check_func_arg_match(env, subprog) Then Return -EINVAL |
4015 | insn_idx = target_insn |
4017 | If level & BPF_LOG_LEVEL Then |
4019 | print_verifier_state(env, caller) |
4021 | print_verifier_state(env, callee) |
4023 | Return 0 |
Name | Describe |
---|---|
do_check |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |