Home
last modified time | relevance | path

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

1234567

/kernel/linux/linux-5.10/include/linux/
Dbpf.h28 struct bpf_prog;
98 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old,
99 struct bpf_prog *new);
400 bool (*allowed)(const struct bpf_prog *prog);
493 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr,
501 const struct bpf_prog *prog);
507 const struct bpf_prog *prog,
510 const struct bpf_prog *prog);
516 struct bpf_prog *prog, u32 *target_size);
533 int (*prepare)(struct bpf_prog *prog);
[all …]
Dfilter.h540 struct bpf_prog { struct
570 struct bpf_prog *prog; argument
606 static inline u32 bpf_prog_run_pin_on_cpu(const struct bpf_prog *prog, in bpf_prog_run_pin_on_cpu()
703 static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog, in __bpf_prog_run_save_cb()
723 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb()
734 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb()
749 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, in DECLARE_BPF_DISPATCHER()
761 void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog);
763 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) in bpf_prog_insn_size()
768 static inline u32 bpf_prog_tag_scratch_size(const struct bpf_prog *prog) in bpf_prog_tag_scratch_size()
[all …]
Dbpf-netns.h32 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()
Dbpf-cgroup.h18 struct bpf_prog;
61 struct bpf_prog *prog;
97 struct bpf_prog *prog, struct bpf_prog *replace_prog,
100 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
108 struct bpf_prog *prog, struct bpf_prog *replace_prog,
111 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
160 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog,
364 enum bpf_prog_type ptype, struct bpf_prog *prog);
367 int cgroup_bpf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
372 struct bpf_prog;
[all …]
Dtrace_events.h17 struct bpf_prog;
624 int perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog);
627 int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog);
628 int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog);
641 perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog) in perf_event_attach_bpf_prog()
653 static inline int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_register()
657 static inline int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_unregister()
752 void bpf_trace_run1(struct bpf_prog *prog, u64 arg1);
753 void bpf_trace_run2(struct bpf_prog *prog, u64 arg1, u64 arg2);
754 void bpf_trace_run3(struct bpf_prog *prog, u64 arg1, u64 arg2,
[all …]
Dbpf_lirc.h8 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
13 struct bpf_prog *prog) in lirc_prog_attach()
/kernel/linux/linux-5.10/kernel/bpf/
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)
Dcore.c83 struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc_no_stats()
87 struct bpf_prog *fp; in bpf_prog_alloc_no_stats()
112 struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc()
115 struct bpf_prog *prog; in bpf_prog_alloc()
139 int bpf_prog_alloc_jited_linfo(struct bpf_prog *prog) in bpf_prog_alloc_jited_linfo()
153 void bpf_prog_free_jited_linfo(struct bpf_prog *prog) in bpf_prog_free_jited_linfo()
159 void bpf_prog_free_unused_jited_linfo(struct bpf_prog *prog) in bpf_prog_free_unused_jited_linfo()
189 void bpf_prog_fill_jited_linfo(struct bpf_prog *prog, in bpf_prog_fill_jited_linfo()
218 void bpf_prog_free_linfo(struct bpf_prog *prog) in bpf_prog_free_linfo()
224 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc()
[all …]
Ddispatcher.c25 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()
Dcgroup.c42 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()
440 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_attach()
575 struct bpf_prog *new_prog) in __cgroup_bpf_replace()
578 struct bpf_prog *old_prog; in __cgroup_bpf_replace()
600 static int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *new_prog, in cgroup_bpf_replace()
601 struct bpf_prog *old_prog) in cgroup_bpf_replace()
[all …]
Doffload.c80 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 …]
/kernel/linux/linux-5.10/drivers/net/hyperv/
Dnetvsc_bpf.c29 struct bpf_prog *prog; in netvsc_run_xdp()
35 prog = rcu_dereference(nvchan->bpf_prog); in netvsc_run_xdp()
89 struct bpf_prog *netvsc_xdp_get(struct netvsc_device *nvdev) in netvsc_xdp_get()
91 return rtnl_dereference(nvdev->chan_table[0].bpf_prog); in netvsc_xdp_get()
94 int netvsc_xdp_set(struct net_device *dev, struct bpf_prog *prog, in netvsc_xdp_set()
98 struct bpf_prog *old_prog; in netvsc_xdp_set()
126 rcu_assign_pointer(nvdev->chan_table[i].bpf_prog, prog); in netvsc_xdp_set()
135 int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog) in netvsc_vf_setxdp()
/kernel/linux/linux-5.10/tools/testing/selftests/net/
Dpsock_lib.h63 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()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
Dxdp_cpumap_attach.c41 val.bpf_prog.fd = prog_fd; in test_xdp_with_cpumap_helpers()
48 CHECK(info.id != val.bpf_prog.id, "Expected program id in cpumap entry", in test_xdp_with_cpumap_helpers()
49 "expected %u read %u\n", info.id, val.bpf_prog.id); in test_xdp_with_cpumap_helpers()
57 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_cpumap_helpers()
Dxdp_devmap_attach.c43 val.bpf_prog.fd = dm_fd; in test_xdp_with_devmap_helpers()
50 CHECK(info.id != val.bpf_prog.id, "Expected program id in devmap entry", in test_xdp_with_devmap_helpers()
51 "expected %u read %u\n", info.id, val.bpf_prog.id); in test_xdp_with_devmap_helpers()
59 val.bpf_prog.fd = bpf_program__fd(skel->progs.xdp_dummy_prog); in test_xdp_with_devmap_helpers()
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/netfilter/
Dxt_bpf.h26 struct bpf_prog;
30 struct bpf_prog * filter __attribute__((aligned(8)));
46 struct bpf_prog * filter __attribute__((aligned(8)));
/kernel/linux/linux-5.10/include/uapi/linux/netfilter/
Dxt_bpf.h12 struct bpf_prog;
19 struct bpf_prog *filter __attribute__((aligned(8)));
39 struct bpf_prog *filter __attribute__((aligned(8)));
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/netfilter/
Dxt_bpf.h13 struct bpf_prog;
18 struct bpf_prog *filter __attribute__((aligned(8)));
35 struct bpf_prog *filter __attribute__((aligned(8)));
/kernel/linux/linux-5.10/arch/um/drivers/
Dvector_user.c778 struct sock_fprog *bpf_prog; in uml_vector_default_bpf() local
780 bpf_prog = uml_kmalloc(sizeof(struct sock_fprog), UM_GFP_KERNEL); in uml_vector_default_bpf()
781 if (bpf_prog) { in uml_vector_default_bpf()
782 bpf_prog->len = DEFAULT_BPF_LEN; in uml_vector_default_bpf()
783 bpf_prog->filter = NULL; in uml_vector_default_bpf()
790 bpf_prog->filter = bpf; in uml_vector_default_bpf()
804 kfree(bpf_prog); in uml_vector_default_bpf()
805 bpf_prog = NULL; in uml_vector_default_bpf()
807 return bpf_prog; in uml_vector_default_bpf()
815 struct sock_fprog *bpf_prog; in uml_vector_user_bpf() local
[all …]
/kernel/linux/linux-5.10/kernel/bpf/preload/iterators/
Diterators.bpf.c45 struct bpf_prog *dst_prog;
50 struct bpf_prog { struct
56 struct bpf_prog *prog;
99 struct bpf_prog *prog = ctx->prog; in dump_bpf_prog()
/kernel/linux/linux-5.10/net/netfilter/
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()
/kernel/linux/linux-5.10/include/net/netns/
Dbpf.h11 struct bpf_prog;
17 struct bpf_prog *progs[MAX_NETNS_BPF_ATTACH_TYPE];
/kernel/linux/linux-5.10/drivers/media/rc/
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()
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()
/kernel/linux/linux-5.10/arch/riscv/net/
Dbpf_jit_core.c18 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()
/kernel/linux/linux-5.10/samples/bpf/
Drun_cookie_uid_helper_example.sh8 iptables -D OUTPUT -m bpf --object-pinned ${mnt_dir}/bpf_prog -j ACCEPT
15 ./per_socket_stats_example ${mnt_dir}/bpf_prog $1

1234567