/Linux-v5.4/include/linux/ |
D | bpf.h | 20 struct bpf_prog; 301 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr, 309 const struct bpf_prog *prog); 315 const struct bpf_prog *prog, 318 const struct bpf_prog *prog); 324 struct bpf_prog *prog, u32 *target_size); 337 int (*prepare)(struct bpf_prog *prog); 338 int (*translate)(struct bpf_prog *prog); 339 void (*destroy)(struct bpf_prog *prog); 343 struct bpf_prog *prog; [all …]
|
D | filter.h | 520 struct bpf_prog { struct 551 struct bpf_prog *prog; argument 650 static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog, in __bpf_prog_run_save_cb() 670 static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, in bpf_prog_run_save_cb() 681 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, in bpf_prog_run_clear_cb() 696 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, in bpf_prog_run_xdp() 708 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog) in bpf_prog_insn_size() 713 static inline u32 bpf_prog_tag_scratch_size(const struct bpf_prog *prog) in bpf_prog_tag_scratch_size() 721 return max(sizeof(struct bpf_prog), in bpf_prog_size() 722 offsetof(struct bpf_prog, insns[proglen])); in bpf_prog_size() [all …]
|
D | bpf-cgroup.h | 18 struct bpf_prog; 56 struct bpf_prog *prog; 87 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, 89 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 95 int cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, 97 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 153 struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog, 160 int bpf_cgroup_storage_assign(struct bpf_prog *prog, struct bpf_map *map); 161 void bpf_cgroup_storage_release(struct bpf_prog *prog, struct bpf_map *map); 330 enum bpf_prog_type ptype, struct bpf_prog *prog); [all …]
|
D | trace_events.h | 17 struct bpf_prog; 478 int perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog); 481 int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog); 482 int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog); 495 perf_event_attach_bpf_prog(struct perf_event *event, struct bpf_prog *prog) in perf_event_attach_bpf_prog() 507 static inline int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_register() 511 static inline int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *p) in bpf_probe_unregister() 605 void bpf_trace_run1(struct bpf_prog *prog, u64 arg1); 606 void bpf_trace_run2(struct bpf_prog *prog, u64 arg1, u64 arg2); 607 void bpf_trace_run3(struct bpf_prog *prog, u64 arg1, u64 arg2, [all …]
|
D | bpf_lirc.h | 8 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); 13 struct bpf_prog *prog) in lirc_prog_attach()
|
/Linux-v5.4/kernel/bpf/ |
D | core.c | 77 struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc_no_stats() 81 struct bpf_prog *fp; in bpf_prog_alloc_no_stats() 104 struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags) in bpf_prog_alloc() 107 struct bpf_prog *prog; in bpf_prog_alloc() 131 int bpf_prog_alloc_jited_linfo(struct bpf_prog *prog) in bpf_prog_alloc_jited_linfo() 145 void bpf_prog_free_jited_linfo(struct bpf_prog *prog) in bpf_prog_free_jited_linfo() 151 void bpf_prog_free_unused_jited_linfo(struct bpf_prog *prog) in bpf_prog_free_unused_jited_linfo() 181 void bpf_prog_fill_jited_linfo(struct bpf_prog *prog, in bpf_prog_fill_jited_linfo() 210 void bpf_prog_free_linfo(struct bpf_prog *prog) in bpf_prog_free_linfo() 216 struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, in bpf_prog_realloc() [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 …]
|
D | syscall.c | 1202 static int find_prog_type(enum bpf_prog_type type, struct bpf_prog *prog) in find_prog_type() 1262 static int bpf_prog_charge_memlock(struct bpf_prog *prog) in bpf_prog_charge_memlock() 1277 static void bpf_prog_uncharge_memlock(struct bpf_prog *prog) in bpf_prog_uncharge_memlock() 1285 static int bpf_prog_alloc_id(struct bpf_prog *prog) in bpf_prog_alloc_id() 1304 void bpf_prog_free_id(struct bpf_prog *prog, bool do_idr_lock) in bpf_prog_free_id() 1339 static void __bpf_prog_put_noref(struct bpf_prog *prog, bool deferred) in __bpf_prog_put_noref() 1351 static void __bpf_prog_put(struct bpf_prog *prog, bool do_idr_lock) in __bpf_prog_put() 1361 void bpf_prog_put(struct bpf_prog *prog) in bpf_prog_put() 1369 struct bpf_prog *prog = filp->private_data; in bpf_prog_release() 1375 static void bpf_prog_get_stats(const struct bpf_prog *prog, in bpf_prog_get_stats() [all …]
|
D | cgroup.c | 291 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, in __cgroup_bpf_attach() 295 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_attach() 420 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, in __cgroup_bpf_detach() 426 struct bpf_prog *old_prog = NULL; in __cgroup_bpf_detach() 540 enum bpf_prog_type ptype, struct bpf_prog *prog) in cgroup_bpf_prog_attach() 557 struct bpf_prog *prog; in cgroup_bpf_prog_detach() 776 cgroup_base_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_base_func_proto() 807 cgroup_dev_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in cgroup_dev_func_proto() 814 const struct bpf_prog *prog, in cgroup_dev_is_valid_access() 1284 sysctl_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in sysctl_func_proto() [all …]
|
/Linux-v5.4/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()
|
D | psock_fanout.c | 104 struct sock_fprog bpf_prog; in sock_fanout_set_cbpf() local 106 bpf_prog.filter = bpf_filter; in sock_fanout_set_cbpf() 107 bpf_prog.len = sizeof(bpf_filter) / sizeof(struct sock_filter); in sock_fanout_set_cbpf() 109 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &bpf_prog, in sock_fanout_set_cbpf() 110 sizeof(bpf_prog))) { in sock_fanout_set_cbpf()
|
/Linux-v5.4/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.4/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.4/drivers/media/rc/ |
D | bpf-lirc.c | 88 lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in lirc_mode2_func_proto() 126 const struct bpf_prog *prog, in lirc_mode2_is_valid_access() 140 static int lirc_bpf_attach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_attach() 178 static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog) in lirc_bpf_detach() 247 int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) in lirc_prog_attach() 268 struct bpf_prog *prog; in lirc_prog_detach()
|
/Linux-v5.4/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
|
/Linux-v5.4/kernel/trace/ |
D | bpf_trace.c | 687 tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in tracing_func_proto() 744 kprobe_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in kprobe_prog_func_proto() 766 const struct bpf_prog *prog, in kprobe_prog_is_valid_access() 860 tp_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in tp_prog_func_proto() 875 const struct bpf_prog *prog, in tp_prog_is_valid_access() 924 pe_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in pe_prog_func_proto() 1051 raw_tp_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in raw_tp_prog_func_proto() 1067 const struct bpf_prog *prog, in raw_tp_prog_is_valid_access() 1090 const struct bpf_prog *prog, in raw_tp_writable_prog_is_valid_access() 1110 const struct bpf_prog *prog, in pe_prog_is_valid_access() [all …]
|
/Linux-v5.4/drivers/net/netdevsim/ |
D | bpf.c | 31 struct bpf_prog *prog; 87 static void nsim_prog_set_loaded(struct bpf_prog *prog, bool loaded) in nsim_prog_set_loaded() 99 nsim_bpf_offload(struct netdevsim *ns, struct bpf_prog *prog, bool oldprog) in nsim_bpf_offload() 117 struct bpf_prog *prog = cls_bpf->prog; in nsim_bpf_setup_tc_block_cb() 119 struct bpf_prog *oldprog; in nsim_bpf_setup_tc_block_cb() 217 struct bpf_prog *prog) in nsim_bpf_create_prog() 250 static int nsim_bpf_verifier_prep(struct bpf_prog *prog) in nsim_bpf_verifier_prep() 261 static int nsim_bpf_translate(struct bpf_prog *prog) in nsim_bpf_translate() 269 static void nsim_bpf_destroy_prog(struct bpf_prog *prog) in nsim_bpf_destroy_prog()
|
/Linux-v5.4/include/net/ |
D | sock_reuseport.h | 26 struct bpf_prog __rcu *prog; /* optional BPF sock selector */ 38 extern int reuseport_attach_prog(struct sock *sk, struct bpf_prog *prog);
|
D | kcm.h | 86 struct bpf_prog; 109 struct bpf_prog *bpf_prog; member
|
/Linux-v5.4/net/core/ |
D | sock_reuseport.c | 226 struct bpf_prog *prog, struct sk_buff *skb, in run_bpf_filter() 271 struct bpf_prog *prog; in reuseport_select_sock() 319 int reuseport_attach_prog(struct sock *sk, struct bpf_prog *prog) in reuseport_attach_prog() 322 struct bpf_prog *old_prog; in reuseport_attach_prog() 350 struct bpf_prog *old_prog; in reuseport_detach_prog()
|
/Linux-v5.4/include/trace/events/ |
D | xdp.h | 31 const struct bpf_prog *xdp, u32 act), 85 const struct bpf_prog *xdp, 120 const struct bpf_prog *xdp, 128 const struct bpf_prog *xdp, 142 const struct bpf_prog *xdp, 157 const struct bpf_prog *xdp,
|
/Linux-v5.4/arch/x86/net/ |
D | bpf_jit_comp.c | 280 offsetof(struct bpf_prog, bpf_func)); in emit_bpf_tail_call() 380 static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, in do_jit() argument 383 struct bpf_insn *insn = bpf_prog->insnsi; in do_jit() 384 int insn_cnt = bpf_prog->len; in do_jit() 391 emit_prologue(&prog, bpf_prog->aux->stack_depth, in do_jit() 392 bpf_prog_was_classic(bpf_prog)); in do_jit() 1013 if (!bpf_prog_was_classic(bpf_prog)) in do_jit() 1062 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) in bpf_int_jit_compile() 1065 struct bpf_prog *tmp, *orig_prog = prog; in bpf_int_jit_compile()
|
D | bpf_jit_comp32.c | 1353 offsetof(struct bpf_prog, bpf_func)); in emit_bpf_tail_call() 1462 static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, in do_jit() argument 1465 struct bpf_insn *insn = bpf_prog->insnsi; in do_jit() 1466 int insn_cnt = bpf_prog->len; in do_jit() 1473 emit_prologue(&prog, bpf_prog->aux->stack_depth); in do_jit() 1504 &prog, bpf_prog->aux); in do_jit() 1545 bpf_prog->aux); in do_jit() 1550 bpf_prog->aux); in do_jit() 1569 if (!bpf_prog->aux->verifier_zext) in do_jit() 1590 if (!bpf_prog->aux->verifier_zext) in do_jit() [all …]
|
/Linux-v5.4/net/sched/ |
D | act_bpf.c | 24 struct bpf_prog *filter; 39 struct bpf_prog *filter; in tcf_bpf_act() 187 struct bpf_prog *fp; in tcf_bpf_init_from_ops() 222 struct bpf_prog *fp; in tcf_bpf_init_from_efd() 249 struct bpf_prog *filter = cfg->filter; in tcf_bpf_cfg_cleanup()
|
/Linux-v5.4/net/packet/ |
D | internal.h | 87 struct bpf_prog __rcu *bpf_prog; member
|