Blame SOURCES/bpftrace-0.13.1-RHEL-aarch64-fixes-statsnoop-and-opensnoop.patch

bd8a9c
From b23980e4f6ed33d98f4f09ef25ae17baca215cce Mon Sep 17 00:00:00 2001
acf1c8
From: Jerome Marchand <jmarchan@redhat.com>
acf1c8
Date: Thu, 11 Jun 2020 14:56:36 +0200
bd8a9c
Subject: [PATCH 6/6] RHEL: aarch64: fixes statsnoop and opensnoop
acf1c8
acf1c8
On aarch64 the open syscall has been dropped. Only openat remains,
acf1c8
wich is called by libc open() function.
acf1c8
acf1c8
The state of *stat* syscalls, is a mess. They are several generations
acf1c8
of the system calls, and not all arches provides all of them. For
acf1c8
instance, new(l)stat are missing from aarch64.
acf1c8
acf1c8
The only way I can think of fixing thess is RHEL-8 only arch specific
acf1c8
patches.
bd8a9c
bd8a9c
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
acf1c8
---
acf1c8
 tools/opensnoop.bt | 2 --
acf1c8
 tools/statsnoop.bt | 8 ++------
acf1c8
 2 files changed, 2 insertions(+), 8 deletions(-)
acf1c8
acf1c8
diff --git a/tools/opensnoop.bt b/tools/opensnoop.bt
acf1c8
index a7de8026..d99db93e 100755
acf1c8
--- a/tools/opensnoop.bt
acf1c8
+++ b/tools/opensnoop.bt
acf1c8
@@ -21,13 +21,11 @@ BEGIN
acf1c8
 	printf("%-6s %-16s %4s %3s %s\n", "PID", "COMM", "FD", "ERR", "PATH");
acf1c8
 }
acf1c8
 
acf1c8
-tracepoint:syscalls:sys_enter_open,
acf1c8
 tracepoint:syscalls:sys_enter_openat
acf1c8
 {
acf1c8
 	@filename[tid] = args->filename;
acf1c8
 }
acf1c8
 
acf1c8
-tracepoint:syscalls:sys_exit_open,
acf1c8
 tracepoint:syscalls:sys_exit_openat
acf1c8
 /@filename[tid]/
acf1c8
 {
acf1c8
diff --git a/tools/statsnoop.bt b/tools/statsnoop.bt
acf1c8
index b2d529e2..f612ea94 100755
acf1c8
--- a/tools/statsnoop.bt
acf1c8
+++ b/tools/statsnoop.bt
acf1c8
@@ -30,17 +30,13 @@ tracepoint:syscalls:sys_enter_statfs
acf1c8
 	@filename[tid] = args->pathname;
acf1c8
 }
acf1c8
 
acf1c8
-tracepoint:syscalls:sys_enter_statx,
acf1c8
-tracepoint:syscalls:sys_enter_newstat,
acf1c8
-tracepoint:syscalls:sys_enter_newlstat
acf1c8
+tracepoint:syscalls:sys_enter_statx
acf1c8
 {
acf1c8
 	@filename[tid] = args->filename;
acf1c8
 }
acf1c8
 
acf1c8
 tracepoint:syscalls:sys_exit_statfs,
acf1c8
-tracepoint:syscalls:sys_exit_statx,
acf1c8
-tracepoint:syscalls:sys_exit_newstat,
acf1c8
-tracepoint:syscalls:sys_exit_newlstat
acf1c8
+tracepoint:syscalls:sys_exit_statx
acf1c8
 /@filename[tid]/
acf1c8
 {
acf1c8
 	$ret = args->ret;
acf1c8
-- 
bd8a9c
2.35.3
acf1c8