[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <351b27a15b9222a48f720de17093ab24d14ec391.camel@gmail.com>
Date: Thu, 13 Nov 2025 11:21:09 -0800
From: Eduard Zingerman <eddyz87@...il.com>
To: Paul Houssel <paulhoussel2@...il.com>, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Martin Horth <martin.horth@...ecom-sudparis.eu>, Ouail Derghal
<ouail.derghal@...-atlantique.fr>, Guilhem Jazeron
<guilhem.jazeron@...ia.fr>, Ludovic Paillat <ludovic.paillat@...ia.fr>,
Robin Theveniaut <robin.theveniaut@...t.fr>, Tristan d'Audibert
<tristan.daudibert@...il.com>, Alexei Starovoitov <ast@...nel.org>, Daniel
Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>, John Fastabend
<john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>, Stanislav
Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa
<jolsa@...nel.org>, Shuah Khan <shuah@...nel.org>, Paul Houssel
<paul.houssel@...nge.com>
Subject: Re: [PATCH v4 1/2] libbpf: fix BTF dedup to support recursive
typedef definitions
On Thu, 2025-11-13 at 13:39 +0100, Paul Houssel wrote:
> Handle recursive typedefs in BTF deduplication
>
> Pahole fails to encode BTF for some Go projects (e.g. Kubernetes and
> Podman) due to recursive type definitions that create reference loops
> not representable in C. These recursive typedefs trigger a failure in
> the BTF deduplication algorithm.
>
> This patch extends btf_dedup_ref_type() to properly handle potential
> recursion for BTF_KIND_TYPEDEF, similar to how recursion is already
> handled for BTF_KIND_STRUCT. This allows pahole to successfully
> generate BTF for Go binaries using recursive types without impacting
> existing C-based workflows.
>
> Co-developed-by: Martin Horth <martin.horth@...ecom-sudparis.eu>
> Signed-off-by: Martin Horth <martin.horth@...ecom-sudparis.eu>
> Co-developed-by: Ouail Derghal <ouail.derghal@...-atlantique.fr>
> Signed-off-by: Ouail Derghal <ouail.derghal@...-atlantique.fr>
> Co-developed-by: Guilhem Jazeron <guilhem.jazeron@...ia.fr>
> Signed-off-by: Guilhem Jazeron <guilhem.jazeron@...ia.fr>
> Co-developed-by: Ludovic Paillat <ludovic.paillat@...ia.fr>
> Signed-off-by: Ludovic Paillat <ludovic.paillat@...ia.fr>
> Co-developed-by: Robin Theveniaut <robin.theveniaut@...t.fr>
> Signed-off-by: Robin Theveniaut <robin.theveniaut@...t.fr>
> Suggested-by: Tristan d'Audibert <tristan.daudibert@...il.com>
> Signed-off-by: Paul Houssel <paul.houssel@...nge.com>
>
> ---
Acked-by: Eduard Zingerman <eddyz87@...il.com>
[...]
Powered by blists - more mailing lists