/Linux-v5.15/include/linux/ |
D | bpf.h | 30 struct bpf_prog; 107 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old, 108 struct bpf_prog *new); 391 bool (*allowed)(const struct bpf_prog *prog); 485 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr, 493 const struct bpf_prog *prog); 499 const struct bpf_prog *prog, 502 const struct bpf_prog *prog); 508 struct bpf_prog *prog, u32 *target_size); 527 int (*prepare)(struct bpf_prog *prog); [all …]
|
D | filter.h | 563 struct bpf_prog { struct 596 struct bpf_prog *prog; argument 606 static __always_inline u32 __bpf_prog_run(const struct bpf_prog *prog, in __bpf_prog_run() 629 static __always_inline u32 bpf_prog_run(const struct bpf_prog *prog, const void *ctx) in bpf_prog_run() 645 static inline u32 bpf_prog_run_pin_on_cpu(const struct bpf_prog *prog, in bpf_prog_run_pin_on_cpu() 744 static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog, in __bpf_prog_run_save_cb() 765 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb() 776 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb() 795 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, in bpf_prog_run_xdp() 812 void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog); [all …]
|
D | bpf-netns.h | 32 struct bpf_prog; 38 struct bpf_prog *prog); 41 struct bpf_prog *prog); 50 struct bpf_prog *prog) in netns_bpf_prog_attach() 62 struct bpf_prog *prog) in netns_bpf_link_create()
|
D | trace_events.h | 17 struct bpf_prog; 728 int perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie); 731 int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog); 732 int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog); 745 perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie) in perf_event_attach_bpf_prog() 757 static inline int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_register() 761 static inline int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_unregister() 856 int perf_event_set_bpf_prog(struct perf_event *event, struct bpf_prog *prog, u64 bpf_cookie); 859 void bpf_trace_run1(struct bpf_prog *prog, u64 arg1); 860 void bpf_trace_run2(struct bpf_prog *prog, u64 arg1, u64 arg2); [all …]
|
D | bpf-cgroup.h | 18 struct bpf_prog; 125 struct bpf_prog *prog; 161 struct bpf_prog *prog, struct bpf_prog *replace_prog, 164 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 172 struct bpf_prog *prog, struct bpf_prog *replace_prog, 175 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 229 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog, 466 enum bpf_prog_type ptype, struct bpf_prog *prog); 469 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); 480 struct bpf_prog *prog) in cgroup_bpf_prog_attach() [all …]
|
/Linux-v5.15/kernel/bpf/ |
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)
|
D | core.c | 80 struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc_no_stats() 84 struct bpf_prog *fp; in bpf_prog_alloc_no_stats() 115 struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc() 118 struct bpf_prog *prog; in bpf_prog_alloc() 143 int bpf_prog_alloc_jited_linfo(struct bpf_prog *prog) in bpf_prog_alloc_jited_linfo() 157 void bpf_prog_jit_attempt_done(struct bpf_prog *prog) in bpf_prog_jit_attempt_done() 193 void bpf_prog_fill_jited_linfo(struct bpf_prog *prog, in bpf_prog_fill_jited_linfo() 222 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc() 226 struct bpf_prog *fp; in bpf_prog_realloc() 252 void __bpf_prog_free(struct bpf_prog *fp) in __bpf_prog_free() [all …]
|
D | dispatcher.c | 25 struct bpf_dispatcher *d, struct bpf_prog *prog) in bpf_dispatcher_find_prog() 43 struct bpf_prog *prog) in bpf_dispatcher_add_prog() 68 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()
|
D | cgroup.c | 42 struct bpf_prog *prog, in bpf_cgroup_storages_alloc() 169 static struct bpf_prog *prog_list_prog(struct bpf_prog_list *pl) in prog_list_prog() 383 struct bpf_prog *prog, in find_attach_entry() 385 struct bpf_prog *replace_prog, in find_attach_entry() 434 struct bpf_prog *prog, struct bpf_prog *replace_prog, in __cgroup_bpf_attach() 439 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_attach() 582 struct bpf_prog *new_prog) in __cgroup_bpf_replace() 585 struct bpf_prog *old_prog; in __cgroup_bpf_replace() 614 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace() 615 struct bpf_prog *old_prog) in cgroup_bpf_replace() [all …]
|
D | trampoline.c | 179 struct bpf_prog **progs; in bpf_trampoline_get_progs() 391 static enum bpf_tramp_prog_type bpf_attach_type_to_tramp(struct bpf_prog *prog) in bpf_attach_type_to_tramp() 413 int bpf_trampoline_link_prog(struct bpf_prog *prog, struct bpf_trampoline *tr) in bpf_trampoline_link_prog() 462 int bpf_trampoline_unlink_prog(struct bpf_prog *prog, struct bpf_trampoline *tr) in bpf_trampoline_unlink_prog() 541 static void notrace inc_misses_counter(struct bpf_prog *prog) in inc_misses_counter() 564 u64 notrace __bpf_prog_enter(struct bpf_prog *prog) in __bpf_prog_enter() 576 static void notrace update_prog_stats(struct bpf_prog *prog, in update_prog_stats() 596 void notrace __bpf_prog_exit(struct bpf_prog *prog, u64 start) in __bpf_prog_exit() 605 u64 notrace __bpf_prog_enter_sleepable(struct bpf_prog *prog) in __bpf_prog_enter_sleepable() 617 void notrace __bpf_prog_exit_sleepable(struct bpf_prog *prog, u64 start) in __bpf_prog_exit_sleepable()
|
D | bpf_iter.c | 24 struct bpf_prog *prog; 324 struct bpf_prog *prog) in cache_btf_id() 329 bool bpf_iter_prog_supported(struct bpf_prog *prog) in bpf_iter_prog_supported() 364 bpf_iter_get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in bpf_iter_get_func_proto() 403 struct bpf_prog *new_prog, in bpf_iter_link_replace() 404 struct bpf_prog *old_prog) in bpf_iter_link_replace() 499 struct bpf_prog *prog) in bpf_iter_link_attach() 569 struct bpf_prog *prog) in init_seq_meta() 584 struct bpf_prog *prog; in prepare_seq_file() 660 struct bpf_prog *bpf_iter_get_info(struct bpf_iter_meta *meta, bool in_stop) in bpf_iter_get_info() [all …]
|
D | offload.c | 80 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-v5.15/drivers/net/hyperv/ |
D | netvsc_bpf.c | 29 struct bpf_prog *prog; in netvsc_run_xdp() 35 prog = rcu_dereference(nvchan->bpf_prog); in netvsc_run_xdp() 91 struct bpf_prog *netvsc_xdp_get(struct netvsc_device *nvdev) in netvsc_xdp_get() 93 return rtnl_dereference(nvdev->chan_table[0].bpf_prog); in netvsc_xdp_get() 96 int netvsc_xdp_set(struct net_device *dev, struct bpf_prog *prog, in netvsc_xdp_set() 100 struct bpf_prog *old_prog; in netvsc_xdp_set() 128 rcu_assign_pointer(nvdev->chan_table[i].bpf_prog, prog); in netvsc_xdp_set() 137 int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog) in netvsc_vf_setxdp()
|
/Linux-v5.15/tools/testing/selftests/net/ |
D | psock_lib.h | 63 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-v5.15/include/uapi/linux/netfilter/ |
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-v5.15/arch/um/drivers/ |
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 …]
|
/Linux-v5.15/kernel/bpf/preload/iterators/ |
D | iterators.bpf.c | 44 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-v5.15/net/netfilter/ |
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-v5.15/arch/powerpc/net/ |
D | bpf_jit_comp.c | 27 static int bpf_jit_fixup_subprog_calls(struct bpf_prog *fp, u32 *image, in bpf_jit_fixup_subprog_calls() 88 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp) in bpf_int_jit_compile() 100 struct bpf_prog *org_fp = fp; in bpf_int_jit_compile() 101 struct bpf_prog *tmp_fp; in bpf_int_jit_compile()
|
/Linux-v5.15/tools/testing/selftests/bpf/prog_tests/ |
D | xdp_cpumap_attach.c | 39 val.bpf_prog.fd = prog_fd; in test_xdp_cpumap_attach() 45 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to cpumap entry prog_id"); in test_xdp_cpumap_attach() 53 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_cpumap_attach()
|
D | xdp_devmap_attach.c | 41 val.bpf_prog.fd = dm_fd; in test_xdp_with_devmap_helpers() 47 ASSERT_EQ(info.id, val.bpf_prog.id, "Match program id to devmap entry prog_id"); in test_xdp_with_devmap_helpers() 55 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers()
|
/Linux-v5.15/drivers/media/rc/ |
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() 244 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) in lirc_prog_attach() 265 struct bpf_prog *prog; in lirc_prog_detach()
|
/Linux-v5.15/include/net/netns/ |
D | bpf.h | 11 struct bpf_prog; 17 struct bpf_prog *progs[MAX_NETNS_BPF_ATTACH_TYPE];
|
/Linux-v5.15/arch/riscv/net/ |
D | bpf_jit_core.c | 18 const struct bpf_prog *prog = ctx->prog; in build_body() 42 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile() 45 struct bpf_prog *tmp, *orig_prog = prog; in bpf_int_jit_compile()
|
/Linux-v5.15/samples/bpf/ |
D | run_cookie_uid_helper_example.sh | 8 iptables -D OUTPUT -m bpf --object-pinned ${mnt_dir}/bpf_prog -j ACCEPT 15 ./per_socket_stats_example ${mnt_dir}/bpf_prog $1
|