Commit Graph

3478 Commits

Author SHA1 Message Date
c1bb87a99d tests: add ftruncate.test and truncate.test
* tests/ftruncate.c: New file.
* tests/truncate.c: Likewise.
* tests/ftruncate.test: New test.
* tests/truncate.test: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add ftruncate and truncate.
(TESTS): Add ftruncate.test and truncate.test.
* tests/.gitignore: Add ftruncate and truncate.
2015-12-01 08:28:42 +00:00
170a4cfe1c build: robustify linux/fcntl.h check
* configure.ac (AC_CHECK_TYPES): Support older linux kernel headers
by including <sys/types.h> before <linux/fcntl.h>.
2015-11-30 16:20:19 +00:00
7386ca7a07 syscall.c: move inclusion of arch specific files to the end of file
Move inclusion of arch specific files that define static functions to
the end of syscall.c.

* syscall.c (get_syscall_result_regs, get_error, getregs_old):
New forward declarations.
(arch_get_scno): Move forward.
Move inclusion of "get_scno.c", "get_syscall_args.c",
"get_syscall_result.c", "get_error.c", and "getregs_old.c"
to the end of file.
2015-11-30 15:31:30 +00:00
f3e9e61d78 x86_64: change getregs_old to forward ptrace return code
* linux/x86_64/getregs_old.c (getregs_old): Change to return ptrace
return code.
* syscall.c (get_regs) [ARCH_REGS_FOR_GETREGSET && X86_64]: Use
getregs_old return code.
2015-11-30 15:30:05 +00:00
5105d4ac96 Cleanup print_pc
Apparently, there are only two types of instruction pointer printers
depending on the architecture: those that print a register that was
fetched earlier, and those that fetch a register themselves using upeek.
With this change, architectures of the first type have ARCH_PC_REG
defined in their arch_regs.c file, architectures of the first type
have ARCH_PC_PEEK_ADDR defined there, and the common code in syscall.c
uses these macros to print the instruction pointer.

* Makefile.am (EXTRA_DIST): Remove linux/*/print_pc.c.
* linux/*/print_pc.c: Remove.
* linux/aarch64/arch_regs.c(ARCH_PC_REG): Define macro.
* linux/arc/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/arm/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/avr32/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/i386/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/ia64/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/metag/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/mips/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/nios2/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/or1k/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/powerpc64/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/powerpc/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/s390/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/s390x/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/sparc64/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/sparc/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/tile/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/x32/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/x86_64/arch_regs.c(ARCH_PC_REG): Likewise.
* linux/alpha/arch_regs.c(ARCH_PC_PEEK_ADDR): Define macro.
* linux/bfin/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/crisv10/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/crisv32/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/hppa/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/m68k/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/microblaze/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/sh64/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/sh/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* linux/xtensa/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
* syscall.c (print_pc): Stop including "print_pc.c".
Use ARCH_PC_REG or ARCH_PC_PEEK_ADDR.
2015-11-30 03:30:51 +00:00
16510517f1 cleanup: make get_scno.c files more readable
Make get_scno.c files more self-contained.  While they are still
being included by syscall.c, the latter no longer provides
a function framework for them.

* linux/aarch64/get_scno.c (arch_get_scno): Define.
* linux/alpha/get_scno.c: Likewise.
* linux/arc/get_scno.c: Likewise.
* linux/arm/get_scno.c: Likewise.
* linux/avr32/get_scno.c: Likewise.
* linux/bfin/get_scno.c: Likewise.
* linux/crisv10/get_scno.c: Likewise.
* linux/hppa/get_scno.c: Likewise.
* linux/i386/get_scno.c: Likewise.
* linux/ia64/get_scno.c: Likewise.
* linux/m68k/get_scno.c: Likewise.
* linux/metag/get_scno.c: Likewise.
* linux/microblaze/get_scno.c: Likewise.
* linux/mips/get_scno.c: Likewise.
* linux/nios2/get_scno.c: Likewise.
* linux/or1k/get_scno.c: Likewise.
* linux/powerpc/get_scno.c: Likewise.
* linux/powerpc64/get_scno.c: Likewise.
* linux/s390/get_scno.c: Likewise.
* linux/sh/get_scno.c: Likewise.
* linux/sh64/get_scno.c: Likewise.
* linux/sparc/get_scno.c: Likewise.
* linux/sparc64/get_scno.c: Likewise.
* linux/tile/get_scno.c: Likewise.
* linux/x86_64/get_scno.c: Likewise.
* linux/xtensa/get_scno.c: Likewise.
* syscall.c (arch_get_scno): New declaration.
Include "get_scno.c" in file scope.
(get_scno): Use arch_get_scno.

Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-11-30 01:46:52 +00:00
64672a6526 cleanup: make get_syscall_args.c files more readable
Make get_syscall_args.c files more self-contained.  While they are
still being included by syscall.c, the latter no longer defines
get_syscall_args function.

