/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/ |
A D | perf_link.c | 31 int pfd = -1, link_fd = -1, err; in serial_test_perf_link() local 51 link_fd = bpf_link_create(bpf_program__fd(skel->progs.handler), pfd, in serial_test_perf_link() 53 if (!ASSERT_GE(link_fd, 0, "link_fd")) in serial_test_perf_link() 57 err = bpf_link_get_info_by_fd(link_fd, &info, &info_len); in serial_test_perf_link() 72 close(link_fd); in serial_test_perf_link() 73 link_fd = -1; in serial_test_perf_link() 85 if (link_fd >= 0) in serial_test_perf_link() 86 close(link_fd); in serial_test_perf_link()
|
A D | fexit_stress.c | 8 int *fd, *fexit_fd, *link_fd; in serial_test_fexit_stress() local 17 link_fd = fd + bpf_max_tramp_links; in serial_test_fexit_stress() 43 link_fd[i] = bpf_link_create(fexit_fd[i], 0, BPF_TRACE_FEXIT, NULL); in serial_test_fexit_stress() 44 if (!ASSERT_GE(link_fd[i], 0, "fexit attach")) in serial_test_fexit_stress() 53 if (link_fd[i]) in serial_test_fexit_stress() 54 close(link_fd[i]); in serial_test_fexit_stress()
|
A D | core_kern.c | 10 int link_fd; in test_core_kern_lskel() local 16 link_fd = core_kern_lskel__core_relo_proto__attach(skel); in test_core_kern_lskel() 17 if (!ASSERT_GT(link_fd, 0, "attach(core_relo_proto)")) in test_core_kern_lskel()
|
A D | fentry_test.c | 9 int link_fd; in fentry_test() local 18 link_fd = fentry_test_lskel__test1__attach(fentry_skel); in fentry_test() 19 if (!ASSERT_LT(link_fd, 0, "fentry_attach_link")) in fentry_test()
|
A D | fexit_test.c | 9 int link_fd; in fexit_test() local 18 link_fd = fexit_test_lskel__test1__attach(fexit_skel); in fexit_test() 19 if (!ASSERT_LT(link_fd, 0, "fexit_attach_link")) in fexit_test()
|
A D | bpf_obj_id.c | 302 int link_fd, cmp_res; in serial_test_bpf_obj_id() local 307 link_fd = bpf_link_get_fd_by_id(next_id); in serial_test_bpf_obj_id() 308 if (link_fd < 0 && errno == ENOENT) in serial_test_bpf_obj_id() 311 if (CHECK(link_fd < 0, "get-link-fd(next_id)", in serial_test_bpf_obj_id() 313 link_fd, next_id, errno)) in serial_test_bpf_obj_id() 325 err = bpf_link_get_info_by_fd(link_fd, &link_info, &info_len); in serial_test_bpf_obj_id() 334 close(link_fd); in serial_test_bpf_obj_id()
|
A D | unpriv_bpf_disabled.c | 64 int i, nr_cpus, link_fd = -1; in test_unpriv_bpf_disabled_positive() local 128 link_fd = bpf_link_create(bpf_program__fd(skel->progs.handle_perf_event), perf_fd, in test_unpriv_bpf_disabled_positive() 130 ASSERT_GT(link_fd, 0, "link_create"); in test_unpriv_bpf_disabled_positive() 133 if (link_fd) in test_unpriv_bpf_disabled_positive() 134 close(link_fd); in test_unpriv_bpf_disabled_positive()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/ |
A D | DENYLIST.aarch64 | 36 kprobe_multi_test/link_api_addrs # link_fd unexpected link_fd: actual -95 < expecte… 37 kprobe_multi_test/link_api_syms # link_fd unexpected link_fd: actual -95 < expecte…
|
/linux-6.3-rc2/tools/lib/bpf/ |
A D | bpf.h | 333 LIBBPF_API int bpf_link_detach(int link_fd); 342 LIBBPF_API int bpf_link_update(int link_fd, int new_prog_fd, 345 LIBBPF_API int bpf_iter_create(int link_fd); 397 LIBBPF_API int bpf_link_get_info_by_fd(int link_fd, struct bpf_link_info *info, __u32 *info_len);
|
A D | bpf.c | 774 int bpf_link_detach(int link_fd) in bpf_link_detach() argument 781 attr.link_detach.link_fd = link_fd; in bpf_link_detach() 787 int bpf_link_update(int link_fd, int new_prog_fd, in bpf_link_update() argument 798 attr.link_update.link_fd = link_fd; in bpf_link_update() 807 int bpf_iter_create(int link_fd) in bpf_iter_create() argument 814 attr.iter_create.link_fd = link_fd; in bpf_iter_create() 1062 int bpf_link_get_info_by_fd(int link_fd, struct bpf_link_info *info, __u32 *info_len) in bpf_link_get_info_by_fd() argument 1064 return bpf_obj_get_info_by_fd(link_fd, info, info_len); in bpf_link_get_info_by_fd()
|
A D | libbpf.c | 4756 if (link_fd >= 0) in probe_perf_link() 4757 close(link_fd); in probe_perf_link() 9755 if (link_fd < 0) { in bpf_program__attach_perf_event_opts() 9790 if (link_fd >= 0) in bpf_program__attach_perf_event_opts() 9791 close(link_fd); in bpf_program__attach_perf_event_opts() 10333 if (link_fd < 0) { in bpf_program__attach_kprobe_multi_opts() 10339 link->fd = link_fd; in bpf_program__attach_kprobe_multi_opts() 11301 if (link_fd < 0) { in bpf_program__attach_fd() 11302 link_fd = -errno; in bpf_program__attach_fd() 11392 if (link_fd < 0) { in bpf_program__attach_iter() [all …]
|
/linux-6.3-rc2/tools/perf/util/ |
A D | bpf_counter.c | 417 int link_fd, diff_map_fd, err; in bperf_reload_leader_program() local 439 link_fd = bpf_link__fd(link); in bperf_reload_leader_program() 441 entry->link_id = bpf_link_get_id(link_fd); in bperf_reload_leader_program()
|
/linux-6.3-rc2/include/uapi/linux/ |
A D | bpf.h | 1550 __u32 link_fd; /* link fd */ member 1560 __u32 link_fd; member 1568 __u32 link_fd; member
|
/linux-6.3-rc2/tools/include/uapi/linux/ |
A D | bpf.h | 1550 __u32 link_fd; /* link fd */ member 1560 __u32 link_fd; member 1568 __u32 link_fd; member
|
/linux-6.3-rc2/kernel/bpf/ |
A D | syscall.c | 4668 link = bpf_link_get_from_fd(attr->link_update.link_fd); in link_update() 4705 #define BPF_LINK_DETACH_LAST_FIELD link_detach.link_fd 4715 link = bpf_link_get_from_fd(attr->link_detach.link_fd); in link_detach() 4866 link = bpf_link_get_from_fd(attr->iter_create.link_fd); in bpf_iter_create()
|
/linux-6.3-rc2/Documentation/bpf/ |
A D | bpf_iterators.rst | 77 * Obtain a ``link_fd`` to the BPF program by calling the ``bpf_link_create()``
|