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

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