/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-6.6/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()
|
/kernel/linux/linux-5.10/tools/hv/ |
H A D | hv_fcopy_daemon.c | 24 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()
|
/kernel/linux/linux-6.6/tools/hv/ |
H A D | hv_fcopy_daemon.c | 24 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()
|
/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | bpf.c | 533 int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, in bpf_prog_attach() argument 540 return bpf_prog_attach_xattr(prog_fd, target_fd, type, &opts); in bpf_prog_attach() 543 int bpf_prog_attach_xattr(int prog_fd, int target_fd, in bpf_prog_attach_xattr() argument 553 attr.target_fd = target_fd; in bpf_prog_attach_xattr() 562 int bpf_prog_detach(int target_fd, enum bpf_attach_type type) in bpf_prog_detach() argument 567 attr.target_fd = target_fd; in bpf_prog_detach() 573 int bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) in bpf_prog_detach2() argument 578 attr.target_fd in bpf_prog_detach2() 585 bpf_link_create(int prog_fd, int target_fd, enum bpf_attach_type attach_type, const struct bpf_link_create_opts *opts) bpf_link_create() argument 655 bpf_prog_query(int target_fd, enum bpf_attach_type type, __u32 query_flags, __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) bpf_prog_query() argument [all...] |
H A D | bpf.h | 181 LIBBPF_API int bpf_link_create(int prog_fd, int target_fd, 234 LIBBPF_API int bpf_prog_query(int target_fd, enum bpf_attach_type type,
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | tc_redirect.c | 1104 static int tun_relay_loop(int src_fd, int target_fd) in tun_relay_loop() argument 1116 FD_SET(target_fd, &rfds); in tun_relay_loop() 1118 if (select(1 + MAX(src_fd, target_fd), &rfds, NULL, NULL, NULL) < 0) { in tun_relay_loop() 1125 nread = read(direction == SRC_TO_TARGET ? src_fd : target_fd, buf, sizeof(buf)); in tun_relay_loop() 1131 nwrite = write(direction == SRC_TO_TARGET ? target_fd : src_fd, buf, nread); in tun_relay_loop() 1147 int src_fd, target_fd = -1; in test_tc_redirect_peer_l3() local 1171 target_fd = tun_open("tun_fwd"); in test_tc_redirect_peer_l3() 1172 if (!ASSERT_GE(target_fd, 0, "tun_open tun_fwd")) in test_tc_redirect_peer_l3() 1180 exit(tun_relay_loop(src_fd, target_fd)); in test_tc_redirect_peer_l3() 1244 if (target_fd > in test_tc_redirect_peer_l3() [all...] |
/kernel/linux/linux-6.6/tools/lib/bpf/ |
H A D | bpf.c | 622 int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, in bpf_prog_attach() argument 629 return bpf_prog_attach_opts(prog_fd, target_fd, type, &opts); in bpf_prog_attach() 652 attr.target_fd = target; in bpf_prog_attach_opts() 690 attr.target_fd = target; in bpf_prog_detach_opts() 707 int bpf_prog_detach(int target_fd, enum bpf_attach_type type) in bpf_prog_detach() argument 709 return bpf_prog_detach_opts(0, target_fd, type, NULL); in bpf_prog_detach() 712 int bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) in bpf_prog_detach2() argument 714 return bpf_prog_detach_opts(prog_fd, target_fd, type, NULL); in bpf_prog_detach2() 717 int bpf_link_create(int prog_fd, int target_fd, in bpf_link_create() argument 742 attr.link_create.target_fd in bpf_link_create() 934 bpf_prog_query(int target_fd, enum bpf_attach_type type, __u32 query_flags, __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) bpf_prog_query() argument [all...] |
H A D | skel_internal.h | 289 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 D | bpf.h | 423 LIBBPF_API int bpf_link_create(int prog_fd, int target_fd, 584 LIBBPF_API int bpf_prog_query(int target_fd, enum bpf_attach_type type,
|
/kernel/linux/linux-5.10/drivers/media/rc/ |
H A D | bpf-lirc.c | 252 rcdev = rc_dev_get_from_fd(attr->target_fd, true); in lirc_prog_attach() 277 rcdev = rc_dev_get_from_fd(attr->target_fd, true); in lirc_prog_detach() 302 rcdev = rc_dev_get_from_fd(attr->query.target_fd, false); in lirc_prog_query()
|
/kernel/linux/linux-6.6/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()
|
/kernel/linux/linux-5.10/kernel/bpf/ |
H A D | net_namespace.c | 284 net = get_net_ns_by_fd(attr->query.target_fd); in netns_bpf_prog_query() 304 if (attr->target_fd || attr->attach_flags || attr->replace_bpf_fd) in netns_bpf_prog_attach() 388 if (attr->target_fd) in netns_bpf_prog_detach() 493 net = get_net_ns_by_fd(attr->link_create.target_fd); in netns_bpf_link_create()
|
H A D | cgroup.c | 821 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_attach() 849 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_detach() 966 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); in cgroup_bpf_link_attach() 1006 cgrp = cgroup_get_from_fd(attr->query.target_fd); in cgroup_bpf_prog_query()
|
/kernel/linux/linux-6.6/kernel/bpf/ |
H A D | net_namespace.c | 285 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 D | cgroup.c | 1137 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_attach() 1165 cgrp = cgroup_get_from_fd(attr->target_fd); in cgroup_bpf_prog_detach() 1284 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); in cgroup_bpf_link_attach() 1324 cgrp = cgroup_get_from_fd(attr->query.target_fd); in cgroup_bpf_prog_query()
|
/kernel/linux/linux-5.10/tools/include/uapi/linux/ |
H A D | bpf.h | 569 __u32 target_fd; /* container object to attach to */ member 621 __u32 target_fd; /* container object to query */ member 661 __u32 target_fd; /* object to attach to */ member
|
/kernel/linux/linux-5.10/include/uapi/linux/ |
H A D | bpf.h | 569 __u32 target_fd; /* container object to attach to */ member 621 __u32 target_fd; /* container object to query */ member 661 __u32 target_fd; /* object to attach to */ member
|
/kernel/linux/patches/linux-6.6/prebuilts/usr/include/linux/ |
H A D | bpf.h | 349 __u32 target_fd; member 388 __u32 target_fd; member 420 __u32 target_fd; member
|
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/ |
H A D | bpf.h | 349 __u32 target_fd; member 388 __u32 target_fd; member 420 __u32 target_fd; member
|
/kernel/linux/linux-6.6/drivers/android/ |
H A D | binder_internal.h | 506 * @target_fd: fd to use by the target to install @file 517 int target_fd; member
|
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/ |
H A D | bpf.h | 231 __u32 target_fd; member 262 __u32 target_fd; member
|
/kernel/linux/linux-6.6/include/uapi/linux/ |
H A D | bpf.h | 279 * Attach an eBPF program to a *target_fd* at the specified 290 * The *target_fd* must be a valid file descriptor for a kernel 325 * Detach the eBPF program associated with the *target_fd* at the 438 * The *target_fd* must be a valid file descriptor for a kernel 467 * at *target_fd*. 473 * currently effective at the specified *target_fd*. 753 * Attach an eBPF program to a *target_fd* at the specified 1472 __u32 target_fd; /* target object to attach to or ... */ member 1530 __u32 target_fd; /* target object to query or ... */ member 1591 __u32 target_fd; /* targe member [all...] |
/kernel/linux/linux-6.6/tools/include/uapi/linux/ |
H A D | bpf.h | 279 * Attach an eBPF program to a *target_fd* at the specified 290 * The *target_fd* must be a valid file descriptor for a kernel 325 * Detach the eBPF program associated with the *target_fd* at the 438 * The *target_fd* must be a valid file descriptor for a kernel 467 * at *target_fd*. 473 * currently effective at the specified *target_fd*. 753 * Attach an eBPF program to a *target_fd* at the specified 1472 __u32 target_fd; /* target object to attach to or ... */ member 1530 __u32 target_fd; /* target object to query or ... */ member 1591 __u32 target_fd; /* targe member [all...] |
/kernel/linux/linux-6.6/net/core/ |
H A D | sock_map.c | 62 u32 ufd = attr->target_fd; in sock_map_get_from_fd() 81 u32 ufd = attr->target_fd; in sock_map_prog_detach() 1512 u32 prog_cnt = 0, flags = 0, ufd = attr->target_fd; in sock_map_bpf_prog_query()
|