Lines Matching refs:bpf_prog
37 struct bpf_prog;
132 void (*map_poke_run)(struct bpf_map *map, u32 key, struct bpf_prog *old,
133 struct bpf_prog *new);
883 bool (*allowed)(const struct bpf_prog *prog);
994 int (*test_run)(struct bpf_prog *prog, const union bpf_attr *kattr,
1003 const struct bpf_prog *prog);
1009 const struct bpf_prog *prog,
1012 const struct bpf_prog *prog);
1013 int (*gen_epilogue)(struct bpf_insn *insn, const struct bpf_prog *prog,
1020 struct bpf_prog *prog, u32 *target_size);
1036 int (*prepare)(struct bpf_prog *prog);
1037 int (*translate)(struct bpf_prog *prog);
1038 void (*destroy)(struct bpf_prog *prog);
1042 struct bpf_prog *prog;
1180 u64 notrace __bpf_prog_enter_sleepable_recur(struct bpf_prog *prog,
1182 void notrace __bpf_prog_exit_sleepable_recur(struct bpf_prog *prog, u64 start,
1186 typedef u64 (*bpf_trampoline_enter_t)(struct bpf_prog *prog,
1188 typedef void (*bpf_trampoline_exit_t)(struct bpf_prog *prog, u64 start,
1190 bpf_trampoline_enter_t bpf_trampoline_enter(const struct bpf_prog *prog);
1191 bpf_trampoline_exit_t bpf_trampoline_exit(const struct bpf_prog *prog);
1241 struct bpf_prog *extension_prog;
1261 struct bpf_prog *prog;
1330 struct bpf_prog *tgt_prog);
1333 struct bpf_prog *tgt_prog);
1402 void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from,
1403 struct bpf_prog *to);
1412 bool bpf_prog_has_trampoline(const struct bpf_prog *prog);
1416 struct bpf_prog *tgt_prog) in bpf_trampoline_link_prog()
1422 struct bpf_prog *tgt_prog) in bpf_trampoline_unlink_prog()
1437 struct bpf_prog *from, in bpf_dispatcher_change_prog()
1438 struct bpf_prog *to) {} in bpf_dispatcher_change_prog()
1443 static inline bool bpf_prog_has_trampoline(const struct bpf_prog *prog) in bpf_prog_has_trampoline()
1513 struct bpf_prog *dst_prog;
1534 void (*recursion_detected)(struct bpf_prog *prog); /* callback if recursion is detected */
1539 struct bpf_prog **func;
1553 struct bpf_prog *prog;
1600 struct bpf_prog { struct
1648 struct bpf_prog *prog; argument
1677 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
1678 struct bpf_prog *old_prog);
1702 struct bpf_prog *tgt_prog;
1799 const struct bpf_prog *prog);
1906 int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,
1949 int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog,
1951 void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog);
1953 static inline int bpf_trampoline_link_cgroup_shim(struct bpf_prog *prog, in bpf_trampoline_link_cgroup_shim()
1958 static inline void bpf_trampoline_unlink_cgroup_shim(struct bpf_prog *prog) in bpf_trampoline_unlink_cgroup_shim()
2033 bool bpf_prog_map_compatible(struct bpf_map *map, const struct bpf_prog *fp);
2034 int bpf_prog_calc_tag(struct bpf_prog *fp);
2044 struct bpf_prog *prog,
2063 struct bpf_prog *prog;
2077 struct bpf_prog *null_prog;
2098 struct bpf_prog *old_prog);
2101 struct bpf_prog *prog);
2106 struct bpf_prog *exclude_prog,
2107 struct bpf_prog *include_prog,
2154 typedef u32 (*bpf_prog_run_fn)(const struct bpf_prog *prog, const void *ctx);
2161 const struct bpf_prog *prog; in bpf_prog_run_array()
2201 const struct bpf_prog *prog; in bpf_prog_run_array_uprobe()
2276 struct bpf_prog *bpf_prog_get(u32 ufd);
2277 struct bpf_prog *bpf_prog_get_type_dev(u32 ufd, enum bpf_prog_type type,
2279 void bpf_prog_add(struct bpf_prog *prog, int i);
2280 void bpf_prog_sub(struct bpf_prog *prog, int i);
2281 void bpf_prog_inc(struct bpf_prog *prog);
2282 struct bpf_prog * __must_check bpf_prog_inc_not_zero(struct bpf_prog *prog);
2283 void bpf_prog_put(struct bpf_prog *prog);
2285 void bpf_prog_free_id(struct bpf_prog *prog);
2349 struct bpf_prog *bpf_prog_get_curr_or_next(u32 *id);
2430 int bpf_prog_new_fd(struct bpf_prog *prog);
2433 const struct bpf_link_ops *ops, struct bpf_prog *prog);
2435 const struct bpf_link_ops *ops, struct bpf_prog *prog,
2504 typedef int (*bpf_iter_attach_target_t)(struct bpf_prog *prog,
2514 const struct bpf_prog *prog);
2549 bool bpf_iter_prog_supported(struct bpf_prog *prog);
2551 bpf_iter_get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog);
2552 int bpf_iter_link_attach(const union bpf_attr *attr, bpfptr_t uattr, struct bpf_prog *prog);
2555 struct bpf_prog *bpf_iter_get_info(struct bpf_iter_meta *meta, bool in_stop);
2556 int bpf_iter_run_prog(struct bpf_prog *prog, void *ctx);
2587 int bpf_check(struct bpf_prog **fp, union bpf_attr *attr, bpfptr_t uattr, u32 uattr_size);
2609 const struct bpf_prog *xdp_prog);
2611 const struct bpf_prog *xdp_prog,
2627 struct bpf_prog *bpf_prog_get_type_path(const char *name, enum bpf_prog_type type);
2630 int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr,
2632 int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,
2634 int bpf_prog_test_run_tracing(struct bpf_prog *prog,
2637 int bpf_prog_test_run_flow_dissector(struct bpf_prog *prog,
2640 int bpf_prog_test_run_raw_tp(struct bpf_prog *prog,
2643 int bpf_prog_test_run_sk_lookup(struct bpf_prog *prog,
2646 int bpf_prog_test_run_nf(struct bpf_prog *prog,
2650 const struct bpf_prog *prog,
2667 const struct bpf_prog *prog, in bpf_tracing_btf_ctx_access()
2692 int btf_check_type_match(struct bpf_verifier_log *log, const struct bpf_prog *prog,
2699 struct bpf_prog *bpf_prog_by_id(u32 id);
2703 const struct bpf_prog *prog);
2706 bool bpf_prog_has_kfunc_call(const struct bpf_prog *prog);
2708 bpf_jit_find_kfunc_model(const struct bpf_prog *prog,
2710 int bpf_get_kfunc_addr(const struct bpf_prog *prog, u32 func_id,
2744 void notrace bpf_prog_inc_misses_counter(struct bpf_prog *prog);
2752 static inline struct bpf_prog *bpf_prog_get(u32 ufd) in bpf_prog_get()
2757 static inline struct bpf_prog *bpf_prog_get_type_dev(u32 ufd, in bpf_prog_get_type_dev()
2764 static inline void bpf_prog_add(struct bpf_prog *prog, int i) in bpf_prog_add()
2768 static inline void bpf_prog_sub(struct bpf_prog *prog, int i) in bpf_prog_sub()
2772 static inline void bpf_prog_put(struct bpf_prog *prog) in bpf_prog_put()
2776 static inline void bpf_prog_inc(struct bpf_prog *prog) in bpf_prog_inc()
2780 static inline struct bpf_prog *__must_check
2781 bpf_prog_inc_not_zero(struct bpf_prog *prog) in bpf_prog_inc_not_zero()
2788 struct bpf_prog *prog) in bpf_link_init()
2793 const struct bpf_link_ops *ops, struct bpf_prog *prog, in bpf_link_init_sleepable()
2882 const struct bpf_prog *xdp_prog) in dev_map_generic_redirect()
2889 const struct bpf_prog *xdp_prog, in dev_map_redirect_multi()
2912 static inline struct bpf_prog *bpf_prog_get_type_path(const char *name, in bpf_prog_get_type_path()
2918 static inline int bpf_prog_test_run_xdp(struct bpf_prog *prog, in bpf_prog_test_run_xdp()
2925 static inline int bpf_prog_test_run_skb(struct bpf_prog *prog, in bpf_prog_test_run_skb()
2932 static inline int bpf_prog_test_run_tracing(struct bpf_prog *prog, in bpf_prog_test_run_tracing()
2939 static inline int bpf_prog_test_run_flow_dissector(struct bpf_prog *prog, in bpf_prog_test_run_flow_dissector()
2946 static inline int bpf_prog_test_run_sk_lookup(struct bpf_prog *prog, in bpf_prog_test_run_sk_lookup()
2957 static inline struct bpf_prog *bpf_prog_by_id(u32 id) in bpf_prog_by_id()
2972 bpf_base_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) in bpf_base_func_proto()
2981 static inline bool bpf_prog_has_kfunc_call(const struct bpf_prog *prog) in bpf_prog_has_kfunc_call()
2987 bpf_jit_find_kfunc_model(const struct bpf_prog *prog, in bpf_jit_find_kfunc_model()
2994 bpf_get_kfunc_addr(const struct bpf_prog *prog, u32 func_id, in bpf_get_kfunc_addr()
3010 static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog) in bpf_prog_inc_misses_counter()
3046 static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, in bpf_prog_get_type()
3055 bool bpf_prog_get_ok(struct bpf_prog *, enum bpf_prog_type *, bool);
3057 int bpf_prog_offload_compile(struct bpf_prog *prog);
3058 void bpf_prog_dev_bound_destroy(struct bpf_prog *prog);
3060 struct bpf_prog *prog);
3071 bool bpf_offload_prog_map_match(struct bpf_prog *prog, struct bpf_map *map);
3081 bool bpf_offload_dev_match(struct bpf_prog *prog, struct net_device *netdev);
3088 void *bpf_dev_bound_resolve_kfunc(struct bpf_prog *prog, u32 func_id);
3089 int bpf_prog_dev_bound_init(struct bpf_prog *prog, union bpf_attr *attr);
3090 int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, struct bpf_prog *old_prog);
3103 bool bpf_prog_dev_bound_match(const struct bpf_prog *lhs, const struct bpf_prog *rhs);
3113 int bpf_prog_test_run_syscall(struct bpf_prog *prog,
3117 int sock_map_get_from_fd(const union bpf_attr *attr, struct bpf_prog *prog);
3122 int sock_map_link_create(const union bpf_attr *attr, struct bpf_prog *prog);
3134 static inline void *bpf_dev_bound_resolve_kfunc(struct bpf_prog *prog, in bpf_dev_bound_resolve_kfunc()
3140 static inline int bpf_prog_dev_bound_init(struct bpf_prog *prog, in bpf_prog_dev_bound_init()
3146 static inline int bpf_prog_dev_bound_inherit(struct bpf_prog *new_prog, in bpf_prog_dev_bound_inherit()
3147 struct bpf_prog *old_prog) in bpf_prog_dev_bound_inherit()
3166 static inline bool bpf_prog_dev_bound_match(const struct bpf_prog *lhs, const struct bpf_prog *rhs) in bpf_prog_dev_bound_match()
3190 static inline int bpf_prog_test_run_syscall(struct bpf_prog *prog, in bpf_prog_test_run_syscall()
3199 struct bpf_prog *prog) in sock_map_get_from_fd()
3222 static inline int sock_map_link_create(const union bpf_attr *attr, struct bpf_prog *prog) in sock_map_link_create()
3233 struct bpf_prog *prog; in bpf_prog_inc_misses_counters()
3360 enum bpf_func_id func_id, const struct bpf_prog *prog);
3376 struct bpf_prog *prog,
3396 struct bpf_prog *prog, in bpf_sock_convert_ctx_access()
3425 struct bpf_prog *prog,
3434 struct bpf_prog *prog,
3447 struct bpf_prog *prog, in bpf_tcp_sock_convert_ctx_access()
3462 struct bpf_prog *prog, in bpf_xdp_sock_convert_ctx_access()
3478 struct bpf_prog *new, struct bpf_prog *old);
3529 static inline bool bpf_is_subprog(const struct bpf_prog *prog) in bpf_is_subprog()