Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libbpf for openSUSE:Factory checked in at 2025-06-10 08:57:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libbpf (Old) and /work/SRC/openSUSE:Factory/.libbpf.new.19631 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libbpf" Tue Jun 10 08:57:44 2025 rev:28 rq:1283405 version:1.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libbpf/libbpf.changes 2025-05-27 18:49:26.978887670 +0200 +++ /work/SRC/openSUSE:Factory/.libbpf.new.19631/libbpf.changes 2025-06-10 08:58:34.250753421 +0200 @@ -1,0 +2,7 @@ +Thu Jun 5 14:34:05 UTC 2025 - Shung-Hsi Yu <shung-hsi...@suse.com> + +- Workaround kernel module size increase due to BTF deduplication + issue since the introduction of TYPEOF_UNQUAL (poo#183503) + * add 0001-libbpf-Add-identical-pointer-detection-to-btf_dedup_.patch + +------------------------------------------------------------------- New: ---- 0001-libbpf-Add-identical-pointer-detection-to-btf_dedup_.patch BETA DEBUG BEGIN: New: issue since the introduction of TYPEOF_UNQUAL (poo#183503) * add 0001-libbpf-Add-identical-pointer-detection-to-btf_dedup_.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libbpf.spec ++++++ --- /var/tmp/diff_new_pack.YzuVOj/_old 2025-06-10 08:58:34.858778499 +0200 +++ /var/tmp/diff_new_pack.YzuVOj/_new 2025-06-10 08:58:34.858778499 +0200 @@ -26,6 +26,7 @@ URL: https://github.com/libbpf/libbpf Source: https://github.com/libbpf/libbpf/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source99: baselibs.conf +Patch0: 0001-libbpf-Add-identical-pointer-detection-to-btf_dedup_.patch BuildRequires: libelf-devel BuildRequires: linux-glibc-devel >= 4.5 BuildRequires: zlib-devel ++++++ 0001-libbpf-Add-identical-pointer-detection-to-btf_dedup_.patch ++++++ >From 1f7c2f78d74e239ee4fce03f9a858062ae3d5512 Mon Sep 17 00:00:00 2001 From: Alan Maguire <alan.magu...@oracle.com> Date: Tue, 29 Apr 2025 17:10:42 +0100 Subject: [PATCH 1/1] libbpf: Add identical pointer detection to btf_dedup_is_equiv() Recently as a side-effect of commit ac053946f5c4 ("compiler.h: introduce TYPEOF_UNQUAL() macro") issues were observed in deduplication between modules and kernel BTF such that a large number of kernel types were not deduplicated so were found in module BTF (task_struct, bpf_prog etc). The root cause appeared to be a failure to dedup struct types, specifically those with members that were pointers with __percpu annotations. The issue in dedup is at the point that we are deduplicating structures, we have not yet deduplicated reference types like pointers. If multiple copies of a pointer point at the same (deduplicated) integer as in this case, we do not see them as identical. Special handling already exists to deal with structures and arrays, so add pointer handling here too. Reported-by: Alexei Starovoitov <a...@kernel.org> Signed-off-by: Alan Maguire <alan.magu...@oracle.com> Signed-off-by: Andrii Nakryiko <and...@kernel.org> Link: https://lore.kernel.org/bpf/20250429161042.2069678-1-alan.magu...@oracle.com --- src/btf.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/btf.c b/src/btf.c index e9673c0..c7df63d 100644 --- a/src/btf.c +++ b/src/btf.c @@ -4337,6 +4337,19 @@ static bool btf_dedup_identical_structs(struct btf_dedup *d, __u32 id1, __u32 id return true; } +static bool btf_dedup_identical_ptrs(struct btf_dedup *d, __u32 id1, __u32 id2) +{ + struct btf_type *t1, *t2; + + t1 = btf_type_by_id(d->btf, id1); + t2 = btf_type_by_id(d->btf, id2); + + if (!btf_is_ptr(t1) || !btf_is_ptr(t2)) + return false; + + return t1->type == t2->type; +} + /* * Check equivalence of BTF type graph formed by candidate struct/union (we'll * call it "candidate graph" in this description for brevity) to a type graph @@ -4469,6 +4482,9 @@ static int btf_dedup_is_equiv(struct btf_dedup *d, __u32 cand_id, */ if (btf_dedup_identical_structs(d, hypot_type_id, cand_id)) return 1; + /* A similar case is again observed for PTRs. */ + if (btf_dedup_identical_ptrs(d, hypot_type_id, cand_id)) + return 1; return 0; } -- 2.49.0