Searched refs:prog_fd (Results 1 - 25 of 156) sorted by path

1234567

/linux-master/drivers/hid/bpf/entrypoints/
H A Dentrypoints.lskel.h24 int prog_fd = skel->progs.hid_tail_call.prog_fd; local
25 int fd = skel_raw_tracepoint_open(NULL, prog_fd);
52 skel_closenz(skel->progs.hid_tail_call.prog_fd);
/linux-master/drivers/hid/bpf/
H A Dhid_bpf_dispatch.c248 static int do_hid_bpf_attach_prog(struct hid_device *hdev, int prog_fd, struct bpf_prog *prog, argument
266 fd = __hid_bpf_attach_prog(hdev, prog_type, prog_fd, prog, flags);
285 * hid_bpf_attach_prog - Attach the given @prog_fd to the given HID device
288 * @prog_fd: an fd in the user process representing the program to attach
297 hid_bpf_attach_prog(unsigned int hid_id, int prog_fd, __u32 flags) argument
320 prog = bpf_prog_get(prog_fd);
326 fd = do_hid_bpf_attach_prog(hdev, prog_fd, prog, flags);
H A Dhid_bpf_dispatch.h16 int __hid_bpf_attach_prog(struct hid_device *hdev, enum hid_bpf_prog_type prog_type, int prog_fd,
H A Dhid_bpf_jmp_table.c308 static int hid_bpf_insert_prog(int prog_fd, struct bpf_prog *prog) argument
335 err = skel_map_update_elem(map_fd, &index, &prog_fd, 0);
398 int prog_fd, struct bpf_prog *prog, __u32 flags)
428 prog_table_idx = hid_bpf_insert_prog(prog_fd, prog);
397 __hid_bpf_attach_prog(struct hid_device *hdev, enum hid_bpf_prog_type prog_type, int prog_fd, struct bpf_prog *prog, __u32 flags) argument
/linux-master/include/uapi/linux/
H A Dbpf.h357 * Run the eBPF program associated with the *prog_fd* a *repeat*
391 * the program referred to by *prog_fd*.
506 * The *prog_fd* must be a valid file descriptor associated with
866 * identified by *prog_fd* and only released when *prog_fd* is
1550 /* valid prog_fd to attach to bpf prog */
1600 __u32 prog_fd; member in struct:bpf_attr::__anon2599
1666 __u32 prog_fd; member in struct:bpf_attr::__anon2606
1705 __u32 prog_fd; /* eBPF program to attach */ member in union:bpf_attr::__anon2609::__anon2610
1810 __u32 prog_fd; member in struct:bpf_attr::__anon2629
[all...]
/linux-master/kernel/bpf/
H A Dbpf_struct_ops.c599 int prog_fd, err; local
688 prog_fd = (int)(*(unsigned long *)(udata + moff));
690 if (!prog_fd)
693 prog = bpf_prog_get(prog_fd);
H A Dsyscall.c3878 #define BPF_RAW_TRACEPOINT_OPEN_LAST_FIELD raw_tracepoint.prog_fd
3888 prog = bpf_prog_get(attr->raw_tracepoint.prog_fd);
4264 prog = bpf_prog_get(attr->test.prog_fd);
5198 prog = bpf_prog_get(attr->link_create.prog_fd);
5555 prog = bpf_prog_get(attr->prog_bind_map.prog_fd);
5822 prog = bpf_prog_get_type(attr->test.prog_fd, BPF_PROG_TYPE_SYSCALL);
/linux-master/kernel/bpf/preload/iterators/
H A Diterators.lskel-big-endian.h26 int prog_fd = skel->progs.dump_bpf_map.prog_fd; local
27 int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER);
37 int prog_fd = skel->progs.dump_bpf_prog.prog_fd; local
38 int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER);
67 skel_closenz(skel->progs.dump_bpf_map.prog_fd);
68 skel_closenz(skel->progs.dump_bpf_prog.prog_fd);
H A Diterators.lskel-little-endian.h26 int prog_fd = skel->progs.dump_bpf_map.prog_fd; local
27 int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER);
37 int prog_fd = skel->progs.dump_bpf_prog.prog_fd; local
38 int fd = skel_link_create(prog_fd, 0, BPF_TRACE_ITER);
67 skel_closenz(skel->progs.dump_bpf_map.prog_fd);
68 skel_closenz(skel->progs.dump_bpf_prog.prog_fd);
/linux-master/samples/bpf/
H A Dcookie_uid_helper_example.c64 static int map_fd, prog_fd; variable
165 prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, NULL, "GPL",
167 if (prog_fd < 0)
176 if (bpf_obj_pin(prog_fd, file))
329 close(prog_fd);
H A Dsock_example.c38 int sock = -1, map_fd, prog_fd, i, key; local
68 prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, NULL, "GPL",
70 if (prog_fd < 0) {
77 if (setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,
78 sizeof(prog_fd)) < 0) {
H A Dsockex1_user.c15 int map_fd, prog_fd; local
33 prog_fd = bpf_program__fd(prog);
38 assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,
39 sizeof(prog_fd)) == 0);
H A Dsockex2_user.c20 int map_fd, prog_fd; local
37 prog_fd = bpf_program__fd(prog);
42 assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,
43 sizeof(prog_fd)) == 0);
H A Dtest_cgrp2_attach.c94 int prog_fd, map_fd, ret, key; local
105 prog_fd = prog_load(map_fd, verdict);
108 if (prog_fd < 0) {
113 ret = bpf_prog_attach(prog_fd, cg_fd, type, 0);
H A Dtest_cgrp2_sock.c212 int cg_fd, prog_fd, ret; local
268 prog_fd = prog_load(idx, mark, prio);
269 if (prog_fd < 0) {
276 ret = bpf_prog_attach(prog_fd, cg_fd,
H A Dxdp_adjust_tail_user.c89 int i, prog_fd, map_fd, opt; local
160 prog_fd = bpf_program__fd(prog);
182 if (bpf_xdp_attach(ifindex, prog_fd, xdp_flags, NULL) < 0) {
187 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
H A Dxdp_fwd_user.c32 static int do_attach(int idx, int prog_fd, int map_fd, const char *name) argument
36 err = bpf_xdp_attach(idx, prog_fd, xdp_flags, NULL);
56 int prog_fd; local
72 prog_fd = bpf_prog_get_fd_by_id(curr_prog_id);
73 if (prog_fd < 0) {
76 return prog_fd;
79 err = bpf_prog_get_info_by_fd(prog_fd, &prog_info, &info_len);
94 opts.old_prog_fd = prog_fd;
103 close(prog_fd);
125 int prog_fd local
[all...]
H A Dxdp_tx_iptunnel_user.c165 int opt, prog_fd; local
272 prog_fd = bpf_program__fd(prog);
293 if (bpf_xdp_attach(ifindex, prog_fd, xdp_flags, NULL) < 0) {
298 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
/linux-master/samples/hid/
H A Dhid_bpf_attach.bpf.c15 ctx->prog_fd,
H A Dhid_bpf_attach.h9 int prog_fd; member in struct:attach_prog_args
H A Dhid_bpf_helpers.h12 extern int hid_bpf_attach_prog(unsigned int hid_id, int prog_fd, u32 flags) __ksym;
H A Dhid_mouse.c137 args.prog_fd = bpf_program__fd(prog);
H A Dhid_surface_dial.c107 args.prog_fd = bpf_program__fd(prog);
/linux-master/tools/bpf/bpftool/
H A Dbtf_dumper.c36 int prog_fd = -1, func_sig_len; local
56 prog_fd = bpf_prog_get_fd_by_id(prog_id);
57 if (prog_fd < 0)
60 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
73 err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len);
102 if (prog_fd >= 0)
103 close(prog_fd);
H A Dcgroup.c107 int prog_fd; local
109 prog_fd = bpf_prog_get_fd_by_id(id);
110 if (prog_fd < 0)
113 if (bpf_prog_get_info_by_fd(prog_fd, &info, &info_len)) {
114 close(prog_fd);
133 get_prog_full_name(&info, prog_fd, prog_name, sizeof(prog_name));
167 close(prog_fd);
515 int cgroup_fd, prog_fd; local
539 prog_fd = prog_parse_fd(&argc, &argv);
540 if (prog_fd <
575 int prog_fd, cgroup_fd; local
[all...]

Completed in 344 milliseconds

1234567