Home
last modified time | relevance | path

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

/tools/lib/bpf/
Dlibbpf_probes.c157 int btf_fd, btf_len; in libbpf__load_raw_btf() local
169 btf_fd = bpf_load_btf(raw_btf, btf_len, NULL, 0, false); in libbpf__load_raw_btf()
172 return btf_fd; in libbpf__load_raw_btf()
207 int fd = -1, btf_fd = -1, fd_inner; in bpf_probe_map_type() local
241 btf_fd = load_local_storage_btf(); in bpf_probe_map_type()
242 if (btf_fd < 0) in bpf_probe_map_type()
297 if (btf_fd >= 0) { in bpf_probe_map_type()
298 attr.btf_fd = btf_fd; in bpf_probe_map_type()
307 if (btf_fd >= 0) in bpf_probe_map_type()
308 close(btf_fd); in bpf_probe_map_type()
Dgen_loader.c31 __u32 btf_fd; member
315 emit_sys_close_stack(gen, stack_off(btf_fd)); in bpf_gen__finish()
380 emit(gen, BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_7, stack_off(btf_fd))); in bpf_gen__load_btf()
428 move_stack2blob(gen, attr_field(map_create_attr, btf_fd), 4, in bpf_gen__map_create()
429 stack_off(btf_fd)); in bpf_gen__map_create()
648 stack_off(btf_fd)); in bpf_gen__prog_load()
Dbpf.h45 __u32 btf_fd; member
Dlibbpf_internal.h287 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf);
Dbtf.c1350 struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf) in btf_get_from_fd() argument
1371 err = bpf_obj_get_info_by_fd(btf_fd, &btf_info, &len); in btf_get_from_fd()
1389 err = bpf_obj_get_info_by_fd(btf_fd, &btf_info, &len); in btf_get_from_fd()
1407 int btf_fd; in btf__load_from_kernel_by_id_split() local
1409 btf_fd = bpf_btf_get_fd_by_id(id); in btf__load_from_kernel_by_id_split()
1410 if (btf_fd < 0) in btf__load_from_kernel_by_id_split()
1413 btf = btf_get_from_fd(btf_fd, base_btf); in btf__load_from_kernel_by_id_split()
1414 close(btf_fd); in btf__load_from_kernel_by_id_split()
Dbpf.c96 attr.btf_fd = create_attr->btf_fd; in bpf_create_map_xattr()
Dlibbpf.c4609 create_attr.btf_fd = 0; in bpf_object__create_map()
4613 create_attr.btf_fd = btf__fd(obj->btf); in bpf_object__create_map()
4649 create_attr.btf_fd = 0; in bpf_object__create_map()
6099 int btf_fd, ret; in load_program() local
6136 btf_fd = bpf_object__btf_fd(prog->obj); in load_program()
6137 if (btf_fd >= 0 && kernel_supports(prog->obj, FEAT_BTF_FUNC)) { in load_program()
6138 load_attr.prog_btf_fd = btf_fd; in load_program()
6650 int i, id, btf_fd, err; in find_ksym_btf_id() local
6654 btf_fd = 0; in find_ksym_btf_id()
6665 btf_fd = obj->btf_modules[i].fd; in find_ksym_btf_id()
[all …]
/tools/testing/selftests/bpf/map_tests/
Dsk_storage_map.c31 .btf_fd = -1,
148 int btf_fd, map_fd; in create_sk_storage_map() local
150 btf_fd = load_btf(); in create_sk_storage_map()
151 CHECK(btf_fd == -1, "bpf_load_btf", "btf_fd:%d errno:%d\n", in create_sk_storage_map()
152 btf_fd, errno); in create_sk_storage_map()
153 xattr.btf_fd = btf_fd; in create_sk_storage_map()
156 xattr.btf_fd = -1; in create_sk_storage_map()
157 close(btf_fd); in create_sk_storage_map()
467 int btf_fd, map_fd, sk_fd, err; in test_sk_storage_map_basic() local
469 btf_fd = load_btf(); in test_sk_storage_map_basic()
[all …]
/tools/testing/selftests/bpf/prog_tests/
Dsyscall.c12 int btf_fd; member
53 if (ctx.btf_fd > 0) in test_syscall()
54 close(ctx.btf_fd); in test_syscall()
Dbtf.c3812 int map_fd = -1, btf_fd = -1; in do_test_raw() local
3837 btf_fd = bpf_load_btf(raw_btf, raw_btf_size, in do_test_raw()
3842 err = ((btf_fd < 0) != test->btf_load_err); in do_test_raw()
3844 btf_fd, test->btf_load_err) || in do_test_raw()
3851 if (err || btf_fd < 0) in do_test_raw()
3859 create_attr.btf_fd = btf_fd; in do_test_raw()
3872 if (btf_fd >= 0) in do_test_raw()
3873 close(btf_fd); in do_test_raw()
3949 int btf_fd = -1, err; in test_big_btf_info() local
3969 btf_fd = bpf_load_btf(raw_btf, raw_btf_size, in test_big_btf_info()
[all …]
/tools/testing/selftests/bpf/progs/
Dsyscall.c18 int btf_fd; member
93 ctx->btf_fd = ret; in bpf_prog()
95 map_create_attr.btf_fd = ret; in bpf_prog()
/tools/testing/selftests/bpf/
Dtest_verifier.c635 int btf_fd; in load_btf() local
647 btf_fd = bpf_load_btf(raw_btf, ptr - raw_btf, 0, 0, 0); in load_btf()
649 if (btf_fd < 0) in load_btf()
651 return btf_fd; in load_btf()
665 int fd, btf_fd; in create_map_spin_lock() local
667 btf_fd = load_btf(); in create_map_spin_lock()
668 if (btf_fd < 0) in create_map_spin_lock()
670 attr.btf_fd = btf_fd; in create_map_spin_lock()
689 int fd, btf_fd; in create_sk_storage_map() local
691 btf_fd = load_btf(); in create_sk_storage_map()
[all …]
/tools/include/uapi/linux/
Dbpf.h1270 __u32 btf_fd; /* fd pointing to a BTF type data */ member