函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:print_verifier_state

函数原型:static void print_verifier_state(struct bpf_verifier_env *env, const struct bpf_func_state *state)

返回类型:void

参数:

类型参数名称
struct bpf_verifier_env *env
const struct bpf_func_state *state
493  如果stack frame number of this function state from pov of* enclosing bpf_verifier_state.* 0 = main function, 1 = first callee.verbose(env, " frame%d:", stack frame number of this function state from pov of* enclosing bpf_verifier_state.* 0 = main function, 1 = first callee.)
495 i小于BPF has 10 general purpose 64-bit registers and stack frame. 循环
496  reg等于regs[i]
497  t等于 Ordering of fields matters. See states_equal()
498  如果t恒等于hing was written into register 则继续下一循环
500  verbose(env, " R%d", i)
501  print_liveness(env, live)
502  verbose(env, "=%s", string representation of 'enum bpf_reg_type' [t])
503  如果t恒等于g doesn't contain a valid pointer if (!precise && SCALAR_VALUE) min/max/tnum don't affect safety verbose(env, "P")
509  否则
530  verbose(env, ",imm=%llx", value)
531  否则
553  verbose(env, ")")
556 i小于allocated_stacksize of eBPF register in bytes 循环
558  bool valid = false
567  types_buf[size of eBPF register in bytes ]等于0
568  如果非valid则继续下一循环
570  verbose(env, " fp%d", ( - i - 1) * size of eBPF register in bytes )
571  print_liveness(env, live)
572  如果slot_type[0]恒等于 register spilled into stack
573  reg等于spilled_ptr
580  否则
581  verbose(env, "=%s", types_buf)
584  如果The following fields should be last. See copy_func_state() Track each reference created with a unique id, even if the same * instruction creates the reference multiple times (eg, via CALL).
585  verbose(env, " refs=%d", Track each reference created with a unique id, even if the same * instruction creates the reference multiple times (eg, via CALL).)
586 i小于The following fields should be last. See copy_func_state() 循环如果 Track each reference created with a unique id, even if the same * instruction creates the reference multiple times (eg, via CALL).
588  verbose(env, ",%d", Track each reference created with a unique id, even if the same * instruction creates the reference multiple times (eg, via CALL).)
590  verbose(env, "\n")
调用者
名称描述
__mark_chain_precision
check_map_accessheck read/write into a map element with possible variable offset
check_func_call
prepare_func_exit
adjust_reg_min_max_valsHandles ALU ops other than BPF_END, BPF_NEG and BPF_MOV: computes new min/max* and var_off.
check_cond_jmp_op
do_check