/openbmc/linux/include/linux/ |
H A D | bpf.h | 36 struct bpf_prog; 126 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old, 127 struct bpf_prog *new); 832 bool (*allowed)(const struct bpf_prog *prog); 940 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr, 949 const struct bpf_prog *prog); 955 const struct bpf_prog *prog, 958 const struct bpf_prog *prog); 964 struct bpf_prog *prog, u32 *target_size); 980 int (*prepare)(struct bpf_prog *prog); [all …]
|
H A D | filter.h | 578 struct bpf_prog *prog; 593 static __always_inline u32 __bpf_prog_run(const struct bpf_prog *prog, in __bpf_prog_run() 617 static __always_inline u32 bpf_prog_run(const struct bpf_prog *prog, const void *ctx) in bpf_prog_run() 630 static inline u32 bpf_prog_run_pin_on_cpu(const struct bpf_prog *prog, in bpf_prog_run_pin_on_cpu() 729 static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog, in __bpf_prog_run_save_cb() 750 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb() 761 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb() 780 void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog); 782 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) in bpf_prog_insn_size() 787 static inline u32 bpf_prog_tag_scratch_size(const struct bpf_prog *prog) in bpf_prog_tag_scratch_size() [all …]
|
H A D | bpf_lsm.h | 28 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 D | bpf-netns.h | 26 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 D | trace_events.h | 17 struct bpf_prog; 763 int perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie); 766 int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog); 767 int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog); 774 int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); 775 int bpf_uprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); 783 perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie) in perf_event_attach_bpf_prog() 795 static inline int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_register() 799 static inline int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_unregister() 818 bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in bpf_kprobe_multi_link_attach() [all …]
|
H A D | bpf_mprog.h | 132 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 D | bpf-cgroup.h | 19 struct bpf_prog; 106 struct bpf_prog *prog; 165 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog, 405 enum bpf_prog_type ptype, struct bpf_prog *prog); 408 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); 413 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog); 415 cgroup_current_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog); 423 struct bpf_prog *prog) in cgroup_bpf_prog_attach() 435 struct bpf_prog *prog) in cgroup_bpf_link_attach() 447 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_common_func_proto() [all …]
|
/openbmc/linux/drivers/net/ethernet/microsoft/mana/ |
H A D | mana_bpf.c | 84 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() 149 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog) in mana_chn_setxdp() 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() [all …]
|
/openbmc/linux/kernel/bpf/ |
H A D | prog_iter.c | 16 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 D | core.c | 91 struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc_no_stats() 95 struct bpf_prog *fp; in bpf_prog_alloc_no_stats() 130 struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc() 133 struct bpf_prog *prog; in bpf_prog_alloc() 158 int bpf_prog_alloc_jited_linfo(struct bpf_prog *prog) in bpf_prog_alloc_jited_linfo() 172 void bpf_prog_jit_attempt_done(struct bpf_prog *prog) in bpf_prog_jit_attempt_done() 208 void bpf_prog_fill_jited_linfo(struct bpf_prog *prog, in bpf_prog_fill_jited_linfo() 237 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc() 241 struct bpf_prog *fp; in bpf_prog_realloc() 267 void __bpf_prog_free(struct bpf_prog *fp) in __bpf_prog_free() [all …]
|
H A D | trampoline.c | 107 bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline() 491 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in bpf_attach_type_to_tramp() 626 static struct bpf_shim_tramp_link *cgroup_shim_alloc(const struct bpf_prog *prog, in cgroup_shim_alloc() 631 struct bpf_prog *p; in cgroup_shim_alloc() 669 struct bpf_prog *p = link->link.prog; in cgroup_shim_find() 679 int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog, in bpf_trampoline_link_cgroup_shim() 745 void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog) in bpf_trampoline_unlink_cgroup_shim() 848 static u64 notrace __bpf_prog_enter_recur(struct bpf_prog *prog, struct bpf_tramp_run_ctx *run_ctx) in __bpf_prog_enter_recur() 863 static void notrace update_prog_stats(struct bpf_prog *prog, in update_prog_stats() 885 static void notrace __bpf_prog_exit_recur(struct bpf_prog *prog, u64 start, in __bpf_prog_exit_recur() [all …]
|
H A D | offload.c | 108 static void __bpf_prog_offload_destroy(struct bpf_prog *prog) in __bpf_prog_offload_destroy() 188 static int __bpf_prog_dev_bound_init(struct bpf_prog *prog, struct net_device *netdev) in __bpf_prog_dev_bound_init() 228 int bpf_prog_dev_bound_init(struct bpf_prog *prog, union bpf_attr *attr) in bpf_prog_dev_bound_init() 263 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() 289 int bpf_prog_offload_verifier_prep(struct bpf_prog *prog) in bpf_prog_offload_verifier_prep() 374 void bpf_prog_dev_bound_destroy(struct bpf_prog *prog) in bpf_prog_dev_bound_destroy() 395 static int bpf_prog_offload_translate(struct bpf_prog *prog) in bpf_prog_offload_translate() 416 int bpf_prog_offload_compile(struct bpf_prog *prog) in bpf_prog_offload_compile() 424 struct bpf_prog *prog; 455 struct bpf_prog *prog) in bpf_prog_offload_info_fill() [all …]
|
H A D | cgroup.c | 54 const struct bpf_prog *prog; in bpf_prog_run_array_cg() 86 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_sock() 95 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_sock() 108 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_socket() 117 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_socket() 130 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_current() 135 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_current() 226 struct bpf_prog *prog, in bpf_cgroup_storages_alloc() 360 static struct bpf_prog *prog_list_prog(struct bpf_prog_list *pl) in prog_list_prog() 574 struct bpf_prog *prog, in find_attach_entry() [all …]
|
H A D | dispatcher.c | 26 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()
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | xdp_cpumap_attach.c | 40 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 D | xdp_devmap_attach.c | 42 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()
|
/openbmc/linux/tools/testing/selftests/net/ |
H A D | psock_lib.h | 65 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()
|
/openbmc/linux/include/net/ |
H A D | tcx.h | 168 int tcx_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); 169 int tcx_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); 170 int tcx_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog); 184 struct bpf_prog *prog) in tcx_prog_attach() 190 struct bpf_prog *prog) in tcx_link_attach() 196 struct bpf_prog *prog) in tcx_prog_detach()
|
/openbmc/linux/drivers/net/hyperv/ |
H A D | netvsc_bpf.c | 31 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()
|
/openbmc/linux/arch/um/drivers/ |
H A D | vector_user.c | 779 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 …]
|
/openbmc/linux/drivers/hid/bpf/ |
H A D | hid_bpf_dispatch.h | 15 int hid_bpf_get_prog_attach_type(struct bpf_prog *prog); 17 struct bpf_prog *prog, __u32 flags); 23 struct bpf_prog;
|
/openbmc/linux/include/uapi/linux/netfilter/ |
H A D | xt_bpf.h | 12 struct bpf_prog; 19 struct bpf_prog *filter __attribute__((aligned(8))); 39 struct bpf_prog *filter __attribute__((aligned(8)));
|
/openbmc/linux/net/netfilter/ |
H A D | nf_bpf_link.c | 11 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() 165 static int bpf_nf_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_nf_link_update() 166 struct bpf_prog *old_prog) in bpf_nf_link_update() 210 int bpf_nf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in bpf_nf_link_attach() 292 const struct bpf_prog *prog, in nf_is_valid_access() 320 bpf_nf_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in bpf_nf_func_proto()
|
H A D | xt_bpf.c | 25 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()
|
/openbmc/linux/kernel/bpf/preload/iterators/ |
H A D | iterators.bpf.c | 44 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()
|