| /linux/include/linux/ |
| H A D | bpf.h | 43 struct bpf_prog; 139 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old, 140 struct bpf_prog *new); 655 struct bpf_map *bpf_prog_arena(struct bpf_prog *prog); 1024 bool (*allowed)(const struct bpf_prog *prog); 1137 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr, 1146 const struct bpf_prog *prog); 1152 const struct bpf_prog *prog, 1155 const struct bpf_prog *prog); 1156 int (*gen_epilogue)(struct bpf_insn *insn, const struct bpf_prog *prog, [all …]
|
| H A D | bpf_lsm.h | 31 const struct bpf_prog *prog); 34 bool bpf_lsm_is_trusted(const struct bpf_prog *prog); 49 void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, bpf_func_t *bpf_func); 51 int bpf_lsm_get_retval_range(const struct bpf_prog *prog, 56 bool bpf_lsm_has_d_inode_locked(const struct bpf_prog *prog); 68 static inline bool bpf_lsm_is_trusted(const struct bpf_prog *prog) in bpf_lsm_is_trusted() 74 const struct bpf_prog *prog) in bpf_lsm_verify_prog() 89 static inline void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, in bpf_lsm_find_cgroup_shim() 94 static inline int bpf_lsm_get_retval_range(const struct bpf_prog *prog, in bpf_lsm_get_retval_range() 108 static inline bool bpf_lsm_has_d_inode_locked(const struct bpf_prog *prog) in bpf_lsm_has_d_inode_locked()
|
| H A D | filter.h | 741 struct bpf_prog *prog; 756 static __always_inline u32 __bpf_prog_run(const struct bpf_prog *prog, in __bpf_prog_run() 784 static __always_inline u32 bpf_prog_run(const struct bpf_prog *prog, const void *ctx) in bpf_prog_run() 797 static inline u32 bpf_prog_run_pin_on_cpu(const struct bpf_prog *prog, in bpf_prog_run_pin_on_cpu() 984 const struct bpf_prog *prog, in bpf_prog_run_data_pointers() 1044 static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog, in __bpf_prog_run_save_cb() 1065 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb() 1076 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb() 1095 void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog); 1097 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) in bpf_prog_insn_size() [all …]
|
| 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()
|
| /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 …]
|
| /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() 81 BTF_ID_LIST_SINGLE(btf_bpf_prog_id, struct, bpf_prog)
|
| H A D | core.c | 100 struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc_no_stats() 104 struct bpf_prog *fp; in bpf_prog_alloc_no_stats() 151 struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc() 154 struct bpf_prog *prog; in bpf_prog_alloc() 179 int bpf_prog_alloc_jited_linfo(struct bpf_prog *prog) in bpf_prog_alloc_jited_linfo() 193 void bpf_prog_jit_attempt_done(struct bpf_prog *prog) in bpf_prog_jit_attempt_done() 229 void bpf_prog_fill_jited_linfo(struct bpf_prog *prog, in bpf_prog_fill_jited_linfo() 258 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc() 262 struct bpf_prog *fp; in bpf_prog_realloc() 288 void __bpf_prog_free(struct bpf_prog *fp) in __bpf_prog_free() [all …]
|
| H A D | cgroup.c | 90 const struct bpf_prog *prog; in bpf_prog_run_array_cg() 121 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_sock() 130 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_sock() 143 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_socket() 152 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_socket() 165 const struct bpf_prog *shim_prog; in __cgroup_bpf_run_lsm_current() 170 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_current() 259 struct bpf_prog *prog, in bpf_cgroup_storages_alloc() 393 static struct bpf_prog *prog_list_prog(struct bpf_prog_list *pl) in prog_list_prog() 644 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()
|
| H A D | trampoline.c | 177 bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline() 541 const struct bpf_prog *prog; in bpf_tramp_arena_base() 819 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in bpf_attach_type_to_tramp() 846 static int bpf_freplace_check_tgt_prog(struct bpf_prog *tgt_prog) in bpf_freplace_check_tgt_prog() 944 struct bpf_prog *tgt_prog, in __bpf_trampoline_link_prog() 992 struct bpf_prog *tgt_prog) in bpf_trampoline_link_prog() 1004 struct bpf_prog *tgt_prog, in __bpf_trampoline_unlink_prog() 1029 struct bpf_prog *tgt_prog) in bpf_trampoline_unlink_prog() 1069 static struct bpf_shim_tramp_link *cgroup_shim_alloc(const struct bpf_prog *prog, in cgroup_shim_alloc() 1075 struct bpf_prog *p; in cgroup_shim_alloc() [all …]
|
| H A D | tcx.c | 10 int tcx_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) in tcx_prog_attach() 15 struct bpf_prog *replace_prog = NULL; in tcx_prog_attach() 59 int tcx_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog) in tcx_prog_detach() 203 static int tcx_link_update(struct bpf_link *link, struct bpf_prog *nprog, in tcx_link_update() 204 struct bpf_prog *oprog) in tcx_link_update() 302 struct bpf_prog *prog) in tcx_link_init() 310 int tcx_link_attach(const union bpf_attr *attr, struct bpf_prog *prog) in tcx_link_attach()
|
| /linux/include/net/ |
| H A D | netkit.h | 9 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 D | tcx.h | 163 int tcx_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); 164 int tcx_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); 165 int tcx_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog); 179 struct bpf_prog *prog) in tcx_prog_attach() 185 struct bpf_prog *prog) in tcx_link_attach() 191 struct bpf_prog *prog) in tcx_prog_detach()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | xdp_cpumap_attach.c | 46 val.bpf_prog.fd = prog_fd; in test_xdp_with_cpumap_helpers() 52 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to cpumap entry prog_id"); in test_xdp_with_cpumap_helpers() 80 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_cpumap_helpers() 88 val.bpf_prog.fd = bad_fd; in test_xdp_with_cpumap_helpers() 104 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_cm_frags); in test_xdp_with_cpumap_frags_helpers() 135 val.bpf_prog.fd = frags_prog_fd; in test_xdp_with_cpumap_frags_helpers() 141 ASSERT_EQ(info.id, val.bpf_prog.id, 149 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_cm); in test_xdp_cpumap_attach()
|
| H A D | xdp_devmap_attach.c | 51 val.bpf_prog.fd = dm_fd; in test_xdp_with_devmap_helpers() 57 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to devmap entry prog_id"); in test_xdp_with_devmap_helpers() 81 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers() 90 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm_frags); in test_xdp_with_devmap_helpers() 155 val.bpf_prog.fd = dm_fd_frags; in test_xdp_with_devmap_helpers_veth() 161 ASSERT_EQ(info.id, val.bpf_prog.id, in test_xdp_with_devmap_helpers_veth() 169 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_helpers_veth() 218 val.bpf_prog.fd = dm_fd; in test_xdp_with_devmap_helpers_veth() 224 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to devmap entry prog_id"); in test_xdp_with_devmap_helpers_veth()
|
| H A D | cgroup_storage.c | 56 skel->links.bpf_prog = in test_cgroup_storage() 57 bpf_program__attach_cgroup(skel->progs.bpf_prog, cgroup_fd); in test_cgroup_storage() 58 if (!ASSERT_OK_PTR(skel->links.bpf_prog, "attach program")) in test_cgroup_storage()
|
| /linux/tools/testing/selftests/net/ |
| H A D | psock_lib.h | 61 struct sock_fprog bpf_prog; in pair_udp_setfilter() local 63 bpf_prog.filter = bpf_filter; in pair_udp_setfilter() 64 bpf_prog.len = ARRAY_SIZE(bpf_filter); in pair_udp_setfilter() 66 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter() 67 sizeof(bpf_prog))) { in pair_udp_setfilter()
|
| /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()
|
| /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)));
|
| /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() 293 const struct bpf_prog *prog, in nf_is_valid_access() 324 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()
|
| /linux/arch/um/drivers/ |
| H A D | vector_user.c | 862 struct sock_fprog *bpf_prog; in uml_vector_default_bpf() local 864 bpf_prog = uml_kmalloc(sizeof(struct sock_fprog), UM_GFP_KERNEL); in uml_vector_default_bpf() 865 if (bpf_prog) { in uml_vector_default_bpf() 866 bpf_prog->len = DEFAULT_BPF_LEN; in uml_vector_default_bpf() 867 bpf_prog->filter = NULL; in uml_vector_default_bpf() 874 bpf_prog->filter = bpf; in uml_vector_default_bpf() 888 kfree(bpf_prog); in uml_vector_default_bpf() 889 bpf_prog = NULL; in uml_vector_default_bpf() 891 return bpf_prog; in uml_vector_default_bpf() 899 struct sock_fprog *bpf_prog; in uml_vector_user_bpf() local [all …]
|
| /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()
|
| /linux/arch/x86/net/ |
| H A D | bpf_jit_comp.c | 755 static void emit_bpf_tail_call_indirect(struct bpf_prog *bpf_prog, in emit_bpf_tail_call_indirect() argument 807 if (bpf_prog->aux->exception_boundary) { in emit_bpf_tail_call_indirect() 812 if (bpf_arena_get_kern_vm_start(bpf_prog->aux->arena)) in emit_bpf_tail_call_indirect() 828 offsetof(struct bpf_prog, bpf_func)); in emit_bpf_tail_call_indirect() 843 static void emit_bpf_tail_call_direct(struct bpf_prog *bpf_prog, in emit_bpf_tail_call_direct() argument 874 if (bpf_prog->aux->exception_boundary) { in emit_bpf_tail_call_direct() 879 if (bpf_arena_get_kern_vm_start(bpf_prog->aux->arena)) in emit_bpf_tail_call_direct() 900 static void bpf_tail_call_direct_fixup(struct bpf_prog *prog) in bpf_tail_call_direct_fixup() 904 struct bpf_prog *target; in bpf_tail_call_direct_fixup() 1644 struct bpf_prog *bpf_prog) in emit_spectre_bhb_barrier() argument [all …]
|
| /linux/drivers/media/rc/ |
| H A D | bpf-lirc.c | 83 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()
|