diff options
| author | 2026-04-22 20:34:46 -0700 | |
|---|---|---|
| committer | 2026-04-23 07:54:50 -0700 | |
| commit | 6a581b856c9e633c615483ad53910cba8cacbf28 (patch) | |
| tree | 4f4553ce1b108da04fb0c10d00072019d559a1bb /scripts/Makefile.thinlto | |
| parent | bpf: Remove WARN_ON_ONCE in check_kfunc_mem_size_reg() (diff) | |
bpf: Refactor to avoid redundant calculation of bpf_reg_state
In many cases, once a bpf_reg_state is defined, it can pass to
callee's. Otherwise, callee will need to get bpf_reg_state again
based on regno. More importantly, this is needed for later stack
arguments for kfuncs since the register state for stack arguments does
not have a corresponding regno. So it makes sense to pass reg state
for callee's.
The following is the only change to avoid compilation warning:
static int sanitize_check_bounds(struct bpf_verifier_env *env,
const struct bpf_insn *insn,
- const struct bpf_reg_state *dst_reg)
+ struct bpf_reg_state *dst_reg)
Acked-by: Puranjay Mohan <puranjay@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Reviewed-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260423033446.2538321-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
