Home
last modified time | relevance | path

Searched refs:btf_id (Results 1 – 25 of 36) sorted by relevance

12

/OK3568_Linux_fs/kernel/tools/bpf/bpftool/
H A Dbtf.c47 __u32 btf_id; member
431 __u32 btf_id = -1; in do_dump() local
455 btf_id = info.btf_id; in do_dump()
491 btf_id = info.btf_id; in do_dump()
495 btf_id = strtoul(*argv, &endptr, 0); in do_dump()
544 err = btf__get_from_id(btf_id, &btf); in do_dump()
546 p_err("get btf by id (%u): %s", btf_id, strerror(err)); in do_dump()
551 p_err("can't find btf with ID (%u)", btf_id); in do_dump()
623 __u32 btf_id, id = 0; in build_btf_type_table() local
683 btf_id = ((struct bpf_prog_info *)info)->btf_id; in build_btf_type_table()
[all …]
H A Dmap.c534 if (info->btf_id) in show_map_close_json()
535 jsonw_int_field(json_wtr, "btf_id", info->btf_id); in show_map_close_json()
627 if (!info->btf_id && !frozen) in show_map_close_plain()
632 if (info->btf_id) in show_map_close_plain()
633 printf("btf_id %d", info->btf_id); in show_map_close_plain()
636 printf("%sfrozen", info->btf_id ? " " : ""); in show_map_close_plain()
786 if (!info.btf_id) in maps_have_btf()
809 err = btf__get_from_id(info->btf_id, &btf); in get_map_kv_btf()
1044 err = btf__get_from_id(info->btf_id, &btf); in print_key_value()
H A Dprog.c262 err = btf__get_from_id(map_info.btf_id, &btf); in show_prog_metadata()
411 if (info->btf_id) in print_prog_json()
412 jsonw_int_field(json_wtr, "btf_id", info->btf_id); in print_prog_json()
493 if (info->btf_id) in print_prog_plain()
494 printf("\n\tbtf_id %d", info->btf_id); in print_prog_plain()
643 if (info->btf_id && btf__get_from_id(info->btf_id, &btf)) { in prog_dump()
1879 if (info_linear->info.btf_id == 0 || in profile_target_name()
1880 btf__get_from_id(info_linear->info.btf_id, &btf)) { in profile_target_name()
1889 info_linear->info.btf_id, func_info[0].type_id); in profile_target_name()
H A Dbtf_dumper.c67 if (!info->btf_id || !info->nr_func_info || in dump_prog_id_as_func_ptr()
68 btf__get_from_id(info->btf_id, &prog_btf)) in dump_prog_id_as_func_ptr()
/OK3568_Linux_fs/kernel/tools/bpf/resolve_btfids/
H A Dmain.c78 struct btf_id { struct
148 static struct btf_id *btf_id__find(struct rb_root *root, const char *name) in btf_id__find()
151 struct btf_id *id; in btf_id__find()
155 id = rb_entry(p, struct btf_id, rb_node); in btf_id__find()
167 static struct btf_id*
172 struct btf_id *id; in btf_id__add()
177 id = rb_entry(parent, struct btf_id, rb_node); in btf_id__add()
230 static struct btf_id *add_set(struct object *obj, char *name) in add_set()
248 static struct btf_id *add_symbol(struct rb_root *root, char *name, size_t size) in add_symbol()
405 struct btf_id *id; in symbols_collect()
[all …]
/OK3568_Linux_fs/kernel/tools/perf/util/
H A Dbpf-event.c95 u32 btf_id, in perf_env__fetch_btf() argument
108 node->id = btf_id; in perf_env__fetch_btf()
216 if (info->btf_id && info->nr_func_info && info->func_info_rec_size) { in perf_event__synthesize_one_bpf_prog()
223 if (btf__get_from_id(info->btf_id, &btf)) { in perf_event__synthesize_one_bpf_prog()
224 pr_debug("%s: failed to get BTF of id %u, aborting\n", __func__, info->btf_id); in perf_event__synthesize_one_bpf_prog()
229 perf_env__fetch_btf(env, info->btf_id, btf); in perf_event__synthesize_one_bpf_prog()
445 u32 btf_id; in perf_env__add_bpf_info() local
466 btf_id = info_linear->info.btf_id; in perf_env__add_bpf_info()
475 if (btf_id == 0) in perf_env__add_bpf_info()
478 if (btf__get_from_id(btf_id, &btf)) { in perf_env__add_bpf_info()
[all …]
H A Denv.c77 __u32 btf_id = btf_node->id; in perf_env__insert_btf() local
88 if (btf_id < node->id) { in perf_env__insert_btf()
90 } else if (btf_id > node->id) { in perf_env__insert_btf()
93 pr_debug("duplicated btf %u\n", btf_id); in perf_env__insert_btf()
107 struct btf_node *perf_env__find_btf(struct perf_env *env, __u32 btf_id) in perf_env__find_btf() argument
117 if (btf_id < node->id) in perf_env__find_btf()
119 else if (btf_id > node->id) in perf_env__find_btf()
H A Denv.h147 struct btf_node *perf_env__find_btf(struct perf_env *env, __u32 btf_id);
/OK3568_Linux_fs/kernel/include/linux/
H A Dbpf_verifier.h56 u32 btf_id; /* for PTR_TO_BTF_ID */ member
344 u32 btf_id; /* btf_id for struct typed var */ member
507 u32 btf_id) in bpf_trampoline_compute_key() argument
509 return tgt_prog ? (((u64)tgt_prog->aux->id) << 32 | btf_id) : btf_id; in bpf_trampoline_compute_key()
515 u32 btf_id,
H A Dbtf.h91 u32 btf_id(const struct btf *btf);
/OK3568_Linux_fs/kernel/kernel/bpf/preload/iterators/
H A Diterators.bpf.c60 static const char *get_name(struct btf *btf, long btf_id, const char *fallback) in get_name() argument
70 bpf_probe_read_kernel(&t, sizeof(t), types + btf_id); in get_name()
/OK3568_Linux_fs/kernel/kernel/bpf/
H A Dbpf_iter.c12 u32 btf_id; /* cached value */ member
312 tinfo->btf_id = prog->aux->attach_btf_id; in cache_btf_id()
329 if (tinfo->btf_id && tinfo->btf_id == prog_btf_id) { in bpf_iter_prog_supported()
496 if (tinfo->btf_id == prog_btf_id) { in bpf_iter_link_attach()
H A Dtask_iter.c352 task_reg_info.ctx_arg_info[0].btf_id = btf_task_file_ids[0]; in task_iter_init()
357 task_file_reg_info.ctx_arg_info[0].btf_id = btf_task_file_ids[0]; in task_iter_init()
358 task_file_reg_info.ctx_arg_info[1].btf_id = btf_task_file_ids[1]; in task_iter_init()
H A Dbtf.c4304 int i, btf_id; in btf_vmlinux_map_ids_init() local
4314 btf_id = btf_find_by_name_kind(btf, ops->map_btf_name, in btf_vmlinux_map_ids_init()
4316 if (btf_id < 0) in btf_vmlinux_map_ids_init()
4317 return btf_id; in btf_vmlinux_map_ids_init()
4318 *ops->map_btf_id = btf_id; in btf_vmlinux_map_ids_init()
4552 info->btf_id = ctx_arg_info->btf_id; in btf_ctx_access()
4568 info->btf_id = ret; in btf_ctx_access()
4575 info->btf_id = t->type; in btf_ctx_access()
4579 info->btf_id = t->type; in btf_ctx_access()
4589 tname, arg, info->btf_id, btf_kind_str[BTF_INFO_KIND(t->info)], in btf_ctx_access()
[all …]
H A Dverifier.c241 u32 btf_id; member
592 verbose(env, "%s", kernel_type_name(reg->btf_id)); in print_verifier_state()
1387 enum bpf_reg_type reg_type, u32 btf_id) in mark_btf_ld_reg() argument
1395 regs[regno].btf_id = btf_id; in mark_btf_ld_reg()
3006 u32 *btf_id) in check_ctx_access() argument
3025 *btf_id = info.btf_id; in check_ctx_access()
3551 const struct btf_type *t = btf_type_by_id(btf_vmlinux, reg->btf_id); in check_ptr_to_btf_access()
3553 u32 btf_id; in check_ptr_to_btf_access() local
3574 atype, &btf_id); in check_ptr_to_btf_access()
3582 &btf_id); in check_ptr_to_btf_access()
[all …]
H A Dprog_iter.c103 bpf_prog_reg_info.ctx_arg_info[0].btf_id = *btf_bpf_prog_id; in bpf_prog_iter_init()
H A Dsyscall.c1991 u32 btf_id, u32 prog_fd) in bpf_prog_load_check_attach() argument
1993 if (btf_id) { in bpf_prog_load_check_attach()
1994 if (btf_id > BTF_MAX_TYPE) in bpf_prog_load_check_attach()
2583 u32 btf_id) in bpf_tracing_prog_attach() argument
2618 if (!!tgt_prog_fd != !!btf_id) { in bpf_tracing_prog_attach()
2637 key = bpf_trampoline_compute_key(tgt_prog, btf_id); in bpf_tracing_prog_attach()
2682 err = bpf_check_attach_target(NULL, prog, tgt_prog, btf_id, in bpf_tracing_prog_attach()
3616 info.btf_id = btf_id(prog->aux->btf); in bpf_prog_get_info_by_fd()
3719 info.btf_id = btf_id(map->btf); in bpf_map_get_info_by_fd()
3838 #define BPF_BTF_GET_FD_BY_ID_LAST_FIELD btf_id
[all …]
H A Dmap_iter.c187 bpf_map_reg_info.ctx_arg_info[0].btf_id = *btf_bpf_map_id; in bpf_map_iter_init()
/OK3568_Linux_fs/kernel/kernel/trace/
H A Dbpf_trace.c76 s32 *btf_id);
782 s32 btf_id; in BPF_CALL_4() local
785 ret = bpf_btf_printf_prepare(ptr, btf_ptr_size, flags, &btf, &btf_id); in BPF_CALL_4()
789 return btf_type_seq_show_flags(btf, btf_id, ptr->ptr, m, flags); in BPF_CALL_4()
1183 s32 *btf_id) in bpf_btf_printf_prepare() argument
1199 *btf_id = ptr->type_id; in bpf_btf_printf_prepare()
1203 if (*btf_id > 0) in bpf_btf_printf_prepare()
1204 t = btf_type_by_id(*btf, *btf_id); in bpf_btf_printf_prepare()
1205 if (*btf_id <= 0 || !t) in bpf_btf_printf_prepare()
1215 s32 btf_id; in BPF_CALL_5() local
[all …]
/OK3568_Linux_fs/kernel/net/ipv4/
H A Dbpf_tcp_ca.c90 if (info->reg_type == PTR_TO_BTF_ID && info->btf_id == sock_id) in bpf_tcp_ca_is_valid_access()
92 info->btf_id = tcp_sock_id; in bpf_tcp_ca_is_valid_access()
/OK3568_Linux_fs/kernel/tools/lib/bpf/
H A Dlibbpf.c378 int btf_id; member
3126 ext->btf_id = find_extern_btf_id(obj->btf, ext_name); in bpf_object__collect_externs()
3127 if (ext->btf_id <= 0) { in bpf_object__collect_externs()
3129 ext_name, ext->btf_id); in bpf_object__collect_externs()
3130 return ext->btf_id; in bpf_object__collect_externs()
3132 t = btf__type_by_id(obj->btf, ext->btf_id); in bpf_object__collect_externs()
3137 ext->sec_btf_id = find_extern_sec_btf_id(obj->btf, ext->btf_id); in bpf_object__collect_externs()
3140 ext_name, ext->btf_id, ext->sec_btf_id); in bpf_object__collect_externs()
6820 int err = 0, fd, i, btf_id; in bpf_program__load() local
6830 btf_id = libbpf_find_attach_btf_id(prog); in bpf_program__load()
[all …]
/OK3568_Linux_fs/kernel/tools/include/uapi/linux/
H A Dbpf.h607 __u32 btf_id; member
4385 __u32 btf_id; member
4413 __u32 btf_id; member
/OK3568_Linux_fs/kernel/include/uapi/linux/
H A Dbpf.h607 __u32 btf_id; member
4385 __u32 btf_id; member
4413 __u32 btf_id; member
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/arm/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/include/linux/
H A Dbpf.h369 __u32 btf_id; member
2666 __u32 btf_id; member
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/usr/include/linux/
H A Dbpf.h369 __u32 btf_id; member
2666 __u32 btf_id; member

12