Home
last modified time | relevance | path

Searched refs:btf_fd (Results 1 – 19 of 19) sorted by relevance

/linux-6.3-rc2/tools/lib/bpf/
A Dlibbpf_probes.c229 int btf_fd, btf_len; in libbpf__load_raw_btf() local
241 btf_fd = bpf_btf_load(raw_btf, btf_len, NULL); in libbpf__load_raw_btf()
244 return btf_fd; in libbpf__load_raw_btf()
279 int fd = -1, btf_fd = -1, fd_inner = -1, exp_err = 0, err = 0; in probe_map_create() local
313 btf_fd = load_local_storage_btf(); in probe_map_create()
314 if (btf_fd < 0) in probe_map_create()
315 return btf_fd; in probe_map_create()
366 if (btf_fd >= 0) { in probe_map_create()
367 opts.btf_fd = btf_fd; in probe_map_create()
380 if (btf_fd >= 0) in probe_map_create()
[all …]
A Dbpf.h43 __u32 btf_fd; member
396 LIBBPF_API int bpf_btf_get_info_by_fd(int btf_fd, struct bpf_btf_info *info, __u32 *info_len);
A Dgen_loader.c35 __u32 btf_fd; member
380 emit_sys_close_stack(gen, stack_off(btf_fd)); in bpf_gen__finish()
445 emit(gen, BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_7, stack_off(btf_fd))); in bpf_gen__load_btf()
479 move_stack2blob(gen, attr_field(map_create_attr, btf_fd), 4, in bpf_gen__map_create()
480 stack_off(btf_fd)); in bpf_gen__map_create()
1002 stack_off(btf_fd)); in bpf_gen__prog_load()
A Dbpf.c190 attr.btf_fd = OPTS_GET(opts, btf_fd, 0); in bpf_map_create()
1057 int bpf_btf_get_info_by_fd(int btf_fd, struct bpf_btf_info *info, __u32 *info_len) in bpf_btf_get_info_by_fd() argument
1059 return bpf_obj_get_info_by_fd(btf_fd, info, info_len); in bpf_btf_get_info_by_fd()
A Dbtf.c1344 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf) in btf_get_from_fd() argument
1365 err = bpf_btf_get_info_by_fd(btf_fd, &btf_info, &len); in btf_get_from_fd()
1383 err = bpf_btf_get_info_by_fd(btf_fd, &btf_info, &len); in btf_get_from_fd()
1401 int btf_fd; in btf__load_from_kernel_by_id_split() local
1403 btf_fd = bpf_btf_get_fd_by_id(id); in btf__load_from_kernel_by_id_split()
1404 if (btf_fd < 0) in btf__load_from_kernel_by_id_split()
1407 btf = btf_get_from_fd(btf_fd, base_btf); in btf__load_from_kernel_by_id_split()
1408 close(btf_fd); in btf__load_from_kernel_by_id_split()
A Dlibbpf_internal.h370 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf);
A Dlibbpf.c5008 create_attr.btf_fd = btf__fd(obj->btf); in bpf_object__create_map()
5041 create_attr.btf_fd = 0; in bpf_object__create_map()
5071 create_attr.btf_fd = 0; in bpf_object__create_map()
6745 int btf_fd, ret, err; in bpf_object_load_prog() local
6772 btf_fd = bpf_object__btf_fd(obj); in bpf_object_load_prog()
6773 if (btf_fd >= 0 && kernel_supports(obj, FEAT_BTF_FUNC)) { in bpf_object_load_prog()
6774 load_attr.prog_btf_fd = btf_fd; in bpf_object_load_prog()
/linux-6.3-rc2/tools/testing/selftests/bpf/map_tests/
A Dsk_storage_map.c26 .btf_fd = -1,
144 int btf_fd, map_fd; in create_sk_storage_map() local
146 btf_fd = load_btf(); in create_sk_storage_map()
148 btf_fd, errno); in create_sk_storage_map()
149 map_opts.btf_fd = btf_fd; in create_sk_storage_map()
152 map_opts.btf_fd = -1; in create_sk_storage_map()
153 close(btf_fd); in create_sk_storage_map()
465 btf_fd = load_btf(); in test_sk_storage_map_basic()
467 btf_fd, errno); in test_sk_storage_map_basic()
468 map_opts.btf_fd = btf_fd; in test_sk_storage_map_basic()
[all …]
/linux-6.3-rc2/tools/testing/selftests/bpf/
A Dtest_verifier.c757 int btf_fd; in load_btf_spec() local
777 if (btf_fd < 0) in load_btf_spec()
782 return btf_fd < 0 ? -1 : btf_fd; in load_btf_spec()
811 int fd, btf_fd; in create_map_spin_lock() local
814 if (btf_fd < 0) in create_map_spin_lock()
816 opts.btf_fd = btf_fd; in create_map_spin_lock()
835 opts.btf_fd = btf_fd; in create_sk_storage_map()
855 opts.btf_fd = btf_fd; in create_map_timer()
874 opts.btf_fd = btf_fd; in create_map_kptr()
1461 btf_fd = -1; in do_test_single()
[all …]
/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/
A Dsyscall.c12 int btf_fd; member
53 if (ctx.btf_fd > 0) in test_syscall()
54 close(ctx.btf_fd); in test_syscall()
A Dbtf.c4263 int btf_fd; in load_raw_btf() local
4279 return btf_fd; in load_raw_btf()
4326 opts.btf_fd = btf_fd; in do_test_raw()
4340 close(btf_fd); in do_test_raw()
4484 close(btf_fd); in test_big_btf_info()
4555 opts.btf_fd = btf_fd[0]; in test_btf_id()
4588 btf_fd[0] = -1; in test_btf_id()
4700 close(btf_fd); in do_test_get_info()
5383 opts.btf_fd = btf_fd; in do_test_pprint()
5524 close(btf_fd); in do_test_pprint()
[all …]
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/
A Dsyscall.c18 int btf_fd; member
93 ctx->btf_fd = ret; in bpf_prog()
95 map_create_attr.btf_fd = ret; in bpf_prog()
/linux-6.3-rc2/tools/bpf/bpftool/
A Dbtf.c527 int btf_fd; in btf_is_kernel_module() local
531 btf_fd = bpf_btf_get_fd_by_id(btf_id); in btf_is_kernel_module()
532 if (btf_fd < 0) { in btf_is_kernel_module()
540 err = bpf_btf_get_info_by_fd(btf_fd, &btf_info, &len); in btf_is_kernel_module()
541 close(btf_fd); in btf_is_kernel_module()
/linux-6.3-rc2/tools/testing/selftests/bpf/benchs/
A Dbench_local_storage.c137 create_opts.btf_fd = bpf_object__btf_fd(ctx.skel->obj); in __setup()
/linux-6.3-rc2/Documentation/bpf/
A Dbtf.rst588 BPF_BTF_GET_FD_BY_ID (get btf_fd) |
601 :ref:`BTF_Type_String`, can be directly loaded into the kernel. A ``btf_fd``
607 A map can be created with ``btf_fd`` and specified key/value type id.::
609 __u32 btf_fd; /* fd pointing to a BTF type data */
/linux-6.3-rc2/include/uapi/linux/
A Dbpf.h1328 __u32 btf_fd; /* fd pointing to a BTF type data */ member
/linux-6.3-rc2/tools/include/uapi/linux/
A Dbpf.h1328 __u32 btf_fd; /* fd pointing to a BTF type data */ member
/linux-6.3-rc2/kernel/bpf/
A Dverifier.c2177 int btf_fd; in __find_kfunc_desc_btf() local
2193 if (copy_from_bpfptr_offset(&btf_fd, env->fd_array, in __find_kfunc_desc_btf()
2194 offset * sizeof(btf_fd), in __find_kfunc_desc_btf()
2195 sizeof(btf_fd))) in __find_kfunc_desc_btf()
2198 btf = btf_get_by_fd(btf_fd); in __find_kfunc_desc_btf()
14908 int i, btf_fd, err; in check_pseudo_btf_id() local
14910 btf_fd = insn[1].imm; in check_pseudo_btf_id()
14911 if (btf_fd) { in check_pseudo_btf_id()
14912 btf = btf_get_by_fd(btf_fd); in check_pseudo_btf_id()
A Dsyscall.c1162 btf = btf_get_by_fd(attr->btf_fd); in map_create()

Completed in 132 milliseconds