diff options
author | Eduard Zingerman <eddyz87@gmail.com> | 2024-12-09 20:10:54 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-09 13:33:47 +0100 |
commit | 28bcc8024033364e945c527c4beec535e81fbc2f (patch) | |
tree | f544153e1a02a12a57d06e07e094e914122286ea /kernel/bpf/core.c | |
parent | 07bb0775bacc2f474b68840a48cc0cdc61897462 (diff) |
bpf: refactor bpf_helper_changes_pkt_data to use helper number
[ Upstream commit b238e187b4a2d3b54d80aec05a9cab6466b79dde ]
Use BPF helper number instead of function pointer in
bpf_helper_changes_pkt_data(). This would simplify usage of this
function in verifier.c:check_cfg() (in a follow-up patch),
where only helper number is easily available and there is no real need
to lookup helper proto.
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20241210041100.1898468-3-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Stable-dep-of: 1a4607ffba35 ("bpf: consider that tail calls invalidate packet pointers")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/bpf/core.c')
-rw-r--r-- | kernel/bpf/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index 3af5f42ea791..2b9c8c168a0b 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c @@ -2940,7 +2940,7 @@ void __weak bpf_jit_compile(struct bpf_prog *prog) { } -bool __weak bpf_helper_changes_pkt_data(void *func) +bool __weak bpf_helper_changes_pkt_data(enum bpf_func_id func_id) { return false; } |