Home
last modified time | relevance | path

Searched refs:bpf_prog (Results 1 – 25 of 227) sorted by relevance

12345678910

/Linux-v6.1/include/linux/
Dbpf.h35 struct bpf_prog;
118 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old,
119 struct bpf_prog *new);
601 bool (*allowed)(const struct bpf_prog *prog);
705 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr,
713 const struct bpf_prog *prog);
719 const struct bpf_prog *prog,
722 const struct bpf_prog *prog);
728 struct bpf_prog *prog, u32 *target_size);
746 int (*prepare)(struct bpf_prog *prog);
[all …]
Dfilter.h565 struct bpf_prog *prog;
581 static __always_inline u32 __bpf_prog_run(const struct bpf_prog *prog, in __bpf_prog_run()
605 static __always_inline u32 bpf_prog_run(const struct bpf_prog *prog, const void *ctx) in bpf_prog_run()
618 static inline u32 bpf_prog_run_pin_on_cpu(const struct bpf_prog *prog, in bpf_prog_run_pin_on_cpu()
717 static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog, in __bpf_prog_run_save_cb()
738 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb()
749 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb()
768 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, in bpf_prog_run_xdp()
785 void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog);
787 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) in bpf_prog_insn_size()
[all …]
Dbpf-netns.h26 struct bpf_prog;
32 struct bpf_prog *prog);
35 struct bpf_prog *prog);
44 struct bpf_prog *prog) in netns_bpf_prog_attach()
56 struct bpf_prog *prog) in netns_bpf_link_create()
Dtrace_events.h17 struct bpf_prog;
740 int perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie);
743 int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog);
744 int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog);
750 int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
758 perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie) in perf_event_attach_bpf_prog()
770 static inline int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_register()
774 static inline int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_unregister()
793 bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in bpf_kprobe_multi_link_attach()
873 int perf_event_set_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie);
[all …]
Dbpf_lsm.h28 const struct bpf_prog *prog);
45 void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, bpf_func_t *bpf_func);
55 const struct bpf_prog *prog) in bpf_lsm_verify_prog()
70 static inline void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, in bpf_lsm_find_cgroup_shim()
Dbpf-cgroup.h19 struct bpf_prog;
106 struct bpf_prog *prog;
163 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog,
411 enum bpf_prog_type ptype, struct bpf_prog *prog);
414 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
419 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog);
421 cgroup_current_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog);
429 struct bpf_prog *prog) in cgroup_bpf_prog_attach()
441 struct bpf_prog *prog) in cgroup_bpf_link_attach()
453 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_common_func_proto()
[all …]
/Linux-v6.1/drivers/net/ethernet/microsoft/mana/
Dmana_bpf.c84 struct bpf_prog *prog; in mana_run_xdp()
88 prog = rcu_dereference(rxq->bpf_prog); in mana_run_xdp()
142 struct bpf_prog *mana_xdp_get(struct mana_port_context *apc) in mana_xdp_get()
146 return apc->bpf_prog; in mana_xdp_get()
149 static struct bpf_prog *mana_chn_xdp_get(struct mana_port_context *apc) in mana_chn_xdp_get()
151 return rtnl_dereference(apc->rxqs[0]->bpf_prog); in mana_chn_xdp_get()
155 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog) in mana_chn_setxdp()
157 struct bpf_prog *old_prog = mana_chn_xdp_get(apc); in mana_chn_setxdp()
170 rcu_assign_pointer(apc->rxqs[i]->bpf_prog, prog); in mana_chn_setxdp()
177 static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog, in mana_xdp_set()
[all …]
/Linux-v6.1/kernel/bpf/
Dprog_iter.c16 struct bpf_prog *prog; in bpf_prog_seq_start()
33 bpf_prog_put((struct bpf_prog *)v); in bpf_prog_seq_next()
39 __bpf_md_ptr(struct bpf_prog *, prog);
42 DEFINE_BPF_ITER_FUNC(bpf_prog, struct bpf_iter_meta *meta, struct bpf_prog *prog) in DEFINE_BPF_ITER_FUNC() argument
48 struct bpf_prog *prog; in DEFINE_BPF_ITER_FUNC()
71 bpf_prog_put((struct bpf_prog *)v); in bpf_prog_seq_stop()
82 BTF_ID(struct, bpf_prog)
Dcgroup.c37 const struct bpf_prog *prog; in bpf_prog_run_array_cg()
69 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_sock()
78 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_sock()
91 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_socket()
100 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_socket()
113 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_current()
118 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_current()
209 struct bpf_prog *prog, in bpf_cgroup_storages_alloc()
343 static struct bpf_prog *prog_list_prog(struct bpf_prog_list *pl) in prog_list_prog()
557 struct bpf_prog *prog, in find_attach_entry()
[all …]
Dcore.c84 struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc_no_stats()
88 struct bpf_prog *fp; in bpf_prog_alloc_no_stats()
123 struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc()
126 struct bpf_prog *prog; in bpf_prog_alloc()
151 int bpf_prog_alloc_jited_linfo(struct bpf_prog *prog) in bpf_prog_alloc_jited_linfo()
165 void bpf_prog_jit_attempt_done(struct bpf_prog *prog) in bpf_prog_jit_attempt_done()
201 void bpf_prog_fill_jited_linfo(struct bpf_prog *prog, in bpf_prog_fill_jited_linfo()
230 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc()
234 struct bpf_prog *fp; in bpf_prog_realloc()
260 void __bpf_prog_free(struct bpf_prog *fp) in __bpf_prog_free()
[all …]
Ddispatcher.c26 struct bpf_dispatcher *d, struct bpf_prog *prog) in bpf_dispatcher_find_prog()
44 struct bpf_prog *prog) in bpf_dispatcher_add_prog()
69 struct bpf_prog *prog) in bpf_dispatcher_remove_prog()
132 void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from, in bpf_dispatcher_change_prog()
133 struct bpf_prog *to) in bpf_dispatcher_change_prog()
Dtrampoline.c108 bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline()
510 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in bpf_attach_type_to_tramp()
645 static struct bpf_shim_tramp_link *cgroup_shim_alloc(const struct bpf_prog *prog, in cgroup_shim_alloc()
650 struct bpf_prog *p; in cgroup_shim_alloc()
688 struct bpf_prog *p = link->link.prog; in cgroup_shim_find()
698 int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog, in bpf_trampoline_link_cgroup_shim()
764 void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog) in bpf_trampoline_unlink_cgroup_shim()
867 u64 notrace __bpf_prog_enter(struct bpf_prog *prog, struct bpf_tramp_run_ctx *run_ctx) in __bpf_prog_enter()
882 static void notrace update_prog_stats(struct bpf_prog *prog, in update_prog_stats()
904 void notrace __bpf_prog_exit(struct bpf_prog *prog, u64 start, struct bpf_tramp_run_ctx *run_ctx) in __bpf_prog_exit()
[all …]
Doffload.c80 int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr) in bpf_prog_offload_init()
127 int bpf_prog_offload_verifier_prep(struct bpf_prog *prog) in bpf_prog_offload_verifier_prep()
212 static void __bpf_prog_offload_destroy(struct bpf_prog *prog) in __bpf_prog_offload_destroy()
227 void bpf_prog_offload_destroy(struct bpf_prog *prog) in bpf_prog_offload_destroy()
235 static int bpf_prog_offload_translate(struct bpf_prog *prog) in bpf_prog_offload_translate()
256 int bpf_prog_offload_compile(struct bpf_prog *prog) in bpf_prog_offload_compile()
264 struct bpf_prog *prog;
295 struct bpf_prog *prog) in bpf_prog_offload_info_fill()
546 static bool __bpf_offload_dev_match(struct bpf_prog *prog, in __bpf_offload_dev_match()
567 bool bpf_offload_dev_match(struct bpf_prog *prog, struct net_device *netdev) in bpf_offload_dev_match()
[all …]
/Linux-v6.1/tools/testing/selftests/bpf/prog_tests/
Dxdp_cpumap_attach.c40 val.bpf_prog.fd = prog_fd; in test_xdp_with_cpumap_helpers()
46 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to cpumap entry prog_id"); in test_xdp_with_cpumap_helpers()
54 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_cpumap_helpers()
63 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_cm_frags); in test_xdp_with_cpumap_helpers()
92 val.bpf_prog.fd = frags_prog_fd; in test_xdp_with_cpumap_frags_helpers()
98 ASSERT_EQ(info.id, val.bpf_prog.id, in test_xdp_with_cpumap_frags_helpers()
106 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_cm); in test_xdp_with_cpumap_frags_helpers()
Dxdp_devmap_attach.c42 val.bpf_prog.fd = dm_fd; in test_xdp_with_devmap_helpers()
48 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to devmap entry prog_id"); in test_xdp_with_devmap_helpers()
56 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers()
65 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm_frags); in test_xdp_with_devmap_helpers()
105 val.bpf_prog.fd = dm_fd_frags; in test_xdp_with_devmap_frags_helpers()
111 ASSERT_EQ(info.id, val.bpf_prog.id, in test_xdp_with_devmap_frags_helpers()
119 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_frags_helpers()
/Linux-v6.1/tools/testing/selftests/net/
Dpsock_lib.h63 struct sock_fprog bpf_prog; in pair_udp_setfilter() local
65 bpf_prog.filter = bpf_filter; in pair_udp_setfilter()
66 bpf_prog.len = sizeof(bpf_filter) / sizeof(struct sock_filter); in pair_udp_setfilter()
68 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter()
69 sizeof(bpf_prog))) { in pair_udp_setfilter()
/Linux-v6.1/drivers/net/hyperv/
Dnetvsc_bpf.c31 struct bpf_prog *prog; in netvsc_run_xdp()
38 prog = rcu_dereference(nvchan->bpf_prog); in netvsc_run_xdp()
119 struct bpf_prog *netvsc_xdp_get(struct netvsc_device *nvdev) in netvsc_xdp_get()
121 return rtnl_dereference(nvdev->chan_table[0].bpf_prog); in netvsc_xdp_get()
124 int netvsc_xdp_set(struct net_device *dev, struct bpf_prog *prog, in netvsc_xdp_set()
128 struct bpf_prog *old_prog; in netvsc_xdp_set()
156 rcu_assign_pointer(nvdev->chan_table[i].bpf_prog, prog); in netvsc_xdp_set()
165 int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog) in netvsc_vf_setxdp()
/Linux-v6.1/include/uapi/linux/netfilter/
Dxt_bpf.h12 struct bpf_prog;
19 struct bpf_prog *filter __attribute__((aligned(8)));
39 struct bpf_prog *filter __attribute__((aligned(8)));
/Linux-v6.1/arch/um/drivers/
Dvector_user.c779 struct sock_fprog *bpf_prog; in uml_vector_default_bpf() local
781 bpf_prog = uml_kmalloc(sizeof(struct sock_fprog), UM_GFP_KERNEL); in uml_vector_default_bpf()
782 if (bpf_prog) { in uml_vector_default_bpf()
783 bpf_prog->len = DEFAULT_BPF_LEN; in uml_vector_default_bpf()
784 bpf_prog->filter = NULL; in uml_vector_default_bpf()
791 bpf_prog->filter = bpf; in uml_vector_default_bpf()
805 kfree(bpf_prog); in uml_vector_default_bpf()
806 bpf_prog = NULL; in uml_vector_default_bpf()
808 return bpf_prog; in uml_vector_default_bpf()
816 struct sock_fprog *bpf_prog; in uml_vector_user_bpf() local
[all …]
/Linux-v6.1/kernel/bpf/preload/iterators/
Diterators.bpf.c44 struct bpf_prog *dst_prog;
49 struct bpf_prog { struct
55 struct bpf_prog *prog;
98 struct bpf_prog *prog = ctx->prog; in dump_bpf_prog()
/Linux-v6.1/net/netfilter/
Dxt_bpf.c25 struct bpf_prog **ret) in __bpf_mt_check_bytecode()
43 static int __bpf_mt_check_fd(int fd, struct bpf_prog **ret) in __bpf_mt_check_fd()
45 struct bpf_prog *prog; in __bpf_mt_check_fd()
55 static int __bpf_mt_check_path(const char *path, struct bpf_prog **ret) in __bpf_mt_check_path()
/Linux-v6.1/drivers/media/rc/
Dbpf-lirc.c83 lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in lirc_mode2_func_proto()
123 const struct bpf_prog *prog, in lirc_mode2_is_valid_access()
137 static int lirc_bpf_attach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_attach()
175 static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_detach()
248 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) in lirc_prog_attach()
269 struct bpf_prog *prog; in lirc_prog_detach()
/Linux-v6.1/include/net/netns/
Dbpf.h11 struct bpf_prog;
24 struct bpf_prog *progs[MAX_NETNS_BPF_ATTACH_TYPE];
/Linux-v6.1/samples/bpf/
Dxdp_sample.bpf.c97 const struct bpf_prog *xdp, const void *tgt, int err, in BPF_PROG()
105 const struct bpf_prog *xdp, const void *tgt, int err, in BPF_PROG()
113 const struct bpf_prog *xdp, const void *tgt, int err, in BPF_PROG()
121 const struct bpf_prog *xdp, const void *tgt, int err, in BPF_PROG()
182 const struct bpf_prog *xdp, u32 act) in BPF_PROG()
/Linux-v6.1/arch/powerpc/net/
Dbpf_jit_comp.c27 static int bpf_jit_fixup_addresses(struct bpf_prog *fp, u32 *image, in bpf_jit_fixup_addresses()
123 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp) in bpf_int_jit_compile()
135 struct bpf_prog *org_fp = fp; in bpf_int_jit_compile()
136 struct bpf_prog *tmp_fp; in bpf_int_jit_compile()
316 int bpf_add_extable_entry(struct bpf_prog *fp, u32 *image, int pass, struct codegen_context *ctx, in bpf_add_extable_entry()

12345678910