函数逻辑报告 |
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 |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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 |
498 | 如果t恒等于hing was written into register 则继续下一循环 |
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") |
508 | verbose(env, "%lld", value + Fixed part of pointer offset, pointer types only ) |
509 | 否则 |
510 | 如果t恒等于g points to kernel struct 则verbose(env, "%s", kernel_type_name( for PTR_TO_BTF_ID )) |
515 | 如果t不等于g doesn't contain a valid pointer 则verbose(env, ",off=%d", Fixed part of pointer offset, pointer types only ) |
517 | 如果type_is_pkt_pointer(t)则verbose(env, ",r=%d", valid when type == PTR_TO_PACKET ) |
519 | 否则如果t恒等于g points to struct bpf_map 或t恒等于g points to map element value 或t恒等于points to map elem value or NULL 则verbose(env, ",ks=%d,vs=%d", key_size, value_size) |
531 | 否则 |
532 | 如果 minimum possible (s64)value 不等于 minimum possible (u64)value 且 minimum possible (s64)value 不等于S64_MIN则verbose(env, ",smin_value=%lld", (longlong) minimum possible (s64)value ) |
536 | 如果 maximum possible (s64)value 不等于 maximum possible (u64)value 且 maximum possible (s64)value 不等于S64_MAX则verbose(env, ",smax_value=%lld", (longlong) maximum possible (s64)value ) |
540 | 如果 minimum possible (u64)value 不等于0则verbose(env, ",umin_value=%llu", (unsignedlonglong) minimum possible (u64)value ) |
543 | 如果 maximum possible (u64)value 不等于U64_MAX则verbose(env, ",umax_value=%llu", (unsignedlonglong) maximum possible (u64)value ) |
558 | bool valid = false |
562 | 如果slot_type[j]不等于 nothing was stored in this stack slot 则valid = true |
564 | types_buf[j]等于slot_type_char[slot_type[j]] |
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 |
575 | verbose(env, "=%s", string representation of 'enum bpf_reg_type' [t]) |
580 | 否则 |
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).) |
名称 | 描述 |
---|---|
__mark_chain_precision | |
check_map_access | heck read/write into a map element with possible variable offset |
check_func_call | |
prepare_func_exit | |
adjust_reg_min_max_vals | Handles ALU ops other than BPF_END, BPF_NEG and BPF_MOV: computes new min/max* and var_off. |
check_cond_jmp_op | |
do_check |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |