Home
last modified time | relevance | path

Searched refs:target_fd (Results 1 – 20 of 20) 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/hv/
H A Dhv_fcopy_daemon.c
H A Dhv_fcopy_uio_daemon.c56 static int target_fd; variable
104 target_fd = open(target_fname, in hv_fcopy_create_file()
106 if (target_fd == -1) { in hv_fcopy_create_file()
124 len = pwrite(target_fd, cpmsg->data, cpmsg->size, cpmsg->offset); in hv_copy_data()
145 close(target_fd); in hv_copy_finished()
/linux/tools/lib/bpf/
H A Dbpf.c629 int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, in bpf_prog_attach() argument
636 return bpf_prog_attach_opts(prog_fd, target_fd, type, &opts); in bpf_prog_attach()
659 attr.target_fd = target; in bpf_prog_attach_opts()
697 attr.target_fd = target; in bpf_prog_detach_opts()
714 int bpf_prog_detach(int target_fd, enum bpf_attach_type type) in bpf_prog_detach() argument
716 return bpf_prog_detach_opts(0, target_fd, type, NULL); in bpf_prog_detach()
719 int bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) in bpf_prog_detach2() argument
721 return bpf_prog_detach_opts(prog_fd, target_fd, type, NULL); in bpf_prog_detach2()
724 int bpf_link_create(int prog_fd, int target_fd, in bpf_link_create() argument
749 attr.link_create.target_fd = target_fd; in bpf_link_create()
[all …]
H A Dskel_internal.h289 static inline int skel_link_create(int prog_fd, int target_fd, in skel_link_create() argument
297 attr.link_create.target_fd = target_fd; in skel_link_create()
H A Dbpf.h443 LIBBPF_API int bpf_link_create(int prog_fd, int target_fd,
616 LIBBPF_API int bpf_prog_query(int target_fd, enum bpf_attach_type type,
H A Dlibbpf.h816 int target_fd, const char *attach_func_name);
H A Dlibbpf.c12624 int target_fd, const char *target_name, in bpf_program_attach_fd() argument
12644 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, opts); in bpf_program_attach_fd()
12751 int target_fd, in bpf_program__attach_freplace() argument
12756 if (!!target_fd != !!attach_func_name) { in bpf_program__attach_freplace()
12768 if (target_fd) { in bpf_program__attach_freplace()
12771 btf_id = libbpf_find_prog_btf_id(attach_func_name, target_fd); in bpf_program__attach_freplace()
12777 return bpf_program_attach_fd(prog, target_fd, "freplace", in bpf_program__attach_freplace()
12795 __u32 target_fd = 0; in bpf_program__attach_iter() local
12814 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dtc_redirect.c1116 static int tun_relay_loop(int src_fd, int target_fd) in tun_relay_loop() argument
1128 FD_SET(target_fd, &rfds); in tun_relay_loop()
1130 if (select(1 + MAX(src_fd, target_fd), &rfds, NULL, NULL, NULL) < 0) { in tun_relay_loop()
1137 nread = read(direction == SRC_TO_TARGET ? src_fd : target_fd, buf, sizeof(buf)); in tun_relay_loop()
1143 nwrite = write(direction == SRC_TO_TARGET ? target_fd : src_fd, buf, nread); in tun_relay_loop()
1159 int src_fd, target_fd = -1; in test_tc_redirect_peer_l3() local
1183 target_fd = tun_open("tun_fwd"); in test_tc_redirect_peer_l3()
1184 if (!ASSERT_GE(target_fd, 0, "tun_open tun_fwd")) in test_tc_redirect_peer_l3()
1192 exit(tun_relay_loop(src_fd, target_fd)); in test_tc_redirect_peer_l3()
1256 if (target_fd >= 0) in test_tc_redirect_peer_l3()
[all …]
/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.c285 net = get_net_ns_by_fd(attr->query.target_fd); in netns_bpf_prog_query()
305 if (attr->target_fd || attr->attach_flags || attr->replace_bpf_fd) in netns_bpf_prog_attach()
389 if (attr->target_fd) in netns_bpf_prog_detach()
494 net = get_net_ns_by_fd(attr->link_create.target_fd); in netns_bpf_link_create()
H A Dcgroup.c1154 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_attach()
1182 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_detach()
1301 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); in cgroup_bpf_link_attach()
1341 cgrp = cgroup_get_from_fd(attr->query.target_fd); in cgroup_bpf_prog_query()
H A Dbpf_iter.c517 if (attr->link_create.target_fd || attr->link_create.flags) in bpf_iter_link_attach()
H A Dsyscall.c3753 perf_file = perf_event_get(attr->link_create.target_fd); in bpf_perf_link_attach()
5206 attr->link_create.target_fd, in link_create()
5224 attr->link_create.target_fd, in link_create()
/linux/drivers/android/
H A Dbinder_internal.h531 int target_fd; member
H A Dbinder.c1637 if (fixup->target_fd >= 0) in binder_free_txn_fixups()
1638 put_unused_fd(fixup->target_fd); in binder_free_txn_fixups()
2395 fixup->target_fd = -1; in binder_translate_fd()
4631 fixup->target_fd = fd; in binder_apply_fd_fixups()
4640 fd_install(fixup->target_fd, fixup->file); in binder_apply_fd_fixups()
/linux/Documentation/bpf/
H A Dprog_sk_lookup.rst38 netns FD as attachment ``target_fd``.
/linux/tools/include/uapi/linux/
H A Dbpf.h1592 __u32 target_fd; /* target object to attach to or ... */ member
1650 __u32 target_fd; /* target object to query or ... */ member
1718 __u32 target_fd; /* target object to attach to or ... */ member
/linux/include/uapi/linux/
H A Dbpf.h1592 __u32 target_fd; /* target object to attach to or ... */ member
1650 __u32 target_fd; /* target object to query or ... */ member
1718 __u32 target_fd; /* target object to attach to or ... */ member
/linux/net/core/
H A Dsock_map.c76 CLASS(fd, f)(attr->target_fd); in sock_map_get_from_fd()
95 CLASS(fd, f)(attr->target_fd); in sock_map_prog_detach()
1563 CLASS(fd, f)(attr->target_fd); in sock_map_bpf_prog_query()
1848 map = bpf_map_get_with_uref(attr->link_create.target_fd); in sock_map_link_create()