]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: refactor bpf_helper_changes_pkt_data to use helper number
authorEduard Zingerman <eddyz87@gmail.com>
Wed, 30 Apr 2025 08:19:44 +0000 (16:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:43:54 +0000 (09:43 +0200)
commit3d496a1eaaec6372c745c3564cd8fe0d11c3220a
tree4e45ed5a0d1a37e7603044d022970a941d320776
parentf0b56f1d2fcc5db6e58c168996c7a28d1ba28e99
bpf: refactor bpf_helper_changes_pkt_data to use helper number

commit b238e187b4a2d3b54d80aec05a9cab6466b79dde upstream.

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>
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/filter.h
kernel/bpf/core.c
kernel/bpf/verifier.c
net/core/filter.c