Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
bd795ccae6
!20 [sync] PR-18: btf_encoder: Fix dwarf int type with greater-than-16 byte issue
From: @openeuler-sync-bot 
Reviewed-by: @bitcoffee 
Signed-off-by: @bitcoffee
2024-07-30 14:05:43 +00:00
bitcoffee
089039a298 dwarves: fix dwarf int type with greater than 16 bytes issue
Signed-off-by: bitcoffee <liuxin350@huawei.com>
(cherry picked from commit 10821456fc71bc95dbd29713b71497e26228830b)
2024-07-30 10:18:16 +08:00
openeuler-ci-bot
a9c1dc987c
!9 dwarves: 版本升级到1.25
From: @chenxi-mao 
Reviewed-by: @LemmyHuang 
Signed-off-by: @LemmyHuang
2023-08-21 02:34:50 +00:00
Chenxi Mao
1cced95dd2 Upgrade version to 1.25
libbpf upgrade to 1.2.0 which is same as kernel 6.4
Additionally, update dwarves and libbpf source code link.

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
2023-08-19 15:52:28 +08:00
openeuler-ci-bot
8418eac107
!7 修复使用LLVM + CONFIG_DEBUG_INFO_BTF出现的大量警告信息
From: @chenxi-mao 
Reviewed-by: @LemmyHuang 
Signed-off-by: @LemmyHuang
2023-02-23 06:23:39 +00:00
Chenxi Mao
934a5d12d5 Fix spew of warnings if build kernel with LLVM and CONFIG_DEBUG_INFO_BTF
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>
2023-02-23 10:00:57 +08:00
openeuler-ci-bot
7f3107f741
!3 升级dwarves版本到1.22
From: @chenxi-mao 
Reviewed-by: @bitcoffee 
Signed-off-by: @bitcoffee
2022-12-15 06:53:47 +00:00
Kai Liu
8709c8b953 Upgrade to version 1.22
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
2022-12-06 15:01:42 +08:00
openeuler-ci-bot
a9ca898dd6 !2 fix about stopping using the deprecated mallinfo function
From: @xia_qirong
Reviewed-by: @bitcoffee
Signed-off-by: @bitcoffee
2021-05-24 20:26:46 +08:00
xia_qirong
96895db3dd fix about stopping using the deprecated mallinfo function 2021-05-24 20:18:25 +08:00
6 changed files with 91 additions and 5 deletions

View File

@ -0,0 +1,47 @@
From b9607b8bf5fe3180ae4cd44cddaf054e5595e699 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yonghong.song@linux.dev>
Date: Wed, 24 Apr 2024 15:35:38 -0700
Subject: [PATCH dwarves] btf_encoder: Fix dwarf int type with greater-than-16 byte issue
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.
[1] https://github.com/libbpf/libbpf/pull/680
[2]https://lore.kernel.org/bpf/20240422144538.351722-1-liuxin350@huawei.com/
[3] https://lore.kernel.org/bpf/20230426055030.3743074-1-yhs@fb.com/
Cc: Xin Liu <liuxin350@huawei.com>
Cc: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
---
btf_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/btf_encoder.c b/btf_encoder.c
index 65f6e71..1aa0ad0 100644
--- a/btf_encoder.c
+++ b/btf_encoder.c
@@ -394,7 +394,7 @@ static int32_t btf_encoder__add_base_type(struct btf_encoder *encoder, const str
* these non-regular int types to avoid libbpf/kernel complaints.
*/
byte_sz = BITS_ROUNDUP_BYTES(bt->bit_size);
- if (!byte_sz || (byte_sz & (byte_sz - 1))) {
+ if (!byte_sz || (byte_sz & (byte_sz - 1)) || byte_sz > 16) {
name = "__SANITIZED_FAKE_INT__";
byte_sz = 4;
}
--
2.33.0

BIN
dwarves-1.25.tar.xz Normal file

Binary file not shown.

View File

@ -1,21 +1,23 @@
%define libname libdwarves
%define libver 1
%define libbpfver 0.1.0
%define libbpfver 1.2.0
Name: dwarves
Version: 1.17
Release: 1
Version: 1.25
Release: 2
License: GPLv2
Summary: Debugging Information Manipulation Tools
URL: http://acmel.wordpress.com
Source: http://github.com/acmel/dwarves/archive/v%{version}.tar.gz
Source1: http://github.com/libbpf/libbpf/archive/v%{libbpfver}.tar.gz
Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.xz
Source1: https://github.com/libbpf/libbpf/archive/refs/tags/v%{libbpfver}.tar.gz
Requires: %{libname}%{libver} = %{version}-%{release}
BuildRequires: gcc
BuildRequires: cmake
BuildRequires: zlib-devel
BuildRequires: elfutils-devel >= 0.170
Patch0: backport-btf_encoder-Fix-dwarf-int-type-with-greater-than-16-.patch
%description
dwarves is a set of tools that use the debugging information inserted in
ELF binaries by compilers such as GCC, used by well known debuggers such as
@ -39,6 +41,10 @@ Debugging information processing library development files.
tar -zxvf %{SOURCE1} --strip-components 1 -C %{_builddir}/%{name}-%{version}/lib/bpf/
%build
# Remove _FORTIFY_SOURCE from CFLAGS or else will get below error:
# error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
export CFLAGS=$(echo %optflags | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g')
%cmake .
make VERBOSE=1 %{?_smp_mflags}
@ -78,6 +84,39 @@ make install DESTDIR=%{buildroot}
%{_libdir}/%{libname}_reorganize.so
%changelog
* Mon Jul 29 2024 - liuxin <liuxin350@huawei.com> - 1.25-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: fix dwarf int type with greater than 16 bytes issue
* Sat Aug 19 2023 - Chenxi Mao <chenxi.mao@suse.com> - 1.25-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Upgrade dwarves version to 1.25 to fix build error
if kernel version upgrade to 6.4
* Mon Mar 21 2022 - Kai Liu <kai.liu@suse.com> - 1.22-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Fix spew of warnings if build kernel with LLVM and
CONFIG_DEBUG_INFO_BTF after commit 32ef9e5054ec
("Makefile.debug: re-enable debug info for .S files")
* Mon Mar 21 2022 - Kai Liu <kai.liu@suse.com> - 1.22-1
- Upgrade to v1.22. Also upgrade bundled libbpf to commit 393a058,
the same as upstream submodule version.
Introduce a patch from upstream commit 73383b3a3 to avoid using
deprecated libbpf APIs.
* Mon May 24 2021 xiaqirong <xiaqirong1@huawei.com> - 1.17-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:bugfix about stopping using the deprecated mallinfo function
* Wed Sep 16 2020 xiaqirong <xiaqirong1@huawei.com> - 1.17-1
- Type:package init
- ID:NA

Binary file not shown.

Binary file not shown.

BIN
v1.2.0.tar.gz Normal file

Binary file not shown.