Home
last modified time | relevance | path

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

1234567891011

/linux/include/linux/
H A Dbpf.h37 struct bpf_prog;
995 struct bpf_prog *prog;
1214 struct bpf_prog *prog;
1477 struct bpf_prog **func;
1491 struct bpf_prog *prog;
1538 struct bpf_prog { struct
1586 struct bpf_prog *prog; argument
1989 struct bpf_prog *prog;
2211 struct bpf_prog * __must_check bpf_prog_inc_not_zero(struct bpf_prog *prog);
3127 struct bpf_prog *prog; in bpf_prog_inc_misses_counters()
[all …]
H A Dfilter.h655 struct bpf_prog *prog;
966 void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog);
1055 struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err);
1067 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
1100 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog);
1124 struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
1174 struct bpf_prog *prog);
1178 struct bpf_prog *prog);
1249 struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *fp);
1250 void bpf_jit_prog_release_other(struct bpf_prog *fp, struct bpf_prog *fp_other);
[all …]
H A Dbpf_lsm.h28 const struct bpf_prog *prog);
31 bool bpf_lsm_is_trusted(const struct bpf_prog *prog);
46 void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, bpf_func_t *bpf_func);
55 static inline bool bpf_lsm_is_trusted(const struct bpf_prog *prog) in bpf_lsm_is_trusted()
61 const struct bpf_prog *prog) in bpf_lsm_verify_prog()
76 static inline void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, in bpf_lsm_find_cgroup_shim()
H A 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()
H A Dbpf_mprog.h132 struct bpf_prog *prog;
148 struct bpf_prog *ref;
154 struct bpf_prog *prog;
203 struct bpf_prog *prog) in bpf_mprog_exists()
206 const struct bpf_prog *tmp; in bpf_mprog_exists()
322 struct bpf_prog *prog_new, struct bpf_link *link,
323 struct bpf_prog *prog_old,
328 struct bpf_prog *prog, struct bpf_link *link,
H A Dbpf-cgroup.h19 struct bpf_prog;
111 struct bpf_prog *prog;
170 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog,
428 enum bpf_prog_type ptype, struct bpf_prog *prog);
431 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
436 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog);
446 struct bpf_prog *prog) in cgroup_bpf_prog_attach()
458 struct bpf_prog *prog) in cgroup_bpf_link_attach()
470 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_common_func_proto()
476 cgroup_current_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_current_func_proto()
[all …]
/linux/drivers/net/ethernet/microsoft/mana/
H A Dmana_bpf.c84 struct bpf_prog *prog; in mana_run_xdp()
88 prog = rcu_dereference(rxq->bpf_prog); in mana_run_xdp()
136 struct bpf_prog *mana_xdp_get(struct mana_port_context *apc) in mana_xdp_get()
140 return apc->bpf_prog; in mana_xdp_get()
143 static struct bpf_prog *mana_chn_xdp_get(struct mana_port_context *apc) in mana_chn_xdp_get()
145 return rtnl_dereference(apc->rxqs[0]->bpf_prog); in mana_chn_xdp_get()
151 struct bpf_prog *old_prog = mana_chn_xdp_get(apc); in mana_chn_setxdp()
164 rcu_assign_pointer(apc->rxqs[i]->bpf_prog, prog); in mana_chn_setxdp()
171 static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog, in mana_xdp_set()
175 struct bpf_prog *old_prog; in mana_xdp_set()
[all …]
/linux/kernel/bpf/
H A 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)
H A Dcore.c101 struct bpf_prog *fp; in bpf_prog_alloc_no_stats()
142 struct bpf_prog *prog; in bpf_prog_alloc()
246 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc()
250 struct bpf_prog *fp; in bpf_prog_realloc()
478 struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, in bpf_patch_insn_single()
786 struct bpf_prog *prog; in search_bpf_extables()
1424 static struct bpf_prog *bpf_prog_clone_create(struct bpf_prog *fp_other, in bpf_prog_clone_create()
1428 struct bpf_prog *fp; in bpf_prog_clone_create()
1466 struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *prog) in bpf_jit_blind_constants()
2381 struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err) in bpf_prog_select_runtime()
[all …]
H A 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()
137 void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from, in bpf_dispatcher_change_prog()
138 struct bpf_prog *to) in bpf_dispatcher_change_prog()
H A Dtrampoline.c107 bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline()
644 struct bpf_prog *p; in cgroup_shim_alloc()
682 struct bpf_prog *p = link->link.prog; in cgroup_shim_find()
692 int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog, in bpf_trampoline_link_cgroup_shim()
758 void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog) in bpf_trampoline_unlink_cgroup_shim()
876 static void notrace update_prog_stats(struct bpf_prog *prog, in update_prog_stats()
911 static u64 notrace __bpf_prog_enter_lsm_cgroup(struct bpf_prog *prog, in __bpf_prog_enter_lsm_cgroup()
936 u64 notrace __bpf_prog_enter_sleepable_recur(struct bpf_prog *prog, in __bpf_prog_enter_sleepable_recur()
963 static u64 notrace __bpf_prog_enter_sleepable(struct bpf_prog *prog, in __bpf_prog_enter_sleepable()
985 static u64 notrace __bpf_prog_enter(struct bpf_prog *prog, in __bpf_prog_enter()
[all …]
H A Doffload.c108 static void __bpf_prog_offload_destroy(struct bpf_prog *prog) in __bpf_prog_offload_destroy()
270 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit()
296 int bpf_prog_offload_verifier_prep(struct bpf_prog *prog) in bpf_prog_offload_verifier_prep()
381 void bpf_prog_dev_bound_destroy(struct bpf_prog *prog) in bpf_prog_dev_bound_destroy()
402 static int bpf_prog_offload_translate(struct bpf_prog *prog) in bpf_prog_offload_translate()
423 int bpf_prog_offload_compile(struct bpf_prog *prog) in bpf_prog_offload_compile()
431 struct bpf_prog *prog;
462 struct bpf_prog *prog) in bpf_prog_offload_info_fill()
694 static bool __bpf_offload_dev_match(struct bpf_prog *prog, in __bpf_offload_dev_match()
727 bool bpf_prog_dev_bound_match(const struct bpf_prog *lhs, const struct bpf_prog *rhs) in bpf_prog_dev_bound_match()
[all …]
H A Dcgroup.c37 const struct bpf_prog *prog; in bpf_prog_run_array_cg()
78 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_sock()
100 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_socket()
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()
608 struct bpf_prog *prog, struct bpf_prog *replace_prog, in __cgroup_bpf_attach()
725 struct bpf_prog *prog, struct bpf_prog *replace_prog, in cgroup_bpf_attach()
798 struct bpf_prog *old_prog; in __cgroup_bpf_replace()
954 struct bpf_prog *old_prog; in __cgroup_bpf_detach()
1087 struct bpf_prog *prog; in __cgroup_bpf_query()
[all …]
/linux/include/net/
H A Dnetkit.h9 int netkit_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
10 int netkit_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
11 int netkit_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog);
16 struct bpf_prog *prog) in netkit_prog_attach()
22 struct bpf_prog *prog) in netkit_link_attach()
28 struct bpf_prog *prog) in netkit_prog_detach()
H A Dtcx.h164 int tcx_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
165 int tcx_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
166 int tcx_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog);
180 struct bpf_prog *prog) in tcx_prog_attach()
186 struct bpf_prog *prog) in tcx_link_attach()
192 struct bpf_prog *prog) in tcx_prog_detach()
/linux/tools/testing/selftests/bpf/prog_tests/
H A 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()
H A 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/tools/testing/selftests/net/
H A Dpsock_lib.h65 struct sock_fprog bpf_prog; in pair_udp_setfilter() local
67 bpf_prog.filter = bpf_filter; in pair_udp_setfilter()
68 bpf_prog.len = ARRAY_SIZE(bpf_filter); in pair_udp_setfilter()
70 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter()
71 sizeof(bpf_prog))) { in pair_udp_setfilter()
/linux/drivers/net/hyperv/
H A 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/arch/um/drivers/
H A Dvector_user.c782 if (bpf_prog) { 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()
828 if (bpf_prog == NULL) { in uml_vector_user_bpf()
833 bpf_prog->filter = NULL; in uml_vector_user_bpf()
844 bpf_prog->filter = bpf; in uml_vector_user_bpf()
852 return bpf_prog; in uml_vector_user_bpf()
[all …]
/linux/net/netfilter/
H A Dnf_bpf_link.c11 static unsigned int nf_hook_run_bpf(void *bpf_prog, struct sk_buff *skb, in nf_hook_run_bpf() argument
14 const struct bpf_prog *prog = bpf_prog; in nf_hook_run_bpf()
162 static int bpf_nf_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_nf_link_update()
163 struct bpf_prog *old_prog) in bpf_nf_link_update()
207 int bpf_nf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in bpf_nf_link_attach()
287 const struct bpf_prog *prog, in nf_is_valid_access()
315 bpf_nf_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in bpf_nf_func_proto()
H A 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/include/uapi/linux/netfilter/
H A Dxt_bpf.h12 struct bpf_prog;
19 struct bpf_prog *filter __attribute__((aligned(8)));
39 struct bpf_prog *filter __attribute__((aligned(8)));
/linux/kernel/bpf/preload/iterators/
H A Diterators.bpf.c44 struct bpf_prog *dst_prog;
49 struct bpf_prog { struct
55 struct bpf_prog *prog;
103 struct bpf_prog *prog = ctx->prog; in dump_bpf_prog()
/linux/drivers/media/rc/
H A 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()

1234567891011