Compare commits

...

40 Commits

Author SHA1 Message Date
acbe51899a Prepare for 4.5.20 release
* NEWS: Update for 4.5.20 release.
* configure.ac: Version 4.5.20.
* debian/changelog: 4.5.20-1.
* strace.spec: 4.5.20-1.
2010-04-13 16:09:23 +00:00
0c56f62207 Update debian/* files for the upcoming release
* debian/control: update standards-version to 3.8.4.
* debian/rules: allow parallel building.
* debian/rules: comment out verbose build, only needed for debugging.
* debian/rules: clean up clean: target, dh_clean does most of the work
  already.
* debian/rules: use *-stamp instead of stamp-*, so dh_clean can tidy
  up for us.

Signed-off-by: Frederik Schüler <fs@debian.org>
2010-04-13 16:07:31 +00:00
394f60c07e Fix s390 system call table list
* linux/s390/syscallent.h: Add the missing entries for preadv and
pwritev to the system call table list.
* linux/s390x/syscallent.h: Likewise.
2010-04-13 15:15:47 +00:00
ae4db5e1bb Update linux/ioctlent.h
* linux/ioctlent.sh: Search in asm-generic directory as well.
* linux/ioctlent.h: Regenerated.
2010-04-07 11:34:29 +00:00
623003918a Update linux/*/syscallent.h files to match Linux kernel v2.6.33
* linux/alpha/syscallent.h: Add 47 hooks.
* linux/arm/syscallent.h: Update hooks for pselect6, ppoll,
epoll_pwait.  Add 11 hooks.
* linux/bfin/syscallent.h: Update hooks for prctl, fallocate,
signalfd4, eventfd2, epoll_create1, dup3, pipe2, perf_event_open.
Hook up recvmmsg.
* linux/hppa/syscallent.h: Update hooks for signalfd4, eventfd2,
epoll_create1, dup3, pipe2, perf_event_open.
* linux/i386/syscallent.h: Fix syscall name for the kexec_load hook.
Add 5 hooks.
* linux/ia64/syscallent.h: Fix syscall name for the kexec_load hook.
Add 4 hooks.
* linux/m68k/syscallent.h: Add 50 hooks.
* linux/powerpc/syscallent.h: Fix hook for timerfd_create.  Fix
6 syscall names to match the kernel.  Use sys_semop to parse semop.
Add 14 hooks.
* linux/s390/syscallent.h: Fix syscall name for the kexec_load hook.
Add 14 hooks.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Add 13 hooks.
* linux/sh64/syscallent.h: Add 15 hooks.
* linux/sparc/syscallent.h: Add 22 hooks.
* linux/x86_64/syscallent.h: Add 5 hooks.
2010-04-07 10:19:27 +00:00
e659103147 Enhance recvmmsg parser
* net.c (sys_recvmmsg): Decode mmsghdr structure on exit from the
syscall.  Decode timespec structure both on entrance and on exit.
2010-04-07 10:19:27 +00:00
0873f29af4 Decode recvmmsg syscall
* net.c (do_msghr): New function to print struct msghdr.
(printmsghdr): Use it.
(printmmsghdr, sys_recvmmsg): New.
* linux/syscall.h: Declare sys_recvmmsg.
(SYS_sub_recvmmsg): Define.
(SYS_socket_nsubcalls): Bump.
* linux/sparc/syscall.h: Likewise.
* linux/arm/syscallent.h: Add sys_recvmmsg.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Adjust.
2010-04-07 10:19:27 +00:00
a7835e631a * strace.1: Fix quoting of hyphens and formatting of strace options. 2010-04-07 10:19:26 +00:00
7d7c963d79 Split trace_syscall() for better readability
* syscall.c (trace_syscall): Split into trace_syscall_exiting() and
trace_syscall_entering().
2010-04-07 10:19:26 +00:00
e3a7ef5a2a Implement -C option to combine regular and -c output
* defs.h (cflag_t): New enum.
* strace.1: Document -C option.
* strace.c (cflag): Update type.
(main): Handle -C option.
(trace): Update use of cflag.
* count.c (count_syscall): Move clearing of TCB_INSYSCALL to ...
* syscall.c (trace_syscall): ... here.  Update use of cflag.
Based on patch by Adrien Kunysz.
2010-04-07 10:19:26 +00:00
c94a774a3b Fix "make dist" regression introduced by commit v4.5.19-12-g5078770
* Makefile.am (EXTRA_DIST): Rename linux/syscallent.h to linux/i386/syscallent.h
2010-04-07 10:17:50 +00:00
9676499f89 * desc.c (sys_epoll_pwait): Fix output formatting bug. 2010-04-07 00:05:04 +00:00
6e63375495 * desc.c (decode_select): Fix potential stack buffer overflow. 2010-04-07 00:05:01 +00:00
4310a375e9 Fix msgsnd indirect ipccall decoding
This regression was introduced by commit v4.5.18-136-g783f5bc.
* ipc.c (tprint_msgsnd): Add and use "flags" argument.
(sys_msgsnd): Pass "flags" argument to tprint_msgsnd().
Patch by Anton Blanchard.
2010-03-31 22:22:01 +00:00
bab8940674 Hook up inotify_init1 open mode flags printer
* file.c [LINUX] (sys_inotify_init1): New function.
* linux/syscall.h: Declare new sys_inotify_init1 handler.
* linux/bfin/syscallent.h: Hook up new handler.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2010-03-23 01:14:03 +00:00
360986bacd Avoid spurious error when checking for linux/netlink.h
* configure.ac: Include <asm/types.h> when checking for
linux/netlink.h.
2010-03-09 11:38:46 +01:00
edb393420c Fix reporting signal mask by sigreturn on powerpc
* signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when
locating signal context.
2010-02-23 22:26:16 +01:00
200370419b Fix MIPS N32/N64 compile error
* syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass
tcp->pid to ptrace().
2010-02-09 21:37:50 +00:00
c8c6698ef7 Add support for the TILE architecture
* configure.ac: Add TILE to the list of supported architectures.
* defs.h: Define TCB_WAITEXECVE for TILE.
* linux/tile/syscallent.h: New file.
* Makefile.am (EXTRA_DIST): Add linux/tile/syscallent.h
* process.c (change_syscall, struct_user_offsets): Add TILE support.
* syscall.c (get_scno, get_error, syscall_enter): Likewise.
* mem.c (mmap_flags, print_mmap): Add MAP_CACHE_xxx TILE extensions
support.
* signal.c (sigact_flags): Add SA_NOPTRACE.
(sys_sigreturn): Add TILE support.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2010-02-05 22:09:30 +00:00
e5e6085806 Remove dead code
* defs.h (tv_tv): Remove.
* net.c (sys_xsetsockaddr): Remove commented out dead code.
* process.c (setarg, sys_execv, sys_execve, struct_user_offsets):
Likewise.
* signal.c (sys_sigsuspend): Likewise.
* strace.c (reaper, trace): Likewise.
* stream.c (internal_stream_ioctl): Likewise.
* syscall.c (trace_syscall): Likewise.
* term.c (term_ioctl): Likewise.
* util.c (tv_tv, umoven, uload, getpc, fixvfork, setbpt, clearbpt):
Likewise.
2010-02-04 22:40:57 +00:00
257e15737d Merge Linux internal_clone() into internal_fork()
* defs.h (internal_clone): Remove.
* process.c (internal_clone): Merge into internal_fork().
(internal_fork) [!LINUX]: Remove dead code.
* syscall.c (internal_syscall): Replace internal_clone() with
internal_fork().
2010-02-04 22:40:57 +00:00
27bb9ee15e * Makefile.am (INCLUDES): Remove redundant search directories. 2010-02-04 22:31:31 +00:00
881f573876 Update debian/* files
* debian/control: add sparc64 to the architectures list.
This closes Debian bug #560062
* Backport commit f0df31e71a to fix FTBFS.
This closes Debian bug #560516
* debian/control: Update standards-version to 3.8.3.
* debian/control: Lower package priority to optional, matching
the archive override.
* debian/control: add ${misc:Depends} to Depends: lines where
appropriate.
* debian/watch: new file, allows automatic tracking of new
upstream versions.
* debian/source/format: new file, adapt to debian source format "quilt"
* debian/rules: indentation cleanups; use dh_testroot and dh_prep
in clean target.
2010-02-04 12:20:25 -08:00
3de3d6bf5a Fix spurious failure of AC_STAT64 test
* acinclude.m4 (AC_STAT64): Include <sys/types.h> first.
2010-01-25 11:34:02 +01:00
840d85b3e5 Don't kill the process when detaching
* strace.c (detach): Call clearbpt when TCB_BPTSET is set.
2010-01-12 11:16:32 +01:00
fdc45590eb Decode fifth argument of mremap syscall
* mem.c (sys_mremap): Decode fifth argument.
* linux/*/syscallent.h: Update the number of mremap syscall arguments.
2009-12-25 00:20:12 +00:00
c5fd1d9c82 * mem.c (sys_mbind): Display first argument in hex 2009-12-24 23:19:35 +00:00
ff3474aa5a * mem.c (mremap_flags): Add MREMAP_FIXED 2009-12-24 23:19:19 +00:00
5078770858 Move i386-specific files out of common linux dir
* linux/syscallent.h: Moved to ...
* linux/i386/syscallent.h: ... here.
* linux/ia64/syscallent.h: Update i386 syscallent.h include.
* linux/sparc/gen.pl: Likewise.
* linux/x86_64/syscallent1.h: Likewise.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-16 11:22:57 +00:00
e5355de95c Remove support for pre-C89
* defs.h: Remove references to __STDC__ and P macros.
* strace.c: Likewise.
2009-11-16 11:16:36 +00:00
ca75bd6dff Decode more SOL_PACKET socket options
* net.c (sockpacketoptions): Add more PACKET_* entries.
(sys_getsockopt): Decode PACKET_STATISTICS.
(printsockopt): Decode PACKET_RX_RING and PACKET_TX_RING.
Patch by Gabor Gombas.
2009-11-13 14:22:42 +00:00
46ed50d569 Ignore errors if a thread is killed
* util.c (clearbpt): Ignore ESRCH error.
2009-11-11 13:54:04 +01:00
9906e6da8b Fix handling of Linux systems without struct statfs64
* acinclude.m4 (AC_STATFS64): New macro to check for struct statfs64.
* configure.ac: Call AC_STATFS64.
* file.c (printstatfs64, sys_statfs64, sys_fstatfs64): Compile only
  if struct statfs64 is available.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-06 21:01:28 +00:00
3128919301 Fix getsockopt decoding on architectures where sizeof(long) > sizeof(int)
* net.c (sys_getsockopt): Optimize output a bit.
Decode integer argument using printnum_int(), patch by Gabor Gombas.
2009-11-06 18:16:12 +00:00
62e0596dbd Check umove() return code
* bjm.c (sys_query_module): Print input parameters when entering
syscall.  Fix handling of syscall error.  Handle unlikely umove()
failures.
* ipc.c (tprint_msgrcv): New function.  Move part of msgrcv parser code
here, add check umove() return code.
(sys_msgsnd): Print msqid parameter as int instead of long.
(sys_msgrcv): Likewise.  Use tprint_msgrcv().
* process.c (print_affinitylist): Check umove() return code.
* sock.c (sock_ioctl): Handle unlikely umove() failure in the
SIOCGIFCONF parser.
2009-11-06 17:27:46 +00:00
f0df31e71a Fix check for linux/netlink.h on Linux 2.6.32-rc5+
* configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include
sys/socket.h instead of linux/socket.h beforehand.
2009-11-06 16:57:15 +00:00
fe9495369e Decode fallocate on PowerPC
* linux/powerpc/syscallent.h: Decode fallocate.
2009-11-04 17:15:46 +01:00
b5600fc3df Factor out printing of 64bit syscall argument
* defs.h (ALIGN64): Remove.
(printllval): Declare.
* util.c (printllval): Define.
* file.c (sys_readahead): Use printllval.
(sys_lseek64): Likewise.
(sys_truncate64): Likewise.
(sys_ftruncate64): Likewise.
(sys_fadvise64): Likewise.
(sys_fadvise64_64): Likewise.
(sys_fallocate): Likewise.
* io.c (sys_pread): Likewise.
(sys_pwrite): Likewise.
(sys_pread64): Likewise.
(sys_pwrite64): Likewise.
* mem.c (sys_mmap64): Likewise.
2009-11-04 17:10:25 +01:00
d45f0a66c1 Correct decoding of readahead and fadvice64(_64) on PowerPC
* file.c (sys_readahead): Align 64bit argument.  Handle PowerPC64
like other 64bit architectures.
(sys_fadvise64): Likewise.
(sys_fadvise64_64): Handle PowerPC like ARM.
* linux/powerpc/syscallent.h (sys_readahead): Account for 64bit
argument alignment on PowerPC32.
2009-11-03 16:14:29 +01:00
ccdff481c0 Maintain separate print column for each process
* defs.h (struct tcp): Add curcol.
* strace.c: (alloc_tcb): Initialize it.
(trace): Use curcol from current process and save it before
continuing.
(tprintf): Don't modify curcol on output error.
2009-10-27 16:30:41 +01:00
51 changed files with 2286 additions and 2053 deletions

View File

@ -10,7 +10,7 @@ OS = @opsys@
ARCH = @arch@
AM_CFLAGS = $(WARNFLAGS)
INCLUDES = -I$(OS)/$(ARCH) -I$(srcdir)/$(OS)/$(ARCH) -I$(OS) -I$(srcdir)/$(OS)
INCLUDES = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS)
strace_SOURCES = strace.c syscall.c count.c util.c desc.c file.c ipc.c \
io.c ioctl.c mem.c net.c process.c bjm.c quota.c \
@ -28,7 +28,8 @@ EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
README-freebsd README-linux README-sunos4 README-svr4 \
linux/ioctlsort.c linux/ioctlent.sh \
linux/ioctlent.h linux/errnoent.h linux/signalent.h \
linux/syscall.h linux/syscallent.h linux/dummy.h \
linux/syscall.h linux/dummy.h \
linux/i386/syscallent.h \
linux/alpha/errnoent.h linux/alpha/ioctlent.h \
linux/alpha/signalent.h linux/alpha/syscallent.h \
linux/arm/syscallent.h linux/arm/syscallent1.h \
@ -68,6 +69,7 @@ EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
linux/sparc64/syscall.h linux/sparc64/syscall1.h \
linux/sparc64/syscallent.h linux/sparc64/syscallent1.h \
linux/sparc64/syscallent2.h \
linux/tile/syscallent.h \
linux/x86_64/syscallent.h linux/x86_64/gentab.pl \
linux/x86_64/errnoent1.h linux/x86_64/ioctlent1.h \
linux/x86_64/signalent1.h linux/x86_64/syscallent1.h \

36
NEWS
View File

@ -1,3 +1,38 @@
Noteworthy changes in release 4.5.20
====================================
* Improvements
* Implemented decoding of new linux syscalls: inotify_init1, recvmmsg.
* Implemented basic decoding of new linux syscalls: preadv, pwritev,
rt_tgsigqueueinfo, perf_event_open.
* Enhanced decoding of recently added syscalls on non-x86 architectures
by replacing a bare decoder with elaborate parsers enabled earlier
for x86/x86-64.
* Implemented -C option to combine regular and -c output.
(Addresses Debian bug #466196)
* Enhanced decoding of mbind and mremap syscalls.
* Enhanced SOL_PACKET socket options decoding.
* Regenerated list of ioctl names from linux 2.6.33.
* Added TILE architecture support.
* Bug fixes
* Fixed build with Linux kernel headers 2.6.32-rc5+.
(Addresses Debian bug #560516 and Fedora bug #539044)
* Fixed build on mips.
* Fixed handling of Linux systems without struct statfs64.
* Fixed reporting signal mask by sigreturn on powerpc.
* Fixed potential stack buffer overflow in select decoder.
(Addresses Fedora bug #556678)
* Corrected msgsnd indirect ipccall decoding.
* Corrected decoding of 64bit syscalls.
(Addresses Debian bug #570603)
* Corrected getsockopt decoding on architectures where
sizeof(long) > sizeof(int).
(Addresses Debian bug #494844)
* Corrected decoding of epoll_pwait.
(Addresses Debian bug #513014)
* Corrected handling of killed threads.
Noteworthy changes in release 4.5.19
====================================
@ -38,6 +73,7 @@ Noteworthy changes in release 4.5.19
* Marked sendfile(2) as a network syscall.
(Addresses Debian bug #509499)
* Fixed accept(2) decoding.
(Addresses Debian bug #507573)
* Fixed sigtimedwait(2) decoding.
* Fixed build on ARM EABI.
(Addresses Debian bugs #520084 and #535564, and Fedora bug #507576)

View File

@ -196,7 +196,8 @@ dnl ### A macro to determine whether stat64 is defined.
AC_DEFUN([AC_STAT64],
[AC_MSG_CHECKING(for stat64 in (asm|sys)/stat.h)
AC_CACHE_VAL(ac_cv_type_stat64,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#ifdef LINUX
#include <linux/types.h>
#include <asm/stat.h>
#else
@ -210,6 +211,23 @@ then
fi
])
dnl ### A macro to determine whether statfs64 is defined.
AC_DEFUN([AC_STATFS64],
[AC_MSG_CHECKING(for statfs64 in sys/vfs.h)
AC_CACHE_VAL(ac_cv_type_statfs64,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
#include <linux/types.h>
#include <sys/vfs.h>
#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
AC_MSG_RESULT($ac_cv_type_statfs64)
if test "$ac_cv_type_statfs64" = yes
then
AC_DEFINE([HAVE_STATFS64], 1,
[Define if statfs64 is available in sys/vfs.h.])
fi
])
dnl ### A macro to determine if off_t is a long long
AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
[AC_MSG_CHECKING(for long long off_t)

79
bjm.c
View File

@ -98,52 +98,54 @@ static const struct xlat modflags[] = {
};
int
sys_query_module(tcp)
struct tcb *tcp;
sys_query_module(struct tcb *tcp)
{
if (exiting(tcp)) {
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
tprintf(", ");
printxval(which, tcp->u_arg[1], "QM_???");
tprintf(", ");
if (!verbose(tcp)) {
tprintf("%#lx, %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[4]);
} else if (tcp->u_rval!=0) {
size_t ret;
umove(tcp, tcp->u_arg[4], &ret);
tprintf("%#lx, %lu, %Zu", tcp->u_arg[2], tcp->u_arg[3], ret);
} else {
size_t ret;
if (!verbose(tcp) || syserror(tcp) ||
umove(tcp, tcp->u_arg[4], &ret) < 0) {
tprintf("%#lx, %lu, %#lx", tcp->u_arg[2],
tcp->u_arg[3], tcp->u_arg[4]);
} else if (tcp->u_arg[1]==QM_INFO) {
struct module_info mi;
size_t ret;
umove(tcp, tcp->u_arg[2], &mi);
tprintf("{address=%#lx, size=%lu, flags=", mi.addr, mi.size);
printflags(modflags, mi.flags, "MOD_???");
tprintf(", usecount=%lu}", mi.usecount);
umove(tcp, tcp->u_arg[4], &ret);
tprintf(", %Zu", ret);
if (umove(tcp, tcp->u_arg[2], &mi) < 0) {
tprintf("%#lx, ", tcp->u_arg[2]);
} else {
tprintf("{address=%#lx, size=%lu, flags=",
mi.addr, mi.size);
printflags(modflags, mi.flags, "MOD_???");
tprintf(", usecount=%lu}, ", mi.usecount);
}
tprintf("%Zu", ret);
} else if ((tcp->u_arg[1]==QM_MODULES) ||
(tcp->u_arg[1]==QM_DEPS) ||
(tcp->u_arg[1]==QM_REFS)) {
size_t ret;
umove(tcp, tcp->u_arg[4], &ret);
tprintf("{");
if (!abbrev(tcp)) {
char* data = (char*)malloc(tcp->u_arg[3]);
char* data = malloc(tcp->u_arg[3]);
char* mod = data;
size_t idx;
if (data==NULL) {
if (!data) {
fprintf(stderr, "out of memory\n");
tprintf(" /* %Zu entries */ ", ret);
} else {
umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data);
for (idx=0; idx<ret; idx++) {
if (idx!=0)
tprintf(",");
tprintf("%s", mod);
mod+=strlen(mod)+1;
if (umoven(tcp, tcp->u_arg[2],
tcp->u_arg[3], data) < 0) {
tprintf(" /* %Zu entries */ ", ret);
} else {
for (idx=0; idx<ret; idx++) {
tprintf("%s%s",
(idx ? ", " : ""),
mod);
mod += strlen(mod)+1;
}
}
free(data);
}
@ -151,22 +153,27 @@ struct tcb *tcp;
tprintf(" /* %Zu entries */ ", ret);
tprintf("}, %Zu", ret);
} else if (tcp->u_arg[1]==QM_SYMBOLS) {
size_t ret;
umove(tcp, tcp->u_arg[4], &ret);
tprintf("{");
if (!abbrev(tcp)) {
char* data = (char *)malloc(tcp->u_arg[3]);
char* data = malloc(tcp->u_arg[3]);
struct module_symbol* sym = (struct module_symbol*)data;
size_t idx;
if (data==NULL) {
if (!data) {
fprintf(stderr, "out of memory\n");
tprintf(" /* %Zu entries */ ", ret);
} else {
umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data);
for (idx=0; idx<ret; idx++) {
tprintf("{name=%s, value=%lu} ", data+(long)sym->name, sym->value);
sym++;
if (umoven(tcp, tcp->u_arg[2],
tcp->u_arg[3], data) < 0) {
tprintf(" /* %Zu entries */ ", ret);
} else {
for (idx=0; idx<ret; idx++) {
tprintf("%s{name=%s, value=%lu}",
(idx ? " " : ""),
data+(long)sym->name,
sym->value);
sym++;
}
}
free(data);
}

View File

@ -1,6 +1,6 @@
dnl Process this file with autoconf to create configure. Use autoreconf.
AC_PREREQ(2.57)
AC_INIT([strace],[4.5.19])
AC_INIT([strace],[4.5.20])
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
AM_CONFIG_HEADER([config.h])
@ -120,6 +120,10 @@ crisv32)
arch=crisv32
AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.])
;;
tile*)
arch=tile
AC_DEFINE([TILE], 1, [Define for the Tile architecture])
;;
*)
AC_MSG_RESULT([NO!])
AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
@ -187,6 +191,7 @@ AC_CHECK_MEMBERS([struct stat.st_blksize,
struct stat.st_level,
struct stat.st_rdev])
AC_STAT64
AC_STATFS64
AC_TYPE_SIGNAL
AC_TYPE_UID_T
@ -258,7 +263,8 @@ AC_CHECK_HEADERS([ \
], [], [])
AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
[], [], [#include <stddef.h>
#include <linux/socket.h>])
#include <sys/socket.h>
#include <asm/types.h>])
AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
AC_CHECK_TYPES([struct sigcontext_struct,
struct sigcontext],,, [#include <signal.h>])

View File

@ -50,7 +50,6 @@ static struct timeval shortest = { 1000000, 0 };
int
count_syscall(struct tcb *tcp, struct timeval *tv)
{
tcp->flags &= ~TCB_INSYSCALL;
if (tcp->scno < 0 || tcp->scno >= nsyscalls)
return 0;

34
debian/changelog vendored
View File

@ -1,3 +1,36 @@
strace (4.5.20-1) unstable; urgency=low
[ Dmitry V. Levin ]
* New upstream version.
+ Corrected decoding of 64bit syscalls, closes: #570603
+ Corrected getsockopt decoding on architectures where
sizeof(long) > sizeof(int), closes: #494844
+ Corrected decoding of epoll_pwait, closes: #513014
+ Implemented -C option to combine regular and -c output, closes: #466196
[ Frederik Schüler ]
* Update standards-version to 3.8.4.
* debian/rules: allow parallel building.
* debian/rules: comment out verbose build, only needed for debugging.
* debian/rules: clean up clean: target, dh_clean does most of the work
already.
* debian/rules: use *-stamp instead of stamp-*, so dh_clean can tidy
up for us.
-- Frederik Schüler <fs@debian.org> Tue, 13 Apr 2010 13:02:57 +0200
strace (4.5.19-2) unstable; urgency=low
* Add sparc64 to the architectures list, closes: #560062
* Fix FTBFS, thanks to Aurelien Jarno <aurelien@aurel32.net> for pointing
out the solution. Closes: #560516
* Rebuild as normal package, closes: #566968
* Update standards-version to 3.8.3.
* Lower package priority to optional, matching the archive override.
* Add watch file.
-- Frederik Schüler <fs@debian.org> Tue, 26 Jan 2010 12:20:51 +0100
strace (4.5.19-1) unstable; urgency=low
[ Dmitry V. Levin ]
@ -5,6 +38,7 @@ strace (4.5.19-1) unstable; urgency=low
+ Fixed FTBFS on armel, closes: #520084, #535564
+ Marked sendfile(2) as a network syscall, closes: #509499
+ Fixed syscall numbers for tee and sync_file_range, closes: #503124
+ Corrected accept(2) decoding, closes: #507573
+ Changed strace to exit/kill with traced process
exitcode/signal, closes: #37665

17
debian/control vendored
View File

@ -1,16 +1,14 @@
Source: strace
Maintainer: Frederik Schüler <fs@debian.org>
Section: utils
Priority: standard
Priority: optional
Build-Depends: libc6-dev (>= 2.2.2) [!alpha !ia64], libc6.1-dev (>= 2.2.2) [alpha ia64], gcc-multilib [i386 powerpc s390 sparc], debhelper (>= 7.0.0)
Standards-Version: 3.8.1.0
Standards-Version: 3.8.4
Homepage: http://sourceforge.net/projects/strace/
Package: strace
Architecture: alpha amd64 arm armeb armel hppa i386 ia64 m68k mips mipsel powerpc ppc64 s390 s390x sh sparc
Section: utils
Priority: standard
Depends: ${shlibs:Depends}
Architecture: alpha amd64 arm armeb armel hppa i386 ia64 m68k mips mipsel powerpc ppc64 s390 s390x sh sparc sparc64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A system call tracer
strace is a system call tracer, i.e. a debugging tool which prints out
a trace of all the system calls made by a another process/program.
@ -23,9 +21,8 @@ Description: A system call tracer
Package: strace64
Architecture: i386 powerpc s390 sparc
Section: utils
Priority: extra
Depends: ${shlibs:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A system call tracer for 64bit binaries
strace is a system call tracer, i.e. a debugging tool which prints out
a trace of all the system calls made by a another process/program.
@ -43,8 +40,8 @@ Package: strace-udeb
Section: debian-installer
XC-Package-Type: udeb
Priority: extra
Architecture: alpha amd64 arm armeb armel hppa i386 ia64 m68k mips mipsel powerpc ppc64 s390 sh sparc
Depends: ${shlibs:Depends}
Architecture: alpha amd64 arm armeb armel hppa i386 ia64 m68k mips mipsel powerpc ppc64 s390 sh sparc sparc64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A system call tracer
strace is a system call tracer, i.e. a debugging tool which prints out
a trace of all the system calls made by a another process/program.

34
debian/rules vendored
View File

@ -2,6 +2,19 @@
#export DH_VERBOSE=1
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
@ -11,7 +24,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map)))
HOST64 = $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
$(filter $(DEB_HOST_ARCH)=%, $(arch64_map))))-linux-gnu
CC64 = gcc -m64
extra_build_targets += stamp-build64
extra_build_targets += build64-stamp
endif
ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
@ -20,9 +33,9 @@ else
CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
all build: stamp-build $(extra_build_targets)
all build: build-stamp $(extra_build_targets)
stamp-%: %/Makefile
%-stamp: %/Makefile
$(MAKE) -C $*
touch $@
@ -35,20 +48,20 @@ build64/Makefile:
cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
clean:
dh_testdir
dh_testroot
rm -rf build build64 strace64.1
dh_clean
rm -rf debian/strace debian/strace-udeb debian/substvars debian/files debian/files~
rm -rf build64 stamp-build64 strace64.1
rm -rf build stamp-build
binary: binary-indep binary-arch
binary-indep:
binary-arch: build checkroot
test -f stamp-build || make $(MFLAGS) -f debian/rules build
binary-arch: build
test -f build-stamp || make $(MFLAGS) -f debian/rules build
# prepare 64bit executable and manpage, if it has been built
test -f stamp-build64 && ( mv build64/strace build64/strace64 ; \
test -f build64-stamp && ( mv build64/strace build64/strace64 ; \
cp strace.1 strace64.1 ) || true
dh_testdir -s
@ -68,6 +81,3 @@ binary-arch: build checkroot
dh_gencontrol -s
dh_md5sums -s
dh_builddeb -s
checkroot:
test root = "`whoami`"

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

2
debian/watch vendored Normal file
View File

@ -0,0 +1,2 @@
version=3
opts="uversionmangle=s/-/./g" http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.bz2

208
defs.h
View File

@ -158,15 +158,11 @@
#include <asm/ptrace.h>
#undef __KERNEL__
#endif
#ifdef __STDC__
#ifdef LINUX
extern long ptrace(int, int, char *, long);
#else /* !LINUX */
extern int ptrace(int, int, char *, int, ...);
#endif /* !LINUX */
#else /* !__STDC__ */
extern int ptrace();
#endif /* !__STDC__ */
#endif /* !LINUXSPARC */
#endif /* !SVR4 */
@ -321,6 +317,7 @@ struct tcb {
long long u_lrval; /* long long return value */
#endif
FILE *outf; /* Output file for this process */
int curcol; /* Output column for this process */
const char *auxstr; /* Auxiliary info from syscall (see RVAL_STR) */
struct timeval stime; /* System time usage as of last process wait */
struct timeval dtime; /* Delta for system time usage */
@ -375,7 +372,7 @@ struct tcb {
# if defined(ALPHA) || defined(AVR32) || defined(SPARC) || defined(SPARC64) \
|| defined(POWERPC) || defined(IA64) || defined(HPPA) \
|| defined(SH) || defined(SH64) || defined(S390) || defined(S390X) \
|| defined(ARM) || defined(MIPS) || defined(BFIN)
|| defined(ARM) || defined(MIPS) || defined(BFIN) || defined(TILE)
# define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */
# endif
# define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */
@ -459,121 +456,118 @@ extern const struct xlat open_access_modes[];
#define TRACE_SIGNAL 020 /* Trace signal-related syscalls. */
#define TRACE_DESC 040 /* Trace file descriptor-related syscalls. */
typedef enum {
CFLAG_NONE = 0,
CFLAG_ONLY_STATS,
CFLAG_BOTH
} cflag_t;
extern struct tcb **tcbtab;
extern int *qual_flags;
extern int debug, followfork;
extern int dtime, cflag, xflag, qflag;
extern int dtime, xflag, qflag;
extern cflag_t cflag;
extern int acolumn;
extern unsigned int nprocs, tcbtabsize;
extern int max_strlen;
extern struct tcb *tcp_last;
#ifdef __STDC__
#define P(args) args
#else
#define P(args) ()
#endif
enum bitness_t { BITNESS_CURRENT = 0, BITNESS_32 };
extern int set_personality P((int personality));
extern const char *xlookup P((const struct xlat *, int));
extern struct tcb *alloc_tcb P((int, int));
extern struct tcb *pid2tcb P((int));
extern void droptcb P((struct tcb *));
extern void expand_tcbtab P((void));
extern int set_personality(int personality);
extern const char *xlookup(const struct xlat *, int);
extern struct tcb *alloc_tcb(int, int);
extern struct tcb *pid2tcb(int);
extern void droptcb(struct tcb *);
extern void expand_tcbtab(void);
#define alloctcb(pid) alloc_tcb((pid), 1)
extern void set_sortby P((char *));
extern void set_overhead P((int));
extern void qualify P((char *));
extern int get_scno P((struct tcb *));
extern long known_scno P((struct tcb *));
extern long do_ptrace P((int request, struct tcb *tcp, void *addr, void *data));
extern int ptrace_restart P((int request, struct tcb *tcp, int sig));
extern int trace_syscall P((struct tcb *));
extern int count_syscall P((struct tcb *, struct timeval *));
extern void printxval P((const struct xlat *, int, const char *));
extern int printargs P((struct tcb *));
extern int addflags P((const struct xlat *, int));
extern int printflags P((const struct xlat *, int, const char *));
extern const char *sprintflags P((const char *, const struct xlat *, int));
extern int umoven P((struct tcb *, long, int, char *));
extern int umovestr P((struct tcb *, long, int, char *));
extern int upeek P((struct tcb *, long, long *));
extern void dumpiov P((struct tcb *, int, long));
extern void dumpstr P((struct tcb *, long, int));
extern void printstr P((struct tcb *, long, int));
extern void printnum P((struct tcb *, long, char *));
extern void printnum_int P((struct tcb *, long, char *));
extern void printpath P((struct tcb *, long));
extern void printpathn P((struct tcb *, long, int));
extern void printtv_bitness P((struct tcb *, long, enum bitness_t, int));
extern void sprinttv P((struct tcb *, long, enum bitness_t, char *));
extern void print_timespec P((struct tcb *, long));
extern void sprint_timespec P((char *, struct tcb *, long));
extern void set_sortby(char *);
extern void set_overhead(int);
extern void qualify(char *);
extern int get_scno(struct tcb *);
extern long known_scno(struct tcb *);
extern long do_ptrace(int request, struct tcb *tcp, void *addr, void *data);
extern int ptrace_restart(int request, struct tcb *tcp, int sig);
extern int trace_syscall(struct tcb *);
extern int count_syscall(struct tcb *, struct timeval *);
extern void printxval(const struct xlat *, int, const char *);
extern int printargs(struct tcb *);
extern int addflags(const struct xlat *, int);
extern int printflags(const struct xlat *, int, const char *);
extern const char *sprintflags(const char *, const struct xlat *, int);
extern int umoven(struct tcb *, long, int, char *);
extern int umovestr(struct tcb *, long, int, char *);
extern int upeek(struct tcb *, long, long *);
extern void dumpiov(struct tcb *, int, long);
extern void dumpstr(struct tcb *, long, int);
extern void printstr(struct tcb *, long, int);
extern void printnum(struct tcb *, long, char *);
extern void printnum_int(struct tcb *, long, char *);
extern void printpath(struct tcb *, long);
extern void printpathn(struct tcb *, long, int);
extern void printtv_bitness(struct tcb *, long, enum bitness_t, int);
extern void sprinttv(struct tcb *, long, enum bitness_t, char *);
extern void print_timespec(struct tcb *, long);
extern void sprint_timespec(char *, struct tcb *, long);
#ifdef HAVE_SIGINFO_T
extern void printsiginfo P((siginfo_t *, int));
extern void printsiginfo(siginfo_t *, int);
#endif
extern void printsock P((struct tcb *, long, int));
extern void print_sock_optmgmt P((struct tcb *, long, int));
extern void printrusage P((struct tcb *, long));
extern void printuid P((const char *, unsigned long));
extern int clearbpt P((struct tcb *));
extern int setbpt P((struct tcb *));
extern int sigishandled P((struct tcb *, int));
extern void printcall P((struct tcb *));
extern const char *signame P((int));
extern void print_sigset P((struct tcb *, long, int));
extern void printsignal P((int));
extern void printleader P((struct tcb *));
extern void printtrailer P((void));
extern void tabto P((int));
extern void call_summary P((FILE *));
extern void tprint_iov P((struct tcb *, unsigned long, unsigned long));
extern void tprint_open_modes P((mode_t));
extern const char *sprint_open_modes P((mode_t));
extern int is_restart_error P((struct tcb *));
extern void printsock(struct tcb *, long, int);
extern void print_sock_optmgmt(struct tcb *, long, int);
extern void printrusage(struct tcb *, long);
extern void printuid(const char *, unsigned long);
extern int clearbpt(struct tcb *);
extern int setbpt(struct tcb *);
extern int sigishandled(struct tcb *, int);
extern void printcall(struct tcb *);
extern const char *signame(int);
extern void print_sigset(struct tcb *, long, int);
extern void printsignal(int);
extern void printleader(struct tcb *);
extern void printtrailer(void);
extern void tabto(int);
extern void call_summary(FILE *);
extern void tprint_iov(struct tcb *, unsigned long, unsigned long);
extern void tprint_open_modes(mode_t);
extern const char *sprint_open_modes(mode_t);
extern int is_restart_error(struct tcb *);
extern int change_syscall P((struct tcb *, int));
extern int change_syscall(struct tcb *, int);
extern int internal_fork(struct tcb *);
extern int internal_exec(struct tcb *);
extern int internal_wait(struct tcb *, int);
extern int internal_exit(struct tcb *);
extern const struct ioctlent *ioctl_lookup(long);
extern const struct ioctlent *ioctl_next_match(const struct ioctlent *);
extern int ioctl_decode(struct tcb *, long, long);
extern int term_ioctl(struct tcb *, long, long);
extern int sock_ioctl(struct tcb *, long, long);
extern int proc_ioctl(struct tcb *, int, int);
extern int stream_ioctl(struct tcb *, int, int);
#ifdef LINUX
extern int internal_clone P((struct tcb *));
#endif
extern int internal_fork P((struct tcb *));
extern int internal_exec P((struct tcb *));
extern int internal_wait P((struct tcb *, int));
extern int internal_exit P((struct tcb *));
extern const struct ioctlent *ioctl_lookup P((long));
extern const struct ioctlent *ioctl_next_match P((const struct ioctlent *));
extern int ioctl_decode P((struct tcb *, long, long));
extern int term_ioctl P((struct tcb *, long, long));
extern int sock_ioctl P((struct tcb *, long, long));
extern int proc_ioctl P((struct tcb *, int, int));
extern int stream_ioctl P((struct tcb *, int, int));
#ifdef LINUX
extern int rtc_ioctl P((struct tcb *, long, long));
extern int scsi_ioctl P((struct tcb *, long, long));
extern int rtc_ioctl(struct tcb *, long, long);
extern int scsi_ioctl(struct tcb *, long, long);
#endif
extern void tv_tv P((struct timeval *, int, int));
extern int tv_nz P((struct timeval *));
extern int tv_cmp P((struct timeval *, struct timeval *));
extern double tv_float P((struct timeval *));
extern void tv_add P((struct timeval *, struct timeval *, struct timeval *));
extern void tv_sub P((struct timeval *, struct timeval *, struct timeval *));
extern void tv_mul P((struct timeval *, struct timeval *, int));
extern void tv_div P((struct timeval *, struct timeval *, int));
extern int tv_nz(struct timeval *);
extern int tv_cmp(struct timeval *, struct timeval *);
extern double tv_float(struct timeval *);
extern void tv_add(struct timeval *, struct timeval *, struct timeval *);
extern void tv_sub(struct timeval *, struct timeval *, struct timeval *);
extern void tv_mul(struct timeval *, struct timeval *, int);
extern void tv_div(struct timeval *, struct timeval *, int);
#ifdef SUNOS4
extern int fixvfork P((struct tcb *));
extern int fixvfork(struct tcb *);
#endif
#if !(defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(IA64))
extern long getrval2 P((struct tcb *));
extern long getrval2(struct tcb *);
#endif
#ifdef USE_PROCFS
extern int proc_open P((struct tcb *tcp, int attaching));
extern int proc_open(struct tcb *tcp, int attaching);
#endif
#define umove(pid, addr, objp) \
@ -584,22 +578,18 @@ extern int proc_open P((struct tcb *tcp, int attaching));
#define printtv_special(tcp, addr) \
printtv_bitness((tcp), (addr), BITNESS_CURRENT, 1)
#ifdef __STDC__
#ifdef __GNUC__
extern void tprintf(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
#else
extern void tprintf(const char *fmt, ...);
#endif
#else
extern void tprintf();
#endif
#ifndef HAVE_STRERROR
const char *strerror P((int));
const char *strerror(int);
#endif
#ifndef HAVE_STRSIGNAL
const char *strsignal P((int));
const char *strsignal(int);
#endif
extern int current_personality;
@ -650,20 +640,6 @@ extern const char *const signalent2[];
extern const int nsignals2;
#endif /* SUPPORTED_PERSONALITIES >= 3 */
#if defined(FREEBSD) || (defined(LINUX) \
&& defined(POWERPC) && !defined(__powerpc64__)) \
|| defined (LINUX_MIPSO32)
/* ARRGH! off_t args are aligned on 64 bit boundaries! */
#define ALIGN64(tcp,arg) \
do { \
if (arg % 2) \
memmove (&tcp->u_arg[arg], &tcp->u_arg[arg + 1], \
(tcp->u_nargs - arg - 1) * sizeof tcp->u_arg[0]); \
} while (0)
#else
#define ALIGN64(tcp,arg) do { } while (0)
#endif
#if HAVE_LONG_LONG
/* _l refers to the lower numbered u_arg,
@ -677,6 +653,8 @@ do { \
#define LONG_LONG(_l,_h) \
((long long)((unsigned long long)(unsigned)(_h) | ((unsigned long long)(_l)<<32)))
#endif
extern int printllval(struct tcb *, const char *, int);
#endif
#ifdef IA64

7
desc.c
View File

@ -546,7 +546,6 @@ decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
outstr[0] = '\0';
for (i = 0; i < 3; i++) {
int first = 1;
char str[20];
tcp->auxstr = outstr;
arg = args[i+1];
@ -555,6 +554,8 @@ decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
continue;
for (j = 0; j < args[0]; j++) {
if (FD_ISSET(j, fds)) {
char str[11 + 3 * sizeof(int)];
if (first) {
sprintf(str, "%s%s [%u", sep,
i == 0 ? "in" :
@ -771,8 +772,10 @@ int
sys_epoll_pwait(struct tcb *tcp)
{
epoll_wait_common(tcp);
if (exiting(tcp))
if (exiting(tcp)) {
tprintf(", ");
print_sigset(tcp, tcp->u_arg[4], 0);
}
return 0;
}

87
file.c
View File

@ -610,15 +610,10 @@ int
sys_readahead(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%ld, %lld, %ld", tcp->u_arg[0],
# if defined LINUX_MIPSN32
tcp->ext_arg[1], tcp->u_arg[2]
# elif defined IA64 || defined X86_64 || defined ALPHA || defined LINUX_MIPSN64
(long long int) tcp->u_arg[1], tcp->u_arg[2]
# else
LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]), tcp->u_arg[3]
# endif
);
int argn;
tprintf("%ld, ", tcp->u_arg[0]);
argn = printllval(tcp, "%lld", 1);
tprintf(", %ld", tcp->u_arg[argn]);
}
return 0;
}
@ -629,14 +624,13 @@ int
sys_lseek64(struct tcb *tcp)
{
if (entering(tcp)) {
long long offset;
ALIGN64 (tcp, 1); /* FreeBSD aligns off_t args */
offset = LONG_LONG(tcp->u_arg [1], tcp->u_arg[2]);
int argn;
tprintf("%ld, ", tcp->u_arg[0]);
if (tcp->u_arg[3] == SEEK_SET)
tprintf("%ld, %llu, ", tcp->u_arg[0], offset);
argn = printllval(tcp, "%llu, ", 1);
else
tprintf("%ld, %lld, ", tcp->u_arg[0], offset);
printxval(whence, tcp->u_arg[3], "SEEK_???");
argn = printllval(tcp, "%lld, ", 1);
printxval(whence, tcp->u_arg[argn], "SEEK_???");
}
return RVAL_LUDECIMAL;
}
@ -659,9 +653,8 @@ int
sys_truncate64(struct tcb *tcp)
{
if (entering(tcp)) {
ALIGN64 (tcp, 1);
printpath(tcp, tcp->u_arg[0]);
tprintf(", %llu", LONG_LONG(tcp->u_arg[1],tcp->u_arg[2]));
printllval(tcp, ", %llu", 1);
}
return 0;
}
@ -683,9 +676,8 @@ int
sys_ftruncate64(struct tcb *tcp)
{
if (entering(tcp)) {
ALIGN64 (tcp, 1);
tprintf("%ld, %llu", tcp->u_arg[0],
LONG_LONG(tcp->u_arg[1] ,tcp->u_arg[2]));
tprintf("%ld, ", tcp->u_arg[0]);
printllval(tcp, "%llu", 1);
}
return 0;
}
@ -1688,7 +1680,7 @@ sys_fstatfs(struct tcb *tcp)
return 0;
}
#ifdef LINUX
#if defined LINUX && defined HAVE_STATFS64
static void
printstatfs64(struct tcb *tcp, long addr)
{
@ -2815,15 +2807,11 @@ int
sys_fadvise64(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%ld, %lld, %ld, ",
tcp->u_arg[0],
# if defined IA64 || defined X86_64 || defined ALPHA
(long long int) tcp->u_arg[1], tcp->u_arg[2]);
printxval(advise, tcp->u_arg[3], "POSIX_FADV_???");
#else
LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]), tcp->u_arg[3]);
printxval(advise, tcp->u_arg[4], "POSIX_FADV_???");
#endif
int argn;
tprintf("%ld, ", tcp->u_arg[0]);
argn = printllval(tcp, "%lld", 1);
tprintf(", %ld, ", tcp->u_arg[argn++]);
printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
}
return 0;
}
@ -2834,22 +2822,18 @@ int
sys_fadvise64_64(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%ld, %lld, %lld, ",
tcp->u_arg[0],
#if defined LINUX_MIPSN32
tcp->ext_arg[1], tcp->ext_arg[2]);
printxval(advise, tcp->u_arg[3], "POSIX_FADV_???");
#elif defined IA64 || defined X86_64 || defined ALPHA || defined LINUX_MIPSN64
(long long int) tcp->u_arg[1], (long long int) tcp->u_arg[2]);
printxval(advise, tcp->u_arg[3], "POSIX_FADV_???");
#elif defined ARM
LONG_LONG(tcp->u_arg[2], tcp->u_arg[3]),
LONG_LONG(tcp->u_arg[4], tcp->u_arg[5]));
int argn;
tprintf("%ld, ", tcp->u_arg[0]);
#if defined ARM || defined POWERPC
argn = printllval(tcp, "%lld, ", 2);
#else
argn = printllval(tcp, "%lld, ", 1);
#endif
argn = printllval(tcp, "%lld, ", argn);
#if defined ARM || defined POWERPC
printxval(advise, tcp->u_arg[1], "POSIX_FADV_???");
#else
LONG_LONG(tcp->u_arg[1], tcp->u_arg[2]),
LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
printxval(advise, tcp->u_arg[5], "POSIX_FADV_???");
printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
#endif
}
return 0;
@ -2900,16 +2884,23 @@ sys_inotify_rm_watch(struct tcb *tcp)
return 0;
}
int
sys_inotify_init1(struct tcb *tcp)
{
if (entering(tcp))
printflags(open_mode_flags, tcp->u_arg[0], "O_???");
return 0;
}
int
sys_fallocate(struct tcb *tcp)
{
if (entering(tcp)) {
int argn;
tprintf("%ld, ", tcp->u_arg[0]); /* fd */
tprintf("%#lo, ", tcp->u_arg[1]); /* mode */
tprintf("%llu, ", LONG_LONG(tcp->u_arg[2],
tcp->u_arg[3])); /* offset */
tprintf("%llu", LONG_LONG(tcp->u_arg[4],
tcp->u_arg[5])); /* len */
argn = printllval(tcp, "%llu, ", 2); /* offset */
printllval(tcp, "%llu", argn); /* len */
}
return 0;
}

28
io.c
View File

@ -286,9 +286,8 @@ struct tcb *tcp;
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
ALIGN64 (tcp, PREAD_OFFSET_ARG); /* PowerPC alignment restriction */
tprintf(", %lu, %llu", tcp->u_arg[2],
*(unsigned long long *)&tcp->u_arg[PREAD_OFFSET_ARG]);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%llu", PREAD_OFFSET_ARG);
}
return 0;
}
@ -300,9 +299,8 @@ struct tcb *tcp;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
ALIGN64 (tcp, PREAD_OFFSET_ARG); /* PowerPC alignment restriction */
tprintf(", %lu, %llu", tcp->u_arg[2],
*(unsigned long long *)&tcp->u_arg[PREAD_OFFSET_ARG]);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%llu", PREAD_OFFSET_ARG);
}
return 0;
}
@ -355,17 +353,12 @@ struct tcb *tcp;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
ALIGN64 (tcp, 3);
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
#ifdef MIPS_LINUXN32
tprintf(", %lu, %#llx", tcp->u_arg[2], tcp->ext_arg[3]);
#else
tprintf(", %lu, %#llx", tcp->u_arg[2],
LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
#endif
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%#llx", 3);
}
return 0;
}
@ -375,15 +368,10 @@ sys_pwrite64(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
ALIGN64 (tcp, 3);
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
#ifdef MIPS_LINUXN32
tprintf(", %lu, %#llx", tcp->u_arg[2], tcp->ext_arg[3]);
#else
tprintf(", %lu, %#llx", tcp->u_arg[2],
LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
#endif
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%#llx", 3);
}
return 0;
}

59
ipc.c
View File

@ -212,7 +212,8 @@ struct tcb *tcp;
}
static void
tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count)
tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count,
unsigned long flags)
{
long mtype;
@ -224,53 +225,61 @@ tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count)
tprintf("}");
}
tprintf(", %lu, ", count);
printflags(msg_flags, tcp->u_arg[3], "MSG_???");
printflags(msg_flags, flags, "MSG_???");
}
int sys_msgsnd(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
tprintf("%d, ", (int) tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
tprint_msgsnd(tcp, tcp->u_arg[3], tcp->u_arg[1]);
tprint_msgsnd(tcp, tcp->u_arg[3], tcp->u_arg[1],
tcp->u_arg[2]);
} else {
tprint_msgsnd(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprint_msgsnd(tcp, tcp->u_arg[1], tcp->u_arg[2],
tcp->u_arg[3]);
}
}
return 0;
}
int sys_msgrcv(tcp)
struct tcb *tcp;
static void
tprint_msgrcv(struct tcb *tcp, long addr, unsigned long count, long msgtyp)
{
long mtype;
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
if (syserror(tcp) || umove(tcp, addr, &mtype) < 0) {
tprintf("%#lx", addr);
} else {
tprintf("{%lu, ", mtype);
printstr(tcp, addr + sizeof(mtype), count);
tprintf("}");
}
tprintf(", %lu, %ld, ", count, msgtyp);
}
int sys_msgrcv(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%d, ", (int) tcp->u_arg[0]);
} else {
tprintf("%lu", tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
struct ipc_wrapper {
struct msgbuf *msgp;
long msgtyp;
} tmp;
umove(tcp, tcp->u_arg[3], &tmp);
umove(tcp, (long) tmp.msgp, &mtype);
tprintf(", {%lu, ", mtype);
printstr(tcp, (long) (tmp.msgp) + sizeof(long),
tcp->u_arg[1]);
tprintf("}, %lu", tcp->u_arg[1]);
tprintf(", %ld", tmp.msgtyp);
tprintf(", ");
if (umove(tcp, tcp->u_arg[3], &tmp) < 0) {
tprintf("%#lx, %lu, ",
tcp->u_arg[3], tcp->u_arg[1]);
} else {
tprint_msgrcv(tcp, (long) tmp.msgp,
tcp->u_arg[1], tmp.msgtyp);
}
printflags(msg_flags, tcp->u_arg[2], "MSG_???");
} else {
umove(tcp, tcp->u_arg[1], &mtype);
tprintf("{%lu, ", mtype);
printstr(tcp, tcp->u_arg[1] + sizeof(long),
tcp->u_arg[2]);
tprintf("}, %lu", tcp->u_arg[2]);
tprintf(", %ld", tcp->u_arg[3]);
tprintf(", ");
tprint_msgrcv(tcp, tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3]);
printflags(msg_flags, tcp->u_arg[4], "MSG_???");
}
}

