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 { struct
502 struct bpf_program **progs; argument
687 struct bpf_program *programs;
759 void bpf_program__unload(struct bpf_program *prog) in bpf_program__unload()
770 static void bpf_program__exit(struct bpf_program *prog) in bpf_program__exit()
807 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog, in bpf_object__init_prog()
872 struct bpf_program *prog, *progs; in bpf_object__add_programs()
956 struct bpf_program *prog = obj->programs; in bpf_object_bswap_progs()
1077 const struct bpf_program *prog) in is_valid_st_ops_program()
1096 struct bpf_program *prog, *slot_prog; in bpf_object_adjust_struct_ops_autoload()
1181 struct bpf_program *prog; in bpf_map__init_kern_struct_ops()
3443 static bool prog_needs_vmlinux_btf(struct bpf_program *prog) in prog_needs_vmlinux_btf()
3465 struct bpf_program *prog; in obj_needs_vmlinux_btf()
3547 struct bpf_program *prog = &obj->programs[i]; in bpf_object__sanitize_and_load_btf()
3803 const struct bpf_program *a = _a; in cmp_progs()
3804 const struct bpf_program *b = _b; in cmp_progs()
4431 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog) in prog_is_subprog()
4436 struct bpf_program *
4440 struct bpf_program *prog; in bpf_object__find_program_by_name()
4488 static int bpf_program__record_reloc(struct bpf_program *prog, in bpf_program__record_reloc()
4660 static bool prog_contains_insn(const struct bpf_program *prog, size_t insn_idx) in prog_contains_insn()
4666 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj, in find_prog_by_sec_insn()
4670 struct bpf_program *prog; in find_prog_by_sec_insn()
4699 struct bpf_program *prog; in bpf_object__collect_prog_relos()
5377 const struct bpf_program *targ_prog; in init_prog_array_slots()
5844 static int record_relo_core(struct bpf_program *prog, in record_relo_core()
5862 static const struct bpf_core_relo *find_relo_core(struct bpf_program *prog, int insn_idx) in find_relo_core()
5878 static int bpf_core_resolve_relo(struct bpf_program *prog, in bpf_core_resolve_relo()
5930 struct bpf_program *prog; in bpf_object__relocate_core()
6044 static void poison_map_ldimm64(struct bpf_program *prog, int relo_idx, in poison_map_ldimm64()
6074 static void poison_kfunc_call(struct bpf_program *prog, int relo_idx, in poison_kfunc_call()
6100 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_data()
6196 const struct bpf_program *prog, in adjust_prog_btf_ext_info()
6265 struct bpf_program *main_prog, in reloc_prog_func_and_line_info()
6266 const struct bpf_program *prog) in reloc_prog_func_and_line_info()
6345 static struct reloc_desc *find_prog_insn_relo(const struct bpf_program *prog, size_t insn_idx) in find_prog_insn_relo()
6353 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog) in append_subprog_relos()
6383 bpf_object__append_subprog_code(struct bpf_object *obj, struct bpf_program *main_prog, in bpf_object__append_subprog_code()
6384 struct bpf_program *subprog) in bpf_object__append_subprog_code()
6415 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog, in bpf_object__reloc_code()
6416 struct bpf_program *prog) in bpf_object__reloc_code()
6419 struct bpf_program *subprog; in bpf_object__reloc_code()
6605 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_calls()
6607 struct bpf_program *subprog; in bpf_object__relocate_calls()
6631 struct bpf_program *prog; in bpf_object__free_relocs()
6662 struct bpf_program *p = &obj->programs[i]; in bpf_object__sort_relos()
6671 static int bpf_prog_assign_exc_cb(struct bpf_object *obj, struct bpf_program *prog) in bpf_prog_assign_exc_cb()
6718 struct bpf_program *subprog = &obj->programs[j]; in bpf_prog_assign_exc_cb()
6793 static bool need_func_arg_type_fixup(const struct btf *btf, const struct bpf_program *prog, in need_func_arg_type_fixup()
6864 static int clone_func_btf_info(struct btf *btf, int orig_fn_id, struct bpf_program *prog) in clone_func_btf_info()
6933 static int bpf_program_fixup_func_info(struct bpf_object *obj, struct bpf_program *prog) in bpf_program_fixup_func_info()
7074 struct bpf_program *prog; in bpf_object__relocate()
7136 struct bpf_program *subprog = &obj->programs[prog->exception_cb_idx]; in bpf_object__relocate()
7191 struct bpf_program *targ_prog = NULL; in bpf_object__collect_map_relos()
7369 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__sanitize_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, in libbpf_prepare_prog_load()
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, in bpf_object_load_prog()
7705 static void fixup_log_failed_core_relo(struct bpf_program *prog, in fixup_log_failed_core_relo()
7744 static void fixup_log_missing_map_load(struct bpf_program *prog, in fixup_log_missing_map_load()
7777 static void fixup_log_missing_kfunc_call(struct bpf_program *prog, in fixup_log_missing_kfunc_call()
7810 static void fixup_verifier_log(struct bpf_program *prog, char *buf, size_t buf_sz) in fixup_verifier_log()
7860 static int bpf_program_record_relos(struct bpf_program *prog) in bpf_program_record_relos()
7906 struct bpf_program *prog; in bpf_object__load_progs()
7937 struct bpf_program *prog; in bpf_object_prepare_progs()
7954 struct bpf_program *prog; in bpf_object_init_progs()
8533 struct bpf_program *prog = st_ops->progs[i]; in bpf_map_prepare_vdata()
8739 int bpf_program__pin(struct bpf_program *prog, const char *path) in bpf_program__pin()
8766 int bpf_program__unpin(struct bpf_program *prog, const char *path) in bpf_program__unpin()
9005 struct bpf_program *prog; in bpf_object__pin_programs()
9042 struct bpf_program *prog; in bpf_object__unpin_programs()
9233 static struct bpf_program *
9234 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj, in __bpf_program__iter()
9259 struct bpf_program *
9260 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev) in bpf_object__next_program()
9262 struct bpf_program *prog = prev; in bpf_object__next_program()
9271 struct bpf_program *
9272 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next) in bpf_object__prev_program()
9274 struct bpf_program *prog = next; in bpf_object__prev_program()
9283 void bpf_program__set_ifindex(struct bpf_program *prog, __u32 ifindex) in bpf_program__set_ifindex()
9288 const char *bpf_program__name(const struct bpf_program *prog) in bpf_program__name()
9293 const char *bpf_program__section_name(const struct bpf_program *prog) in bpf_program__section_name()
9298 bool bpf_program__autoload(const struct bpf_program *prog) in bpf_program__autoload()
9303 int bpf_program__set_autoload(struct bpf_program *prog, bool autoload) in bpf_program__set_autoload()
9312 bool bpf_program__autoattach(const struct bpf_program *prog) in bpf_program__autoattach()
9317 void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach) in bpf_program__set_autoattach()
9322 const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog) in bpf_program__insns()
9327 size_t bpf_program__insn_cnt(const struct bpf_program *prog) in bpf_program__insn_cnt()
9332 int bpf_program__set_insns(struct bpf_program *prog, in bpf_program__set_insns()
9353 int bpf_program__fd(const struct bpf_program *prog) in bpf_program__fd()
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) in bpf_program__type()
9378 int bpf_program__set_type(struct bpf_program *prog, enum bpf_prog_type type) in bpf_program__set_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) in bpf_program__expected_attach_type()
9408 int bpf_program__set_expected_attach_type(struct bpf_program *prog, in bpf_program__set_expected_attach_type()
9418 __u32 bpf_program__flags(const struct bpf_program *prog) in bpf_program__flags()
9423 int bpf_program__set_flags(struct bpf_program *prog, __u32 flags) in bpf_program__set_flags()
9432 __u32 bpf_program__log_level(const struct bpf_program *prog) in bpf_program__log_level()
9437 int bpf_program__set_log_level(struct bpf_program *prog, __u32 log_level) in bpf_program__set_log_level()
9446 const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size) in bpf_program__log_buf()
9452 int bpf_program__set_log_buf(struct bpf_program *prog, char *log_buf, size_t log_size) in bpf_program__set_log_buf()
9466 struct bpf_func_info *bpf_program__func_info(const struct bpf_program *prog) in bpf_program__func_info()
9473 __u32 bpf_program__func_info_cnt(const struct bpf_program *prog) in bpf_program__func_info_cnt()
9478 struct bpf_line_info *bpf_program__line_info(const struct bpf_program *prog) in bpf_program__line_info()
9485 __u32 bpf_program__line_info_cnt(const struct bpf_program *prog) in bpf_program__line_info_cnt()
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 **lin…
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; in bpf_object__collect_st_ops_relos()
9977 *((struct bpf_program **)(st_ops->data + moff)) = prog; in bpf_object__collect_st_ops_relos()
10149 static int libbpf_find_attach_btf_id(struct bpf_program *prog, const char *attach_name, in libbpf_find_attach_btf_id()
10721 int bpf_link__update_program(struct bpf_link *link, struct bpf_program *prog) in bpf_link__update_program()
10908 struct bpf_link *bpf_program__attach_perf_event_opts(const struct bpf_program *prog, int pfd, in bpf_program__attach_perf_event_opts()
10986 struct bpf_link *bpf_program__attach_perf_event(const struct bpf_program *prog, int pfd) in bpf_program__attach_perf_event()
11305 bpf_program__attach_kprobe_opts(const struct bpf_program *prog, in bpf_program__attach_kprobe_opts()
11399 struct bpf_link *bpf_program__attach_kprobe(const struct bpf_program *prog, in bpf_program__attach_kprobe()
11410 struct bpf_link *bpf_program__attach_ksyscall(const struct bpf_program *prog, in bpf_program__attach_ksyscall()
11649 bpf_program__attach_kprobe_multi_opts(const struct bpf_program *prog, in bpf_program__attach_kprobe_multi_opts()
11750 static int attach_kprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_kprobe()
11787 static int attach_ksyscall(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_ksyscall()
11808 static int attach_kprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_kprobe_multi()
11839 static int attach_kprobe_session(const struct bpf_program *prog, long cookie, in attach_kprobe_session()
11865 static int attach_uprobe_multi(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_uprobe_multi()
12109 bpf_program__attach_uprobe_multi(const struct bpf_program *prog, in bpf_program__attach_uprobe_multi()
12237 bpf_program__attach_uprobe_opts(const struct bpf_program *prog, pid_t pid, in bpf_program__attach_uprobe_opts()
12383 static int attach_uprobe(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_uprobe()
12438 struct bpf_link *bpf_program__attach_uprobe(const struct bpf_program *prog, in bpf_program__attach_uprobe()
12448 struct bpf_link *bpf_program__attach_usdt(const struct bpf_program *prog, in bpf_program__attach_usdt()
12501 static int attach_usdt(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_usdt()
12580 struct bpf_link *bpf_program__attach_tracepoint_opts(const struct bpf_program *prog, in bpf_program__attach_tracepoint_opts()
12613 struct bpf_link *bpf_program__attach_tracepoint(const struct bpf_program *prog, in bpf_program__attach_tracepoint()
12620 static int attach_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_tp()
12653 bpf_program__attach_raw_tracepoint_opts(const struct bpf_program *prog, in bpf_program__attach_raw_tracepoint_opts()
12689 struct bpf_link *bpf_program__attach_raw_tracepoint(const struct bpf_program *prog, in bpf_program__attach_raw_tracepoint()
12695 static int attach_raw_tp(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_raw_tp()
12737 static struct bpf_link *bpf_program__attach_btf_id(const struct bpf_program *prog, in bpf_program__attach_btf_id()
12772 struct bpf_link *bpf_program__attach_trace(const struct bpf_program *prog) in bpf_program__attach_trace()
12777 struct bpf_link *bpf_program__attach_trace_opts(const struct bpf_program *prog, in bpf_program__attach_trace_opts()
12783 struct bpf_link *bpf_program__attach_lsm(const struct bpf_program *prog) in bpf_program__attach_lsm()
12788 static int attach_trace(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_trace()
12794 static int attach_lsm(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_lsm()
12801 bpf_program_attach_fd(const struct bpf_program *prog, in bpf_program_attach_fd()
12835 bpf_program__attach_cgroup(const struct bpf_program *prog, int cgroup_fd) in bpf_program__attach_cgroup()
12841 bpf_program__attach_netns(const struct bpf_program *prog, int netns_fd) in bpf_program__attach_netns()
12847 bpf_program__attach_sockmap(const struct bpf_program *prog, int map_fd) in bpf_program__attach_sockmap()
12852 struct bpf_link *bpf_program__attach_xdp(const struct bpf_program *prog, int ifindex) in bpf_program__attach_xdp()
12859 bpf_program__attach_cgroup_opts(const struct bpf_program *prog, int cgroup_fd, in bpf_program__attach_cgroup_opts()
12887 bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex, in bpf_program__attach_tcx()
12922 bpf_program__attach_netkit(const struct bpf_program *prog, int ifindex, in bpf_program__attach_netkit()
12955 struct bpf_link *bpf_program__attach_freplace(const struct bpf_program *prog, in bpf_program__attach_freplace()
12993 bpf_program__attach_iter(const struct bpf_program *prog, in bpf_program__attach_iter()
13031 static int attach_iter(const struct bpf_program *prog, long cookie, struct bpf_link **link) in attach_iter()
13037 struct bpf_link *bpf_program__attach_netfilter(const struct bpf_program *prog, in bpf_program__attach_netfilter()
13077 struct bpf_link *bpf_program__attach(const struct bpf_program *prog) in bpf_program__attach()
13774 int bpf_program__set_attach_target(struct bpf_program *prog, in bpf_program__set_attach_target()
13956 struct bpf_program **prog = prog_skel->prog; in populate_skeleton_progs()
14097 struct bpf_program *prog = *prog_skel->prog; in bpf_object__attach_skeleton()