/linux-master/tools/testing/selftests/proc/ |
H A D | fd-001-lookup.c | 102 unsigned int fd, target_fd; local 156 target_fd = 1023; 157 while (target_fd > 0) { 158 if (dup2(fd, target_fd) == target_fd) 160 target_fd /= 2; 162 assert(target_fd > 0); 164 test_lookup(target_fd); 165 close(target_fd);
|
/linux-master/tools/hv/ |
H A D | hv_fcopy_daemon.c | 24 static int target_fd; variable 74 target_fd = open(target_fname, 76 if (target_fd == -1) { 93 bytes_written = pwrite(target_fd, cpmsg->data, cpmsg->size, 125 close(target_fd); 131 close(target_fd);
|
/linux-master/drivers/media/rc/ |
H A D | bpf-lirc.c | 256 rcdev = rc_dev_get_from_fd(attr->target_fd, true); 281 rcdev = rc_dev_get_from_fd(attr->target_fd, true); 306 rcdev = rc_dev_get_from_fd(attr->query.target_fd, false);
|
/linux-master/tools/lib/bpf/ |
H A D | skel_internal.h | 289 static inline int skel_link_create(int prog_fd, int target_fd, argument 297 attr.link_create.target_fd = target_fd;
|
H A D | bpf.c | 629 int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, argument 636 return bpf_prog_attach_opts(prog_fd, target_fd, type, &opts); 659 attr.target_fd = target; 697 attr.target_fd = target; 714 int bpf_prog_detach(int target_fd, enum bpf_attach_type type) argument 716 return bpf_prog_detach_opts(0, target_fd, type, NULL); 719 int bpf_prog_detach2(int prog_fd, int target_fd, enum bpf_attach_type type) argument 721 return bpf_prog_detach_opts(prog_fd, target_fd, type, NULL); 724 int bpf_link_create(int prog_fd, int target_fd, argument 749 attr.link_create.target_fd 957 bpf_prog_query(int target_fd, enum bpf_attach_type type, __u32 query_flags, __u32 *attach_flags, __u32 *prog_ids, __u32 *prog_cnt) argument [all...] |
H A D | bpf.h | 443 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 D | libbpf.h | 790 int target_fd, const char *attach_func_name);
|
H A D | libbpf.c | 12408 int target_fd, const char *target_name, 12428 link_fd = bpf_link_create(prog_fd, target_fd, attach_type, opts); 12455 /* target_fd/target_ifindex use the same field in LINK_CREATE */ 12490 /* target_fd/target_ifindex use the same field in LINK_CREATE */ 12529 int target_fd, 12534 if (!!target_fd != !!attach_func_name) { 12535 pr_warn("prog '%s': supply none or both of target_fd and attach_func_name\n", 12546 if (target_fd) { 12549 btf_id = libbpf_find_prog_btf_id(attach_func_name, target_fd); 12555 return bpf_program_attach_fd(prog, target_fd, "freplac 12407 bpf_program_attach_fd(const struct bpf_program *prog, int target_fd, const char *target_name, const struct bpf_link_create_opts *opts) argument 12528 bpf_program__attach_freplace(const struct bpf_program *prog, int target_fd, const char *attach_func_name) argument 12573 __u32 target_fd = 0; local [all...] |
/linux-master/kernel/bpf/ |
H A D | net_namespace.c | 285 net = get_net_ns_by_fd(attr->query.target_fd); 305 if (attr->target_fd || attr->attach_flags || attr->replace_bpf_fd) 389 if (attr->target_fd) 494 net = get_net_ns_by_fd(attr->link_create.target_fd);
|
H A D | cgroup.c | 1137 cgrp = cgroup_get_from_fd(attr->target_fd); 1165 cgrp = cgroup_get_from_fd(attr->target_fd); 1284 cgrp = cgroup_get_from_fd(attr->link_create.target_fd); 1324 cgrp = cgroup_get_from_fd(attr->query.target_fd);
|
H A D | bpf_iter.c | 518 if (attr->link_create.target_fd || attr->link_create.flags)
|
H A D | syscall.c | 3741 perf_file = perf_event_get(attr->link_create.target_fd); 5190 attr->link_create.target_fd, 5208 attr->link_create.target_fd,
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | tc_redirect.c | 1104 static int tun_relay_loop(int src_fd, int target_fd) argument 1116 FD_SET(target_fd, &rfds); 1118 if (select(1 + MAX(src_fd, target_fd), &rfds, NULL, NULL, NULL) < 0) { 1125 nread = read(direction == SRC_TO_TARGET ? src_fd : target_fd, buf, sizeof(buf)); 1131 nwrite = write(direction == SRC_TO_TARGET ? target_fd : src_fd, buf, nread); 1147 int src_fd, target_fd = -1; local 1171 target_fd = tun_open("tun_fwd"); 1172 if (!ASSERT_GE(target_fd, 0, "tun_open tun_fwd")) 1180 exit(tun_relay_loop(src_fd, target_fd)); 1244 if (target_fd > [all...] |
/linux-master/drivers/android/ |
H A D | binder_internal.h | 500 * @target_fd: fd to use by the target to install @file 511 int target_fd; member in struct:binder_txn_fd_fixup
|
H A D | binder.c | 1558 if (fixup->target_fd >= 0) 1559 put_unused_fd(fixup->target_fd); 2314 fixup->target_fd = -1; 4362 fixup->target_fd = fd; 4371 fd_install(fixup->target_fd, fixup->file);
|
/linux-master/include/uapi/linux/ |
H A D | bpf.h | 301 * Attach an eBPF program to a *target_fd* at the specified 312 * The *target_fd* must be a valid file descriptor for a kernel 347 * Detach the eBPF program associated with the *target_fd* at the 460 * The *target_fd* must be a valid file descriptor for a kernel 489 * at *target_fd*. 495 * currently effective at the specified *target_fd*. 779 * Attach an eBPF program to a *target_fd* at the specified 1585 __u32 target_fd; /* target object to attach to or ... */ member in union:bpf_attr::__anon2596::__anon2597 1643 __u32 target_fd; /* target object to query or ... */ member in union:bpf_attr::__anon2603::__anon2604 1709 __u32 target_fd; /* targe member in union:bpf_attr::__anon2609::__anon2611 [all...] |
/linux-master/tools/include/uapi/linux/ |
H A D | bpf.h | 301 * Attach an eBPF program to a *target_fd* at the specified 312 * The *target_fd* must be a valid file descriptor for a kernel 347 * Detach the eBPF program associated with the *target_fd* at the 460 * The *target_fd* must be a valid file descriptor for a kernel 489 * at *target_fd*. 495 * currently effective at the specified *target_fd*. 779 * Attach an eBPF program to a *target_fd* at the specified 1585 __u32 target_fd; /* target object to attach to or ... */ member in union:bpf_attr::__anon3137::__anon3138 1643 __u32 target_fd; /* target object to query or ... */ member in union:bpf_attr::__anon3144::__anon3145 1709 __u32 target_fd; /* targe member in union:bpf_attr::__anon3150::__anon3152 [all...] |
/linux-master/net/core/ |
H A D | sock_map.c | 62 u32 ufd = attr->target_fd; 81 u32 ufd = attr->target_fd; 1512 u32 prog_cnt = 0, flags = 0, ufd = attr->target_fd;
|