* linux/aarch64/get_syscall_args.c: Include "arm/get_syscall_args.c"
with get_syscall_args temporarily defined to arm_get_syscall_args.
(get_syscall_args): Define.
* linux/alpha/get_syscall_args.c (get_syscall_args): Define.
* linux/arc/get_syscall_args.c: Likewise.
* linux/arm/get_syscall_args.c: Likewise.
* linux/avr32/get_syscall_args.c: Likewise.
* linux/bfin/get_syscall_args.c: Likewise.
* linux/crisv10/get_syscall_args.c: Likewise.
* linux/hppa/get_syscall_args.c: Likewise.
* linux/i386/get_syscall_args.c: Likewise.
* linux/ia64/get_syscall_args.c: Likewise.
* linux/m68k/get_syscall_args.c: Likewise.
* linux/metag/get_syscall_args.c: Likewise.
* linux/microblaze/get_syscall_args.c: Likewise.
* linux/mips/get_syscall_args.c: Likewise.
* linux/nios2/get_syscall_args.c: Likewise.
* linux/or1k/get_syscall_args.c: Likewise.
* linux/powerpc/get_syscall_args.c: Likewise.
* linux/s390/get_syscall_args.c: Likewise.
* linux/sh/get_syscall_args.c: Likewise.
* linux/sh64/get_syscall_args.c: Likewise.
* linux/sparc/get_syscall_args.c: Likewise.
* linux/tile/get_syscall_args.c: Likewise.
* linux/x86_64/get_syscall_args.c: Likewise.
* linux/xtensa/get_syscall_args.c: Likewise.
* syscall.c (get_syscall_args): Remove.
Include "get_syscall_args.c" in file scope.

Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-11-30 00:57:14 +00:00
f51aec6abf cleanup: make get_syscall_result.c files more readable
Make get_syscall_result.c files more self-contained.  While they are
still being included by syscall.c, the latter no longer provides
a function framework for them.

* linux/alpha/get_syscall_result.c (get_syscall_result_regs): Define.
* linux/bfin/get_syscall_result.c: Likewise.
* linux/crisv10/get_syscall_result.c: Likewise.
* linux/hppa/get_syscall_result.c: Likewise.
* linux/m68k/get_syscall_result.c: Likewise.
* linux/microblaze/get_syscall_result.c: Likewise.
* linux/sh/get_syscall_result.c: Likewise.
* linux/sh64/get_syscall_result.c: Likewise.
* linux/xtensa/get_syscall_result.c: Likewise.
* syscall.c [!ARCH_REGS_FOR_GETREGSET && !ARCH_REGS_FOR_GETREGS]:
Define USE_GET_SYSCALL_RESULT_REGS macro.
[USE_GET_SYSCALL_RESULT_REGS]: Include "get_syscall_result.c".
(get_syscall_result) [USE_GET_SYSCALL_RESULT_REGS]: Stop including
"get_syscall_result.c".  Call get_syscall_result_regs.

Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-11-30 00:01:01 +00:00
0c8c5c9f4e cleanup: make get_error.c files more readable
Make get_error.c files more self-sustained.  While they are still being
included by syscall.c, the latter no longer defines get_error function.

