Lines Matching refs:bpf_program
77 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
431 struct bpf_program {
502 struct bpf_program **progs;
687 struct bpf_program *programs;
759 void bpf_program__unload(struct bpf_program *prog)
770 static void bpf_program__exit(struct bpf_program *prog)
807 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog,
831 * SEC("abc...") but the corresponding bpf_program starts out with
872 struct bpf_program *prog, *progs;
956 struct bpf_program *prog = obj->programs;
1077 const struct bpf_program *prog)
1096 struct bpf_program *prog, *slot_prog;
1181 struct bpf_program *prog;
3443 static bool prog_needs_vmlinux_btf(struct bpf_program *prog)
3465 struct bpf_program *prog;
3547 struct bpf_program *prog = &obj->programs[i];
3803 const struct bpf_program *a = _a;
3804 const struct bpf_program *b = _b;
4431 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog)
4436 struct bpf_program *
4440 struct bpf_program *prog;
4488 static int bpf_program__record_reloc(struct bpf_program *prog,
4660 static bool prog_contains_insn(const struct bpf_program *prog, size_t insn_idx)
4666 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj,
4670 struct bpf_program *prog;
4699 struct bpf_program *prog;
5377 const struct bpf_program *targ_prog;
5844 static int record_relo_core(struct bpf_program *prog,
5862 static const struct bpf_core_relo *find_relo_core(struct bpf_program *prog, int insn_idx)
5878 static int bpf_core_resolve_relo(struct bpf_program *prog,
5930 struct bpf_program *prog;
6044 static void poison_map_ldimm64(struct bpf_program *prog, int relo_idx,
6074 static void poison_kfunc_call(struct bpf_program *prog, int relo_idx,
6100 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog)
6196 const struct bpf_program *prog,
6265 struct bpf_program *main_prog,
6266 const struct bpf_program *prog)
6345 static struct reloc_desc *find_prog_insn_relo(const struct bpf_program *prog, size_t insn_idx)
6353 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog)
6383 bpf_object__append_subprog_code(struct bpf_object *obj, struct bpf_program *main_prog,
6384 struct bpf_program *subprog)
6415 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog,
6416 struct bpf_program *prog)
6419 struct bpf_program *subprog;
6605 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog)
6607 struct bpf_program *subprog;
6631 struct bpf_program *prog;
6662 struct bpf_program *p = &obj->programs[i];
6671 static int bpf_prog_assign_exc_cb(struct bpf_object *obj, struct bpf_program *prog)
6718 struct bpf_program *subprog = &obj->programs[j];
6793 static bool need_func_arg_type_fixup(const struct btf *btf, const struct bpf_program *prog,
6864 static int clone_func_btf_info(struct btf *btf, int orig_fn_id, struct bpf_program *prog)
6933 static int bpf_program_fixup_func_info(struct bpf_object *obj, struct bpf_program *prog)
7074 struct bpf_program *prog;
7136 struct bpf_program *subprog = &obj->programs[prog->exception_cb_idx];
7191 struct bpf_program *targ_prog = NULL;
7369 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog)
7404 static int libbpf_find_attach_btf_id(struct bpf_program *prog, const char *attach_name,
7408 static int libbpf_prepare_prog_load(struct bpf_program *prog,
7473 static void fixup_verifier_log(struct bpf_program *prog, char *buf, size_t buf_sz);
7475 static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog,
7705 static void fixup_log_failed_core_relo(struct bpf_program *prog,
7744 static void fixup_log_missing_map_load(struct bpf_program *prog,
7777 static void fixup_log_missing_kfunc_call(struct bpf_program *prog,
7810 static void fixup_verifier_log(struct bpf_program *prog, char *buf, size_t buf_sz)
7860 static int bpf_program_record_relos(struct bpf_program *prog)
7906 struct bpf_program *prog;
7937 struct bpf_program *prog;
7954 struct bpf_program *prog;
7970 * after bpf_program is initialized to adjust its properties
8533 struct bpf_program *prog = st_ops->progs[i];
8739 int bpf_program__pin(struct bpf_program *prog, const char *path)
8766 int bpf_program__unpin(struct bpf_program *prog, const char *path)
9005 struct bpf_program *prog;
9042 struct bpf_program *prog;
9233 static struct bpf_program *
9234 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj,
9259 struct bpf_program *
9260 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev)
9262 struct bpf_program *prog = prev;
9271 struct bpf_program *
9272 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next)
9274 struct bpf_program *prog = next;
9283 void bpf_program__set_ifindex(struct bpf_program *prog, __u32 ifindex)
9288 const char *bpf_program__name(const struct bpf_program *prog)
9293 const char *bpf_program__section_name(const struct bpf_program *prog)
9298 bool bpf_program__autoload(const struct bpf_program *prog)
9303 int bpf_program__set_autoload(struct bpf_program *prog, bool autoload)
9312 bool bpf_program__autoattach(const struct bpf_program *prog)
9317 void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach)
9322 const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog)
9327 size_t bpf_program__insn_cnt(const struct bpf_program *prog)
9332 int bpf_program__set_insns(struct bpf_program *prog,
9353 int bpf_program__fd(const struct bpf_program *prog)
9365 enum bpf_prog_type bpf_program__get_type(const struct bpf_program *prog);
9367 enum bpf_prog_type bpf_program__type(const struct bpf_program *prog)
9378 int bpf_program__set_type(struct bpf_program *prog, enum bpf_prog_type type)
9401 enum bpf_attach_type bpf_program__get_expected_attach_type(const struct bpf_program *prog);
9403 enum bpf_attach_type bpf_program__expected_attach_type(const struct bpf_program *prog)
9408 int bpf_program__set_expected_attach_type(struct bpf_program *prog,
9418 __u32 bpf_program__flags(const struct bpf_program *prog)
9423 int bpf_program__set_flags(struct bpf_program *prog, __u32 flags)
9432 __u32 bpf_program__log_level(const struct bpf_program *prog)
9437 int bpf_program__set_log_level(struct bpf_program *prog, __u32 log_level)
9446 const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size)
9452 int bpf_program__set_log_buf(struct bpf_program *prog, char *log_buf, size_t log_size)
9466 struct bpf_func_info *bpf_program__func_info(const struct bpf_program *prog)
9473 __u32 bpf_program__func_info_cnt(const struct bpf_program *prog)
9478 struct bpf_line_info *bpf_program__line_info(const struct bpf_program *prog)
9485 __u32 bpf_program__line_info_cnt(const struct bpf_program *prog)
9499 static int attach_kprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9500 static int attach_uprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9501 static int attach_ksyscall(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9502 static int attach_usdt(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9503 static int attach_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9504 static int attach_raw_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9505 static int attach_trace(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9506 static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9507 static int attach_kprobe_session(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9508 static int attach_uprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9509 static int attach_lsm(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9510 static int attach_iter(const struct bpf_program *prog, long cookie, struct bpf_link **link);
9882 struct bpf_program *prog;
9974 * should be converted to a pointer to struct bpf_program
9977 *((struct bpf_program **)(st_ops->data + moff)) = prog;
10149 static int libbpf_find_attach_btf_id(struct bpf_program *prog, const char *attach_name,
10721 int bpf_link__update_program(struct bpf_link *link, struct bpf_program *prog)
10908 struct bpf_link *bpf_program__attach_perf_event_opts(const struct bpf_program *prog, int pfd,
10986 struct bpf_link *bpf_program__attach_perf_event(const struct bpf_program *prog, int pfd)
11305 bpf_program__attach_kprobe_opts(const struct bpf_program *prog,
11399 struct bpf_link *bpf_program__attach_kprobe(const struct bpf_program *prog,
11410 struct bpf_link *bpf_program__attach_ksyscall(const struct bpf_program *prog,
11649 bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog,
11750 static int attach_kprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link)
11787 static int attach_ksyscall(const struct bpf_program *prog, long cookie, struct bpf_link **link)
11808 static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link)
11839 static int attach_kprobe_session(const struct bpf_program *prog, long cookie,
11865 static int attach_uprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12109 bpf_program__attach_uprobe_multi(const struct bpf_program *prog,
12237 bpf_program__attach_uprobe_opts(const struct bpf_program *prog, pid_t pid,
12383 static int attach_uprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12438 struct bpf_link *bpf_program__attach_uprobe(const struct bpf_program *prog,
12448 struct bpf_link *bpf_program__attach_usdt(const struct bpf_program *prog,
12501 static int attach_usdt(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12580 struct bpf_link *bpf_program__attach_tracepoint_opts(const struct bpf_program *prog,
12613 struct bpf_link *bpf_program__attach_tracepoint(const struct bpf_program *prog,
12620 static int attach_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12653 bpf_program__attach_raw_tracepoint_opts(const struct bpf_program *prog,
12689 struct bpf_link *bpf_program__attach_raw_tracepoint(const struct bpf_program *prog,
12695 static int attach_raw_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12737 static struct bpf_link *bpf_program__attach_btf_id(const struct bpf_program *prog,
12772 struct bpf_link *bpf_program__attach_trace(const struct bpf_program *prog)
12777 struct bpf_link *bpf_program__attach_trace_opts(const struct bpf_program *prog,
12783 struct bpf_link *bpf_program__attach_lsm(const struct bpf_program *prog)
12788 static int attach_trace(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12794 static int attach_lsm(const struct bpf_program *prog, long cookie, struct bpf_link **link)
12801 bpf_program_attach_fd(const struct bpf_program *prog,
12835 bpf_program__attach_cgroup(const struct bpf_program *prog, int cgroup_fd)
12841 bpf_program__attach_netns(const struct bpf_program *prog, int netns_fd)
12847 bpf_program__attach_sockmap(const struct bpf_program *prog, int map_fd)
12852 struct bpf_link *bpf_program__attach_xdp(const struct bpf_program *prog, int ifindex)
12859 bpf_program__attach_cgroup_opts(const struct bpf_program *prog, int cgroup_fd,
12887 bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex,
12922 bpf_program__attach_netkit(const struct bpf_program *prog, int ifindex,
12955 struct bpf_link *bpf_program__attach_freplace(const struct bpf_program *prog,
12993 bpf_program__attach_iter(const struct bpf_program *prog,
13031 static int attach_iter(const struct bpf_program *prog, long cookie, struct bpf_link **link)
13037 struct bpf_link *bpf_program__attach_netfilter(const struct bpf_program *prog,
13077 struct bpf_link *bpf_program__attach(const struct bpf_program *prog)
13774 int bpf_program__set_attach_target(struct bpf_program *prog,
13956 struct bpf_program **prog = prog_skel->prog;
14097 struct bpf_program *prog = *prog_skel->prog;