View File

@ -475,3 +475,50 @@
{ 0, TD, printargs, "inotify_init" }, /* 444 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 445 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 446 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 447 */
{ 5, 0, printargs, "kexec_load" }, /* 448 */
{ 4, 0, printargs, "migrate_pages" }, /* 449 */
{ 4, TD|TF, sys_openat, "openat" }, /* 450 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 451 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 452 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 453 */
{ 3, TD|TF, sys_futimesat, "futimesat" }, /* 454 */
{ 4, TD|TD, sys_newfstatat, "newfstatat" }, /* 455 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 456 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 457 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 458 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 459 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 460 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 461 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 462 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 463 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 464 */
{ 1, TP, sys_unshare, "unshare" }, /* 465 */
{ 2, 0, printargs, "set_robust_list" }, /* 466 */
{ 3, 0, printargs, "get_robust_list" }, /* 467 */
{ 6, TD, printargs, "splice" }, /* 468 */
{ 4, TD, printargs, "sync_file_range" }, /* 469 */
{ 4, TD, printargs, "tee" }, /* 470 */
{ 4, TD, printargs, "vmsplice" }, /* 471 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 472 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 473 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 474 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 475 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 476 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 477 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 478 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 479 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 480 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 481 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 482 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 483 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 484 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 485 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 486 */
{ 3, TD, sys_dup3, "dup3" }, /* 487 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 488 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 489 */
{ 5, TD, printargs, "preadv" }, /* 490 */
{ 5, TD, printargs, "pwritev" }, /* 491 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo" }, /* 492 */
{ 5, TD, printargs, "perf_event_open" }, /* 493 */

View File

@ -191,7 +191,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
@ -365,8 +365,8 @@
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 332 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 333 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 334 */
{ 5, 0, printargs, "SYS_335" }, /* 335 */
{ 5, 0, printargs, "SYS_336" }, /* 336 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 335 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 336 */
{ 1, TP, sys_unshare, "unshare" }, /* 337 */
{ 2, 0, printargs, "set_robust_list" }, /* 338 */
{ 3, 0, printargs, "get_robust_list" }, /* 339 */
@ -376,7 +376,7 @@
{ 4, TD, printargs, "vmsplice" }, /* 343 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 344 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 345 */
{ 5, 0, printargs, "SYS_346" }, /* 346 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 346 */
{ 5, 0, printargs, "kexec_load" }, /* 347 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 348 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 349 */
@ -385,17 +385,17 @@
{ 6, TF, sys_fallocate, "fallocate" }, /* 352 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 353 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 354 */
{ 5, 0, printargs, "SYS_355" }, /* 355 */
{ 5, 0, printargs, "SYS_356" }, /* 356 */
{ 5, 0, printargs, "SYS_357" }, /* 357 */
{ 5, 0, printargs, "SYS_358" }, /* 358 */
{ 5, 0, printargs, "SYS_359" }, /* 359 */
{ 5, 0, printargs, "SYS_360" }, /* 360 */
{ 5, 0, printargs, "SYS_361" }, /* 361 */
{ 5, 0, printargs, "SYS_362" }, /* 362 */
{ 5, 0, printargs, "SYS_363" }, /* 363 */
{ 5, 0, printargs, "SYS_364" }, /* 364 */
{ 5, 0, printargs, "SYS_365" }, /* 365 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 355 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 356 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 357 */
{ 3, TD, sys_dup3, "dup3" }, /* 358 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 359 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 360 */
{ 5, TD, printargs, "preadv" }, /* 361 */
{ 5, TD, printargs, "pwritev" }, /* 362 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 363 */
{ 5, TD, printargs, "perf_event_open"}, /* 364 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 365 */
{ 5, 0, printargs, "SYS_366" }, /* 366 */
{ 5, 0, printargs, "SYS_367" }, /* 367 */
{ 5, 0, printargs, "SYS_368" }, /* 368 */
@ -454,33 +454,34 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, TI, sys_semop, "semop" }, /* 420 */
{ 4, TI, sys_semget, "semget" }, /* 421 */
{ 4, TI, sys_semctl, "semctl" }, /* 422 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
{ 4, 0, printargs, "ipc_subcall" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
{ 4, TI, sys_semctl, "semctl" }, /* 423 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 425 */
{ 4, 0, printargs, "ipc_subcall" }, /* 426 */
{ 4, 0, printargs, "ipc_subcall" }, /* 427 */
{ 4, 0, printargs, "ipc_subcall" }, /* 428 */
{ 4, 0, printargs, "ipc_subcall" }, /* 429 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 430 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 431 */
{ 4, TI, sys_msgget, "msgget" }, /* 432 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 433 */
{ 4, 0, printargs, "ipc_subcall" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 430 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
{ 4, TI, sys_msgget, "msgget" }, /* 433 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 435 */
{ 4, 0, printargs, "ipc_subcall" }, /* 436 */
{ 4, 0, printargs, "ipc_subcall" }, /* 437 */
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, TI, sys_shmat, "shmat" }, /* 440 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 441 */
{ 4, TI, sys_shmget, "shmget" }, /* 442 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 443 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */
#endif

View File

@ -84,7 +84,7 @@
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 55 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 56 */
{ 4, 0, sys_mremap, "mremap" }, /* 57 */
{ 5, 0, sys_mremap, "mremap" }, /* 57 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 58 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 59 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 60 */

View File

@ -191,7 +191,7 @@
{ 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 160 */
{ 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
@ -200,7 +200,7 @@
{ 3, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 171 */
{ 5, 0, printargs, "prctl" }, /* 172 */
{ 5, 0, sys_prctl, "prctl" }, /* 172 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 175 */
@ -384,17 +384,18 @@
{ 5, 0, sys_fadvise64, "fadvise64" }, /* 353 */
{ 2, 0, printargs, "set_robust_list" }, /* 354 */
{ 3, 0, printargs, "get_robust_list" }, /* 355 */
{ 4, 0, printargs, "fallocate" }, /* 356 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 356 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 357 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 358 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 359 */
{ 4, TD|TS, printargs, "signalfd4" }, /* 360 */
{ 2, TD, printargs, "eventfd2" }, /* 361 */
{ 1, 0, printargs, "epoll_create1" }, /* 362 */
{ 3, TD, printargs, "dup3" }, /* 363 */
{ 2, TD, printargs, "pipe2" }, /* 364 */
{ 1, TD, printargs, "inotify_init1" }, /* 365 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 360 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 361 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 362 */
{ 3, TD, sys_dup3, "dup3" }, /* 363 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 364 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 365 */
{ 5, TD, printargs, "preadv" }, /* 366 */
{ 5, TD, printargs, "pwritev" }, /* 367 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo" }, /* 368 */
{ 5, 0, printargs, "perf_counter_open" }, /* 369 */
{ 5, TD, printargs, "perf_event_open" }, /* 369 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 370 */

View File

@ -168,7 +168,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_setresuid, "getresuid" }, /* 165 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 166 */
@ -314,13 +314,13 @@
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 306 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 307 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 308 */
{ 4, TD|TS, printargs, "signalfd4" }, /* 309 */
{ 2, TD, printargs, "eventfd2" }, /* 310 */
{ 1, 0, printargs, "epoll_create1" }, /* 311 */
{ 3, TD, printargs, "dup3" }, /* 312 */
{ 2, TD, printargs, "pipe2" }, /* 313 */
{ 1, TD, printargs, "inotify_init1" }, /* 314 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 309 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 310 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 311 */
{ 3, TD, sys_dup3, "dup3" }, /* 312 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 313 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 314 */
{ 5, TD, printargs, "preadv" }, /* 315 */
{ 5, TD, printargs, "pwritev" }, /* 316 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo" }, /* 317 */
{ 5, 0, printargs, "perf_counter_open" }, /* 318 */
{ 5, TD, printargs, "perf_event_open" }, /* 318 */

View File

@ -191,7 +191,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
@ -313,7 +313,7 @@
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 280 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 281 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 282 */
{ 5, 0, printargs, "sys_kexec_load" }, /* 283 */
{ 5, 0, printargs, "kexec_load" }, /* 283 */
{ 5, TP, sys_waitid, "waitid", SYS_waitid }, /* 284 */
{ 5, 0, printargs, "SYS_285" }, /* 285 */
{ 5, 0, printargs, "add_key" }, /* 286 */
@ -362,12 +362,12 @@
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 329 */
{ 3, TD, sys_dup3, "dup3" }, /* 330 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 331 */
{ 1, TD, printargs, "inotify_init1" }, /* 332 */
{ 5, 0, printargs, "SYS_333" }, /* 333 */
{ 5, 0, printargs, "SYS_334" }, /* 334 */
{ 5, 0, printargs, "SYS_335" }, /* 335 */
{ 5, 0, printargs, "SYS_336" }, /* 336 */
{ 5, 0, printargs, "SYS_337" }, /* 337 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 332 */
{ 5, TD, printargs, "preadv" }, /* 333 */
{ 5, TD, printargs, "pwritev" }, /* 334 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 335 */
{ 5, TD, printargs, "perf_event_open"}, /* 336 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 337 */
{ 5, 0, printargs, "SYS_338" }, /* 338 */
{ 5, 0, printargs, "SYS_339" }, /* 339 */
{ 5, 0, printargs, "SYS_340" }, /* 340 */
@ -453,32 +453,33 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, TI, sys_semop, "semop" }, /* 420 */
{ 4, TI, sys_semget, "semget" }, /* 421 */
{ 4, TI, sys_semctl, "semctl" }, /* 422 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
{ 4, 0, printargs, "ipc_subcall" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
{ 4, TI, sys_semctl, "semctl" }, /* 423 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 425 */
{ 4, 0, printargs, "ipc_subcall" }, /* 426 */
{ 4, 0, printargs, "ipc_subcall" }, /* 427 */
{ 4, 0, printargs, "ipc_subcall" }, /* 428 */
{ 4, 0, printargs, "ipc_subcall" }, /* 429 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 430 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 431 */
{ 4, TI, sys_msgget, "msgget" }, /* 432 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 433 */
{ 4, 0, printargs, "ipc_subcall" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 430 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
{ 4, TI, sys_msgget, "msgget" }, /* 433 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 435 */
{ 4, 0, printargs, "ipc_subcall" }, /* 436 */
{ 4, 0, printargs, "ipc_subcall" }, /* 437 */
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, TI, sys_shmat, "shmat" }, /* 440 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 441 */
{ 4, TI, sys_shmget, "shmget" }, /* 442 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 443 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */

View File

@ -134,7 +134,7 @@
#define sys_fstat64 printargs
#define sys_fcntl64 printargs
#include "../syscallent.h"
#include "i386/syscallent.h"
#undef sys_getrlimit
#undef sys_afs_syscall
@ -242,14 +242,13 @@
#include "../dummy.h"
/* You must be careful to check ../syscallent.h so that this table
/* You must be careful to check ../i386/syscallent.h so that this table
starts where that one leaves off.
*/
#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 444
#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 445
# error fix me
#endif
{ 8, 0, printargs, "SYS_444" }, /* 444 */
{ 8, 0, printargs, "SYS_445" }, /* 445 */
{ 8, 0, printargs, "SYS_446" }, /* 446 */
{ 8, 0, printargs, "SYS_447" }, /* 447 */
@ -961,7 +960,7 @@
{ 2, 0, sys_mlock, "mlock" }, /* 1153 */
{ 1, 0, sys_mlockall, "mlockall" }, /* 1154 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 1155 */
{ 4, 0, sys_mremap, "mremap" }, /* 1156 */
{ 5, 0, sys_mremap, "mremap" }, /* 1156 */
{ 3, 0, sys_msync, "msync" }, /* 1157 */
{ 2, 0, sys_munlock, "munlock" }, /* 1158 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 1159 */
@ -1073,7 +1072,7 @@
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 1265 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 1266 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 1267 */
{ 5, 0, printargs, "sys_kexec_load" }, /* 1268 */
{ 5, 0, printargs, "kexec_load" }, /* 1268 */
{ 5, 0, printargs, "vserver" }, /* 1269 */
{ 5, TP, sys_waitid, "waitid" }, /* 1270 */
{ 5, 0, printargs, "add_key" }, /* 1271 */
@ -1115,3 +1114,7 @@
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 1307 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 1308 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 1309 */
{ 5, TD, printargs, "preadv" }, /* 1319 */
{ 5, TD, printargs, "pwritev" }, /* 1320 */
{ 4, TS, printargs, "rt_tgsigqueueinfo"}, /* 1321 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 1322 */

File diff suppressed because it is too large Load Diff

View File

@ -64,10 +64,10 @@ lookup_ioctls 22 scsi/sg.h
lookup_ioctls 46 linux/fb.h
lookup_ioctls 4B linux/kd.h
lookup_ioctls 53 linux/cdrom.h scsi/scsi.h scsi/scsi_ioctl.h
lookup_ioctls 54 $asm/ioctls.h
lookup_ioctls 54 $asm/ioctls.h asm-generic/ioctls.h
lookup_ioctls 56 linux/vt.h
lookup_ioctls '7[12]' linux/videotext.h
lookup_ioctls 89 $asm/sockios.h linux/sockios.h
lookup_ioctls 89 $asm/sockios.h asm-generic/sockios.h linux/sockios.h
lookup_ioctls 8B linux/wireless.h
if [ -e $dir/Kbuild ]; then
@ -81,7 +81,7 @@ if [ -e $dir/Kbuild ]; then
)
else
# older kernel so just assume some headers
files="linux/* $asm/* scsi/* sound/*"
files="linux/* $asm/* asm-generic/* scsi/* sound/*"
fi
# Build the list of all ioctls

View File

@ -191,7 +191,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "getpagesize" }, /* 166 */
@ -310,58 +310,57 @@
{ 5, 0, printargs, "add_key" }, /* 279 */
{ 5, 0, printargs, "request_key" }, /* 280 */
{ 5, 0, printargs, "keyctl" }, /* 281 */
{ 5, 0, printargs, "SYS_282" }, /* 282 */
{ 5, 0, printargs, "SYS_283" }, /* 283 */
{ 5, 0, printargs, "SYS_284" }, /* 284 */
{ 5, 0, printargs, "SYS_285" }, /* 285 */
{ 5, 0, printargs, "SYS_286" }, /* 286 */
{ 5, 0, printargs, "SYS_287" }, /* 287 */
{ 5, 0, printargs, "SYS_288" }, /* 288 */
{ 5, 0, printargs, "SYS_289" }, /* 289 */
{ 5, 0, printargs, "SYS_290" }, /* 290 */
{ 5, 0, printargs, "SYS_291" }, /* 291 */
{ 5, 0, printargs, "SYS_292" }, /* 292 */
{ 5, 0, printargs, "SYS_293" }, /* 293 */
{ 5, 0, printargs, "SYS_294" }, /* 294 */
{ 5, 0, printargs, "SYS_295" }, /* 295 */
{ 5, 0, printargs, "SYS_296" }, /* 296 */
{ 5, 0, printargs, "SYS_297" }, /* 297 */
{ 5, 0, printargs, "SYS_298" }, /* 298 */
{ 5, 0, printargs, "SYS_299" }, /* 299 */
{ 5, 0, printargs, "SYS_300" }, /* 300 */
{ 5, 0, printargs, "SYS_301" }, /* 301 */
{ 5, 0, printargs, "SYS_302" }, /* 302 */
{ 5, 0, printargs, "SYS_303" }, /* 303 */
{ 5, 0, printargs, "SYS_304" }, /* 304 */
{ 5, 0, printargs, "SYS_305" }, /* 305 */
{ 5, 0, printargs, "SYS_306" }, /* 306 */
{ 5, 0, printargs, "SYS_307" }, /* 307 */
{ 5, 0, printargs, "SYS_308" }, /* 308 */
{ 5, 0, printargs, "SYS_309" }, /* 309 */
{ 3, 0, printargs, "ioprio_set" }, /* 282 */
{ 2, 0, printargs, "ioprio_get" }, /* 283 */
{ 0, TD, printargs, "inotify_init" }, /* 284 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 285 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 286 */
{ 4, 0, printargs, "migrate_pages" }, /* 287 */
{ 4, TD|TF, sys_openat, "openat" }, /* 288 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 289 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 290 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 291 */
{ 3, TD|TF, sys_futimesat, "futimesat" }, /* 292 */
{ 4, TD|TD, sys_newfstatat, "fstatat64" }, /* 293 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 294 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 295 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 296 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 297 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 298 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 299 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 300 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 301 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 302 */
{ 1, TP, sys_unshare, "unshare" }, /* 303 */
{ 2, 0, printargs, "set_robust_list" }, /* 304 */
{ 3, 0, printargs, "get_robust_list" }, /* 305 */
{ 6, TD, printargs, "splice" }, /* 306 */
{ 4, TD, printargs, "sync_file_range" }, /* 307 */
{ 4, TD, printargs, "tee" }, /* 308 */
{ 4, TD, printargs, "vmsplice" }, /* 309 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 310 */
{ 5, 0, printargs, "SYS_311" }, /* 311 */
{ 5, 0, printargs, "SYS_312" }, /* 312 */
{ 5, 0, printargs, "SYS_313" }, /* 313 */
{ 5, 0, printargs, "SYS_314" }, /* 314 */
{ 5, 0, printargs, "SYS_315" }, /* 315 */
{ 5, 0, printargs, "SYS_316" }, /* 316 */
{ 5, 0, printargs, "SYS_317" }, /* 317 */
{ 5, 0, printargs, "SYS_318" }, /* 318 */
{ 5, 0, printargs, "SYS_319" }, /* 319 */
{ 5, 0, printargs, "SYS_320" }, /* 320 */
{ 5, 0, printargs, "SYS_321" }, /* 321 */
{ 5, 0, printargs, "SYS_322" }, /* 322 */
{ 5, 0, printargs, "SYS_323" }, /* 323 */
{ 5, 0, printargs, "SYS_324" }, /* 324 */
{ 5, 0, printargs, "SYS_325" }, /* 325 */
{ 5, 0, printargs, "SYS_326" }, /* 326 */
{ 5, 0, printargs, "SYS_327" }, /* 327 */
{ 5, 0, printargs, "SYS_328" }, /* 328 */
{ 5, 0, printargs, "SYS_329" }, /* 329 */
{ 5, 0, printargs, "SYS_330" }, /* 330 */
{ 5, 0, printargs, "SYS_331" }, /* 331 */
{ 5, 0, printargs, "SYS_332" }, /* 332 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 311 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 312 */
{ 5, 0, printargs, "kexec_load" }, /* 313 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 314 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 315 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 316 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 317 */
{ 2, TD, sys_timerfd_create, "timerfd_create"}, /* 318 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 319 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 320 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 321 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 322 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 323 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 324 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 325 */
{ 3, TD, sys_dup3, "dup3" }, /* 326 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 327 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 328 */
{ 5, TD, printargs, "preadv" }, /* 329 */
{ 5, TD, printargs, "pwritev" }, /* 330 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 331 */
{ 5, TD, printargs, "perf_event_open"}, /* 332 */
{ 5, 0, printargs, "SYS_333" }, /* 333 */
{ 5, 0, printargs, "SYS_334" }, /* 334 */
{ 5, 0, printargs, "SYS_335" }, /* 335 */
@ -452,32 +451,33 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, TI, sys_semop, "semop" }, /* 420 */
{ 4, TI, sys_semget, "semget" }, /* 421 */
{ 4, TI, sys_semctl, "semctl" }, /* 422 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
{ 4, 0, printargs, "ipc_subcall" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
{ 4, TI, sys_semctl, "semctl" }, /* 423 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 425 */
{ 4, 0, printargs, "ipc_subcall" }, /* 426 */
{ 4, 0, printargs, "ipc_subcall" }, /* 427 */
{ 4, 0, printargs, "ipc_subcall" }, /* 428 */
{ 4, 0, printargs, "ipc_subcall" }, /* 429 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 430 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 431 */
{ 4, TI, sys_msgget, "msgget" }, /* 432 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 433 */
{ 4, 0, printargs, "ipc_subcall" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 430 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
{ 4, TI, sys_msgget, "msgget" }, /* 433 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 435 */
{ 4, 0, printargs, "ipc_subcall" }, /* 436 */
{ 4, 0, printargs, "ipc_subcall" }, /* 437 */
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, TI, sys_shmat, "shmat" }, /* 440 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 441 */
{ 4, TI, sys_shmget, "shmget" }, /* 442 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 443 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */

View File

@ -4169,7 +4169,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 4164 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 4165 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 4166 */
{ 4, 0, sys_mremap, "mremap" }, /* 4167 */
{ 5, 0, sys_mremap, "mremap" }, /* 4167 */
{ 3, TN, sys_accept, "accept" }, /* 4168 */
{ 3, TN, sys_bind, "bind" }, /* 4169 */
{ 3, TN, sys_connect, "connect" }, /* 4170 */
@ -5350,7 +5350,7 @@
{ 1, 0, sys_pipe, "pipe" }, /* 5021 */
{ 5, 0, sys_select, "_newselect" }, /* 5022 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 5023 */
{ 4, 0, sys_mremap, "mremap" }, /* 5024 */
{ 5, 0, sys_mremap, "mremap" }, /* 5024 */
{ 3, 0, sys_msync, "msync" }, /* 5025 */
{ 3, 0, printargs, "mincore" }, /* 5026 */
{ 3, 0, sys_madvise, "madvise" }, /* 5027 */
@ -6576,7 +6576,7 @@
{ 1, 0, sys_pipe, "pipe" }, /* 6021 */
{ 5, 0, sys_select, "_newselect" }, /* 6022 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 6023 */
{ 4, 0, sys_mremap, "mremap" }, /* 6024 */
{ 5, 0, sys_mremap, "mremap" }, /* 6024 */
{ 3, 0, sys_msync, "msync" }, /* 6025 */
{ 3, 0, printargs, "mincore" }, /* 6026 */
{ 3, 0, sys_madvise, "madvise" }, /* 6027 */

View File

