Commit da18bfa
libbpf: Ensure new BTF objects inherit input endianness
New split BTF needs to preserve base's endianness. Similarly, when
creating a distilled BTF, we need to preserve original endianness.
Fix by updating libbpf's btf__distill_base() and btf_new_empty() to retain
the byte order of any source BTF objects when creating new ones.
Fixes: ba45136 ("libbpf: Implement basic split BTF support")
Fixes: 58e185a ("libbpf: Add btf__distill_base() creating split BTF with distilled base BTF")
Reported-by: Song Liu <[email protected]>
Reported-by: Eduard Zingerman <[email protected]>
Suggested-by: Eduard Zingerman <[email protected]>
Signed-off-by: Tony Ambardar <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Tested-by: Alan Maguire <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]/
Link: https://lore.kernel.org/bpf/[email protected]1 parent 65ef66d commit da18bfa
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
| 999 | + | |
999 | 1000 | | |
1000 | 1001 | | |
1001 | 1002 | | |
| |||
5394 | 5395 | | |
5395 | 5396 | | |
5396 | 5397 | | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
5397 | 5401 | | |
5398 | 5402 | | |
5399 | 5403 | | |
| |||
0 commit comments