[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 0/6] Add strace support for printing arguments of selected sys
From: |
Filip Bozuta |
Subject: |
[PATCH v5 0/6] Add strace support for printing arguments of selected syscalls |
Date: |
Fri, 19 Jun 2020 14:33:25 +0200 |
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
This series covers strace support for printing arguments of following syscalls:
*acct() *lgetxattr() *removexattr() *lchown()
*fsync() *fgetxattr() *lremovexattr() *fallocate()
*fdatasync() *listxattr() *fremovexattr()
*listen() *llistxattr() *lseek()
*getxattr() *flistxattr() *chown()
The implementation details for strace support is described in this series patch
commit messages.
Testing method:
Mini test programs were written that run these syscalls for different
arguments.
Those programs were compiled (sometimes using cross-compilers) for the
following
architectures:
* Intel 64-bit (little endian) (gcc)
* Power pc 32-bit (big endian) (powerpc-linux-gnu-gcc)
* Power pc 64-bit (big endian) (powerpc64-linux-gnu-gcc)
* Mips 32-bit (little endian) (mipsel-linux-gnu-gcc)
* Mips 64-bit (little endian) (mips64el-linux-gnuabi64-gcc)
The corresponding native programs were executed with strace, without using
QEMU, on Intel Core i7-4790K (x86_64) host.
All applicable compiled programs were in turn executed with "-strace"
through QEMU and the strace printing results obtained were the same
ones gotten for native execution.
v2:
* Added patch that extends strace support by enabling argument printing
after syscall execution
* Added strace support for argument printing for syscalls:
removexattr(), lremovexattr(), fremovexattr()
* Added "print_syscall_ret_listxattr()" that prints list of extended
attributes after execution of syscalls: listxattr(), llistxattr(),
flistxattr()
* Corrected formats in some printing functions
* Moved target_offset64() function definition from "syscall.c" to
"qemu.h"
v3:
* Added generic function SYSCALL_RET_ERR() that checks the return value
and prints the approppriate error message
* Added "print_syscall_ret_llistxattr" and "print_syscall_ret_flistxattr"
in strace.list for "llistxattr()" and "flistxattr()" that have same
definition as "print_syscall_ret_listxattr"
v4:
* Changed error printing from macro SYSCALL_RET_ERR() to function
print_syscall_err()
* Changed while loop in "print_syscall_ret_listxattr()" to check printed
bytes against size of the return value
v5:
* Corrected "print_newselect()" and "print_syscall_ret_newselect()"
to use the new functionality to store syscall argument values
* Changed while loop in "print_syscall_ret_listxattr()" to check only the
size of the return value without the variable for printed bytes
Filip Bozuta (6):
linux-user: Extend strace support to enable argument printing after
syscall execution
linux-user: Add strace support for a group of syscalls
linux-user: Add strace support for printing argument of syscalls used
for extended attributes
linux-user: Add strace support for printing arguments of lseek()
linux-user: Add strace support for printing arguments of
chown()/lchown()
linux-user: Add strace support for printing arguments of fallocate()
linux-user/qemu.h | 20 ++-
linux-user/strace.c | 328 ++++++++++++++++++++++++++++++++++-------
linux-user/strace.list | 37 ++---
linux-user/syscall.c | 18 +--
4 files changed, 315 insertions(+), 88 deletions(-)
--
2.17.1
- [PATCH v5 0/6] Add strace support for printing arguments of selected syscalls,
Filip Bozuta <=
- [PATCH v5 1/6] linux-user: Extend strace support to enable argument printing after syscall execution, Filip Bozuta, 2020/06/19
- [PATCH v5 2/6] linux-user: Add strace support for a group of syscalls, Filip Bozuta, 2020/06/19
- [PATCH v5 3/6] linux-user: Add strace support for printing argument of syscalls used for extended attributes, Filip Bozuta, 2020/06/19
- [PATCH v5 4/6] linux-user: Add strace support for printing arguments of lseek(), Filip Bozuta, 2020/06/19
- [PATCH v5 5/6] linux-user: Add strace support for printing arguments of chown()/lchown(), Filip Bozuta, 2020/06/19
- [PATCH v5 6/6] linux-user: Add strace support for printing arguments of fallocate(), Filip Bozuta, 2020/06/19
- Re: [PATCH v5 0/6] Add strace support for printing arguments of selected syscalls, no-reply, 2020/06/19
- Re: [PATCH v5 0/6] Add strace support for printing arguments of selected syscalls, no-reply, 2020/06/19