Nick Desaulniers and Xin Liu separately reported that int type might
have greater-than-16 byte size ([1] and [2]). More specifically, the
reported int type sizes are 1024 and 64 bytes.
The libbpf and bpf program does not really support any int type greater
than 16 bytes. Therefore, with current pahole, btf encoding will fail
with greater-than-16 byte int types.
Since for now bpf does not support '> 16' bytes int type, the simplest
way is to sanitize such types, similar to existing conditions like
'!byte_sz' and 'byte_sz & (byte_sz - 1)'. This way, pahole won't
call libbpf with an unsupported int type size. The patch [3] was
proposed before. Now I resubmitted this patch as there are another
failure due to the same issue.
Signed-off-by: bitcoffee <liuxin350@huawei.com>
(cherry picked from commit 4edfa257cd9982267aea870609a4a22884f28b96)
When building a kernel with LLVM and CONFIG_DEBUG_INFO_BTF after commit
32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files") in
the kernel, I see the following spew of warnings, which appear to come
from pahole:
die__process_unit: DW_TAG_label (0xa) @ <0x7b> not handled!
die__process_unit: tag not supported 0xa (label)!
die__process_unit: DW_TAG_label (0xa) @ <0x97> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0xbd> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0xed> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x109> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x12a> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x146> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x16f> not handled!
To fix this issue, backport dwarves upstream patch:
dwarf_loader: Support DW_TAG_label outside DW_TAG_lexblock
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
(cherry picked from commit 934a5d12d585348b435c0e32fb37ad5b97421cae)
Also upgrade bundled libbpf to commit 393a058, the same as what's
designated in upstream submodule commit.
Introduce a patch from upstream commit 73383b3a3 to avoid using
deprecated libbpf APIs.
References: bsn#158
Signed-off-by: Kai Liu <kai.liu@suse.com>
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
Change-Id: I656420e250f84c5cb513d3099868541e8fc0aa45
(cherry picked from commit 8709c8b953b4b702b74a393ca3e6f93763255e17)