Function report |
Source Code:kernel\bpf\btf.c |
Create Date:2022-07-28 13:19:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:btf_enum_check_meta
Proto:static s32 btf_enum_check_meta(struct btf_verifier_env *env, const struct btf_type *t, u32 meta_left)
Type:s32
Parameter:
Type | Parameter | Name |
---|---|---|
struct btf_verifier_env * | env | |
const struct btf_type * | t | |
u32 | meta_left |
2434 | enums = btf_type_enum(t) |
2439 | nr_enums = btf_type_vlen(t) |
2440 | meta_needed = nr_enums * size of enums |
2442 | If meta_left < meta_needed Then |
2443 | btf_verifier_log_basic(env, t, "meta_left:%u meta_needed:%u", meta_left, meta_needed) |
2446 | Return -EINVAL |
2449 | If btf_type_kflag(t) Then |
2450 | btf_verifier_log_type(env, t, "Invalid btf_info kind_flag") |
2451 | Return -EINVAL |
2455 | btf_verifier_log_type(env, t, "Unexpected size") |
2456 | Return -EINVAL |
2460 | If name_off && Not Only C-style identifier is permitted. This can be relaxed if* necessary. Then |
2462 | btf_verifier_log_type(env, t, "Invalid name") |
2463 | Return -EINVAL |
2466 | btf_verifier_log_type(env, t, NULL) |
2469 | If Not btf_name_offset_valid(btf, name_off) Then |
2470 | btf_verifier_log(env, "\tInvalid name_offset:%u", name_off) |
2472 | Return -EINVAL |
2476 | If Not name_off || Not Only C-style identifier is permitted. This can be relaxed if* necessary. Then |
2478 | btf_verifier_log_type(env, t, "Invalid name") |
2479 | Return -EINVAL |
2482 | If level == kernel internal flag Then Continue |
2484 | btf_verifier_log(env, "\t%s val=%d\n", __btf_name_by_offset(btf, name_off), val) |
2489 | Return meta_needed |
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 |