Home
last modified time | relevance | path

Searched refs:btf_vmlinux (Results 1 – 8 of 8) sorted by relevance

/Linux-v6.6/tools/bpf/bpftool/
Dcgroup.c40 static struct btf *btf_vmlinux; variable
118 if (btf_vmlinux) { in show_bpf_prog()
123 info.attach_btf_id < btf__type_cnt(btf_vmlinux)) { in show_bpf_prog()
125 btf__type_by_id(btf_vmlinux, info.attach_btf_id); in show_bpf_prog()
127 btf__name_by_offset(btf_vmlinux, t->name_off); in show_bpf_prog()
338 btf_vmlinux = libbpf_find_kernel_btf(); in do_show()
402 btf_vmlinux = libbpf_find_kernel_btf(); in do_show_tree_fn()
Dstruct_ops.c21 static struct btf *btf_vmlinux; variable
31 if (btf_vmlinux) in get_btf_vmlinux()
32 return btf_vmlinux; in get_btf_vmlinux()
34 btf_vmlinux = libbpf_find_kernel_btf(); in get_btf_vmlinux()
35 if (!btf_vmlinux) in get_btf_vmlinux()
38 return btf_vmlinux; in get_btf_vmlinux()
639 btf__free(btf_vmlinux); in do_struct_ops()
Dmap.c788 static struct btf *btf_vmlinux; variable
795 if (!btf_vmlinux) { in get_map_kv_btf()
796 btf_vmlinux = libbpf_find_kernel_btf(); in get_map_kv_btf()
797 if (!btf_vmlinux) { in get_map_kv_btf()
802 *btf = btf_vmlinux; in get_map_kv_btf()
818 if (btf != btf_vmlinux) in free_map_kv_btf()
958 btf__free(btf_vmlinux); in do_dump()
/Linux-v6.6/kernel/bpf/
Dbpf_struct_ops.c212 extern struct btf *btf_vmlinux;
219 if (!value_id || !btf_vmlinux) in bpf_struct_ops_find_value()
234 if (!type_id || !btf_vmlinux) in bpf_struct_ops_find()
322 mtype = btf_type_by_id(btf_vmlinux, member->type); in check_zero_holes()
323 mtype = btf_resolve_size(btf_vmlinux, mtype, &msize); in check_zero_holes()
429 ptype = btf_type_resolve_ptr(btf_vmlinux, member->type, NULL); in bpf_struct_ops_map_update_elem()
454 mtype = btf_type_by_id(btf_vmlinux, member->type); in bpf_struct_ops_map_update_elem()
455 mtype = btf_resolve_size(btf_vmlinux, mtype, &msize); in bpf_struct_ops_map_update_elem()
603 btf_type_seq_show(btf_vmlinux, map->btf_vmlinux_value_type_id, in bpf_struct_ops_map_seq_show_elem()
Dverifier.c336 struct btf *btf_vmlinux; variable
2616 return btf_vmlinux ?: ERR_PTR(-ENOENT); in find_kfunc_desc_btf()
2636 if (!btf_vmlinux) { in add_kfunc_call()
6300 if (!btf_vmlinux) { in check_ptr_to_map_access()
6311 t = btf_type_by_id(btf_vmlinux, *map->ops->map_btf_id); in check_ptr_to_map_access()
6312 tname = btf_name_by_offset(btf_vmlinux, t->name_off); in check_ptr_to_map_access()
6334 mark_btf_ld_reg(env, &map_reg, 0, PTR_TO_BTF_ID, btf_vmlinux, *map->ops->map_btf_id, 0); in check_ptr_to_map_access()
6340 mark_btf_ld_reg(env, regs, value_regno, ret, btf_vmlinux, btf_id, flag); in check_ptr_to_map_access()
7905 btf_vmlinux, *arg_btf_id, in check_reg_type()
7909 btf_type_name(btf_vmlinux, *arg_btf_id)); in check_reg_type()
[all …]
Dbtf.c5579 extern struct btf *btf_vmlinux;
5647 ctx_struct = btf_type_by_id(btf_vmlinux, ctx_type->type); in btf_get_prog_ctx_type()
5652 ctx_tname = btf_name_by_offset(btf_vmlinux, ctx_struct->name_off); in btf_get_prog_ctx_type()
5676 ctx_struct = btf_type_by_id(btf_vmlinux, ctx_struct->type); in btf_get_prog_ctx_type()
5708 kctx_type = btf_type_by_id(btf_vmlinux, kctx_type_id); in get_kern_ctx_btf_id()
6062 info->btf = btf_vmlinux; in btf_ctx_access()
6082 info->btf = btf_vmlinux; in btf_ctx_access()
/Linux-v6.6/net/core/
Dbpf_sk_storage.c354 const struct btf *btf_vmlinux; in bpf_sk_storage_tracing_allowed() local
373 btf_vmlinux = bpf_get_btf_vmlinux(); in bpf_sk_storage_tracing_allowed()
374 if (IS_ERR_OR_NULL(btf_vmlinux)) in bpf_sk_storage_tracing_allowed()
377 t = btf_type_by_id(btf_vmlinux, btf_id); in bpf_sk_storage_tracing_allowed()
378 tname = btf_name_by_offset(btf_vmlinux, t->name_off); in bpf_sk_storage_tracing_allowed()
/Linux-v6.6/tools/lib/bpf/
Dlibbpf.c662 struct btf *btf_vmlinux; member
1132 obj->btf_vmlinux); in bpf_object__init_kern_struct_ops_maps()
3079 if (obj->btf_vmlinux || obj->gen_loader) in bpf_object__load_vmlinux_btf()
3085 obj->btf_vmlinux = btf__load_vmlinux_btf(); in bpf_object__load_vmlinux_btf()
3086 err = libbpf_get_error(obj->btf_vmlinux); in bpf_object__load_vmlinux_btf()
3089 obj->btf_vmlinux = NULL; in bpf_object__load_vmlinux_btf()
5564 btf = btf_get_from_fd(fd, obj->btf_vmlinux); in load_module_btfs()
5624 main_btf = obj->btf_vmlinux_override ?: obj->btf_vmlinux; in bpf_core_find_cands()
5646 btf__type_cnt(obj->btf_vmlinux), in bpf_core_find_cands()
7593 btf = obj->btf_vmlinux; in find_ksym_btf_id()
[all …]