@ -84,7 +84,7 @@
{ 0, 0, sys_lock, "lock" }, /* 53 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 55 */
{ 0, 0, sys_mpx, "sys_mpx" }, /* 56 */
{ 0, 0, sys_mpx, "mpx" }, /* 56 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 57 */
{ 2, 0, sys_ulimit, "ulimit" }, /* 58 */
{ 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
@ -138,10 +138,10 @@
{ 2, TF, sys_lstat, "lstat" }, /* 107 */
{ 2, TD, sys_fstat, "fstat" }, /* 108 */
{ 1, 0, sys_olduname, "olduname" }, /* 109 */
{ 5, 0, printargs, "SYS_110" }, /* 110 */
{ 5, 0, printargs, "iopl" }, /* 110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
{ 0, 0, sys_idle, "idle" }, /* 112 */
{ 5, 0, printargs, "SYS_113" }, /* 113 */
{ 5, 0, printargs, "vm86" }, /* 113 */
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, 0, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
@ -151,7 +151,7 @@
{ 5, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 1, 0, sys_uname, "uname" }, /* 122 */
{ 5, 0, printargs, "SYS_123" }, /* 123 */
{ 5, 0, printargs, "modify_ldt" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
@ -191,7 +191,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, sys_query_module, "query_module" }, /* 166 */
@ -219,11 +219,10 @@
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 188 */
{ 0, TP, sys_vfork, "vfork" }, /* 189 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 190 */
{ 4, TD, sys_readahead, "readahead" }, /* 190 */
{ 5, TD, sys_readahead, "readahead" }, /* 190 */
{ 6, 0, sys_mmap, "mmap2" }, /* 192 */
{ 4, TF, sys_truncate64, "truncate64" }, /* 193 */
{ 4, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 2, TF, sys_stat64, "stat64" }, /* 195 */
{ 2, TF, sys_lstat64, "lstat64" }, /* 196 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 197 */
@ -258,7 +257,7 @@
{ 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 226 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 227 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 228 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 229 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 229 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 230 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 231 */
{ 1, 0, printargs, "set_tid_address" }, /* 232 */
@ -287,7 +286,7 @@
{ 1, 0, printargs, "rtas" }, /* 255 */
{ 5, 0, printargs, "debug_setcontext" }, /* 256 */
{ 5, 0, printargs, "vserver" }, /* 257 */
{ 5, 0, printargs, "SYS_258" }, /* 258 */
{ 5, 0, printargs, "migrate_pages" }, /* 258 */
{ 6, 0, sys_mbind, "mbind" }, /* 259 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 260 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 261 */
@ -297,7 +296,7 @@
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 265 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 266 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 267 */
{ 5, 0, printargs, "sys_kexec_load" }, /* 268 */
{ 5, 0, printargs, "kexec_load" }, /* 268 */
{ 5, 0, printargs, "add_key" }, /* 269 */
{ 4, 0, printargs, "request_key" }, /* 270 */
{ 5, 0, printargs, "keyctl" }, /* 271 */
@ -333,25 +332,25 @@
{ 6, 0, sys_move_pages, "move_pages" }, /* 301 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 302 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 303 */
{ 5, 0, printargs, "SYS_304" }, /* 304 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 304 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 305 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 306 */
{ 4, TD, sys_timerfd_create, "timerfd_create" }, /* 306 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 307 */
{ 5, 0, printargs, "SYS_308" }, /* 308 */
{ 5, 0, printargs, "SYS_309" }, /* 309 */
{ 4, TD, printargs, "sync_file_range" }, /* 308 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 309 */
{ 3, 0, sys_subpage_prot, "subpage_prot" }, /* 310 */
{ 5, 0, printargs, "SYS_311" }, /* 311 */
{ 5, 0, printargs, "SYS_312" }, /* 312 */
{ 5, 0, printargs, "SYS_313" }, /* 313 */
{ 5, 0, printargs, "SYS_314" }, /* 314 */
{ 5, 0, printargs, "SYS_315" }, /* 315 */
{ 5, 0, printargs, "SYS_316" }, /* 316 */
{ 5, 0, printargs, "SYS_317" }, /* 317 */
{ 5, 0, printargs, "SYS_318" }, /* 318 */
{ 5, 0, printargs, "SYS_319" }, /* 319 */
{ 5, 0, printargs, "SYS_320" }, /* 320 */
{ 5, 0, printargs, "SYS_321" }, /* 321 */
{ 5, 0, printargs, "SYS_322" }, /* 322 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 311 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 312 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 313 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 314 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 315 */
{ 3, TD, sys_dup3, "dup3" }, /* 316 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 317 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 318 */
{ 5, TD, printargs, "perf_event_open" }, /* 319 */
{ 5, TD, printargs, "preadv" }, /* 320 */
{ 5, TD, printargs, "pwritev" }, /* 321 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo" }, /* 322 */
{ 5, 0, printargs, "SYS_323" }, /* 323 */
{ 5, 0, printargs, "SYS_324" }, /* 324 */
{ 5, 0, printargs, "SYS_325" }, /* 325 */
@ -452,37 +451,38 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, TI, printargs, "semop" }, /* 420 */
{ 4, TI, sys_semget, "semget" }, /* 421 */
{ 4, TI, sys_semctl, "semctl" }, /* 422 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
{ 4, 0, printargs, "ipc_subcall" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
{ 4, TI, sys_semctl, "semctl" }, /* 423 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 425 */
{ 4, 0, printargs, "ipc_subcall" }, /* 426 */
{ 4, 0, printargs, "ipc_subcall" }, /* 427 */
{ 4, 0, printargs, "ipc_subcall" }, /* 428 */
{ 4, 0, printargs, "ipc_subcall" }, /* 429 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 430 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 431 */
{ 4, TI, sys_msgget, "msgget" }, /* 432 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 433 */
{ 4, 0, printargs, "ipc_subcall" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 430 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
{ 4, TI, sys_msgget, "msgget" }, /* 433 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 435 */
{ 4, 0, printargs, "ipc_subcall" }, /* 436 */
{ 4, 0, printargs, "ipc_subcall" }, /* 437 */
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, TI, sys_shmat, "shmat" }, /* 440 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 441 */
{ 4, TI, sys_shmget, "shmget" }, /* 442 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 443 */
{ 5, 0, printargs, "SYS_343" }, /* 444 */
{ 5, 0, printargs, "SYS_344" }, /* 445 */
{ 5, 0, printargs, "SYS_345" }, /* 446 */
{ 5, 0, printargs, "SYS_346" }, /* 447 */
{ 5, 0, printargs, "SYS_347" }, /* 448 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */
{ 5, 0, printargs, "SYS_343" }, /* 445 */
{ 5, 0, printargs, "SYS_344" }, /* 446 */
{ 5, 0, printargs, "SYS_345" }, /* 447 */
{ 5, 0, printargs, "SYS_346" }, /* 448 */
{ 5, 0, printargs, "SYS_347" }, /* 449 */

View File

@ -191,7 +191,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ -1, 0, printargs, "SYS_166" }, /* 166 */
@ -305,7 +305,7 @@
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */
{ 5, 0, printargs, "sys_kexec_load" }, /* 277 */
{ 5, 0, printargs, "kexec_load" }, /* 277 */
{ 5, 0, printargs, "add_key" }, /* 278 */
{ 4, 0, printargs, "request_key" }, /* 279 */
{ 5, 0, printargs, "keyctl" }, /* 280 */
@ -338,29 +338,28 @@
{ 4, TD, printargs, "sync_file_range" }, /* 307 */
{ 4, TD, printargs, "tee" }, /* 308 */
{ 4, TD, printargs, "vmsplice" }, /* 309 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 310 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 311 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 312 */
{ 5, 0, printargs, "SYS_313" }, /* 313 */
{ 5, 0, printargs, "SYS_314" }, /* 314 */
{ 5, 0, printargs, "SYS_315" }, /* 315 */
{ 2, TF, sys_utimes, "utimes" }, /* 313 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 314 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 315 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 316 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 317 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 318 */
{ 5, 0, printargs, "SYS_319" }, /* 319 */
{ 5, 0, printargs, "SYS_320" }, /* 320 */
{ 5, 0, printargs, "SYS_321" }, /* 321 */
{ 5, 0, printargs, "SYS_322" }, /* 322 */
{ 5, 0, printargs, "SYS_323" }, /* 323 */
{ 5, 0, printargs, "SYS_324" }, /* 324 */
{ 5, 0, printargs, "SYS_325" }, /* 325 */
{ 5, 0, printargs, "SYS_326" }, /* 326 */
{ 5, 0, printargs, "SYS_327" }, /* 327 */
{ 5, 0, printargs, "SYS_328" }, /* 328 */
{ 5, 0, printargs, "SYS_329" }, /* 329 */
{ 5, 0, printargs, "SYS_330" }, /* 330 */
{ 5, 0, printargs, "SYS_331" }, /* 331 */
{ 2, TD, sys_timerfd_create, "timerfd_create"}, /* 319 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 320 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 321 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 322 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 323 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 324 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 325 */
{ 3, TD, sys_dup3, "dup3" }, /* 326 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 327 */
{ 5, TD, printargs, "preadv" }, /* 328 */
{ 5, TD, printargs, "pwritev" }, /* 329 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 330 */
{ 5, TD, printargs, "perf_event_open"}, /* 331 */
{ 5, 0, printargs, "SYS_332" }, /* 332 */
{ 5, 0, printargs, "SYS_333" }, /* 333 */
{ 5, 0, printargs, "SYS_334" }, /* 334 */
@ -452,32 +451,33 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, TI, sys_semop, "semop" }, /* 420 */
{ 4, TI, sys_semget, "semget" }, /* 421 */
{ 4, TI, sys_semctl, "semctl" }, /* 422 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
{ 4, 0, printargs, "ipc_subcall" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
{ 4, TI, sys_semctl, "semctl" }, /* 423 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 425 */
{ 4, 0, printargs, "ipc_subcall" }, /* 426 */
{ 4, 0, printargs, "ipc_subcall" }, /* 427 */
{ 4, 0, printargs, "ipc_subcall" }, /* 428 */
{ 4, 0, printargs, "ipc_subcall" }, /* 429 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 430 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 431 */
{ 4, TI, sys_msgget, "msgget" }, /* 432 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 433 */
{ 4, 0, printargs, "ipc_subcall" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 430 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
{ 4, TI, sys_msgget, "msgget" }, /* 433 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 435 */
{ 4, 0, printargs, "ipc_subcall" }, /* 436 */
{ 4, 0, printargs, "ipc_subcall" }, /* 437 */
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, TI, sys_shmat, "shmat" }, /* 440 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 441 */
{ 4, TI, sys_shmget, "shmget" }, /* 442 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 443 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */

View File

@ -190,7 +190,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ -1, 0, printargs, "SYS_164" }, /* 164 */
{ -1, 0, printargs, "SYS_165" }, /* 165 */
{ -1, 0, printargs, "SYS_166" }, /* 166 */
@ -304,7 +304,7 @@
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */
{ 5, 0, printargs, "sys_kexec_load" }, /* 277 */
{ 5, 0, printargs, "kexec_load" }, /* 277 */
{ 5, 0, printargs, "add_key" }, /* 278 */
{ 4, 0, printargs, "request_key" }, /* 279 */
{ 5, 0, printargs, "keyctl" }, /* 280 */
@ -340,25 +340,25 @@
{ 6, 0, sys_move_pages, "move_pages" }, /* 310 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 311 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 312 */
{ 5, 0, printargs, "SYS_313" }, /* 313 */
{ 5, 0, printargs, "SYS_314" }, /* 314 */
{ 5, 0, printargs, "SYS_315" }, /* 315 */
{ 2, TF, sys_utimes, "utimes" }, /* 313 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 314 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 315 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 316 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 317 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 318 */
{ 5, 0, printargs, "SYS_319" }, /* 319 */
{ 5, 0, printargs, "SYS_320" }, /* 320 */
{ 5, 0, printargs, "SYS_321" }, /* 321 */
{ 5, 0, printargs, "SYS_322" }, /* 322 */
{ 5, 0, printargs, "SYS_323" }, /* 323 */
{ 5, 0, printargs, "SYS_324" }, /* 324 */
{ 5, 0, printargs, "SYS_325" }, /* 325 */
{ 5, 0, printargs, "SYS_326" }, /* 326 */
{ 5, 0, printargs, "SYS_327" }, /* 327 */
{ 5, 0, printargs, "SYS_328" }, /* 328 */
{ 5, 0, printargs, "SYS_329" }, /* 329 */
{ 5, 0, printargs, "SYS_330" }, /* 330 */
{ 5, 0, printargs, "SYS_331" }, /* 331 */
{ 2, TD, sys_timerfd_create, "timerfd_create"}, /* 319 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 320 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 321 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 322 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 323 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 324 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 325 */
{ 3, TD, sys_dup3, "dup3" }, /* 326 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 327 */
{ 5, TD, printargs, "preadv" }, /* 328 */
{ 5, TD, printargs, "pwritev" }, /* 329 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 330 */
{ 5, TD, printargs, "perf_event_open"}, /* 331 */
{ 5, 0, printargs, "SYS_332" }, /* 332 */
{ 5, 0, printargs, "SYS_333" }, /* 333 */
{ 5, 0, printargs, "SYS_334" }, /* 334 */
@ -450,32 +450,33 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, TI, sys_semop, "semop" }, /* 420 */
{ 4, TI, sys_semget, "semget" }, /* 421 */
{ 4, TI, sys_semctl, "semctl" }, /* 422 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
{ 4, 0, printargs, "ipc_subcall" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
{ 4, TI, sys_semctl, "semctl" }, /* 423 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 425 */
{ 4, 0, printargs, "ipc_subcall" }, /* 426 */
{ 4, 0, printargs, "ipc_subcall" }, /* 427 */
{ 4, 0, printargs, "ipc_subcall" }, /* 428 */
{ 4, 0, printargs, "ipc_subcall" }, /* 429 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 430 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 431 */
{ 4, TI, sys_msgget, "msgget" }, /* 432 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 433 */
{ 4, 0, printargs, "ipc_subcall" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 430 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
{ 4, TI, sys_msgget, "msgget" }, /* 433 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 435 */
{ 4, 0, printargs, "ipc_subcall" }, /* 436 */
{ 4, 0, printargs, "ipc_subcall" }, /* 437 */
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, TI, sys_shmat, "shmat" }, /* 440 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 441 */
{ 4, TI, sys_shmget, "shmget" }, /* 442 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 443 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */

View File

@ -153,7 +153,7 @@
{ 5, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 1, 0, sys_uname, "uname" }, /* 122 */
{ 3, 0, sys_modify_ldt, "modify_ldt" }, /* 123 */
{ 3, 0, printargs, "cacheflush" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
@ -193,7 +193,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
@ -356,19 +356,19 @@
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 322 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 323 */
{ 6, 0, printargs, "fallocate" }, /* 324 */
{ 5, 0, printargs, "SYS_325" }, /* 325 */
{ 5, 0, printargs, "SYS_326" }, /* 326 */
{ 5, 0, printargs, "SYS_327" }, /* 327 */
{ 5, 0, printargs, "SYS_328" }, /* 328 */
{ 5, 0, printargs, "SYS_329" }, /* 329 */
{ 5, 0, printargs, "SYS_330" }, /* 330 */
{ 5, 0, printargs, "SYS_331" }, /* 331 */
{ 5, 0, printargs, "SYS_332" }, /* 332 */
{ 5, 0, printargs, "SYS_333" }, /* 333 */
{ 5, 0, printargs, "SYS_334" }, /* 334 */
{ 5, 0, printargs, "SYS_335" }, /* 335 */
{ 5, 0, printargs, "SYS_336" }, /* 336 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 324 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 325 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 326 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 327 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 328 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 329 */
{ 3, TD, sys_dup3, "dup3" }, /* 330 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 331 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 332 */
{ 5, TD, printargs, "preadv" }, /* 333 */
{ 5, TD, printargs, "pwritev" }, /* 334 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 335 */
{ 5, TD, printargs, "perf_event_open"}, /* 336 */
{ 5, 0, printargs, "SYS_337" }, /* 337 */
{ 5, 0, printargs, "SYS_338" }, /* 338 */
{ 5, 0, printargs, "SYS_339" }, /* 339 */
@ -455,33 +455,34 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, TI, sys_semop, "semop" }, /* 420 */
{ 4, TI, sys_semget, "semget" }, /* 421 */
{ 4, TI, sys_semctl, "semctl" }, /* 422 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
{ 4, 0, printargs, "ipc_subcall" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
{ 4, TI, sys_semctl, "semctl" }, /* 423 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
{ 4, 0, printargs, "ipc_subcall" }, /* 425 */
{ 4, 0, printargs, "ipc_subcall" }, /* 426 */
{ 4, 0, printargs, "ipc_subcall" }, /* 427 */
{ 4, 0, printargs, "ipc_subcall" }, /* 428 */
{ 4, 0, printargs, "ipc_subcall" }, /* 429 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 430 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 431 */
{ 4, TI, sys_msgget, "msgget" }, /* 432 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 433 */
{ 4, 0, printargs, "ipc_subcall" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 430 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
{ 4, TI, sys_msgget, "msgget" }, /* 433 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 434 */
{ 4, 0, printargs, "ipc_subcall" }, /* 435 */
{ 4, 0, printargs, "ipc_subcall" }, /* 436 */
{ 4, 0, printargs, "ipc_subcall" }, /* 437 */
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, TI, sys_shmat, "shmat" }, /* 440 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 441 */
{ 4, TI, sys_shmget, "shmget" }, /* 442 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 443 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */

View File

