diff options
| author | Eduard Zingerman <eddyz87@gmail.com> | 2024-12-10 07:10:54 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2024-12-10 21:24:57 +0300 |
| commit | b238e187b4a2d3b54d80aec05a9cab6466b79dde (patch) | |
| tree | e2118335dc7d6aabf72b8a171eb448119278cbbe /include/linux | |
| parent | 27e88bc4df1d80888fe1aaca786a7cc6e69587e2 (diff) | |
| download | linux-b238e187b4a2d3b54d80aec05a9cab6466b79dde.tar.xz | |
bpf: refactor bpf_helper_changes_pkt_data to use helper number
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/filter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 3a21947f2fd4..0477254bc2d3 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -1122,7 +1122,7 @@ bool bpf_jit_supports_insn(struct bpf_insn *insn, bool in_arena); bool bpf_jit_supports_private_stack(void); u64 bpf_arch_uaddress_limit(void); void arch_bpf_stack_walk(bool (*consume_fn)(void *cookie, u64 ip, u64 sp, u64 bp), void *cookie); -bool bpf_helper_changes_pkt_data(void *func); +bool bpf_helper_changes_pkt_data(enum bpf_func_id func_id); static inline bool bpf_dump_raw_ok(const struct cred *cred) { |
