Home
last modified time | relevance | path

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

12345

/Linux-v4.19/include/linux/
Dbpf.h22 struct bpf_prog;
232 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr,
240 const struct bpf_prog *prog);
246 const struct bpf_prog *prog,
249 const struct bpf_prog *prog);
255 struct bpf_prog *prog, u32 *target_size);
264 struct bpf_prog *prog;
282 struct bpf_prog **func;
288 struct bpf_prog *prog;
330 bool bpf_prog_array_compatible(struct bpf_array *array, const struct bpf_prog *fp);
[all …]
Dfilter.h479 struct bpf_prog { struct
510 struct bpf_prog *prog; argument
588 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb()
608 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb()
619 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, in bpf_prog_run_xdp()
631 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) in bpf_prog_insn_size()
636 static inline u32 bpf_prog_tag_scratch_size(const struct bpf_prog *prog) in bpf_prog_tag_scratch_size()
644 return max(sizeof(struct bpf_prog), in bpf_prog_size()
645 offsetof(struct bpf_prog, insns[proglen])); in bpf_prog_size()
648 static inline bool bpf_prog_was_classic(const struct bpf_prog *prog) in bpf_prog_was_classic()
[all …]
Dbpf-cgroup.h16 struct bpf_prog;
45 struct bpf_prog *prog;
70 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
72 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
78 int cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
80 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
115 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog);
121 int bpf_cgroup_storage_assign(struct bpf_prog *prog, struct bpf_map *map);
122 void bpf_cgroup_storage_release(struct bpf_prog *prog, struct bpf_map *map);
237 enum bpf_prog_type ptype, struct bpf_prog *prog);
[all …]
Dtrace_events.h17 struct bpf_prog;
469 int perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog);
472 int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog);
473 int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog);
485 perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog) in perf_event_attach_bpf_prog()
497 static inline int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_register()
501 static inline int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_unregister()
590 void bpf_trace_run1(struct bpf_prog *prog, u64 arg1);
591 void bpf_trace_run2(struct bpf_prog *prog, u64 arg1, u64 arg2);
592 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()
/Linux-v4.19/kernel/bpf/
Dcore.c78 struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc()
82 struct bpf_prog *fp; in bpf_prog_alloc()
106 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc()
110 struct bpf_prog *fp; in bpf_prog_realloc()
144 void __bpf_prog_free(struct bpf_prog *fp) in __bpf_prog_free()
150 int bpf_prog_calc_tag(struct bpf_prog *fp) in bpf_prog_calc_tag()
256 static int bpf_adj_branches(struct bpf_prog *prog, u32 pos, u32 delta, in bpf_adj_branches()
295 struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, in bpf_patch_insn_single()
300 struct bpf_prog *prog_adj; in bpf_patch_insn_single()
353 void bpf_prog_kallsyms_del_subprogs(struct bpf_prog *fp) in bpf_prog_kallsyms_del_subprogs()
[all …]
Doffload.c78 int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr) in bpf_prog_offload_init()
124 static int __bpf_offload_ndo(struct bpf_prog *prog, enum bpf_netdev_command cmd, in __bpf_offload_ndo()
175 static void __bpf_prog_offload_destroy(struct bpf_prog *prog) in __bpf_prog_offload_destroy()
193 void bpf_prog_offload_destroy(struct bpf_prog *prog) in bpf_prog_offload_destroy()
203 static int bpf_prog_offload_translate(struct bpf_prog *prog) in bpf_prog_offload_translate()
224 int bpf_prog_offload_compile(struct bpf_prog *prog) in bpf_prog_offload_compile()
232 struct bpf_prog *prog;
263 struct bpf_prog *prog) in bpf_prog_offload_info_fill()
514 static bool __bpf_offload_dev_match(struct bpf_prog *prog, in __bpf_offload_dev_match()
535 bool bpf_offload_dev_match(struct bpf_prog *prog, struct net_device *netdev) in bpf_offload_dev_match()
[all …]
Dsyscall.c970 static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) in find_prog_type()
1025 static int bpf_prog_charge_memlock(struct bpf_prog *prog) in bpf_prog_charge_memlock()
1040 static void bpf_prog_uncharge_memlock(struct bpf_prog *prog) in bpf_prog_uncharge_memlock()
1048 static int bpf_prog_alloc_id(struct bpf_prog *prog) in bpf_prog_alloc_id()
1067 void bpf_prog_free_id(struct bpf_prog *prog, bool do_idr_lock) in bpf_prog_free_id()
1101 static void __bpf_prog_put(struct bpf_prog *prog, bool do_idr_lock) in __bpf_prog_put()
1112 void bpf_prog_put(struct bpf_prog *prog) in bpf_prog_put()
1120 struct bpf_prog *prog = filp->private_data; in bpf_prog_release()
1129 const struct bpf_prog *prog = filp->private_data; in bpf_prog_show_fdinfo()
1156 int bpf_prog_new_fd(struct bpf_prog *prog) in bpf_prog_new_fd()
[all …]
Dcgroup.c230 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, in __cgroup_bpf_attach()
234 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_attach()
338 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, in __cgroup_bpf_detach()
343 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_detach()
452 enum bpf_prog_type ptype, struct bpf_prog *prog) in cgroup_bpf_prog_attach()
469 struct bpf_prog *prog; in cgroup_bpf_prog_detach()
667 cgroup_dev_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_dev_func_proto()
690 const struct bpf_prog *prog, in cgroup_dev_is_valid_access()
/Linux-v4.19/tools/testing/selftests/net/
Dpsock_lib.h77 struct sock_fprog bpf_prog; in pair_udp_setfilter() local
79 bpf_prog.filter = bpf_filter; in pair_udp_setfilter()
80 bpf_prog.len = sizeof(bpf_filter) / sizeof(struct sock_filter); in pair_udp_setfilter()
82 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &bpf_prog, in pair_udp_setfilter()
83 sizeof(bpf_prog))) { in pair_udp_setfilter()
Dpsock_fanout.c118 struct sock_fprog bpf_prog; in sock_fanout_set_cbpf() local
120 bpf_prog.filter = bpf_filter; in sock_fanout_set_cbpf()
121 bpf_prog.len = sizeof(bpf_filter) / sizeof(struct sock_filter); in sock_fanout_set_cbpf()
123 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &bpf_prog, in sock_fanout_set_cbpf()
124 sizeof(bpf_prog))) { in sock_fanout_set_cbpf()
/Linux-v4.19/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)));
/Linux-v4.19/net/netfilter/
Dxt_bpf.c28 struct bpf_prog **ret) in __bpf_mt_check_bytecode()
46 static int __bpf_mt_check_fd(int fd, struct bpf_prog **ret) in __bpf_mt_check_fd()
48 struct bpf_prog *prog; in __bpf_mt_check_fd()
58 static int __bpf_mt_check_path(const char *path, struct bpf_prog **ret) in __bpf_mt_check_path()
/Linux-v4.19/drivers/media/rc/
Dbpf-lirc.c63 lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in lirc_mode2_func_proto()
93 const struct bpf_prog *prog, in lirc_mode2_is_valid_access()
107 static int lirc_bpf_attach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_attach()
145 static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_detach()
213 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) in lirc_prog_attach()
234 struct bpf_prog *prog; in lirc_prog_detach()
/Linux-v4.19/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
/Linux-v4.19/kernel/trace/
Dbpf_trace.c525 tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in tracing_func_proto()
574 kprobe_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in kprobe_prog_func_proto()
596 const struct bpf_prog *prog, in kprobe_prog_is_valid_access()
690 tp_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in tp_prog_func_proto()
705 const struct bpf_prog *prog, in tp_prog_is_valid_access()
754 pe_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in pe_prog_func_proto()
837 raw_tp_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in raw_tp_prog_func_proto()
853 const struct bpf_prog *prog, in raw_tp_prog_is_valid_access()
875 const struct bpf_prog *prog, in pe_prog_is_valid_access()
915 struct bpf_prog *prog, u32 *target_size) in pe_prog_convert_ctx_access()
[all …]
/Linux-v4.19/include/trace/events/
Dxdp.h31 const struct bpf_prog *xdp, u32 act),
56 const struct bpf_prog *xdp,
91 const struct bpf_prog *xdp,
99 const struct bpf_prog *xdp,
113 const struct bpf_prog *xdp,
128 const struct bpf_prog *xdp,
/Linux-v4.19/include/net/
Dsock_reuseport.h25 struct bpf_prog __rcu *prog; /* optional BPF sock selector */
37 extern int reuseport_attach_prog(struct sock *sk, struct bpf_prog *prog);
Dkcm.h89 struct bpf_prog;
112 struct bpf_prog *bpf_prog; member
/Linux-v4.19/net/bpf/
Dtest_run.c14 static __always_inline u32 bpf_test_run_one(struct bpf_prog *prog, void *ctx, in bpf_test_run_one()
29 static u32 bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat, u32 *time) in bpf_test_run()
101 int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr, in bpf_prog_test_run_skb()
169 int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr, in bpf_prog_test_run_xdp()
/Linux-v4.19/net/core/
Dsock_reuseport.c223 struct bpf_prog *prog, struct sk_buff *skb, in run_bpf_filter()
268 struct bpf_prog *prog; in reuseport_select_sock()
305 int reuseport_attach_prog(struct sock *sk, struct bpf_prog *prog) in reuseport_attach_prog()
308 struct bpf_prog *old_prog; in reuseport_attach_prog()
Dfilter.c535 struct bpf_prog *new_prog, int *new_len, in bpf_convert_filter()
1108 static int bpf_prog_store_orig_filter(struct bpf_prog *fp, in bpf_prog_store_orig_filter()
1131 static void bpf_release_orig_filter(struct bpf_prog *fp) in bpf_release_orig_filter()
1141 static void __bpf_prog_release(struct bpf_prog *prog) in __bpf_prog_release()
1216 static struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp) in bpf_migrate_filter()
1219 struct bpf_prog *old_fp; in bpf_migrate_filter()
1287 static struct bpf_prog *bpf_prepare_filter(struct bpf_prog *fp, in bpf_prepare_filter()
1336 int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog) in bpf_prog_create()
1339 struct bpf_prog *fp; in bpf_prog_create()
1381 int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog, in bpf_prog_create_from_user()
[all …]
/Linux-v4.19/net/sched/
Dact_bpf.c27 struct bpf_prog *filter;
42 struct bpf_prog *filter; in tcf_bpf_act()
190 struct bpf_prog *fp; in tcf_bpf_init_from_ops()
225 struct bpf_prog *fp; in tcf_bpf_init_from_efd()
252 struct bpf_prog *filter = cfg->filter; in tcf_bpf_cfg_cleanup()
/Linux-v4.19/arch/x86/net/
Dbpf_jit_comp.c311 offsetof(struct bpf_prog, bpf_func)); in emit_bpf_tail_call()
411 static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, in do_jit() argument
414 struct bpf_insn *insn = bpf_prog->insnsi; in do_jit()
415 int insn_cnt = bpf_prog->len; in do_jit()
422 emit_prologue(&prog, bpf_prog->aux->stack_depth, in do_jit()
423 bpf_prog_was_classic(bpf_prog)); in do_jit()
1063 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile()
1066 struct bpf_prog *tmp, *orig_prog = prog; in bpf_int_jit_compile()
/Linux-v4.19/drivers/net/netdevsim/
Dbpf.c31 struct bpf_prog *prog;
98 static void nsim_prog_set_loaded(struct bpf_prog *prog, bool loaded) in nsim_prog_set_loaded()
110 nsim_bpf_offload(struct netdevsim *ns, struct bpf_prog *prog, bool oldprog) in nsim_bpf_offload()
128 struct bpf_prog *prog = cls_bpf->prog; in nsim_bpf_setup_tc_block_cb()
130 struct bpf_prog *oldprog; in nsim_bpf_setup_tc_block_cb()
227 static int nsim_bpf_create_prog(struct netdevsim *ns, struct bpf_prog *prog) in nsim_bpf_create_prog()
260 static void nsim_bpf_destroy_prog(struct bpf_prog *prog) in nsim_bpf_destroy_prog()

12345