Home
last modified time | relevance | path

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

/Linux-v6.1/tools/bpf/bpftool/
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 (libbpf_get_error(btf_vmlinux)) in get_btf_vmlinux()
38 return btf_vmlinux; in get_btf_vmlinux()
596 if (!libbpf_get_error(btf_vmlinux)) in do_struct_ops()
597 btf__free(btf_vmlinux); in do_struct_ops()
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()
Dmap.c783 static struct btf *btf_vmlinux; variable
790 if (!btf_vmlinux) { in get_map_kv_btf()
791 btf_vmlinux = libbpf_find_kernel_btf(); in get_map_kv_btf()
792 err = libbpf_get_error(btf_vmlinux); in get_map_kv_btf()
798 *btf = btf_vmlinux; in get_map_kv_btf()
813 if (!libbpf_get_error(btf) && btf != btf_vmlinux) in free_map_kv_btf()
819 if (!libbpf_get_error(btf_vmlinux)) in free_btf_vmlinux()
820 btf__free(btf_vmlinux); in free_btf_vmlinux()
/Linux-v6.1/kernel/bpf/
Dbpf_struct_ops.c203 extern struct btf *btf_vmlinux;
210 if (!value_id || !btf_vmlinux) in bpf_struct_ops_find_value()
225 if (!type_id || !btf_vmlinux) in bpf_struct_ops_find()
305 mtype = btf_type_by_id(btf_vmlinux, member->type); in check_zero_holes()
306 mtype = btf_resolve_size(btf_vmlinux, mtype, &msize); in check_zero_holes()
412 ptype = btf_type_resolve_ptr(btf_vmlinux, member->type, NULL); in bpf_struct_ops_map_update_elem()
437 mtype = btf_type_by_id(btf_vmlinux, member->type); in bpf_struct_ops_map_update_elem()
438 mtype = btf_resolve_size(btf_vmlinux, mtype, &msize); in bpf_struct_ops_map_update_elem()
566 btf_type_seq_show(btf_vmlinux, map->btf_vmlinux_value_type_id, in bpf_struct_ops_map_seq_show_elem()
Dverifier.c269 struct btf *btf_vmlinux; variable
2013 return btf_vmlinux ?: ERR_PTR(-ENOENT); in find_kfunc_desc_btf()
2033 if (!btf_vmlinux) { in add_kfunc_call()
4586 if (!btf_vmlinux) { in check_ptr_to_map_access()
4597 t = btf_type_by_id(btf_vmlinux, *map->ops->map_btf_id); in check_ptr_to_map_access()
4598 tname = btf_name_by_offset(btf_vmlinux, t->name_off); in check_ptr_to_map_access()
4618 ret = btf_struct_access(&env->log, btf_vmlinux, t, off, size, atype, &btf_id, &flag); in check_ptr_to_map_access()
4623 mark_btf_ld_reg(env, regs, value_regno, ret, btf_vmlinux, btf_id, flag); in check_ptr_to_map_access()
5820 btf_vmlinux, *arg_btf_id, in check_reg_type()
5824 kernel_type_name(btf_vmlinux, *arg_btf_id)); in check_reg_type()
[all …]
Dbtf.c5057 extern struct btf *btf_vmlinux;
5125 ctx_struct = btf_type_by_id(btf_vmlinux, ctx_type->type); in btf_get_prog_ctx_type()
5129 ctx_tname = btf_name_by_offset(btf_vmlinux, ctx_struct->name_off); in btf_get_prog_ctx_type()
5495 info->btf = btf_vmlinux; in btf_ctx_access()
5512 info->btf = btf_vmlinux; in btf_ctx_access()
6441 reg_btf = btf_vmlinux; in btf_check_func_arg_match()
/Linux-v6.1/net/core/
Dbpf_sk_storage.c389 const struct btf *btf_vmlinux; in bpf_sk_storage_tracing_allowed() local
408 btf_vmlinux = bpf_get_btf_vmlinux(); in bpf_sk_storage_tracing_allowed()
409 if (IS_ERR_OR_NULL(btf_vmlinux)) in bpf_sk_storage_tracing_allowed()
412 t = btf_type_by_id(btf_vmlinux, btf_id); in bpf_sk_storage_tracing_allowed()
413 tname = btf_name_by_offset(btf_vmlinux, t->name_off); in bpf_sk_storage_tracing_allowed()
/Linux-v6.1/net/ipv4/
Dbpf_tcp_ca.c54 extern struct btf *btf_vmlinux;
/Linux-v6.1/tools/lib/bpf/
Dlibbpf.c641 struct btf *btf_vmlinux; member
1148 obj->btf_vmlinux); in bpf_object__init_kern_struct_ops_maps()
2996 if (obj->btf_vmlinux || obj->gen_loader) in bpf_object__load_vmlinux_btf()
3002 obj->btf_vmlinux = btf__load_vmlinux_btf(); in bpf_object__load_vmlinux_btf()
3003 err = libbpf_get_error(obj->btf_vmlinux); in bpf_object__load_vmlinux_btf()
3006 obj->btf_vmlinux = NULL; in bpf_object__load_vmlinux_btf()
5419 btf = btf_get_from_fd(fd, obj->btf_vmlinux); in load_module_btfs()
5479 main_btf = obj->btf_vmlinux_override ?: obj->btf_vmlinux; in bpf_core_find_cands()
5501 btf__type_cnt(obj->btf_vmlinux), in bpf_core_find_cands()
7373 btf = obj->btf_vmlinux; in find_ksym_btf_id()
[all …]