]> 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 13:02:50 +0000 (14:02 +0100)
commitb454e6282cbfefd2e6f592c7a73131b36cb7fb96
tree524e29ded027d8a25765f9f27a384426aa9f1647
parent01bbf25c767219b14c3235bfa85906b8d2cb8fbc
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