test: Use copyinstr to copy string from user space
PATCH 1/1 test: Use copyinstr to copy string from user space
From: Eugene Loh <[email protected]>
Signed-off-by Eugene Loh <[email protected]>
--- test/unittest/proc/tst.exec-execve.sh | 2 +- test/unittest/proc/tst.exec-execveat.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
test/unittest/proc/tst.exec-execve.sh +1 -1
@@ -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
test/unittest/proc/tst.exec-execveat.sh +1 -1
@@ -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
Signature · 1 line
2.47.3
Quoted 3 lines · On Thu, Oct 16, 2025 at 10:21:13PM -0400, [email protected] wrote:
From: Eugene Loh <[email protected]>
Signed-off-by Eugene Loh <[email protected]>
Reviewed-by Kris Van Hees <[email protected]>
Quoted 34 lines
--- test/unittest/proc/tst.exec-execve.sh | 2 +- test/unittest/proc/tst.exec-execveat.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)test/unittest/proc/tst.exec-execve.sh +1
-1@@ -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 ERRORtest/unittest/proc/tst.exec-execveat.sh +1
-1@@ -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 ERRORSignature · 1 line
2.47.3