2023-11-06 09:45:08 +00:00
|
|
|
From 8066a715dbd54e6cbfa66176544944a2df7952a6 Mon Sep 17 00:00:00 2001
|
2021-10-18 14:30:19 +00:00
|
|
|
From: Jerome Marchand <jmarchan@redhat.com>
|
|
|
|
Date: Thu, 11 Jun 2020 14:56:36 +0200
|
2023-11-06 09:45:08 +00:00
|
|
|
Subject: [PATCH] RHEL: aarch64: fixes statsnoop and opensnoop
|
2021-10-18 14:30:19 +00:00
|
|
|
|
|
|
|
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.
|
2022-05-16 17:26:46 +00:00
|
|
|
|
|
|
|
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
|
2021-10-18 14:30:19 +00:00
|
|
|
---
|
|
|
|
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
|
2023-11-06 09:45:08 +00:00
|
|
|
index bbb26419..95185e5f 100755
|
2021-10-18 14:30:19 +00:00
|
|
|
--- 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
|
|
|
|
{
|
2023-11-06 09:45:08 +00:00
|
|
|
@filename[tid] = args.filename;
|
2021-10-18 14:30:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
-tracepoint:syscalls:sys_exit_open,
|
|
|
|
tracepoint:syscalls:sys_exit_openat
|
|
|
|
/@filename[tid]/
|
|
|
|
{
|
|
|
|
diff --git a/tools/statsnoop.bt b/tools/statsnoop.bt
|
2023-11-06 09:45:08 +00:00
|
|
|
index a76b2bcc..89c2c8ea 100755
|
2021-10-18 14:30:19 +00:00
|
|
|
--- a/tools/statsnoop.bt
|
|
|
|
+++ b/tools/statsnoop.bt
|
|
|
|
@@ -30,17 +30,13 @@ tracepoint:syscalls:sys_enter_statfs
|
2023-11-06 09:45:08 +00:00
|
|
|
@filename[tid] = args.pathname;
|
2021-10-18 14:30:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
-tracepoint:syscalls:sys_enter_statx,
|
|
|
|
-tracepoint:syscalls:sys_enter_newstat,
|
|
|
|
-tracepoint:syscalls:sys_enter_newlstat
|
|
|
|
+tracepoint:syscalls:sys_enter_statx
|
|
|
|
{
|
2023-11-06 09:45:08 +00:00
|
|
|
@filename[tid] = args.filename;
|
2021-10-18 14:30:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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]/
|
|
|
|
{
|
2023-11-06 09:45:08 +00:00
|
|
|
$ret = args.ret;
|
2021-10-18 14:30:19 +00:00
|
|
|
--
|
2023-11-06 09:45:08 +00:00
|
|
|
2.41.0
|
2021-10-18 14:30:19 +00:00
|
|
|
|