* linux/aarch64/get_error.c: Include "arm/get_error.c" with get_error
temporarily defined to arm_get_error.
(get_error): Define.
* linux/alpha/get_error.c (get_error): Define.
* linux/arc/get_error.c: Likewise.
* linux/arm/get_error.c: Likewise.
* linux/avr32/get_error.c: Likewise.
* linux/bfin/get_error.c: Likewise.
* linux/crisv10/get_error.c: Likewise.
* linux/hppa/get_error.c: Likewise.
* linux/i386/get_error.c: Likewise.
* linux/ia64/get_error.c: Likewise.
* linux/m68k/get_error.c: Likewise.
* linux/metag/get_error.c: Likewise.
* linux/microblaze/get_error.c: Likewise.
* linux/mips/get_error.c: Likewise.
* linux/nios2/get_error.c: Likewise.
* linux/or1k/get_error.c: Likewise.
* linux/powerpc/get_error.c: Likewise.
* linux/s390/get_error.c: Likewise.
* linux/sh/get_error.c: Likewise.
* linux/sh64/get_error.c: Likewise.
* linux/sparc/get_error.c: Likewise.
* linux/sparc64/get_error.c: Likewise.
* linux/tile/get_error.c: Likewise.
* linux/x86_64/get_error.c: Likewise.
* linux/xtensa/get_error.c: Likewise.
* syscall.c: Include "get_error.c" in file scope.
(get_error): Remove.  Move arch independent code ...
(get_syscall_result): ... here.  Update get_error invocation.

Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-11-29 00:06:45 +00:00
527b42ff8d cleanup: make arch_sigreturn.c files more readable
Make arch_sigreturn.c files more self-sustained.  While they are
still being included by sigreturn.c, the latter no longer defines
arch_sigreturn function.

* linux/alpha/arch_sigreturn.c (arch_sigreturn): Define.
* linux/arm/arch_sigreturn.c: Likewise.
* linux/crisv10/arch_sigreturn.c: Likewise.
* linux/i386/arch_sigreturn.c: Likewise.
* linux/ia64/arch_sigreturn.c: Likewise.
* linux/m68k/arch_sigreturn.c: Likewise.
* linux/microblaze/arch_sigreturn.c: Likewise.
* linux/mips/arch_sigreturn.c: Likewise.
* linux/powerpc/arch_sigreturn.c: Likewise.
* linux/s390/arch_sigreturn.c: Likewise.
* linux/sparc/arch_sigreturn.c: Likewise.
* linux/tile/arch_sigreturn.c: Likewise.
* linux/x32/arch_sigreturn.c: Remove code.
Include "x86_64/arch_sigreturn.c".
* linux/x86_64/arch_sigreturn.c: Stop including "x32/arch_sigreturn.c".
Include "i386/arch_sigreturn.c" with arch_sigreturn temporarily defined
to i386_arch_sigreturn.
(arch_sigreturn): Define.  Add x32 personality support there.
* sigreturn.c: Remove arch_sigreturn header and footer.

Requested-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-11-28 02:58:29 +00:00
690235ab0f Add initial Travis CI support
* .travis.yml: New file.
* travis-ci.sh: Likewise.
2015-11-26 17:07:33 +00:00
e8199b25e0 tests: remove temporary files left after two tests
* tests/net-yy.test: Remove "$LOG"-connect and "$LOG"-accept.
* tests/unix-yy.test: Likewise.
2015-11-27 17:24:46 +00:00
2400e9ea54 tests: skip stat32-v.test on x32
Explicitly skip 32-bit stat test on x32 even if libc pretends
to support it.

