]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
libbpf: Fix parsing of multi-split BTF
authorAlan Maguire <alan.maguire@oracle.com>
Tue, 4 Nov 2025 20:33:08 +0000 (20:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:53 +0000 (13:54 +0100)
commit627be3c40095e39849739b51a05f9fa0cc3b24fc
treefcbc9220a540a682cba2462dd404f3321dcf1f91
parent551060efb156c50fe33799038ba8145418cfdeef
libbpf: Fix parsing of multi-split BTF

[ Upstream commit 4f596acc260e691a2e348f64230392f3472feea3 ]

When creating multi-split BTF we correctly set the start string offset
to be the size of the base string section plus the base BTF start
string offset; the latter is needed for multi-split BTF since the
offset is non-zero there.

Unfortunately the BTF parsing case needed that logic and it was
missed.

Fixes: 4e29128a9ace ("libbpf/btf: Fix string handling to support multi-split BTF")
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20251104203309.318429-2-alan.maguire@oracle.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/lib/bpf/btf.c