Le 19/06/2020 à 14:33, Filip Bozuta a écrit : > From: Filip Bozuta <filip.boz...@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(-) >
Applied to my linux-user-for-5.1 branch. Thanks, Laurent