public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH] test: Use copyinstr to copy string from user space
Date: Thu, 16 Oct 2025 22:21:13 -0400	[thread overview]
Message-ID: <20251017022113.16738-1-eugene.loh@oracle.com> (raw)

From: Eugene Loh <eugene.loh@oracle.com>

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
 test/unittest/proc/tst.exec-execve.sh   | 2 +-
 test/unittest/proc/tst.exec-execveat.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/unittest/proc/tst.exec-execve.sh b/test/unittest/proc/tst.exec-execve.sh
index d3f84e0d2..b70f0a6ea 100755
--- a/test/unittest/proc/tst.exec-execve.sh
+++ b/test/unittest/proc/tst.exec-execve.sh
@@ -42,7 +42,7 @@ proc:::exec
 syscall::execve:entry
 /ppid == dtpid && execname == "parent.x"/
 {
-    printf("execve      %s\n", stringof(arg0));
+    printf("execve      %s\n", copyinstr(arg0));
 }' -c ./parent.x
 if [ $? -ne 0 ]; then
     echo ERROR
diff --git a/test/unittest/proc/tst.exec-execveat.sh b/test/unittest/proc/tst.exec-execveat.sh
index e4b9dfa5e..09a3d9338 100755
--- a/test/unittest/proc/tst.exec-execveat.sh
+++ b/test/unittest/proc/tst.exec-execveat.sh
@@ -44,7 +44,7 @@ proc:::exec
 syscall::execveat:entry
 /ppid == dtpid && execname == "parent.x"/
 {
-    printf("execveat    %s\n", stringof(arg1));
+    printf("execveat    %s\n", copyinstr(arg1));
 }' -c ./parent.x
 if [ $? -ne 0 ]; then
     echo ERROR
-- 
2.47.3


             reply	other threads:[~2025-10-17  2:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  2:21 eugene.loh [this message]
2025-10-17  6:11 ` [PATCH] test: Use copyinstr to copy string from user space Kris Van Hees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251017022113.16738-1-eugene.loh@oracle.com \
    --to=eugene.loh@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox