Lines Matching refs:bpf_program
76 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
402 struct bpf_program {
475 struct bpf_program **progs;
664 struct bpf_program *programs;
742 void bpf_program__unload(struct bpf_program *prog)
753 static void bpf_program__exit(struct bpf_program *prog)
790 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog,
814 * SEC("abc...") but the corresponding bpf_program starts out with
855 struct bpf_program *prog, *progs;
1115 struct bpf_program *prog;
3152 static bool prog_needs_vmlinux_btf(struct bpf_program *prog)
3169 struct bpf_program *prog;
3245 struct bpf_program *prog = &obj->programs[i];
3271 struct bpf_program *prog = &obj->programs[i];
3315 struct bpf_program *subprog = &obj->programs[k];
3644 const struct bpf_program *a = _a;
3645 const struct bpf_program *b = _b;
4375 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog)
4380 struct bpf_program *
4384 struct bpf_program *prog;
4432 static int bpf_program__record_reloc(struct bpf_program *prog,
4592 static bool prog_contains_insn(const struct bpf_program *prog, size_t insn_idx)
4598 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj,
4602 struct bpf_program *prog;
4631 struct bpf_program *prog;
5647 const struct bpf_program *targ_prog;
6108 static int record_relo_core(struct bpf_program *prog,
6126 static const struct bpf_core_relo *find_relo_core(struct bpf_program *prog, int insn_idx)
6142 static int bpf_core_resolve_relo(struct bpf_program *prog,
6194 struct bpf_program *prog;
6310 static void poison_map_ldimm64(struct bpf_program *prog, int relo_idx,
6340 static void poison_kfunc_call(struct bpf_program *prog, int relo_idx,
6366 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog)
6462 const struct bpf_program *prog,
6531 struct bpf_program *main_prog,
6532 const struct bpf_program *prog)
6611 static struct reloc_desc *find_prog_insn_relo(const struct bpf_program *prog, size_t insn_idx)
6619 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog)
6649 bpf_object__append_subprog_code(struct bpf_object *obj, struct bpf_program *main_prog,
6650 struct bpf_program *subprog)
6681 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog,
6682 struct bpf_program *prog)
6685 struct bpf_program *subprog;
6871 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog)
6873 struct bpf_program *subprog;
6897 struct bpf_program *prog;
6928 struct bpf_program *p = &obj->programs[i];
6940 struct bpf_program *prog;
6999 struct bpf_program *subprog = &obj->programs[prog->exception_cb_idx];
7045 struct bpf_program *targ_prog = NULL;
7228 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog)
7263 static int libbpf_find_attach_btf_id(struct bpf_program *prog, const char *attach_name,
7267 static int libbpf_prepare_prog_load(struct bpf_program *prog,
7326 static void fixup_verifier_log(struct bpf_program *prog, char *buf, size_t buf_sz);
7328 static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog,
7547 static void fixup_log_failed_core_relo(struct bpf_program *prog,
7586 static void fixup_log_missing_map_load(struct bpf_program *prog,
7619 static void fixup_log_missing_kfunc_call(struct bpf_program *prog,
7652 static void fixup_verifier_log(struct bpf_program *prog, char *buf, size_t buf_sz)
7702 static int bpf_program_record_relos(struct bpf_program *prog)
7748 struct bpf_program *prog;
7788 struct bpf_program *prog;
7804 * after bpf_program is initialized to adjust its properties
8340 struct bpf_program *prog = st_ops->progs[i];
8490 int bpf_program__pin(struct bpf_program *prog, const char *path)
8519 int bpf_program__unpin(struct bpf_program *prog, const char *path)
8755 struct bpf_program *prog;
8792 struct bpf_program *prog;
8965 static struct bpf_program *
8966 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj,
8991 struct bpf_program *
8992 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev)
8994 struct bpf_program *prog = prev;
9003 struct bpf_program *
9004 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next)
9006 struct bpf_program *prog = next;
9015 void bpf_program__set_ifindex(struct bpf_program *prog, __u32 ifindex)
9020 const char *bpf_program__name(const struct bpf_program *prog)
9025 const char *bpf_program__section_name(const struct bpf_program *prog)
9030 bool bpf_program__autoload(const struct bpf_program *prog)
9035 int bpf_program__set_autoload(struct bpf_program *prog, bool autoload)
9044 bool bpf_program__autoattach(const struct bpf_program *prog)
9049 void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach)
9054 const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog)
9059 size_t bpf_program__insn_cnt(const struct bpf_program *prog)
9064 int bpf_program__set_insns(struct bpf_program *prog,
9085 int bpf_program__fd(const struct bpf_program *prog)
9097 enum bpf_prog_type bpf_program__get_type(const struct bpf_program *prog);
9099 enum bpf_prog_type bpf_program__type(const struct bpf_program *prog)
9110 int bpf_program__set_type(struct bpf_program *prog, enum bpf_prog_type type)
9133 enum bpf_attach_type bpf_program__get_expected_attach_type(const struct bpf_program *prog);
9135 enum bpf_attach_type bpf_program__expected_attach_type(const struct bpf_program *prog)
9140 int bpf_program__set_expected_attach_type(struct bpf_program *prog,
9150 __u32 bpf_program__flags(const struct bpf_program *prog)
9155 int bpf_program__set_flags(struct bpf_program *prog, __u32 flags)
9164 __u32 bpf_program__log_level(const struct bpf_program *prog)
9169 int bpf_program__set_log_level(struct bpf_program *prog, __u32 log_level)
9178 const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size)
9184 int bpf_program__set_log_buf(struct bpf_program *prog, char *log_buf, size_t log_size)
9207 static int attach_kprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9208 static int attach_uprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9209 static int attach_ksyscall(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9211 static int attach_usdt(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9213 static int attach_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9214 static int attach_raw_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9215 static int attach_trace(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9216 static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9217 static int attach_uprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9218 static int attach_lsm(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9219 static int attach_iter(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9586 struct bpf_program *prog;
9848 static int libbpf_find_attach_btf_id(struct bpf_program *prog, const char *attach_name,
10384 int bpf_link__update_program(struct bpf_link *link, struct bpf_program *prog)
10564 struct bpf_link *bpf_program__attach_perf_event_opts(const struct bpf_program *prog, int pfd,
10641 struct bpf_link *bpf_program__attach_perf_event(const struct bpf_program *prog, int pfd)
10965 bpf_program__attach_kprobe_opts(const struct bpf_program *prog,
11060 struct bpf_link *bpf_program__attach_kprobe(const struct bpf_program *prog,
11071 struct bpf_link *bpf_program__attach_ksyscall(const struct bpf_program *prog,
11286 bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog,
11364 static int attach_kprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link)
11401 static int attach_ksyscall(const struct bpf_program *prog, long cookie, struct bpf_link **link)
11422 static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link)
11453 static int attach_uprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link)
11719 bpf_program__attach_uprobe_multi(const struct bpf_program *prog,
11833 bpf_program__attach_uprobe_opts(const struct bpf_program *prog, pid_t pid,
11978 static int attach_uprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12033 struct bpf_link *bpf_program__attach_uprobe(const struct bpf_program *prog,
12044 struct bpf_link *bpf_program__attach_usdt(const struct bpf_program *prog,
12099 static int attach_usdt(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12180 struct bpf_link *bpf_program__attach_tracepoint_opts(const struct bpf_program *prog,
12214 struct bpf_link *bpf_program__attach_tracepoint(const struct bpf_program *prog,
12221 static int attach_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12253 struct bpf_link *bpf_program__attach_raw_tracepoint(const struct bpf_program *prog,
12283 static int attach_raw_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12325 static struct bpf_link *bpf_program__attach_btf_id(const struct bpf_program *prog,
12361 struct bpf_link *bpf_program__attach_trace(const struct bpf_program *prog)
12366 struct bpf_link *bpf_program__attach_trace_opts(const struct bpf_program *prog,
12372 struct bpf_link *bpf_program__attach_lsm(const struct bpf_program *prog)
12377 static int attach_trace(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12383 static int attach_lsm(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12390 bpf_program_attach_fd(const struct bpf_program *prog,
12425 bpf_program__attach_cgroup(const struct bpf_program *prog, int cgroup_fd)
12431 bpf_program__attach_netns(const struct bpf_program *prog, int netns_fd)
12436 struct bpf_link *bpf_program__attach_xdp(const struct bpf_program *prog, int ifindex)
12443 bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex,
12478 bpf_program__attach_netkit(const struct bpf_program *prog, int ifindex,
12511 struct bpf_link *bpf_program__attach_freplace(const struct bpf_program *prog,
12549 bpf_program__attach_iter(const struct bpf_program *prog,
12588 static int attach_iter(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12594 struct bpf_link *bpf_program__attach_netfilter(const struct bpf_program *prog,
12636 struct bpf_link *bpf_program__attach(const struct bpf_program *prog)
13317 int bpf_program__set_attach_target(struct bpf_program *prog,
13497 struct bpf_program **prog = progs[i].prog;
13681 struct bpf_program *prog = *s->progs[i].prog;