[PATCH v2 0/6] Add strace support for printing arguments of selected syscalls

Filip Bozuta posted 6 patches 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch failed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200608164357.25065-1-filip.bozuta@syrmia.com
Maintainers: Riku Voipio <riku.voipio@iki.fi>, Laurent Vivier <laurent@vivier.eu>
There is a newer version of this series
linux-user/qemu.h      |  20 +++-
linux-user/strace.c    | 247 ++++++++++++++++++++++++++++++++++++++++-
linux-user/strace.list |  37 +++---
linux-user/syscall.c   |  18 +--
4 files changed, 281 insertions(+), 41 deletions(-)
[PATCH v2 0/6] Add strace support for printing arguments of selected syscalls
Posted by Filip Bozuta 3 years, 11 months ago
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"

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    | 247 ++++++++++++++++++++++++++++++++++++++++-
 linux-user/strace.list |  37 +++---
 linux-user/syscall.c   |  18 +--
 4 files changed, 281 insertions(+), 41 deletions(-)

-- 
2.17.1


Re: [PATCH v2 0/6] Add strace support for printing arguments of selected syscalls
Posted by no-reply@patchew.org 3 years, 11 months ago
Patchew URL: https://patchew.org/QEMU/20200608164357.25065-1-filip.bozuta@syrmia.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200608164357.25065-1-filip.bozuta@syrmia.com
Subject: [PATCH v2 0/6] Add strace support for printing arguments of selected syscalls
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
dc47702 linux-user: Add strace support for printing arguments of fallocate()
8478ea8 linux-user: Add strace support for printing arguments of chown()/lchown()
f287b7f linux-user: Add strace support for printing arguments of lseek()
615a5d8 linux-user: Add strace support for printing argument of syscalls used for extended attributes
b0acbe9 linux-user: Add strace support for a group of syscalls
3370ce2 linux-user: Extend strace support to enable argument printing after syscall execution

=== OUTPUT BEGIN ===
1/6 Checking commit 3370ce28f836 (linux-user: Extend strace support to enable argument printing after syscall execution)
2/6 Checking commit b0acbe9ef27d (linux-user: Add strace support for a group of syscalls)
3/6 Checking commit 615a5d8e9d21 (linux-user: Add strace support for printing argument of syscalls used for extended attributes)
4/6 Checking commit f287b7f80630 (linux-user: Add strace support for printing arguments of lseek())
5/6 Checking commit 8478ea817695 (linux-user: Add strace support for printing arguments of chown()/lchown())
6/6 Checking commit dc477027df64 (linux-user: Add strace support for printing arguments of fallocate())
ERROR: storage class should be at the beginning of the declaration
#69: FILE: linux-user/strace.c:1147:
+UNUSED static struct flags falloc_flags[] = {

total: 1 errors, 0 warnings, 104 lines checked

Patch 6/6 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200608164357.25065-1-filip.bozuta@syrmia.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v2 0/6] Add strace support for printing arguments of selected syscalls
Posted by no-reply@patchew.org 3 years, 11 months ago
Patchew URL: https://patchew.org/QEMU/20200608164357.25065-1-filip.bozuta@syrmia.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200608164357.25065-1-filip.bozuta@syrmia.com
Subject: [PATCH v2 0/6] Add strace support for printing arguments of selected syscalls
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20200608164357.25065-1-filip.bozuta@syrmia.com -> patchew/20200608164357.25065-1-filip.bozuta@syrmia.com
Switched to a new branch 'test'
320f874 linux-user: Add strace support for printing arguments of fallocate()
a4df4b8 linux-user: Add strace support for printing arguments of chown()/lchown()
2a5a74d linux-user: Add strace support for printing arguments of lseek()
ebc81cb linux-user: Add strace support for printing argument of syscalls used for extended attributes
595dc96 linux-user: Add strace support for a group of syscalls
b53f9b9 linux-user: Extend strace support to enable argument printing after syscall execution

=== OUTPUT BEGIN ===
1/6 Checking commit b53f9b913213 (linux-user: Extend strace support to enable argument printing after syscall execution)
2/6 Checking commit 595dc9662da6 (linux-user: Add strace support for a group of syscalls)
3/6 Checking commit ebc81cb1d684 (linux-user: Add strace support for printing argument of syscalls used for extended attributes)
4/6 Checking commit 2a5a74d1c629 (linux-user: Add strace support for printing arguments of lseek())
5/6 Checking commit a4df4b85ae87 (linux-user: Add strace support for printing arguments of chown()/lchown())
6/6 Checking commit 320f8741ece4 (linux-user: Add strace support for printing arguments of fallocate())
ERROR: storage class should be at the beginning of the declaration
#69: FILE: linux-user/strace.c:1147:
+UNUSED static struct flags falloc_flags[] = {

total: 1 errors, 0 warnings, 104 lines checked

Patch 6/6 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200608164357.25065-1-filip.bozuta@syrmia.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com