* tests/stat.c (main) [__x86_64__ && __ILP32__]: Skip.
2015-11-27 17:06:38 +00:00
0ca438d13b tests: fix ipc_msgbuf.test on x32
* tests/ipc_msgbuf.c: Include "config.h" and "kernel_types.h".
(main): Replace "long" with "kernel_long_t" in struct msgbuf.
2015-11-27 14:15:30 +00:00
4408e8595c x32: fix pselect6 decoding
* desc.c: Include "kernel_types.h".
(umove_kulong_array_or_printaddr): New function.
(SYS_FUNC(pselect6)): Use it.
2015-11-27 04:37:46 +00:00
26207512e2 x32: fix sigreturn decoding
* linux/x32/arch_sigreturn.c: Implement x32_rt_sigreturn decoding.
* linux/x86_64/arch_sigreturn.c: Handle (current_personality == 0)
case only.
Include "x32/arch_sigreturn.c" instead of "i386/arch_sigreturn.c".
2015-11-27 03:34:23 +00:00
bdb07e38dd x32: fix struct dirent decoding
* kernel_types.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* configure.ac (AC_CHECK_TYPES): Check for __kernel_long_t
and __kernel_ulong_t in <asm/posix_types.h>.
* dirent.c: Stop including <dirent.h>.
(kernel_dirent): Remove.
Include "kernel_types.h".
(print_old_dirent, SYS_FUNC(getdents)): Print variables
of kernel_ulong_t type using %Lu format.
* syscall.c (kernel_long_t, kernel_ulong_t): Remove.
Include "kernel_types.h".
* tests/getdents.c (kernel_dirent): Remove.
Include "kernel_types.h".
(print_dirent): Print variables of kernel_ulong_t type using %Lu format.
2015-11-27 01:51:22 +00:00
Elvira Khabirova
a2fdfe96d5 Refer to -h on incorrect usage
* defs.h (error_msg_and_help): New prototype.
* strace.c (error_msg_and_help): New function.
(error_opt_arg, init): Use it.
(usage): Remove unnecessary arguments.
* count.c: Use the new function.
2015-11-27 02:38:59 +03:00
Elvira Khabirova
3272d2902c Rearrange flags descriptions in the usage text
* strace.c (usage): Rearrange descriptions.
* tests/strace-k.test: Change the option detecting regexp accordingly.
2015-11-27 02:38:57 +03:00
4f7db9ac82 tests: run in "set -x" mode if VERBOSE variable is non-null
* tests/init.sh: Enter "set -x" mode if $VERBOSE is non-null.
2015-11-26 21:25:31 +00:00
9c40599755 tests: fix match_diff usage
Fix argument order in match_diff invocations:
the first argument has to be actual output,
the second argument has to be expected output.

* tests/aio.test: Swap match_diff arguments.
* tests/clock_nanosleep.test: Likewise.
* tests/clock_xettime.test: Likewise.
* tests/file_handle.test: Likewise.
* tests/getdents.test: Likewise.
* tests/getdents64.test: Likewise.
* tests/getrandom.test: Likewise.
* tests/inet-cmsg.test: Likewise.
* tests/ioctl.test: Likewise.
* tests/membarrier.test: Likewise.
* tests/mlock2.test: Likewise.
* tests/nanosleep.test: Likewise.
* tests/pselect6.test: Likewise.
* tests/readdir.test: Likewise.
* tests/readlink.test: Likewise.
* tests/readlinkat.test: Likewise.
* tests/rt_sigqueueinfo.test: Likewise.
* tests/seccomp.test: Likewise.
* tests/select.test: Likewise.
* tests/sendfile.test: Likewise.
* tests/sendfile64.test: Likewise.
* tests/struct_flock.test: Likewise.
* tests/sysinfo.test: Likewise.
* tests/time.test: Likewise.
* tests/timer_create.test: Likewise.
* tests/timer_xettime.test: Likewise.
* tests/timerfd_xettime.test: Likewise.
* tests/times-fail.test: Likewise.
* tests/times.test: Likewise.
* tests/umovestr2.test: Likewise.
* tests/userfaultfd.test: Likewise.
* tests/utime.test: Likewise.
* tests/utimensat.test: Likewise.
* tests/xet_robust_list.test: Likewise.
* tests/xetitimer.test: Likewise.
* tests/xettimeofday.test: Likewise.
2015-11-26 20:36:35 +00:00
c6e5e2c134 x86_64: fix x32 personality support in print_llu_from_low_high_val
x86 is the only personality supported on x86_64
that has 32-bit syscall arguments.

