Home
last modified time | relevance | path

Searched refs:target_fd (Results 1 – 18 of 18) sorted by relevance

/linux/tools/testing/selftests/proc/
H A Dfd-001-lookup.c102 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 Dtest_struct_ops_arena.c54 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 Dtc_redirect.c1184 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 Dhv_fcopy_daemon.c
H A Dhv_fcopy_uio_daemon.c110 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 Dbpf-lirc.c256 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 Dnet_namespace.c279 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 Dcgroup.c1395 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 Dbpf_iter.c515 if (attr->link_create.target_fd || attr->link_create.flags) in bpf_iter_link_attach()
H A Dsyscall.c4273 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 Dskel_internal.h325 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 Dlibbpf.c13789 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 Dprog_sk_lookup.rst38 netns FD as attachment ``target_fd``.
/linux/net/core/
H A Dsock_map.c77 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 Dbpf.h1689 __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 Dbpf.h1689 __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 Dbinder.c1638 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 Dbpf_trace.c3858 if (attr->link_create.flags || attr->link_create.target_fd) in bpf_tracing_multi_attach()