Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
cd4c85c1c8
!16 Fix packaging wrong change doc
From: @wangqiang95 
Reviewed-by: @bitcoffee 
Signed-off-by: @bitcoffee
2025-01-06 11:06:10 +00:00
wangqiang
b4008634ff Fix packaging wrong change doc 2024-08-16 10:26:29 +08:00
openeuler-ci-bot
63621396c2
!18 btf_encoder: Fix dwarf int type with greater-than-16 byte issue
From: @bitcoffee 
Reviewed-by: @nlgwcy 
Signed-off-by: @nlgwcy
2024-07-30 02:18:10 +00:00
bitcoffee
10821456fc dwarves: fix dwarf int type with greater than 16 bytes issue
Signed-off-by: bitcoffee <liuxin350@huawei.com>
2024-07-29 11:24:18 +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
7 changed files with 91 additions and 66 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

View File

@ -1,59 +0,0 @@
From 66d12e4790b7c5e508b75e805589849fee782a49 Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Tue, 2 Feb 2021 09:38:46 -0300
Subject: [PATCH] dtagnames: Stop using the deprecated mallinfo() function
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bulding on fedora rawhide gets us:
/home/acme/git/pahole/dtagnames.c:17:16: error: mallinfo is deprecated [-Werror=deprecated-declarations]
17 | struct mallinfo m = mallinfo();
| ^~~~~~~~
In file included from /home/acme/git/pahole/dtagnames.c:10:
/usr/include/malloc.h:118:24: note: declared here
118 | extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED;
| ^~~~~~~~
cc1: all warnings being treated as errors
glibc-2.32.9000-26.fc34.x86_64
So stop using it, was just for debugging/assessing memory usage.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
dtagnames.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/dtagnames.c b/dtagnames.c
index 0ffcbf7..6a24c37 100644
--- a/dtagnames.c
+++ b/dtagnames.c
@@ -7,18 +7,10 @@
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
#include "dwarves.h"
#include "dutil.h"
-static void print_malloc_stats(void)
-{
- struct mallinfo m = mallinfo();
-
- fprintf(stderr, "size: %u\n", m.uordblks);
-}
-
static int class__tag_name(struct tag *tag, struct cu *cu __unused,
void *cookie __unused)
{
@@ -54,7 +46,6 @@ int main(int argc __unused, char *argv[])
}
cus__dump_class_tag_names(cus);
- print_malloc_stats();
rc = EXIT_SUCCESS;
out:
cus__delete(cus);

BIN
dwarves-1.25.tar.xz Normal file

Binary file not shown.

View File

@ -1,22 +1,22 @@
%define libname libdwarves %define libname libdwarves
%define libver 1 %define libver 1
%define libbpfver 0.1.0 %define libbpfver 1.2.0
Name: dwarves Name: dwarves
Version: 1.17 Version: 1.25
Release: 2 Release: 3
License: GPLv2 License: GPLv2
Summary: Debugging Information Manipulation Tools Summary: Debugging Information Manipulation Tools
URL: http://acmel.wordpress.com URL: http://acmel.wordpress.com
Source: http://github.com/acmel/dwarves/archive/v%{version}.tar.gz Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.xz
Source1: http://github.com/libbpf/libbpf/archive/v%{libbpfver}.tar.gz Source1: https://github.com/libbpf/libbpf/archive/refs/tags/v%{libbpfver}.tar.gz
Requires: %{libname}%{libver} = %{version}-%{release} Requires: %{libname}%{libver} = %{version}-%{release}
BuildRequires: gcc BuildRequires: gcc
BuildRequires: cmake BuildRequires: cmake
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: elfutils-devel >= 0.170 BuildRequires: elfutils-devel >= 0.170
Patch6000: dtagnames-stop-using-the-deprecated-mallinfo-function.patch Patch0: backport-btf_encoder-Fix-dwarf-int-type-with-greater-than-16-.patch
%description %description
dwarves is a set of tools that use the debugging information inserted in dwarves is a set of tools that use the debugging information inserted in
@ -41,6 +41,10 @@ Debugging information processing library development files.
tar -zxvf %{SOURCE1} --strip-components 1 -C %{_builddir}/%{name}-%{version}/lib/bpf/ tar -zxvf %{SOURCE1} --strip-components 1 -C %{_builddir}/%{name}-%{version}/lib/bpf/
%build %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 . %cmake .
make VERBOSE=1 %{?_smp_mflags} make VERBOSE=1 %{?_smp_mflags}
@ -53,7 +57,7 @@ make install DESTDIR=%{buildroot}
%files %files
%doc README.ctracer %doc README.ctracer
%doc README.btf %doc README.btf
%doc changes-v1.17 %doc changes-v%{version}
%doc NEWS %doc NEWS
%{_bindir}/* %{_bindir}/*
%dir %{_datadir}/dwarves/ %dir %{_datadir}/dwarves/
@ -80,6 +84,39 @@ make install DESTDIR=%{buildroot}
%{_libdir}/%{libname}_reorganize.so %{_libdir}/%{libname}_reorganize.so
%changelog %changelog
* Fri Aug 16 2024 wangqiang <wangqiang1@kylinos.cn> - 1.25-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Fix packaging wrong change doc
* 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 * Mon May 24 2021 xiaqirong <xiaqirong1@huawei.com> - 1.17-2
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA

Binary file not shown.

Binary file not shown.

BIN
v1.2.0.tar.gz Normal file

Binary file not shown.