import CS bcc-0.32.0-2.el9
This commit is contained in:
parent
9b479d8367
commit
854fb1250e
@ -1 +1 @@
|
|||||||
26ec7f9fc22494b9b6f20cd38ca216edc130704e SOURCES/bcc-0.30.0.tar.gz
|
c2d19784f22483fc34242c29a73d1f16d98356f9 SOURCES/bcc-0.32.0.tar.gz
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/bcc-0.30.0.tar.gz
|
SOURCES/bcc-0.32.0.tar.gz
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
From 5bc97bbc50b1ccf0c63f320ee73a2c0abe84b596 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Marchand <jmarchan@redhat.com>
|
|
||||||
Date: Fri, 17 May 2024 15:36:07 +0200
|
|
||||||
Subject: [PATCH] clang: fail when the kheaders ownership is wrong (#4928)
|
|
||||||
(#4985)
|
|
||||||
|
|
||||||
file_exists_and_ownedby() returns -1 when the file exists but its
|
|
||||||
ownership is unexpected, which is very misleading since anything non
|
|
||||||
zero is interpreted as true and a function with such a name is
|
|
||||||
expected to return a boolean. So currently all this does, is write a
|
|
||||||
warning message, and continues as if nothing is wrong.
|
|
||||||
|
|
||||||
Make file_exists_and_ownedby() returns false when the ownership is
|
|
||||||
wrong and have get_proc_kheaders() fails when this happen. Also have
|
|
||||||
all the *exists* functions return bool to avoid such issues in the
|
|
||||||
future.
|
|
||||||
|
|
||||||
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
|
|
||||||
---
|
|
||||||
src/cc/frontends/clang/kbuild_helper.cc | 22 +++++++++++++++++-----
|
|
||||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/cc/frontends/clang/kbuild_helper.cc b/src/cc/frontends/clang/kbuild_helper.cc
|
|
||||||
index 9409e4cc..5d3ad9c2 100644
|
|
||||||
--- a/src/cc/frontends/clang/kbuild_helper.cc
|
|
||||||
+++ b/src/cc/frontends/clang/kbuild_helper.cc
|
|
||||||
@@ -140,20 +140,26 @@ int KBuildHelper::get_flags(const char *uname_machine, vector<string> *cflags) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static inline int file_exists_and_ownedby(const char *f, uid_t uid)
|
|
||||||
+static inline bool file_exists(const char *f)
|
|
||||||
+{
|
|
||||||
+ struct stat buffer;
|
|
||||||
+ return (stat(f, &buffer) == 0);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline bool file_exists_and_ownedby(const char *f, uid_t uid)
|
|
||||||
{
|
|
||||||
struct stat buffer;
|
|
||||||
int ret = stat(f, &buffer) == 0;
|
|
||||||
if (ret) {
|
|
||||||
if (buffer.st_uid != uid) {
|
|
||||||
std::cout << "ERROR: header file ownership unexpected: " << std::string(f) << "\n";
|
|
||||||
- return -1;
|
|
||||||
+ return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static inline int proc_kheaders_exists(void)
|
|
||||||
+static inline bool proc_kheaders_exists(void)
|
|
||||||
{
|
|
||||||
return file_exists_and_ownedby(PROC_KHEADERS_PATH, 0);
|
|
||||||
}
|
|
||||||
@@ -231,8 +237,14 @@ int get_proc_kheaders(std::string &dirpath)
|
|
||||||
uname_data.release);
|
|
||||||
dirpath = std::string(dirpath_tmp);
|
|
||||||
|
|
||||||
- if (file_exists_and_ownedby(dirpath_tmp, 0))
|
|
||||||
- return 0;
|
|
||||||
+ if (file_exists(dirpath_tmp)) {
|
|
||||||
+ if (file_exists_and_ownedby(dirpath_tmp, 0))
|
|
||||||
+ return 0;
|
|
||||||
+ else
|
|
||||||
+ // The path exists, but is owned by a non-root user
|
|
||||||
+ // Something fishy is going on
|
|
||||||
+ return -EEXIST;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
// First time so extract it
|
|
||||||
return extract_kheaders(dirpath, uname_data);
|
|
||||||
--
|
|
||||||
2.44.0
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
From 8a9da1d866dfb69ad1ca59bdc50a799ba2da3a0c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Marchand <jmarchan@redhat.com>
|
||||||
|
Date: Thu, 24 Oct 2024 16:56:14 +0200
|
||||||
|
Subject: [PATCH] RHEL/Centos: tools: fix alignment in tp_args for bio tools
|
||||||
|
|
||||||
|
The padding in tp_args is wrong on RHEL 9 / c9s kernel because of the
|
||||||
|
kernel commit 6bc27040eb90 ("sched: Add support for lazy preemption")
|
||||||
|
which added a common field to tracepoints.
|
||||||
|
|
||||||
|
Now the dev field is at an offset of 12 bytes as shown by
|
||||||
|
block_io_start/done format file.
|
||||||
|
|
||||||
|
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
|
||||||
|
---
|
||||||
|
tools/biolatency.py | 2 +-
|
||||||
|
tools/biosnoop.py | 2 +-
|
||||||
|
tools/biotop.py | 2 +-
|
||||||
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/biolatency.py b/tools/biolatency.py
|
||||||
|
index 03b48a4c..ac150ea2 100755
|
||||||
|
--- a/tools/biolatency.py
|
||||||
|
+++ b/tools/biolatency.py
|
||||||
|
@@ -88,7 +88,7 @@ typedef struct ext_val {
|
||||||
|
} ext_val_t;
|
||||||
|
|
||||||
|
struct tp_args {
|
||||||
|
- u64 __unused__;
|
||||||
|
+ u32 __unused__[3];
|
||||||
|
dev_t dev;
|
||||||
|
sector_t sector;
|
||||||
|
unsigned int nr_sector;
|
||||||
|
diff --git a/tools/biosnoop.py b/tools/biosnoop.py
|
||||||
|
index f0fef98b..819e953f 100755
|
||||||
|
--- a/tools/biosnoop.py
|
||||||
|
+++ b/tools/biosnoop.py
|
||||||
|
@@ -66,7 +66,7 @@ struct val_t {
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tp_args {
|
||||||
|
- u64 __unused__;
|
||||||
|
+ u32 __unused__[3];
|
||||||
|
dev_t dev;
|
||||||
|
sector_t sector;
|
||||||
|
unsigned int nr_sector;
|
||||||
|
diff --git a/tools/biotop.py b/tools/biotop.py
|
||||||
|
index 879c6b8f..4c3a1c9a 100755
|
||||||
|
--- a/tools/biotop.py
|
||||||
|
+++ b/tools/biotop.py
|
||||||
|
@@ -91,7 +91,7 @@ struct val_t {
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tp_args {
|
||||||
|
- u64 __unused__;
|
||||||
|
+ u32 __unused__[3];
|
||||||
|
dev_t dev;
|
||||||
|
sector_t sector;
|
||||||
|
unsigned int nr_sector;
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
@ -24,13 +24,13 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: bcc
|
Name: bcc
|
||||||
Version: 0.30.0
|
Version: 0.32.0
|
||||||
Release: 6%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: BPF Compiler Collection (BCC)
|
Summary: BPF Compiler Collection (BCC)
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://github.com/iovisor/bcc
|
URL: https://github.com/iovisor/bcc
|
||||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch0: %%{name}-%%{version}-clang-fail-when-the-kheaders-ownership-is-wrong-4928.patch
|
Patch0: %%{name}-%%{version}-RHEL-Centos-tools-fix-alignment-in-tp_args-for-bio-t.patch
|
||||||
|
|
||||||
|
|
||||||
# Arches will be included as upstream support is added and dependencies are
|
# Arches will be included as upstream support is added and dependencies are
|
||||||
@ -149,7 +149,7 @@ Command line libbpf tools for BPF Compiler Collection (BCC)
|
|||||||
# take them.
|
# take them.
|
||||||
%if %{with libbpf_tools}
|
%if %{with libbpf_tools}
|
||||||
pushd libbpf-tools;
|
pushd libbpf-tools;
|
||||||
make BPFTOOL=bpftool LIBBPF_OBJ=%{_libdir}/libbpf.a CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}"
|
make BPFTOOL=bpftool LIBBPF_OBJ=%{_libdir}/libbpf.a CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" USE_BLAZESYM=0
|
||||||
make DESTDIR=./tmp-install prefix= install
|
make DESTDIR=./tmp-install prefix= install
|
||||||
(
|
(
|
||||||
cd tmp-install/bin
|
cd tmp-install/bin
|
||||||
@ -264,6 +264,21 @@ cp -a libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}/
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 29 2025 Jerome Marchand <jmarchan@redhat.com> - 0.32.0-1
|
||||||
|
- Rebuild with libbpf 1.5.0
|
||||||
|
|
||||||
|
* Tue Jan 14 2025 Jerome Marchand <jmarchan@redhat.com> - 0.32.0-1
|
||||||
|
- Rebase to the latest version (RHEL-63883)
|
||||||
|
|
||||||
|
* Wed Nov 06 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-9
|
||||||
|
- Fix gating tests of libbpf gating.
|
||||||
|
|
||||||
|
* Tue Nov 05 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-8
|
||||||
|
- Explicitely disable blazesym support (RHEL-49640)
|
||||||
|
|
||||||
|
* Thu Oct 24 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-7
|
||||||
|
- Fic bio* tools (RHEL-61615)
|
||||||
|
|
||||||
* Thu Jul 04 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-6
|
* Thu Jul 04 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-6
|
||||||
- Rebuild with LLVM 18 (RHEL-28684)
|
- Rebuild with LLVM 18 (RHEL-28684)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user