On Fri, Dec 13, 2024 at 5:08 AM Anton Protopopov <aspsk@xxxxxxxxxxxxx> wrote: > > Introduce a helper to add btfs to the env->used_maps array. Use it > to simplify the check_pseudo_btf_id() function. This new helper will > also be re-used in a consequent patch. > > Signed-off-by: Anton Protopopov <aspsk@xxxxxxxxxxxxx> > --- > kernel/bpf/verifier.c | 132 ++++++++++++++++++++++++------------------ > 1 file changed, 76 insertions(+), 56 deletions(-) > I think this is a great cleanup, thanks! Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index 89bba0de853f..296765ffbdc5 100644 > --- a/kernel/bpf/verifier.c > +++ b/kernel/bpf/verifier.c > @@ -19218,50 +19218,68 @@ static int find_btf_percpu_datasec(struct btf *btf) > return -ENOENT; > } > [...]