* io.c (print_llu_from_low_high_val) [X86_64]: Fix
current_personality == 2 case.
2015-11-26 20:29:25 +00:00
6974c91c02 x86_64: fix x32 personality support in getllval
x86 is the only personality supported on x86_64
that has 32-bit syscall arguments.

* util.c (getllval) [X86_64]: Fix current_personality == 2 case.
2015-11-26 18:25:34 +00:00
4c65ff00ee tests/file_handle: fix expected output
* tests/file_handle.c (main): Parametrize handle_type
in open_by_handle_at parser output.
2015-11-26 16:49:39 +00:00
bb746ff803 startup_attach: fix compilation warning
* strace.c (startup_attach): Split single error_msg statement with
variable number of arguments to silence a compilation warning.
2015-11-26 01:56:44 +00:00
db9af94715 .gitignore: add mpers_xlat.h
Ignore mpers_xlat.h generated since commit v4.10-454-g5cb45b2.

* .gitignore: Add /mpers_xlat.h.

Reported-by: Elvira Khabirova <lineprinter0@gmail.com>
2015-11-26 01:49:36 +00:00
cc1e149be9 tests: add struct_flock.test
* tests/struct_flock.c: New file.
* tests/struct_flock.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add struct_flock.
(TESTS): Add struct_flock.test.
* tests/.gitignore: Add struct_flock.
2015-11-26 01:37:35 +00:00
1a713d9c8e Convert parsers of flock structures to new mpers infrastructure
* fetch_struct_flock.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* fcntl.c (print_struct_flock64): New function.
(printflock64): Use fetch_struct_flock64 and print_struct_flock64.
(printflock): Use fetch_struct_flock and print_struct_flock64.
2015-11-26 01:37:34 +00:00
c7c5270966 fcntl.c: implement decoding for all known operations
* xlat/f_owner_types.in: New file.
* xlat/f_seals.in: Likewise.
* fcntl.c: Include "xlat/f_owner_types.h" and "xlat/f_seals.h".
(print_f_owner_ex): New function.
(SYS_FUNC(fcntl)): Use it.
Handle F_SETPIPE_SZ, F_GETPIPE_SZ, F_OFD_SETLKW,
F_OFD_SETLK, F_SETOWN_EX, F_ADD_SEALS, F_SETSIG,
F_OFD_GETLK, F_GETOWN_EX, F_GET_SEALS, F_GETSIG.
2015-11-26 01:37:34 +00:00
46129c998a fcntl.c: mark F_DUPFD and F_DUPFD_CLOEXEC return code with RVAL_FD flag
* fcntl.c (SYS_FUNC(fcntl)): Set RVAL_FD flag in the return code
for F_DUPFD and F_DUPFD_CLOEXEC operations.
2015-11-26 01:37:34 +00:00
5cad846407 fcntl.c: remove redundant ifdefs
* fcntl.c (USE_PRINTFLOCK64): Remove macro.
(printflock64): Define unconditionally.
(SYS_FUNC(fcntl)): Do not check for USE_PRINTFLOCK64,
F_DUPFD_CLOEXEC, F_NOTIFY, F_SETLEASE, and F_GETLEASE macros.
2015-11-26 01:37:34 +00:00
bcc73975fd Update F_* constants
* xlat/fcntlcmds.in: Add F_SETOWN_EX, F_GETOWN_EX, F_GETOWNER_UIDS,
F_OFD_GETLK, F_OFD_SETLK, F_OFD_SETLKW, and F_CANCELLK.
Remove F_ALLOCSP, F_BLKSIZE, F_BLOCKS, F_CHKFL, F_CNVT, F_DUP2FD,
F_ISSTREAM, F_NPRIV, F_PRIV, F_QUOTACL, F_REVOKE, F_RGETLK, F_RSETLK,
F_RSETLKW, F_SHARE, and F_UNSHARE.
Add default values.
2015-11-26 01:37:34 +00:00
db62a712f9 Update LOCK_* constants
* xlat/flockcmds.in: Add LOCK_MAND, LOCK_READ, LOCK_WRITE, and LOCK_RW.
Add default values.
2015-11-26 01:37:34 +00:00
6250e6c5ed fcntl.c: use <linux/fcntl.h> instead of <fcntl.h>
Include <linux/fcntl.h> for proper definitions of F_* constants
and flock structures.

