bpf: unify function pointer type of dispatcher
Subsystems (4)
PATCH 1/1 bpf: unify function pointer type of dispatcher
The __bpf_prog_run() function takes a bpf_dispatcher_fn as its last argument, which are usually generated by use of the DEFINE_BPF_DISPATCHER() macro. The last argument of a bpf_dispatcher_fn is an open coded function pointer. The DEFINE_BPF_DISPATCHER() macro, on the other hand, has as its last argument a bpf_func_t, rather than an open coded function pointer. Unify these two signatures by using bpf_func_t in both places, since it's the same as the open coded function pointer.
Signed-off-by Jason A. Donenfeld <[email protected]>
--- include/linux/filter.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
include/linux/filter.h +1 -2
@@ -569,8 +569,7 @@ DECLARE_STATIC_KEY_FALSE(bpf_stats_enabled_key);typedef unsigned int (*bpf_dispatcher_fn )(const void *ctx,const struct bpf_insn *insnsi, -unsigned int (*bpf_func)(const void *, -const struct bpf_insn *)); +bpf_func_t bpf_func); static __always_inline u32 __bpf_prog_run(const struct bpf_prog *prog, const void *ctx,
Signature · 1 line
2.37.3