Function report |
Source Code:kernel\bpf\verifier.c |
Create Date:2022-07-28 12:56:04 |
Last Modify:2022-05-19 20:02:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:print_verifier_state
Proto:static void print_verifier_state(struct bpf_verifier_env *env, const struct bpf_func_state *state)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_verifier_env * | env | |
const struct bpf_func_state * | state |
498 | If t == hing was written into register Then Continue |
501 | print_liveness(env, live) |
502 | verbose(env, "=%s", string representation of 'enum bpf_reg_type' [t]) |
503 | If t == g doesn't contain a valid pointer && if (!precise && SCALAR_VALUE) min/max/tnum don't affect safety Then verbose(env, "P") |
505 | If ( t == g doesn't contain a valid pointer || t == g == frame_pointer + offset ) && Returns true if @a is a known constant Then |
508 | verbose(env, "%lld", value + Fixed part of pointer offset, pointer types only ) |
509 | Else |
510 | If t == g points to kernel struct Then verbose(env, "%s", kernel_type_name( for PTR_TO_BTF_ID )) |
515 | If t != g doesn't contain a valid pointer Then verbose(env, ",off=%d", Fixed part of pointer offset, pointer types only ) |
517 | If type_is_pkt_pointer(t) Then verbose(env, ",r=%d", valid when type == PTR_TO_PACKET ) |
519 | Else if t == g points to struct bpf_map || t == g points to map element value || t == points to map elem value or NULL Then verbose(env, ",ks=%d,vs=%d", key_size, value_size) |
525 | If Returns true if @a is a known constant Then |
531 | Else |
532 | If minimum possible (s64)value != minimum possible (u64)value && minimum possible (s64)value != S64_MIN Then verbose(env, ",smin_value=%lld", (longlong) minimum possible (s64)value ) |
536 | If maximum possible (s64)value != maximum possible (u64)value && maximum possible (s64)value != S64_MAX Then verbose(env, ",smax_value=%lld", (longlong) maximum possible (s64)value ) |
540 | If minimum possible (u64)value != 0 Then verbose(env, ",umin_value=%llu", (unsignedlonglong) minimum possible (u64)value ) |
543 | If maximum possible (u64)value != U64_MAX Then verbose(env, ",umax_value=%llu", (unsignedlonglong) maximum possible (u64)value ) |
546 | If Not Returns true if @a is completely unknown Then |
556 | When i < allocated_stack / size of eBPF register in bytes cycle |
558 | bool valid = false |
561 | When j < size of eBPF register in bytes cycle |
562 | If slot_type[j] != nothing was stored in this stack slot Then valid = true |
564 | types_buf[j] = slot_type_char[slot_type[j]] |
567 | types_buf[size of eBPF register in bytes ] = 0 |
568 | If Not valid Then Continue |
570 | verbose(env, " fp%d", ( - i - 1) * size of eBPF register in bytes ) |
571 | print_liveness(env, live) |
572 | If slot_type[0] == register spilled into stack Then |
573 | reg = spilled_ptr |
575 | verbose(env, "=%s", string representation of 'enum bpf_reg_type' [t]) |
576 | If t == g doesn't contain a valid pointer && if (!precise && SCALAR_VALUE) min/max/tnum don't affect safety Then verbose(env, "P") |
578 | If t == g doesn't contain a valid pointer && Returns true if @a is a known constant Then verbose(env, "%lld", value + Fixed part of pointer offset, pointer types only ) |
580 | Else |
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).) |
Name | Describe |
---|---|
__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 |
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 |