| /linux/tools/testing/selftests/proc/ |
| H A D | fd-001-lookup.c | 102 unsigned int fd, target_fd; in main() local 156 target_fd = 1023; in main() 157 while (target_fd > 0) { in main() 158 if (dup2(fd, target_fd) == target_fd) in main() 160 target_fd /= 2; in main() 162 assert(target_fd > 0); in main() 164 test_lookup(target_fd); in main() 165 close(target_fd); in main()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | test_struct_ops_arena.c | 54 static void arena_arg_attach_one(int target_fd, const char *prog_name) in arena_arg_attach_one() argument 72 err = bpf_program__set_attach_target(prog, target_fd, "test_arena_cb"); in arena_arg_attach_one() 91 int target_fd; in arena_arg_attach() local 97 target_fd = bpf_program__fd(skel->progs.test_arena_cb); in arena_arg_attach() 98 arena_arg_attach_one(target_fd, "fentry_test_arena"); in arena_arg_attach() 99 arena_arg_attach_one(target_fd, "fexit_test_arena"); in arena_arg_attach() 100 arena_arg_attach_one(target_fd, "freplace_test_arena"); in arena_arg_attach()
|
| H A D | tc_redirect.c | 1184 static int tun_relay_loop(int src_fd, int target_fd) in tun_relay_loop() argument 1196 FD_SET(target_fd, &rfds); in tun_relay_loop() 1198 if (select(1 + MAX(src_fd, target_fd), &rfds, NULL, NULL, NULL) < 0) { in tun_relay_loop() 1205 nread = read(direction == SRC_TO_TARGET ? src_fd : target_fd, buf, sizeof(buf)); in tun_relay_loop() 1211 nwrite = write(direction == SRC_TO_TARGET ? target_fd : src_fd, buf, nread); in tun_relay_loop() 1227 int src_fd, target_fd = -1; in test_tc_redirect_peer_l3() local 1251 target_fd = tun_open("tun_fwd"); in test_tc_redirect_peer_l3() 1252 if (!ASSERT_GE(target_fd, 0, "tun_open tun_fwd")) in test_tc_redirect_peer_l3() 1260 exit(tun_relay_loop(src_fd, target_fd)); in test_tc_redirect_peer_l3() 1324 if (target_fd >= 0) in test_tc_redirect_peer_l3() [all …]
|
| /linux/tools/hv/ |
| H A D | hv_fcopy_daemon.c | |
| H A D | hv_fcopy_uio_daemon.c | 110 static int target_fd; variable 161 target_fd = open(target_fname, in hv_fcopy_create_file() 163 if (target_fd == -1) { in hv_fcopy_create_file() 181 len = pwrite(target_fd, cpmsg->data, cpmsg->size, cpmsg->offset); in hv_copy_data() 202 close(target_fd); in hv_copy_finished()
|
| /linux/drivers/media/rc/ |
| H A D | bpf-lirc.c | 256 rcdev = rc_dev_get_from_fd(attr->target_fd, true); in lirc_prog_attach() 281 rcdev = rc_dev_get_from_fd(attr->target_fd, true); in lirc_prog_detach() 306 rcdev = rc_dev_get_from_fd(attr->query.target_fd, false); in lirc_prog_query()
|
| /linux/kernel/bpf/ |
| H A D | net_namespace.c | 279 net = get_net_ns_by_fd(attr->query.target_fd); in netns_bpf_prog_query() 299 if (attr->target_fd || attr->attach_flags || attr->replace_bpf_fd) in netns_bpf_prog_attach() 383 if (attr->target_fd) in netns_bpf_prog_detach() 488 net = get_net_ns_by_fd(attr->link_create.target_fd); in netns_bpf_link_create()
|
| H A D | cgroup.c | 1395 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_attach() 1424 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_detach() 1550 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); in cgroup_bpf_link_attach() 1591 cgrp = cgroup_get_from_fd(attr->query.target_fd); in cgroup_bpf_prog_query()
|
| H A D | bpf_iter.c | 515 if (attr->link_create.target_fd || attr->link_create.flags) in bpf_iter_link_attach()
|
| H A D | syscall.c | 4273 perf_file = perf_event_get(attr->link_create.target_fd); in bpf_perf_link_attach() 5842 attr->link_create.target_fd, in link_create() 5864 attr->link_create.target_fd, in link_create()
|
| /linux/tools/lib/bpf/ |
| H A D | skel_internal.h | 325 static inline int skel_link_create(int prog_fd, int target_fd, in skel_link_create() argument 333 attr.link_create.target_fd = target_fd; in skel_link_create()
|
| H A D | libbpf.c | 13789 int target_fd, const char *target_name, in bpf_program_attach_fd() argument 13808 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, opts); in bpf_program_attach_fd() 13943 int target_fd, in bpf_program__attach_freplace() argument 13948 if (!!target_fd != !!attach_func_name) { in bpf_program__attach_freplace() 13960 if (target_fd) { in bpf_program__attach_freplace() 13963 btf_id = libbpf_find_prog_btf_id(attach_func_name, target_fd, prog->obj->token_fd); in bpf_program__attach_freplace() 13969 return bpf_program_attach_fd(prog, target_fd, "freplace", in bpf_program__attach_freplace() 13986 __u32 target_fd = 0; in bpf_program__attach_iter() local 14005 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
|
| /linux/Documentation/bpf/ |
| H A D | prog_sk_lookup.rst | 38 netns FD as attachment ``target_fd``.
|
| /linux/net/core/ |
| H A D | sock_map.c | 77 CLASS(fd, f)(attr->target_fd); in sock_map_get_from_fd() 96 CLASS(fd, f)(attr->target_fd); in sock_map_prog_detach() 1587 CLASS(fd, f)(attr->target_fd); in sock_map_bpf_prog_query() 1887 map = bpf_map_get_with_uref(attr->link_create.target_fd); in sock_map_link_create()
|
| /linux/tools/include/uapi/linux/ |
| H A D | bpf.h | 1689 __u32 target_fd; /* target object to attach to or ... */ member 1748 __u32 target_fd; /* target object to query or ... */ member 1816 __u32 target_fd; /* target object to attach to or ... */ member
|
| /linux/include/uapi/linux/ |
| H A D | bpf.h | 1689 __u32 target_fd; /* target object to attach to or ... */ member 1748 __u32 target_fd; /* target object to query or ... */ member 1816 __u32 target_fd; /* target object to attach to or ... */ member
|
| /linux/drivers/android/ |
| H A D | binder.c | 1638 if (fixup->target_fd >= 0) in binder_free_txn_fixups() 1639 put_unused_fd(fixup->target_fd); in binder_free_txn_fixups() 2413 fixup->target_fd = -1; in binder_translate_fd() 4724 fixup->target_fd = fd; in binder_apply_fd_fixups() 4733 fd_install(fixup->target_fd, fixup->file); in binder_apply_fd_fixups()
|
| /linux/kernel/trace/ |
| H A D | bpf_trace.c | 3858 if (attr->link_create.flags || attr->link_create.target_fd) in bpf_tracing_multi_attach()
|