* configure.ac (AC_CHECK_TYPES): Check for struct flock, struct flock64,
struct __kernel_flock, and struct __kernel_flock64 in <linux/fcntl.h>.
* flock.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* fcntl.c: Include it instead of <fcntl.h>.
(struct flock64): Remove.
(printflock): Use struct_kernel_flock instead of struct flock.
(printflock64): Use struct_kernel_flock64 instead of struct flock64.
2015-11-26 01:37:34 +00:00
Elvira Khabirova
a5ffa18f13 mpers: fix compound types with arbitrary member alignments
* mpers.sh: Compound types are now represented as packed
with character arrays as explicit fillers inbetween members
and at the end.
2015-11-26 01:37:34 +00:00
Mike Frysinger
ba10a421b8 Support C libraries without System V shared memory/ipc
Some systems (like Bionic) omit support for SysV related code.  That
means no C library headers for strace to include.  Add configure tests
to probe the headers from the kernel and use them when they are
available.

It might make more sense to never rely on the C library's headers as
there is no guarantee or requirement that the structure layout between
apps and the C library match that what is passed to the kernel.

* configure.ac (AC_CHECK_HEADERS): Check for linux/ipc.h,
linux/mqueue.h, linux/msg.h, linux/sem.h, linux/shm.h,
sys/ipc.h, sys/msg.h, sys/sem.h, and sys/shm.h.
* ipc_defs.h: Include <sys/ipc.h> or <linux/ipc.h> depending
on what is available.
* ipc_msg.c: Replace <sys/ipc.h> with "ipc_defs.h".
Fallback to <linux/msg.h> when available.
* ipc_msgctl.c: Include <sys/msg.h>, <asm/msgbuf.h>, or <linux/msg.h>
based on what is available.  Note missing support for old ipc structs.
* ipc_sem.c: Include <sys/sem.h> or <linux/sem.h> depending
on what is available.  Only decode sembuf when available.
* ipc_shm.c: Fallback to <linux/shm.h> when available.
* ipc_shmctl.c: Include <sys/shm.h>, <asm/shmbuf.h>, or <linux/shm.h>
based on what is available.  Note missing support for old ipc structs.
* print_mq_attr.c: Fallback to <linux/mqueue.h> when available.
2015-11-26 01:36:58 +00:00
3422849673 CREDITS.in: add Jian Zhen
Thanks to Jian Zhen for donation of https://github.com/strace/ and
strace.io.

* CREDITS.in: Add Jian Zhen.
2015-11-25 19:10:56 +00:00
329288b6f9 Fix syscall entries of unimplemented getpmsg and putpmsg syscalls
* linux/ia64/syscallent.h (getpmsg): Change SEN(printargs)
to SEN(getpmsg).
(putpmsg): Change SEN(printargs) to SEN(putpmsg).
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/arm/syscallent.h (getpmsg, putpmsg): Set sys_flags to TN.
* linux/bfin/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/hppa/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/i386/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/m68k/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/microblaze/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/powerpc/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/s390/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/s390x/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/x32/syscallent.h (getpmsg, putpmsg): Likewise.
* linux/x86_64/syscallent.h (getpmsg, putpmsg): Likewise.
2015-11-24 02:50:40 +00:00
a56a81c1ec Remove parsers of getpmsg and putpmsg syscalls
These system calls are not implemented in the Linux kernel.

* linux/dummy.h(getpmsg, putpmsg): Move to the list of deprecated
syscalls.
* Makefile.am (strace_SOURCES): Remove stream.c.
* stream.c: Remove.
* xlat/pmsgflags.in: Remove.
2015-11-24 02:42:38 +00:00
aae525f94e Remove parser of query_module syscall
Since query_module syscall is present only in kernels before Linux 2.6
and strace does not support those kernels, there is no use to keep this
parser any longer.