@ -151,7 +151,7 @@
{ 5, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 1, 0, sys_uname, "uname" }, /* 122 */
{ 3, 0, printargs, "SYS_123" }, /* 123 */
{ 3, 0, printargs, "cacheflush" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
@ -191,7 +191,7 @@
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 162 */
{ 4, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "SYS_166" }, /* 166 */
@ -380,21 +380,21 @@
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 349 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 350 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 351 */
{ 6, 0, printargs, "fallocate" }, /* 352 */
{ 5, 0, printargs, "SYS_353" }, /* 353 */
{ 5, 0, printargs, "SYS_354" }, /* 354 */
{ 5, 0, printargs, "SYS_355" }, /* 355 */
{ 5, 0, printargs, "SYS_356" }, /* 356 */
{ 5, 0, printargs, "SYS_357" }, /* 357 */
{ 5, 0, printargs, "SYS_358" }, /* 358 */
{ 5, 0, printargs, "SYS_359" }, /* 359 */
{ 5, 0, printargs, "SYS_360" }, /* 360 */
{ 5, 0, printargs, "SYS_361" }, /* 361 */
{ 5, 0, printargs, "SYS_362" }, /* 362 */
{ 5, 0, printargs, "SYS_363" }, /* 363 */
{ 5, 0, printargs, "SYS_364" }, /* 364 */
{ 5, 0, printargs, "SYS_365" }, /* 365 */
{ 5, 0, printargs, "SYS_366" }, /* 366 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 352 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 353 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 354 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 355 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 356 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 357 */
{ 3, TD, sys_dup3, "dup3" }, /* 358 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 359 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 360 */
{ 5, TD, printargs, "preadv" }, /* 361 */
{ 5, TD, printargs, "pwritev" }, /* 362 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 363 */
{ 5, TD, printargs, "perf_event_open"}, /* 364 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 365 */
{ 4, TN, sys_accept4, "accept4" }, /* 366 */
{ 5, 0, printargs, "SYS_367" }, /* 367 */
{ 5, 0, printargs, "SYS_368" }, /* 368 */
{ 5, 0, printargs, "SYS_369" }, /* 369 */
@ -451,8 +451,9 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 419
#if SYS_ipc_subcall != 420
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 419 */
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */

View File

@ -1,6 +1,6 @@
open SPARC, "syscallent.h" || die "no puedo abrir el de la sparc";
open ALPHA, "../alpha/syscallent.h" || die "no puedo abrir el de la alpha";
open PC, "../syscallent.h" || die "no puedo abrir PC\n";
open PC, "../i386/syscallent.h" || die "no puedo abrir PC\n";
while (<SPARC>) {
chop;

View File

@ -99,6 +99,7 @@ int sys_socket(),sys_bind(),sys_listen(),sys_accept(),sys_connect();
int sys_socketpair(),sys_sendto(),sys_send(),sys_recvfrom(),sys_recv();
int sys_sendmsg(),sys_recvmsg(),sys_shutdown(),sys_setsockopt(),sys_getsockopt();
int sys_getsockname(),sys_getpeername(),sys_pipe(),sys_accept4();
int sys_recvmmsg();
int sys_setresuid(), sys_setresgid(), sys_getresuid(), sys_getresgid(), sys_pread();
int sys_pwrite(), sys_getcwd();
@ -233,8 +234,9 @@ int sys_signalfd(), sys_timerfd(), sys_eventfd();
#define SYS_sub_sendmsg (SYS_socket_subcall + 16)
#define SYS_sub_recvmsg (SYS_socket_subcall + 17)
#define SYS_sub_accept4 (SYS_socket_subcall + 18)
#define SYS_sub_recvmmsg (SYS_socket_subcall + 19)
#define SYS_socket_nsubcalls 19
#define SYS_socket_nsubcalls 20
#define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
#define SYS_sub_semop (SYS_ipc_subcall + 1)

View File

@ -248,7 +248,7 @@
{ 1,0,sys_sched_get_priority_min,"sched_get_priority_min"},/* 247 */
{ 2, 0,sys_sched_rr_get_interval,"sched_rr_get_interval"},/* 248 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 249 */
{ 4, 0, sys_mremap, "mremap" }, /* 250 */
{ 5, 0, sys_mremap, "mremap" }, /* 250 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 251 */
{ 1, 0, sys_getsid, "getsid" }, /* 252 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 253 */
@ -300,33 +300,33 @@
{ 1, TP, sys_unshare, "unshare" }, /* 299 */
{ 2, 0, printargs, "set_robust_list" }, /* 300 */
{ 3, 0, printargs, "get_robust_list" }, /* 301 */
{ 5, 0, printargs, "SYS_302" }, /* 302 */
{ 5, 0, printargs, "SYS_303" }, /* 303 */
{ 5, 0, printargs, "SYS_304" }, /* 304 */
{ 5, 0, printargs, "SYS_305" }, /* 305 */
{ 5, 0, printargs, "SYS_306" }, /* 306 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 307 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 308 */
{ 5, TD, sys_epoll_pwait,"epoll_pwait" }, /* 309 */
{ 5, 0, printargs, "SYS_310" }, /* 310 */
{ 3, TD|TS, sys_signalfd, "signalfd"}, /* 311 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 312 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 313 */
{ 5, 0, printargs, "SYS_314" }, /* 314 */
{ 5, 0, printargs, "SYS_315" }, /* 315 */
{ 5, 0, printargs, "SYS_316" }, /* 316 */
{ 5, 0, printargs, "SYS_317" }, /* 317 */
{ 5, 0, printargs, "SYS_318" }, /* 318 */
{ 5, 0, printargs, "SYS_319" }, /* 319 */
{ 5, 0, printargs, "SYS_320" }, /* 320 */
{ 5, 0, printargs, "SYS_321" }, /* 321 */
{ 5, 0, printargs, "SYS_322" }, /* 322 */
{ 5, 0, printargs, "SYS_323" }, /* 323 */
{ 5, 0, printargs, "SYS_324" }, /* 324 */
{ 5, 0, printargs, "SYS_325" }, /* 325 */
{ 5, 0, printargs, "SYS_326" }, /* 326 */
{ 5, 0, printargs, "SYS_327" }, /* 327 */
{ 5, 0, printargs, "SYS_328" }, /* 328 */
{ 4, 0, printargs, "migrate_pages" }, /* 302 */
{ 6, 0, sys_mbind, "mbind" }, /* 303 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 304 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 305 */
{ 5, 0, printargs, "kexec_load" }, /* 306 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 307 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 308 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 309 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 310 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 311 */
{ 2, TD, sys_timerfd_create, "timerfd_create"}, /* 312 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 313 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 314 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 315 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 316 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 317 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 318 */
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 319 */
{ 3, TD, sys_dup3, "dup3" }, /* 320 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 321 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 322 */
{ 4, TN, sys_accept4, "accept4" }, /* 323 */
{ 5, TD, printargs, "preadv" }, /* 324 */
{ 5, TD, printargs, "pwritev" }, /* 325 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 326 */
{ 5, TD, printargs, "perf_event_open"}, /* 327 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 328 */
{ 5, 0, printargs, "SYS_329" }, /* 329 */
{ 5, 0, printargs, "SYS_330" }, /* 330 */
{ 5, 0, printargs, "SYS_331" }, /* 331 */
@ -373,35 +373,36 @@
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 369 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 370 */
{ 4, TN, sys_accept4, "accept4" }, /* 371 */
#if SYS_ipc_subcall != 372
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 372 */
#if SYS_ipc_subcall != 373
#error fix me
#endif
{ 4, 0, printargs, "ipc_subcall" }, /* 372 */
{ 4, TI, printargs, "semop" }, /* 373 */
{ 4, TI, sys_semget, "semget" }, /* 374 */
{ 4, TI, sys_semctl, "semctl" }, /* 375 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 376 */
{ 4, 0, printargs, "ipc_subcall" }, /* 377 */
{ 4, 0, printargs, "ipc_subcall" }, /* 373 */
{ 4, TI, printargs, "semop" }, /* 374 */
{ 4, TI, sys_semget, "semget" }, /* 375 */
{ 4, TI, sys_semctl, "semctl" }, /* 376 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 377 */
{ 4, 0, printargs, "ipc_subcall" }, /* 378 */
{ 4, 0, printargs, "ipc_subcall" }, /* 379 */
{ 4, 0, printargs, "ipc_subcall" }, /* 380 */
{ 4, 0, printargs, "ipc_subcall" }, /* 381 */
{ 4, 0, printargs, "ipc_subcall" }, /* 382 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 383 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 384 */
{ 4, TI, sys_msgget, "msgget" }, /* 385 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 386 */
{ 4, 0, printargs, "ipc_subcall" }, /* 387 */
{ 4, 0, printargs, "ipc_subcall" }, /* 383 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 384 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 385 */
{ 4, TI, sys_msgget, "msgget" }, /* 386 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 387 */
{ 4, 0, printargs, "ipc_subcall" }, /* 388 */
{ 4, 0, printargs, "ipc_subcall" }, /* 389 */
{ 4, 0, printargs, "ipc_subcall" }, /* 390 */
{ 4, 0, printargs, "ipc_subcall" }, /* 391 */
{ 4, 0, printargs, "ipc_subcall" }, /* 392 */
{ 4, TI, sys_shmat, "shmat" }, /* 393 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 394 */
{ 4, TI, sys_shmget, "shmget" }, /* 395 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 396 */
{ 5, 0, printargs, "SYS_397" }, /* 397 */
{ 5, 0, printargs, "SYS_398" }, /* 398 */
{ 5, 0, printargs, "SYS_399" }, /* 399 */
{ 5, 0, printargs, "SYS_400" }, /* 400 */
{ 4, 0, printargs, "ipc_subcall" }, /* 393 */
{ 4, TI, sys_shmat, "shmat" }, /* 394 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 395 */
{ 4, TI, sys_shmget, "shmget" }, /* 396 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 397 */
{ 5, 0, printargs, "SYS_397" }, /* 398 */
{ 5, 0, printargs, "SYS_398" }, /* 399 */
{ 5, 0, printargs, "SYS_399" }, /* 400 */
{ 5, 0, printargs, "SYS_400" }, /* 401 */

View File

@ -113,6 +113,7 @@ int sys_socket(), sys_bind(), sys_connect(), sys_listen(), sys_accept4();
int sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
int sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
int sys_shutdown(), sys_setsockopt(), sys_getsockopt();
int sys_recvmmsg();
/* *at syscalls */
int sys_fchmodat();
@ -135,6 +136,7 @@ int sys_poll();
int sys_mincore();
int sys_inotify_add_watch();
int sys_inotify_rm_watch();
int sys_inotify_init1();
int sys_pselect6();
int sys_ppoll();
int sys_unshare();
@ -227,8 +229,9 @@ int sys_osf_utimes();
#define SYS_sub_sendmsg (SYS_socket_subcall + 16)
#define SYS_sub_recvmsg (SYS_socket_subcall + 17)
#define SYS_sub_accept4 (SYS_socket_subcall + 18)
#define SYS_sub_recvmmsg (SYS_socket_subcall + 19)
#define SYS_socket_nsubcalls 19
#define SYS_socket_nsubcalls 20
#endif /* !(ALPHA || MIPS || HPPA) */
/* sys_ipc subcalls */

302
linux/tile/syscallent.h Normal file
View File

@ -0,0 +1,302 @@
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
{ 1, TP, sys_exit, "exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, TD, sys_read, "read" }, /* 3 */
{ 3, TD, sys_write, "write" }, /* 4 */
{ 3, TD|TF, sys_open, "open" }, /* 5 */
{ 1, TD, sys_close, "close" }, /* 6 */
{ 3, TP, sys_waitpid, "waitpid" }, /* 7 */
{ 2, TD|TF, sys_creat, "creat" }, /* 8 */
{ 2, TF, sys_link, "link" }, /* 9 */
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ 3, TF|TP, sys_execve, "execve" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, 0, sys_time, "time" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, sys_chown, "lchown" }, /* 16 */
{ 2, TF, sys_stat, "stat" }, /* 17 */
{ 3, TD, sys_lseek, "lseek" }, /* 18 */
{ 0, 0, sys_getpid, "getpid" }, /* 19 */
{ 5, TF, sys_mount, "mount" }, /* 20 */
{ 2, TF, sys_umount2, "umount" }, /* 21 */
{ 1, 0, sys_setuid, "setuid" }, /* 22 */
{ 0, 0, sys_getuid, "getuid" }, /* 23 */
{ 1, 0, sys_stime, "stime" }, /* 24 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 25 */
{ 1, 0, sys_alarm, "alarm" }, /* 26 */
{ 2, TD, sys_fstat, "fstat" }, /* 27 */
{ 0, TS, sys_pause, "pause" }, /* 28 */
{ 2, TF, sys_utime, "utime" }, /* 29 */
{ 2, TF, sys_access, "access" }, /* 30 */
{ 1, 0, sys_nice, "nice" }, /* 31 */
{ 0, 0, sys_sync, "sync" }, /* 32 */
{ 2, TS, sys_kill, "kill" }, /* 33 */
{ 2, TF, sys_rename, "rename" }, /* 34 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 35 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 36 */
{ 1, TD, sys_dup, "dup" }, /* 37 */
{ 1, TD, sys_pipe, "pipe" }, /* 38 */
{ 1, 0, sys_times, "times" }, /* 39 */
{ 1, 0, sys_brk, "brk" }, /* 40 */
{ 1, 0, sys_setgid, "setgid" }, /* 41 */
{ 0, 0, sys_getgid, "getgid" }, /* 42 */
{ 3, TS, sys_signal, "signal" }, /* 43 */
{ 0, 0, sys_geteuid, "geteuid" }, /* 44 */
{ 0, 0, sys_getegid, "getegid" }, /* 45 */
{ 1, TF, sys_acct, "acct" }, /* 46 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 47 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 48 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 49 */
{ 1, 0, sys_umask, "umask" }, /* 50 */
{ 1, TF, sys_chroot, "chroot" }, /* 51 */
{ 2, 0, sys_ustat, "ustat" }, /* 52 */
{ 2, TD, sys_dup2, "dup2" }, /* 53 */
{ 0, 0, sys_getppid, "getppid" }, /* 54 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 55 */
{ 0, 0, sys_setsid, "setsid" }, /* 56 */
{ 0, TS, printargs, "sgetmask" }, /* 57 */
{ 1, TS, printargs, "ssetmask" }, /* 58 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 59 */
{ 2, 0, sys_setregid, "setregid" }, /* 60 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 61 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 62 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 63 */
{ 2, 0, sys_getrlimit, "ugetrlimit" }, /* 64 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 65 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 66 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 67 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 68 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 69 */
{ 5, TD, sys_select, "select" }, /* 70 */
{ 2, TF, sys_symlink, "symlink" }, /* 71 */
{ 2, TF, sys_lstat, "lstat" }, /* 72 */
{ 3, TF, sys_readlink, "readlink" }, /* 73 */
{ 1, TF, sys_uselib, "uselib" }, /* 74 */
{ 1, TF, sys_swapon, "swapon" }, /* 75 */
{ 3, 0, sys_reboot, "reboot" }, /* 76 */
{ 6, 0, sys_mmap, "mmap2" }, /* 77 */
{ 2, 0, sys_munmap, "munmap" }, /* 78 */
{ 2, TF, sys_truncate, "truncate" }, /* 79 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 80 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 81 */
{ 3, TD, sys_fchown, "fchown" }, /* 82 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 83 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 84 */
{ 2, TF, sys_statfs, "statfs" }, /* 85 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 86 */
{ 3, TN, sys_socket, "socket" }, /* 87 */
{ 3, TN, sys_bind, "bind" }, /* 88 */
{ 3, TN, sys_connect, "connect" }, /* 89 */
{ 2, TN, sys_listen, "listen" }, /* 90 */
{ 3, TN, sys_accept, "accept" }, /* 91 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 92 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 93 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 94 */
{ 4, TN, sys_send, "send" }, /* 95 */
{ 6, TN, sys_sendto, "sendto" }, /* 96 */
{ 4, TN, sys_recv, "recv" }, /* 97 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 98 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 99 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 100 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 101 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 102 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 103 */
{ 3, 0, sys_syslog, "syslog" }, /* 104 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 105 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 106 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 107 */
{ 4, TP, sys_wait4, "wait4" }, /* 108 */
{ 1, 0, sys_swapoff, "swapoff" }, /* 109 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 110 */
{ 4, TI, sys_shmget, "shmget" }, /* 111 */
{ 4, TI, sys_shmat, "shmat" }, /* 112 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 113 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 114 */
{ 4, TI, sys_semget, "semget" }, /* 115 */
{ 4, TI, sys_semop, "semop" }, /* 116 */
{ 4, TI, sys_semctl, "semctl" }, /* 117 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 118 */
{ 4, TI, sys_msgget, "msgget" }, /* 119 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 120 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 121 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 122 */
{ 1, TD, sys_fsync, "fsync" }, /* 123 */
{ 1, TS, printargs, "sigreturn" }, /* 124 */
{ 5, TP, sys_clone, "clone" }, /* 125 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 126 */
{ 1, 0, sys_uname, "uname" }, /* 127 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 128 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 129 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 130 */
{ 3, 0, sys_init_module, "init_module" }, /* 131 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 132 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 133 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 134 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 135 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 136 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 137 */
{ 1, 0, sys_personality, "personality" }, /* 138 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 139 */
{ 1, 0, sys_setfsuid, "setfsuid" }, /* 140 */
{ 1, 0, sys_setfsgid, "setfsgid" }, /* 141 */
{ 5, TD, sys_llseek, "_llseek" }, /* 142 */
{ 3, TD, sys_getdents, "getdents" }, /* 143 */
{ 2, TD, sys_flock, "flock" }, /* 144 */
{ 3, 0, sys_msync, "msync" }, /* 145 */
{ 3, TD, sys_readv, "readv" }, /* 146 */
{ 3, TD, sys_writev, "writev" }, /* 147 */
{ 1, 0, sys_getsid, "getsid" }, /* 148 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 149 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 150 */
{ 2, 0, sys_mlock, "mlock" }, /* 151 */
{ 2, 0, sys_munlock, "munlock" }, /* 152 */
{ 2, 0, sys_mlockall, "mlockall" }, /* 153 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 154 */
{ 0, 0, sys_sched_setparam, "sched_setparam" }, /* 155 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 156 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 157 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 158 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 159 */
{ 1, 0, sys_sched_get_priority_max,"sched_get_priority_max" }, /* 160 */
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min" }, /* 161 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval" }, /* 162 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 163 */
{ 4, 0, sys_mremap, "mremap" }, /* 164 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 165 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 166 */
{ 3, TD, sys_poll, "poll" }, /* 167 */
{ 3, 0, printargs, "nfsservctl" }, /* 168 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 169 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 170 */
{ 5, 0, printargs, "prctl" }, /* 171 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 172 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 173 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 174 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 175 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 176 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 177 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 178 */
{ 5, TD, sys_pread, "pread64" }, /* 179 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 180 */
{ 3, TF, sys_chown, "chown" }, /* 181 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 182 */
{ 2, 0, sys_capget, "capget" }, /* 183 */
{ 2, 0, sys_capset, "capset" }, /* 184 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 185 */
{ 4, TD, sys_sendfile, "sendfile" }, /* 186 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 187 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 188 */
{ 0, TP, sys_vfork, "vfork" }, /* 189 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 190 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 191 */
{ 2, TF, sys_stat64, "stat64" }, /* 192 */
{ 2, TF, sys_lstat64, "lstat64" }, /* 193 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 194 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 195 */
{ 3, 0, sys_mincore, "mincore" }, /* 196 */
{ 3, 0, sys_madvise, "madvise" }, /* 197 */
{ 4, TD, sys_getdents64, "getdents64" }, /* 198 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 199 */
{ 0, 0, printargs, "gettid" }, /* 200 */
{ 4, TD, sys_readahead, "readahead" }, /* 201 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 202 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 203 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 204 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 205 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 206 */
{ 4, 0, sys_fgetxattr, "fgetxattr" }, /* 207 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 208 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 209 */
{ 3, 0, sys_flistxattr, "flistxattr" }, /* 210 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 211 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 212 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 213 */
{ 2, TS, sys_kill, "tkill" }, /* 214 */
{ 4, TD, sys_sendfile64, "sendfile64" }, /* 215 */
{ 5, 0, sys_futex, "futex" }, /* 216 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 217 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 218 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 219 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 220 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 221 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 222 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 223 */
{ 5, 0, sys_fadvise64, "fadvise64" }, /* 224 */
{ 4, 0, printargs, "migrate_pages" }, /* 225 */
{ 1, TP, sys_exit, "exit_group" }, /* 226 */
{ 4, 0, printargs, "lookup_dcookie" }, /* 227 */
{ 1, 0, sys_epoll_create, "epoll_create" }, /* 228 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 229 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 230 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages" }, /* 231 */
{ 1, 0, printargs, "set_tid_address" }, /* 232 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 233 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 234 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 235 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 236 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 237 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 239 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 239 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 240 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 241 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 242 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 243 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 244 */
{ 2, TF, sys_utimes, "utimes" }, /* 245 */
{ 6, 0, sys_fadvise64_64, "fadvise64_64" }, /* 246 */
{ 6, 0, sys_mbind, "mbind" }, /* 247 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 248 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 249 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 250 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 251 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 252 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 253 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 254 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 255 */
{ 4, 0, printargs, "kexec_load" }, /* 256 */
{ 5, TP, sys_waitid, "waitid" }, /* 257 */
{ 5, 0, printargs, "add_key" }, /* 258 */
{ 4, 0, printargs, "request_key" }, /* 259 */
{ 5, 0, printargs, "keyctl" }, /* 260 */
{ 3, 0, printargs, "ioprio_set" }, /* 261 */
{ 2, 0, printargs, "ioprio_get" }, /* 262 */
{ 0, TD, printargs, "inotify_init" }, /* 263 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 264 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 265 */
{ 1, 0, printargs, "raise_fpe" }, /* 266 */
{ 4, TD|TF, sys_openat, "openat" }, /* 267 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 268 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 269 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 270 */
{ 3, TD|TF, sys_futimesat, "futimesat" }, /* 271 */
{ 4, TD|TD, sys_newfstatat, "fstatat64" }, /* 272 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 273 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 274 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 275 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 276 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 277 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 278 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 279 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 280 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 281 */
{ 1, TP, sys_unshare, "unshare" }, /* 282 */
{ 2, 0, printargs, "set_robust_list" }, /* 283 */
{ 3, 0, printargs, "get_robust_list" }, /* 284 */
{ 6, TD, printargs, "splice" }, /* 285 */
{ 4, TD, printargs, "sync_file_range" }, /* 286 */
{ 4, TD, printargs, "tee" }, /* 287 */
{ 4, TD, printargs, "vmsplice" }, /* 288 */
{ 6, TP, sys_move_pages, "move_pages" }, /* 289 */
{ 1, TP, printargs, "unused" }, /* 290 */
{ 1, 0, printargs, "cmpxchg_badaddr" }, /* 291 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 292 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 293 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 294 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 295 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 296 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 297 */
{ 6, TF, sys_fallocate, "fallocate" }, /* 298 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 299 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 300 */
{ 1, 0, printargs, "flush_cache" } /* 301 */

View File

@ -23,7 +23,7 @@
{ 1, TD, sys_pipe, "pipe" }, /* 22 */
{ 5, TD, sys_select, "select" }, /* 23 */
{ 0, 0, sys_sched_yield, "sched_yield"}, /* 24 */
{ 4, 0, sys_mremap, "mremap" }, /* 25 */
{ 5, 0, sys_mremap, "mremap" }, /* 25 */
{ 3, 0, sys_msync, "msync" }, /* 26 */
{ 3, 0, sys_mincore, "mincore" }, /* 27 */
{ 3, 0, sys_madvise, "madvise" }, /* 28 */
@ -292,4 +292,9 @@
{ 1, 0, sys_epoll_create1, "epoll_create1" }, /* 291 */
{ 3, TD, sys_dup3, "dup3" }, /* 292 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 293 */
{ 1, TD, printargs, "inotify_init1" }, /* 294 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 294 */
{ 5, TD, printargs, "preadv" }, /* 295 */
{ 5, TD, printargs, "pwritev" }, /* 296 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo"}, /* 297 */
{ 5, TD, printargs, "perf_event_open"}, /* 298 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 299 */

View File

@ -4,4 +4,4 @@
#define sys_oldstat printargs
#define sys_oldfstat printargs
#define sys_oldlstat printargs
#include "../syscallent.h"
#include "i386/syscallent.h"

60
mem.c
View File

@ -187,10 +187,50 @@ static const struct xlat mmap_flags[] = {
#endif
#ifdef MAP_NOCORE
{ MAP_NOCORE, "MAP_NOCORE" },
#endif
#ifdef TILE
{ MAP_CACHE_NO_LOCAL, "MAP_CACHE_NO_LOCAL" },
{ MAP_CACHE_NO_L2, "MAP_CACHE_NO_L2" },
{ MAP_CACHE_NO_L1, "MAP_CACHE_NO_L1" },
#endif
{ 0, NULL },
};
#ifdef TILE
static
int
addtileflags(flags)
long flags;
{
long home = flags & _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
flags &= ~_MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
if (flags & _MAP_CACHE_INCOHERENT) {
flags &= ~_MAP_CACHE_INCOHERENT;
if (home == MAP_CACHE_HOME_NONE) {
tprintf("|MAP_CACHE_INCOHERENT");
return flags;
}
tprintf("|_MAP_CACHE_INCOHERENT");
}
switch (home) {
case 0: break;
case MAP_CACHE_HOME_HERE: tprintf("|MAP_CACHE_HOME_HERE"); break;
case MAP_CACHE_HOME_NONE: tprintf("|MAP_CACHE_HOME_NONE"); break;
case MAP_CACHE_HOME_SINGLE: tprintf("|MAP_CACHE_HOME_SINGLE"); break;
case MAP_CACHE_HOME_TASK: tprintf("|MAP_CACHE_HOME_TASK"); break;
case MAP_CACHE_HOME_HASH: tprintf("|MAP_CACHE_HOME_HASH"); break;
default:
tprintf("|MAP_CACHE_HOME(%d)",
(home >> _MAP_CACHE_HOME_SHIFT) );
break;
}
return flags;
}
#endif
#if !HAVE_LONG_LONG_OFF_T
static
int
@ -213,7 +253,11 @@ long long offset;
/* flags */
#ifdef MAP_TYPE
printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
#ifdef TILE
addflags(mmap_flags, addtileflags(u_arg[3] & ~MAP_TYPE));
#else
addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
#endif
#else
printflags(mmap_flags, u_arg[3], "MAP_???");
#endif
@ -318,7 +362,6 @@ struct tcb *tcp;
return 0;
#endif /* ALPHA */
#endif /* linux */
ALIGN64 (tcp, 5); /* FreeBSD wierdies */
/* addr */
tprintf("%#lx, ", u_arg[0]);
@ -337,7 +380,7 @@ struct tcb *tcp;
/* fd */
tprintf(", %ld, ", u_arg[4]);
/* offset */
tprintf("%#llx", LONG_LONG(u_arg[5], u_arg[6]));
printllval(tcp, "%#llx", 5);
}
return RVAL_HEX;
}
@ -371,17 +414,24 @@ struct tcb *tcp;
static const struct xlat mremap_flags[] = {
{ MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
#ifdef MREMAP_FIXED
{ MREMAP_FIXED, "MREMAP_FIXED" },
#endif
{ 0, NULL }
};
int
sys_mremap(tcp)
struct tcb *tcp;
sys_mremap(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1],
tcp->u_arg[2]);
printflags(mremap_flags, tcp->u_arg[3], "MREMAP_???");
#ifdef MREMAP_FIXED
if ((tcp->u_arg[3] & (MREMAP_MAYMOVE | MREMAP_FIXED)) ==
(MREMAP_MAYMOVE | MREMAP_FIXED))
tprintf(", %#lx", tcp->u_arg[4]);
#endif
}
return RVAL_HEX;
}
@ -773,7 +823,7 @@ sys_mbind(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
printxval(policies, tcp->u_arg[2], "MPOL_???");
get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[4], 0);
tprintf(", ");

203
net.c
View File

@ -832,6 +832,30 @@ static const struct xlat sockpacketoptions[] = {
#endif
#if defined(PACKET_STATISTICS)
{ PACKET_STATISTICS, "PACKET_STATISTICS" },
#endif
#if defined(PACKET_COPY_THRESH)
{ PACKET_COPY_THRESH, "PACKET_COPY_THRESH" },
#endif
#if defined(PACKET_AUXDATA)
{ PACKET_AUXDATA, "PACKET_AUXDATA" },
#endif
#if defined(PACKET_ORIGDEV)
{ PACKET_ORIGDEV, "PACKET_ORIGDEV" },
#endif
#if defined(PACKET_VERSION)
{ PACKET_VERSION, "PACKET_VERSION" },
#endif
#if defined(PACKET_HDRLEN)
{ PACKET_HDRLEN, "PACKET_HDRLEN" },
#endif
#if defined(PACKET_RESERVE)
{ PACKET_RESERVE, "PACKET_RESERVE" },
#endif
#if defined(PACKET_TX_RING)
{ PACKET_TX_RING, "PACKET_TX_RING" },
#endif
#if defined(PACKET_LOSS)
{ PACKET_LOSS, "PACKET_LOSS" },
#endif
{ 0, NULL },
};
@ -1160,6 +1184,30 @@ printcmsghdr(struct tcb *tcp, unsigned long addr, unsigned long len)
tprintf(", ...}");
}
static void
do_msghdr(struct tcb *tcp, struct msghdr *msg)
{
tprintf("{msg_name(%d)=", msg->msg_namelen);
printsock(tcp, (long)msg->msg_name, msg->msg_namelen);
tprintf(", msg_iov(%lu)=", (unsigned long)msg->msg_iovlen);
tprint_iov(tcp, (unsigned long)msg->msg_iovlen,
(unsigned long)msg->msg_iov);
#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
tprintf(", msg_controllen=%lu", (unsigned long)msg->msg_controllen);
if (msg->msg_controllen)
printcmsghdr(tcp, (unsigned long) msg->msg_control,
msg->msg_controllen);
tprintf(", msg_flags=");
printflags(msg_flags, msg->msg_flags, "MSG_???");
#else /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
tprintf("msg_accrights=%#lx, msg_accrightslen=%u",
(unsigned long) msg->msg_accrights, msg->msg_accrightslen);
#endif /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
tprintf("}");
}
static void
printmsghdr(tcp, addr)
struct tcb *tcp;
@ -1171,27 +1219,28 @@ long addr;
tprintf("%#lx", addr);
return;
}
tprintf("{msg_name(%d)=", msg.msg_namelen);
printsock(tcp, (long)msg.msg_name, msg.msg_namelen);
tprintf(", msg_iov(%lu)=", (unsigned long)msg.msg_iovlen);
tprint_iov(tcp, (unsigned long)msg.msg_iovlen,
(unsigned long)msg.msg_iov);
#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
tprintf(", msg_controllen=%lu", (unsigned long)msg.msg_controllen);
if (msg.msg_controllen)
printcmsghdr(tcp, (unsigned long) msg.msg_control,
msg.msg_controllen);
tprintf(", msg_flags=");
printflags(msg_flags, msg.msg_flags, "MSG_???");
#else /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
tprintf("msg_accrights=%#lx, msg_accrightslen=%u",
(unsigned long) msg.msg_accrights, msg.msg_accrightslen);
#endif /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
tprintf("}");
do_msghdr(tcp, &msg);
}
#ifdef LINUX
static void
printmmsghdr(struct tcb *tcp, long addr)
{
struct mmsghdr {
struct msghdr msg_hdr;
unsigned msg_len;
} mmsg;
if (umove(tcp, addr, &mmsg) < 0) {
tprintf("%#lx", addr);
return;
}
tprintf("{");
do_msghdr(tcp, &mmsg.msg_hdr);
tprintf(", %u}", mmsg.msg_len);
}
#endif
#endif /* HAVE_SENDMSG */
/*
@ -1479,6 +1528,55 @@ struct tcb *tcp;
return 0;
}
#ifdef LINUX
int
sys_recvmmsg(struct tcb *tcp)
{
static char str[128];
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
if (verbose(tcp)) {
sprint_timespec(str, tcp, tcp->u_arg[4]);
tcp->auxstr = strdup(str);
} else {
tprintf("%#lx, %ld, ", tcp->u_arg[1], tcp->u_arg[2]);
printflags(msg_flags, tcp->u_arg[3], "MSG_???");
tprintf(", ");
print_timespec(tcp, tcp->u_arg[4]);
}
return 0;
} else {
if (verbose(tcp)) {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printmmsghdr(tcp, tcp->u_arg[1]);
tprintf(", %ld, ", tcp->u_arg[2]);
/* flags */
printflags(msg_flags, tcp->u_arg[3], "MSG_???");
/* timeout on entrance */
tprintf(", %s", tcp->auxstr ? tcp->auxstr : "{...}");
free((void *) tcp->auxstr);
tcp->auxstr = NULL;
}
if (syserror(tcp))
return 0;
if (tcp->u_rval == 0) {
tcp->auxstr = "Timeout";
return RVAL_STR;
}
if (!verbose(tcp))
return 0;
/* timeout on exit */
strcpy(str, "left ");
sprint_timespec(str + strlen(str), tcp, tcp->u_arg[4]);
tcp->auxstr = str;
return RVAL_STR;
}
}
#endif
#endif /* HAVE_SENDMSG */
int
@ -1605,8 +1703,7 @@ sys_socketpair(struct tcb *tcp)
}
int
sys_getsockopt(tcp)
struct tcb *tcp;
sys_getsockopt(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
@ -1648,10 +1745,11 @@ struct tcb *tcp;
tprintf("%lu", tcp->u_arg[2]);
break;
}
tprintf (", ");
} else {
int len;
if (syserror(tcp) || umove (tcp, tcp->u_arg[4], &len) < 0) {
tprintf(", %#lx, %#lx",
tprintf("%#lx, %#lx",
tcp->u_arg[3], tcp->u_arg[4]);
return 0;
}
@ -1667,7 +1765,7 @@ struct tcb *tcp;
tcp->u_arg[3],
&linger) < 0)
break;
tprintf(", {onoff=%d, linger=%d}, "
tprintf("{onoff=%d, linger=%d}, "
"[%d]",
linger.l_onoff,
linger.l_linger,
@ -1675,14 +1773,34 @@ struct tcb *tcp;
return 0;
}
break;
#endif
}
break;
case SOL_PACKET:
switch (tcp->u_arg[2]) {
#ifdef PACKET_STATISTICS
case PACKET_STATISTICS:
if (len == sizeof(struct tpacket_stats)) {
struct tpacket_stats stats;
if (umove (tcp,
tcp->u_arg[3],
&stats) < 0)
break;
tprintf("{packets=%u, drops=%u}, "
"[%d]",
stats.tp_packets,
stats.tp_drops,
len);
return 0;
}
break;
#endif
}
break;
}
tprintf (", ");
if (len == sizeof (int)) {
printnum(tcp, tcp->u_arg[3], "%ld");
printnum_int(tcp, tcp->u_arg[3], "%d");
}
else {
printstr (tcp, tcp->u_arg[3], len);
@ -1766,6 +1884,28 @@ int len;
case SOL_PACKET:
printxval(sockpacketoptions, name, "PACKET_???");
/* TODO: decode packate_mreq for PACKET_*_MEMBERSHIP */
switch (name) {
#ifdef PACKET_RX_RING
case PACKET_RX_RING:
#endif
#ifdef PACKET_TX_RING
case PACKET_TX_RING:
#endif
#if defined(PACKET_RX_RING) || defined(PACKET_TX_RING)
if (len == sizeof(struct tpacket_req)) {
struct tpacket_req req;
if (umove(tcp, addr, &req) < 0)
break;
tprintf(", {block_size=%u, block_nr=%u, frame_size=%u, frame_nr=%u}",
req.tp_block_size,
req.tp_block_nr,
req.tp_frame_size,
req.tp_frame_nr);
return 0;
}
break;
#endif /* PACKET_RX_RING || PACKET_TX_RING */
}
break;
#endif
#ifdef SOL_TCP
@ -1979,17 +2119,6 @@ struct tcb *tcp;
}
#if 0
int
sys_xsetsockaddr(tcp)
struct tcb *tcp;
{
return netlib_call (tcp, sys_setsockaddr);
}
#endif
int
sys_xgetsockopt(tcp)
struct tcb *tcp;
@ -2011,4 +2140,4 @@ struct tcb *tcp;
return netlib_call (tcp, sys_shutdown);
}
#endif
#endif /* UNIXWARE */

