Commit 5ca681a8 authored by Pu Lehui's avatar Pu Lehui Committed by Andrii Nakryiko
Browse files

libbpf: Fix incorrect traversal end type ID when marking BTF_IS_EMBEDDED



When redirecting the split BTF to the vmlinux base BTF, we need to mark
the distilled base struct/union members of split BTF structs/unions in
id_map with BTF_IS_EMBEDDED. This indicates that these types must match
both name and size later. Therefore, we need to traverse the entire
split BTF, which involves traversing type IDs from nr_dist_base_types to
nr_types. However, the current implementation uses an incorrect
traversal end type ID, so let's correct it.

Fixes: 19e00c89 ("libbpf: Split BTF relocation")
Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250115100241.4171581-3-pulehui@huaweicloud.com
parent 5436a543
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment