Home
last modified time | relevance | path

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

/linux-6.3-rc2/tools/testing/selftests/proc/
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-6.3-rc2/tools/hv/
A Dhv_fcopy_daemon.c24 static int target_fd; variable
74 target_fd = open(target_fname, in hv_start_fcopy()
76 if (target_fd == -1) { in hv_start_fcopy()
93 bytes_written = pwrite(target_fd, cpmsg->data, cpmsg->size, in hv_copy_data()
125 close(target_fd); in hv_copy_finished()
131 close(target_fd); in hv_copy_cancel()
/linux-6.3-rc2/tools/lib/bpf/
A Dbpf.c619 return bpf_prog_attach_opts(prog_fd, target_fd, type, &opts); in bpf_prog_attach()
622 int bpf_prog_attach_opts(int prog_fd, int target_fd, in bpf_prog_attach_opts() argument
634 attr.target_fd = target_fd; in bpf_prog_attach_opts()
644 int bpf_prog_detach(int target_fd, enum bpf_attach_type type) in bpf_prog_detach() argument
651 attr.target_fd = target_fd; in bpf_prog_detach()
665 attr.target_fd = target_fd; in bpf_prog_detach2()
673 int bpf_link_create(int prog_fd, int target_fd, in bpf_link_create() argument
698 attr.link_create.target_fd = target_fd; in bpf_link_create()
820 int bpf_prog_query_opts(int target_fd, in bpf_prog_query_opts() argument
833 attr.query.target_fd = target_fd; in bpf_prog_query_opts()
[all …]
A Dbpf.h329 LIBBPF_API int bpf_link_create(int prog_fd, int target_fd,
409 LIBBPF_API int bpf_prog_query_opts(int target_fd,
412 LIBBPF_API int bpf_prog_query(int target_fd, enum bpf_attach_type type,
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()
A Dlibbpf.h693 int target_fd, const char *attach_func_name);
A Dlibbpf.c11278 bpf_program__attach_fd(const struct bpf_program *prog, int target_fd, int btf_id, in bpf_program__attach_fd() argument
11300 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, &opts); in bpf_program__attach_fd()
11332 int target_fd, in bpf_program__attach_freplace() argument
11337 if (!!target_fd != !!attach_func_name) { in bpf_program__attach_freplace()
11349 if (target_fd) { in bpf_program__attach_freplace()
11350 btf_id = libbpf_find_prog_btf_id(attach_func_name, target_fd); in bpf_program__attach_freplace()
11354 return bpf_program__attach_fd(prog, target_fd, btf_id, "freplace"); in bpf_program__attach_freplace()
11371 __u32 target_fd = 0; in bpf_program__attach_iter() local
11390 link_fd = bpf_link_create(prog_fd, target_fd, BPF_TRACE_ITER, in bpf_program__attach_iter()
/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/
A Dtc_redirect.c969 static int tun_relay_loop(int src_fd, int target_fd) in tun_relay_loop() argument
981 FD_SET(target_fd, &rfds); in tun_relay_loop()
983 if (select(1 + MAX(src_fd, target_fd), &rfds, NULL, NULL, NULL) < 0) { in tun_relay_loop()
990 nread = read(direction == SRC_TO_TARGET ? src_fd : target_fd, buf, sizeof(buf)); in tun_relay_loop()
996 nwrite = write(direction == SRC_TO_TARGET ? target_fd : src_fd, buf, nread); in tun_relay_loop()
1012 int src_fd, target_fd = -1; in test_tc_redirect_peer_l3() local
1036 target_fd = tun_open("tun_fwd"); in test_tc_redirect_peer_l3()
1037 if (!ASSERT_GE(target_fd, 0, "tun_open tun_fwd")) in test_tc_redirect_peer_l3()
1045 exit(tun_relay_loop(src_fd, target_fd)); in test_tc_redirect_peer_l3()
1109 if (target_fd >= 0) in test_tc_redirect_peer_l3()
[all …]
/linux-6.3-rc2/drivers/media/rc/
A Dbpf-lirc.c256 rcdev = rc_dev_get_from_fd(attr->target_fd); in lirc_prog_attach()
281 rcdev = rc_dev_get_from_fd(attr->target_fd); in lirc_prog_detach()
306 rcdev = rc_dev_get_from_fd(attr->query.target_fd); in lirc_prog_query()
/linux-6.3-rc2/kernel/bpf/
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()
A Dcgroup.c1136 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_attach()
1164 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_detach()
1283 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); in cgroup_bpf_link_attach()
1323 cgrp = cgroup_get_from_fd(attr->query.target_fd); in cgroup_bpf_prog_query()
A Dbpf_iter.c518 if (attr->link_create.target_fd || attr->link_create.flags) in bpf_iter_link_attach()
A Dsyscall.c3269 perf_file = perf_event_get(attr->link_create.target_fd); in bpf_perf_link_attach()
4601 attr->link_create.target_fd, in link_create()
4619 attr->link_create.target_fd, in link_create()
/linux-6.3-rc2/drivers/android/
A Dbinder_internal.h511 int target_fd; member
A Dbinder.c1547 if (fixup->target_fd >= 0) in binder_free_txn_fixups()
1548 put_unused_fd(fixup->target_fd); in binder_free_txn_fixups()
2290 fixup->target_fd = -1; in binder_translate_fd()
4334 fixup->target_fd = fd; in binder_apply_fd_fixups()
4343 fd_install(fixup->target_fd, fixup->file); in binder_apply_fd_fixups()
/linux-6.3-rc2/Documentation/bpf/
A Dprog_sk_lookup.rst38 netns FD as attachment ``target_fd``.
/linux-6.3-rc2/include/uapi/linux/
A Dbpf.h1415 __u32 target_fd; /* container object to attach to */ member
1468 __u32 target_fd; /* container object to query */ member
1512 __u32 target_fd; /* object to attach to */ member
/linux-6.3-rc2/tools/include/uapi/linux/
A Dbpf.h1415 __u32 target_fd; /* container object to attach to */ member
1468 __u32 target_fd; /* container object to query */ member
1512 __u32 target_fd; /* object to attach to */ member
/linux-6.3-rc2/net/core/
A Dsock_map.c64 u32 ufd = attr->target_fd; in sock_map_get_from_fd()
83 u32 ufd = attr->target_fd; in sock_map_prog_detach()
1492 u32 prog_cnt = 0, flags = 0, ufd = attr->target_fd; in sock_map_bpf_prog_query()

Completed in 101 milliseconds