[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <8a586dfbb76e489a4dadc1852769a24c3ef79ffcc4007df2084d047052bdde05@mail.kernel.org>
Date: Thu, 13 Nov 2025 11:42:41 +0000 (UTC)
From: bot+bpf-ci@...nel.org
To: paulhoussel2@...il.com,paulhoussel2@...il.com,eddyz87@...il.com,bpf@...r.kernel.org,linux-kselftest@...r.kernel.org,linux-kernel@...r.kernel.org
Cc: martin.horth@...ecom-sudparis.eu,ouail.derghal@...-atlantique.fr,guilhem.jazeron@...ia.fr,ludovic.paillat@...ia.fr,robin.theveniaut@...t.fr,tristan.daudibert@...il.com,ast@...nel.org,daniel@...earbox.net,andrii@...nel.org,martin.lau@...ux.dev,song@...nel.org,yonghong.song@...ux.dev,john.fastabend@...il.com,kpsingh@...nel.org,sdf@...ichev.me,haoluo@...gle.com,jolsa@...nel.org,shuah@...nel.org,paul.houssel@...nge.com,ast@...nel.org,andrii@...nel.org,daniel@...earbox.net,martin.lau@...nel.org,eddyz87@...il.com,yonghong.song@...ux.dev,clm@...a.com,ihor.solodrai@...ux.dev
Subject: Re: [PATCH v3 1/2] libbpf: fix BTF dedup to support recursive typedef definitions
> diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
> index 9f141395c..5c4035eb9 100644
> --- a/tools/lib/bpf/btf.c
> +++ b/tools/lib/bpf/btf.c
[ ... ]
> @@ -4844,14 +4865,31 @@ static void btf_dedup_merge_hypot_map(struct btf_dedup *d)
> }
> }
>
> +static inline long btf_hash_by_kind(struct btf_type *t, __u16 kind)
> +{
> + if (kind == BTF_KIND_TYPEDEF)
> + return btf_hash_typedef(t);
> + else
> + return btf_hash_struct(t);
> +}
> +
> +static inline bool btf_equal_by_kind(struct btf_type *t1, struct btf_type *t2, __u16 kind)
> +{
> + if (kind == BTF_KIND_TYPEDEF)
> + return btf_equal_typedef(t1, t2);
> + else
> + return btf_shallow_equal_struct(t1, t2);
> +}
> +
> /*
> - * Deduplicate struct/union types.
> + * Deduplicate struct/union and typedef types.
> *
> * For each struct/union type its type signature hash is calculated, taking
> * into account type's name, size, number, order and names of fields, but
> * ignoring type ID's referenced from fields, because they might not be deduped
> - * completely until after reference types deduplication phase. This type hash
> - * is used to iterate over all potential canonical types, sharing same hash.
> + * completely until after reference types deduplication phase. For each typedef
> + * type, the hash is computed based on the type's name and size. This type hash
> + * is used to iterate over all potential canonical types, sharingsame hash.
^^^^^^^^^^
This isn't a bug, but there's a typo here - "sharingsame" should be
"sharing same" (two words).
> * For each canonical candidate we check whether type graphs that they form
> * (through referenced types in fields and so on) are equivalent using algorithm
> * implemented in `btf_dedup_is_equiv`. If such equivalence is found and
[ ... ]
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/19329986070
Powered by blists - more mailing lists