mbox series

[v2,0/4] Add strace support for printing arguments for a group of selected syscalls

Message ID 20200713095058.106624-1-Filip.Bozuta@syrmia.com (mailing list archive)
Headers show
Series Add strace support for printing arguments for a group of selected syscalls | expand

Message

Filip Bozuta July 13, 2020, 9:50 a.m. UTC
This series covers strace support for following syscalls:

   *truncate()     *munlock()          *clock_gettimeofday()
   *ftruncate()    *munlockall()       *clock_getitimer()
   *getsid()       *clock_getres()     *clock_setitimer()
   *mlock()        *clock_gettime()
   *mlockall()     *clock_settime()

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)

    The corresponding native programs were executed with strace, without using
    QEMU, on intel (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 enables 'cpu_env' to be accessible from "strace.c"
    * cut and pasted "regpairs_aligned" from 'syscall.c' to 'qemu.h' so
      that it can be used for "print_truncate64" and "print_ftruncate64"
    * changed flag names from 'TARGET_MLOCKALL_MCL_*' to 'TARGET_MCL_*'
    * added target flag value 'TARGET_MCL_ONFAULT' for 'MCL_ONFAULT'
    * added 'print_syscall_ret_setitimer' for old value of the interval
      timer
    * added a function 'print_itimer_type' that prints the interval timer
      type

Filip Bozuta (4):
  linux-user: Make cpu_env accessible in strace.c
  linux-user: Add strace support for printing arguments of
    truncate()/ftruncate() and getsid()
  linux-user: Add strace support for printing arguments of syscalls used
    to lock and unlock memory
  linux-user: Add strace support for printing arguments of some clock
    and time functions

 linux-user/aarch64/target_syscall.h    |   5 +-
 linux-user/alpha/target_syscall.h      |   5 +-
 linux-user/arm/target_syscall.h        |   6 +-
 linux-user/cris/target_syscall.h       |   5 +-
 linux-user/hppa/target_syscall.h       |   5 +-
 linux-user/i386/target_syscall.h       |   5 +-
 linux-user/m68k/target_syscall.h       |   6 +-
 linux-user/microblaze/target_syscall.h |   5 +-
 linux-user/mips/target_syscall.h       |   5 +-
 linux-user/mips64/target_syscall.h     |   5 +-
 linux-user/nios2/target_syscall.h      |   5 +-
 linux-user/openrisc/target_syscall.h   |   5 +-
 linux-user/ppc/target_syscall.h        |   5 +-
 linux-user/qemu.h                      |  39 +-
 linux-user/riscv/target_syscall.h      |   5 +-
 linux-user/s390x/target_syscall.h      |   5 +-
 linux-user/sh4/target_syscall.h        |   5 +-
 linux-user/sparc/target_syscall.h      |   5 +-
 linux-user/sparc64/target_syscall.h    |   5 +-
 linux-user/strace.c                    | 755 +++++++++++++++++--------
 linux-user/strace.list                 |  35 +-
 linux-user/syscall.c                   |  47 +-
 linux-user/tilegx/target_syscall.h     |   5 +-
 linux-user/x86_64/target_syscall.h     |   5 +-
 linux-user/xtensa/target_syscall.h     |   5 +-
 25 files changed, 648 insertions(+), 335 deletions(-)

Comments

no-reply@patchew.org July 13, 2020, 10:42 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20200713095058.106624-1-Filip.Bozuta@syrmia.com/



Hi,

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

Type: series
Message-id: 20200713095058.106624-1-Filip.Bozuta@syrmia.com
Subject: [PATCH v2 0/4] Add strace support for printing arguments for a group of selected syscalls

=== 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 ===

Switched to a new branch 'test'
773d300 linux-user: Add strace support for printing arguments of some clock and time functions
c0f4fd3 linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory
bef93ac linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid()
6601cfb linux-user: Make cpu_env accessible in strace.c

=== OUTPUT BEGIN ===
1/4 Checking commit 6601cfb1b081 (linux-user: Make cpu_env accessible in strace.c)
2/4 Checking commit bef93ac02143 (linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid())
3/4 Checking commit c0f4fd3df8ce (linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory)
ERROR: storage class should be at the beginning of the declaration
#336: FILE: linux-user/strace.c:1201:
+UNUSED static struct flags mlockall_flags[] = {

total: 1 errors, 0 warnings, 307 lines checked

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

4/4 Checking commit 773d300f9a0f (linux-user: Add strace support for printing arguments of some clock and time functions)
ERROR: storage class should be at the beginning of the declaration
#58: FILE: linux-user/strace.c:67:
+UNUSED static void print_timespec(abi_ulong, int);

ERROR: storage class should be at the beginning of the declaration
#60: FILE: linux-user/strace.c:69:
+UNUSED static void print_itimer_type(abi_ulong, int);

ERROR: storage class should be at the beginning of the declaration
#61: FILE: linux-user/strace.c:70:
+UNUSED static void print_itimerval(abi_ulong, int);

total: 3 errors, 0 warnings, 299 lines checked

Patch 4/4 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/20200713095058.106624-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