| /linux-6.15/include/linux/ |
| H A D | bpf.h | 38 struct bpf_prog; 1068 struct bpf_prog *prog; 1287 struct bpf_prog *prog; 1569 struct bpf_prog **func; 1584 struct bpf_prog *prog; 1631 struct bpf_prog { struct 1679 struct bpf_prog *prog; argument 2100 struct bpf_prog *prog; 2319 struct bpf_prog * __must_check bpf_prog_inc_not_zero(struct bpf_prog *prog); 3270 struct bpf_prog *prog; in bpf_prog_inc_misses_counters() [all …]
|
| H A D | bpf_lsm.h | 29 const struct bpf_prog *prog); 32 bool bpf_lsm_is_trusted(const struct bpf_prog *prog); 47 void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, bpf_func_t *bpf_func); 49 int bpf_lsm_get_retval_range(const struct bpf_prog *prog, 54 bool bpf_lsm_has_d_inode_locked(const struct bpf_prog *prog); 63 static inline bool bpf_lsm_is_trusted(const struct bpf_prog *prog) in bpf_lsm_is_trusted() 69 const struct bpf_prog *prog) in bpf_lsm_verify_prog() 84 static inline void bpf_lsm_find_cgroup_shim(const struct bpf_prog *prog, in bpf_lsm_find_cgroup_shim() 89 static inline int bpf_lsm_get_retval_range(const struct bpf_prog *prog, in bpf_lsm_get_retval_range() 103 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 | 682 struct bpf_prog *prog; 993 void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog); 1082 struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err); 1094 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, 1127 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog); 1155 struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, 1205 const struct bpf_prog *prog); 1209 const struct bpf_prog *prog); 1281 struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *fp); 1282 void bpf_jit_prog_release_other(struct bpf_prog *fp, struct bpf_prog *fp_other); [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()
|
| 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; 111 struct bpf_prog *prog; 171 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog, 421 enum bpf_prog_type ptype, struct bpf_prog *prog); 424 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); 429 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog); 439 struct bpf_prog *prog) in cgroup_bpf_prog_attach() 451 struct bpf_prog *prog) in cgroup_bpf_link_attach() 463 cgroup_common_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_common_func_proto() 469 cgroup_current_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_current_func_proto() [all …]
|
| /linux-6.15/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() 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-6.15/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 | trampoline.c | 107 bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline() 551 struct bpf_prog *tgt_prog) in __bpf_trampoline_link_prog() 603 struct bpf_prog *tgt_prog) in bpf_trampoline_link_prog() 615 struct bpf_prog *tgt_prog) in __bpf_trampoline_unlink_prog() 638 struct bpf_prog *tgt_prog) in bpf_trampoline_unlink_prog() 680 struct bpf_prog *p; in cgroup_shim_alloc() 718 struct bpf_prog *p = link->link.prog; in cgroup_shim_find() 728 int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog, in bpf_trampoline_link_cgroup_shim() 794 void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog) in bpf_trampoline_unlink_cgroup_shim() 914 static void notrace update_prog_stats(struct bpf_prog *prog, in update_prog_stats() [all …]
|
| H A D | offload.c | 109 static void __bpf_prog_offload_destroy(struct bpf_prog *prog) in __bpf_prog_offload_destroy() 271 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit() 297 int bpf_prog_offload_verifier_prep(struct bpf_prog *prog) in bpf_prog_offload_verifier_prep() 382 void bpf_prog_dev_bound_destroy(struct bpf_prog *prog) in bpf_prog_dev_bound_destroy() 403 static int bpf_prog_offload_translate(struct bpf_prog *prog) in bpf_prog_offload_translate() 424 int bpf_prog_offload_compile(struct bpf_prog *prog) in bpf_prog_offload_compile() 432 struct bpf_prog *prog; 463 struct bpf_prog *prog) in bpf_prog_offload_info_fill() 699 static bool __bpf_offload_dev_match(struct bpf_prog *prog, in __bpf_offload_dev_match() 732 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 D | cgroup.c | 54 const struct bpf_prog *prog; in bpf_prog_run_array_cg() 95 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_sock() 117 shim_prog = (const struct bpf_prog *)((void *)insn - offsetof(struct bpf_prog, insnsi)); in __cgroup_bpf_run_lsm_socket() 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() 641 struct bpf_prog *prog, struct bpf_prog *replace_prog, in __cgroup_bpf_attach() 759 struct bpf_prog *prog, struct bpf_prog *replace_prog, in cgroup_bpf_attach() 832 struct bpf_prog *old_prog; in __cgroup_bpf_replace() 988 struct bpf_prog *old_prog; in __cgroup_bpf_detach() 1121 struct bpf_prog *prog; in __cgroup_bpf_query() [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 | core.c | 101 struct bpf_prog *fp; in bpf_prog_alloc_no_stats() 143 struct bpf_prog *prog; in bpf_prog_alloc() 247 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc() 251 struct bpf_prog *fp; in bpf_prog_realloc() 479 struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, in bpf_patch_insn_single() 791 struct bpf_prog *prog; in search_bpf_extables() 1429 static struct bpf_prog *bpf_prog_clone_create(struct bpf_prog *fp_other, in bpf_prog_clone_create() 1433 struct bpf_prog *fp; in bpf_prog_clone_create() 1471 struct bpf_prog *bpf_jit_blind_constants(struct bpf_prog *prog) in bpf_jit_blind_constants() 2467 struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err) in bpf_prog_select_runtime() [all …]
|
| /linux-6.15/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 | 164 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-6.15/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() 89 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_cm_frags); in test_xdp_with_cpumap_helpers() 120 val.bpf_prog.fd = frags_prog_fd; in test_xdp_with_cpumap_frags_helpers() 126 ASSERT_EQ(info.id, val.bpf_prog.id, in test_xdp_with_cpumap_frags_helpers() 134 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 | 50 val.bpf_prog.fd = dm_fd; in test_xdp_with_devmap_helpers() 56 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to devmap entry prog_id"); in test_xdp_with_devmap_helpers() 80 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers() 89 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm_frags); in test_xdp_with_devmap_helpers() 131 val.bpf_prog.fd = dm_fd_frags; in test_xdp_with_devmap_frags_helpers() 137 ASSERT_EQ(info.id, val.bpf_prog.id, in test_xdp_with_devmap_frags_helpers() 145 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_dm); in test_xdp_with_devmap_frags_helpers() 194 val.bpf_prog.fd = dm_fd; in test_xdp_with_devmap_helpers_veth() 200 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to devmap entry prog_id"); in test_xdp_with_devmap_helpers_veth()
|
| /linux-6.15/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()
|
| /linux-6.15/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-6.15/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-6.15/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()
|
| /linux-6.15/arch/um/drivers/ |
| H A D | vector_user.c | 865 if (bpf_prog) { 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() 911 if (bpf_prog == NULL) { in uml_vector_user_bpf() 916 bpf_prog->filter = NULL; in uml_vector_user_bpf() 927 bpf_prog->filter = bpf; in uml_vector_user_bpf() 935 return bpf_prog; in uml_vector_user_bpf() [all …]
|
| /linux-6.15/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-6.15/arch/x86/net/ |
| H A D | bpf_jit_comp.c | 718 static void emit_bpf_tail_call_indirect(struct bpf_prog *bpf_prog, in emit_bpf_tail_call_indirect() argument 806 static void emit_bpf_tail_call_direct(struct bpf_prog *bpf_prog, in emit_bpf_tail_call_direct() argument 867 struct bpf_prog *target; in bpf_tail_call_direct_fixup() 1511 struct bpf_prog *bpf_prog) in emit_spectre_bhb_barrier() argument 1552 static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, u8 *rw_image, in do_jit() argument 1558 int insn_cnt = bpf_prog->len; in do_jit() 1584 bpf_is_subprog(bpf_prog), bpf_prog->aux->exception_cb); in do_jit() 2075 if (!bpf_prog->aux->extable) in do_jit() 3524 struct bpf_prog *prog) in priv_stack_check_guard() 3552 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile() [all …]
|