* bjm.c: Do not include <sys/*>, "xlat/qm_which.h",
and "xlat/modflags.h".
(MOD_*, QM_*, module_symbol, module_info, SYS_FUNC(query_module)):
Remove.
* linux/dummy.h (sys_query_module): Add stub alias.
* xlat/modflags.in: Remove.
* xlat/qm_which.in: Remove.
2015-11-24 02:30:45 +00:00
25cb5cb04f Fix syscall entries of deprecated sysfs syscall
* linux/alpha/syscallent.h (sysfs): Change nargs from 5 to 3.
* linux/hppa/syscallent.h (sysfs): Likewise.
* linux/mips/syscallent-n32.h (sysfs): Likewise.
* linux/mips/syscallent-n64.h (sysfs): Likewise.
2015-11-24 02:23:18 +00:00
10bd3157b8 Move sysfs syscall to deprecated category
* linux/dummy.h (sys_sysfs): Move to the list of deprecated syscalls.
2015-11-24 02:21:35 +00:00
a318cc0532 Fix syscall entries of deprecated bdflush syscall
* linux/alpha/syscallent.h (bdflush): Change nargs from 0 to 2.
* linux/arm/syscallent.h (bdflush): Likewise.
* linux/avr32/syscallent.h (bdflush): Likewise.
* linux/bfin/syscallent.h (bdflush): Likewise.
* linux/hppa/syscallent.h (bdflush): Likewise.
* linux/i386/syscallent.h (bdflush): Likewise.
* linux/ia64/syscallent.h (bdflush): Likewise.
* linux/m68k/syscallent.h (bdflush): Likewise.
* linux/microblaze/syscallent.h (bdflush): Likewise.
* linux/powerpc/syscallent.h (bdflush): Likewise.
* linux/s390/syscallent.h (bdflush): Likewise.
* linux/s390x/syscallent.h (bdflush): Likewise.
* linux/sh/syscallent.h (bdflush): Likewise.
* linux/sh64/syscallent.h (bdflush): Likewise.
* linux/sparc/syscallent.h (bdflush): Likewise.
2015-11-24 02:17:48 +00:00
4b3a1703bd Implement name_to_handle_at and open_by_handle_at syscalls decoding
* file_handle.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_name_to_handle_at, sys_open_by_handle_at):
Remove stub aliases.
* pathtrace.c (pathtrace_match): Add SEN_name_to_handle_at.
* tests/file_handle.c: New file.
* tests/file_handle.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add file_handle.
(TESTS): Add file_handle.test.
* tests/.gitignore: Add file_handle.
2015-11-22 23:21:35 +00:00
60d7524090 Implement lookup_dcookie syscall decoding
* lookup_dcookie.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_lookup_dcookie): Remove stub alias.
2015-11-22 23:10:12 +00:00
ea1970500e Implement kexec_file_load syscall decoding
* xlat/kexec_file_load_flags.in: New file.
* kexec.c: Include "xlat/kexec_file_load_flags.h".
(SYS_FUNC(kexec_file_load)): New function.
* linux/dummy.h (sys_kexec_file_load): Remove stub alias.
* pathtrace.c (pathtrace_match): Add SEN_kexec_file_load.
2015-11-22 23:10:12 +00:00
7aa9c0d299 Implement kcmp syscall decoding
* kcmp.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_kcmp): Remove stub alias.
* xlat/kcmp_types.in: New file.
2015-11-22 23:10:12 +00:00
dcd00c3943 Implement iopl syscall decoding
* iopl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_iopl): Remove stub alias.
2015-11-22 23:10:12 +00:00
2aa180e36a Implement ioperm syscall decoding
* ioperm.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_ioperm): Remove stub alias.
2015-11-22 23:10:12 +00:00
a17f593e50 net: fix printing of IP_RECVOPTS/IP_RETOPTS cmsg options
* net.c (print_cmsg_ip_opts): Print each byte as unsigned char.
2015-11-22 23:09:59 +00:00