import bpftrace-0.11.1-2.el8
This commit is contained in:
parent
61d3225318
commit
6be5d9af9f
@ -0,0 +1,64 @@
|
|||||||
|
From e9ebda9b3d14831df5e1c5174d21f322e084d074 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Marchand <jmarchan@redhat.com>
|
||||||
|
Date: Thu, 11 Jun 2020 14:56:36 +0200
|
||||||
|
Subject: [PATCH] RHEL-8: aarch64: fixes statsnoop and opensnoop
|
||||||
|
|
||||||
|
On aarch64 the open syscall has been dropped. Only openat remains,
|
||||||
|
wich is called by libc open() function.
|
||||||
|
|
||||||
|
The state of *stat* syscalls, is a mess. They are several generations
|
||||||
|
of the system calls, and not all arches provides all of them. For
|
||||||
|
instance, new(l)stat are missing from aarch64.
|
||||||
|
|
||||||
|
The only way I can think of fixing thess is RHEL-8 only arch specific
|
||||||
|
patches.
|
||||||
|
---
|
||||||
|
tools/opensnoop.bt | 2 --
|
||||||
|
tools/statsnoop.bt | 8 ++------
|
||||||
|
2 files changed, 2 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/opensnoop.bt b/tools/opensnoop.bt
|
||||||
|
index a7de802..d99db93 100755
|
||||||
|
--- a/tools/opensnoop.bt
|
||||||
|
+++ b/tools/opensnoop.bt
|
||||||
|
@@ -21,13 +21,11 @@ BEGIN
|
||||||
|
printf("%-6s %-16s %4s %3s %s\n", "PID", "COMM", "FD", "ERR", "PATH");
|
||||||
|
}
|
||||||
|
|
||||||
|
-tracepoint:syscalls:sys_enter_open,
|
||||||
|
tracepoint:syscalls:sys_enter_openat
|
||||||
|
{
|
||||||
|
@filename[tid] = args->filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
-tracepoint:syscalls:sys_exit_open,
|
||||||
|
tracepoint:syscalls:sys_exit_openat
|
||||||
|
/@filename[tid]/
|
||||||
|
{
|
||||||
|
diff --git a/tools/statsnoop.bt b/tools/statsnoop.bt
|
||||||
|
index b2d529e..f612ea9 100755
|
||||||
|
--- a/tools/statsnoop.bt
|
||||||
|
+++ b/tools/statsnoop.bt
|
||||||
|
@@ -30,17 +30,13 @@ tracepoint:syscalls:sys_enter_statfs
|
||||||
|
@filename[tid] = args->pathname;
|
||||||
|
}
|
||||||
|
|
||||||
|
-tracepoint:syscalls:sys_enter_statx,
|
||||||
|
-tracepoint:syscalls:sys_enter_newstat,
|
||||||
|
-tracepoint:syscalls:sys_enter_newlstat
|
||||||
|
+tracepoint:syscalls:sys_enter_statx
|
||||||
|
{
|
||||||
|
@filename[tid] = args->filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
tracepoint:syscalls:sys_exit_statfs,
|
||||||
|
-tracepoint:syscalls:sys_exit_statx,
|
||||||
|
-tracepoint:syscalls:sys_exit_newstat,
|
||||||
|
-tracepoint:syscalls:sys_exit_newlstat
|
||||||
|
+tracepoint:syscalls:sys_exit_statx
|
||||||
|
/@filename[tid]/
|
||||||
|
{
|
||||||
|
$ret = args->ret;
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: bpftrace
|
Name: bpftrace
|
||||||
Version: 0.11.1
|
Version: 0.11.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: High-level tracing language for Linux eBPF
|
Summary: High-level tracing language for Linux eBPF
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
|
|
||||||
@ -11,6 +11,9 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|||||||
Patch0: %{name}-%{version}-RHEL-8-fixes.patch
|
Patch0: %{name}-%{version}-RHEL-8-fixes.patch
|
||||||
Patch1: %{name}-%{version}-irbuilderbpf.cpp-bpforc.h-Fix-compilation-with-LLVM-.patch
|
Patch1: %{name}-%{version}-irbuilderbpf.cpp-bpforc.h-Fix-compilation-with-LLVM-.patch
|
||||||
Patch2: %{name}-%{version}-Fix-clear-when-called-on-an-array.patch
|
Patch2: %{name}-%{version}-Fix-clear-when-called-on-an-array.patch
|
||||||
|
# WARNING: because of the arch-specific patch, no autosetup is used
|
||||||
|
# Remember to patch accordingly
|
||||||
|
Patch10: %{name}-%{version}-RHEL-8-aarch64-fixes-statsnoop-and-opensnoop.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
|
||||||
# satisfied in the respective arches
|
# satisfied in the respective arches
|
||||||
@ -41,7 +44,15 @@ and predecessor tracers such as DTrace and SystemTap
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%setup
|
||||||
|
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
|
%ifarch aarch64
|
||||||
|
%patch10 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake . \
|
%cmake . \
|
||||||
@ -88,6 +99,9 @@ find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 11 2020 Jerome Marchand <jmarchan@redhat.com> - 0.11.1-2
|
||||||
|
- Fix statsnoop and opensnoop on aarch64 again
|
||||||
|
|
||||||
* Fri Nov 06 2020 Jerome Marchand <jmarchan@redhat.com> - 0.11.1-1
|
* Fri Nov 06 2020 Jerome Marchand <jmarchan@redhat.com> - 0.11.1-1
|
||||||
- Rebase on bpftrace 0.11.1
|
- Rebase on bpftrace 0.11.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user