317
process.c
View File

@ -88,9 +88,9 @@
#endif /* LINUX && SPARC64 */
#ifdef HAVE_LINUX_FUTEX_H
#include <linux/futex.h>
# include <linux/futex.h>
#endif
#if defined LINUX
#ifdef LINUX
# ifndef FUTEX_WAIT
# define FUTEX_WAIT 0
# endif
@ -103,7 +103,7 @@
# ifndef FUTEX_REQUEUE
# define FUTEX_REQUEUE 3
# endif
#endif
#endif /* LINUX */
#ifdef LINUX
#include <sched.h>
@ -120,15 +120,8 @@
#endif
#ifdef HAVE_PRCTL
#include <sys/prctl.h>
#endif
# include <sys/prctl.h>
#ifndef WCOREDUMP
#define WCOREDUMP(status) ((status) & 0200)
#endif
/* WTA: this was `&& !defined(LINUXSPARC)', this seems unneeded though? */
#if defined(HAVE_PRCTL)
static const struct xlat prctl_options[] = {
#ifdef PR_MAXPROCS
{ PR_MAXPROCS, "PR_MAXPROCS" },
@ -365,7 +358,6 @@ struct tcb *tcp;
}
return 0;
}
#endif /* HAVE_PRCTL */
#if defined(FREEBSD) || defined(SUNOS4) || defined(SVR4)
@ -672,7 +664,7 @@ sys_unshare(struct tcb *tcp)
printflags(clone_flags, tcp->u_arg[0], "CLONE_???");
return 0;
}
#endif
#endif /* LINUX */
int
sys_fork(tcp)
@ -686,7 +678,7 @@ struct tcb *tcp;
int
change_syscall(struct tcb *tcp, int new)
{
#if defined(LINUX)
#ifdef LINUX
#if defined(I386)
/* Attempt to make vfork into fork, which we can follow. */
if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_EAX * 4), new) < 0)
@ -782,6 +774,12 @@ change_syscall(struct tcb *tcp, int new)
return -1;
return 0;
#elif defined(TILE)
if (ptrace(PTRACE_POKEUSER, tcp->pid,
(char*)PTREGS_OFFSET_REG(0),
new) != 0)
return -1;
return 0;
#else
#warning Do not know how to handle change_syscall for this architecture
#endif /* architecture */
@ -789,120 +787,10 @@ change_syscall(struct tcb *tcp, int new)
return -1;
}
#if 0
#ifdef LINUX
int
setarg(tcp, argnum)
struct tcb *tcp;
int argnum;
internal_fork(struct tcb *tcp)
{
#if defined(AVR32)
{
errno = 0;
if (argnum == 0)
ptrace(PTRACE_POKEUSER, tcp->pid,
(char *)(REG_R12_ORIG),
tcp->u_arg[argnum]);
else if (argnum < 4)
/* r11 .. r9 */
ptrace(PTRACE_POKEUSER, tcp->pid,
(char *)(REG_R12 - 4 * argnum),
tcp->u_arg[argnum]);
else if (argnum < 5)
/* r5 */
ptrace(PTRACE_POKEUSER, tcp->pid,
(char *)(REG_R5),
tcp->u_arg[argnum]);
else if (argnum < 6)
/* r3 */
ptrace(PTRACE_POKEUSER, tcp->pid,
(char *)(REG_R3),
tcp->u_arg[argnum]);
else
return -E2BIG;
if (errno)
return -1;
}
#elif defined(IA64)
{
unsigned long *bsp, *ap;
if (upeek(tcp, PT_AR_BSP, (long *) &bsp) , 0)
return -1;
ap = ia64_rse_skip_regs(bsp, argnum);
errno = 0;
ptrace(PTRACE_POKEDATA, tcp->pid, (char *) ap, tcp->u_arg[argnum]);
if (errno)
return -1;
}
#elif defined(I386)
{
ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*argnum), tcp->u_arg[argnum]);
if (errno)
return -1;
}
#elif defined(X86_64)
{
ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(8*(long)argnum), tcp->u_arg[argnum]);
if (errno)
return -1;
}
#elif defined(POWERPC)
#ifndef PT_ORIG_R3
#define PT_ORIG_R3 34
#endif
{
ptrace(PTRACE_POKEUSER, tcp->pid,
(char*)((argnum==0 ? PT_ORIG_R3 : argnum+PT_R3)*sizeof(unsigned long)),
tcp->u_arg[argnum]);
if (errno)
return -1;
}
#elif defined(MIPS)
{
errno = 0;
if (argnum < 4)
ptrace(PTRACE_POKEUSER, tcp->pid,
(char*)(REG_A0 + argnum), tcp->u_arg[argnum]);
else {
unsigned long *sp;
if (upeek(tcp, REG_SP, (long *) &sp) , 0)
return -1;
ptrace(PTRACE_POKEDATA, tcp->pid,
(char*)(sp + argnum - 4), tcp->u_arg[argnum]);
}
if (errno)
return -1;
}
#elif defined(S390) || defined(S390X)
{
if(argnum <= 5)
ptrace(PTRACE_POKEUSER, tcp->pid,
(char *) (argnum==0 ? PT_ORIGGPR2 :
PT_GPR2 + argnum*sizeof(long)),
tcp->u_arg[argnum]);
else
return -E2BIG;
if (errno)
return -1;
}
#else
# warning Sorry, setargs not implemented for this architecture.
#endif
return 0;
}
#endif
#if defined SYS_clone || defined SYS_clone2
int
internal_clone(tcp)
struct tcb *tcp;
{
struct tcb *tcpchild;
int pid;
if (entering(tcp)) {
if (!followfork)
return 0;
@ -910,11 +798,15 @@ struct tcb *tcp;
if (setbpt(tcp) < 0)
return 0;
} else {
int bpt = tcp->flags & TCB_BPTSET;
struct tcb *tcpchild;
int pid;
int bpt;
if (!(tcp->flags & TCB_FOLLOWFORK))
return 0;
bpt = tcp->flags & TCB_BPTSET;
if (syserror(tcp)) {
if (bpt)
clearbpt(tcp);
@ -936,7 +828,7 @@ struct tcb *tcp;
pid, tcp->pid);
}
else
#endif
#endif /* CLONE_PTRACE */
{
fork_tcb(tcp);
tcpchild = alloctcb(pid);
@ -952,7 +844,7 @@ struct tcb *tcp;
droptcb(tcpchild);
return 0;
}
#endif
#endif /* !CLONE_PTRACE */
if (bpt)
clearbpt(tcp);
@ -1020,21 +912,17 @@ Process %u resumed (parent %d ready)\n",
++tcp->nclone_detached;
}
}
#endif
#endif /* TCB_CLONE_THREAD */
}
return 0;
}
#endif
#else /* !LINUX */
int
internal_fork(tcp)
struct tcb *tcp;
{
#ifdef LINUX
/* We do special magic with clone for any clone or fork. */
return internal_clone(tcp);
#else
struct tcb *tcpchild;
int pid;
int dont_follow = 0;
@ -1067,32 +955,6 @@ struct tcb *tcp;
pid = tcp->u_rval;
fork_tcb(tcp);
tcpchild = alloctcb(pid);
#ifdef LINUX
#ifdef HPPA
/* The child must have run before it can be attached. */
/* This must be a bug in the parisc kernel, but I havn't
* identified it yet. Seems to be an issue associated
* with attaching to a process (which sends it a signal)
* before that process has ever been scheduled. When
* debugging, I started seeing crashes in
* arch/parisc/kernel/signal.c:do_signal(), apparently
* caused by r8 getting corrupt over the dequeue_signal()
* call. Didn't make much sense though...
*/
{
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 10000;
select(0, NULL, NULL, NULL, &tv);
}
#endif
if (ptrace(PTRACE_ATTACH, pid, (char *) 1, 0) < 0) {
perror("PTRACE_ATTACH");
fprintf(stderr, "Too late?\n");
droptcb(tcpchild);
return 0;
}
#endif /* LINUX */
#ifdef SUNOS4
#ifdef oldway
/* The child must have run before it can be attached. */
@ -1138,9 +1000,10 @@ struct tcb *tcp;
fprintf(stderr, "Process %d attached\n", pid);
}
return 0;
#endif
}
#endif /* !LINUX */
#endif /* !USE_PROCFS */
#if defined(SUNOS4) || defined(LINUX) || defined(FREEBSD)
@ -1753,7 +1616,7 @@ struct tcb *tcp;
return 0;
}
#endif
#endif /* UNIXWARE */
static void
@ -1805,17 +1668,12 @@ long addr;
#if defined(SPARC) || defined(SPARC64) || defined(SUNOS4)
int
sys_execv(tcp)
struct tcb *tcp;
sys_execv(struct tcb *tcp)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
if (!verbose(tcp))
tprintf(", %#lx", tcp->u_arg[1]);
#if 0
else if (abbrev(tcp))
printargc(", [/* %d arg%s */]", tcp, tcp->u_arg[1]);
#endif
else {
tprintf(", [");
printargv(tcp, tcp->u_arg[1]);
@ -1827,17 +1685,12 @@ struct tcb *tcp;
#endif /* SPARC || SPARC64 || SUNOS4 */
int
sys_execve(tcp)
struct tcb *tcp;
sys_execve(struct tcb *tcp)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
if (!verbose(tcp))
tprintf(", %#lx", tcp->u_arg[1]);
#if 0
else if (abbrev(tcp))
printargc(", [/* %d arg%s */]", tcp, tcp->u_arg[1]);
#endif
else {
tprintf(", [");
printargv(tcp, tcp->u_arg[1]);
@ -1935,8 +1788,12 @@ static const struct xlat wait4_options[] = {
# define WCOREFLAG WCOREFLG
#endif
#ifndef WCOREFLAG
#define WCOREFLAG 0x80
# define WCOREFLAG 0x80
#endif
#ifndef WCOREDUMP
# define WCOREDUMP(status) ((status) & 0200)
#endif
#ifndef W_STOPCODE
#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
@ -2763,12 +2620,6 @@ const struct xlat struct_user_offsets[] = {
{ 8*RDX, "8*RDX" },
{ 8*RSI, "8*RSI" },
{ 8*RDI, "8*RDI" },
# if 0
{ DS, "DS" },
{ ES, "ES" },
{ FS, "FS" },
{ GS, "GS" },
# endif
{ 8*ORIG_RAX, "8*ORIG_RAX" },
{ 8*RIP, "8*RIP" },
{ 8*CS, "8*CS" },
@ -3109,6 +2960,68 @@ const struct xlat struct_user_offsets[] = {
{ 68, "mmlo" },
{ 69, "fpcsr" },
{ 70, "fpeir" },
# elif defined(TILE)
{ PTREGS_OFFSET_REG(0), "r0" },
{ PTREGS_OFFSET_REG(1), "r1" },
{ PTREGS_OFFSET_REG(2), "r2" },
{ PTREGS_OFFSET_REG(3), "r3" },
{ PTREGS_OFFSET_REG(4), "r4" },
{ PTREGS_OFFSET_REG(5), "r5" },
{ PTREGS_OFFSET_REG(6), "r6" },
{ PTREGS_OFFSET_REG(7), "r7" },
{ PTREGS_OFFSET_REG(8), "r8" },
{ PTREGS_OFFSET_REG(9), "r9" },
{ PTREGS_OFFSET_REG(10), "r10" },
{ PTREGS_OFFSET_REG(11), "r11" },
{ PTREGS_OFFSET_REG(12), "r12" },
{ PTREGS_OFFSET_REG(13), "r13" },
{ PTREGS_OFFSET_REG(14), "r14" },
{ PTREGS_OFFSET_REG(15), "r15" },
{ PTREGS_OFFSET_REG(16), "r16" },
{ PTREGS_OFFSET_REG(17), "r17" },
{ PTREGS_OFFSET_REG(18), "r18" },
{ PTREGS_OFFSET_REG(19), "r19" },
{ PTREGS_OFFSET_REG(20), "r20" },
{ PTREGS_OFFSET_REG(21), "r21" },
{ PTREGS_OFFSET_REG(22), "r22" },
{ PTREGS_OFFSET_REG(23), "r23" },
{ PTREGS_OFFSET_REG(24), "r24" },
{ PTREGS_OFFSET_REG(25), "r25" },
{ PTREGS_OFFSET_REG(26), "r26" },
{ PTREGS_OFFSET_REG(27), "r27" },
{ PTREGS_OFFSET_REG(28), "r28" },
{ PTREGS_OFFSET_REG(29), "r29" },
{ PTREGS_OFFSET_REG(30), "r30" },
{ PTREGS_OFFSET_REG(31), "r31" },
{ PTREGS_OFFSET_REG(32), "r32" },
{ PTREGS_OFFSET_REG(33), "r33" },
{ PTREGS_OFFSET_REG(34), "r34" },
{ PTREGS_OFFSET_REG(35), "r35" },
{ PTREGS_OFFSET_REG(36), "r36" },
{ PTREGS_OFFSET_REG(37), "r37" },
{ PTREGS_OFFSET_REG(38), "r38" },
{ PTREGS_OFFSET_REG(39), "r39" },
{ PTREGS_OFFSET_REG(40), "r40" },
{ PTREGS_OFFSET_REG(41), "r41" },
{ PTREGS_OFFSET_REG(42), "r42" },
{ PTREGS_OFFSET_REG(43), "r43" },
{ PTREGS_OFFSET_REG(44), "r44" },
{ PTREGS_OFFSET_REG(45), "r45" },
{ PTREGS_OFFSET_REG(46), "r46" },
{ PTREGS_OFFSET_REG(47), "r47" },
{ PTREGS_OFFSET_REG(48), "r48" },
{ PTREGS_OFFSET_REG(49), "r49" },
{ PTREGS_OFFSET_REG(50), "r50" },
{ PTREGS_OFFSET_REG(51), "r51" },
{ PTREGS_OFFSET_REG(52), "r52" },
{ PTREGS_OFFSET_TP, "tp" },
{ PTREGS_OFFSET_SP, "sp" },
{ PTREGS_OFFSET_LR, "lr" },
{ PTREGS_OFFSET_PC, "pc" },
{ PTREGS_OFFSET_EX1, "ex1" },
{ PTREGS_OFFSET_FAULTNUM, "faultnum" },
{ PTREGS_OFFSET_ORIG_R0, "orig_r0" },
{ PTREGS_OFFSET_FLAGS, "flags" },
# endif
# ifdef CRISV10
{ 4*PT_FRAMETYPE, "4*PT_FRAMETYPE" },
@ -3183,7 +3096,7 @@ const struct xlat struct_user_offsets[] = {
# if !defined(SPARC) && !defined(HPPA) && !defined(POWERPC) \
&& !defined(ALPHA) && !defined(IA64) \
&& !defined(CRISV10) && !defined(CRISV32)
# if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) && !defined(BFIN)
# if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) && !defined(BFIN) && !defined(TILE)
{ uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" },
# endif
# if defined(I386) || defined(X86_64)
@ -3205,13 +3118,13 @@ const struct xlat struct_user_offsets[] = {
{ uoff(start_stack), "offsetof(struct user, start_stack)" },
# endif
{ uoff(signal), "offsetof(struct user, signal)" },
# if !defined(AVR32) && !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64)
# if !defined(AVR32) && !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(TILE)
{ uoff(reserved), "offsetof(struct user, reserved)" },
# endif
# if !defined(SPARC64)
{ uoff(u_ar0), "offsetof(struct user, u_ar0)" },
# endif
# if !defined(ARM) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN)
# if !defined(ARM) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) && !defined(TILE)
{ uoff(u_fpstate), "offsetof(struct user, u_fpstate)" },
# endif
{ uoff(magic), "offsetof(struct user, magic)" },
@ -3546,16 +3459,32 @@ static void
print_affinitylist(struct tcb *tcp, long list, unsigned int len)
{
int first = 1;
tprintf(" {");
while (len >= sizeof (unsigned long)) {
unsigned long w;
umove(tcp, list, &w);
tprintf("%s %lx", first ? "" : ",", w);
unsigned long w, min_len;
if (abbrev(tcp) && len / sizeof(w) > max_strlen)
min_len = len - max_strlen * sizeof(w);
else
min_len = 0;
for (; len >= sizeof(w) && len > min_len;
len -= sizeof(w), list += sizeof(w)) {
if (umove(tcp, list, &w) < 0)
break;
if (first)
tprintf("{");
else
tprintf(", ");
first = 0;
len -= sizeof (unsigned long);
list += sizeof(unsigned long);
tprintf("%lx", w);
}
if (len) {
if (first)
tprintf("%#lx", list);
else
tprintf(", %s}", (len >= sizeof(w) && len > min_len ?
"???" : "..."));
} else {
tprintf(first ? "{}" : "}");
}
tprintf(" }");
}
int

View File

@ -229,6 +229,9 @@ static const struct xlat sigact_flags[] = {
#endif
#ifdef _SA_BSDCALL
{ _SA_BSDCALL, "_SA_BSDCALL" },
#endif
#ifdef SA_NOPTRACE
{ SA_NOPTRACE, "SA_NOPTRACE" },
#endif
{ 0, NULL },
};
@ -1326,6 +1329,12 @@ sys_sigreturn(struct tcb *tcp)
tcp->u_arg[0] = 0;
if (upeek(tcp, sizeof(unsigned long)*PT_R1, &esp) < 0)
return 0;
/* Skip dummy stack frame. */
#ifdef __powerpc64__
esp += 128;
#else
esp += 64;
#endif
if (umove(tcp, esp, &sc) < 0)
return 0;
tcp->u_arg[0] = 1;
@ -1493,6 +1502,33 @@ sys_sigreturn(struct tcb *tcp)
return RVAL_NONE | RVAL_STR;
}
return 0;
#elif defined(TILE)
struct ucontext uc;
long sp;
/* offset of ucontext in the kernel's sigframe structure */
# define SIGFRAME_UC_OFFSET C_ABI_SAVE_AREA_SIZE + sizeof(struct siginfo)
if (entering(tcp)) {
tcp->u_arg[0] = 0;
if (upeek(tcp, PTREGS_OFFSET_SP, &sp) < 0)
return 0;
if (umove(tcp, sp + SIGFRAME_UC_OFFSET, &uc) < 0)
return 0;
tcp->u_arg[0] = 1;
memcpy(tcp->u_arg + 1, &uc.uc_sigmask, sizeof(uc.uc_sigmask));
}
else {
sigset_t sigm;
memcpy(&sigm, tcp->u_arg + 1, sizeof (sigm));
tcp->u_rval = tcp->u_error = 0;
if (tcp->u_arg[0] == 0)
return 0;
tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
return RVAL_NONE | RVAL_STR;
}
return 0;
#else
#warning No sys_sigreturn() for this architecture
#warning (no problem, just a reminder :-)
@ -1513,17 +1549,11 @@ struct tcb *tcp;
}
int
sys_sigsuspend(tcp)
struct tcb *tcp;
sys_sigsuspend(struct tcb *tcp)
{
if (entering(tcp)) {
sigset_t sigm;
long_to_sigset(tcp->u_arg[2], &sigm);
#if 0
/* first two are not really arguments, but print them anyway */
/* nevermind, they are an anachronism now, too bad... */
tprintf("%d, %#x, ", tcp->u_arg[0], tcp->u_arg[1]);
#endif
printsigmask(&sigm, 0);
}
return 0;

8
sock.c
View File

@ -258,8 +258,12 @@ sock_ioctl(struct tcb *tcp, long code, long arg)
int i;
unsigned nifra = ifc.ifc_len / sizeof(struct ifreq);
struct ifreq ifra[nifra];
umoven(tcp, (unsigned long) ifc.ifc_buf, sizeof(ifra),
(char *) ifra);
if (umoven(tcp, (unsigned long) ifc.ifc_buf,
sizeof(ifra), (char *) ifra) < 0) {
tprintf("%lx}", (unsigned long) ifc.ifc_buf);
return 1;
}
tprintf("{");
for (i = 0; i < nifra; ++i ) {
if (i > 0)

113
strace.1
View File

@ -37,13 +37,13 @@
.fi
.sp
..
.TH STRACE 1 "2003-01-21"
.TH STRACE 1 "2010-03-30"
.SH NAME
strace \- trace system calls and signals
.SH SYNOPSIS
.B strace
[
.B \-dffhiqrtttTvxx
.B \-CdffhiqrtttTvxx
]
[
.BI \-a column
@ -151,8 +151,10 @@ If a system call is being executed and meanwhile another one is being called
from a different thread/process then
.B strace
will try to preserve the order of those events and mark the ongoing call as
being \fIunfinished\fP. When the call returns it will be marked as
\fIresumed\fP.
being
.IR unfinished .
When the call returns it will be marked as
.IR resumed .
.CW
[pid 28772] select(4, [3], NULL, NULL, NULL <unfinished ...>
[pid 28779] clock_gettime(CLOCK_REALTIME, {1130322148, 939977000}) = 0
@ -240,8 +242,18 @@ Here the second argument represents the full set of all signals.
.B \-c
Count time, calls, and errors for each system call and report a summary on
program exit. On Linux, this attempts to show system time (CPU time spent
running in the kernel) independent of wall clock time. If -c is used with
-f or -F (below), only aggregate totals for all traced processes are kept.
running in the kernel) independent of wall clock time. If
.B \-c
is used with
.B \-f
or
.B \-F
(below), only aggregate totals for all traced processes are kept.
.TP
.B \-C
Like
.B \-c
but also print regular output while processes are running.
.TP
.B \-d
Show some debugging output of
@ -281,11 +293,13 @@ If the
option is in effect, each processes trace is written to
.I filename.pid
where pid is the numeric process id of each process.
This is incompatible with -c, since no per-process counts are kept.
This is incompatible with
.BR \-c ,
since no per-process counts are kept.
.TP
.B \-F
This option is now obsolete and it has the same functionality as
.BR -f .
.BR \-f .
.TP
.B \-h
Print the help summary.
@ -362,13 +376,13 @@ is a qualifier-dependent symbol or number. The default
qualifier is
.BR trace .
Using an exclamation mark negates the set of values. For example,
.B \-eopen
.BR \-e "\ " open
means literally
.B "\-e trace=open"
.BR \-e "\ " trace = open
which in turn means trace only the
.B open
system call. By contrast,
.B "\-etrace=!open"
.BR \-e "\ " trace "=!" open
means to trace every system call except
.BR open .
In addition, the special values
@ -381,93 +395,101 @@ Note that some shells use the exclamation point for history
expansion even inside quoted arguments. If so, you must escape
the exclamation point with a backslash.
.TP
.BI "\-e trace=" set
\fB\-e\ trace\fR=\fIset\fR
Trace only the specified set of system calls. The
.B \-c
option is useful for determining which system calls might be useful
to trace. For example,
.B trace=open,close,read,write
.BR trace = open,close,read,write
means to only
trace those four system calls. Be careful when making inferences
about the user/kernel boundary if only a subset of system calls
are being monitored. The default is
.BR trace=all .
.BR trace = all .
.TP
.B "\-e trace=file"
\fB\-e\ trace\fR=\fIfile\fR
Trace all system calls which take a file name as an argument. You
can think of this as an abbreviation for
.BR "\-e\ trace=open,stat,chmod,unlink," ...
.BR "\-e\ trace" = open , stat , chmod , unlink ,...
which is useful to seeing what files the process is referencing.
Furthermore, using the abbreviation will ensure that you don't
accidentally forget to include a call like
.B lstat
in the list. Betchya woulda forgot that one.
.TP
.B "\-e trace=process"
\fB\-e\ trace\fR=\fIprocess\fR
Trace all system calls which involve process management. This
is useful for watching the fork, wait, and exec steps of a process.
.TP
.B "\-e trace=network"
\fB\-e\ trace\fR=\fInetwork\fR
Trace all the network related system calls.
.TP
.B "\-e trace=signal"
\fB\-e\ trace\fR=\fIsignal\fR
Trace all signal related system calls.
.TP
.B "\-e trace=ipc"
\fB\-e\ trace\fR=\fIipc\fR
Trace all IPC related system calls.
.TP
.B "\-e trace=desc"
\fB\-e\ trace\fR=\fIdesc\fR
Trace all file descriptor related system calls.
.TP
.BI "\-e abbrev=" set
\fB\-e\ abbrev\fR=\fIset\fR
Abbreviate the output from printing each member of large structures.
The default is
.BR abbrev=all .
.BR abbrev = all .
The
.B \-v
option has the effect of
.BR abbrev=none .
.BR abbrev = none .
.TP
.BI "\-e verbose=" set
\fB\-e\ verbose\fR=\fIset\fR
Dereference structures for the specified set of system calls. The
default is
.BR verbose=all .
.BR verbose = all .
.TP
.BI "\-e raw=" set
\fB\-e\ raw\fR=\fIset\fR
Print raw, undecoded arguments for the specified set of system calls.
This option has the effect of causing all arguments to be printed
in hexadecimal. This is mostly useful if you don't trust the
decoding or you need to know the actual numeric value of an
argument.
.TP
.BI "\-e signal=" set
\fB\-e\ signal\fR=\fIset\fR
Trace only the specified subset of signals. The default is
.BR signal=all .
.BR signal = all .
For example,
.B signal=!SIGIO
.B signal "=!" SIGIO
(or
.BR signal=!io )
.BR signal "=!" io )
causes SIGIO signals not to be traced.
.TP
.BI "\-e read=" set
\fB\-e\ read\fR=\fIset\fR
Perform a full hexadecimal and ASCII dump of all the data read from
file descriptors listed in the specified set. For example, to see
all input activity on file descriptors 3 and 5 use
.BR "\-e read=3,5" .
all input activity on file descriptors
.I 3
and
.I 5
use
\fB\-e\ read\fR=\fI3\fR,\fI5\fR.
Note that this is independent from the normal tracing of the
.BR read (2)
system call which is controlled by the option
.BR "\-e trace=read" .
.BR -e "\ " trace = read .
.TP
.BI "\-e write=" set
\fB\-e\ write\fR=\fIset\fR
Perform a full hexadecimal and ASCII dump of all the data written to
file descriptors listed in the specified set. For example, to see
all output activity on file descriptors 3 and 5 use
.BR "\-e write=3,5" .
all output activity on file descriptors
.I 3
and
.I 5
use
\fB\-e\ write\fR=\fI3\fR,\fI5\fR.
Note that this is independent from the normal tracing of the
.BR write (2)
system call which is controlled by the option
.BR "\-e trace=write" .
.BR -e "\ " trace = write .
.TP
.BI "\-o " filename
Write the trace output to the file
@ -531,7 +553,7 @@ option by the specified criterion. Legal values are
.BR name ,
and
.B nothing
(default
(default is
.BR time ).
.TP
.BI "\-u " username
@ -543,9 +565,9 @@ correct execution of setuid and/or setgid binaries.
Unless this option is used setuid and setgid programs are executed
without effective privileges.
.TP
.BI "\-E " var=val
\fB\-E\ \fIvar\fR=\fIval\fR
Run command with
.IR var=val
.IR var = val
in its list of environment variables.
.TP
.BI "\-E " var
@ -568,7 +590,7 @@ terminates itself with the same signal, so that
can be used as a wrapper process transparent to the invoking parent process.
.LP
When using
.BR -p ,
.BR \-p ,
the exit status of
.B strace
is zero unless there was an unexpected error in doing the tracing.
@ -697,11 +719,12 @@ The SIGTRAP signal is used internally by the kernel implementation of
system call tracing. When a traced process receives a SIGTRAP signal not
associated with tracing, strace will not report that signal correctly.
This signal is not normally used by programs, but could be via a hard-coded
break instruction or via kill(2).
break instruction or via
.BR kill (2).
.SH PROBLEMS
Problems with
.B strace
should be reported via the Debian Bug Tracking System,
or to the
.B strace
mailing list at <strace-devel@lists.sourceforge.net>.
mailing list at <strace\-devel@lists.sourceforge.net>.

107
strace.c
View File

@ -83,7 +83,8 @@ extern char *optarg;
int debug = 0, followfork = 0;
int dtime = 0, cflag = 0, xflag = 0, qflag = 0;
int dtime = 0, xflag = 0, qflag = 0;
cflag_t cflag = CFLAG_NONE;
static int iflag = 0, interactive = 0, pflag_seen = 0, rflag = 0, tflag = 0;
/*
* daemonized_tracer supports -D option.
@ -113,38 +114,35 @@ int acolumn = DEFAULT_ACOLUMN;
int max_strlen = DEFAULT_STRLEN;
static char *outfname = NULL;
FILE *outf;
static int curcol;
struct tcb **tcbtab;
unsigned int nprocs, tcbtabsize;
char *progname;
extern char **environ;
static int detach P((struct tcb *tcp, int sig));
static int trace P((void));
static void cleanup P((void));
static void interrupt P((int sig));
static int detach(struct tcb *tcp, int sig);
static int trace(void);
static void cleanup(void);
static void interrupt(int sig);
static sigset_t empty_set, blocked_set;
#ifdef HAVE_SIG_ATOMIC_T
static volatile sig_atomic_t interrupted;
#else /* !HAVE_SIG_ATOMIC_T */
#ifdef __STDC__
static volatile int interrupted;
#else /* !__STDC__ */
static int interrupted;
#endif /* !__STDC__ */
#endif /* !HAVE_SIG_ATOMIC_T */
#ifdef USE_PROCFS
static struct tcb *pfd2tcb P((int pfd));
static void reaper P((int sig));
static void rebuild_pollv P((void));
static struct tcb *pfd2tcb(int pfd);
static void reaper(int sig);
static void rebuild_pollv(void);
static struct pollfd *pollv;
#ifndef HAVE_POLLABLE_PROCFS
static void proc_poll_open P((void));
static void proc_poller P((int pfd));
static void proc_poll_open(void);
static void proc_poller(int pfd);
struct proc_pollfd {
int fd;
@ -722,15 +720,27 @@ main(int argc, char *argv[])
qualify("verbose=all");
qualify("signal=all");
while ((c = getopt(argc, argv,
"+cdfFhiqrtTvVxz"
"+cCdfFhiqrtTvVxz"
#ifndef USE_PROCFS
"D"
#endif
"a:e:o:O:p:s:S:u:E:")) != EOF) {
switch (c) {
case 'c':
cflag++;
dtime++;
if (cflag == CFLAG_BOTH) {
fprintf(stderr, "%s: -c and -C are mutually exclusive options\n",
progname);
exit(1);
}
cflag = CFLAG_ONLY_STATS;
break;
case 'C':
if (cflag == CFLAG_ONLY_STATS) {
fprintf(stderr, "%s: -c and -C are mutually exclusive options\n",
progname);
exit(1);
}
cflag = CFLAG_BOTH;
break;
case 'd':
debug++;
@ -841,7 +851,7 @@ main(int argc, char *argv[])
if (followfork > 1 && cflag) {
fprintf(stderr,
"%s: -c and -ff are mutually exclusive options\n",
"%s: (-c or -C) and -ff are mutually exclusive options\n",
progname);
exit(1);
}
@ -1016,6 +1026,7 @@ alloc_tcb(int pid, int command_options_parsed)
#endif
tcp->flags = TCB_INUSE | TCB_STARTUP;
tcp->outf = outf; /* Initialise to current out file */
tcp->curcol = 0;
tcp->stime.tv_sec = 0;
tcp->stime.tv_usec = 0;
tcp->pfd = -1;
@ -1542,7 +1553,7 @@ int sig;
#endif
if (tcp->flags & TCB_BPTSET)
sig = SIGKILL;
clearbpt(tcp);
#ifdef LINUX
/*
@ -1657,21 +1668,12 @@ int sig;
#ifdef USE_PROCFS
static void
reaper(sig)
int sig;
static void reaper(int sig)
{
int pid;
int status;
while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
#if 0
struct tcb *tcp;
tcp = pid2tcb(pid);
if (tcp)
droptcb(tcp);
#endif
}
}
@ -2109,6 +2111,7 @@ trace()
/* set current output file */
outf = tcp->outf;
curcol = tcp->curcol;
if (cflag) {
struct timeval stime;
@ -2154,7 +2157,8 @@ trace()
}
break;
case PR_SIGNALLED:
if (!cflag && (qual_flags[what] & QUAL_SIGNAL)) {
if (cflag != CFLAG_ONLY_STATS
&& (qual_flags[what] & QUAL_SIGNAL)) {
printleader(tcp);
tprintf("--- %s (%s) ---",
signame(what), strsignal(what));
@ -2170,7 +2174,8 @@ trace()
}
break;
case PR_FAULTED:
if (!cflag && (qual_flags[what] & QUAL_FAULT)) {
if (cflag != CFLAGS_ONLY_STATS
&& (qual_flags[what] & QUAL_FAULT)) {
printleader(tcp);
tprintf("=== FAULT %d ===", what);
printtrailer();
@ -2185,6 +2190,8 @@ trace()
exit(1);
break;
}
/* Remember current print column before continuing. */
tcp->curcol = curcol;
arg = 0;
#ifndef FREEBSD
if (IOCTL (tcp->pfd, PIOCRUN, &arg) < 0) {
@ -2321,12 +2328,6 @@ trace()
* version of SunOS sometimes reports
* ECHILD before sending us SIGCHILD.
*/
#if 0
if (nprocs == 0)
return 0;
fprintf(stderr, "strace: proc miscount\n");
exit(1);
#endif
return 0;
default:
errno = wait_errno;
@ -2375,6 +2376,7 @@ Process %d attached (waiting for parent)\n",
}
/* set current output file */
outf = tcp->outf;
curcol = tcp->curcol;
if (cflag) {
#ifdef LINUX
tv_sub(&tcp->dtime, &ru.ru_stime, &tcp->stime);
@ -2396,7 +2398,7 @@ Process %d attached (waiting for parent)\n",
if (WIFSIGNALED(status)) {
if (pid == strace_child)
exit_code = 0x100 | WTERMSIG(status);
if (!cflag
if (cflag != CFLAG_ONLY_STATS
&& (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL)) {
printleader(tcp);
tprintf("+++ killed by %s %s+++",
@ -2495,7 +2497,7 @@ Process %d attached (waiting for parent)\n",
}
continue;
}
if (!cflag
if (cflag != CFLAG_ONLY_STATS
&& (qual_flags[WSTOPSIG(status)] & QUAL_SIGNAL)) {
unsigned long addr = 0;
long pc = 0;
@ -2593,6 +2595,8 @@ Process %d attached (waiting for parent)\n",
continue;
}
tracing:
/* Remember current print column before continuing. */
tcp->curcol = curcol;
if (ptrace_restart(PTRACE_SYSCALL, tcp, 0) < 0) {
cleanup();
return -1;
@ -2603,34 +2607,21 @@ Process %d attached (waiting for parent)\n",
#endif /* !USE_PROCFS */
static int curcol;
#ifdef __STDC__
#include <stdarg.h>
#define VA_START(a, b) va_start(a, b)
#else
#include <varargs.h>
#define VA_START(a, b) va_start(a)
#endif
void
#ifdef __STDC__
tprintf(const char *fmt, ...)
#else
tprintf(fmt, va_alist)
char *fmt;
va_dcl
#endif
{
va_list args;
VA_START(args, fmt);
va_start(args, fmt);
if (outf) {
int n = vfprintf(outf, fmt, args);
if (n < 0 && outf != stderr)
perror(outfname == NULL
? "<writing to pipe>" : outfname);
else
if (n < 0) {
if (outf != stderr)
perror(outfname == NULL
? "<writing to pipe>" : outfname);
} else
curcol += n;
}
va_end(args);

View File

@ -1,6 +1,6 @@
Summary: Tracks and displays system calls associated with a running process
Name: strace
Version: 4.5.19
Version: 4.5.20
Release: 1%{?dist}
License: BSD
Group: Development/Debuggers
@ -82,6 +82,11 @@ rm -rf %{buildroot}
%endif
%changelog
* Tue Apr 13 2010 Roland McGrath <roland@redhat.com> - 4.5.20-1
- New upstream release, work mostly by Andreas Schwab and Dmitry V. Levin.
+ fixed potential stack buffer overflow in select decoder (#556678);
+ fixed FTBFS (#539044).
* Wed Oct 21 2009 Roland McGrath <roland@redhat.com> - 4.5.19-1
- New upstream release, work mostly by Dmitry V. Levin <ldv@altlinux.org>
+ exit/kill strace with traced process exitcode/signal (#105371);

View File

@ -1033,10 +1033,7 @@ int len;
#endif /* TI_BIND */
static int
internal_stream_ioctl(tcp, arg)
struct tcb *tcp;
int arg;
static int internal_stream_ioctl(struct tcb *tcp, int arg)
{
struct strioctl si;
struct ioctlent *iop;
@ -1151,9 +1148,6 @@ int arg;
case SI_GETUDATA:
if (entering(tcp))
break;
#if 0
tprintf("struct si_udata ");
#endif
if (umove(tcp, (int) si.ic_dp, &udata) < 0)
tprintf("{...}");
else {
@ -1164,9 +1158,6 @@ int arg;
tprintf("servtype=%d, so_state=%d, ",
udata.servtype, udata.so_state);
tprintf("so_options=%d", udata.so_options);
#if 0
tprintf(", tsdusize=%d", udata.tsdusize);
#endif
tprintf("}");
}
break;

384
syscall.c
View File

@ -679,17 +679,15 @@ internal_syscall(struct tcb *tcp)
#if defined(FREEBSD) || defined(LINUX) || defined(SUNOS4)
|| sys_vfork == func
#endif
#ifdef LINUX
|| sys_clone == func
#endif
#if UNIXWARE > 2
|| sys_rfork == func
#endif
)
return internal_fork(tcp);
#if defined(LINUX) && (defined SYS_clone || defined SYS_clone2)
if (sys_clone == func)
return internal_clone(tcp);
#endif
if ( sys_execve == func
#if defined(SPARC) || defined(SPARC64) || defined(SUNOS4)
|| sys_execv == func
@ -1283,6 +1281,17 @@ get_scno(struct tcb *tcp)
# elif defined(CRISV10) || defined(CRISV32)
if (upeek(tcp, 4*PT_R9, &scno) < 0)
return -1;
# elif defined(TILE)
if (upeek(tcp, PTREGS_OFFSET_REG(10), &scno) < 0)
return -1;
if (!(tcp->flags & TCB_INSYSCALL)) {
/* Check if we return from execve. */
if (tcp->flags & TCB_WAITEXECVE) {
tcp->flags &= ~TCB_WAITEXECVE;
return 0;
}
}
# endif
#endif /* LINUX */
@ -1688,6 +1697,19 @@ get_error(struct tcb *tcp)
tcp->u_rval = r10;
u_error = 0;
}
# elif defined(TILE)
long rval;
/* interpret result as return value or error number */
if (upeek(tcp, PTREGS_OFFSET_REG(0), &rval) < 0)
return -1;
if (rval < 0 && rval > -nerrnos) {
tcp->u_rval = -1;
u_error = -rval;
}
else {
tcp->u_rval = rval;
u_error = 0;
}
# endif
#endif /* LINUX */
#ifdef SUNOS4
@ -2035,7 +2057,7 @@ syscall_enter(struct tcb *tcp)
else
nargs = tcp->u_nargs = MAX_ARGS;
if (ptrace (PTRACE_GETREGS, pid, NULL, (long) &regs) < 0)
if (ptrace (PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
return -1;
for(i = 0; i < nargs; i++) {
@ -2215,6 +2237,18 @@ syscall_enter(struct tcb *tcp)
return -1;
}
}
#elif defined(TILE)
{
int i;
if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
tcp->u_nargs = sysent[tcp->scno].nargs;
else
tcp->u_nargs = MAX_ARGS;
for (i = 0; i < tcp->u_nargs; ++i) {
if (upeek(tcp, PTREGS_OFFSET_REG(i), &tcp->u_arg[i]) < 0)
return -1;
}
}
#else /* Other architecture (like i386) (32bits specific) */
{
int i;
@ -2324,171 +2358,182 @@ syscall_enter(struct tcb *tcp)
return 1;
}
int
trace_syscall(struct tcb *tcp)
static int
trace_syscall_exiting(struct tcb *tcp)
{
int sys_res;
struct timeval tv;
int res, scno_good;
long u_error;
if (tcp->flags & TCB_INSYSCALL) {
long u_error;
/* Measure the exit time as early as possible to avoid errors. */
if (dtime || cflag)
gettimeofday(&tv, NULL);
/* Measure the exit time as early as possible to avoid errors. */
if (dtime)
gettimeofday(&tv, NULL);
/* BTW, why we don't just memorize syscall no. on entry
* in tcp->something?
*/
scno_good = res = get_scno(tcp);
if (res == 0)
return res;
if (res == 1)
res = syscall_fixup(tcp);
if (res == 0)
return res;
if (res == 1)
res = get_error(tcp);
if (res == 0)
return res;
if (res == 1)
internal_syscall(tcp);
/* BTW, why we don't just memorize syscall no. on entry
* in tcp->something?
*/
scno_good = res = get_scno(tcp);
if (res == 0)
return res;
if (res == 1)
res = syscall_fixup(tcp);
if (res == 0)
return res;
if (res == 1)
res = get_error(tcp);
if (res == 0)
return res;
if (res == 1)
internal_syscall(tcp);
if (res == 1 && tcp->scno >= 0 && tcp->scno < nsyscalls &&
!(qual_flags[tcp->scno] & QUAL_TRACE)) {
tcp->flags &= ~TCB_INSYSCALL;
return 0;
}
if (tcp->flags & TCB_REPRINT) {
printleader(tcp);
tprintf("<... ");
if (scno_good != 1)
tprintf("????");
else if (tcp->scno >= nsyscalls || tcp->scno < 0)
tprintf("syscall_%lu", tcp->scno);
else
tprintf("%s", sysent[tcp->scno].sys_name);
tprintf(" resumed> ");
}
if (cflag)
return count_syscall(tcp, &tv);
if (res != 1) {
tprintf(") ");
tabto(acolumn);
tprintf("= ? <unavailable>");
printtrailer();
tcp->flags &= ~TCB_INSYSCALL;
return res;
}
if (tcp->scno >= nsyscalls || tcp->scno < 0
|| (qual_flags[tcp->scno] & QUAL_RAW))
sys_res = printargs(tcp);
else {
if (not_failing_only && tcp->u_error)
return 0; /* ignore failed syscalls */
sys_res = (*sysent[tcp->scno].sys_func)(tcp);
}
u_error = tcp->u_error;
tprintf(") ");
tabto(acolumn);
if (tcp->scno >= nsyscalls || tcp->scno < 0 ||
qual_flags[tcp->scno] & QUAL_RAW) {
if (u_error)
tprintf("= -1 (errno %ld)", u_error);
else
tprintf("= %#lx", tcp->u_rval);
}
else if (!(sys_res & RVAL_NONE) && u_error) {
switch (u_error) {
#ifdef LINUX
case ERESTARTSYS:
tprintf("= ? ERESTARTSYS (To be restarted)");
break;
case ERESTARTNOINTR:
tprintf("= ? ERESTARTNOINTR (To be restarted)");
break;
case ERESTARTNOHAND:
tprintf("= ? ERESTARTNOHAND (To be restarted)");
break;
case ERESTART_RESTARTBLOCK:
tprintf("= ? ERESTART_RESTARTBLOCK (To be restarted)");
break;
#endif /* LINUX */
default:
tprintf("= -1 ");
if (u_error < 0)
tprintf("E??? (errno %ld)", u_error);
else if (u_error < nerrnos)
tprintf("%s (%s)", errnoent[u_error],
strerror(u_error));
else
tprintf("ERRNO_%ld (%s)", u_error,
strerror(u_error));
break;
}
if ((sys_res & RVAL_STR) && tcp->auxstr)
tprintf(" (%s)", tcp->auxstr);
}
else {
if (sys_res & RVAL_NONE)
tprintf("= ?");
else {
switch (sys_res & RVAL_MASK) {
case RVAL_HEX:
tprintf("= %#lx", tcp->u_rval);
break;
case RVAL_OCTAL:
tprintf("= %#lo", tcp->u_rval);
break;
case RVAL_UDECIMAL:
tprintf("= %lu", tcp->u_rval);
break;
case RVAL_DECIMAL:
tprintf("= %ld", tcp->u_rval);
break;
#ifdef HAVE_LONG_LONG
case RVAL_LHEX:
tprintf("= %#llx", tcp->u_lrval);
break;
case RVAL_LOCTAL:
tprintf("= %#llo", tcp->u_lrval);
break;
case RVAL_LUDECIMAL:
tprintf("= %llu", tcp->u_lrval);
break;
case RVAL_LDECIMAL:
tprintf("= %lld", tcp->u_lrval);
break;
#endif
default:
fprintf(stderr,
"invalid rval format\n");
break;
}
}
if ((sys_res & RVAL_STR) && tcp->auxstr)
tprintf(" (%s)", tcp->auxstr);
}
if (dtime) {
tv_sub(&tv, &tv, &tcp->etime);
tprintf(" <%ld.%06ld>",
(long) tv.tv_sec, (long) tv.tv_usec);
}
printtrailer();
dumpio(tcp);
if (fflush(tcp->outf) == EOF)
return -1;
if (res == 1 && tcp->scno >= 0 && tcp->scno < nsyscalls &&
!(qual_flags[tcp->scno] & QUAL_TRACE)) {
tcp->flags &= ~TCB_INSYSCALL;
return 0;
}
/* Entering system call */
if (tcp->flags & TCB_REPRINT) {
printleader(tcp);
tprintf("<... ");
if (scno_good != 1)
tprintf("????");
else if (tcp->scno >= nsyscalls || tcp->scno < 0)
tprintf("syscall_%lu", tcp->scno);
else
tprintf("%s", sysent[tcp->scno].sys_name);
tprintf(" resumed> ");
}
if (cflag) {
struct timeval t = tv;
int rc = count_syscall(tcp, &t);
if (cflag == CFLAG_ONLY_STATS)
{
tcp->flags &= ~TCB_INSYSCALL;
return rc;
}
}
if (res != 1) {
tprintf(") ");
tabto(acolumn);
tprintf("= ? <unavailable>");
printtrailer();
tcp->flags &= ~TCB_INSYSCALL;
return res;
}
if (tcp->scno >= nsyscalls || tcp->scno < 0
|| (qual_flags[tcp->scno] & QUAL_RAW))
sys_res = printargs(tcp);
else {
if (not_failing_only && tcp->u_error)
return 0; /* ignore failed syscalls */
sys_res = (*sysent[tcp->scno].sys_func)(tcp);
}
u_error = tcp->u_error;
tprintf(") ");
tabto(acolumn);
if (tcp->scno >= nsyscalls || tcp->scno < 0 ||
qual_flags[tcp->scno] & QUAL_RAW) {
if (u_error)
tprintf("= -1 (errno %ld)", u_error);
else
tprintf("= %#lx", tcp->u_rval);
}
else if (!(sys_res & RVAL_NONE) && u_error) {
switch (u_error) {
#ifdef LINUX
case ERESTARTSYS:
tprintf("= ? ERESTARTSYS (To be restarted)");
break;
case ERESTARTNOINTR:
tprintf("= ? ERESTARTNOINTR (To be restarted)");
break;
case ERESTARTNOHAND:
tprintf("= ? ERESTARTNOHAND (To be restarted)");
break;
case ERESTART_RESTARTBLOCK:
tprintf("= ? ERESTART_RESTARTBLOCK (To be restarted)");
break;
#endif /* LINUX */
default:
tprintf("= -1 ");
if (u_error < 0)
tprintf("E??? (errno %ld)", u_error);
else if (u_error < nerrnos)
tprintf("%s (%s)", errnoent[u_error],
strerror(u_error));
else
tprintf("ERRNO_%ld (%s)", u_error,
strerror(u_error));
break;
}
if ((sys_res & RVAL_STR) && tcp->auxstr)
tprintf(" (%s)", tcp->auxstr);
}
else {
if (sys_res & RVAL_NONE)
tprintf("= ?");
else {
switch (sys_res & RVAL_MASK) {
case RVAL_HEX:
tprintf("= %#lx", tcp->u_rval);
break;
case RVAL_OCTAL:
tprintf("= %#lo", tcp->u_rval);
break;
case RVAL_UDECIMAL:
tprintf("= %lu", tcp->u_rval);
break;
case RVAL_DECIMAL:
tprintf("= %ld", tcp->u_rval);
break;
#ifdef HAVE_LONG_LONG
case RVAL_LHEX:
tprintf("= %#llx", tcp->u_lrval);
break;
case RVAL_LOCTAL:
tprintf("= %#llo", tcp->u_lrval);
break;
case RVAL_LUDECIMAL:
tprintf("= %llu", tcp->u_lrval);
break;
case RVAL_LDECIMAL:
tprintf("= %lld", tcp->u_lrval);
break;
#endif
default:
fprintf(stderr,
"invalid rval format\n");
break;
}
}
if ((sys_res & RVAL_STR) && tcp->auxstr)
tprintf(" (%s)", tcp->auxstr);
}
if (dtime) {
tv_sub(&tv, &tv, &tcp->etime);
tprintf(" <%ld.%06ld>",
(long) tv.tv_sec, (long) tv.tv_usec);
}
printtrailer();
dumpio(tcp);
if (fflush(tcp->outf) == EOF)
return -1;
tcp->flags &= ~TCB_INSYSCALL;
return 0;
}
static int
trace_syscall_entering(struct tcb *tcp)
{
int sys_res;
int res, scno_good;
scno_good = res = get_scno(tcp);
if (res == 0)
return res;
@ -2557,12 +2602,6 @@ trace_syscall(struct tcb *tcp)
decode_subcall(tcp, SYS_semsys_subcall,
SYS_semsys_nsubcalls, shift_style);
break;
#if 0 /* broken */
case SYS_utssys:
decode_subcall(tcp, SYS_utssys_subcall,
SYS_utssys_nsubcalls, shift_style);
break;
#endif
case SYS_sysfs:
decode_subcall(tcp, SYS_sysfs_subcall,
SYS_sysfs_nsubcalls, shift_style);
@ -2619,9 +2658,9 @@ trace_syscall(struct tcb *tcp)
return 0;
}
if (cflag) {
gettimeofday(&tcp->etime, NULL);
if (cflag == CFLAG_ONLY_STATS) {
tcp->flags |= TCB_INSYSCALL;
gettimeofday(&tcp->etime, NULL);
return 0;
}
@ -2641,11 +2680,18 @@ trace_syscall(struct tcb *tcp)
return -1;
tcp->flags |= TCB_INSYSCALL;
/* Measure the entrance time as late as possible to avoid errors. */
if (dtime)
if (dtime || cflag)
gettimeofday(&tcp->etime, NULL);
return sys_res;
}
int
trace_syscall(struct tcb *tcp)
{
return exiting(tcp) ?
trace_syscall_exiting(tcp) : trace_syscall_entering(tcp);
}
int
printargs(tcp)
struct tcb *tcp;

13
term.c
View File

@ -178,10 +178,7 @@ static const struct xlat modem_flags[] = {
};
int
term_ioctl(tcp, code, arg)
struct tcb *tcp;
long code, arg;
int term_ioctl(struct tcb *tcp, long code, long arg)
{
struct termios tios;
#ifndef FREEBSD
@ -417,14 +414,6 @@ long code, arg;
printnum_int(tcp, arg, "%d");
return 1;
#if 0
/* ioctls with an indirect parameter displayed in hex */
tprintf(", ");
printnum(tcp, arg, "%#x");
return 1;
#endif
/* ioctls with an indirect parameter displayed as a char */
#ifdef TIOCSTI

596
util.c
View File

@ -93,18 +93,6 @@
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#if 0
void
tv_tv(tv, a, b)
struct timeval *tv;
int a;
int b;
{
tv->tv_sec = a;
tv->tv_usec = b;
}
#endif
int
tv_nz(a)
struct timeval *a;
@ -254,6 +242,42 @@ printxval(const struct xlat *xlat, int val, const char *dflt)
tprintf("%#x /* %s */", val, dflt);
}
#if HAVE_LONG_LONG
/*
* Print 64bit argument at position llarg and return the index of the next
* argument.
*/
int
printllval(struct tcb *tcp, const char *format, int llarg)
{
# if defined(FREEBSD) \
|| (defined(LINUX) && defined(POWERPC) && !defined(__powerpc64__)) \
|| defined (LINUX_MIPSO32)
/* Align 64bit argument to 64bit boundary. */
if (llarg % 2) llarg++;
# endif
# if defined LINUX && defined X86_64
if (current_personality == 0) {
tprintf(format, tcp->u_arg[llarg]);
llarg++;
} else {
tprintf(format, LONG_LONG(tcp->u_arg[llarg], tcp->u_arg[llarg + 1]));
llarg += 2;
}
# elif defined IA64 || defined ALPHA || (defined POWERPC && defined __powerpc64__)
tprintf(format, tcp->u_arg[llarg]);
llarg++;
# elif defined LINUX_MIPSN32
tprintf(format, tcp->ext_arg[llarg]);
llarg++;
# else
tprintf(format, LONG_LONG(tcp->u_arg[llarg], tcp->u_arg[llarg + 1]));
llarg += 2;
# endif
return llarg;
}
#endif
/*
* Interpret `xlat' as an array of flags
* print the entries whose bits are on in `flags'
@ -781,39 +805,6 @@ umoven(struct tcb *tcp, long addr, int len, char *laddr)
#ifdef SUNOS4
int pid = tcp->pid;
#if 0
int n, m;
union {
long val;
char x[sizeof(long)];
} u;
if (addr & (sizeof(long) - 1)) {
/* addr not a multiple of sizeof(long) */
n = addr - (addr & -sizeof(long)); /* residue */
addr &= -sizeof(long); /* residue */
errno = 0;
u.val = ptrace(PTRACE_PEEKDATA, pid, (char *) addr, 0);
if (errno) {
if (errno != ESRCH)
perror("umoven");
return -1;
}
memcpy(laddr, &u.x[n], m = MIN(sizeof(long) - n, len));
addr += sizeof(long), laddr += m, len -= m;
}
while (len) {
errno = 0;
u.val = ptrace(PTRACE_PEEKDATA, pid, (char *) addr, 0);
if (errno) {
if (errno != ESRCH)
perror("umoven");
return -1;
}
memcpy(laddr, u.x, m = MIN(sizeof(long), len));
addr += sizeof(long), laddr += m, len -= m;
}
#else /* !oldway */
int n;
while (len) {
@ -831,7 +822,6 @@ umoven(struct tcb *tcp, long addr, int len, char *laddr)
addr += n;
laddr += n;
}
#endif /* !oldway */
#endif /* SUNOS4 */
#ifdef USE_PROCFS
@ -956,21 +946,6 @@ long addr;
int len;
char *laddr;
{
# if 0
int n;
while (len) {
n = MIN(len, PAGSIZ);
n = MIN(n, ((addr + PAGSIZ) & PAGMASK) - addr);
if (ptrace(cmd, pid, (char *)addr, n, laddr) < 0) {
perror("uload: ptrace(PTRACE_WRITE, ...)");
return -1;
}
len -= n;
addr += n;
laddr += n;
}
# else
int peek, poke;
int n, m;
union {
@ -1013,7 +988,6 @@ char *laddr;
}
addr += sizeof(long), laddr += m, len -= m;
}
# endif
return 0;
}
@ -1087,95 +1061,6 @@ long *res;
#endif /* !USE_PROCFS */
#if 0
long
getpc(struct tcb *tcp)
{
#ifdef LINUX
long pc;
# if defined(I386)
if (upeek(tcp, 4*EIP, &pc) < 0)
return -1;
# elif defined(X86_64)
if (upeek(tcp, 8*RIP, &pc) < 0)
return -1;
# elif defined(IA64)
if (upeek(tcp, PT_B0, &pc) < 0)
return -1;
# elif defined(ARM)
if (upeek(tcp, 4*15, &pc) < 0)
return -1;
# elif defined(AVR32)
if (upeek(tcp, REG_PC, &pc) < 0)
return -1;
# elif defined(BFIN)
if (upeek(tcp, REG_PC, &pc) < 0)
return -1;
# elif defined(POWERPC)
if (upeek(tcp, sizeof(unsigned long)*PT_NIP, &pc) < 0)
return -1;
# elif defined(M68K)
if (upeek(tcp, 4*PT_PC, &pc) < 0)
return -1;
# elif defined(ALPHA)
if (upeek(tcp, REG_PC, &pc) < 0)
return -1;
# elif defined(MIPS)
if (upeek(tcp, REG_EPC, &pc) < 0)
return -1;
# elif defined(SPARC) || defined(SPARC64)
struct pt_regs regs;
if (ptrace(PTRACE_GETREGS,tcp->pid,(char *)&regs,0) < 0)
return -1;
# if defined(SPARC64)
pc = regs.tpc;
# else
pc = regs.pc;
# endif
# elif defined(S390) || defined(S390X)
if(upeek(tcp,PT_PSWADDR,&pc) < 0)
return -1;
# elif defined(HPPA)
if(upeek(tcp,PT_IAOQ0,&pc) < 0)
return -1;
# elif defined(SH)
if (upeek(tcp, 4*REG_PC ,&pc) < 0)
return -1;
# elif defined(SH64)
if (upeek(tcp, REG_PC ,&pc) < 0)
return -1;
# endif
return pc;
#endif /* LINUX */
#ifdef SUNOS4
/*
* Return current program counter for `pid'
* Assumes PC is never 0xffffffff
*/
struct regs regs;
if (ptrace(PTRACE_GETREGS, tcp->pid, (char *) &regs, 0) < 0) {
perror("getpc: ptrace(PTRACE_GETREGS, ...)");
return -1;
}
return regs.r_pc;
#endif /* SUNOS4 */
#ifdef SVR4
/* XXX */
return 0;
#endif /* SVR4 */
#ifdef FREEBSD
struct reg regs;
pread(tcp->pfd_reg, &regs, sizeof(regs), 0);
return regs.r_eip;
#endif /* FREEBSD */
}
#endif /* 0 */
void
printcall(struct tcb *tcp)
{
@ -1361,7 +1246,7 @@ printcall(struct tcb *tcp)
*/
#ifndef USE_PROCFS
# if defined LINUX
#ifdef LINUX
# include "syscall.h"
@ -1674,7 +1559,7 @@ struct tcb *tcp;
|| restore_arg0 (tcp, &state, tcp->inst[0]) < 0
|| restore_arg1 (tcp, &state, tcp->inst[1]) < 0
|| arg_finish_change (tcp, &state))
return -1;
if (errno != ESRCH) return -1;
tcp->flags &= ~TCB_BPTSET;
return 0;
}
@ -1685,206 +1570,6 @@ int
setbpt(tcp)
struct tcb *tcp;
{
# ifdef LINUX
DEAD CODE HERE? WE ARE IN 'else !defined LINUX'
# if defined (SPARC) || defined (SPARC64)
/* We simply use the SunOS breakpoint code. */
struct regs regs;
unsigned long inst;
# define LOOPA 0x30800000 /* ba,a 0 */
if (tcp->flags & TCB_BPTSET) {
fprintf(stderr, "PANIC: TCB already set in pid %u\n", tcp->pid);
return -1;
}
if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
perror("setbpt: ptrace(PTRACE_GETREGS, ...)");
return -1;
}
tcp->baddr = regs.r_o7 + 8;
errno = 0;
tcp->inst[0] = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)tcp->baddr, 0);
if(errno) {
perror("setbpt: ptrace(PTRACE_PEEKTEXT, ...)");
return -1;
}
/*
* XXX - BRUTAL MODE ON
* We cannot set a real BPT in the child, since it will not be
* traced at the moment it will reach the trap and would probably
* die with a core dump.
* Thus, we are force our way in by taking out two instructions
* and insert an eternal loop instead, in expectance of the SIGSTOP
* generated by our PTRACE_ATTACH.
* Of cause, if we evaporate ourselves in the middle of all this...
*/
errno = 0;
inst = LOOPA;
# if defined (SPARC64)
inst <<= 32;
inst |= (tcp->inst[0] & 0xffffffffUL);
# endif
ptrace(PTRACE_POKETEXT, tcp->pid, (char *) tcp->baddr, inst);
if(errno) {
perror("setbpt: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
tcp->flags |= TCB_BPTSET;
# else /* !SPARC && !SPARC64 */
# ifdef IA64
if (ia32) {
# define LOOP 0x0000feeb
if (tcp->flags & TCB_BPTSET) {
fprintf(stderr, "PANIC: bpt already set in pid %u\n",
tcp->pid);
return -1;
}
if (upeek(tcp, PT_CR_IIP, &tcp->baddr) < 0)
return -1;
if (debug)
fprintf(stderr, "[%d] setting bpt at %lx\n",
tcp->pid, tcp->baddr);
tcp->inst[0] = ptrace(PTRACE_PEEKTEXT, tcp->pid,
(char *) tcp->baddr, 0);
if (errno) {
perror("setbpt: ptrace(PTRACE_PEEKTEXT, ...)");
return -1;
}
ptrace(PTRACE_POKETEXT, tcp->pid, (char *) tcp->baddr, LOOP);
if (errno) {
perror("setbpt: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
tcp->flags |= TCB_BPTSET;
} else {
/*
* Our strategy here is to replace the bundle that
* contained the clone() syscall with a bundle of the
* form:
*
* { 1: br 1b; br 1b; br 1b }
*
* This ensures that the newly forked child will loop
* endlessly until we've got a chance to attach to it.
*/
# define LOOP0 0x0000100000000017
# define LOOP1 0x4000000000200000
unsigned long addr, ipsr;
pid_t pid;
pid = tcp->pid;
if (upeek(tcp, PT_CR_IPSR, &ipsr) < 0)
return -1;
if (upeek(tcp, PT_CR_IIP, &addr) < 0)
return -1;
/* store "ri" in low two bits */
tcp->baddr = addr | ((ipsr >> 41) & 0x3);
errno = 0;
tcp->inst[0] = ptrace(PTRACE_PEEKTEXT, pid, (char *) addr + 0,
0);
tcp->inst[1] = ptrace(PTRACE_PEEKTEXT, pid, (char *) addr + 8,
0);
if (errno) {
perror("setbpt: ptrace(PTRACE_PEEKTEXT, ...)");
return -1;
}
errno = 0;
ptrace(PTRACE_POKETEXT, pid, (char *) addr + 0, LOOP0);
ptrace(PTRACE_POKETEXT, pid, (char *) addr + 8, LOOP1);
if (errno) {
perror("setbpt: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
tcp->flags |= TCB_BPTSET;
}
# else /* !IA64 */
# if defined (I386) || defined(X86_64)
# define LOOP 0x0000feeb
# elif defined (M68K)
# define LOOP 0x60fe0000
# elif defined (ALPHA)
# define LOOP 0xc3ffffff
# elif defined (POWERPC)
# define LOOP 0x48000000
# elif defined(ARM)
# define LOOP 0xEAFFFFFE
# elif defined(MIPS)
# define LOOP 0x1000ffff
# elif defined(S390)
# define LOOP 0xa7f40000 /* BRC 15,0 */
# elif defined(S390X)
# define LOOP 0xa7f4000000000000UL /* BRC 15,0 */
# elif defined(HPPA)
# define LOOP 0xe81f1ff7 /* b,l,n <loc>,r0 */
# elif defined(SH)
# ifdef __LITTLE_ENDIAN__
# define LOOP 0x0000affe
# else
# define LOOP 0xfeaf0000
# endif
# else
# error unknown architecture
# endif
if (tcp->flags & TCB_BPTSET) {
fprintf(stderr, "PANIC: bpt already set in pid %u\n", tcp->pid);
return -1;
}
# if defined (I386)
if (upeek(tcp, 4*EIP, &tcp->baddr) < 0)
return -1;
# elif defined (X86_64)
if (upeek(tcp, 8*RIP, &tcp->baddr) < 0)
return -1;
# elif defined (M68K)
if (upeek(tcp, 4*PT_PC, &tcp->baddr) < 0)
return -1;
# elif defined (ALPHA)
return -1;
# elif defined (ARM)
return -1;
# elif defined (MIPS)
return -1; /* FIXME: I do not know what i do - Flo */
# elif defined (POWERPC)
if (upeek(tcp, sizeof(unsigned long)*PT_NIP, &tcp->baddr) < 0)
return -1;
# elif defined(S390) || defined(S390X)
if (upeek(tcp,PT_PSWADDR, &tcp->baddr) < 0)
return -1;
# elif defined(HPPA)
if (upeek(tcp, PT_IAOQ0, &tcp->baddr) < 0)
return -1;
tcp->baddr &= ~0x03;
# elif defined(SH)
if (upeek(tcp, 4*REG_PC, &tcp->baddr) < 0)
return -1;
# else
# error unknown architecture
# endif
if (debug)
fprintf(stderr, "[%d] setting bpt at %lx\n", tcp->pid, tcp->baddr);
tcp->inst[0] = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *) tcp->baddr, 0);
if (errno) {
perror("setbpt: ptrace(PTRACE_PEEKTEXT, ...)");
return -1;
}
ptrace(PTRACE_POKETEXT, tcp->pid, (char *) tcp->baddr, LOOP);
if (errno) {
perror("setbpt: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
tcp->flags |= TCB_BPTSET;
# endif /* !IA64 */
# endif /* !SPARC && !SPARC64 */
# endif /* LINUX */
# ifdef SUNOS4
# ifdef SPARC /* This code is slightly sparc specific */
@ -1941,204 +1626,6 @@ int
clearbpt(tcp)
struct tcb *tcp;
{
# ifdef LINUX
DEAD CODE HERE? WE ARE IN 'else !defined LINUX'
# if defined(I386) || defined(X86_64)
long eip;
# elif defined(POWERPC)
long pc;
# elif defined(M68K)
long pc;
# elif defined(ALPHA)
long pc;
# elif defined(HPPA)
long iaoq;
# elif defined(SH)
long pc;
# endif /* architecture */
# if defined (SPARC) || defined (SPARC64)
/* Again, we borrow the SunOS breakpoint code. */
if (!(tcp->flags & TCB_BPTSET)) {
fprintf(stderr, "PANIC: TCB not set in pid %u\n", tcp->pid);
return -1;
}
errno = 0;
ptrace(PTRACE_POKETEXT, tcp->pid, (char *) tcp->baddr, tcp->inst[0]);
if(errno) {
perror("clearbtp: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
tcp->flags &= ~TCB_BPTSET;
# elif defined(IA64)
if (ia32) {
unsigned long addr;
if (debug)
fprintf(stderr, "[%d] clearing bpt\n", tcp->pid);
if (!(tcp->flags & TCB_BPTSET)) {
fprintf(stderr, "PANIC: TCB not set in pid %u\n", tcp->pid);
return -1;
}
errno = 0;
ptrace(PTRACE_POKETEXT, tcp->pid, (char *) tcp->baddr, tcp->inst[0]);
if (errno) {
perror("clearbtp: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
tcp->flags &= ~TCB_BPTSET;
if (upeek(tcp, PT_CR_IIP, &addr) < 0)
return -1;
if (addr != tcp->baddr) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr,
"NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
addr, tcp->baddr);
return 0;
}
} else {
unsigned long addr, ipsr;
pid_t pid;
pid = tcp->pid;
if (upeek(tcp, PT_CR_IPSR, &ipsr) < 0)
return -1;
if (upeek(tcp, PT_CR_IIP, &addr) < 0)
return -1;
/* restore original bundle: */
errno = 0;
ptrace(PTRACE_POKETEXT, pid, (char *) addr + 0, tcp->inst[0]);
ptrace(PTRACE_POKETEXT, pid, (char *) addr + 8, tcp->inst[1]);
if (errno) {
perror("clearbpt: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
/* restore original "ri" in ipsr: */
ipsr = (ipsr & ~(0x3ul << 41)) | ((tcp->baddr & 0x3) << 41);
errno = 0;
ptrace(PTRACE_POKEUSER, pid, (char *) PT_CR_IPSR, ipsr);
if (errno) {
perror("clrbpt: ptrace(PTRACE_POKEUSER, ...)");
return -1;
}
tcp->flags &= ~TCB_BPTSET;
if (addr != (tcp->baddr & ~0x3)) {
/* the breakpoint has not been reached yet. */
if (debug)
fprintf(stderr, "NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
addr, tcp->baddr);
return 0;
}
}
# else /* !IA64 && !SPARC && !SPARC64 */
if (debug)
fprintf(stderr, "[%d] clearing bpt\n", tcp->pid);
if (!(tcp->flags & TCB_BPTSET)) {
fprintf(stderr, "PANIC: TCB not set in pid %u\n", tcp->pid);
return -1;
}
errno = 0;
ptrace(PTRACE_POKETEXT, tcp->pid, (char *) tcp->baddr, tcp->inst[0]);
if (errno) {
perror("clearbtp: ptrace(PTRACE_POKETEXT, ...)");
return -1;
}
tcp->flags &= ~TCB_BPTSET;
# ifdef I386
if (upeek(tcp, 4*EIP, &eip) < 0)
return -1;
if (eip != tcp->baddr) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr,
"NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
eip, tcp->baddr);
return 0;
}
# elif defined(X86_64)
if (upeek(tcp, 8*RIP, &eip) < 0)
return -1;
if (eip != tcp->baddr) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr,
"NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
eip, tcp->baddr);
return 0;
}
# elif defined(POWERPC)
if (upeek(tcp, sizeof(unsigned long)*PT_NIP, &pc) < 0)
return -1;
if (pc != tcp->baddr) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr, "NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
pc, tcp->baddr);
return 0;
}
# elif defined(M68K)
if (upeek(tcp, 4*PT_PC, &pc) < 0)
return -1;
if (pc != tcp->baddr) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr, "NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
pc, tcp->baddr);
return 0;
}
# elif defined(ALPHA)
if (upeek(tcp, REG_PC, &pc) < 0)
return -1;
if (pc != tcp->baddr) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr, "NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
pc, tcp->baddr);
return 0;
}
# elif defined(HPPA)
if (upeek(tcp, PT_IAOQ0, &iaoq) < 0)
return -1;
iaoq &= ~0x03;
if (iaoq != tcp->baddr && iaoq != tcp->baddr + 4) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr, "NOTE: PC not at bpt (iaoq %#lx baddr %#lx)\n",
iaoq, tcp->baddr);
return 0;
}
iaoq = tcp->baddr | 3;
/* We should be pointing at a 'ldi -1000,r1' in glibc, so it is
* safe to set both IAOQ0 and IAOQ1 to that so the PSW N bit
* has no significant effect.
*/
ptrace(PTRACE_POKEUSER, tcp->pid, (void *)PT_IAOQ0, iaoq);
ptrace(PTRACE_POKEUSER, tcp->pid, (void *)PT_IAOQ1, iaoq);
# elif defined(SH)
if (upeek(tcp, 4*REG_PC, &pc) < 0)
return -1;
if (pc != tcp->baddr) {
/* The breakpoint has not been reached yet. */
if (debug)
fprintf(stderr, "NOTE: PC not at bpt (pc %#lx baddr %#lx)\n",
pc, tcp->baddr);
return 0;
}
# endif /* arch */
# endif /* !SPARC && !SPARC64 && !IA64 */
# endif /* LINUX */
# ifdef SUNOS4
# ifdef SPARC
@ -2257,13 +1744,6 @@ struct tcb *tcp;
(int)ld.ld_symb_size, strtab) < 0)
goto err;
# if 0
for (cp = strtab; cp < strtab + ld.ld_symb_size; ) {
fprintf(stderr, "[symbol: %s]\n", cp);
cp += strlen(cp)+1;
}
return 0;
# endif
for (cp = strtab; cp < strtab + ld.ld_symb_size; ) {
if (strcmp(cp, "_vfork") == 0) {
if (debug)