Compare commits

..

884 Commits
v4.6 ... v4.9

Author SHA1 Message Date
e4db4c4bdd Prepare for 4.9 release
* NEWS: Update for 4.9 release.
* debian/changelog: 4.9-1.
* strace.spec: 4.9-1.
2014-08-15 13:14:15 +00:00
a283ae0368 Sync strace.spec and debian/ with packages
* debian/changelog: Sync with 4.8-1.1.
* debian/control: Likewise.
* debian/rules: Likewise.
* strace.spec: Sync with 4.8-5.
2014-08-15 13:14:15 +00:00
6d32e463ab NEWS: Update for 4.9 release 2014-08-15 00:36:36 +00:00
e971da48db Update syscall tables to the point where they include renameat2
* linux/dummy.h: Add printargs aliases for sys_sched_getattr and
sys_sched_setattr.
* linux/aarch64/syscallent1.h: Add kcmp/finit_module/sched_setattr/
sched_getattr/renameat2.
* linux/alpha/syscallent.h: Add kcmp/finit_module.
* linux/arm/syscallent.h: Add sched_setattr/sched_getattr/renameat2.
* linux/hppa/syscallent.h: Add sched_setattr/sched_getattr/utimes/renameat2.
* linux/i386/syscallent.h: Add sched_setattr/sched_getattr/renameat2.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Add getdents64/sched_setattr/sched_getattr/
renameat2.
* linux/mips/syscallent-o32.h: Add sched_setattr/sched_getattr/renameat2.
* linux/powerpc/syscallent.h: Fix finit_module/kcmp order.  Add sched_setattr/
sched_getattr/renameat2.
* linux/s390/syscallent.h: Add sched_setattr/sched_getattr/renameat2.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Add sched_setattr/sched_getattr.
2014-08-15 00:09:12 +00:00
5b677ab904 renameat2: add decoding support
* file.c (decode_renameat, sys_renameat2): New functions.
(sys_renameat): Use decode_renameat.
* pathtrace.c (pathtrace_match): Handle sys_renameat2.
* linux/syscall.h (sys_renameat2): New prototype.
* xlat/rename_flags.in: New file.
2014-08-15 00:06:06 +00:00
67c4d437ba CREDITS: fix generation in out of tree builds
The {...} code changes the working dir with `cd`, but the commands outside
of that block expects to be in the original dir.  Change to a subshell so
the path outside of this block remains unchanged.

* Makefile.am ($(srcdir)/CREDITS): Change {...} to (...).
2014-08-14 23:30:15 +00:00
a80c636fd0 ia64: add missing syscalls
When the preadv/pwritev syscalls were added, the ones before it in the
ia64 list were missed, so all the syscalls there and later were not in
the right location (causing things to be decoded incorrectly).

Add the missing syscalls before preadv which also re-aligns all the
syscalls after that point.  This fixes the uio.test.

* linux/ia64/syscallent.h: Add syscalls 1310 through 1318.
2014-08-14 23:29:43 +00:00
dd80a879be ia64: fix sigaction decoding
Looks like ia64 doesn't have sa_restorer either, yet still defines
SA_RESTORER.  Deploy the same trick that HPPA is using to make the
test pass.

* signal.c (SA_RESTORER): Undefine when IA64 is defined.
(struct new_sigaction) [IA64]: Disable sa_restorer.
2014-08-14 23:29:09 +00:00
e55264e012 tests: skip detach-stopped.test when PTRACE_SEIZE doesn't work
detach-stopped.test is known to fail when PTRACE_SEIZE is not available,
so skip the test in that case.

* tests/detach-stopped.test: Check for "strace -d" output and skip the
test when it says that PTRACE_SEIZE doesn't work.
2014-08-12 01:09:28 +00:00
d5588a8e12 sh: fix syscall numbering for recv and sendto
* linux/sh/syscallent.h: Swap recv and sendto syscall entries.
2014-08-11 17:39:43 +00:00
97ca0277b3 tests: fix uio building w/out preadv/pwritev
The preadv/pwritev symbols weren't added to glibc until the 2.10 release,
so trying to build the uio test leads to link failures.  Add configure
tests and update uio.test to handle this.

* configure.ac (AC_CHECK_FUNCS): Add preadv/pwritev.
* tests/uio.c: Include config.h.
(main): Check for HAVE_PREADV and HAVE_PWRITEV.
* tests/uio.test: Check exit status of uio helper.
2014-08-11 17:30:01 +00:00
b267aef27f tests: ignore *.tmp files
The tests like to generate random .tmp files, so ignore them.

* tests/.gitignore: Add *.tmp.
2014-08-11 17:23:05 +00:00
2b5bfeb2a8 tests: fix shell errors in detach tests
The current detach test code does:
	set -e
	...
	cleanup() {
		set +e
		kill ...
		wait ...
	}
	...
	cleanup
	exit 0

The problem is that while `set -e` is disabled for the body of the
cleanup function, it isn't necessarily disabled in the caller scope.
So if the return value of the cleanup function (`wait` in this case)
is non-zero, the script ends up failing overall.

Add an explicit return 0 to the cleanup function so that we don't kill
the overall test pipeline.

* tests/detach-running.test (cleanup): Add return 0.
* tests/detach-sleeping.test (cleanup): Likewise.
* tests/detach-stopped.test (cleanup): Likewise.
2014-08-11 17:22:38 +00:00
6673ac74dc set_ptracer_any: add a little documentation
This way I don't have to keep reading up on these options and wondering
why the code isn't aborting when the call fails.

* tests/set_ptracer_any.c (main): Note prctl failures are ok.
2014-08-11 17:19:17 +00:00
6ab2ed119a signal: fix thinko in sa_restorer
Previous commit here re-added the bugs trying to be fixed due to a
logic thinko.  The patches were tested in isolation and hand merged
later.  Oops.

* signal.c (struct new_sigaction): Change || to &&.
2014-08-10 09:23:22 +00:00
0189ff919b sigaction test: support arches w/out SA_RESTORER and swapped args
Running Linux 3.15 (sparc64) and glibc 2.17 (sparc32) triggers a
rt_sigaction call that does not use SA_RESTORER and has an order
where it inserts a restorer and a size.  The current tests don't
support that ordering, so add another regex.

* tests/sigaction.awk: Support no SA_RESTORER and swapped args.
2014-08-09 15:38:17 +00:00
8efd209122 alpha/sparc: fix arg count for rt_sigaction
Both these arches have a rt_sigaction syscall that takes 5 args, not 4.

* linux/alpha/syscallent.h (rt_sigaction): Change nargs to 5.
* linux/sparc/syscallent.h (rt_sigaction): Change nargs to 5.
2014-08-09 15:28:04 +00:00
d632e10f51 hppa: fix sigaction decoding
Since the rt_sigaction syscall on hppa doesn't have a sa_restorer,
do not include it in the kernel struct.

We also have to undefine SA_RESTORER so that code doesn't try to
use it.  The headers will export this, but the syscall doesn't
actually respect it.

* signal.c (SA_RESTORER): Undefine when HPPA is defined.
(struct new_sigaction): Disable sa_restorer on hppa.
2014-08-09 15:27:55 +00:00
e355c60b1d alpha: fix sigaction decoding
Since the rt_sigaction syscall on alpha doesn't have a sa_restorer,
do not include it in the kernel struct.

* signal.c (struct new_sigaction): Disable sa_restorer on alpha.
2014-08-09 15:27:13 +00:00
45e7b189e2 Prepare for -yy option support
* defs.h (show_fd_path): Change type to unsigned int.
* strace.c (show_fd_path): Likewise.
(init): Handle repeated -y option.
2014-08-08 23:38:26 +00:00
20b84a6769 Fix preadv/pwritev offset decoding on ILP32 architectures
This fixes regression introduced by the previous commit.

* io.c (print_llu_from_low_high_val) [SIZEOF_LONG != SIZEOF_LONG_LONG]:
Cast argument to unsigned long before casting it to unsigned long long.
2014-08-07 11:42:46 +00:00
3c49b02e98 Fix preadv/pwritev offset decoding on bigendian architectures
This partially reverts commit 7845a42b39.

* util.c (printllval): Remove align argument.
* defs.h (printllval): Update prototype.
(printllval_aligned, printllval_unaligned): Remove.
* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
sys_fallocate): Replace printllval_aligned call with printllval.
* io.c (sys_pread, sys_pwrite): Likewise.
(print_llu_from_low_high_val): New function.
(sys_preadv, sys_pwritev): Use it instead of printllval_unaligned.
2014-08-07 00:30:26 +00:00
15114ec215 Decode file descriptors returned by accept and accept4 syscalls
* net.c (do_accept): Rename to do_sockname.
(sys_accept, sys_accept4): Update callers, return RVAL_FD.
(sys_getsockname, sys_getpeername): Call do_sockname directly.
* tests/net-fd.test: Update.
2014-08-06 16:49:59 +00:00
212287c56c x32: update io_{setup,submit} syscalls
Starting in 3.16, these two syscalls have gotten their own entry
point for x32.  See linux 7fd44dacdd803c0bbf38bf478d51d280902bb0f1.

* linux/x32/syscallent.h: Change existing io_{setup,submit} to 64bit,
and add new entry points for x32 specifically.
2014-08-01 14:25:12 +00:00
57fac759ca xtensa: sort values in struct_user_offsets
Otherwise ptrace syscall argument decoding is wrong:
  ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x4048eb]) = 0
  ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x3fa6cd30]) = 0
  ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x8040676d]) = 0
instead of
  ptrace(PTRACE_PEEKUSER, 296, pc, [0x4048eb]) = 0
  ptrace(PTRACE_PEEKUSER, 296, a1, [0x3fa6cd30]) = 0
  ptrace(PTRACE_PEEKUSER, 296, a0, [0x8040676d]) = 0

* process.c (struct_user_offsets) [XTENSA]: Sort values.
2014-06-18 15:41:25 +00:00
2734a7010f Document -k option as experimental
strace -k does not produce a reliable output on all supported
configurations yet, even basic strace-k.test is known to fail
on some of them.

* strace.c (usage): Document -k option as experimental.
* strace.1: Likewise.
* NEWS: Likewise.
2014-06-18 15:41:19 +00:00
b076420692 tests: robustify -k test
Split stack-fcall.c into several compilation units so that intermediate
function calls would not be optimized out by compiler.

* tests/stack-fcall.c: Move intermediate functions to ...
* tests/stack-fcall-*.c: ... new files.
* tests/Makefile.am (stack_fcall_SOURCES): Add stack-fcall-*.c.
2014-06-18 15:18:47 +00:00
c588b205be tests: enhance -k test
Add two more function calls to the stack.  Suggested by Masatake YAMATO.

* tests/stack-fcall.c (f1): Rename to f3.
(f1, f2): New functions.
* tests/strace-k.test: Update.
2014-06-13 15:58:01 +00:00
73741d2e2e unwind: ignore memory mappings that have no PROT_EXEC bit set
* unwind.c (build_mmap_cache): For each memory mapping being scanned,
save its PROT_EXEC bit and skip the mapping if it is not set.
2014-06-13 15:58:00 +00:00
9a349c7779 unwind: cleanup build_mmap_cache
* unwind.c (build_mmap_cache): Move local variables to the code branch
where they are used.  Check return code of sscanf and strdup.  Do not
treat unusual memory mappings as fatal errors.  Do not skip memory
mappings with path names starting with "[".
2014-06-13 15:56:40 +00:00
2222b928c6 unwind: remove unused field from mmap_cache_t
* unwind.c (mmap_cache_t): Remove "deleted" field.
(build_mmap_cache): Remove initialization of "deleted" field.
2014-06-13 18:20:08 +04:00
52840ede0c unwind: refactor stacktrace_walk
* unwind.c (stacktrace_walk): Move stack frame printing code
to separate function print_stack_frame.
2014-06-12 22:12:31 +00:00
806539c55c unwind: constify binary_filename and symbol_name functions arguments
* unwind.c (call_action_fn, print_call_cb, sprint_call_or_error,
queue_put, queue_put_call): Add const qualifier to binary_filename and
symbol_name arguments.
2014-06-12 22:10:59 +00:00
f1d73110a0 unwind: disable stack trace with multiple personalities
* unwind.c (unwind_cache_invalidate, unwind_print_stacktrace,
unwind_capture_stacktrace): Disable stack tracing of non-default
personality processes.
2014-06-11 00:09:55 +00:00
6555711a6e unwind: rename function_off_set to function_offset
* unwind.c (call_action_fn, stacktrace_walk, STACK_ENTRY_SYMBOL_FMT,
print_call_cb, sprint_call_or_error, queue_put, queue_put_call):
Rename function_off_set to function_offset.
2014-06-05 23:00:28 +00:00
c12eb1117c unwind: fix a bug in range updating of binary search
* unwind.c (print_stacktrace): Fix another off-by-one error in binary search.
2014-06-05 21:40:43 +00:00
c903c822ee unwind: use fopen64 instead of fopen
* unwind.c (fopen_for_input): Define to fopen64 iff
[_LARGEFILE64_SOURCE && HAVE_FOPEN64], otherwise define it to fopen.
(build_mmap_cache): Use fopen_for_input instead of fopen.
2014-06-05 15:42:05 +00:00
e411397489 unwind: fix build on 32-bit architectures
Fix compilation warnings in unwind.c on 32-bit architectures.
On some architectures getuid is actually getuid32, so change the test
to use getpid instead of getuid.

* unwind.c (STACK_ENTRY_SYMBOL_FMT): Explicitly cast function_off_set
to unsigned long.
(queue_put_error): Change the 3rd argument's type to unsigned long.
* tests/stack-fcall.c (f1): Use getpid instead of getuid.
* tests/strace-k.test: Likewise.
2014-06-05 15:42:05 +00:00
6e7ba0d8fe tests: robustify -w option test
* tests/count.test: Allow nanosleep to spend a bit less time than 1 second.
2014-06-05 15:42:04 +00:00
d04bb2bb80 Fix delete_module decoding
* xlat/delete_module_flags.in: New file.
* file.c (sys_delete_module): Move ...
* bjm.c (sys_delete_module): ... to here.
Decode 1st argument using printstr instead of printpath.
* NEWS: Mention it.
2014-06-04 16:29:18 +00:00
64aa1b1e2d Decode paths associated with file descriptors returned by syscalls
* defs.h (RVAL_FD): New macro.
(RVAL_MASK, RVAL_STR, RVAL_NONE): Update.
* desc.c (sys_dup, sys_delete_module): New functions.
(do_dup2, decode_open, sys_creat): Change return value to RVAL_FD.
* linux/dummy.h (sys_delete_module, sys_dup): Remove.
* linux/syscall.h (sys_delete_module, sys_dup): New prototypes.
* syscall.c (trace_syscall_exiting): Handle RVAL_FD.

Signed-off-by: Zubin Mithra <zubin.mithra@gmail.com>
2014-06-04 16:28:04 +00:00
327102c7f6 NEWS: Prepare for 4.9 release 2014-06-03 13:31:37 +00:00
2727aae37c Warn about flags that have no effect with -c
* strace.c (init): Issue a warning if -i, -k, -r, -t, -T, or -y is used
along with -c.
This fixes Debian bug #443895.
2014-06-03 13:20:05 +00:00
4182981f6d debian: enable security hardening features
* debian/rules: Follow the advice in https://wiki.debian.org/Hardening
and enable maximum hardening as for programs that handle untrusted data.
Patch by Markus <waldeck@gmx.de>.
2014-06-03 13:04:06 +00:00
05cd5b2a04 debian: update control file
* debian/control (strace64): Fix a typo in package description.
Patch by Pascal De Vuyst <pascal.devuyst@gmail.com>.
(strace, strace-udeb): Add x32 to architecture list.
Patch by Guillaume Morin <guillaume@morinfr.org>.
(strace, strace-udeb): Add or1k to architecture list.
Patch by Christian Svensson <debian@cmd.nu>.
(strace, strace-udeb): Add arm64 to architecture list,
and remove defunct arm.
Patch by Wookey <wookey@debian.org>.

This fixes Debian bugs: #697625, #727018, #742235, #749956.
2014-06-03 12:36:20 +00:00
a197832282 manpage: minor corrections
$ groff -ww -mandoc -z strace.1
strace.1:65: warning: macro `IX' not defined

* strace.1: define IX macro as empty for groff.
Change remaining '-' as minus to '\-'.
Have two word spaces after a full stop as an end of sentence.
Use extra space ('\,' or '\/') between roman and italic characters.
Based on patch by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.
This fixes Debian bug #725987.
2014-06-03 12:36:14 +00:00
9682107053 unwind: tests: add a test for -k option
* tests/stack-fcall.c: New test target.
* tests/strace-k.test: New test driver.
* tests/Makefile.am (check_PROGRAMS): Add stack-fcall.
(TESTS): Add strace-k.test.
* tests/.gitignore: Add stack-fcall.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-05-30 22:59:27 +00:00
ed69fc2dc3 unwind: move stacktrace capturing and mmap cache invalidating to trace_syscall_entering
Instead of handling stacktrace capturing and mmap cache invalidating in
sys_* functions, handle them uniformly in trace_syscall_entering using
new flags introduced by previous two commits.

The patch is simpler than its older version(v3).  The value of
hide_log_until_execve is just ignored.  I found the value is nothing
to do with this patch.  unwind_cache_invalidate is mentioned only
once in trace_syscall_exiting.
Both are suggested by Dmitry Levin.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:59:01 +00:00
549e2c4a98 unwind: add SE and SI flags to syscall entries for all architectures
Add SE flag to execve, exit, and exit_group syscall entries.
Add SI flag to brk, execve, mmap, mprotect, mremap, munmap,
remap_file_pages, shmat, and shmdt syscall entries.
2014-05-30 22:58:47 +00:00
1d78d22058 unwind: introduce markers specifying the needs of special care in unwinding
Some system calls require capturing the stack trace before they are
processed in kernel.  Typical one is execve.  Some system calls require
invalidating mmap cache after they are processed in kernel.

In current implementation these requirements are handled directly by
appropriate syscall handlers.  However, it is difficult to keep the
source code maintainable using this approach to cover all system calls
which have such requirements.

A more generic way to implement this is to flag all syscalls that
require special processing, and handle these flags right in
trace_syscall_entering instead of changing syscall handlers.

This patch just defines new flags: STACKTRACE_INVALIDATE_CACHE and
STACKTRACE_CAPTURE_ON_ENTER.

The names of macros are suggested by Dmitry Levin.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:57:56 +00:00
a0b4ee7b38 unwind: enable dwarf cache of libunwind
Here is the benchmark of the dwarf cache.

Target program:

    #include <sched.h>
    int main(void)
    {
      unsigned int max = 0x6fff, i;
      for (i = 0; i < max; i++)
	sched_yield();
      return 0;
    }

Command line:

	./strace -o /dev/null -k a.out

With the dwarf cache:

    real	0m12.081s
    user	0m3.858s
    sys 	0m8.194s

Without the dwarf cache:

    real	0m22.326s
    user	0m5.218s
    sys		0m16.952s

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:57:39 +00:00
b45b7faa1f unwind: report expected backtracing error
When a file mmap'ed to the target process is unlink'ed, backtracing the
stack would fail.  Current implementation reports it as
"backtracing_error".  To avoid confusion, the message is changed to
"expected_backtracing_error".

Here is the reproducer:

  $ cat ./p-deleted.c
  #include <unistd.h>

  int main(int argc, char **argv) {
    return unlink(argv[0]) < 0;
  }

  $ strace -e unlink -k ./p-deleted
  unlink("./p-deleted")                   = 0
   > /usr/lib64/libc-2.18.so(unlink+0x7) [0xe7f17]
   > /home/yamato/var/strace/t_unwind/p-deleted (deleted)(+0x0) [0x575]
   > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65]
   > backtracing_error [0x7ffff1365590]
  +++ exited with 0 +++

p-deleted is deleted therefore backtracing_error is reported.  This
patch records the deleted marker when making mmap cache and refers the
recorded information in the case "backtracing_error" to switch the
message.

Here is the output of this patch:

  $ strace -e unlink -k ./p-deleted
  unlink("./p-deleted")                   = 0
   > /usr/lib64/libc-2.18.so(unlink+0x7) [0xe7f17]
   > /home/yamato/var/strace/t_unwind/p-deleted (deleted)(+0x0) [0x575]
   > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65]
   > expected_backtracing_error [0x7ffff1365590]
  +++ exited with 0 +++

This solution is not perfect: if a file is unlink'ed after making the
mmap cache and before unwinding, strace cannot have a chance to record
the deleted marker.

In this version of patch, hardcoded magic number used in comparing "(delete)"
string is replaced with strlen as suggested by Dmitry Levin.

In old version of patch, the deleted entry was thrown away from mmap
cache to avoid to report "backtracing_error".  In this patch I keep it,
and just switch the error message.
Inspired by the review comment from Dmitry Levin.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:57:19 +00:00
2b09df9731 unwind: call unwind_tcb_fin before printing detached message
captured stacktrace is printed in unwind_tcb_fin if tcp->queue is not
empty.  This should happen before printing detached message, so
unwind_tcb_fin is moved to the top of droptcb.

This is implicitly suggested by Dmitry Levin in patch review process.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:56:38 +00:00
9bc6561588 unwind: implement automatic mmap cache invalidation
A mmap cache belonging to a tcb was updated when a system call which
changed the memory mapping was called.  This implementation was assumed
the mapping was changed only by the tcb.  However, this assumption is
incorrect if the target application is multi-threaded; more than two
tcbs can shared the same memory mapping and a tcb can modify it without
being noticed by the others.

This change introduces a global integer variable mmap_cache_generation,
and mmap_cache_generation field to struct tcb.  The variable
is incremented each time a process enters a syscall that can modify its
memory mapping.  Each tcb records the value of this variable at the
moment if  building its mmap cache.  Every mmap cache associated with
the given tcb can be validated by comparing its mmap_cache_generation
field with the variable mmap_cache_generation.

This implementation is inefficient.  If strace attaches two processes
which don't share the memory mapping, rebuilding mmap cache of a tcb
triggered by another tcb's mmap system call is not necessary.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:56:14 +00:00
f8e39d7b7a unwind: introduce queue_t for capturing stacktrace
This is the second step for splitting capturing from printing.

New `queue' field is added to tcb.  Captured stacktrace is stored here.
The field is initialized/finalized at unwind_tcb_init/unwind_tcb_fin.

New API function unwind_capture_stacktrace is added.  This function
captures the currest stack using stracktrace_walker and records it in
tcb.  It's printing is delayed to the next call of
unwind_print_stacktrace.

unwind_print_stacktrace is extended.  Now it checks queue field of
the given tcb at the start of function.  If the function finds a
captured stack trace, the latter is printed using stracktrace_walker.

Currently unwind_capture_stacktrace invocations are added directly to
handlers of mmap, munmap, mprotect, and execve.

Here is the difference of output with/without patch:

(without patch)
  execve("./test-fork", ["./test-fork"], [/* 56 vars */]) = 0
   > /usr/lib64/ld-2.18.so(check_one_fd.part.0+0x82) [0x11f0]

(with patch)
  execve("./test-fork", ["./test-fork"], [/* 54 vars */]) = 0
   > /usr/lib64/libc-2.18.so(execve+0x7) [0xbcd27]
   > /home/yamato/var/strace/strace(exec_or_die+0x10c) [0x26ac]
   > /home/yamato/var/strace/strace(startup_child+0x346) [0x134f6]
   > /home/yamato/var/strace/strace(init+0x89f) [0x13dff]
   > /home/yamato/var/strace/strace(main+0xa) [0x26ca]
   > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65]
   > /home/yamato/var/strace/strace(_start+0x29) [0x2799]

In older version output lines of captured elements were built when
printing.  In this version they are built when capturing the stack.
As result, unneeded dynamic memory allocations are avoided.
Suggested by Luca Clementi.

In older version the combination of snprintf and realloc were used.
In this version they are replaced with asprintf.
Suggested by Dmitry Levin.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:55:08 +00:00
4e121e5bb4 unwind: introduce own debug macro
* unwind.c (DPRINTF): New macro, to be utilized in debugging cache
management code.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:54:07 +00:00
2d534daaa6 unwind: introduce stacktrace_walker
In current implementation, the stack trace is captured and printed at
the same time, in trace_syscall_exiting.  This approach cannot
provide user expected information when a system call changes the
memory mapping.  In such cases, the stack trace should be captured on
entering syscall and printed on exiting.

As the initial step for splitting capturing from printing, this change
introduces stacktrace_walker utility function.  It can be used both for
capturing in trace_syscall_entering and printing in
trace_syscall_exiting.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:43:04 +00:00
6141392856 unwind: give all exported functions "unwind_" prefix
* unwind.c (init_unwind_addr_space): Rename to unwind_init.
(init_libunwind_ui): Rename to unwind_tcb_init.
(free_libunwind_ui): Rename to unwind_tcb_fin.
(delete_mmap_cache): Rename to unwind_cache_invalidate.
(print_stacktrace): Rename to unwind_print_stacktrace.
* defs.h: Update prototypes.
* mem.c: All callers updated.
* process.c: Likewise.
* strace.c: Likewise.
* syscall.c: Likewise.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:40:22 +00:00
7721499fc7 unwind: delete mmap cache in free_libunwind_ui
free_libunwind_ui is expected to release all unwind related resources
attached to tcp.

* strace.c (droptcb): Move delete_mmap_cache call ...
* unwind.c (free_libunwind_ui): ... to here.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:30:07 +00:00
b65042fbdb unwind: make alloc_mmap_cache function local
* defs.h (alloc_mmap_cache): Remove.
* unwind.c (alloc_mmap_cache): Add static qualifier.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2014-05-30 22:28:15 +00:00
b4a2de8eff unwind: fix a bug in range updating of binary search
* unwind.c (print_stacktrace): Fix off-by-one error in binary search.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Luca Clementi <luca.clementi@gmail.com>
2014-05-30 22:26:42 +00:00
327064b637 Add -k option to print stack trace after each syscall
Print the stack trace of the traced process after each system call when
-k option is specified.  It is implemented using libunwind to unwind the
stack and to obtain the function name pointed by the IP.

Based on the code that was originally taken from strace-plus
of Philip J. Guo.

* configure.ac: Add --with-libunwind option.  Check libunwind support.
* Makefile.am: Add libunwind support.
* defs.h (struct tcb) [USE_LIBUNWIND]: Append libunwind specific fields.
[USE_LIBUNWIND] (stack_trace_enabled, alloc_mmap_cache,
delete_mmap_cache, print_stacktrace): New prototypes.
* mem.c (print_mmap, sys_munmap, sys_mprotect): Add libunwind support.
* process.c (sys_execve): Likewise.
* strace.c (usage, alloctcb, droptcb, init): Likewise.
* syscall.c (trace_syscall_exiting): Likewise.
* unwind.c: New file.
* strace.1: Document -k option.
2014-05-30 22:24:31 +00:00
6dbbe0737a sysctl: update CTL_*, KERN_*, NET_*, and VM_* constants
* configure.ac (AC_CHECK_DECLS): Add CTL_*, KERN_*, NET_*, and
VM_* constants.
* system.c (CTL_PROC, CTL_CPU): Remove definitions.
* xlat/sysctl_*.in: Update.
2014-05-30 22:10:21 +00:00
d8ad1ddc76 Check for constants used by waitid function
* configure.ac (AC_CHECK_DECLS): Add P_* constants.
2014-05-30 22:10:21 +00:00
baf60d92f1 Check for LO_FLAGS_READ_ONLY constant
* configure.ac (AC_CHECK_DECLS): Add LO_FLAGS_READ_ONLY.
2014-05-30 22:10:21 +00:00
d35bdcad13 Compress blank lines
Suppress empty lines left after automated xlat conversion.
2014-05-30 22:10:21 +00:00
63ebcfc559 xlat: cleanup the aftermath of automatic conversion 2014-05-30 22:10:00 +00:00
0ed617bd66 Generate xlat/*.in files
Automatically convert xlat structures from *.c files to xlat/*.in files
using "./generate_xlat_in.sh *.c" command.
2014-05-30 21:40:03 +00:00
297b59401c Rename several xlat structures to avoid collisions
* bjm.c (which): Rename to qm_which.
* ipc.c (msg_flags): Rename to ipc_msg_flags.
* time.c (which): Rename to itimer_which.
2014-05-30 21:39:04 +00:00
5153b5cd68 Enhance xlat generator
* xlat/gen.sh: Define all xlat structs not declared in defs.h as static.
Some symbolic constants are not macros, extend #ifdef check to cover
symbolic constants checked by AC_CHECK_DECLS.
Handle complex symbolic constants in SYMBOL|... form.
Handle symbolic constants in 1<<SYMBOL form.
Handle numeric constants.
Implement #unconditional directive that turns off preprocessor checks.
Implement #unterminated directive that turns off adding XLAT_END.
2014-05-30 21:33:02 +00:00
3e69bdf41a Use bootstrap script consistently
Now that ./xlat/gen.sh has to be run before autoreconf,
replace all autoreconf calls with ./bootstrap call.

* bootstrap: Forward arguments to autoreconf.
* build_static_example.sh: Replace autoreconf call with bootstrap call.
* make-dist: Likewise.
* qemu_multiarch_testing/README: Likewise.
2014-05-30 21:31:08 +00:00
761ed9ba42 Implement xlat generator
* bootstrap: New file.
* xlat/gen.sh: Likewise.
* Makefile.am: Include xlat/Makemodule.am
(EXTRA_DIST): Add $(XLAT_INPUT_FILES), $(XLAT_HEADER_FILES), and
xlat/gen.sh.
2014-05-30 21:29:40 +00:00
e25fb4fd8e tests: fix SCM_RIGHTS test for big-endian systems
* tests/scm_rights.c (main): Send zero integer to avoid issues with
endianness.
* tests/scm_rights-fd.test: Update grep patterns.
2014-05-30 15:18:00 +00:00
f23b097fc5 Decode file descriptors passed via SCM_RIGHTS control messages
* net.c (printcmsghdr): Print descriptors from SCM_RIGHTS control
messages using printfd.
* tests/scm_rights.c: New file.
* tests/scm_rights-fd.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add scm_rights.
(TESTS): Add scm_rights-fd.test.
* tests/.gitignore: Add scm_rights and uio.
2014-05-30 00:20:53 +00:00
772e32b67b tests: add a test for -c and -w options
* tests/count.test: New test.
* tests/Makefile.am (TESTS): Add it.
2014-05-30 00:20:44 +00:00
e53bf23f1c Optionally produce stats on syscall latency
Time spent in system time is not useful where a syscall depends on some
non-CPU resource, eg. typically open() or stat() to a network drive.

This patch adds a new flag (-w) to produce a summary of the time
difference between beginning and end of the system call (ie. latency)

This functionality has been useful to profile slow processes that
are not CPU-bound.

Signed-off-by: Mark Hills <mark.hills@framestore.com>
2014-05-29 18:15:38 +00:00
ac5133d0cb Constify count_syscall function
* count.c (count_syscall): Add const qualifier to timeval argument and
rename it.  Store the wall clock time spent while in syscall in separate
timeval variable.
* defs.h (count_syscall): Update prototype.
* syscall.c (trace_syscall_exiting): Update count_syscall invocation.
2014-05-29 18:10:00 +00:00
447db45365 Constify tv_* functions
* defs.h (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div): Add
const qualifier to read only arguments.
* util.c (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div):
Likewise.
2014-05-29 17:59:01 +00:00
3a3b71c7d8 Use printstr for sethostname, setdomainname, and gethostname decoding
The argument passed to sethostname and setdomainname syscalls, as well
as the string returned by gethostname syscall, is not a pathname, so
printpathn is not the right method for its decoding.

* process.c (sys_sethostname, sys_setdomainname): Decode 1st argument
using printstr instead of printpathn.
[ALPHA] (sys_gethostname): Likewise.
2014-05-28 18:09:46 +00:00
3b09ebe724 Fix {get,set}rlimit decoding with unreliable SIZEOF_RLIM_T
When strace is built with large file support definitions in CFLAGS (as
may be provided by buildroot) the C library headers may expose a 64-bit
rlim_t even though the struct rlimit fields used by the system call
interface are only 32-bit.  The SIZEOF_RLIM_T will then be 8 which
results in bad decoding of the getrlimit and setrlimit syscalls.

This is fixed by replacing unreliable SIZEOF_RLIM_T based checks with
checks for current_wordsize.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-05-21 00:22:07 +00:00
b2ede14797 Enhance setns syscall decoding
* process.c (sys_setns): New function.
Decode the 2nd syscall argument using clone_flags.
* linux/syscall.h (sys_setns): New prototype.
* linux/dummy.h (sys_setns): Remove.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-05-13 23:22:47 +00:00
985425a30b mips: fix syscall entries that should have TP flag set 2014-05-12 20:37:48 +00:00
10b735a6f9 xtensa: fix unshare syscall entry 2014-05-12 20:37:48 +00:00
117d13d0de alpha, hppa, mips n64: fix waitid syscall entry 2014-05-12 20:37:48 +00:00
cd96f77ef8 Add TM flag to shmat and shmdt syscall entries 2014-05-12 20:37:20 +00:00
6556315493 Alias sys_vfork to sys_fork
* process.c (sys_vfork): Remove.
* linux/syscall.h (sys_vfork): Likewise.
* linux/dummy.h (sys_vfork): Alias to sys_fork.
* linux/alpha/syscallent.h: Fix vfork entry.
* util.c (setbpt): Do not check for sys_vfork.
* syscall.c (syscall_fixup_for_fork_exec): Likewise.
2014-05-12 20:26:24 +00:00
e51ce47b11 epoll_ctl: fix EPOLL_CTL_DEL argument decoding
* desc.c (sys_epoll_ctl): Do not parse the event structure for
EPOLL_CTL_DEL operation.

Reported-by: Марк Коренберг <socketpair@gmail.com>
2014-04-17 14:33:59 +00:00
fb7ae846c6 Update CLOCK_* constants
* time.c (clocknames): Add CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM,
CLOCK_BOOTTIME_ALARM, CLOCK_SGI_CYCLE, and CLOCK_TAI.
Fixes RH#1088455.
2014-04-17 14:18:13 +00:00
7845a42b39 Fix preadv/pwritev offset decoding
* util.c (printllval): Add align argument.
* defs.h (printllval): Update prototype.
(printllval_aligned, printllval_unaligned): New macros.
* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
sys_fallocate): Replace printllval call with printllval_aligned.
* io.c (sys_pread, sys_pwrite): Likewise.
(sys_preadv, sys_pwritev): Replace printllval call with
printllval_unaligned.
* linux/arm/syscallent.h: Set the number of preadv and pwritev
arguments to 5.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.

Reported-by: Dima Kogan <dima@secretsauce.net>
2014-04-17 13:39:49 +00:00
cc3d59199d tests: add a test for pread/pwrite and preadv/pwritev offset decoding
* tests/uio.c: New file.
* tests/uio.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add uio.
(uio_CFLAGS): Define.
(TESTS): Add uio.test.
2014-04-16 23:49:33 +00:00
99a0544f01 Refactor LDT decoding
* configure.ac (AC_CHECK_TYPES): Remove struct user_desc.
* ldt.c: New file.
* Makefile.am (strace_SOURCES): Add ldt.c.
* mem.c: Do not include <asm/ldt.h>.
(print_ldt_entry): Remove.
(sys_modify_ldt, sys_set_thread_area, sys_get_thread_area): Move...
* ldt.c: ... here.
* process.c: Do not include <asm/ldt.h>.
(sys_clone) [I386 || X86_64 || X32]: Use print_user_desc.
2014-04-10 15:29:13 +00:00
329fa3919d Make int3 example in comments more cut-n-pastable
I found that I use it quite often. Lets make it so that
after cut-n-pasting it into a file, there is no need
to edit the result (e.g. no need to remove C comment
chars from every line.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2014-04-10 09:57:17 +02:00
15bc281269 mips: enable decoding of set_thread_area
* linux/dummy.h [MIPS]: Do not redirect sys_set_thread_area to printargs.
* mem.c [MIPS] (sys_set_thread_area): Define.
2014-04-09 13:14:44 +00:00
662221cab3 x86_64, x32: enable decoding of modify_ldt, get_thread_area, and set_thread_area
* linux/dummy.h [X86_64 || X32]: Do not redirect sys_modify_ldt,
sys_get_thread_area, and sys_set_thread_area to printargs.
2014-04-09 12:46:05 +00:00
f94e84780e x32: decode clone LDT user_desc entries for x86 processes
* mem.c [X32]: Include asm/ldt.h.
[X32] (print_ldt_entry, sys_modify_ldt, sys_set_thread_area,
sys_get_thread_area): Define.
* process.c [X32]: Include asm/ldt.h.
(sys_clone) [X32]: Decode LDT entry if current_personality == 1.
2014-04-09 12:37:01 +00:00
44655a451e x86-64: decode clone LDT user_desc entries for x86 processes
* mem.c [X86_64]: Include asm/ldt.h.
[X86_64] (print_ldt_entry, sys_modify_ldt, sys_set_thread_area,
sys_get_thread_area): Define.
* process.c [X86_64]: Include asm/ldt.h.
(sys_clone) [X86_64]: Decode LDT entry if current_personality == 1.

Signed-off-by: Elliott Hughes <enh@google.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-04-09 12:36:47 +00:00
2c4fb25766 x32: fix clone(2) argument order for x86 processes
Apply the same fix that was made for x86_64.

* process.c [X32] (ARG_CTID, ARG_TLS): Take current
personality into account.
2014-04-09 12:34:58 +00:00
b563325f0a x86-64: fix clone(2) argument order for x86 processes
Without this patch, strace claims that parent_tidptr == tls, which is
clearly wrong.  It is expected that parent_tidptr == child_tidptr.

* process.c [X86_64] (ARG_CTID, ARG_TLS): Take current
personality into account.

Signed-off-by: Elliott Hughes <enh@google.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-04-09 12:33:12 +00:00
391c0d8cc5 aarch64: Fix decoding of arm struct stat64
We need to handle this situation more like x86-64.  32-bit arm and i386
actually have a common struct stat64, except the arm one must not be
packed.  Additionally, on aarch64 the 32-bit personality is personality 0.

Signed-off-by: Elliott Hughes <enh@google.com>
2014-04-06 23:25:36 +00:00
0160e16108 ARM EABI: disable OABI support by default
OABI is rarely used in ARM EABI systems nowadays, so disable its support
by default.  Add --enable-arm-oabi option to enable ARM OABI support.

* configure.ac: New option --enable-arm-oabi.
* syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by
configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro.
2014-03-20 22:21:51 +00:00
a07cfcc133 Fix stat decoding for LP64 bionic
Patch fb642bb6d6 fixed building with
HAVE_STAT64 for aarch64 with uapi kernel headers but not x86_64.
The workaround needed to be applied to all LP64 architectures, not
just aarch64.  This patch fixes that and adds an explanatory comment.

Signed-off-by: Elliott Hughes <enh@google.com>
2014-03-12 21:29:12 +00:00
2394a3d0e5 Decode protocol argument for PF_NETLINK sockets
* net.c (protocols): Rename to inet_protocols.
[PF_NETLINK] (netlink_protocols): New xlat structure.
(sys_socket): Rename protocols to inet_protocols.
[PF_NETLINK]: Decode protocol argument using netlink_protocols.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2014-03-11 22:56:42 +00:00
033fb910a2 Cleanup socketpair decoding
The only supported domain for socketpair syscall is AF_UNIX, so
no decoding related to other domains is required for socketpair.

* net.c (sys_socketpair): Remove support for PF_INET and PF_IPX domains,
print the protocol argument as is.
2014-03-11 22:50:39 +00:00
bc091e3ce1 printsiginfo: add SIGSYS decoding
* configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_syscall.
* signal.c (SYS_SECCOMP): Define if not yet defined.
(sigsys_codes): new xlat structure.
(printsiginfo): Decode SIGSYS.
2014-03-11 22:18:40 +00:00
b9d4d21a61 Update siginfo codes
* signal.c (siginfo_codes): Add SI_DETHREAD.
2014-03-11 01:57:02 +00:00
4a524dbbdf Factor out printing of si_pid and si_uid members of siginfo_t
* signal.c (printsigsource): New function.
(printsiginfo): Use it.
2014-03-11 00:47:01 +00:00
4dd1e89cb8 Improve SI_TIMER decoding
Decode siginfo_t more clearly for si_code SI_TIMER.
The 'pid' is actually a POSIX timer id, and the 'uid' is actually the
overrun.
Also factor out the si_value dumping so it's the same for every si_code.

Signed-off-by: Elliott Hughes <enh@google.com>
2014-03-10 19:33:49 +00:00
7a28f7f128 aarch64: fix decoding of arm syscall numbers
If an aarch64 strace is tracing a process using the arm personality, it
also needs to call the shuffle_scno function for the ARM-specific
syscalls.

* syscall.c (shuffle_scno): Define on AARCH64.
(get_scno) [AARCH64]: Call shuffle_scno when the tracee is in 32-bit mode.

Signed-off-by: Elliott Hughes <enh@google.com>
2014-03-03 23:54:14 +00:00
54cabefc75 Fix fcntl decoding
Assume that F_SETLK64, F_SETLKW64, and F_GETLK64 are either defined or
not defined altogether.
Do not assume that sizeof(off_t) < sizeof(long long) when F_SETLK64 is
undefined.

This change fixes build with musl libc on x86.

* configure.ac: Define SIZEOF_OFF_T.
* desc.c (USE_PRINTFLOCK64): New macro.
(struct flock64, printflock64): Do not define on X32.
(printflock): Replace X32 specific workaround with SIZEOF_OFF_T check.
Fix printing off_t members of struct flock.
(sys_fcntl): Use USE_PRINTFLOCK64.
2014-03-03 23:30:04 +00:00
ec21e07441 sys_fcntl: remove F_FREESP and F_FREESP64 support
F_FREESP and F_FREESP64 fcntl commands are not available in Linux
and therefore the code implementing their decoding is useless.
Besides that, F_FREESP64 decoding is too complicated to support.

* desc.c (fcntlcmds): Remove F_FREESP and F_FREESP64.
Remove F_FREESP64 from the check whether to define struct flock64.
(sys_fcntl): Remove F_FREESP and F_FREESP64 support.
2014-03-01 21:17:17 +00:00
458b3f2fd9 Add multi-personality support to struct old_sigaction decoding
struct sigaction is another structure that contains members
whose size differs between 32-bit and 64-bit personalities.

* signal.c [HAVE_SIGACTION] (old_sigaction32): New structure.
[HAVE_SIGACTION] (decode_old_sigaction): Decode 32-bit struct
old_sigaction on a 64-bit host.

Signed-off-by: Elliott Hughes <enh@google.com>
2014-02-28 23:35:21 +00:00
fb642bb6d6 Fix decoding of arm struct stat64 by aarch64 strace.
aarch64's uapi header files have a struct stat but no struct stat64.
To correctly decode a 32-bit process' s struct stat64 we need
HAVE_STAT64, but then the build fails because there is no struct stat64.
Luckily, the aarch64 struct stat is structurally equivalent to the arm
struct stat64, so we can just reuse that.

* file.c [AARCH64] (stat64): Define to stat.

Signed-off-by: Elliott Hughes <enh@google.com>
2014-02-28 23:35:05 +00:00
1d912aff16 Remove obsolete ioctlsort.c
The generic version of ioctlsort.c became obsolete after commit
v4.6-240-g5afdf12 that removed its last non-Linux users.

* ioctlsort.c: Remove.
* Makefile.am (EXTRA_DIST): Remove ioctlsort.c.

Reported-by: Elliott Hughes <enh@google.com>
2014-02-28 22:44:43 +00:00
d153bfc505 Add multi-personality support to stack_t decoding
stack_t is one of many structures that contain members
whose size differs between 32-bit and 64-bit personalities.

* signal.c (print_stack_t): Decode 32-bit stack_t on a 64-bit host.

Reported-by: Elliott Hughes <enh@google.com>
2014-02-27 22:35:39 +00:00
38593e942a Rewrite signal mask decoding without sigset_t
The sigset_t provided by libc is not quite convenient.
In glibc, sigset_t is an array with space for 1024 bits, which is much
more than required: all architectures supported by Linux have only 64
signals except MIPS, which has 128.
In bionic libc, LP32 sigset_t is only 4 bytes long, which is less than
necessary.

With this change, signal mask is decoded without use of intermediate
sigset_t structure, which saves us some cpu cycles in case of glibc with
its inflated sigset_t, and enables build with libcs where sigset_t is
broken.

Old implementation used to check each signal number in the given signal
mask twice using sigismember().
New implementation is based on popcount and next_set_bit() so it's
noticeably faster.

* configure.ac: Check for __builtin_popcount.
* signal.c: Ensure that NSIG >= 32.
(sprintsigmask, sprintsigmask_long, printsigmask): Remove.
(popcount32, sprintsigmask_n): New functions.
(tprintsigmask_addr, sprintsigmask_val, tprintsigmask_val): New macros.
(print_sigset_addr_len, sys_sigsetmask, sys_sigreturn, sys_siggetmask,
sys_sigsuspend, sys_sigprocmask, decode_new_sigaction): Update to use
new signal mask decoding interface.
* tests/sigaction.c (main): Add a test with almost filled signal mask.
* tests/sigaction.awk: Update.
2014-02-27 00:28:39 +00:00
d354130b3a Fix build with Bionic libc
Add generic tests for fopen64 and fputs_unlocked functions to fix build
with Bionic libc that does not provide them.

* configure.ac (AC_CHECK_FUNCS): Add fopen64 and fputs_unlocked.
* strace.c [_LARGEFILE64_SOURCE]: Use fopen instead of fopen64
if !HAVE_FOPEN64.
Use fputs instead of fputs_unlocked if !HAVE_FPUTS_UNLOCKED.
* vsprintf.c: Use fputs instead of fputs_unlocked
if !HAVE_FPUTS_UNLOCKED.

Reported-by: Elliott Hughes <enh@google.com>
2014-02-26 00:01:00 +00:00
a78d777c86 powerpc64: fix 64-bit process detection on embedded
* syscall.c (get_scno) [POWERPC64]: Fix 64-bit process detection
on embedded powerpc.

Signed-off-by: James Yang <james.yang@freescale.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-02-25 23:33:30 +00:00
fdb896e577 Do not compile scsi ioctl decoding if <scsi/sg.h> is not available
Add a generic test for <scsi/sg.h> availability to fix build with
Bionic libc that does not provide <scsi/sg.h>.

* configure.ac (AC_CHECK_HEADERS): Add scsi/sg.h.
* ioctl.c (ioctl_decode): Do not call scsi_ioctl if !HAVE_SCSI_SG_H.
* scsi.c: Do not compile scsi ioctl decoding if !HAVE_SCSI_SG_H.

Reported-by: Elliott Hughes <enh@google.com>
2014-02-25 23:15:20 +00:00
a7c6e5143c Revert "Add support for Altera's Nios-II softcore architecture"
The patch originally submitted by Ezequiel García was OK, but I somehow
managed to mangle it so that most of the patch was not applied.

According to Ezequiel García, an architecture port based on the generic
syscall ABI is in progress.

This reverts commit 61e426e87a.
2014-02-14 22:31:10 +00:00
b0c2a9dd5d tests: tighten sigaction check
* tests/sigaction.awk: Check that input conatins all expected lines.
2014-02-08 00:50:10 +00:00
5c7f627f05 Fix sigaction reporting on non-x86 architectures
If SA_RESTORER is not defined by libc headers but defined by kernel
headers, use the definition provided by kernel headers for proper
sigaction decoding.

* signal.c [!SA_RESTORER]: Define to ASM_SA_RESTORER if the latter is
defined, regardless of architecure.
2014-02-08 00:50:09 +00:00
ab3953b047 Check for SA_RESTORER definition in <asm/signal.h>
Kernel header <asm/signal.h> cannot be included from regular code
because it conflicts with libc headers, but SA_RESTORER is needed in
signal.c, so SA_RESTORER value is forwarded from <asm/signal.h> to
config.h using a configure check.

* configure.ac (ASM_SA_RESTORER): Define if SA_RESTORER is defined
in <asm/signal.h>.
2014-02-08 00:49:50 +00:00
ad138ccb80 arm: fix compilation warning
Fix "dereferencing type-punned pointer will break strict-aliasing rules"
warning introduced by commit v4.8-54-g670b21b.

* signal.c (sys_sigreturn) [ARM]: Avoid dereferencing type-punned pointers.
2014-02-07 18:02:39 +00:00
900ec1b042 kexec: fix typo
* kexec.c (print_kexec_segments) [SUPPORTED_PERSONALITIES == 1]: Fix typo.
2014-02-06 21:13:36 +00:00
61e426e87a Add support for Altera's Nios-II softcore architecture
This commit adds strace support for Altera's Nios-II official
kernel port as found in git://git.rocketboards.org/linux-socfpga.git

Notice that this an out-of-tree kernel architectural port, and uses the
legacy (non-generic) system call ABI. In particular, the port doesn't
support PTRACE_GETREGSET, so the implementation is based on PTRACE_GETREGS.

Given it's mandatory for new architectures to support the generic
syscall ABI and PTRACE_GETREGSET, if the nios2 architecure is ever
mainlined, the strace support will have to be re-factored accordingly.

* linux/nios2/ioctlent.h.in: New file.
* linux/nios2/syscallent.h: Likewise.
* Makefile.am (EXTRA_DIST): Add linux/nios2/ioctlent.h.in and
linux/nios2/syscallent.h.
* configure.ac: Add NIOS2 to the list of supported architectures.
* defs.h [NIOS2]: Use register reading system.
* process.c (struct_user_offsets): Add NIOS2 support.
* syscall.c (get_regs, get_scno, get_syscall_args,
get_syscall_result, get_error): Likewise.
* util.c (change_syscall): Likewise.
* mem.c (sys_getpagesize): Define on NIOS2.
* system.c [NIOS2] (sys_cacheflush, sys_nios2cmpxchg): New functions.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2014-02-06 20:48:36 +00:00
3acf4035ea Implement add_key, keyctl, and request_key decoding
* keyctl.c: New file.
* linux/keyctl.h: Likewise.
* Makefile.am (strace_SOURCES): Add keyctl.c.
(EXTRA_DIST): Add linux/keyctl.h.
* linux/dummy.h (sys_add_key, sys_keyctl, sys_request_key): Remove.
* linux/syscall.h (sys_add_key, sys_keyctl, sys_request_key): New
prototypes.
2014-02-05 23:41:50 +00:00
fc4727de60 Implement ioprio_get and ioprio_set decoding
* ioprio.c: New file.
* Makefile.am (strace_SOURCES): Add ioprio.c.
* linux/dummy.h (sys_ioprio_get, sys_ioprio_set): Remove.
* linux/syscall.h (sys_ioprio_get, sys_ioprio_set): New prototypes.
2014-02-05 18:03:46 +00:00
f67502e404 Implement finit_module decoding
* bjm.c (module_init_flags): New xlat structure.
(sys_finit_module): New function.
* linux/dummy.h (sys_finit_module): Remove.
* linux/syscall.h (sys_finit_module): New prototype.
2014-02-05 16:17:02 +00:00
2f332e937a Cleanup inotify syscalls decoding
* linux/inotify.h: New file.
* file.c (inotify_modes, inotify_init_flags, sys_inotify_add_watch,
sys_inotify_rm_watch, sys_inotify_init1): Move...
* inotify.c: ... here.
(inotify_modes): Rename to inotify_flags, convert to XLAT form.
(inotify_init_flags): Convert to XLAT form.
* Makefile.am (strace_SOURCES): Add inotify.c.
(EXTRA_DIST): Add linux/inotify.h.
2014-02-05 15:43:04 +00:00
9aaf88c000 Enhance reboot decoding
* linux/reboot.h: New file.
* system.c (bootflags1, bootflags2, bootflags3, sys_reboot): Move...
* reboot.c: ... here.
(bootflags2, bootflags3): Update constants.
* Makefile.am (strace_SOURCES): Add reboot.c.
(EXTRA_DIST): Add linux/reboot.h.
2014-02-05 14:51:19 +00:00
90aa9f4d72 Implement kexec_load decoding
* kexec.c: New file.
* linux/kexec.h: Likewise.
* Makefile.am (strace_SOURCES): Add kexec.c.
(EXTRA_DIST): Add linux/kexec.h.
* linux/dummy.h (sys_kexec_load): Remove.
* linux/syscall.h (sys_kexec_load): New prototype.
2014-02-05 14:25:20 +00:00
d21f186a94 Use prepared editions of recently imported linux headers
* linux/fanotify.h: Replace with edition prepared with headers_install.sh.
* linux/personality.h: Likewise.
2014-02-05 12:56:26 +00:00
99db95dd03 Implement fanotify_init and fanotify_mark decoding
* fanotify.c: New file.
* linux/fanotify.h: Likewise.
* Makefile.am (strace_SOURCES): Add fanotify.c.
(EXTRA_DIST): Add linux/fanotify.h.
* defs.h (print_dirfd): New prototype.
* file.c (print_dirfd): Export.
* linux/dummy.h (sys_fanotify_init, sys_fanotify_mark): Remove.
* linux/syscall.h (sys_fanotify_init, sys_fanotify_mark): New
prototypes.
* pathtrace.c (pathtrace_match): Handle sys_fanotify_init and
sys_fanotify_mark.
2014-02-05 04:55:21 +00:00
5945273533 Use XLAT_END macro
Automatically update all xlat structures using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/
2014-02-05 02:28:18 +00:00
82b1ea7c3f Itroduce XLAT_END macro to make xlat structures more compact
* defs.h (XLAT_END): New macro.
2014-02-05 02:28:17 +00:00
2a32eaa157 Convert personality_options to XLAT form
* linux/personality.h: New file.
* Makefile.am (EXTRA_DIST): Add it.
* system.c: Include <linux/personality.h>.
(personality_options): Update PER_* constants, convert to XLAT form.
2014-02-05 02:28:16 +00:00
9f56d87cc4 Convert futexops to XLAT form
* process.c: Define FUTEX_*_PRIVATE macros.
(futexops): Convert to XLAT form.
2014-02-05 02:28:00 +00:00
bae549e91b Convert sigev_value to XLAT form
* time.c (sigev_value): Convert to XLAT form.
(printsigevent32, printsigevent): Update use of sigev_value.
2014-02-05 01:46:10 +00:00
bce0cc6a2d Use XLAT macro
Automatically convert all xlat structures to XLAT form
using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*\([^",}[:space:]]\+\)[[:space:]]*,[[:space:]]*"\1",\?[[:space:]]*}[[:space:]]*/\tXLAT(\1)/
2014-02-05 01:33:50 +00:00
a69ddcb672 Introduce XLAT macro to ease maintenance of xlat structures
* defs.h (XLAT): New macro.

Suggested-by: Mike Frysinger <vapier@gentoo.org>
2014-02-05 01:28:45 +00:00
b88a6f877e Decode ptp ioctls
* defs.h (ptp_ioctl): New prototype.
* ioctl.c (ioctl_decode): Call ptp_ioctl when code is '='.
* Makefile.am (strace_SOURCES): Add ptp.c.
(EXTRA_DIST): Add linux/ptp_clock.h.
* ptp.c: New file.
* linux/ptp_clock.h: New file.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-02-04 00:03:08 +00:00
a5fea9060f Decode dynamic posix clocks
* time.c (cpuclocknames): New xlat structure.
(printclockname): New function that decodes posix clock names,
including dynamic fd encoded clocks.
(sys_clock_settime, sys_clock_gettime, sys_clock_nanosleep,
sys_clock_adjtime, sys_timer_create, sys_timerfd, sys_timerfd_create):
Use it.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
2014-02-03 22:24:09 +00:00
cdf022afa4 Update ADJ_* constants
* time.c (adjtimex_modes): Add ADJ_TAI, ADJ_SETOFFSET, ADJ_MICRO,
ADJ_NANO, ADJ_OFFSET_SS_READ.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
2014-02-03 22:16:50 +00:00
894c7e3858 Add decoding of sockets descriptor 'paths' for network calls
* net.c (sys_bind, sys_listen, do_accept, sys_send, sys_sendto,
sys_sendmsg, sys_sendmmsg, sys_recv, sys_recvfrom, sys_recvmsg,
sys_recvmmsg, sys_shutdown, sys_getsockopt, sys_setsockopt): Decode
socket descriptor arguments using printfd.
* pathtrace.c (pathtrace_match): Also check TRACE_NETWORK syscalls
that take socket descriptor arguments.
* tests/net-fd.test: New test for socket descriptor arguments decoding.
* tests/Makefile.am (TESTS): Add net-fd.test.
(net-fd.log): New dependency on net.log.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-02-02 16:51:22 +00:00
123d401508 tests: rename all tests so that their names end in .test suffix
Due to automake limitations, some features work only for tests
that end in one of the suffixes listed in TEST_EXTENSIONS.

* tests/detach-running: Rename to detach-running.test.
* tests/detach-sleeping: Rename to detach-sleeping.test.
* tests/detach-stopped: Rename to detach-stopped.test.
* tests/net: Rename to net.test.
* tests/ptrace_setoptions: Rename to ptrace_setoptions.test.
* tests/qual_syscall: Rename to qual_syscall.test.
* tests/sigaction.sh: Rename to sigaction.test.
* tests/stat: Rename to stat.test.
* tests/strace-f: Rename to strace-f.test.
* tests/Makefile.am (TESTS): Update.
(LOG_COMPILER): Rename to TEST_LOG_COMPILER.
2014-02-02 16:49:41 +00:00
aa4633c76e net: add more sockopt options
This syncs with the defines as available in linux-3.13.

* net.c (sockipoptions): Add IP_IPSEC_POLICY, IP_XFRM_POLICY,
IP_PASSSEC, IP_TRANSPARENT, IP_ORIGDSTADDR, IP_RECVORIGDSTADDR,
IP_MINTTL, IP_NODEFRAG, IP_UNBLOCK_SOURCE, IP_BLOCK_SOURCE,
IP_ADD_SOURCE_MEMBERSHIP, IP_DROP_SOURCE_MEMBERSHIP, MCAST_JOIN_GROUP,
MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE, MCAST_LEAVE_GROUP,
MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP, IP_MULTICAST_ALL,
IP_UNICAST_IF.
2014-01-31 00:11:49 +00:00
2b4bb1c445 mips: fix sigaction reporting
MIPS userland uses the same sigaction structure with a full signal
mask for old_sigaction and new_sigaction and does does not have
an sa_restorer field.

These changes have been tested on MIPS O32 big/little endian, MIPS N64
big endian and x86-64.

* signal.c (old_sigaction) [MIPS]: Add definition for MIPS.
(decode_old_sigaction) [MIPS]: Print sa_mask according to its definition.
(new_sigaction) [MIPS]: Add definition for MIPS.

Signed-off-by: Chris Dearman <chris.dearman@imgtec.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2014-01-08 17:48:48 +00:00
ac655a878e Factor out struct sigaction printing code
* signal.c [HAVE_SIGACTION] (decode_old_sigaction): New function.
[HAVE_SIGACTION] (sys_sigaction): Use it.
(decode_new_sigaction): New function.
(sys_rt_sigaction): Use it.
2014-01-08 17:48:34 +00:00
66a15a5bb8 tests: add a test for rt_sigaction output
Since "struct sigaction" varies between architectures, rt_sigaction
decoding sometimes produces incorrect output.  This test is expected
to catch basic rt_sigaction decoding bugs.

Based on a patch proposed by Chris Dearman.

* tests/sigaction.c: New file.
* tests/sigaction.awk: Likewise.
* tests/sigaction.sh: New test.
* tests/Makefile.am (check_PROGRAMS): Add sigaction.
(TESTS): Add sigaction.sh.
(EXTRA_DIST): Add sigaction.awk.
* tests/.gitignore: Add sigaction.
2014-01-08 17:48:25 +00:00
b5530a1f89 mem: add missed MAP_HUGETLB mmap flag
* mem.c (mmap_flags): Add MAP_HUGETLB mmap flag.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2014-01-05 22:00:46 +00:00
94e246ac57 Delete old PTRACE_{PEEK,POKE}USR logic
The code base has settled on PTRACE_{PEEK,POKE}USER (with an E) and has
logic in defs.h to make sure it's set sanely.  Delete this old logic as
the defs.h takes care of it now.

* process.c: Delete PTRACE_PEEKUSR/PTRACE_POKEUSR defines.
* signal.c: Likewise.
* syscall.c: Delete PTRACE_PEEKUSR define.
* util.c: Likewise.
2013-12-31 07:50:09 +00:00
5e7470386e Decode the O_PATH flag
* file.c (open_mode_flags): Add O_PATH.
2013-12-31 07:48:51 +00:00
5b35147cad Remove unused configure checks
* configure.ac (AC_CHECK_FUNCS): Remove _sys_siglist and sys_siglist.
(AC_CHECK_DECLS): Likewise.
2013-11-13 22:50:32 +00:00
03ef0b2665 Assume that <sys/ptrace.h> provides a valid ptrace prototype
We used to explicitly list architectures where <sys/ptrace.h> from glibc
is known to provide a valid prototype for ptrace, and use a homegrown
replacement for all the rest.  Situation seems to be better nowadays,
glibc is not the only libc available, so let's use ptrace prototype from
<sys/ptrace.h> by default, leaving the replacement for rare broken cases
if any.

* defs.h: Use ptrace prototype workaround iff
NEED_PTRACE_PROTOTYPE_WORKAROUND is defined.
2013-11-13 22:13:35 +00:00
0506f0f430 Stop using _LFS64_LARGEFILE
There is only one place left in the code where strace guesses whether
libc provides LFS64 functions and structures.  The most natural thing to
do there is to check for _LARGEFILE64_SOURCE - the macro provided by
glibc.  Other libc implementations that provide nondegenerate LFS64
interfaces are expected to define this macro as well.

* defs.h (_LFS64_LARGEFILE): Remove.
* strace.c: Use _LARGEFILE64_SOURCE instead of _LFS64_LARGEFILE.
2013-11-12 22:44:40 +00:00
157f98aac5 Define truncate64, ftruncate64, and getdents64 decoders unconditionally
These decoders are referenced by most architectures, there were no
undefined references so far because _LFS64_LARGEFILE appears to be
always defined by glibc when _GNU_SOURCE is defined.

* file.c (sys_truncate64, sys_ftruncate64, sys_getdents64): Define
unconditionally.
2013-11-12 22:25:06 +00:00
594eb8f8f8 Define printflock64 only if it is referenced by other code
* configure.ac (AC_CHECK_TYPES): Add struct flock64.
* desc.c (HAVE_F_SETLK64, HAVE_F_SETLKW64, HAVE_F_GETLK64): New macros.
[!HAVE_STRUCT_FLOCK64] (struct flock64): Define.
(printflock64): Define only if referenced by other code.
(sys_fcntl): Handle F_FREESP64, F_SETLK64, F_SETLKW64, and F_GETLK64 iff
these constants are defined and differ from their non-64bit versions.
2013-11-12 22:10:44 +00:00
6974bd4f5f Make PTRACE_PEEKUSER/PTRACE_POKEUSER checks less glibc specific
* configure.ac (AC_CHECK_DECLS): Add PTRACE_PEEKUSER and
PTRACE_POKEUSER.
* defs.h: Define PTRACE_PEEKUSER and PTRACE_POKEUSER only if
they are not provided by <sys/ptrace.h>.

Reported by John Spencer.
2013-11-12 21:20:50 +00:00
840a253bac Remove unneeded redefinitions of IPPROTO_* macros
IPPROTO_* macros are defined by <netinet/in.h>, no need to redefine
them.

* net.c (IPPROTO_EGP, IPPROTO_PUP, IPPROTO_IDP, IPPROTO_IGMP,
IPPROTO_RAW, IPPROTO_MAX): Remove.

Reported by John Spencer.
2013-11-12 16:13:43 +00:00
437ae19fc8 Remove unused AC_OFF_T_IS_LONG_LONG configure check
* configure.ac: Remove AC_OFF_T_IS_LONG_LONG.
* m4/long_long.m4: Likewise.
2013-11-12 15:43:06 +00:00
70e84c4e25 Remove unused code
* configure.ac (AC_CHECK_TYPES): Remove struct opthdr and
struct t_opthdr.
* net.c (print_sock_optmgmt): Remove.
2013-11-12 15:39:09 +00:00
e2de3bdd12 Use struct sigcontext instead of struct sigcontext_struct
* configure.ac (AC_CHECK_TYPES): Remove struct sigcontext_struct.
* signal.c (sys_sigreturn) [S390 || S390X || POWERPC || ALPHA): Replace
struct sigcontext_struct with struct sigcontext.

Reported by John Spencer.
2013-11-12 15:27:38 +00:00
e19a712aae Use standard names of sched_param structure members
* process.c (sys_sched_setscheduler, sys_sched_getparam,
sys_sched_setparam): Use portable struct sched_param member name
sched_priority instead of glibc specific __sched_priority.

Reported by John Spencer.
2013-11-12 15:12:16 +00:00
ae5aa47370 Make SIGEV_THREAD_ID decoding less glibc specific
SIGEV_THREAD_ID decoding requires access to an internal member of
struct sigevent.  There seems to be no portable way to do it besides
adding a configure check.

* configure.ac (AC_CHECK_MEMBERS): Check for
struct sigevent._sigev_un._pad and struct sigevent.__pad.
* time.c (printsigevent): Use an appropriate struct sigevent member
to print thread id.

Reported by John Spencer.
2013-11-12 15:00:13 +00:00
a0e02f5d52 Remove unused configure checks
* configure.ac (AC_CHECK_MEMBERS): Remove T_conn_res.QUEUE_ptr,
T_conn_res.ACCEPTOR_id, dqblk.dqb_curblocks, sigcontext.sc_hi2.
2013-11-11 15:59:49 +00:00
18bce8c23a Assume "long long" availability
Most of the code already uses long long types unconditionally.

* configure.ac: Remove the check for long long.
* file.c (printstat64): Remove HAVE_LONG_LONG checks, use %llu format
string unconditionally.
2013-11-11 15:58:20 +00:00
d64a7e4755 Include <sys/poll.h> only if there is no <poll.h>
* pathtrace.c: Do not include <sys/poll.h> if <poll.h> is available.
* stream.c: Likewise.
2013-11-11 15:27:01 +00:00
2b64034786 Move io_* syscalls decoding to a separate file
* desc.c (sys_io_setup, sys_io_destroy, sys_io_submit, sys_io_cancel,
sys_io_getevents, declarations from libaio.h): Move to ...
* aio.c: new file.
* Makefile.am (strace_SOURCES): Add aio.c.
2013-11-11 15:06:18 +00:00
2df03c494e Stop using external libaio.h.
This change incorporates a partial copy instead
of using external libaio.h.
Why?
Because we want to properly decode 32-bit aio calls
by 64-bit strace. For that, we need more definitions than
libaio.h provides.
(These defs are not done yet, but will eventually be done).
Keeping our local 32-bit compat defs in sync with libaio.h
_without seeing libaio structs_ is hard/more bug prone.
A smaller benefit is that we don't need libaio installed.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-11 12:50:47 +01:00
abd2fda380 sys_io_submit: simplify iocb_cmd_lookup() helper.
This helper returns two values (a string and an enum).
The caller prints the string. It's simpler to just print
the string in the caller itself. This eliminates
"return by reference" and more importantly, an intermediate
static string buffer for the string result.

Since function of the helper is different now,
it is renamed to tprint_lio_opcode().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-11 12:31:18 +01:00
ab24d51828 sys_io_submit: stop traversing iocb vector after first failure.
The program may use a very large nr but supply either outright
invalid iocbpp[], or one with far fewer elements than nr.
We used to try reading iocbpp[i] until i == nr.
With this change, we stop on the first failure.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-11 12:24:29 +01:00
64778cbfa6 Fix pathtrace_match() to match recent fixes to select decoding.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-09 20:46:55 +01:00
b338f2d65e Fix select decoding on e.g. 32-bit ppc process by 64-bit strace.
Added next_set_bit() function which finds the next set bit,
properly taking into account word size of the traced process.
Use it in decode_select() instead of fd_isset().
Also, properly round fdsize up to word size of traced process,
not to strace's word size.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-09 20:40:31 +01:00
1297a513da Speed up and explain fd_isset()
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-06 11:34:02 +01:00
85db86e6d9 Add a test for the latest select decoding fix
* test/select.c (main): Add a test for nfds larger than FD_SETSIZE.
2013-11-05 23:35:56 +00:00
c2982b5b72 Fix select decoding for glibc in _FORTIFY_SOURCE mode
glibc in _FORTIFY_SOURCE mode raises SIGABRT when descriptor greater
or equal to FD_SETSIZE is passed to FD_ISSET.  Select family syscalls,
however, can legitimately accept such descriptors.  To overcome this
limitation, we have to replace FD_ISSET with an equivalent that imposes
no such restrictions.

* desc.c (fd_isset): New function.
(decode_select): Use it instead of FD_ISSET.
2013-11-05 23:35:37 +00:00
f3696b3c8b More select decoding fixes
* desc.c (decode_select): Actually print arg[0] as int on entering
syscall.  When arg[0] is negative, do not attempt to fetch and decode
descriptor sets on entering syscall, kernel will reject it anyway.
On exiting syscall, stop checking descriptor sets as soon as all
returned descriptors are found.
2013-11-05 22:46:43 +00:00
1f65c3cd2a Truncate arg[0] to int in select decoding.
This matches kernel's behavior.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-05 16:20:16 +01:00
c4b9214a0f test/select.c: make comment more understandable.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-05 12:44:55 +01:00
025f1082b6 Fix select decoding with bogus (huge or negative) nfds.
We used to allocate and fetch bit arrays using a sanitized
length, but then iterate over them with "j < arg[0]" condition,
where arg[0] is not sanitized. This segfaults if arg[0] is huge
or negative. This change fixes this.

Add test/select.c to capture the case.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-05 11:54:51 +01:00
0b4060f61f Work around conflict between <sys/ptrace.h> and <linux/ptrace.h>
Since glibc-2.18~39 <sys/ptrace.h> defines ptrace_peeksiginfo_args
which collides with <linux/ptrace.h>.

* configure.ac: Check for `struct ptrace_peeksiginfo_args' in
<sys/ptrace.h>.
* process.c: Work around potential conflict between <sys/ptrace.h>
and <linux/ptrace.h> by redefining ptrace_peeksiginfo_args.
* signal.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.

Signed-off-by: Ali Polatel <alip@exherbo.org>
2013-09-26 13:08:43 +00:00
7daacbbbe7 Add support for ARC Cores from Synopsys
Take #2 on mainlining strace support for ARC (last one was 4.6 based back
in March 2011), see
http://sourceforge.net/p/strace/mailman/message/27210168/

The syscall ABI is asm-generic/unistd.h based (so no legacy syscalls),
hence very similar to metag port.

test/* all seem to work well.

* linux/arc/ioctlent.h.in: New file.
* linux/arc/syscallent.h: Likewise.
* Makefile.am (EXTRA_DIST): Add linux/arc/ioctlent.h.in and
linux/arc/syscallent.h.
* configure.ac: Add ARC to the list of supported architectures.
* defs.h: Add ARC support.
* process.c (struct_user_offsets): Likewise.
* signal.c (sys_sigreturn): Likewise.
* syscall.c (print_pc, get_regset, get_regs, get_scno, get_syscall_args,
get_syscall_result, get_error): Likewise.
* util.c (change_syscall): Likewise.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2013-09-11 14:44:54 +00:00
16b9dcf8b8 Add support for decoding sync_file_range
* file.c (sync_file_range_flags): New xlat structure.
(sys_sync_file_range, sys_sync_file_range2): New functions.
* linux/syscall.h (sys_sync_file_range, sys_sync_file_range2): New
prototypes.
* linux/dummy.h (sys_sync_file_range, sys_sync_file_range2): Remove.
* linux/mips/syscallent-o32.h: Set the number of sync_file_range
arguments to 7.
2013-09-11 14:21:33 +00:00
9e937d9c47 fanotify_mark: fix number of args for 32bit arches
The fanotify_mark func takes a 64bit mask, so 32bit arches have to split
it up into two fields.  When the syscall was added, it was listed as only
having 5 fields total (since that's correct for 64bit systems).

* linux/arm/syscallent.h: Set the number of fanotify_mark arguments to 6.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/metag/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/or1k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/tile/syscallent1.h: Likewise.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Chris Metcalf <cmetcalf@tilera.com> [for tile]
2013-09-11 13:58:26 +00:00
aca4ff79d1 x86, x86_64: fix compilation warnings
Fix "dereferencing type-punned pointer will break strict-aliasing rules"
warnings introduced by commit v4.8-52-gb51f364.

* signal.c (sys_sigreturn): Avoid dereferencing type-punned pointers.
2013-09-11 13:26:17 +00:00
a877379bcb Remove rt parameter from [s]printsigmask()
In almost all cases, the parameter was 1 ("decode RT sigs too").
This change hardwires it to be 1.

The cases where it was 0 are, and why the change to "decode RT sigs too"
is fine:

IA64: 64-bit arch, all 64 signals fit in one word in any case.
S390[x]: sc.oldmask is a sigset_t on kernel side,
	(sigset_t *)&sc.oldmask[0] does contain all 64 signals.
TILE: uc.uc_sigmask is a sigset_t on kernel side,
	memcpy(&sigm, &uc.uc_sigmask, NSIG / 8) copies all 64 signals.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 20:55:30 +02:00
75f4e1fb7d Convert some uses of long_to_sigmask+printsigmask to sprintsigmask_long
This allows to drop long_to_sigmask function,
and a whole bunch of sigset_t variables.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 20:55:30 +02:00
46c8acd16b Simplify some sigmask manipulations
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 20:55:30 +02:00
8a1ebbbee9 Add compat support for sys_pselect6
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 18:10:13 +02:00
e600ac67ee I386: fix signedness mismatch warning
&i386_regs.esp is a pointer to long, not unsigned long.
It needs a cast.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 17:40:45 +02:00
5e133aa684 Fix sigset printing via print_sigset().
Replace print_sigset() with print_sigset_addr_len(),
which takes not only addr, but also len parameter.
This allows us to drop "do we need to print RT signals?" parameter,
and this fixes RT signals printing in many syscalls.

sys_epoll_pwait: print RT signals too, print sigmask size argument.

sys_sigprocmask: print_sigset -> print_sigset_addr_len(current_wordsize),
no change in functionality.

sys_sigpending: use print_sigset_addr_len(current_wordsize)
instead of open-coding it.

sys_rt_sigprocmask: use print_sigset_addr_len instead of open-coding it.
sys_rt_sigpending: ditto.
sys_rt_sigsuspend: ditto.
sys_rt_sigtimedwait: ditto.

do_signalfd: print_sigset -> print_sigset_addr_len. This fixes
RT signals printing (wasn't showing them before).

sys_ppoll: ditto.

copy_sigset_len() is folded into its only user, print_sigset_addr_len(),
and copy_sigset() is gone.

While at it, checked kernel sources and noted where kernel enforces
sigset_size == NSIG / 8 (== sizeof(kernel_sigset_t)),
and where it allows word-sized sigset_size ([rt_]sigpending).

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 17:31:42 +02:00
80b73a24a9 sys_rt_sigaction: fix sigset copying
In practice, we always copy as many bytes as syscall param says
(8, or 16 on mips). However, malicious program can call sigaction
with wrong sigset size. Such syscall will result in EINVAL,
but we (strace) end up copying 128 bytes (sizeof(sigset_t)),
which copyes some garbage from stack after struct sigaction.

Now we always copy NSIG / 8 bytes (which is 8 bytes, or 16 on mips).

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 10:10:46 +02:00
94e10354d8 ARM: remove wrong NSIG = 32 define
ARM in fact has 64 signals (1..64), and NSIG should be 65
(as usual, rememebr that NSIG_libc == NSIG_kernel+1).

I carefully reviewed all usages of NSIG. In syscall.c,
the only usage is:
        for (i = 0; i <= NSIG; i++)
                if (strcasecmp(s, signame(i) + 3) == 0)...
which is safe even if NSIG is way too big - signame(i)
returns a well-formed string for any i.

In signal.c, memcpy(&sigset, &sc.sc_mask, NSIG / 8) is used by
IA64 and TILE code, so ARM change can't affect it. And final
usage is:
 struct new_sigaction::unsigned long sa_mask[NSIG / sizeof(long)];
It will grow on ARM (and become correct in the process).
Its only use is
 memcpy(&sigset, &sa.sa_mask, NSIG / 8);
 printsigmask(&sigset, 1);
which used to copy garbage in high bits, now it will copy actual data.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-18 09:41:20 +02:00
670b21b710 ARM: fix sigreturn decoding
Decoding of test/sigreturn testcase:
Was:
sigreturn() (mask [QUIT TRAP ABRT BUS SEGV USR2 PIPE STKFLT STOP XCPU VTALRM PROF WINCH IO PWR RTMIN]) = 0
Now:
sigreturn() (mask [CHLD RT_1 RT_3 RT_31 RT_32]) = 0

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-17 17:26:56 +02:00
76da831a41 Group USE_CUSTOM_PRINTF define with other tweakables
No code changes.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-16 12:18:59 +02:00
b51f364c42 Improve sigreturn decoding on x86 to show RT signal bits too.
This includes decoding of 32-bit sigreturn by 64-bit strace,
which previously wasn't done.

Added a test for it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-16 12:06:25 +02:00
9afc2ee682 powerpc: enhance 32/64bit detection
We were using uname to determine if userspace was 32 or 64bit.
This fails when we have a 64bit kernel and a 32bit userspace.

* configure.ac (powerpc*): Similar to x86, use a runtime test
to determine if we are 32 or 64bit.

Signed-off-by: Anton Blanchard <anton@samba.org>
2013-07-12 14:34:12 +00:00
9459dfb891 powerpc: fix some compiler warnings
Fix a number of differing signedness warnings when building on
powerpc.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-12 12:24:02 +02:00
a34deadbb3 powerpc: fix iflag build issue (static -> extern)
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-12 12:22:06 +02:00
c169d94718 PTRACE_SEIZE can set ptrace options immediately, use this feature
This eliminates some rare bugs, such as post-execve SIGTRAP
generation when we attach to a process, and it manages to finish
execve'ing before we set TRACEEXEC option to suppress that.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-10 14:36:28 +02:00
7c41ce2878 If -o|logger is in use, exit trace loop if nprocs == 0.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-08 13:55:04 +02:00
d2e1f42d8a Exit trace loop if got ECHILD, not if nprocs == 0.
Comment gives a testcase which wasn't handled correctly
by the old code.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-08 11:28:27 +02:00
f5730e9614 s390[x]: get rid of syscall_mode, delete code which never triggers
Before this change, the logic was as follows:
syscall entry:
  get_scno:
    syscall_mode = GPR2
    scno = syscall_mode unless syscall_mode == -ENOSYS
    (if -ENOSYS, scn is retrieved by decoding current insn)
  fixup:
    gpr2 = GPR2
    syscall_mode = scno unless syscall_mode == -ENOSYS
    if (gpr2 != syscall_mode) stray_entry
syscall exit:
  get_res:
    gpr2 = GRP2
  fixup:
    syscall_mode = scno unless syscall_mode == -ENOSYS
    if (WAITEXECVE && gpr2 in (-ENOSYS, scno)) gpr2 = 0;
  get_error:
    gpr2 is retval

Entry fixup's if() can never trigger:
regardless whether GPR2 is -ENOSYS or not, syscall_mode is always
equal to GRP2 value there. So it can be removed.

On sysexit path, syscall mode is never used.

Therefore, syscall_mode variable is deleted. grp2 is read from
GPR2 register in get_scno, redundant read in entry fixup is removed.
As a result, entry fixup's s390 code block vanishes completely.

gpr2 variable is renamed s390_gpr2 to match the convention used
by other arches.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-07 12:56:42 +02:00
8b7aa2b35d ARM: add STRACE_KNOWS_ONLY_EABI define which can be used to omit OABI support
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-04 09:54:19 +02:00
6162a3f34f Add paranoia check before passing a long to pid2tcb(int pid)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-04 09:26:24 +02:00
38eab5d6ea In debug output, show waitpid status with 6 hex digits, not 4
This shows event byte values better (without variable offset):

 [wait(0x01057f) = 29491] WIFSTOPPED,sig=SIGTRAP,EVENT_FORK (1)
 [wait(0x80057f) = 29492] WIFSTOPPED,sig=SIGTRAP,EVENT_STOP (128)
         ^^

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-02 12:18:22 +02:00
519af5ad34 Replace suspicious popen_pid assignment with an obviously correct one
popen_pid = vfork() does work correctly, but for a subtle reason
that wrong assignment of 0 happens in the child _first_,
and _then_ correct value overwrites it in the parent.

(And in a hyphothetical system where vfork = fork,
popen_pid wouldn't be shared, so it will also be ok.)

However, it's not necessary to be difficult.
This change makes it so that assignment is done only in parent.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-02 11:31:24 +02:00
d0ffdf494a Convert trace() from returning int to returning void
The cleanup sequence in error cases, and on normal code path
was nearly the same, no point in duplicating it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-01 13:02:33 +02:00
5a2483ba25 Remove ia64-specific printing of current address on signal delivery
The address is printed anyway by printleader() if -i is active.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-01 12:49:14 +02:00
c09646aa9e Rename ia32 to ia64_ia32mode, and make it bool, not long
Grepping for just ia32 was turning up many false positives.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-01 12:28:17 +02:00
4793221a53 Fold is_restart_error() into its sole user
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-30 23:53:49 +02:00
254b5a7a97 Update qemu_multiarch_testing/README
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-29 14:34:48 +02:00
d083016e03 sys_clone: add a comment about CLONE_PTRACE and CLONE_UNTRACED
No code changes.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-28 18:57:27 +02:00
44a6d04e5e POWERPC: get rid of "static long ppc_result"
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-28 16:47:38 +02:00
6b3016e435 POWERPC: read ppc_regs.nip if -i
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-28 14:51:50 +02:00
7eb893236c POWERPC: if GETREGS fails with EIO, don't try it again
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-28 14:41:30 +02:00
7f5a132c81 Get rid of powerpc_getreg(), it's a copy of upeek()
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-28 14:36:39 +02:00
752e5a02e6 Change upeek() to take pid, not full tcp.
This will be used by next change.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-28 14:35:47 +02:00
14d51a6423 powerpc: Provide a fallback for old kernels without PTRACE_GETREGS
PTRACE_GETREGS was added to the ppc kernel in 2.6.23. In order to
provide backward compatibility for very old kernels, add a manual
fallback.

* syscall.c (powerpc_getreg, powerpc_getregs_old): New functions.
(get_regs): Call powerpc_getregs_old if PTRACE_GETREGS is not supported.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 15:57:29 +02:00
ce6e33be1d powerpc: Use PTRACE_GETREGS to fetch all registers
* defs.h: declare ppc_regs and get_regs_error.
* signal.c (sys_sigreturn): Use ppc_regs instead of upeek.
* syscall.c: define ppc_regs.
(printcall): Use ppc_regs instead of upeek.
(get_scno): Replace multiple upeek calls with one PTRACE_GETREGS call.
(get_syscall_result): Likewise.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 15:56:53 +02:00
711b17c44b Another manpage tweak
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 15:40:13 +02:00
b5370530d5 Manpage update
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 15:35:16 +02:00
aeb6e30493 Update build_static_example.sh
Now it also contains a tested example of i686 build on 64-bit host.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 15:07:23 +02:00
c8511f07ab In -f mode, do not assume that new pid is stopped - handle exits too
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 14:58:03 +02:00
e8681c926c Set strace_child only in the right branch
"strace_child = pid" assignment was racing in NOMMU case
because of vfork (no way to know which process would win).

After this change, strace_child is set to nonzero only
in one process after [v]fork.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 14:58:03 +02:00
fadbf6679c Get rid of TCB_INUSE and TCB_STRACE_CHILD
We can use tcb::pid == 0 as an indicator of free tcb,
and we already have strace_child variable which holds
pid of our child, if any.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-26 14:58:03 +02:00
1b2bfbc825 Fix debug output of wait4 result (was reusing buf[] on unknown events)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-21 16:41:50 +02:00
4e020c0f4b Show PTRACE_EVENT_STOP correctly in debug output
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-21 16:33:56 +02:00
71d3d29a9d Panic a bit less when we see an unknown pid
I stumbeld over this case when I used "exec stace ...".

* strace.c (trace): Do not exit if we see an unknown pid in wait4.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-21 16:19:46 +02:00
e2567d54dd detach(): Reorganize code. Logic is the same.
* strace.c (detach): Use goto's instead of excessive nesting.
Drop sigstop_expected and interrupt_done variables.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-21 16:11:10 +02:00
a2de9dacec Eat pending SIGSTOP _before_ PTRACE_DETACH in detach()
* strace.c (detach): If TCB_IGNORE_ONE_SIGSTOP is set,
di not PTRACE_DETACH - wait for SIGSTOP first.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-21 15:50:41 +02:00
fdfa47af7e detach(): warn if we see ECHILD from waitpid
* strace.c (detach): Warn if we see ECHILD from waitpid.
Explain in comments that we don't normally expect !WIFSTOPPED
either, and also that PTRACE_CONT failure isn't expected
(the "break" there is a "I'm confused, bailing out" code style)..

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-20 15:34:12 +02:00
4a9ba989e6 Improve error messages in detach()
* strace.c (detach): Change return type from int to void.
Improve error meesages: show PID, tell exactly which operation fails.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-20 11:23:00 +02:00
725dd425a6 Remove workarounds for ancient kernels lacking __WALL
__WALL is available and working at least since 2.4 kernels: 10 years ago.

* strace (detach): Remove workarounds for ancient kernels lacking __WALL.
Add missing EINTR check.
(trace): Remove workarounds for ancient kernels lacking __WALL.
Remove redundant double error printout.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-20 11:23:00 +02:00
69e27ef244 USE_SEIZE: fix detaching from stopped processes
V3: split SEIZE/!SEIZE code paths to reduce confusion.
Extensively comment every possible case.
Verified that all tests/detach* tests work in both SEIZE and !SEIZE
cases.

* strace.c (detach): If PTRACE_SEIZE API is in use, stop the tracee
using PTRACE_INTERRUPT instead of sending it a SIGSTOP.
In a subsequent waitpid loop, correctly wait and suppress SIGSTOP
on detach if PTRACE_INTERRUPT wasn't used, or wait for any ptrace
stop and detach without suppressing signals.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-20 11:23:00 +02:00
0d7c3653c5 tests: disable /proc based checks when /proc is not mounted
* tests/detach-running: Disable /proc based checks when
/proc/self/status is not available.
* tests/detach-sleeping: Likewise.
* tests/detach-stopped: Likewise.
2013-06-19 14:57:05 +00:00
a815185d55 tests/detach-{running,sleeping,stopped}: check post-detach state
Check that traced process still exists and is in a right state
after strace detached from it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-19 16:37:24 +02:00
78460f8bb2 tests: ensure that strace can detach from running processes
* tests/detach-running: New test.
* tests/Makefile.am (TESTS): Add it.
2013-06-19 10:22:18 +00:00
223e9a6f85 tests: ensure that strace does not leave sleeping processes stopped
* tests/detach-sleeping: Do not send SIGCONT to the sleeping process.
2013-06-19 01:05:30 +00:00
3cb7a0cd00 tests: fix parallel-tests support in detach-* tests
* tests/detach-sleeping: Use $LOG file for set_ptracer_any output.
* tests/detach-stopped: Likewise.
2013-06-18 22:37:08 +00:00
1e0a28063f tests: parametrize "sleep 1"
* tests/init.sh (SLEEP_A_BIT): New variable.
* tests/detach-sleeping: Use it.
* tests/detach-stopped: Likewise.
2013-06-18 20:51:49 +00:00
97c85088a2 tests: ensure that strace can detach from sleeping and stopped processes
* tests/set_ptracer_any.c: New file.
* tests/detach-sleeping: New test.
* tests/detach-stopped: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add set_ptracer_any.
(TESTS): Add detach-sleeping and detach-stopped.
* tests/.gitignore: Add set_ptracer_any.
2013-06-18 17:07:48 +00:00
f60347d857 tests: enhance timeout checks
Run each test using a wrapper that does all necessary timeout checks.

* tests/run.sh: New file.
* tests/Makefile.am (EXTRA_DIST, LOG_COMPILER): Add it.
* tests/init.sh (check_strace, check_timeout): Remove.
* tests/detach-stopped: Update callers.
* tests/net: Likewise.
* tests/ptrace_setoptions: Likewise.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
2013-06-18 17:07:37 +00:00
3cf90b64ae tests: enable parallel-tests support
* configure.ac (AM_INIT_AUTOMAKE): Add parallel-tests.
2013-06-18 16:58:29 +00:00
107ceb935f tests: prepare for parallel-tests support
* tests/Makefile.am (CLEANFILES): Calculate dynamically from TESTS.
* tests/init.sh (LOG): New variable.
* tests/detach-stopped: Use it.
* tests/net: Likewise.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
2013-06-18 16:58:02 +00:00
f1669e7975 Cleanups. No logic changes.
* defs.h: Define new ptrace constants unconditionally.
* strace.c (detach): Fix comment.
(trace): Remove now unnecessary "if USE_SEIZE".

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-06-18 18:15:51 +02:00
02d2c708de maint: post-release administrivia
* NEWS: Add header line for next release.
2013-06-05 21:33:45 +00:00
1cd3f5f844 ioctlent: add UAPI support
* Makefile.am (IOCTLSORT_INCLUDEDIR): Define.
(ioctlsort): Use it.
* linux/ioctlent.sh (lookup_ioctls): Look into uapi directory tree.
Strip "uapi/" prefix from output path names.
* linux/ioctlent.h.in: Regenerate from v3.9 headers.
* NEWS: Mention it.
2013-06-03 16:24:53 +00:00
d845411e8c Prepare for 4.8 release
* NEWS: Update for 4.8 release.
* debian/changelog: 4.8-1.
* strace.spec: 4.8-1.
2013-06-03 12:34:56 +00:00
0db34e7dfa Fix "make dist" on recently added architectures
* Makefile.am (EXTRA_DIST): Add linux/aarch64/errnoent1.h,
linux/aarch64/ioctlent.h.in, linux/aarch64/ioctlent1.h,
linux/aarch64/signalent1.h, linux/aarch64/syscallent.h,
linux/aarch64/syscallent1.h, linux/metag/ioctlent.h.in,
linux/metag/syscallent.h, linux/or1k/ioctlent.h.in,
linux/or1k/syscallent.h, linux/tile/errnoent1.h, linux/tile/ioctlent1.h,
linux/tile/signalent1.h, linux/tile/syscallent1.h, linux/ubi-user.h,
linux/xtensa/ioctlent.h.in, and linux/xtensa/syscallent.h.
2013-06-02 18:12:44 +00:00
8e0b8bef34 Fix "make dist" regression introduced by commit v4.7-184-gd648f29
* Makefile.am (EXTRA_DIST): Add linux/ubi-user.h.
2013-06-02 18:09:44 +00:00
e8ff4c6f86 Do not suppress signal delivery messages with -qq
Current implementation of -qq does not allow suppressing exit status
messages without suppressing signal delivery messages, which is not
good.  There is a traditional "-e signal=none" syntax that can be used
to suppress all signal delivery messages.
This partially reverts commit v4.7-222-g01997cf.

* strace.c (trace): Do not suppress signal delivery messages with -qq.
* strace.1: Update documentation about -qq option.
2013-05-28 21:49:16 +00:00
5c0796f346 tile: use siginfo_t, not struct siginfo
As of glibc 2.16, "struct siginfo" is no longer supported,
and "siginfo_t" must be used instead.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-05-23 15:41:23 +02:00
d90a2d26c1 tile: remove MAP_CACHE_xxx support in mem.c
These flags support functionality in mmap() that has not been
pushed back to the community, and which may or may not eventually
end up being the final community model.  In the interim, having
these flags unconditionally present for "#ifdef TILE" just means
that the TILE build breaks if using the community versions of
the kernel and glibc, so just revert the code until such time
as it may end up in the community.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-05-23 15:40:34 +02:00
6c19136aca Rename COPYRIGHT to COPYING
The standard name people have adopted is "COPYING" rather than
"COPYRIGHT".  Use that as a lot of license scanning tools look for it.

* COPYRIGHT: Rename to ...
* COPYING: ... this.
* Makefile.am (EXTRA_DIST): Rename COPYRIGHT to COPYING.
* README: Likewise.
* strace.spec (%files): Likewise.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-17 23:18:55 +00:00
0eb7165588 Sync strace.spec and debian/ with packages
* debian/changelog: Sync with 4.7-1.
* debian/strace.docs: Likewise.
* strace.spec: Sync with 4.7-3.
2013-05-17 23:16:39 +00:00
f782201adf Update PTRACE_O_* constants
* process.c (ptrace_setoptions_flags): Sync with Linux 3.9.
2013-05-17 22:22:19 +00:00
ea0d2a60b1 Update AF_*, PF_*, MSG_*, and TCP_* constants
* net.c (domains, addrfams, protocols, socktcpoptions): Sync with
Linux 3.9.
2013-05-17 22:20:02 +00:00
1d2435b20b NOMMU: do not hide startup syscalls unless in -D mode
On NOMMU systems in "strace PROG" case, we have no way to attach to
the tracee before it calls execve unless in -D mode.  That is, the
first execve call is very likely to be missed, and setting
hide_log_until_execve just results to empty log.

* strace.c (init) [NOMMU_SYSTEM]: Do not set hide_log_until_execve
unless in -D mode.
2013-05-14 22:50:11 +00:00
882478a072 Make -D mode work when the Yama LSM is enabled
* strace.c [HAVE_PRCTL]: Include sys/prctl.h.
(startup_child) [HAVE_PRCTL && PR_SET_PTRACER && PR_SET_PTRACER_ANY]:
In -D mode, allow tracing the process that is going to become the
tracee.
2013-05-14 22:29:18 +00:00
7a0fb38386 Update PR_* constants
* process.c (prctl_options): Add PR_SET_PTRACER.
2013-05-14 21:20:58 +00:00
2a3d27552f Hide startup syscalls.
Tested with "./strace [-D] [-q] [-bexecve] env true",
all cases seem to work.

* defs.h: Declare new variable: bool hide_log_until_execve.
* strace.c: Define hide_log_until_execve.
Rename skip_startup_execve to skip_one_b_execve.
(startup_child): Do not set skip_one_b_execve = 1 here.
(init): If "strace PROG" case (as opposed to "strace -pPID"),
set skip_one_b_execve and hide_log_until_execve to 1.
(trace): Don't print signal messages if hide_log_until_execve == 1.
* syscall.c (trace_syscall_entering):
Skip syscall printing if hide_log_until_execve == 1.
Reset hide_log_until_execve if we enter execve syscall.
(trace_syscall_exiting): Skip syscall printing if hide_log_until_execve == 1.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-05-14 16:10:42 +02:00
01997cf32d Allow -q to be repeated for very quiet output
Even with the -q flag specified, tracing output is still mixed
with messages about signals and process exit status, which is
often irrelevant.  Allow the -q option to be repeated to force
the suppression of signals / exit status info too.

* defs.h: Change 'qflag' from 'bool' to 'unsigned int'.
* strace.1: Document ability to repeat '-q' option.
* strace.c: Allow '-q' to be repeated to quieten process
exit status and signal messages.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-05-13 14:11:31 +00:00
8190912d2e mips o32: fix syscall table
* linux/mips/syscallent-o32.h: Add entries for getpmsg, putpmsg,
get_mempolicy, set_mempolicy and vserver.  Fix names for umount,
umount2, mmap, mmap2, pread64, pwrite64, sigaltstack and fstatat64
syscalls.
2013-05-11 21:57:28 +00:00
b1e7cb1777 mips n64: fix syscall table
* linux/mips/syscallent-n64.h: Add entries for get_mempolicy,
set_mempolicy and timerfd syscalls.  Fix entry for socket syscall.
Fix names for pread64, pwrite64, shmat, rt_sigsuspend, sigaltstack
and umount2 syscalls.
2013-05-10 22:56:35 +00:00
26ff3f2af4 mips n32: fix syscall table
* linux/mips/syscallent-n32.h: Add entries for mbind, get_mempolicy,
set_mempolicy and timerfd syscalls.  Fix entry for socket syscall.
Fix handlers for truncate, ftruncate and getdents64 syscalls.
Fix names for pread64, pwrite64, shmat, rt_sigsuspend, sigaltstack,
umount2, and getdents64 syscalls.
2013-05-10 22:55:29 +00:00
f9236e6d76 sync_file_range: fix number of syscall arguments
* linux/avr32/syscallent.h: Set the number of sync_file_range arguments
to 6.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/or1k/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Change sync_file_range to
sync_file_range2, set the number of sync_file_range2 arguments to 6.
* linux/tile/syscallent.h: Change sync_file_range to sync_file_range2,
set the number of sync_file_range2 arguments to 4.
* linux/tile/syscallent1.h: Change sync_file_range to sync_file_range2.
update handler.
* linux/xtensa/syscallent.h: Likewise.
2013-05-08 17:03:24 +00:00
cbd4e922ac Add syscall entries for new linux syscalls
* linux/dummy.h: Add printargs aliases for sys_finit_module, sys_kcmp
and sys_sync_file_range2.
* linux/alpha/syscallent.h: Add entries for process_vm_readv
and process_vm_writev.
* linux/bfin/syscallent.h: Likewise.
* linux/arm/syscallent.h: Add entries for sync_file_range2, kcmp
and finit_module.
* linux/hppa/syscallent.h: Add entries for process_vm_readv,
process_vm_writev, kcmp and finit_module.
* linux/tile/syscallent.h: Likewise.
* linux/tile/syscallent1.h: Likewise.
* linux/ia64/syscallent.h: Add entry for finit_module.
* linux/i386/syscallent.h: Add entries for kcmp and finit_module.
* linux/m68k/syscallent.h: Likewise.
* linux/metag/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/or1k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
* linux/s390/syscallent.h: Add entries for s390_runtime_instr, kcmp
and finit_module.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Add entries for kern_features, kcmp
and finit_module.
2013-05-08 16:57:53 +00:00
56ef5ef90f tests/net: fix portability issues
* tests/net-accept-connect.c: Fix address length passed to bind()
and connect().
* tests/net: Update regexps.
2013-05-08 14:03:38 +00:00
47b0dcca2b tests: add a test for basic network syscalls
* tests/.gitignore: Add net-accept-connect, *.o and *.log.*.
* tests/Makefile.am (AM_CFLAGS): New variable.
(check_PROGRAMS): Add net-accept-connect.
(TESTS): Add net.
* tests/net-accept-connect.c: New file.
* tests/net: New file.
2013-05-08 02:06:39 +00:00
56fb81c696 tests: do not skip tests when timeout utility is not available
* tests/init.sh (check_timeout): New function.
* tests/ptrace_setoptions: Use it.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
2013-05-08 01:54:32 +00:00
de462cf99b Move subcall decoding configuration out of the common code
* Makefile.am (EXTRA_DIST): Add linux/subcall.h.
* linux/syscall.h (SYS_socket_subcall): Remove.
(SYS_socket_nsubcalls, SYS_ipc_subcall, SYS_ipc_nsubcalls): Move to ...
* linux/subcall.h: ... new file.
* linux/arm/syscallent.h: Define SYS_socket_subcall, include subcall.h.
* 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.

Suggested by Mike Frysinger and Chris Metcalf.
2013-05-07 16:06:58 +00:00
ebe3d3a640 sparc: remove some unused declarations and macros
* linux/syscall.h [SPARC || SPARC64] (sys_msgsys, sys_semsys,
sys_shmsys): Remove declarations.
[SPARC || SPARC64] (SYS_semsys_subcall, SYS_semsys_nsubcalls,
SYS_msgsys_subcall, SYS_msgsys_nsubcalls, SYS_shmsys_subcall,
SYS_shmsys_nsubcalls): Remove macros.
2013-05-07 19:03:26 +04:00
3883ab8438 mips: fix build regression
The recent commit (2690fadc8b) shuffled
the mips headers around causing it to check the ABI defines before it
included the header which set those up.  Now all mips builds fail with:
	In file included from count.c:36:0:
	defs.h:48:4: error: #error Unsupported _MIPS_SIM

* defs.h [MIPS]: Move sgidefs.h above _MIPS_SIM check.
2013-05-07 14:59:44 +00:00
f6c246f224 metag: rename llseek syscall to _llseek
The raw llseek syscall is called _llseek from userland, so fix the
naming of it for metag to allow the stat test to pass.

* linux/metag/syscallent.h: Rename llseek syscall to _llseek.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-05-07 13:12:41 +00:00
28927cd868 metag: disable socket and ipc subcall support
The metag architecture also uses dedicated syscalls and doesn't need to
multiplex ipc and socket subcalls.

* linux/syscall.h [METAG]: Do not define SYS_socket_subcall and
SYS_ipc_subcall.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-05-07 13:11:03 +00:00
5273cb7d60 pread, pwrite: fix number of syscall arguments
The number of pread and pwrite arguments depends on architecture and
personality.  For 64bit and ilp32 it equals to 4, for unaligned
32bit it equals to 5, and for aligned 32bit it equals to 6.

* linux/aarch64/syscallent1.h: Change the number of pread and pwrite
arguments to 4.
* linux/alpha/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/tile/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/or1k/syscallent.h: Change the number of pread and pwrite
arguments to 5.
2013-05-07 09:43:55 +00:00
ea5a079684 preadv, pwritev: fix number of syscall arguments
The number of preadv and pwritev arguments depends on architecture and
personality.  For 64bit and ilp32 it equals to 4, for unaligned 32bit
it equals to 5, and for aligned 32bit it equals to 6.

* linux/aarch64/syscallent1.h: Change the number of preadv and pwritev
arguments to 4.
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/tile/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Change the number of preadv and pwritev
arguments to 6.
* linux/sh/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
2013-05-07 09:43:54 +00:00
54aee7a38c ftruncate64, truncate64: fix number of syscall arguments
The number of ftruncate64/truncate64 arguments depends on architecture
and personality.  For 64bit and ilp32 it equals to 2, for unaligned
32bit it equals to 3, and for aligned 32bit it equals to 4.

* linux/or1k/syscallent.h: Change the number of ftruncate64 and
truncate64 arguments to 3.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Change ftruncate64 and truncate64 handlers.
* linux/sparc/syscallent.h: Change ftruncate64 handler, change the
number of its arguments to 3.
* linux/xtensa/syscallent.h: Change the number of ftruncate64 and
truncate64 arguments to 4.
2013-05-07 09:43:53 +00:00
eb1cc1568c fallocate: fix number of syscall arguments
The number of fallocate arguments depends on architecture and
personality.  For 64bit and ilp32 it equals to 4,
for 32bit it equals to 6.

* linux/aarch64/syscallent1.h: Change the number of fallocate arguments
to 4.
* linux/alpha/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/tile/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Set fallocate handler and flags.
2013-05-07 09:43:52 +00:00
3f4a41a55d fadvise64, fadvise64_64: fix handlers and number of syscall arguments
The number of fadvise64 arguments depends on architecture and
personality.  For 64bit and ilp32 it equals to 4, for unaligned
32bit it equals to 5, and for aligned 32bit it equals to 6.

The number of fadvise64_64 arguments is 4 for 64bit and ilp32, for
unaligned 32bit and most of aligned 32bit it equals to 6, and for
mips o32 it equals to 7.

* linux/alpha/syscallent.h: Set fadvise64 handler.
* linux/s390/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Set fadvise64_64 handler, change the number
of syscall arguments to 6.
* linux/ia64/syscallent.h: Change the number of fadvise64 arguments
to 4.
* linux/mips/syscallent-n32.h: Likewise.
* linux/tile/syscallent1.h: Change the number of fadvise64 arguments
to 5.
* linux/mips/syscallent-o32.h: Change the number of fadvise64_64
arguments to 7.
* linux/s390x/syscallent.h: Change fadvise64_64 handler.  Set fadvise64
handler.  Change numbers of fadvise64 and fadvise64_64 arguments to 4.
* linux/sh64/syscallent.h: Change fadvise64_64 handler.
Change numbers of fadvise64 and fadvise64_64 arguments to 4.
* linux/sparc/syscallent.h: Set fadvise64 and fadvise64_64 handlers,
change numbers of their arguments to 5 and 6.
* linux/x86_64/syscallent.h: Change fadvise64 handler.
2013-05-07 09:43:51 +00:00
2690fadc8b mips o32: raise the max number of syscall arguments to 7
On mips o32, fadvise64_64 takes 7 arguments.

* defs.h [LINUX_MIPSO32]: Raise MAX_ARGS to 7.
2013-05-07 09:43:50 +00:00
34c445b5c6 mips: split syscallent.h
linux/mips/syscallent.h consisted of several parts that had little in
common.  Split them into separate files to ease maintenance.

* linux/mips/syscallent-compat.h: New file.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/mips/syscallent.h: Include them.
* Makefile.am (EXTRA_DIST): Add them.
2013-05-07 09:43:04 +00:00
4996b3a352 readahead: fix number of syscall arguments
The number of readahead arguments depends on architecture and
personality.  For 64bit and ilp32 it equals to 3, for unaligned 32bit it
equals to 4, and for aligned 32bit it equals to 5.

* linux/aarch64/syscallent1.h: Set number of readahead arguments to 3.
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/or1k/syscallent.h: Set number of readahead arguments to 4.
* linux/sh/syscallent.h: Likewise.
* linux/tile/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Set number of readahead arguments to 5.
2013-05-07 01:56:09 +00:00
828bbd846e linux/syscall.h: make subcall decoding configuration more readable
* linux/syscall.h: Inverse and sort the subcall ifdef,
add a comment why subcall decoding support is not enabled
on some architectures.
2013-05-06 23:39:04 +00:00
2f6519a9c1 xtensa: disable socket and ipc subcall support
The Xtensa architecture also uses dedicated syscalls and doesn't
need to multiplex ipc and socket subcalls.

* linux/syscall.h [XTENSA]: Do not define SYS_socket_subcall and
SYS_ipc_subcall.

Signed-off-by: Chris Zankel <chris@zankel.net>
2013-05-06 23:18:28 +00:00
6b03c9b5ce Fix syscall flags
* linux/aarch64/syscallent1.h: Fix syscall flags for send.
* linux/alpha/syscallent.h: Fix syscall flags for fchdir, getcwd,
oldumount, sigaltstack, umount, uselib, and utimes.
* linux/arm/syscallent.h: Fix syscall flags for close, creat, dup, dup2,
fchdir, fchmod, fchown, fchown32, fcntl, fcntl64, fdatasync, flock,
fsetxattr, fsync, getdents, getdents64, ioctl, oldfstat, oldselect,
open, pipe, poll, pread, pwrite, read, readahead, readdir, readv,
select, socketcall, write, and writev.
* linux/avr32/syscallent.h: Fix syscall flags for inotify_init and
unshare.
* linux/bfin/syscallent.h: Fix syscall flags for pread64 and pwrite64.
* linux/hppa/syscallent.h: Fix syscall flags for fchdir, flistxattr,
getcwd, pause, signal, umount2, uselib, utime, and vfork.
* linux/ia64/syscallent.h: Fix syscall flags for creat, fchdir,
lstat, umount, uselib, and utimes.  Fix syscall handlers for
fgetxattr, flistxattr, fremovexattr, and fsetxattr.
* linux/m68k/syscallent.h: Fix syscall flags for close, creat, dup,
dup2, fchdir, fchmod, fchown, fchown32, fcntl, fcntl64, fdatasync,
flock, fsetxattr, getdents, ioctl, oldfstat, oldselect, open, pipe,
poll, pread64, pwrite64, read, readahead, readdir, readv, select,
socketcall, write, and writev.
* linux/metag/syscallent.h: Fix syscall flags for fanotify_init,
prlimit64, process_vm_readv, process_vm_writev, and quotactl.
* linux/microblaze/syscallent.h: Fix syscall flags for close, creat,
dup, dup2, fchdir, fchmod, fchown, fchown32, fcntl, fcntl64,
fdatasync, flock, fsetxattr, getdents, ioctl, oldfstat, oldselect,
open, perf_event_open, pipe, poll, pread64, pwrite64, read, readahead,
readdir, readv, select, socketcall, write, and writev.
* linux/mips/syscallent.h: Fix syscall flags for close, creat, dup,
dup2, fchdir, fchmod, fchown, fcntl, fcntl64, fdatasync, flock,
fsetxattr, getdents, getdents64, getxattr, ioctl, lgetxattr,
listxattr, llistxattr, lremovexattr, lsetxattr, oldfstat, open, pipe,
pivot_root, poll, pread, pwrite, read, readahead, readv, removexattr,
select, setxattr, socketcall, statfs, write, and writev.
* linux/or1k/syscallent.h: Fix syscall flags for fchdir and quotactl.
* linux/powerpc/syscallent.h: Fix syscall flags for fchdir.
* linux/sh/syscallent.h: Fix syscall flags for getcwd.
* linux/sparc/syscallent.h: Fix syscall flags for getresgid, getresuid,
setresgid, setresgid32, and setresuid.
* linux/xtensa/syscallent.h: Fix syscall flags for close, creat, dup,
dup2, fallocate, fchdir, fchmod, fchown, fcntl, fcntl64, fdatasync,
flock, fsetxattr, fstatfs, fstatfs64, fsync, getdents, getdents64,
ioctl, open, pipe, pivot_root, poll, pread64, pwrite64, read,
readahead, readv, rt_sigreturn, select, setfsgid, setfsuid, setuid,
swapoff, times, utime, write, and writev.
2013-05-06 20:43:35 +00:00
53f6795d75 tests/stat: enhance regexps
* tests/stat: Enhance regexps that check tracing of stat/stat64 and
fstatat/fstatat64 syscalls.
2013-05-06 19:15:09 +00:00
6f11acd360 tests/stat: support fstatat syscall for stat()
Newer Linux architectures don't support the stat/stat64 syscalls.
Instead they use fstatat() with AT_FDCWD and an extra flags argument.
Support seeing this output in the 'strace -efile' test.

As part of this change, use "grep -E -x" syntax consistently for
all stat tests, since the number of \(foo\)\? expressions was becoming
pretty unwieldy.

* tests/stat: Update stat/stat64 check regexp to handle architectures
that use fstatat instead.  Use "grep -E -x" syntax consistently.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-05-06 18:47:50 +00:00
8e096c4ec5 ARM OABI: fix 64-bit arguments decoding
ARM OABI and ARM EABI have different function parameters passing rules,
see commit v4.6-11-g7a5b08f for details.

* util.c (printllval): Do not align argument number in case of ARM OABI.
* file.c (sys_fadvise64_64): Likewise.
2013-05-06 18:23:01 +00:00
a32b683704 printllval: fix 64bit unpacking on mips/o32 and xtensa
The mips/o32 ABI and xtensa arch also do 64bit aligning, so add it to the
printllval list for this.

Normally for sys_fadvise64_64 we'd handle the same list of arches, but
mips/o32 ABI is funky and doesn't shift -- it has 7 args.  So just add
xtensa to it.

* file.c (sys_fadvise64_64): Add XTENSA to the shifted list.
* util.c (printllval): Add LINUX_MIPSO32 and XTENSA to the shifted list.
2013-05-06 18:13:34 +00:00
c7b2f0c74e tile: disable socket and ipc subcall support
The tile arch just has the dedicated syscalls, so disable
the logic for parsing subcalls.

* linux/syscall.h [TILE]: Do not define SYS_socket_subcall and
SYS_ipc_subcall.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-05-06 18:09:36 +00:00
6b572cfd2b Blackfin: disable socketcall and ipc subcall support
The Blackfin arch does not have a socketcall or ipc subcall
(it has dedicated syscalls broken out), so disable the logic for it.

* linux/syscall.h [BFIN]: Do not define SYS_socket_subcall and
SYS_ipc_subcall.
2013-05-06 18:08:39 +00:00
554c8beaab s390: fix # of args truncate64/ftruncate64 takes
* linux/s390/syscallent.h: Change nargs to 3 for truncate64/ftruncate64.
2013-05-05 21:19:23 +00:00
2f99788e8f mtd: clamp ubi name strings
Since the length fields with the ubi volnames are signed 16bit values,
make sure we clamp that number to the size of the buffer we've allocated
on the stack to prevent buffer overflows.

* mtd.c (ubi_ioctl): Clamp length to string_quote to 0/UBI_MAX_VOLUME_NAME.
Check the return of string_quote and tweak the output accordingly.
2013-05-05 08:15:24 +00:00
7a498be266 printxval: support more architectures
* configure.ac: Define SIZEOF_LONG_LONG.
* util.c (printllval): Handle all architectures with sizeof(long) > 4
and sizeof(long) == sizeof(long long).
2013-05-04 19:51:57 +00:00
80acf62207 Fix building for sparc64 targets
* util.c (printllval): Handle SPARC64 define.
2013-05-04 19:11:04 +00:00
921744d5e7 Fix building for mips n64 targets
* util.c (printllval): Handle LINUX_MIPSN64 define.
2013-05-04 15:58:45 +00:00
8d5f11585c hppa: fix stat64 and fstat64 decoding
* file.c [HPPA]: Do not redefine stat64 to hpux_stat64.
2013-05-03 23:47:17 +00:00
a55b6b193c arm, aarch64, ppc: fix printllval-based decoders
* util.c (printllval) [ARM || POWERPC]: Align argument number.
[AARCH64]: Align argument number in 32bit mode.
* file.c (sys_fadvise64_64) [ARM || POWERPC]: Remove no longer needed
printllval workaround.
[AARCH64]: Fix printing POSIX_FADV_* constants in 32bit mode.
2013-05-03 23:45:54 +00:00
d648f29cc3 Decode mtd/ubi ioctls
Been playing with UBI of late and it'd help if I could see what it was
doing.  Not entirely sure about the decoding of UBI_IOCVOLUP -- it takes
a pointer to a 64bit value, not a strict.

* util.c (MAX, MIN): Move to ...
* defs.h (MAX, MIN): ... here.
(CLAMP): Define.
(ubi_ioctl): New prototype.
* ioctl.c (ioctl_decode): Call ubi_ioctl when code is 'o' or 'O'.
* mtd.c: Include ubi user API header.
(ubi_volume_types): New enum decode.
(ubi_volume_props): Likewise.
(ubi_ioctl): Define.
* linux/ubi-user.h: Import from linux 3.8.
2013-05-02 22:50:55 +00:00
48d3159d67 test: add mtd/ubi test helpers
I used these to develop the mtd/ubi ioctl decoders.

* test/.gitignore: Add mtd/ubi.
* test/Makefile: Declare all tests in a PROGS var.
Declare build targets .PHONY.
(all): Depend on $(PROGS) instead of hardcoded list.
(clean): Remove $(PROGS) instead of hardcoded list.
* test/mtd.c: New file.
* test/ubi.c: Likewise.
2013-05-02 22:43:47 +00:00
b51ce62454 test: include headers for used funcs
These funcs use things like wait/write/read/strcmp but sometimes
don't include the right header for them.

* test/Makefile: Add -Wall to CFLAGS.
* test/clone.c: Include unistd.h.
* test/fork.c: Include sys/wait.h.
* test/sig.c: Include unistd.h.
* test/sigkill_rain.c: Include sys/wait.h.
* test/vfork.c: Include sys/wait.h.
* test/wait_must_be_interruptible.c: Include string.h
2013-05-02 22:41:50 +00:00
8582f881ee ia64: fix compilation warnings introduced by commit v4.7-174-g44f0ed1
* linux/ia64/syscallent.h: Undefine sys_oldlstat, sys_lstat and
sys_lstat64 before redefining them to printargs.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2013-05-02 22:14:21 +00:00
1970da0aa8 tests: stat: fix clean up of sample file
* tests/stat: Also rm the sample file at the end of the test.
2013-05-02 22:06:44 +00:00
d26d011078 Ignore more files
* .gitignore: Add gdb related files.
* tests/.gitignore: Ignore test logs.
2013-05-02 22:06:12 +00:00
7ae4a88285 x32: fix decoding of i386 truncate and ftruncate syscalls
* linux/x32/syscallent1.h: Remove sys_*truncate64 redirections.
2013-05-02 08:46:30 +00:00
0b46883339 x32: fix printllval-based decoders of i386 syscalls
* util.c (printllval) [X32]: Handle i386 personality.
2013-05-02 08:45:42 +00:00
318b0dde76 tests: add basic test for ftruncate, lseek and stat family syscalls
* tests/stat: New test.
* tests/Makefile.am (TESTS): Add stat.
2013-05-02 00:44:57 +00:00
0eeda2cdaa x32: fix build regressions introduced by commit v4.7-96-g8435d67
* desc.c (printflock) [X32]: Add special handling required for
this architecture with sizeof(long) < sizeof(off_t).
* file.c [X32] (struct stat64): Add __attribute__((packed)).
[X32] (HAVE_STAT64): Define.
(printstat) [X32]: Redirect to printstat64.
(printstat64) [X32]: Use "struct stat" instead of "struct stat64".
[X32] (realprintstat64): Rename to printstat64_x32.
(sys_stat64, sys_fstat64) [X32]: Remove second definitions of these
functions.  Call printstat64_x32 instead of printstat64
* linux/x32/syscallent.h: Fix handlers for truncate and ftruncate.
2013-05-01 22:39:10 +00:00
44f0ed1ca5 Alias sys_*lstat* syscall printing functions
* file.c (sys_lstat, sys_lstat64, sys_oldlstat): Remove.
* linux/dummy.h: Move !HAVE_STRUCT___OLD_KERNEL_STAT aliases forward.
(sys_lstat): Alias to sys_stat.
(sys_lstat64): Alias to sys_stat64.
(sys_oldlstat): Alias to sys_oldstat.
* linux/syscall.h (sys_lstat, sys_lstat64, sys_oldlstat): Remove.
* linux/x32/syscallent1.h (sys_lstat64): Remove.
2013-05-01 15:56:22 +00:00
e67e9f89ca x86_64: decode __old_kernel_stat based syscalls
* linux/x86_64/syscallent1.h: Remove sys_old*stat redirections.
2013-05-01 15:36:13 +00:00
bd2e28ac51 x32: fix decoding of __old_kernel_stat based syscalls
* file.c [X32] (struct __old_kernel_stat): Define.
* linux/x32/syscallent1.h: Remove sys_old*stat redirections.
2013-05-01 15:14:25 +00:00
554e6f3240 test/threaded_execve: fix on metag
The metag ABI has stacks growing upwards so clone expects the stack
argument to point at the bottom of the stack instead of the top.

* test/threaded_execve.c [__metag__]: Define clone2 differently
to avoid a segfault at runtime.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-05-01 14:55:54 +00:00
5cf23c53b8 test/skodic: make a bit more portable
* test/skodic.c (main): Don't use MAP_FIXED since valid virtual addresses
vary between architectures (as far as I can tell the use of MAP_FIXED is
not relevant to the test).  Also don't assume the file desriptor returned
by open call is 3 when passing it to mmap.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-05-01 14:54:05 +00:00
6303f35779 printllval: handle s390x
This is a 64bit arch w/no personalities, so fix printing.
It can now trace a simple call like readahead:
$ cat test.c
main(){readahead(-1, (unsigned long long)1 << 50, 0);}
$ gcc test.c
$ ./strace -ereadahead ./a.out
readahead(-1, 1125899906842624, 0)      = -1 EBADF (Bad file descriptor)

* util.c (printllval): Handle S390X define.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-01 14:49:52 +00:00
bb3a0f7ad3 Stop using old AM_CONFIG_HEADER macro
Building with automake-1.13 throws an error:
configure.ac:6: error: 'AM_CONFIG_HEADER': this macro is obsolete.
    You should use the 'AC_CONFIG_HEADERS' macro instead.

* configure.ac (AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADERS.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-01 02:47:57 +00:00
dce7593cab build: introduce git-version-gen
* .gitignore: Add .version.
* Makefile.am (EXTRA_DIST, BUILT_SOURCES): Add $(srcdir)/.version.
Add rules to check NEWS, generate $(srcdir)/.version and
$(distdir)/.tarball-version files.
Change ChangeLog and CREDITS generation rules to depend on
$(srcdir)/.version instead of $(srcdir)/.git/refs/heads/*.
* NEWS: Add dates to recent releases.
* configure.ac (AC_INIT): Use git-version-gen.
(AM_INIT_AUTOMAKE): Remove check-news.
* git-version-gen: Import from gnulib.
* make-dist: Check NEWS.
2013-04-30 23:52:12 +00:00
7ae73a91e9 Makefile.am: sort long lists to ease maintenance
* Makefile.am (strace_SOURCES, EXTRA_DIST): Sort, place one list element
per line.
2013-04-30 23:34:51 +00:00
07f022903e build: fix "make dist" regression introduced by commit v4.7-105-g7270de5
* Makefile.am (EXTRA_DIST): Remove linux/arm/syscallent1.h,
linux/arm/signalent1.h, linux/arm/ioctlent1.h and linux/arm/errnoent1.h.
2013-04-30 23:19:17 +00:00
3e3285c6f1 build: fix "make dist" regression introduced by commit v4.7-29-g17e3860
* Makefile.am (EXTRA_DIST): Add linux/ioctlent-filter.awk.
2013-04-30 23:19:16 +00:00
149d7de7e7 Blackfin: tweak sram_alloc syscall decode
* system.c (sys_sram_alloc): The 2nd argument of sram_alloc syscall
is a bit field, not a specific value, so decode it as such.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-30 21:55:54 +00:00
72cdefbb72 Print io_submit() offsets in decimal
This makes output formatting more consistent with pread()/pwrite(),
which print their offset parameters in decimal.

* desc.c (sys_io_submit): Change offset output format from %llx to %lld.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
2013-03-31 01:32:31 +00:00
d2ab7fd3a0 Fix building outside source directory
The file linux/ioctlent.h is generated in the build directory, so
"../ioctlent.h" won't find it.

* linux/aarch64/ioctlent1.h: Remove "../" from include file name.
* linux/powerpc/ioctlent1.h: Likewise.
* linux/tile/ioctlent1.h: Likewise.
* linux/x32/ioctlent1.h: Likewise.
* linux/x86_64/ioctlent1.h: Likewise.
* linux/x86_64/ioctlent2.h: Likewise.

Signed-off-by: Andreas Schwab <schwab@suse.de>
2013-03-31 00:40:04 +01:00
341d09a8fe AArch64: Fix printing of long long value
* util.c (printllval): Fix printing of long long values on
AArch64.

Signed-off-by: Andreas Schwab <schwab@suse.de>
2013-03-31 00:40:04 +01:00
b6593deac4 Update PR_* constants
* process.c (prctl_options): Add more PR_* constants from linux/prctl.h.
2013-03-27 14:57:39 +00:00
8f636ed128 Add support for the XTENSA architecture
* configure.ac: Add XTENSA to the list of supported architectures.
* defs.h: Add XTENSA support.
* linux/xtensa/syscallent.h: New file.
* linux/xtensa/ioctlent.h.in: Likewise.
* process.c (struct_user_offsets): Add XTENSA support.
* signal.c (sys_sigreturn): Likewise.
* syscall.c (printcall, get_scno, get_syscall_args,
  get_syscall_result, get_error): Likewise.
* util.c (change_syscall): Likewise.

Signed-off-by: Chris Zankel <chris@zankel.net>
2013-03-25 17:58:57 +00:00
6e5f5b3adb Add example script which builds static (possibly cross-compiled) strace
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-22 15:59:01 +01:00
c8938e08ad Use 64-bit versions of stat, readdir and setrlimit functions when available
strace already has a mechanism to use fopen64 for output when the 64-bit
version of fopen is available on 32-bit architectures.  Apply this
mechanism for other three functions to make strace fully adopted for
64-bit types.

* strace.c (struct_stat, stat_file, struct_dirent, read_dir,
struct_rlimit, set_rlimit): New macros.
(startup_attach): Use read_dir.
(startup_child): Use struct_stat and stat_file.
(main): Use struct_rlimit and set_rlimit.
2013-03-21 22:13:52 +00:00
68f80e6d1a Do not use struct dirent in readdir decoding
struct dirent from libc should not be used for umove'ing into because it
contains fixed size d_name.

* file.c (printdir): Rename to print_old_dirent.
[SH64]: Decode using struct kernel_dirent.
[!SH64]: Decode using an open-coded struct with 32-bit d_ino and d_off.
(sys_readdir): Update.
2013-03-20 21:20:13 +00:00
2c42f32518 Do not use off_t in sendfile decoding
sendfile parser used to decode off_t* parameter as a pointer to host
off_t type.  With this change, it is decoded as a pointer to target long
type.

* io.c (print_off_t): New function.
(sys_sendfile): Use it.
* linux/aarch64/syscallent1.h: Use sys_sendfile64 for sendfile decoding.
* linux/tile/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Use sys_sendfile64 for sendfile64 decoding.
* linux/metag/syscallent.h: Correct sendfile syscall name.
* linux/or1k/syscallent.h: Likewise.
2013-03-20 14:38:20 +00:00
3b211d8df0 Fix build with older versions of libaio.h
* configure.ac: When libaio.h is available, check for
struct iocb.u.c.flags, IO_CMD_PWRITE and IO_CMD_PWRITEV.
* desc.c (print_common_flags): Check for HAVE_STRUCT_IOCB_U_C_FLAGS.
(sys_io_submit): Check for HAVE_DECL_IO_CMD_PWRITE and
HAVE_DECL_IO_CMD_PWRITEV.
2013-03-18 23:28:29 +00:00
c108ba2dbb Fix io_submit decoding
* desc.c (print_common_flags, sys_io_submit): Add missing ", " to
SUB_COMMON output, remove extra ", " from SUB_VECTOR output.
2013-03-18 22:58:28 +00:00
066a733bc0 tests: relax check_prog to allow timeout command provided by busybox
Busybox version of timeout doesn't have --version option.
Relax check_prog to handle those cases.

* tests/init.sh (check_prog): Use type builtin to check program
availability.

Signed-off-by: Maxin B. John <maxin.john@enea.com>
2013-03-18 22:17:41 +00:00
b787b10e16 Reorganize get_regs code, hopefully without functional changes
* syscall.c [I386 || ARM || OR1K || METAG] (ARCH_REGS_FOR_GETREGSET):
New macro.
(get_regset): Implement for AARCH64, METAG, OR1K and X32.
(get_regs) [AARCH64 || METAG || OR1K || X32]: Use it.
2013-03-18 12:01:21 +00:00
faa177e3d9 arm, i386: use PTRACE_GETREGSET if available
* syscall.c [ARM || I386 || X86_64] (get_regset): New function.
(get_regs) [ARM || I386 || X86_64]: Use it.
2013-03-18 12:00:57 +00:00
32c049a9d8 Include <sys/uio.h> and <elf.h> on all architectures
* syscall.c: Include <sys/uio.h> and <elf.h> on all architectures.
2013-03-18 11:59:37 +00:00
27e3ae973a x86-64: enhance PTRACE_GETREGSET test
* syscall.c (get_regs) [X86_64]: Check whether PTRACE_GETREGSET
works regardless of the kernel version.
2013-03-18 11:46:36 +00:00
ee348c6073 x32: use PTRACE_GETREGSET unconditionally
* syscall.c (get_regs) [X32]: Assume that PTRACE_GETREGSET always works
regardless of the kernel version.
2013-03-18 11:46:35 +00:00
0482c5a21d x86-64, x32: do not include linux/ptrace.h unnecessarily
* syscall.c [X86_64 || X32]: Stop including linux/ptrace.h.
2013-03-18 11:46:32 +00:00
7d5696f11d i386, tile, x32: do not redefine ptrace prototype
* defs.h [I386 || TILE || X32]: Use ptrace prototype from sys/ptrace.h.
2013-03-18 11:46:26 +00:00
c41808bcd6 ptrace: decode note segment descriptor types
* configure.ac (AC_CHECK_HEADERS): Add elf.h.
* process.c: Include elf.h.
(nt_descriptor_types): New xlat structure.
(sys_ptrace): Use it.
2013-03-18 11:46:02 +00:00
3ec134b07a Update MADV_* constants
* mem.c (madvise_cmds): Add more MADV_* constants from
asm-generic/mman-common.h

Reported-by: Robin Hack <hack.robin@gmail.com>
2013-03-14 18:55:26 +00:00
8050cdc43c Tweaks for -c: fixed setitimer/getitimer hack; optimized call_summary_pers()
count_syscall() was calling setitimer/getitimer once in order to find
smallest "tick" OS uses in time accounting, in order to use it
for syscalls which apparently spent less than that time in syscall.
The code assumed that this "tick" is not zero... but it is zero
on linux-3.6.11. Which means that this hack doesn't work...

At least this change prevents this measurement from being done
_repeatedly_, by initializing one_tick to -1, not 0.

While at it, added comments in count_syscall() explaining what we are doing.

Optimized call_summary_pers() a bit, by eliminating redundant tv -> float
conversions, and prevented 0.0/0.0 which was resulting in "% time"
being shown as "-nan" if total CPU time spent was 0.000000
(try "strace -c /bin/true").

The code seems to seriously underestimate CPU usage:
"strace -c ls -lR /usr/share >/dev/null" shows total time spent
in syscalls to be only ~10..20% of what "time ls -lR /usr/share >/dev/null"
shows.

It might be useful to have a mode where we show wall clock time
spent in syscalls, not CPU time. It might also be more accurate.

   text	   data	    bss	    dec	    hex	filename
 245019	    676	   5708	 251403	  3d60b	strace_old
 244923	    684	   5676	 251283	  3d593	strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-07 12:27:40 +01:00
5198ed4bb3 Open-code isprint(c) and isspace(c)
We don't call setlocale, thus we always use C locale.
But libc supports various other locales, and therefore
its ctype interface is general and at times inefficient.
For example, in glibc these macros result in function call,
whereas for e.g. isprint(c) just c >= ' ' && c <= 0x7e
suffices.

By open-coding ctype checks (we have only 4 of them)
we avoid function calls, we get smaller code:

   text	   data	    bss	    dec	    hex	filename
 245127	    680	   5708	 251515	  3d67b	strace_old
 245019	    676	   5708	 251403	  3d60b	strace

and we don't link in ctype tables (beneficial for static builds).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-06 23:44:23 +01:00
76f61bec5e Makefile: add commented-out tweak to generate link map
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-06 18:59:09 +01:00
61ad0a401c Stop using a large static buffer in getfdpath
text	   data	    bss	    dec	    hex	filename
 245075	    680	   9836	 255591	  3e667	strace_old
 245143	    680	   5708	 251531	  3d68b	strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-06 18:24:34 +01:00
7672946e74 Fix wrongly indented closing curly brace. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 17:46:19 +01:00
dafba9bb99 strace_vfprintf: if malloc fails, exit gracefully
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 17:29:18 +01:00
c76a363af8 Use sysconf(_SC_PAGESIZE) instead of hardcoded PAGE_SHIFT
PAGE_SHIFT couldn't be reliably obtained at compile time,
thanks to Chris Metcalf for the hint.

* mem.c: Do not include <sys/user.h>.
[SH64] Do not include <asm/page.h>.
(get_pagesize): New function.
(sys_mmap_pgoff, sys_old_mmap_pgoff): Use it.
2013-03-05 16:03:53 +00:00
aba6292797 Emit better message for ERESTARTNOHAND return
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 16:56:35 +01:00
cc90291f4b Disable STREAMS syscalls for non-SPARC
text	   data	    bss	    dec	    hex	filename
   3002	      0	   1024	   4026	    fba	stream.o.old
   1729	      0	   1024	   2753	    ac1	stream.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 16:50:12 +01:00
e7db46503d Fix printstrbufarg's address argument to be long, not int
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 16:17:46 +01:00
38cfe7c923 Remove variable tracing_paths and check in pathtrace_match
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 16:01:53 +01:00
7239dbcf2d Use dynamically-sized selected[] array for -P PATH
While at it, added a small optimization of not remembering
the path twice if it happens to be the same.

   text	   data	    bss	    dec	    hex	filename
 245111	    680	  10860	 256651	  3ea8b	strace_old
 245075	    680	   9804	 255559	  3e647	strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 15:46:34 +01:00
f877982aa2 metag,or1k: whitesace style fix. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 14:03:07 +01:00
99d3e01eef Assorted fixes to syscallent.h
or1k was missing TM on many memory-related syscalls
sys_lookup_dcookie is 3-arg on 64-bit arches, and isn't TF
sys_recvmsg is 3-arg on all arches
sys_nfsservctl is 3-arg on all arches
sys_timerfd_create is 2-arg on all arches
sys_[f]truncate64 is 4-arg or 3-arg, never 5-arg
truncate64 is TF
sys_[l]lseek is TD
fstat[64] is TD

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 13:59:45 +01:00
5f999a869b Add support for Imagination Technologies Meta
Add support for Imagination Technologies Meta architecture (the
architecture/ABI is usually referred to as metag in code). The Meta
Linux kernel port is in the process of being upstreamed for v3.9 so it
uses generic system call numbers.

sys_lookup_dcookie writes a filename to buffer argument, so I've set
TF flag.
nfsservctl appears to be set to sys_ni_syscall in asm-generic/unistd.h
so I've left it blank.
truncate64/ftruncate64/pread64/pwrite64/readahead have unaligned 64bit
args which are packed tightly on metag, so less arguments on metag.
fchdir/llseek takes a file descriptor so s/TF/TD/
sync_file_range has 2 64bit args so uses 6 args, so s/4/6/
timerfd_create/msgget/msgctl/msgrcv/semget/segtimedop/semop/shmget/
shmctl/shmat/shmdt/recvmsg/migrate_pages have different number of args.
oldgetrlimit is just getrlimit for metag.
add TM flag to various memory syscalls.
metag doesn't directly use sys_mmap_pgoff for mmap2.
prlimit64/process_vm_readv/process_vm_writev take a pid so add TP flag.
fanotify_init doesn't appear to take a file descriptor so remove TD.
Add kcmp syscall.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Christian Svensson <blue@cmd.nu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-05 12:57:06 +01:00
1694092d7d umovestr: speed up check for NUL byte in the fetched word
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-01 18:52:59 +01:00
7b9e45e891 Fix trace=set regression introduced by commit v4.7-111-g9cbc15b
* syscall.c (qual_syscall, qualify): Pass personality down to
qualify_one.
* tests/qual_syscall: New test.
* tests/Makefile.am (TESTS): Add qual_syscall.
2013-03-01 16:22:02 +00:00
879ddddeba tile: handle printllval like x86_64 or powerpc64
Without this fix the tilegx build fails when it hits the new #error
about SIZEOF_LONG > 4.

* util.c (printllval): Fix printing of long long values on TILE.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-01 10:41:02 +01:00
22efaf0028 Make -b take SYSCALL param, document it in --help and in manpage.
To not waste an option letter for just one trick,
extend -b to take a parameter:
"on which syscalls do you want to detach?".
Currently supports only execve.

While at it, fixed (by removing non-Linux and stale info)
and extended manpage text about -f.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-27 12:15:19 +01:00
9700592e49 Cleanup umoven and umovestr
Cleanup sloppy error handling.

First, EFAULT kind of errors from process_vm_readv by itself is not
something unusual, so a warning message will not be issued unless a
short read is detected.

Second, clients of umoven and umovestr are not prepared to detect and
handle short reads that can happen in these functions.  The most safe
way to handle them is to return an error code.

* util.c (umoven, umovestr): Cleanup handling of errors coming from
process_vm_readv and PTRACE_PEEKDATA.
2013-02-26 22:11:32 +00:00
1a880cf3bd pathtrace: fix umovestr return code check
* pathtrace.c (upathmatch): Only NUL-terminated strings can be
path-matched, so fix the umovestr return code check to filter out
unsuitable strings.
2013-02-26 22:11:29 +00:00
e6f55240a1 Fix compilation errors uncovered by -Werror=enum-compare
This fixes regression introduced by commit v4.7-111-g9cbc15b.

* syscall.c: Merge all nsyscalls* enums into single enum.
Likewise merge nerrnos*, nsignals*, and nioctlents* into single enums.
2013-02-26 22:07:55 +00:00
905e8e0e2f Mass replace error_msg("%s", "literal") -> error_msg("literal")
There is no need to print literal strings through "%s".
Only untrusted strings such as filenames need that.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-26 12:30:09 +01:00
1d58fe9b3b Make umoven report success as 0, not >=0, stop returning success on partial reads
umoven() uses process_vm_readv() when available but it returns the
return value of that syscall, which is the number of bytes copied,
while its callers expect it to simply return zero on success.

It was causing syscalls that take a user-space argument to print
the abbreviated version, e.g.:

  epoll_ctl(5, EPOLL_CTL_ADD, 10, {...})

Instead of:

  epoll_ctl(5, EPOLL_CTL_ADD, 10, {EPOLLIN, {u32=10, u64=10}})

* util.c (umoven): Make umove[n] report success as 0, not >=0,
stop returning "success" on partial reads.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-26 12:24:25 +01:00
05f325199a Assorted NOMMU fixes
With -D, strdup'ing of pathname is necessary only on NOMMU.

Don't set skip_startup_execve to 1 if NOMMU and not in daemonized mode
(try "strace [-D] -b env echo HI" to see whether we detach on correct execve).

Fix test_ptrace_FOO shortcuts on NOMMU to always assume success
and _properly_ set all variables.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-26 12:00:34 +01:00
38e79bbb25 Shorten help text - no need to show deprecated option -F
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-26 11:33:54 +01:00
859ea8b8cc Merge adjacent tprint's
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-23 20:07:44 +01:00
b43dacd6d1 Correct i > MAX_NSYSCALLS commparison: should be i >= MAX_NSYSCALLS
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-23 18:19:28 +01:00
f90979b701 Fix wrong offset display in dumpstr
BTW, the new code from prev commit is 5 times faster
than old one :)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-22 15:00:11 +01:00
763258071c Fix a bug in dumpstr (no null termination). Essentially rewrote dumpstr
This is a 14 year old bug (!).

It wasn't biting us merely because outstr[80] was static, thus ended up
in bss and whatever was after it "accidentally" provided the NUL byte.
When dumpstr was changed to use on-stack buffer, the bug reared its ugly head.

This is a rewrite which is smaller and should be significantly faster
for _long_ strings.

   text	   data	    bss	    dec	    hex	filename
 244627	    680	  10860	 256167	  3e8a7	strace.t9/strace
 244563	    680	  10860	 256103	  3e867	strace.ta/strace

* util.c (dumpstr): Rewrite to be faster and smaller.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-22 14:47:39 +01:00
9cbc15b7e7 Eliminate MAX_QUALS, make qualifier array dynamic
MAX_QUALS was 2048, even though most arches used less than 500 entries
in it. MAX_QUALS had to be maintained by hand to be higher than syscall
count. It also limited the highest possible fd to track.

This change makes qual_flagsN[] arrays start sized to the required minimum
(number of syscalls) and grow dynamically if user requested
-e read=BIGNUM. As a precaution, BIGNUM should be < 2^15, but this limit
can be raised with no cost for normal strace invocations.

qual_flags is now a define to qual_vec[current_personality].

As a bonus, this patch aliases sysent, errnoent, signalent, ioctlent
names in one-personality arches to their corresponding <foo>0 arrays,
removing one indirection level.

  text   data    bss    dec    hex filename
244471    700  12928 258099  3f033 strace.t7/strace
244627    680  10860 256167  3e8a7 strace.t8/strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-22 13:37:36 +01:00
a9fe13c943 Create and use struct_sysent and struct_ioctlent typedefs.
This is a preparatory mass replace patch with no code changes.

The future change will need to typedef sysent to sysent0,
which results in compile failures when "struct sysent" string
gets mangled into "struct sysent0".

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-22 13:26:10 +01:00
40d63b9a92 Use tcp->qual_flg instead of qual_flags[] in verbose() and abbrev()
We have hundreds of uses of these macros.
Result is more efficient and 1.1 kbyte shorter code:

  text	   data	    bss	    dec	    hex	filename
245579	    700	  12928	 259207	  3f487	strace.t5/strace
244471	    700	  12928	 258099	  3f033	strace.t6/strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-22 13:23:38 +01:00
c1540fe19d Remove unused QUAL_FAULT code (was used by non-Linux code only).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-21 16:17:08 +01:00
a585c9d641 Use uint8_t for qual_flags[] instead of ints.
Resulting bss reduction is ~6kbytes:

   text	   data	    bss	    dec	    hex	filename
 245703	    700	  19072	 265475	  40d03	strace.t4/strace
 245687	    700	  12928	 259315	  3f4f3	strace.t5/strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-21 16:15:43 +01:00
74ec14f968 Eliminate many SCNO_IS_VALID checks
By adding tcp->s_ent pointer tot syscall table entry,
we can replace sysent[tcp->scno] references by tcp->s_ent.
More importantly, we may ensure that tcp->s_ent is always valid,
regardless of tcp->scno value. This allows us to drop
SCNO_IS_VALID(tcp->scno) checks before we access syscall
table entry.

We can optimize (qual_flags[tcp->scno] & QUAL_foo) checks
with a similar technique.

Resulting code shrink:
   text    data     bss     dec     hex filename
 245975     700   19072  265747   40e13 strace.t3/strace
 245703     700   19072  265475   40d03 strace.t4/strace

* count.c (count_syscall): Use cheaper SCNO_IN_RANGE() check.
* defs.h: Add "int qual_flg" and "const struct sysent *s_ent"
to struct tcb. Remove "int u_nargs" from it.
Add UNDEFINED_SCNO constant which will mark undefined scnos
in tcp->qual_flg.
* pathtrace.c (pathtrace_match): Drop SCNO_IS_VALID check.
Use tcp->s_ent instead of sysent[tcp->scno].
* process.c (sys_prctl): Use tcp->s_ent->nargs instead of tcp->u_nargs.
(sys_waitid): Likewise.
* strace.c (init): Add compile-time check that DEFAULT_QUAL_FLAGS
constant is consistent with init code.
* syscall.c (decode_socket_subcall): Use tcp->s_ent->nargs
instead of tcp->u_nargs. Set tcp->qual_flg and tcp->s_ent.
(decode_ipc_subcall): Likewise.
(printargs): Use tcp->s_ent->nargs instead of tcp->u_nargs.
(printargs_lu): Likewise.
(printargs_ld): Likewise.
(get_scno): [MIPS,ALPHA] Use cheaper SCNO_IN_RANGE() check.
If !SCNO_IS_VALID, set tcp->s_ent and tcp->qual_flg to default values.
(internal_fork): Use tcp->s_ent instead of sysent[tcp->scno].
(syscall_fixup_for_fork_exec): Remove SCNO_IS_VALID check.
Use tcp->s_ent instead of sysent[tcp->scno].
(get_syscall_args): Likewise.
(get_error): Drop SCNO_IS_VALID check where it is redundant.
(dumpio): Drop SCNO_IS_VALID check where it is redundant.
Use tcp->s_ent instead of sysent[tcp->scno].
(trace_syscall_entering): Use (tcp->qual_flg & UNDEFINED_SCNO) instead
of SCNO_IS_VALID check. Use tcp->s_ent instead of sysent[tcp->scno].
Drop SCNO_IS_VALID check where it is redundant.
Print undefined syscall name with undefined_scno_name(tcp).
(trace_syscall_exiting): Likewise.
* util.c (setbpt): Use tcp->s_ent instead of sysent[tcp->scno].

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-21 16:13:47 +01:00
7270de551c ARM: make it one-personality arch
ARM in fact _is_ one personality.

We had two personalities for it because it has a handful of
syscalls with huge scnos (0x000f00xx).

Extending syscall table to have [0x000f0005] index is of course
not a good idea.

Someone decided to handle that by having a separate personality
just for these syscalls.

But multi-personality arch does a bit more work in other parts.

This patch is another alternative: "move" 0x000f00nn syscalls
down to the entries just above last ordinary syscall,
by manipulating scno if it falls into the 0x000f00xx range.

In order to not worsen genuine undefined scnos' printing,
the code remaps scno back to actual value before printing
"syscall_NNN" string.

* defs.h: Remove multi-reprsonality defines from ARM.
* syscall.c (shuffle_scno): New function.
(undefined_scno_name): New function.
(get_scno): [ARM] Replace personality setting with scno shuffling.
(trace_syscall_entering): Print unknown syscall name using
undefined_scno_name().
(trace_syscall_exiting): Likewise.
* linux/arm/syscallent.h: Add ARM specific syscalls at the end.
* linux/arm/errnoent1.h: Deleted.
* linux/arm/ioctlent1.h: Deleted.
* linux/arm/signalent1.h: Deleted.
* linux/arm/syscallent1.h: Deleted.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-21 15:46:34 +01:00
e7030e5a7e arm: shorten syscall table for EABI - no point in storing NULL entries
Also, reformatted ARM code in get_scno(), mostly improved comments,
without code changes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-20 18:08:25 +01:00
4bfb198db1 Use the same style of includes in linux/*/* files
While at it, fix some comments which say
"we use i386 syscalls/ioctls/errnos" but in reality
common ones are used.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-20 12:38:14 +01:00
2544f988c9 Fix compiler warnings
With constant current_wordsize == 4 and 32-bit longs,
gcc was spooked by "1ul << (8 * current_wordsize)" = "1ul << 32".

Make such places conditional on SIZEOF_LONG > 4.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 17:39:56 +01:00
30c03230a8 Improve comment text. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 16:59:26 +01:00
f909c8d0d7 Fix NOMMU + daemonized tracer SEGV
pathname[] was getting destroyed, execve of garbage pathname
failing, and to top it off, the tracer's stack was also
smashed and trecer segfaulted.

* strace.c (exec_or_die): New function.
(startup_child): Don't use pathname[] contents after vfork,
make a malloced copy instead. Explain "NOMMU + -D bug"
and how we work around it.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 16:30:31 +01:00
5c9d8f4fc5 Make it possible to to do test builds for NOMMU architectures
And while using it, I discovered that -D doesn't work too well
on NOMMU. Added a comment about it.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 15:30:12 +01:00
1ba85436de Clean up mmap decoding
Previous code merges too many similar, but different ways
of decoding mmap. For example, sys_old_mmap is "params in memory"
API... except SH[64], where it is "params in regs",
i.e. what sys_mmap ("new mmap") function does on other arches!

It's much simpler when every mmap handler has same API regardless
of arch. Where API means whether params are in regs or in memory,
and whether offset is in bytes, pages, or 4k blocks.

Then we just insert correct function pointers into
arch syscall tables.

It turns out there are four common mmap APIs over
all architectures which exist in Linux kernel,
and one outlier for S390.

A number of mmap decoders were plain wrong in arch tables.
For example, BFIN has no old_mmap. It returns ENOSYS.
I checked kernel sources for all arches nad fixed the tables.

There was dead code for x86_64 for old_mmap:
x86_64 has no old_mmap.

* mem.c: Refactor mmap functions so that we have five mmap syscall
handlers, each with the fixed API (not varying by arch).
* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
* linux/syscall.h: Declare new mmap syscall handler functions.
* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent1.h: mmap is TD|TM.
* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-19 11:54:36 +01:00
afd0072c37 Remove unused function sys_mmap64
No wonder that it is unused.
It's code looked quite questionable.

* mem.c (sys_mmap64): Remove this function.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-18 15:49:57 +01:00
8435d672eb Remove code which supports systems with long long off_t.
While looking at mmap mess, did experimenting in order
to figure out what gets used when.

Tried building armv4tl, armv5l, armv6l, mips, mipsel, i686,
x86_64 and none of they have long long off_t,
which isn't suprprising: we aren't using glibc defines
which enable that.

Moreover, we SHOULD NOT use off_t in syscall decode!
Its size depends on libc, not on arch! I.e. it is essentially
unpredictable and can even in theory vary on the same arch
with different libc.

We should use longs or long longs, in a way which matches
architectural ABI for the given syscall. There are usually
*at most* two permutations, no need to add yet another variable
(sizeof(off_t)) to the mix.

This change removes almost all HAVE_LONG_LONG_OFF_T conditionals,
which will reveal further possible simplifications.

* mem.c: Remove code conditional on HAVE_LONG_LONG_OFF_T.
As a result, never remap sys_mmap64 to sys_mmap.
(print_mmap): Compile unconditionally.
(sys_old_mmap): Compile unconditionally.
(sys_mmap): Compile unconditionally.
* io.c (sys_sendfile): Add a FIXME comment.
* file.c: Remove code conditional on HAVE_LONG_LONG_OFF_T.
As a result, never remap sys_*stat64 to sys_*stat etc.
(sys_truncate): Compile unconditionally.
(realprintstat): Likewise.
(sys_stat): Likewise.
(sys_fstat): Likewise.
(sys_lstat): Likewise.
* desc.c (printflock): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-18 15:47:57 +01:00
8dedb0dc96 Fixes in "new" mmap
* mem.c (sys_mmap): Ensure unsigned expansion of tcp->u_arg[5].
Add page shift of offset for I386.
Use tcp->ext_arg[5] as offset for X32.
(sys_old_mmap): [X32] Remove this function, X32 doesn't use is.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-18 03:13:07 +01:00
923255cbe8 Preliminary simplifications in mmap functions
* mem.c: Move "define sys_mmap64 sys_mmap" from the top
to the only place it affects.
(print_mmap): Make offset argument unsigned, for safer implicit conversions.
(sys_old_mmap): [IA64] use unsigned narrow_arg[].
Cast u_arg[5] (offset param) to unsigned long, to prevent erroneous signed
expansion.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-18 02:36:36 +01:00
c9d0fc0a63 Remove broken HAVE_LONG_LONG conditionals
We use printllval without HAVE_LONG_LONG guards in many places,
but define it only if HAVE_LONG_LONG. This means that
on !HAVE_LONG_LONG systems we won't build for some time now.

* defs.h: Remove HAVE_LONG_LONG guard around LONG_LONG() macro
and printllval() function declaration.
* util.c: Remove HAVE_LONG_LONG guard around printllval()
function definition.
(printllval): Add compile-time error check for using wrong
if branch. Explain places where we deliberately use mismatched
types for printf formats.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-17 22:41:33 +01:00
061217669b Use explicit long type instead of off_t
* file.c (sys_lseek): Use long instead of off_t.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-17 20:08:50 +01:00
86738a232d Merge two identical tables
* defs.h: Declare whence_codes[].
* desc.c: Delete static whence[].
(printflock[64]): Use whence_codes.
* file.c: Make whence_codes[] non-static.
Add SEEK_DATA and SEEK_HOLE to them.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-17 14:31:55 +01:00
09a87ae971 Remove wrong x32-specific lseek
Testing confirmed what I suspected: x32 lseek uses kernel-sized
(i.e. wide) long for offset parameter.

* file.c: Delete sys_lseek32.
* linux/syscall.h: Likewise.
* linux/x32/syscallent1.h: Likewise.
* test/x32_lseek.c: New file.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-17 13:17:49 +01:00
782d90f918 Fix SEGV in lseek
I found hard way why the code was using "_whence" name.

* file.c: Rename whence[] to whence_codes[].
(sys_lseek): Fix printxval() to use whence_codes[].
(sys_lseek32): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-17 12:47:44 +01:00
386b871b0a Comment inner workings of sys_[l]lseek
The code doesn't look fully correct to me, but I need to experiment
on actual x32 machine before I start "fixing" things.
For now, add comments, and optimize out one tprints() call...

* file.c (sys_lseek): Rename '_whence' as 'whence'.
Merge printing of ", " into subsequent tprintf.
(sys_lseek32): Likewise.
(sys_llseek): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-17 01:38:14 +01:00
a32086f2aa Cosmetic fixes to syscall tables, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-17 01:37:35 +01:00
bf8ed1794e Make linux/mips/syscallent.h smaller
* linux/mips/syscallent.h: Remove trailing empty elements.
Compactify huge stretches of NULL elements in the middle.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-16 14:44:31 +01:00
c956ef085f Simple optimization in get_error
* defs.h: Define SCNO_IN_RANGE(scno) macro.
* syscall.c (get_error): Change return type to void.
Use SCNO_IN_RANGE instead of SCNO_IS_VALID.
(trace_syscall_exiting): Stop checking get_error() return value.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-16 14:25:56 +01:00
5721cdbcdb Mass rename of SCNO_IN_RANGE define to SCNO_IS_VALID
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-16 13:22:38 +01:00
48e4c1bf4d Finish prefixing regs struct names with arch_
* defs: Rename regs -> sparc_regs.
* signal.c (sys_sigreturn): Use new variable name.
* syscall.c: Rename regs -> sparc_regs, regs -> avr32_regs.
(getrval2): Use new variable names.
(printcall): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-16 08:23:40 +01:00
2550d4890e Use the same type for i386_regs on 32-bit and 64-bit x86.
* defs.h: Stop including <asm/ptrace.h> for x86.
Change i386_regs from "struct pt_regs" to "struct user_regs_struct".
* syscall.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-15 21:04:28 +01:00
ddd2da2562 Fix build error on Tile
* syscall.c (get_scno): [TILE] Remove TCB_WAITEXECVE check,
it is never true on Tile, and stopped compiling when
TCB_WAITEXECVE define was removed for Tile.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-15 15:25:37 +01:00
6cf36057b3 x86: zero-extend 32-bit args in syscall entry instead of sign-extension
Zero-extension is slightly more common that sign-extension:
all pointers are zero-extended, and some other params are unsigned.

Whereas signed ones (fds, pids, etc) are often treated as
_32-bit ints_ even by kernel, so just unconditionally casting
such tcp->u_arg[N] to int works.

* syscall.c (get_syscall_args): [X86] Zero-extend 32-bit args
instead of sign-extension.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-15 15:01:38 +01:00
e015d2d331 Macroize conditional signed widening operation
* defs.h: Define widen_to_long() macro.
* signal.c (sys_kill): Use it instead of open-coding it.
(sys_tgkill): Use widen_to_long() on pids.
* resource.c (decode_rlimit): Formatting fix.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-15 14:58:52 +01:00
ae8643e671 A better handling of current_wordsize
On x86_64:
  text	   data	    bss	    dec	    hex	filename
435661	  26628	  47424	 509713	  7c711	strace_old
435501	  26612	  47440	 509553	  7c671	strace_new_clever_wordsize

On x32 and arm it should be even better, current_wordsize becomes
a constant there.

* defs.h: Declare current_wordsize as a variable if needed,
else declare as a constant define.
Remove declatation of personality_wordsize[].
* syscall.c: Make personality_wordsize[] static.
Declare current_wordsize as a variable if needed.
(set_personality): Set current_wordsize only if non-constant.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-15 14:55:14 +01:00
cb26b75493 Remove unnecessary "return 0" statements
* util.c (change_syscall): Remove dummy "return 0"s.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-15 11:43:08 +01:00
e3b248dd83 x86: fix required kernel version for GETREGSET
* syscall.c (get_regs): [X86] Use GETREGSET only if kernel >= 2.6.35

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-15 00:24:19 +01:00
f5fa778d2f Whitespace fix, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-14 13:39:53 +01:00
492f81f14c Add support for the OpenRISC 1000 platform
* configure.ac: Added or1k architecture..
* defs.h: Added or1k to use register reading system.
* linux/or1k/ioctlent.h.in: Use i386 ioctls.
* linux/or1k/syscallent.h: New file.
* process.c: Added or1k register defs to struct_user_offsets[].
* syscall.c: Added or1k_io iovec for or1k GETREGSET,
  regset structure for or1k.
  (printcall): Added handling for or1k.
  (get_regs): Likewise.
  (get_scno): Likewise.
  (get_syscall_args): Likewise.
  (get_syscall_result): Likewise.
  (get_error): Likewise.
* util.c (change_syscall): Added dummy handling for or1k.
* system.c (sys_or1k_atomic): New function (or1k specific syscall).

Signed-off-by: Christian Svensson <blue@cmd.nu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-14 13:38:27 +01:00
eec8d5d6b0 [X86] Use ptrace(PTRACE_GETREGSET, NT_PRSTATUS) to get registers.
Unlike PTRACE_GETREGS, this new method detects 32-bit processes
reliably, without checking segment register values which
are undocumented and aren't part of any sort of API.
While at it, also fixed x32 detection to use __X32_SYSCALL_BIT,
as it should have been from the beginning.

* defs.h: Declare os_release and KERNEL_VERSION.
* strace.c: Make os_release non-static, remove KERNEL_VERSION define.
* syscall.c: New struct i386_user_regs_struct,
static union x86_regs_union and struct iovec x86_io.
(printcall): Use i386_regs or x86_64_regs depending on x86_io.iov_len.
(get_regs): On x86 and kernels 2.6.30+, use PTRACE_GETREGSET,
on earlier kernels fall back to old method.
(get_scno): [X86] Determine personality based on regset size
on scno & __X32_SYSCALL_BIT.
(syscall_fixup_on_sysenter): Use i386_regs or x86_64_regs depending
on x86_io.iov_len.
(get_syscall_args): Likewise.
(get_error): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-14 03:29:48 +01:00
d22213a3ee Rename some register statics by prefixing their names with arch.
This makes it easier to grep for them.

* syscall.c: Rename variables:
r0 -> bfin_r0,alpha_r0,sh_r0.
a3 -> mips_a3.
r2 -> mips_r2.
(get_scno): Use new variable names.
(get_syscall_result): Likewise.
(get_error): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-13 17:52:31 +01:00
d4d3edefe7 Factor out code to check addr, fetch and print siginfo
* defs.h: Declare new function printsiginfo_at(tcp, addr).
* process.c (sys_waitid): Use printsiginfo_at().
(sys_ptrace): Likewise.
* signal.c: (printsiginfo_at): Implement this new function.
(sys_rt_sigsuspend): Use printsiginfo_at().
(sys_rt_sigtimedwait): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-13 16:31:32 +01:00
be99497d39 Decode struct iov in PTRACE_GET/SETREGSET
* process.c (sys_ptrace): Decode struct iov in PTRACE_GET/SETREGSET.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-13 16:10:10 +01:00
873e5a5a5c Unify representations of struct user fields for subarchitectures
* process.c: Unify MIPS and LINUX_MIPSN32, and SH and SH64 parts of
struct_user_offsets[].

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 17:15:19 +01:00
74307a6953 Add start_code and start_data members of struct user
* process.c: Add start_code and start_data members of struct user
in struct_user_offsets[], where appropriate.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 17:10:05 +01:00
a86696ba64 Remove hacks for old kernels for architectures which require new kernels
* util.c (change_syscall): For MICROBLAZE, replace code
with dummy "return 0" and a comment explaining why that is ok
for this architecture.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 16:07:54 +01:00
ab2f402242 Remove stray syscall result reading code on syscall entry for s390
This is a leftover from sysenter/sysexit split.
I can't run-test it, but from code inspection it seems to be correct.

* syscall.c (get_scno): Remove stray syscall result reading for s390[x].

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 15:57:37 +01:00
729e18dffd Deobfuscate definitions of struct user offsets
The maze of ifdefs/ifndefs was scaring new contributors.
Format it so that every arch has its own ifdef block.

* process.c: Deobfuscate definitions of struct user offsets.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 15:51:58 +01:00
bf357fcb76 Remove hacks for old kernels for architectures which require new kernels
* defs.h: Do not define TCB_WAITEXECVE for AARCH64.
* util.c (change_syscall): For AARCH64 and X32, replace code
with dummy "return 0" and a comment explaining why that is ok
for these architectures.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 13:06:51 +01:00
d27809c978 Remove old kernel hacks for architectures which require new kernels
* defs.h: Do not define TCB_WAITEXECVE for AVR32, BFIN and TILE.
* util.c (change_syscall): For AVR32, BFIN and TILE, replace code
with dummy "return 0" and a comment explaining why that is ok
for these architectures.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 12:50:10 +01:00
3e759d4293 Handle recv[m]msg for non-native 32-bit personality syscalls
* net.c (printmsghdr): If current_wordsize is 4 and long is wider than it,
read 32-bit struct msghdr and expand it into a native one before using it.
(printmmsghdr): Likewise for struct mmsghdr.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 11:57:48 +01:00
afea7dd4a5 Fix is_negated_errno() check for X32
X32's return value is 64-bit. We were truncating it to 32-bit long
before checking for -errno.

* syscall.c (is_negated_errno_x32): New function.
(get_error): Use is_negated_errno_x32 for X32 architecture.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 11:52:35 +01:00
9472a27b79 Remove unused / ambiguously used defines
We sometimes use LINUXSPARC and sometimes (more often)
use "defined(SPARC) || defined(SPARC64)". Better to use
one construct consistently.
LINUX_MIPS64 is altogether unused.

* defs.h: Remove LINUXSPARC and LINUX_MIPS64 defines.
Move PTRACE_xxx compat defines up, before arch-specific
machinery. Use defined(SPARC) || defined(SPARC64)
instead of LINUXSPARC.
* file.c: Use defined(SPARC) || defined(SPARC64) instead of LINUXSPARC.
* signal.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-12 11:43:46 +01:00
59aea0a7d5 Preparatory patch for "new" x86 personality detection
* syscall.c: Move PT_FLAGS_COMPAT define to its only user, get_scno().
Rename arm_regs_union's fields to names less likely to collide with
system defines.
(get_regs): Use sizeof(arm_regs_union) instead of sizeof(aarch64_regs).
This should be the same, but htis way it's cleaner.
Remove __X32_SYSCALL_MASK and use __X32_SYSCALL_BIT instead.
Explain 64-bit check in X32 build better.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-11 12:29:36 +01:00
338c069e69 Fix sigaltstack decoder
strace used to hang when decoding sigaltstack called with invalid
stack_t pointers because of mishandling umove() return code.

* signal.c (print_stack_t): Handle unfetchable stack_t properly.
Change return type to void.
(sys_sigaltstack): Update print_stack_t() usage.

Reported-by: kawillia@ucalgary.ca
2013-02-09 02:03:04 +00:00
0cf04b6595 Fix decoding of sysctl() when oldval fields are NULL
If you call glibc's syscall wrapper like so:
	static int name[] = { CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE };
	int buffer[2] = { 32768, 61000 };
	size_t size = sizeof(buffer);
	sysctl(name, 3, 0, 0, buffer, size);
(note that oldval/oldlenp are NULL).

The current strace code complains like so:
_sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, process_vm_readv: Bad address
(nil), 0, 0x7fffe23c3960, 8}) = -1 EACCES (Permission denied)

Since passing NULL for the old values is valid, handle that explicitly.
This also simplifies the code a bit by splitting up the handling of the
new and old args so that we only handle the new args once.

Now the output looks like:
_sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, NULL, 0, 0x7fff8c0c91b0, 8) = -1 EACCES (Permission denied)

* system.c (sys_sysctl): Check if info.oldval is NULL first.  Move the
processing of oldlen/info.newval/info.newlen out so they always get
executed.  Fix the format strings so we use %lu for unsigned long rather
than a mix of %ld and %lu.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-09 01:39:43 +00:00
99aa181ebc If we are on a glibc system, assume it's at least glibc 2.1
It is not likely anyone uses glibc older that that:
glibc 2.1.1 was released in 1999

* net.c: Remove test for glibc >= 2.1.
* signal.c: Remove code which is compiled only for glibc < 2.1.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-08 18:49:06 +01:00
7ba8e72bb5 S390: stop using needlessly static long pc variable
* syscall.c: Remove "static long pc" variable.
(get_scno): Use an automatic long variable instead of a static.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-08 15:50:05 +01:00
751acb3d70 Dying suddenly with abort() is rude, avoid if possible
* file.c (sys_utime): Don't call abort() if wordsize is strange.
Instead, warn user about it.
* desc.c (printflock): Use the same message string as in sys_utime.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-08 15:34:46 +01:00
86d94843cf Remove vestigial hacks around non-Linux struct sigactions
* signal.c: Stop using __sighandler_t glibc'ism. Remove SA_HANDLER macro.
Explain why we can't use "sa_handler" as a field name.
(sys_sigaction): Use __sa_handler instead of SA_HANDLER macro.
(sys_rt_sigaction): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-08 12:59:13 +01:00
28ac68f2ab Optimize AArch64 handling of 32-bit personality
By putting aarch64_regs and arm_regs into a union,
register copying is eliminated.
No need to check and change personality on syscall exit.

* defs.h: Remove unused NUM_ARM_REGS define. Fix indentation.
* syscall.c: Put aarch64_regs and arm_regs into a union.
(update_personality): Shorten bitness message.
(printcall): Add commented-out PC printing.
(get_regs): Remove now-unnecessary 64-to-32 bits register copying.
(get_syscall_result): Drop personality changing code.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-08 12:38:51 +01:00
89804ec3e1 Rename some register statics by prefixing their names with arch.
This makes it easier to grep for them.

* syscall.c: Make IA64's r8, r10 global variables static.
Rename variables:
r8,r10 -> ia64_r8,ia64_r10.
d0 -> m68k_d0.
a3 -> alpha_a3.
r28 -> hppa_r28.
r9 -> sh64_r9.
r10 -> cris_r10.
r3 -> microblaze_r3.
(get_scno): Use new variable names.
(syscall_fixup_on_sysenter): Likewise.
(get_syscall_result): Likewise.
(get_error): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-07 13:14:48 +01:00
401374e9c2 Rename ARM's regs structure to arm_regs
Compile-tested.

* defs.h: Rename regs structure to arm_regs.
* syscall.c: Likewise.
(printcall): Use new name instead of old one.
(get_regs): Likewise.
(get_scno): Likewise.
(get_syscall_args): Likewise.
(get_error): Likewise.
* signal.c (sys_sigreturn): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-06 18:24:39 +01:00
4bdb6bb734 Stop needlessly using static variable
* syscall.c: Remove static long psr.
(get_scno): Use local psr variable.
(get_syscall_result): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-06 18:09:31 +01:00
8d4ca0c8cd Shortcut tests for fork/exec syscalls
This change should speed up strace by a tiny bit.

More importantly, it makes it much more clear that
fork and exec fixups are not necessary for any reasonably
recent kernels. IOW: syscall_fixup_for_fork_exec() and its callees
are all dead code.

* defs.h: Declare new need_fork_exec_workarounds flag variable.
* strace.c: Define need_fork_exec_workarounds flag variable.
(test_ptrace_setoptions_followfork): Return 0/1 as success/fail indicator.
(test_ptrace_setoptions_for_all): Likewise.
(init): Set need_fork_exec_workarounds to TRUE if needed.
* syscall.c: Rename internal_syscall() to syscall_fixup_for_fork_exec().
(trace_syscall_entering): Call syscall_fixup_for_fork_exec() only if
need_fork_exec_workarounds == TRUE.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-06 13:18:42 +01:00
88eafd81ab Improve perf_event_open argument decoding
* configure.ac (AC_CHECK_HEADERS): Add linux/perf_event.h.
* desc.c [HAVE_LINUX_PERF_EVENT_H]: Include <linux/perf_event.h>.
(perf_event_open_flags): New xlat structure.
(sys_perf_event_open): New function.
* linux/dummy.h (sys_perf_event_open): Remove.
* linux/syscall.h (sys_perf_event_open): New prototype.

Signed-off-by: Ben Noordhuis <info@bnoordhuis.nl>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2013-02-05 23:15:14 +00:00
af8dc6b3a5 tile: fix merge skew with new get_regs architecture
* defs.h [TILE]: Declare clear_regs(), get_regs() and get_regs_error.
* syscall.c (get_regs) [TILE]: Fix merge skew.
(printcall) [TILE]: fix a compiler warning about pt_reg_t in
a printf expression.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2013-02-05 23:15:06 +00:00
9e1a7d818a mount: decode MS_NOSEC
* system.c (MS_NOSEC): Define.
(mount_flags): Add MS_NOSEC.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-05 19:07:42 +00:00
21ceeb4879 mmap: decode MAP_UNINITIALIZED
* mem.c (mmap_flags): Add MAP_UNINITIALIZED.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-05 19:07:41 +00:00
ddba73e4c0 Print 64-bit instruction pointers zero padded
* syscall.c (printcall): Print 64-bit instruction pointers zero padded.
2013-02-05 19:01:58 +00:00
f0f41cfb19 x86_64: fix compilation warning introduced in previous commit
* syscall.c (printcall): Cast x86_64_regs.rip to the type being printed.
2013-02-05 18:57:16 +00:00
df39e56d2d Simple bug fix for x86_86
* syscall.c (printcall): Use x86_64_regs.rip, not x86_64_regs.ip.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-05 18:18:07 +01:00
0b99a8ac3b Add tilegx support to strace
tilegx support has been in the kernel since 3.0.
In addition, fix some issues with the tilepro support already
present in strace, primarily the decision to use the
<asm/unistd.h> numbering space for system calls.

* defs.h [TILE]: Include <asm/ptrace.h> and provide an extern
struct pt_regs tile_regs for efficiency.  Provide compat 32-bit
personality via SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE,
PERSONALITY1_WORDSIZE, and DEFAULT_PERSONALITY.
* linux/tile/errnoent1.h: New file, includes linux/errnoent.h.
* linux/tile/ioctlent1.h: New file, includes linux/ioctlent.h.
* linux/tile/signalent1.h: New file, includes linux/signalent.h.
* linux/tile/syscallent.h: Update with new asm-generic syscalls.
The version previously committed was the from the first tile patch
to LKML, which subsequently was changed to use <asm-generic/unistd.h>.
* linux/tile/syscallent1.h: Copy from linux/tile/syscallent.h.
* mem.c (addtileflags) [TILE]: use %ld properly for a "long" variable.
* process.c [TILE]: Choose clone arguments correctly and properly
suppress all "struct user" related offsets in user_struct_offsets.
* signal.c [TILE]: Use tile_regs not upeek.
* syscall.c (update_personality) [TILE]: Print mode.
(PT_FLAGS_COMPAT) [TILE]: Provide if not in system headers.
(tile_regs) [TILE]: Define 'struct pt_regs' variable to hold state.
(get_regs) [TILE]: use PTRACE_GETREGS to set tile_regs rather than using upeek.
(get_scno) [TILE]: Set personality.
(get_syscall_args) [TILE]: Use tile_regs.
(get_syscall_result) [TILE]: Update tile_regs.
(get_error) [TILE]: Use tile_regs.
(printcall) [TILE]: Print pc.
(arg0_offset, arg1_offset, restore_arg0, restore_arg1) [TILE]:
Properly handle tile call semantics and support tilegx.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-05 17:48:33 +01:00
4645582edb Small optimization for SPARC[64] get_scno
* syscall.c: Remove static unsigned long trap veriable.
(get_scno): Use local trap variable.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-05 17:02:59 +01:00
1ebe08d613 Do not compile getrval2() if not needed
* syscall.c (getrval2): Do not compile it for architetures where
it isn't ever used.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-05 16:55:23 +01:00
ce7d953ebe Optimize out PTRACE_PEEKUSER with -i
strace -i was fetching PC with a separate PEEKUSER
despite having GETREGS data:

ptrace(PTRACE_GETREGS, 22331, 0, 0x8087f00) = 0
ptrace(PTRACE_PEEKUSER, 22331, 4*EIP, [0x80dd7b7]) = 0
write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82
ptrace(PTRACE_SYSCALL, 22331, 0, SIG_0) = 0

Now it does this:

ptrace(PTRACE_GETREGS, 22549, 0, 0x8087ea0) = 0
write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82
ptrace(PTRACE_SYSCALL, 22549, 0, SIG_0) = 0

Analogous improvement in sys_sigreturn() is also implemented.

* defs.h: Declare extern struct pt_regs regs for SPARC[64] and ARM.
Declare clear_regs(), get_regs() and get_regs_error flag variable.
* strace.c (trace): Call get_regs(pid) as soon as we know the tcb
and that it is stopped.
* syscall.c (get_regs): New function. Used to fetch registers early,
just after tracee has stopped.
(printcall): Move it here from util.c. Use global regs.REG data,
if available on the arch, instead of re-fetching it.
(get_scno): Use global regs.REG data.
(get_syscall_result): Likewise.
* signal.c (sys_sigreturn): Likewise.
* util.c (printcall): Moved to syscall.c.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-05 16:36:13 +01:00
beae4c7182 Fix sys_semtimedop decoding on s390x
The s390 and s390x pass semtimedop arguments differently from other
architectures.  sys_semtimedop parser was fixed for s390 by commit
v4.6-177-ge0f5fd8, and s390x requires the same fix.

* linux/ipc.c (sys_semtimedop): Fix timespec decoding on s390x.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2012-12-15 14:13:05 +00:00
1f21513c38 Fix *xattr decoding
* file.c (print_xattr_val): Do not attempt to decode a zero sized array.
Fixes RH#885233.
2012-12-08 00:18:45 +00:00
eff5c0e60c sys_semtimedop: fix timeval argument index in wrapped call
Looking at the implementation of wrapped semtimedop() call inside glibc
and kernel, I started to believe that timeval should be located in
tcp->u_arg[4] and not tcp->u_arg[5].  Fortunately, tcp->u_arg[5] now
works correctly as well, due to side effects of decode_ipc_subcall().

declaration in header:
int semtimedop(semid, *sops, nsops, *timeout);
                 0      1      2        3

sys_ipc arguments in glibc on all patforms except s390*:
semid, (int) nsops, 0, CHECK_N (sops, nsops), timeout
  0            1    2            3                4
We have to use indexes: 0 3 1 4

sys_ipc arguments on s390*:
semid, (int) nsops, timeout, sops
  0            1       2       3
We have to use indexes: 0 3 1 2

* ipc.c (sys_semtimedop) [!S390]: Fix timeval argument index in
indirect_ipccall case.
2012-12-08 00:17:59 +00:00
eb54c47725 Fix glibc version checks
* util.c: Check if __GLIBC__ is defined before using it.
* signal.c: Likewise.  Fix __GLIBC_MINOR__ checks.
2012-12-06 02:20:33 +00:00
05eb905c44 Add state argument to change_syscall and fix SPARC
Add a state argument to change_syscall() so that SPARC can modify that
instead of read-modify-writing the whole register set.  This function is
always called within an arg_setup/arg_finish_change sequence which on
certain architectures like SPARC will also be doing a read-modify-write.
This prevents the second write (from arg_finish_change) from undoing the
effects of the change_syscall call.

* util.c (change_syscall): Move below definition of arg_setup_state.
Add state argument.
[SPARC || SPARC64] Change to set state->u_regs[U_REG_G1] rather than
read-modify-writing it with PTRACE_GETREGS and PTRACE_SETREGS.
(setbpt, clearbpt): Pass state argument to change_syscall.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
2012-11-29 23:45:38 +00:00
890a5cad23 Add support for tracing 32-bit ARM EABI binaries on AArch64
* defs.h [AARCH64]: Copy in the definition of arm_pt_regs and the
accessor macros, so it's possible to build on AArch64 without
ARM system headers.  Set SUPPORTED_PERSONALITIES to 2.
Define PERSONALITY0_WORDSIZE and PERSONALITY1_WORDSIZE.
Set DEFAULT_PERSONALITY to 1.
* linux/aarch64/errnoent1.h: New file, includes generic errnoent.h.
* linux/aarch64/ioctlent1.h: New file, includes generic ioctlent.h.
* linux/aarch64/signalent1.h: New file, includes generic signalent.h.
* linux/aarch64/syscallent1.h: Rename from linux/aarch64/syscallent.h.
* linux/aarch64/syscallent.h: New file, includes arm/syscallent.h.
* syscall.c [AARCH64]: Define aarch64_regs.
(update_personality) [AARCH64]: Add debug output.
(get_scno) [AARCH64]: Determine if we're in ARM or AArch64 mode by
checking the size of the returned uio structure from PTRACE_GETREGSET
and interpret the structure accordingly.
(get_syscall_result): Likewise.
(get_syscall_args): Merge the AArch64 and ARM sections so that on
AArch64 we can fall back to supporting the ARM personality.
(get_error): Likewise.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
2012-11-12 15:19:58 +00:00
716c93ecf8 Move asm-generic ioctl definitions to linux/ioctlent.h.in
* linux/ioctlent.h.in: Add asm-generic ioctl entries from all
linux/*/ioctlent.h.in files.
* linux/bfin/ioctlent.h.in: Remove asm-generic ioctl entries.
* linux/i386/ioctlent.h.in: Likewise.
* linux/powerpc/ioctlent.h.in: Likewise.
* linux/s390/ioctlent.h.in: Likewise.
* linux/sparc/ioctlent.h.in: Likewise.
2012-11-12 14:05:53 +00:00
17e3860ee8 Filter out redundant "*32" ioctl entries
* linux/ioctlent-filter.awk: New file.
* Makefile.am: Use it.
* linux/ioctlent.h.in: Removed redundant "*32" entries.
2012-10-27 01:13:53 +00:00
7943966f6c Enhance quotactl decoding
* quota.c (sys_quotactl): Decode 2nd syscall argument using printpath.
* pathtrace.c (pathtrace_match): Add quotactl support.
* linux/*/syscallent.h: Add TF flag to quotactl entry.
2012-10-26 23:43:13 +00:00
d8d3bd3709 Add AArch64 support to strace
AArch64 has been included in linux from 3.7 onwards.
Add support for AArch64 in strace, tested on linux in a simulator.

* configure.ac: Support AArch64.
* defs.h [AARCH64]: Include <sys/ptrace.h>, define TCB_WAITEXECVE.
* ipc.c (indirect_ipccall): Support AArch64.
* process.c (struct_user_offsets): Likewise.
* syscall.c [AARCH64]: Include <asm/ptrace.h>,  <sys/uio.h>, and
<elf.h>.  Define struct user_pt_regs regs.
(get_scno, get_syscall_result): Support AArch64 using PTRACE_GETREGSET.
(get_syscall_args, get_error): Support AArch64.
* linux/aarch64/ioctlent.h.in: New file.
* linux/aarch64/syscallent.h: New file, based on linux 3.7 version of
asm-generic/unistd.h.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
2012-10-26 23:32:15 +00:00
d6dbd998b7 linux: add new errno values for EPROBE_DEFER and EOPENSTALE
New definitions match updates in Linux 3.4 and Linux 3.5 respectively.

* linux/errnoent.h (ERRNO_517): Change to EPROBE_DEFER.
(ERRNO_518): Change to EOPENSTALE.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
2012-10-26 22:55:52 +00:00
9679296d56 Add -e trace=memory option
Add a new 'memory' category for tracing memory mapping related syscalls.

Affected syscalls are: break, brk, get_mempolicy, madvise, mbind,
migrate_pages, mincore, mlock, mlockall, mmap, move_pages, mprotect,
mremap, msync, munlock, munlockall, munmap, remap_file_pages, and
set_mempolicy.

* defs.h (TRACE_MEMORY): New macro.
* syscall.c (lookup_class): Handle trace=memory option.
* strace.1: Document it.
* linux/alpha/syscallent.h: Add TM flag to memory mapping related syscalls.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/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/tile/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
2012-10-26 22:45:08 +00:00
85c2178490 x32: add 64bit annotation too
Since someone can invoke these entry points directly with syscall(),
at least decode their name and show that they're 64bit versions rather
than just showing syscall_###.

* linux/x32/syscallent.h: Sync all missing entries below 312 with x86_64.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-09-28 01:25:17 +00:00
b742d8c1b8 Ignore fflush(3) return value
strace used to honor fflush(3) return value in trace_syscall_entering
which resulted to tracees not being PTRACE_SYSCALL'ed which in turn
caused nasty hangups like this one:

$ strace -o'|:' pwd
|:: Broken pipe

There is little strace can do in case of fflush(3) returning EOF, and
hangup is certainly not the best solution for the issue.

* syscall.c (trace_syscall_entering): Ignore fflush(3) return value.
2012-09-28 01:18:43 +00:00
9a71bcdab2 Use perror_msg instead of perror
* signal.c (sys_sigreturn): Use perror_msg instead of perror.
* strace.c (tprintf, tprints, detach, startup_attach): Likewise.
* syscall.c (get_scno): Likewise.
* util.c (umoven, umovestr): Likewise.
2012-09-28 01:13:10 +00:00
4411a0ce30 process_vm_readv may return ESRCH if tracee was killed, don't complain
Discovered by running test/sigkill_rain under strace.

* util.c (umoven): Do not emit error message if process_vm_readv
fails with ESRCH.
(umovestr): LikeWise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-27 13:53:37 +02:00
978fbc901c Trivial fixes, no code changes.
* strace.c: Fix compiler warning message about tgkill - we don't use it.
Fix indentation of preprocessor directives.
(trace): Remove outdated comment.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-13 10:28:43 +02:00
508279c94f Always check setreuid return code
* strace.c (startup_child): Check setreuid return code.
2012-08-24 17:56:53 +00:00
f04b5de5a5 x32: update {g,s}etsockopt syscall numbers
Starting with linux 3.6 (and backported to earlier kernels), these two
syscalls have changed numbers (moving from native to compat entry points).
Update the strace syscall list accordingly.

* linux/x32/syscallent.h: Move setsockopt from 54 to 541, and move
getsockopt from 55 to 542.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-08-24 12:18:48 +00:00
ad232c6aa0 Decode file type returned by getdents system call
* file.c (sys_getdents): Decode d_type in unabbreviated mode.
2012-08-16 19:29:55 +00:00
cf53436f73 Close pipe and wait for the pipe process termination
In case of normal strace termination, when the trace output is
redirected to a file or a pipe, close it and wait for the pipe
process termination.

* strace.c (main): Before normal exit, close shared_log when it
differs from stderr, and wait for popen_pid termination.
2012-07-12 20:54:46 +00:00
26bc0606d9 Enable usage of PTRACE_SEIZE
* defs.h: Define USE_SEIZE to 1. Remove PTRACE_SEIZE_DEVEL
and PTRACE_EVENT_STOP1.
* strace.c (ptrace_attach_or_seize): Replace PTRACE_SEIZE_DEVEL
with 0.
(trace): Do not check for PTRACE_EVENT_STOP1.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-10 16:36:32 +02:00
d7df59197d x32: update syscall table
This syncs with the syscall table as it is in linux 3.4.

* linux/x32/syscallent.h (59): Fix comment typo.
(78): Add missing getdents entry.
(174): Delete create_module entry (not in the kernel).
(181, 182, 183, 184, 185): Add missing entries.
(524, 536, 539, 540): Fix spacing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-05 13:35:01 +00:00
d33e72a26d Merge adjacent printing operations in a few places
* file.c (sys_readahead): Merge tprints() with following printllval().
(sys_ftruncate64): Likewise.
(sys_fadvise64): Likewise.
(sys_fadvise64_64): Likewise.
(sys_fallocate): Merge tprints() with following tprintf().

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-18 02:03:24 +02:00
318a273ea9 Use %d printf format instead of %i everywhere
* loop.c (loop_ioctl): Use %d instead of %i.
* mtd.c (mtd_ioctl): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-16 12:29:09 +02:00
8560ef291c Fix a few goofs in sys_sysctl()
* system.c (sys_sysctl): Cast pointer to long, not size_t,
when we intend to use it as an address. Set oldlen to 0 prior
to reading into it - we want to have deterministic result
if read fails.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-16 12:23:58 +02:00
048cc42f08 Stop using non-standard %Zu and %Zd formats for size_t printing
The documented formats are %zu and %zd, but since our (normally disabled)
"fast" printf code doesn't support those too, I convert them to %lu and %ld.

* bjm.c (sys_query_module): Convert %Zd usages to %lu.
* system.c (sys_sysctl): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-16 12:20:17 +02:00
c59b3f13fb Remove outdated comment about suspending new tracees
We no longer track parent/child relationship between tracees.
Therefore, we no longer suspend new tracee until parent is seen
exiting form [v]fork/clone. The comment is obsolete.

* strace.c (trace): Remove outdated comment.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-15 15:35:52 +02:00
c52826c267 Make sure current_wordsize and PERSONALITY0_WORDSIZE are ints in all arches
On 64bit systems with a single personality, they used to be sizeof(long),
which has type "long", not "int", which complicates printf formats.

* defs.h: Ensure that PERSONALITY0_WORDSIZE;s tyoe is int.
This in turn makes sure current_wordsize is also an int.
* count.c (call_summary): Revert the change which added cast to int.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-15 14:28:56 +02:00
d376c92a91 Add configure --enable-gcc-Werror option
* configure.ac: New option --enable-gcc-Werror.
2012-05-15 00:50:26 +00:00
f112d07800 Make x86-64 build free of artificial warnings
* signal.c (sys_sigreturn): Do not issue "no sys_sigreturn" warning
on X86_64.
2012-05-15 00:13:59 +00:00
0dbc80de89 Fix kernel release string parsing
* strace.c (get_os_release): Handle "X.Y-something" utsname.release
strings properly.

Reported-by: Bryce Gibson <bryce@gibson-consulting.com.au>
2012-05-14 23:42:10 +00:00
55980f5b72 On clearing "breakpopint", restore syscall number too
This fixes Fedora bug 659382.
Low risk: this code is not supposed to be used on any non-acient kernel.

* util.c (clearbpt): Restore syscall number too.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-14 16:40:28 +02:00
24ee60b836 util: fix building when glibc has a stub process_vm_readv
If you have a newer glibc which provides process_vm_readv, but it is built
against older kernel headers which lack __NR_process_vm_readv, the library
will contain a stub implementation that just returns ENOSYS.  Autoconf
checks for this case explicitly and will declare it as unavailable.  So we
end up in a case where the headers provide the prototype, but autoconf has
not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again:

util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration
/usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here

So rename our local function to something unique, and add a define so the
callers all hit the right place.

* util.c (strace_process_vm_readv): Rename from process_vm_readv.
(process_vm_readv): Define to strace_process_vm_readv.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-05 00:06:58 +00:00
5700f68471 doc: describe documentation policy
* README-hacking: Describe documentation policy.
2012-05-03 01:44:49 +00:00
503faaae3a maint: post-release administrivia
* NEWS: Add header line for next release.
2012-05-02 23:00:34 +00:00
417eb8861e Prepare for 4.7 release
* configure.ac: Version 4.7.
* debian/changelog: 4.7-1.
* strace.spec: 4.7-1.
2012-05-02 12:34:56 +00:00
cf050db3e8 Fix build with <linux/loop.h> from 2.6.18 kernel headers
* configure.ac: Check for LO_FLAGS_AUTOCLEAR and LO_FLAGS_PARTSCAN
declarations.
* loop.c (loop_flags_options): Use LO_FLAGS_AUTOCLEAR and
LO_FLAGS_PARTSCAN only when appropriate declarations are available.
(loop_ioctl): Use LOOP_SET_CAPACITY only when it is defined.
2012-05-02 10:21:49 +00:00
a5fd66b7b9 * vsprintf.c: Check for USE_CUSTOM_PRINTF earlier. 2012-05-01 22:49:49 +00:00
e263e3b813 Remove duplicate names from CREDITS
* .mailmap: Merge email addresses.
* CREDITS.in: Remove a duplicate name.
2012-05-01 21:51:38 +00:00
823eba28cd tests: raise strace check timeout to 60 seconds
* tests/init.sh (check_timeout): New variable.
* tests/ptrace_setoptions: Use it.
* tests/strace-f: Likewise.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2012-05-01 21:32:09 +00:00
a28fbfd523 Update STA_* constants
* time.c (adjtimex_status): Add STA_NANO, STA_MODE, and STA_CLK.
* NEWS (Improvements): Mention it.
2012-05-01 21:17:51 +00:00
4ef3063c95 NEWS: update for release
* NEWS (Improvements): Mention recent recvmsg/recvmmsg decoders
enhancements.
(Portability): Add a recommendation for the minimum Linux kernel
version to use.
2012-05-01 21:04:18 +00:00
ea22e9753d Make printing of utsname.domainname more portable
* configure.ac: Check for struct utsname.domainname field.
* process.c (sys_uname): Print utsname.domainname when the field is
available.
2012-05-01 20:56:32 +00:00
5ea97658e7 Fix recvmmsg decode: do not show more data than actually returned
This change complements recent fix for recvmsg decoding.

* net.c (printmmsghdr): Add msg_len parameter to pass down to do_msghdr.
When this parameter is zero, pass mmsghdr.msg_len to do_msghdr instead.
(decode_mmsg): Add msg_len parameter, pass it down to printmmsghdr.
(sys_sendmmsg): Call decode_mmsg with msg_len == (unsigned long) -1L.
(sys_recvmmsg): Call decode_mmsg with msg_len == 0.
2012-05-01 20:41:40 +00:00
043b5f8142 Remove recently introduced use of ULONG_MAX
* io.c: Remove limits.h inclusion.
(tprint_iov): Use "(unsigned long) -1L" instead of "ULONG_MAX".
* net.c: Remove limits.h inclusion.
(printmmsghdr, sys_sendmsg): Use "(unsigned long) -1L" instead of
"ULONG_MAX".
2012-05-01 20:30:02 +00:00
3efa7c7f1b Enable printing of uts.domainname in uname syscall
* process.c (sys_uname): Enable printing of uts.domainname

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-28 16:59:47 +02:00
b5d43b81a8 Fix printstr's len parameter width
We often pass syscall params and other long-sized values
as printstr(len). Truncating them to int may be a bad thing.

* defs.h: Change len parameter's type from int to long in
string_quote and printstr function declarations.
* util.c (string_quote): Special-case only len==-1, not all len<0.
(printstr): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-28 14:58:35 +02:00
e0bc222263 Fix recvmsg decode: do not show more data than actually returned
I noticed that "hostname -d" talks over netlink and gets 20 bytes
of response, but we show entire 1024 bytes of iov.
This changes fixes that.

* defs.h: New function tprint_iov_upto.
* io.c (tprint_iov_upto): Definition of this function.
(tprint_iov): Call tprint_iov_upto.
* net.c (do_msghdr): Add data_size parameter, pass it down to tprint_iov_upto.
(printmsghdr): Add data_size parameter, pass it down to do_msghdr.
(printmmsghdr): Call do_msghdr with data_size==ULONG_MAX.
(sys_sendmsg): Call printmsghdr with data_size==ULONG_MAX.
(sys_recvmsg): Call printmsghdr with data_size==tcp->u_rval.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-28 14:26:18 +02:00
54432560a8 Package strace-log-merge
* strace.spec (%files): Add strace-log-merge.
2012-04-27 23:38:44 +00:00
9b4fca2853 NEWS: clarify & fix typo
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-27 23:38:45 +00:00
aa6d850477 Cast current_wordsize to an int
On 64bit systems with a single personality, we see:
count.c: In function 'call_summary':
count.c:223:5: warning: format '%u' expects type 'unsigned int',
	but argument 3 has type 'long unsigned int'

Since on multi-personality systems this is an array of ints, cast
the multiplication to an int and update the printf format.

* count.c (call_summary): Change %u to %d and cast first argument to int.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-27 23:38:24 +00:00
84e50fc764 Update NEWS for upcoming 4.7 release
* NEWS: Update for 4.7 release.
2012-04-20 17:32:50 +00:00
48e95c7b1a Sync strace.spec and debian/ with packages
* debian/changelog: Sync with 4.5.20-2.3.
* debian/control: Likewise.
* strace.spec: Sync with 4.6-2.
2012-04-20 17:31:48 +00:00
ebee04cfb0 Decode /dev/loop ioctls
Needed to debug some losetup failures, and it's easier when you can see
what the kernel is getting vs what you think you're sending, so add some
decoders for those ioctls.

* loop.c: New file.
* Makefile.am (strace_SOURCES): Add loop.c.
* defs.h (loop_ioctl): New prototype.
(string_quote): Likewise.
* ioctl.c (ioctl_decode): Call loop_ioctl when code is 'L'.
* util.c (string_quote): Remove static keyword.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-18 15:27:25 +00:00
085e428860 x32: add ia32 support
* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent1.h,
linux/x32/ioctlent1.h, linux/x32/signalent1.h and
linux/x32/syscallent1.h.
* configure.ac: Remove AC_GNU_SOURCE, obsoleted by
AC_USE_SYSTEM_EXTENSIONS.
* defs.h (SUPPORTED_PERSONALITIES): Set to 2 for X32.
(PERSONALITY1_WORDSIZE): Set to 4 for X32.
* file.c (stat64): New struct for X32.
(sys_lseek32): New function for X32.
(stat64): Undef.
(sys_fstat64): Likewise.
(sys_stat64): Likewise.
(realprintstat64): New function for X32.
(sys_fstat64): Likewise.
(sys_stat64): Likewise.
* mem.c (sys_old_mmap): New function for X32.
* pathtrace.c (pathtrace_match): Also check sys_old_mmap for X32.
* syscall.c (update_personality): Add X32 support.
(get_scno): Support currpers == 1 for X32.
* linux/syscall.h (sys_lseek32): New function prototype for X32.
* linux/x32/errnoent1.h: New file.
* linux/x32/ioctlent1.h: Likewise.
* linux/x32/signalent1.h: Likewise.
* linux/x32/syscallent1.h: Likewise.
2012-04-18 15:02:40 +00:00
2bb4581ee5 Cast clock_t type to unsigned long long
* resource.c (sys_times): Cast clock_t type to unsigned long long.
* signal.c (printsiginfo): Likewise.
2012-04-17 06:38:17 +04:00
6e4f3c1fa4 Add custom (faster) vfprintf implementation (disabled by default)
* defs.h: Declare strace_vfprintf either as a alias to vfprintf
or as a bona fide function. USE_CUSTOM_PRINTF define controls whether
we use strace_vfprintf. By default, we don't.
* strace.c (tprintf): Call strace_vfprintf instead of vfprintf.
* vsprintf.c: New file, implements strace_vfprintf.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 18:22:19 +02:00
61d62cf948 Stop using %h[h]u format specifiers
This is needed for simplified printf, and reduces code size a bit.

* block.c (block_ioctl): Cast the value to unsinged and use %u
instead of using %hu.
* desc.c (sys_io_cancel): Likewise.
* resource.c (sys_sysinfo): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 18:16:13 +02:00
142aee0a59 Trivial speed optimization
* strace.c (tprints): Use fputs_unlocked instead of fputs.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 18:10:15 +02:00
c933f27a3a Fix a problem with sys_lseek on x32
* file.c (sys_lseek): Use MIPS-n32 variant also for x32

Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 17:41:13 +02:00
35be58119e Add x32 support to strace
X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with
32bit pointers.  At system call level, x32 is also identical to x86-64,
as shown by many changes like "defined(X86_64) || defined(X32)".  The
main differerence bewteen x32 and x86-64 is off_t in x32 is long long
instead of long.

This patch adds x32 support to strace.  Tested on Linux/x32.

* configure.ac: Support X32.
* defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64,
Set PERSONALITY2_WORDSIZE to 4 for X86_64.
Add tcb::ext_arg for X32.
* file.c (stat): New for X32.
(sys_lseek): Use 64-bit version for X32.
(printstat64): Check current_personality != 1 for X86_64.
* ipc.c (indirect_ipccall): Check current_personality == 1
for X86_64.
* mem.c (sys_mmap64): Also use tcp->u_arg for X32.  Print NULL
for zero address.  Call printllval for offset for X32.
* pathtrace.c (pathtrace_match): Don't check sys_old_mmap for
X32.
* process.c (ARG_FLAGS): Defined for X32.
(ARG_STACK): Likewise.
(ARG_PTID): Likewise.
(change_syscall): Handle X32.
(struct_user_offsets): Support X32.
(sys_arch_prctl): Likewise.
* signal.c: Include <asm/sigcontext.h> for X32.
(SA_RESTORER): Also define for X32.
* syscall.c (update_personality): Support X32 for X86_64.
(is_restart_error): Likewise.
(syscall_fixup_on_sysenter): Likewise.
(get_syscall_args): Likewise.
(get_syscall_result): Likewise.
(get_error): Likewise.
(__X32_SYSCALL_BIT): Define if not defined.
(__X32_SYSCALL_MASK): Likewise.
(get_scno): Check DS register value for X32.  Use
__X32_SYSCALL_MASK on X32 system calls.
* util.c (printllval): Use ext_arg for X32.
(printcall): Support X32.
(change_syscall): Likewise.
(arg0_offset): Likewise.
(arg1_offset): Likewise.
* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h,
linux/x32/ioctlent.h.in, linux/x32/signalent.h,
linux/x32/syscallent.h, linux/x86_64/errnoent2.h,
linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and
linux/x86_64/syscallent2.h.
* linux/x32/errnoent.h: New.
* linux/x32/ioctlent.h.in: Likewise.
* linux/x32/signalent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/errnoent2.h: Likewise.
* linux/x86_64/ioctlent2.h: Likewise.
* linux/x86_64/signalent2.h: Likewise.
* linux/x86_64/syscallent2.h: Likewise.

Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 13:00:01 +02:00
dd0130b963 Restore tcb::u_lrval; fix lseek on MIPS-n32
Linux kernel v3.4 adds x32 support.  Both x32 and n32 use 64bit offset
for lseek parameter and return value.  We need u_lrval to handle it
properly.  Also we shouldn't check HAVE_LONG_LONG_OFF_T for n32 lseek.
This patch fixes it properly and prepares lseek for x32.

* defs.h (tcb): Restore tcb::u_lrval field, RVAL_Lfoo constants.
Set RVAL_MASK to 7.
* file.c (sys_lseek): Print 64bit offset and return RVAL_LUDECIMAL
for n32.
* syscall.c (get_error): Set u_lrval for MIPS-n32.
(trace_syscall_exiting): Handle RVAL_Lfoo return value types.

Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-16 12:16:45 +02:00
0cbed357ab Decode mtd ioctls
I got tired of figuring out mtd structures (which show up a lot
in the embedded space), so add decoders for those ioctls.

* defs.h (mtd_ioctl): New prototype.
(print_loff_t): Likewise.
* io.c (print_loff_t): Delete static keyword
* ioctl.c (ioctl_decode): Call mtd_ioctl when code is 'M'.
* Makefile.am (strace_SOURCES): Add mtd.c.
(EXTRA_DIST): Add linux/mtd-abi.h.
* mtd.c: New file.
* linux/mtd-abi.h: New file.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-06 14:39:15 +00:00
7ff5ed9325 Fix indefinite hang on no-mmu systems
The ptrace setoptions code will fork a child which goes to sleep and
expects the parent to continue on to do tests.  Unfortunately, this
does not work on no-mmu systems as fork() is actually vfork() and any
vforked children will hang the parent until it exits or execs.

We might be able to make this test work on no-mmu systems with a bit
of work, but easier to just disable this for the release so it works
now.

* strace.c (test_ptrace_setoptions_for_all): Return if strace_vforked.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-05 14:53:49 +00:00
f36ede69f7 Makefile.am: whitespace fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-29 17:21:41 +02:00
7015fe4fd2 powerpc: Add syscall entries for direct socket system calls
* linux/powerpc/syscallent.h: Add direct socket system calls.
2012-03-27 00:05:25 +00:00
4372cc956b qual_syscall: fix potential NULL dereference
Fix regression introduced by commit
c1371ebc40

* syscall.c (qual_syscall): Handle null sys_name.

Reported-by: Fr. Br. George <george@altlinux.org>
2012-03-26 14:14:50 +00:00
030d555ce5 strace-log-merge: fix file suffix calculation
* strace-log-merge: Quote file prefix to fix file suffix calculation.

Reported-by: Denys Vlasenko <vda.linux@googlemail.com>
Suggested-by: Andreas Schwab <schwab@linux-m68k.org>
2012-03-26 12:10:01 +00:00
df790130ff Remove unreachable code
* strace.c (process_opt_p_list): Remove unreachable code.
2012-03-26 13:41:56 +02:00
94f00e62b4 manpage: remove false info about -p being limited to 32 processes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-26 13:31:11 +02:00
c5ccfa450b Tweak help text and manpage (added -In to manpage)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-26 13:10:50 +02:00
378f9c5ad0 printstr: check for potential integer overflow
* util.c (printstr): Check for potential integer overflow during outstr
buffer size calculation.
2012-03-25 22:56:53 +00:00
ccee169ab6 Robustify parsing of numbers from strings
* defs.h (string_to_uint): New prototype.
* util.c (string_to_uint): New function.
* strace.c (error_opt_arg): New function.
(process_opt_p_list): Use string_to_uint instead of atoi.
Terminate in case of invalid process id.
(init): Use string_to_uint instead of atoi.
Use error_opt_arg in case of invalid option argument.
* syscall.c (qual_syscall, qual_signal, qual_desc): Use string_to_uint
instead of atoi.
2012-03-25 21:49:48 +00:00
20f6b54385 strace-log-merge: enhance usage error diagnostics
* strace-log-merge: Add --help option.  Check number of arguments.
Issue an error message when no strace output was merged.
2012-03-25 21:04:57 +00:00
d8879f4206 configure.ac: sort lists and use m4_normalize to ease maintenance
* configure.ac (AC_CHECK_FUNCS, AC_CHECK_HEADERS, AC_CHECK_MEMBERS,
AC_CHECK_DECLS): Sort lists, use m4_normalize.
2012-03-25 15:22:03 +00:00
e4cc7c58dd Simple optimizations
Why open-coding isdigit is a good idea?

Before: call   __ctype_b_loc
        movzbl (%ebx),%edx
        mov    (%eax),%eax
        testb  $0x8,0x1(%eax,%edx,2)
        je     lbl

After:  movzbl (%eax),%edx
        sub    $0x30,%edx
        cmp    $0x9,%dl
        ja     lbl

   text	   data	    bss	    dec	    hex	filename
 236869	    704	  18944	 256517	  3ea05	strace.before
 236719	    700	  18944	 256363	  3e96b	strace

* defs.h: Alias sigemptyset to __sigemptyset on glibc.
* syscall.c (qual_syscall): Open-code isdigit.
(qual_desc): Likewise.
(qual_signal): Open-code isdigit. Remove string copying
which was done for no apparent reason.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-23 11:29:01 +01:00
d63b0d5682 Reorder declarations in defs.h. No code changes
* defs.h: Reorder declarations (such as: keep all printing functions together).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-23 11:26:36 +01:00
6764f8f2f0 Simplify current tcp switching and current column handling
Instead of using "static FILE *outf and static unsigned int curcol"
to cache current outfile and its position, we can simply
remember current tcb and use its ->outf and ->curcol.
This allows to drop numerous "tcp->curcol = curcol" ops in trace().

Turns out we can't drop "static FILE *outf", but now its role is
a bit clearer: it newer changes after init, stays == stderr or
opened to shared log (which may be the same thing if neither -o
nor -ff was specified). Let's rename it then.

   text	   data	    bss	    dec	    hex	filename
 236953	    704	  18944	 256601	  3ea59	strace.before.prev.commit
 236905	    704	  18944	 256553	  3ea29	strace.before
 236869	    704	  18944	 256517	  3ea05	strace

* strace.c: Replace curcol static variable by struct tcb *current_tcp.
Rename static FILE *outf to shared_log (since it no longer caches tcp->outf).
(ptrace_restart): Use current_tcp->curcol instead of curcol.
(tprintf): Check current_tcp != NULL instead of outf != NULL.
Use current_tcp->outf instead of outf, current_tcp->curcol instead of curcol.
(tprints): Likewise.
(line_ended): Likewise.
(printleader): Switch current tcb by "current_tcp = tcp" istead of
assignments to outf and curcol.
(droptcb): Set current_tcp to NULL if we dropped it.
(startup_child): Rename outf to shared_log.
(init): Likewise.
(cleanup): Likewise.
(trace): Simplify current tcp switching and current column handling.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-22 09:56:20 +01:00
8511f2a1f0 Make threaded execve handling code more reabable and somewhat simpler
* strace.c (droptcb): Remove outfname check in "outfname && followfork >= 2" -
with recent changes, followfork >= 2 check guarantees that outfile
was specified, and _is already opened_.
(trace): Move tcb existence check before threaded execve handling.
This allows to remove tcp != NULL checks in threaded execve handling.
Rewrite threaded execve handling code to be less indented,
keeping the same logic.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-22 09:35:51 +01:00
513e9c23df simple cleanups in defs.h. No logic changes.
* defs.h: Move offsetof macro definition into "libc stuff" section.
Renumber TCB_foo constants (smaller constants -> sometimes smaller code).
Remove uoff macro.
* process.c: Move uoff macro here (sole user).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 14:39:22 +01:00
b5e0908a17 Show "+++ exited..." with -C
* strace.c (trace): Show "+++ exited..." with -C too.
Save tcp->curcol after PTRACE_LISTEN failure too, just in case.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 14:27:40 +01:00
e7a4772196 Slight tweak to qemu_multiarch_testing scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 11:32:55 +01:00
a44f9696e4 Replace reprinting decision logic
After this change, we no longer need to decide when we need
to set TCB_REPRINT, and when we don't: it's never needed :)

Well, almost. That pesky pid-changing execve needs special treatment.
If not it, it'd be possible to nuke TCB_REPRINT...

While at it, fix a case of mishandled -C.

* strace.c (printleader): Do not set TCB_REPRINT.
(trace): Set TCB_REPRINT only for execve with changing pid.
Fix mishandling of -C.
* syscall.c (trace_syscall_entering): Do not clear TCB_REPRINT.
(trace_syscall_exiting): Replace reprinting decision logic.
Remove call to printargs(): it is known to just return 0 here.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 11:06:20 +01:00
235067525c Report some ptrace failures; nuke tcp->ptrace_errno
Report some (not all) ptrace errors, namely,
errors on ptrace restart operations.

Before: 10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <unfinished ...>
After:  10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <ptrace(SYSCALL):No such process>

This tells user that strace failed to let sendto syscall
to be entered - process was dead at that point of time.
It is (marginally) better than to always say "<unfinished ...>"

While at it, patch removes tcp->ptrace_errno.
I added it many months ago, and it looks that after all
it is not needed for ptrace error detection: I failed to execute
a single existing code path which is accessible
through that variable only.

* defs.h: Remove struct tcp::ptrace_errno field.
* strace.c (ptrace_restart): Emit message to log on error.
(printleader): Remove "if (printing_tcp->ptrace_errno)..." code.
(trace): Remove !tcp->ptrace_errno check, it's always true.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 10:32:49 +01:00
907735aec8 Eliminate redundant checks of res variable
* syscall.c (trace_syscall_entering): Eliminate redundant checks of res variable.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 00:23:16 +01:00
46dc8b2206 Rename POWERPC-specific static variable result to ppc_result
* syscall.c: Rename POWERPC-specific static variable result to ppc_result.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-21 00:07:25 +01:00
bb6bb5c179 Remove redundant checks in syscall entry/exit, rename badly named function
* syscall.c (syscall_enter): Rename to get_syscall_args.
Document its return values.
(trace_syscall_entering): Don't check get_syscall_args() return
value for 0, it never returns that.
(syscall_fixup_on_sysexit): Make it return void.
(trace_syscall_exiting): Fix up syscall_fixup_on_sysexit()
call site accordingly.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-20 17:10:35 +01:00
b7a6dae9fb Trivial tweaks. No logic changes
* process.c (sys_ptrace): Remove unneeded line wrapping.
* syscall.c (trace_syscall_entering): Use tprints() instead of tprintf().

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-20 16:48:35 +01:00
852f98a382 Make ptrace_restart() static. No code changes
* defs.h: Remove ptrace_restart() declaration.
* strace.c (ptrace_restart): Move its definition here.
* util.c (ptrace_restart): Remove its definition.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-20 16:27:39 +01:00
806fbce4e6 Do not include limits.h unnecessarily
* ioctl.c: Remove limits.h inclusion left after the reverted change.
2012-03-20 14:02:51 +00:00
feb40c4543 Partially revert last change
Thank you Dmitry for spotting it.

* ioctl.c (compare): Partially revert last change - the new
comparison logic was buggy.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-20 13:11:51 +01:00
1c2e912cc3 Simplify search in ioctl table
text	   data	    bss	    dec	    hex	filename
 236973	    704	  18944	 256621	  3ea6d	strace.before
 236929	    704	  18944	 256577	  3ea41	strace

* ioctl.c (compare): Simplify generation of compare result.
(ioctl_lookup): Pass key directly, not as part of dummy struct.
(ioctl_next_match): More readable code. No logic changes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-20 10:57:41 +01:00
8cf2c261ea Update qemu build script: now tries to upload result back to host
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-19 12:20:32 +01:00
c1371ebc40 Shrink space needed by undefined syscalls in syscall tables.
Undefined syscall looked like this before this change:
{ 5,    0,      printargs,              "SYS_53"                },
That is, "SYS_53" string had to be allocated and stored in strace binary.
Since now SCNO_IN_RANGE() macro requires sysent[scno].sys_func != NULL
for valid syscalls, we can replace printargs with NULL in such lines
and make them "invalid", thus not requiring syscall name string.

Savings on i386:
   text	   data	    bss	    dec	    hex	filename
 237389	    704	  18944	 257037	  3ec0d	strace.before
 236973	    704	  18944	 256621	  3ea6d	strace
Savings on mips:
 336551  153692   38320  528563   810b3 strace.before
 275543  153688   38320  467551   7225f strace

Tested to still decode undefined syscalls correctly (syscall no. 222 on i386).

* linux/*/syscallent.h: Replace 'printargs, "SYS_nnn"' with
'NULL, NULL'.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-19 09:51:42 +01:00
9fd4f96d2a Optimize code if we have only one personality
On i386:
   text	   data	    bss	    dec	    hex	filename
 238025	    672	  18980	 257677	  3ee8d	strace.before
 237389	    704	  18944	 257037	  3ec0d	strace

* defs.h: Define PERSONALITY0_WORDSIZE as sizeof(long) if not defined.
Introduce new define, current_wordsize as
(personality_wordsize[current_personality]).
Make set_personality() no-op, current_personality constant zero,
current_wordsize as PERSONALITY0_WORDSIZE if we have only one personality.
* count.c (call_summary): Use current_wordsize instead of
personality_wordsize[current_personality].
* desc.c (printflock): Likewise.
* file.c (sys_utime): Likewise.
* io.c (tprint_iov): Likewise.
* process.c (printargv): Likewise.
* resource.c (decode_rlimit): Likewise.
* signal.c (sys_kill): Likewise.
(sys_rt_sigaction): Likewise.
* time.c (sprinttv): Likewise.
(sprint_timespec): Likewise.
(printitv_bitness): Likewise.
(tprint_timex): Likewise.
(printsigevent): Likewise.
* util.c (dumpiov): Likewise.
(umoven): Likewise.
(umovestr): Likewise.
* syscall.c: Initialize sysent to sysent0 etc.
Make current_personality, personality_wordsize[], set_personality()
conditional on SUPPORTED_PERSONALITIES > 1.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-19 09:36:42 +01:00
1be02798f5 Fix mips64 build failure: sys_pwrite64 doesn't exist.
sys_pwrite seems to do the same thing as sys_pwrite64
which we deleted when we removed non-Linux code.

* linux/mips/syscallent.h: s/sys_pwrite64/sys_pwrite/

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-18 23:49:07 +01:00
6acf586aa8 qemu_multiarch_testing/: a directory with scripts for build testing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-18 23:27:23 +01:00
146b944d4a Make internal_fork and internal_exec static
text	   data	    bss	    dec	    hex	filename
 237917	    672	  18980	 257569	  3ee21	strace
 237845	    672	  18980	 257497	  3edd9	strace_new

* defs.h: Remove declarations of internal_fork and internal_exec.
* process.c: Remove definitions of internal_fork and internal_exec.
* syscall.c: Move them here.
(internal_syscall): Return void instead of int. We were always
returning zero, and callers weren't checking it anyway.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-18 22:10:48 +01:00
f50e7141d5 Remove code which is not used on Linux
Compile tested in qemu on armv4l,armv4tl,armv5l,armv6l,i686,
mipsel,mips,x86_64

* syscall.c: Remove code which handles RVAL_Lfoo constants.
* defs.h: Remove struct tcb::u_lrval member - it is never set.
Remove RVAL_Lfoo constants which signify return of "long" result -
they are never used.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-18 04:16:59 +01:00
88c63f21b1 Remove unused version of sys_lseek
It is buggy: it returns RVAL_LUDECIMAL, which means the return value
is in tcp->u_lrval. But tcp->u_lrval is never set
(on Linux - it used to be set on other OSes).

* file.c (sys_lseek): Remove a version of this function which is
supposed to be used if off_t is long long. It appears to be buggy
and unused.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-18 04:13:14 +01:00
8677913953 Revert "Remove underscores from a few syscall names which have them"
This reverts commit 31972d52b1.
2012-03-17 18:00:14 +01:00
0c163c408f Simplify sys_lseek64 conditional compilation.
It looks like sys_lseek64() is never used.
For one, it is buggy (always shows 0 return value), and no one complains.

From code inspection: sys_lseek64 name is not used anywhere.
It is defined to sys_lseek if HAVE_LONG_LONG_OFF_T is true.
Thus, if !HAVE_LONG_LONG_OFF_T, it is never used.
Therefore "if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T"
conditional it sits in can be simplified to
"if HAVE_LONG_LONG_OFF_T".
Therefore, we can move it a bit up and merge with
"if !HAVE_LONG_LONG_OFF_T, use this sys_lseek()" code block,
by addind an "else" clause to it.
To simplify it more, drop define and just rename sys_lseek64 ->
sys_lseek.

Since the function is buggy, I think it is unused and we can
just drop it. (I checked: at least I386 never uses it).

* file.c (sys_lseek64): Rename to sys_lseek; don't compile it
if _LFS64_LARGEFILE but !HAVE_LONG_LONG_OFF_T since in this case
it is never used.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 16:26:47 +01:00
31972d52b1 Remove underscores from a few syscall names which have them
Affected names are "_newselect", "_llseek", "_sysctl".
I see no apparent reason why they have leading underscores.
Moreover, some arches have underscored names and some have
non-underscored ones. This is not consistent.

I verified that every architectire I touched did not have
a similarly named syscall without underscore, thus this change
does not introduce new ambiquities.

I left "_exit" untouched for now, but the same points stand for it too:
some architectures use "exit" and no one complains. So why many
arches are using "_exit"?

* linux/*/syscallent.h: Remove underscores from displayed
syscall names for _newselect, _llseek, _sysctl.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 13:23:00 +01:00
a61a72eacb Remove unused struct tcb::baddr field
* defs.h: Remove unused struct tcb::baddr field.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 12:41:27 +01:00
e10a0e4734 Remove unused PTRACE_WRITE{TEXT,DATA} constants (they are from SunOS)
* util.c: Remove unused PTRACE_WRITE{TEXT,DATA} constants.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 12:11:10 +01:00
989ebc9139 Reindent case labels. No code changes
* net.c (printsockopt): Reindent case labels.
* signal.c (sys_signal): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 04:42:07 +01:00
3da9693b81 Remove unused constants. No code changes
* syscall.c: Remove unused ENOIOCTLCMD constant. Fix indentation.
* util.c: Remove unused CLONE_STOPPED constant.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 03:17:15 +01:00
081533c100 Move change_syscall() to its only user and make it static
* defs.h: Remove declaration of change_syscall().
* process.c (change_syscall): Remove definition of this function.
* util.c (change_syscall): Add definition of change_syscall().

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 02:17:51 +01:00
2897fb3437 MAP_ANON is the same as MAP_ANONYMOUS, no need to have the former
* mem.c: Do not allocate string for MAP_ANON if it is the same as
MAP_ANONYMOUS.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 01:29:40 +01:00
3e3490acf7 Indentation and whitespace fixes. No code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 01:27:37 +01:00
cb419c52cb test/threaded_execve: make it also test a case when leader is not in syscall
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-17 01:24:25 +01:00
b468f2320a Implement prlimit64 decoding, rewrite [gs]etrlimit decoding
* configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call.
Define SIZEOF_RLIM_T.
* m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove.
* linux/dummy.h (sys_prlimit64): Remove.
* linux/syscall.h (sys_prlimit64): New prototype.
* resource.c (resources): Reindent, add RLIMIT_RTTIME.
(sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove.
[HAVE_LONG_LONG_RLIM_T]: Remove dead code.
[_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise.
(sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32,
print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit,
sys_prlimit64): New functions.
2012-03-16 19:05:21 +00:00
9c3861d317 Remove another "interrupt to quit" message
* strace.c (startup_attach): Remove another "interrupt to quit" message.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-16 15:21:49 +01:00
3db3b26101 Fix "strace -oFILE -ff -p<nonexistant_pid>" behavior
* strace.c (newoutf): Set tcp->outf in non-ff mode too.
(alloctcb): This define is removed.
(alloc_tcb): Renamed to alloctcb. Does not set tcp->outf anymore.
Lost 'command_options_parsed' flag parameter.
(startup_attach): Do not say "interrupt to quit" in attach message -
^C does not work in all cases, we mislead users.
Call newoutf(tcp) after successful attach.
(startup_child): Call newoutf(tcp) after successful attach.
(trace): Call newoutf(tcp) when we picked up already attached child.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-16 15:15:14 +01:00
800ec8ffde Make alloc_tcb and droptcb static. No code changes.
The change is trivial. Diff is large because it is confused
by function definitions being moved around.

* defs.h: Remove declarations of alloc_tcb and droptcb.
* strace.c: Make alloc_tcb and droptcb static.
Shuffle functions around to make compiler happy.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-16 15:11:34 +01:00
a6d91ded3f Tidy up includes and copyright notices, fix indentation
The files not mentioned in changelog below had only
copyright notices fixes and indentation fixes.

* defs.h: Include <stdint.h> and <inttypes.h>.
* file.c: Do not include <inttypes.h>.
Move struct kernel_dirent declaration below top include block.
* block.c: Do not include <stdint.h> and <inttypes.h>.
* quota.c: Likewise.
* desc.c: Likewise.
* signal.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-16 12:02:22 +01:00
27aeaa2aaa scsi.c: add copyright header
* scsi.c: This file was added back in 2007 without a copyright header.
Add it now.
2012-03-16 10:43:32 +00:00
4a0ffeaf85 Enhance capget and capset syscalls decoding
* system.c (cap_version): New xlat structure.
(print_cap_header, print_cap_data): New functions.
(sys_capget, sys_capset): Use them.
2012-03-15 22:58:39 +00:00
648c22c4b3 Remove unused code
* syscall.c (subcall_style, decode_subcall): Remove.
[SYS_socket_subcall] (decode_socket_subcall): New function, based on
decode_subcall in deref_style.
[SYS_ipc_subcall] (decode_ipc_subcall): New function, based on
decode_subcall in shift_style.
(trace_syscall_entering): Use decode_socket_subcall and
decode_ipc_subcall instead of decode_subcall.
2012-03-15 22:08:55 +00:00
3d7b11bf55 Fix IPC decoding on alpha and arm
* ipc.c (indirect_ipccall): Return 0 on ALPHA and ARM EABI.
(sys_shmat): Use indirect_ipccall for proper return value decoding.
2012-03-15 21:19:36 +00:00
63e4f86bd7 arm: fix compilation warnings
* configure.ac: Define SIZEOF_LONG.
* signal.c (sys_rt_sigaction) [SUPPORTED_PERSONALITIES > 1]: Help
compiler to optimize out unreachable code that is not expected to work
on platforms where sizeof(long) <= 4.
2012-03-15 20:42:46 +00:00
84abf70011 tests: robustify again buggy shells
* tests/init.sh (check_strace): Use "${parameter:-word}" shell syntax
instead of "${parameter-word}".

Reported-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 20:17:49 +00:00
3362e89f66 improve ifdef check with decode_subcall
Use the same ifdef logic around the call sites of decode_subcall()
to protect the definition of the func itself.  This fixes warnings
for targets like hppa which don't use this func.

* syscall.c (decode_subcall): Wrap in SYS_socket_subcall and
SYS_ipc_subcall define checks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 20:14:28 +00:00
dde045c13f alpha: fix decode of osf_sigprocmask
The alpha sigprocmask syscall is special in that it comes from OSF rather
than the style that everyone else uses.

Tested with this simple code:
$ cat test.c
#include <signal.h>
main() {
	sigset_t set, oldset;
	sigemptyset(&set);
	sigaddset(&set, SIGINT);
	sigaddset(&set, SIGHUP);
	sigprocmask(SIG_SETMASK, &set, &oldset);
	sigprocmask(SIG_UNBLOCK, &oldset, &set);
	sleep(3);
}
$ gcc test.c && ./strace ./a.out
...
osf_sigprocmask(SIG_SETMASK, [HUP INT]) = 0 (old mask [])
osf_sigprocmask(SIG_UNBLOCK, [])        = 0x3 (old mask [HUP INT])
osf_sigprocmask(SIG_BLOCK, [CHLD])      = 0x3 (old mask [HUP INT])
...

* linux/alpha/syscallent.h: Call sys_sigprocmask for osf_sigprocmask,
and change number of arguments to two.
* signal.c (sys_sigprocmask): Fix decoding of alpha osf sigprocmask.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 20:14:17 +00:00
384b0ada7d Fix array size calculation in previous commit
* pathtrace.c (getfdpath): Fix array size calculation.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 18:11:51 +01:00
29865e77e6 pathtrace_select() is never called with NULL, remove dead code
pathtrace_select() is only called for -P FILE options,
and FILE is never a NULL pointer.

   text	   data	    bss	    dec	    hex	filename
 239453	    672	  19012	 259137	  3f441	strace.before
 239329	    672	  19012	 259013	  3f3c5	strace

* pathtrace.c (pathtrace_select): Remove "if (path == NULL)...".
(pathtrace_select): Remove code which only executes if path == NULL.
The code was also buggy, it can free non-malloced pointer.
(getfdpath): Simplify snprintf to sprintf.
(pathmatch): Use strcmp() == 0 idiom for string equality test.
(pathtrace_match): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 18:03:56 +01:00
7c2b1a6dd0 manpage: remove bugs which are fixed
"A traced process ignores SIGSTOP" - fixed, expected to be in linux-3.4.x.
"A traced process which tries to block SIGTRAP will be sent a SIGSTOP
in an attempt to force continuation of tracing." - not needed
and no longer done.
"On Linux, exciting as it would be, tracing the init process is forbidden"
- not true anymore.
"When a traced process receives a SIGTRAP signal not
associated with tracing, strace will not report that signal correctly."
- not true anymore.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 17:32:56 +01:00
a509054aee Simplify SIGCHLD handler setting
* strace.c (init): Set SIGCHLD to SIG_DFL earlier.
(startup_child): Do not bother restoring SIGCHLD handler.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 17:27:49 +01:00
2c4fb905fe When reporting signals, use short signal names (SIGfoo) instead of strerror
* defs.h: Remove strsignal declaration.
* signal.c: Better check for SI_FROMUSER define.
* strace.c (strerror): Remove this function.
(trace): Use short signal names (SIGfoo) instead of strerror.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 17:24:49 +01:00
7cba831386 Remove TODO file: it's eleven years old and completely outdated
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 15:55:33 +01:00
29898149a0 Clean up defs.h order. No code changes
* defs.h: Group together related declarations. No code changes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 15:02:49 +01:00
6e0bfd11ac Fix lame kernel version checking code
The code "os_release[0] >= '3'" is not good for any
finer-grained checks such as "kernel >= 3.2.1".
Let's proactively fix it.

* strace.c: Change os_release from string to integer.
(get_os_release): Parse uname.release to KERNEL_VERSION
representation.
(init): Convert kernel version check to KERNEL_VERSION.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 14:36:28 +01:00
61e7aad9fa Experimental support for "detach on execve" feature
* strace.c: Define new detach_on_execve, skip_startup_execve bool variables.
(init): Set detach_on_execve on -b, set skip_startup_execve if
"strace PROG" form is used.
(trace): Detach from process if -b and we see PTRACE_EVENT_EXEC event.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 13:44:17 +01:00
3e084ac349 Simple fixes.
* strace.c (usage): Document -d; document that -F is deprecated.
(droptcb): Print "<detached ...>" correctly for non-ff mode too.
(detach): Suppress a warning.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 13:39:05 +01:00
68269aa29f Remove an outdated comment
* defs.h: Remove an outdated comment.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 13:02:31 +01:00
bcde70adbc Remove extra include directives. No code changes.
* defs.h: Include <signal.h> unconditionally.
Other files were doing it unconditionally, so no harm done.
* bjm.c: Remove system includes which are already included by defs.h.
* pathtrace.c: Likewise.
* process.c: Likewise.
* signal.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 12:56:25 +01:00
a50d2a87a1 Tidy up order of includes; make bool variables explicit.
Bool variables are more compact in data and (on x86) on code too:

   text	   data	    bss	    dec	    hex	filename
 237950	    676	  19044	 257670	  3ee86	strace.before
 237838	    676	  19012	 257526	  3edf6	strace

* defs.h: Group library includes at the top of the file.
Rename dtime to Tflag, debug to debug_flag.
Change debug_flag,Tflag,qflag,not_failing_only,show_fd_path,tracing_paths
variable declarations from int to bool.
* strace.c: Change corresponding definitions. Do the same for static
variables iflag,rflag,print_pid_pfx.
Rename dtime to Tflag, debug to debug_flag.
* syscall.c: Rename dtime to Tflag, debug to debug_flag.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-15 12:49:52 +01:00
b859e14d20 Fix compiler warnings about breaking strict-aliasing rules
* system.c (sys_capget, sys_capset): Use proxy unions to cast long*
pointers to cap_user_header_t and cap_user_data_t pointers without
breaking strict-aliasing rules.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 02:03:36 +00:00
c96fdfae97 ppc64: drop unused pid variable
* syscall.c (get_scno) [POWERPC64]: Delete unused pid variable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 01:04:31 +00:00
8f81e385c7 ia64: fix compilation warnings
* linux/ia64/syscallent.h: Remove improper defines and undefs.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 01:01:25 +00:00
ad0c01eeed Ensure that SWAP_FLAG_* constants are defined
* file.c: Define those of SWAP_FLAG_* constants which are not yet
provided by <sys/swap.h>.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 00:52:22 +00:00
33d24762cd Enhance *listxattr syscalls decoding
* file.c (print_xattr_list): New function.
(sys_listxattr, sys_flistxattr): Use it.
2012-03-14 16:34:32 +00:00
7989ad4208 Fix *at syscalls flags decoding
Several *at decoders were defining own incomplete *atflags xlat
structures.  That was error prone, and fchownat decoder actually
failed to recognize AT_EMPTY_PATH.  Merging these incomplete
structures into the single at_flags xlat structure will fix
flags handling in all these decoders altogether.

* file.c: Define all AT_* constants used by *at decoders.
(at_flags): New xlat structure, with records for all AT_* constants.
(fstatatflags, linkat_flags, unlinkatflags): Remove.
(sys_newfstatat, sys_linkat, sys_unlinkat, sys_fchownat,
sys_utimensat):  Use at_flags.
2012-03-13 23:26:01 +00:00
371e153146 Fix linkat flags decoding
* file.c (linkat_flags): New xlat structure.
(sys_linkat): Decode flags using linkat_flags.
2012-03-13 23:16:37 +00:00
297632be5c Implement sys_rt_tgsigqueueinfo syscall decoder
* linux/dummy.h (sys_rt_tgsigqueueinfo): Remove.
* linux/syscall.h (sys_rt_tgsigqueueinfo): New prototype.
* signal.c (print_sigqueueinfo): New function, based on
sys_rt_sigqueueinfo.
(sys_rt_sigqueueinfo): Use print_sigqueueinfo.
(sys_rt_tgsigqueueinfo): New function.
2012-03-13 15:51:13 +00:00
ee3c22ce55 Implement syslog syscall decoder
* linux/dummy.h (sys_syslog): Remove.
* linux/syscall.h (sys_syslog): New prototype.
* system.c (syslog_action_type): New xlat structure.
(sys_syslog): New function.
2012-03-13 15:28:01 +00:00
67559ad260 Less ugly debug display of ptrace events
* strace.c (trace): Less ugly debug display of ptrace events.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-13 12:05:27 +01:00
6bc050cc54 Make manpage mention that -p "pidof PROG" works
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-13 11:48:22 +01:00
7de265d88a Fix logging for "strace -o FILE -ff test/threaded_execve" test case
Our logic which was deciding whether to print "<unfinished ...>"
thingy wasn't working properly for -ff case.

* defs.h: Group log generation-related declarations together.
Add a large comment which explains how it works.
Add declaration of line_ended() function.
* strace.c (line_ended): New function which sets up internal data
to indicate that previous line was finished.
(printleader): Change logic to fix log generation in -ff mode.
(newoutf): Make check for -ff mode consistent with other places.
(droptcb): Print "<detached ...>" if last line for this tcp wasn't finished.
(cleanup): Remove code to print "<unfinished ...>", printleader()
or detach() will do it instead.
(trace): Remove code to print "<unfinished ...>".
Add code which finishes threaded execve's incomplete line
with " <pid changed to PID ...>" message. Replace printing_tcp = NULL
followed by fflush() by line_ended() call.
* process.c (sys_exit): Call line_ended() to indicate that we finished priting.
* syscall.c (trace_syscall_exiting): Set printing_tcp to current tcp.
Call line_ended() to indicate that we finished priting.
Remove call to fflush(), it is done by line_ended() now.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-13 11:44:31 +01:00
3df080af31 net.c: recognize MSG_WAITFORONE
* net.c (msg_flags): Add MSG_WAITFORONE.
2012-03-13 01:26:26 +00:00
328bf250bd Treat -ff without -o FILE as single -f
* strace.c (init): Treat -ff without -o FILE as single -f.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-12 23:34:13 +01:00
558e5127fb Style fix. No code changes
* strace.c (process_opt_p_list): Style fix.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-12 23:32:16 +01:00
ecc8b97c9b Reduce stack usage by ~0.5k
main() uses ~0.5k of stack for local variables and such. When we enter
main tracing loop, most of these variables are no longer used.
But they still take up stack for the entire life of strace.
We can avoid this wastage if we move init code into a separate function.
(Need to be careful and not allow automatic inlining).

* strace.c (init): New function. Most of pre-existing code of
main is now living here.
(main): Call init() to do initialization.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-12 23:05:25 +01:00
2e856a1c92 Preparatory cosmetic changes for the next commit
* strace.c (tprintf): Move function up in the source file. No code changes.
(tprints): Likewise.
(printleader): Likewise.
(tabto): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-12 23:02:26 +01:00
7af9f35001 Implement sendmmsg syscall decoder
* linux/dummy.h (sys_sendmmsg): Remove.
* linux/syscall.h (sys_sendmmsg): New prototype.
* net.c (printmmsghdr): Add index argument specifying the element in
mmsghdr array to print.
(decode_mmsg): New function, prints the whole mmsghdr array, its length
and message flags.
(sys_sendmmsg): New function.
(sys_recvmmsg): Use decode_mmsg to fix mmsghdr array decoding.
2012-03-11 23:59:29 +00:00
1ff463d154 Implement sched_rr_get_interval syscall decoder
* linux/dummy.h (sys_sched_rr_get_interval): Remove.
* linux/syscall.h (sys_sched_rr_get_interval): New prototype.
* process.c (sys_sched_rr_get_interval): New function.
2012-03-11 23:00:11 +00:00
64d0e71f8b Implement migrate_pages syscall decoder
* linux/dummy.h (sys_migrate_pages): Remove.
* linux/syscall.h (sys_migrate_pages): New prototype.
* mem.c (sys_migrate_pages): New function.
2012-03-11 22:44:14 +00:00
1b0bae2969 Implement get_robust_list syscall decoder
* linux/dummy.h (sys_get_robust_list): Remove.
* linux/syscall.h (sys_get_robust_list): New prototype.
* process.c (sys_get_robust_list): New function.
2012-03-11 22:32:26 +00:00
1e8ed076ce Define sys_set_robust_list as an alias to sys_munmap
* linux/dummy.h (sys_set_robust_list): Redefine to sys_munmap.
2012-03-11 21:57:57 +00:00
73215473ce Implement clock_adjtime syscall decoder
* linux/dummy.h (sys_clock_adjtime): Remove.
* linux/syscall.h (sys_clock_adjtime): New prototype.
* time.c (do_adjtimex): New function, based on sys_adjtimex.
(sys_adjtimex): Use it.
(sys_clock_adjtime): New function.
2012-03-11 21:25:51 +00:00
51dba35d38 Define sys_setns as an alias to sys_inotify_rm_watch
* linux/dummy.h (sys_setns): Redefine to sys_inotify_rm_watch.
2012-03-11 15:45:20 +00:00
6bbe69609b Sort definitions of dummy parsers. No code changes
* linux/dummy.h: Sort definitions of parsers implemented as aliases.
2012-03-11 15:43:04 +00:00
ab1a70c7a1 Correct inotify_rm_watch decoder
* file.c (sys_inotify_rm_watch): Print second argument as int.
2012-03-11 15:33:34 +00:00
531af48779 Alias sys_fsync to sys_close
* file.c (sys_fsync): Remove.
* linux/syscall.h (sys_fsync): Likewise.
* linux/dummy.h (sys_fsync): Alias to sys_close.
* linux/m68k/syscallent.h: Add TD flag to fsync entry.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
2012-03-11 15:28:03 +00:00
eb420ef585 Update ioctl entries
* linux/ioctlent.h.in: Regenerate from v3.3 headers.
* linux/i386/ioctlent.h.in: Likewise.
2012-03-10 21:15:58 +00:00
63c5e63f2c strace-log-merge: cleanup
* strace-log-merge: Redirect usage to stderr, make the check
for numeric suffix simpler.
2012-03-10 16:10:06 +00:00
d92029ef88 Add syscall entries for new linux syscalls
* linux/i386/syscallent.h: Update process_vm_writev handler.
* linux/powerpc/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Add entries for accept4 and sendmmsg.
* linux/arm/syscallent.h: Add entries for process_vm_readv and
process_vm_writev.
* linux/m68k/syscallent.h: Likewise.
* linux/mips/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: Add entries for process_vm_readv,
process_vm_writev and accept4.
* linux/microblaze/syscallent.h: Add entries for sendmmsg,
process_vm_readv and process_vm_writev.
2012-03-10 15:04:16 +00:00
039521051e Implement process_vm_writev decoder
* process.c (sys_process_vm_writev): New function.
* linux/syscall.h (sys_process_vm_writev): New prototype.
2012-03-10 14:14:49 +00:00
0bfd74436d Output iovec length in vmsplice and process_vm_readv decoders
* io.c (sys_vmsplice): Output iovec length.
* process.c (sys_process_vm_readv): Likewise.
2012-03-10 14:03:25 +00:00
8829365654 swapon: decode swap flags
* file.c: Include <sys/swap.h>.
(swap_flags): New xlat structure.
(sys_swapon): New function.
* linux/dummy.h (sys_swapon): Remove.
* linux/syscall.h (sys_swapon): New declaration.
2012-03-09 21:02:19 +00:00
37ab4b79de Trivial simplification
* strace.c (detach): Use waitpid instead of wait4.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 15:34:16 +01:00
f20250266e Don't consider PROG to be our child in "strace -D PROG" case
TCB_STRACE_CHILD is used for the case when "strace PROG" is ^C-ed
or something like that. strace should not just exit - it should
do something with its child (such as signal it too).

In -D case, PROG is not really a child of _strace_, it is a child
of strace's parent. It's ok to handle it exactly as an attached process.

While we are at it, remove nonsensical special-casing of TCB_STRACE_CHILD
in printing of "<unfinished ...>" message.

* strace.c (startup_attach): Don't set TCB_STRACE_CHILD if -D.
(trace): Print "<unfinished ...>" on error regardless of TCB_STRACE_CHILD.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 15:29:45 +01:00
75fe85c2ee Fix the case where we try to detach unattached processes
Before this change:
$ strace -D -p1
strace: -D and -p are mutually exclusive options
Process 1 detached  <==== WRONG! (and we try to SIGSTOP it!!!)

* defs.h: Change the meaning of TCB_ATTACHED: now it means "this tracee
is attached to us". Add TCB_STRACE_CHILD: "this tracee is our child".
* strace.c (kill_save_errno): Move up. No code changes.
(process_opt_p_list): Don't set TCB_ATTACHED on new tcb.
(startup_attach): Change how we work with TCB_ATTACHED.
Set TCB_STRACE_CHILD on -D.
(startup_child): Use kill_save_errno instead of kill.
Set TCB_ATTACHED and TCB_STRACE_CHILD on attached strace child.
If we are in -D case, don't set TCB_ATTACHED (we aren't attached yet).
(detach): do not do PTRACE_DETACH if TCB_ATTACHED is not set.
(cleanup): Check TCB_STRACE_CHILD instead of TCB_ATTACHED.
(trace): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 15:15:24 +01:00
97c503fa2e Call PTRACE_CONT with addr=0
* strace.c (trace): Call PTRACE_CONT with addr=0.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 15:11:21 +01:00
796f6e82b4 install strace-log-merge by "make install"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 14:21:59 +01:00
da3657d4e7 strace_log_merge: new file. Helper to merge timestamped strace -ff logs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 13:43:44 +01:00
fd88338067 Fix PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case
In this case we were printing PIDs to LOG.* files
even though it is not necessary.

The fix is in the addition of "&& followfork < 2" condition.

* strace.c: Remove pflag_seen variable, add print_pid_pfx one.
(process_opt_p_list): Do not pflag_seen++.
(main): Use "nprocs != 0" condition instead of "pflag_seen != 0".
Set print_pid_pfx before entering main tracing loop.
(printleader): Use print_pid_pfx to decide whether to print pid prefix.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 13:03:41 +01:00
e8172b79e3 Allow -p PID to take comma or whitespace-separated list of PIDs
* defs.h: Clarify meaning of TCB_ATTACHED. No code changes.
* strace.c (process_opt_p_list): New function.
(main): Call process_opt_p_list to process -p PIDs argument.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-09 13:01:04 +01:00
114aefd618 Pass addr=0 instead of 1 into restarting ptrace calls
While we are at it, fold do_ptrace into its lone caller.
We no longer set tcp->ptrace_errno = ESRCH on ESRC error in upeek.
Other code paths where ptrace fails wern't doing it, and the code which
checks tcp->ptrace_errno even assumes it is never set to ESRCH.
(It was me who added this code sometime ago, so it was my fault
that it was a bit messy)

I ran sigkill_rain test and verified that unfinished syscalls are
still handled correctly.

* util.c (ptrace_restart): Do not pass addr=1 to ptrace(), pass 0 instead.
I have no idea why we were passing 1. Ptrace documentation says
that addr parameter is ignored.
(do_ptrace): Remove this function.
(upeek): Use ptrace() instead of do_ptrace().
* defs.h: Remove do_ptrace() declaration.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-08 12:13:44 +01:00
4c65c44478 Trivial tweaks to error messages
* strace.c (test_ptrace_setoptions_followfork): Use kill_save_errno
instead of kill.
(trace): Use perror_msg instead of perror.
* count.c (set_sortby): Use error_msg_and_die instead of fprintf.
* syscall.c (qualify): Likewise.
* util.c (ptrace_restart): Expand error message.
(umoven): Likewise.
(umovestr): Likewise.
(upeek): Use perror_msg instead of sprintf + perror.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-08 11:54:10 +01:00
aea4b876c8 Remove stray sys_swapon() declaration
* linux/syscall.h: Remove stray sys_swapon() declaration.
* linux/mips/syscallent.h: Include dummy.h with correct relative path.
* linux/dummy.h: Tweak one place where spaces are used instead of tabs.
* linux/dummy_check.sh: New script. It helps in finding stray syscall
handler declarations.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-28 16:39:44 +01:00
3b60542041 Correct syscall entries for t[g]kill
* linux/hppa/syscallent.h: Make tgkill use sys_tgkill, not printargs.
* linux/sh/syscallent.h: Change tkill type TD -> TS.
* linux/sh64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Change tkill type 0 -> TS.
* linux/x86_64/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-27 14:58:06 +01:00
1945ccc3fb Assorted trivial optimizations
text	   data	    bss	    dec	    hex	filename
 236448	    672	  19044	 256164	  3e8a4	strace.before
 236360	    672	  19044	 256076	  3e84c	strace

* file.c (sprintmode): Use smaller static buffer, eliminate strlen call.
(sprinttime): Use smaller static buffer.
(printstat_sparc64): Coalesce two printing calls into one.
(printstat_powerpc32): Likewise.
(printcompat_statfs6): Likewise.
(sys_utime): Do not fetch personality_wordsize[current_personality]
repeatedly - cache it in local variable instead.
* process.c (printargv): Likewise.
* resource.c (sprintrlim): Return const char*, not char*. This allows
to eliminate sprintf(buf, "RLIM_INFINITY"). Use smaller static buffer.
(sprintrlim64): Likewise.
* strace.c (strerror): Use smaller static buffer.
(strsignal): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-27 14:37:48 +01:00
72879c6a35 Alias a few more syscall printing functions
text	   data	    bss	    dec	    hex	filename
 237384	    672	  19044	 257100	  3ec4c	strace.before
 236448	    672	  19044	 256164	  3e8a4	strace

* defs.h: Declare new functions printargs_lu(), printargs_ld()
which simply print syscall all args as unsigned or signed longs.
* desc.c (sys_epoll_create): Call printargs_ld() instead of open-coding it.
* linux/syscall.h: Remove declarations of the following functions:
sys_alarm, sys_getresgid, sys_getsid, sys_nice, sys_setgid, sys_setpgid,
sys_setpgrp, sys_setregid, sys_setresgid.
* process.c (sys_setgid): Delete this function: now aliased to sys_setuid().
(sys_getresgid): Delete this function: now aliased to sys_getresuid().
(sys_setregid): Delete this function: now aliased to sys_setreuid().
(sys_setresgid): Delete this function: now aliased to sys_setresuid().
(sys_setpgrp): Delete this function: now aliased to printargs_lu().
(sys_getsid): Likewise.
(sys_setpgid): Likewise.
(sys_alarm): Likewise.
(sys_getpgrp): Delete this function: was unused - was already shadowed
by a define in linux/dummy.h.
(sys_setsid): Likewise.
(sys_getpgid): Likewise.
* resource.c (sys_nice): Delete this function: now aliased to printargs_ld().
* linux/dummy.h: Define new aliases (see above for the list).
* syscall.c (printargs_lu): New function.
(printargs_ld): New function.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-27 14:18:02 +01:00
b237b1b20d Style fixes, no code changes
* desc.c (sys_io_getevents): Indentation fix.
* file.c (sys_xstat): Remove space after function name.
(decode_mknod): Indentation fix.
* net.c (printsockopt): Indentation fix.
* process.c (unalignctl_string): Indentation fix.
(sys_sched_getscheduler): Remove space after ! operator.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-27 13:56:59 +01:00
e83e157021 Compress blank lines
Suppress repeated empty lines left after automated code removal.
This change was made by filtering every source code file through
"cat -s".
2012-02-25 15:41:21 +00:00
ee245d8ca3 Remove parts of automake machinery which are not needed on Linux
This change is a verbatim part of Dmitry's changes to remove support
for non-Linux architectures.

* Makefile.am: Don't install PORTING file. Install README-linux-ptrace file.
Set OS variable to linux unconditionally.
* configure.ac: Remove code to set opsys variable, and its usage.
Remove checks for headers which are never present on Linux.
* m4/stat.m4: Remove 'ifdef LINUX' check.
* m4/statfs.m4: Likewise.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 15:34:10 +01:00
dd762c302d Remove and update documentation
This change is a verbatim part of Dmitry's changes to remove support
for non-Linux architectures.

* PORTING: Deleted.
* INSTALL: Modified.
* README: Modified.
* strace.1: Modified: bugs should be reported to mailing list, not Debian.
* strace.spec: do not install PORTING file.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 15:29:21 +01:00
aa925db236 Remove a few more code parts which are unused on Linux
This change is abapted from Dmitry's changes to remove support for
non-Linux architectures.

* Makefile.am: Remove if LINUX/endif pairs.
* defs.h: Remove stream_ioctl() declaration.
* ioctl.c (ioctl_decode): Remove 'ifdef HAVE_SYS_STREAM_H' block.
* resource.c: Use 'defined(FOO)' instead of 'defined FOO' form.
* util.c: Likewise.
* signal.c: Remove conditional includes which are never used on Linux.
* stream.c: Likewise.
* file.c: Remove excessive empty lines.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 15:19:02 +01:00
1a3cf10c30 Build fixes after non-Linux code removal
* configure.ac: Remove calls to proc-based ptrace checks.
* proc.c: Remove, it's empty now.
* Makefile.am: Remove reference to proc.c.
* net.c: Remove trailing newlines.
* quota.c: Likewise
* resource.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* time.c: Likewise

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:54:34 +01:00
c36c352329 Fix defined(FOO) style
* file.c: Consistently use defined(FOO) instead of defined (FOO).
* mem.c: Likewise.
* net.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* linux/mips/syscallent.h: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:47:15 +01:00
2d1e90f958 Reindent preprocessor directives in util.c; fix style.
* util.c: Fix indentation of preprocessor directives broken by
automatic removal of non-Linux code. Fix style to use consistent
defined(FOO) instead of defined (FOO).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:46:14 +01:00
523635f4da Reindent preprocessor directives in syscall.c; fix style.
* syscall.c: Fix indentation of preprocessor directives broken by
automatic removal of non-Linux code. Fix style to use consistent
defined(FOO) instead of defined (FOO).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:44:25 +01:00
329655a466 Reindent defs.h preprocessor directives
* defs.h: Fix indentation of preprocessor directives broken by
automatic removal of non-Linux code.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:42:32 +01:00
8470374cba Cleanup after non-Linux code removal.
Conditions such as defined(LINUX) are always true now,
defined(FREEBSD) etc are always false.
When if directive has them as subexpressions, it can be simplified.
Another trivial changes here are fixes for directive indentation.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:38:52 +01:00
5afdf12572 Manual removal of non-Linux source, documentation, etc.
Remove non-Linux source directories: freebsd/, svr4/, sunos4/, svr4/.
Remove README-freebsd, README-sunos4, README-svr4, m4/procfs.m4.

linux/sparc/{errnoent1,ioctlent1,signalent1}.h used to point to svr4/ files -
replace their contents with copies of used (and now deleted) files.
Make linux/sparc64/{errnoent1,ioctlent1,signalent1}.h include these files
instead of svr4/* ones.

Makefile.am: remove references to deleted files.
configure.ac: Remove a few tests which make no sense on Linux.
Man page: remove non-Linux quirks information.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:30:32 +01:00
ed720fda5d Automated removal of non-Linux code
This change is generated by running every source through the following command:

unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD
-USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS
-UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-25 02:24:03 +01:00
d2a660f534 When accessing data blocks, truncate addr to wordsize
* util.c (umoven): Truncate addr to wordsize before use.
2012-02-25 00:43:22 +01:00
9b3eb84a85 strace.1: fix a typo
* strace.1: Fix a typo in example description.
This fixes Debian bug #653309.
2012-02-22 00:29:44 +00:00
c86340e171 Fix sockaddr_un.sun_path name in decoded output
* net.c (printsock): Show sockaddr_un.sun_path as "sun_path".
This fixes Debian bug #554946.
2012-02-22 00:23:52 +00:00
6c38156b6e Avoid potential core file clobbering on exit
* strace.c (main): Set RLIMIT_CORE to zero before terminating itself
with a deadly signal.
This fixes Debian bug #656398.
2012-02-22 00:15:27 +00:00
44824b9d4b Eliminate native_scno and known_scno
* defs.h (known_scno): Remove.
(sysent): Remove native_scno field.
* process.c [IA64]: Replace known_scno(tcp) with tcp->scno.
(internal_fork) [USE_PROCFS || !LINUX]: Likewise.
* syscall.c: Do not define NR_SYSCALL_BASE.
(known_scno): Remove.
(syscall_fixup_on_sysenter) [USE_PROCFS]: Replace known_scno(tcp)
with tcp->scno.
(trace_syscall_entering) [SVR4 || FREEBSD || SUNOS4]: Likewise.
(syscall_fixup_on_sysexit) [SUNOS4]: Likewise.
2012-02-20 21:44:53 +00:00
0c661513e5 Remove initialization of native_scno field
* linux/i386/syscallent.h: Remove native_scno initialization for clone,
fork and vfork.
* linux/ia64/syscallent.h (sys_fork, sys_vfork): Remove redirections
to printargs.
* linux/syscall.h [IA64]: Do not define SYS_fork and SYS_vfork.
* util.c (printcall) [IA64]: Likewise.
(setbpt): Use sys_func to check for clone, fork and vfork syscalls.
2012-02-20 21:17:58 +00:00
b5e88d43a8 Do not use SYS_ipc and SYS_socketcall
* linux/dummy.h (sys_ipc, sys_socketcall): Remove redirections to
printargs.
* linux/ia64/syscallent.h: Likewise.
* linux/i386/syscallent.h: Remove native_scno initialization for "ipc"
and "socketcall".
* linux/syscall.h (sys_ipc, sys_socketcall): New prototypes.
(SYS_ipc, SYS_socketcall): Remove no longer used constants.
[IA64]: Remove undefining of ipc and socket SYS_* constants.
[SPARC || SPARC64]: Remove unused ipc SYS_* constants.
* ipc.c (sys_ipc): New function.
* sock.c (sys_socketcall): Likewise.
* syscall.c (trace_syscall_entering): Use sys_func to check for ipc and
socket subcalls.
2012-02-20 17:02:38 +00:00
9aa25abb2e Remove initialization of native_scno field for most of syscalls
The native_scno field is not so much used in the code than before.
In many cases sys_func is checked instead, and for most of syscall
entries there is no need to initialize native_scno.

* linux/i386/syscallent.h: Remove native_scno initialization for
_exit, read, write, waitpid, execve, wait4, sysfs, readv, writev,
pread64, pwrite64, exit_group, waitid, send, recv, sendto and
recvfrom syscall entries.
* linux/syscall.h: Do not define no longer used SYS_waitid and
SYS_sub_* constants.
[IA64]: Do not define SYS_waitpid and SYS32_* constants.
* defs.h: Do not define no longer used  __NR_exit_group constant.
* strace.c [USE_PROCFS] (proc_open): Use sys_func to check for execve.
2012-02-20 00:36:01 +00:00
612659e41e util: check for process_vm_readv in C library
glibc-2.15 provides process_vm_readv, so trying to provide it ourselves
with that version fails.

* configure.ac (AC_CHECK_FUNCS): Add process_vm_readv.
* util.c: Handle HAVE_PROCESS_VM_READV.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-14 13:38:28 +00:00
0ed9947c14 README-linux-ptrace: correct the description of suppressed signals
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-09 19:57:52 +01:00
bdec9cbceb strace -P: fix handling of invalid syscalls
* pathtrace.c (pathtrace_match): Check the given syscall number using
SCNO_IN_RANGE.
2012-02-06 17:13:59 +00:00
e752bed4af Skip the syscall entry if the sys_func field is NULL
Avoid NULL dereference when there are holes in sysent tables.
It can happen with syscall (number, ...) and number is in those holes.
There are no targets with holey systent tables so far, but at least
one such a target, x32, is already on the horizon.

* defs.h (SCNO_IN_RANGE): Also check the sys_func field.
2012-02-06 16:33:26 +00:00
d602542f16 Define RLIM64_INFINITY only if not defined
* resource.c (RLIM64_INFINITY): Define only if it isn't defined.
2012-02-06 13:33:54 +00:00
0b315b6543 Cast to long for %l in printf
Cast a value to long for %l in printf to avoid compiler warning
on systems where it may be long long.

* count.c (call_summary_pers): Cast to long.
* ipc.c (sys_mq_open, printmqattr): Likewise.
* quota.c (decode_cmd_data): Likewise.
* resource.c (sys_sysinfo): Likewise.
* time.c (tprint_timex): Likewise.
2012-02-06 13:33:54 +00:00
6ca2610cee Check HAVE_LONG_LONG_OFF_T when printing offset
When HAVE_LONG_LONG_OFF_T is defined, we need to use %llu to print
offset.

* io.c (sys_sendfile): Check HAVE_LONG_LONG_OFF_T when printing
offset.
2012-02-06 13:33:41 +00:00
a13b3fea4f Define old stat functions only if needed
When HAVE_LONG_LONG_OFF_T is defined, those old stat functions aren't
used and strace won't link since they use realprintstat which isn't
defined when HAVE_LONG_LONG_OFF_T is defined.

* file.c (convertoldstat, sys_oldstat, sys_oldfstat, sys_oldlstat):
Define only if HAVE_LONG_LONG_OFF_T isn't defined.
2012-02-06 13:33:41 +00:00
d0cd4436b0 Print NULL for zero address in sys_mmap64
* mem.c (sys_mmap64): Print NULL for zero address so that it is
consistent with sys_mmap.
2012-02-06 13:33:41 +00:00
309edeb2e1 Remove unused sys_pread64 and sys_pwrite64 parsers on Linux
* io.c [HAVE_LONG_LONG_OFF_T]: Remove sys_pread64 and sys_pwrite64
aliases.
(sys_pread64, sys_pwrite64): Define these functions only on
[SVR4 && _LFS64_LARGEFILE] platform.
* linux/mips/syscallent.h: Use sys_pread and sys_pwrite to handle
appropriate syscalls.
* linux/syscall.h (sys_pread64, sys_pwrite64): Remove.
* syscall.c (dumpio): Check sys_pread64 and sys_pwrite64 only on
[SVR4 && _LFS64_LARGEFILE] platform.
2012-02-04 15:17:43 +00:00
cdab1becb0 Trivial changes to help text. No code changes.
* strace.c (usage): Tweak help text: remove unpaired closing brackets,
make -V and -h sit on separate lines (hard to see them otherwise).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-03 12:17:57 +01:00
4f3df078b2 Simple optimizations
text	   data	    bss	    dec	    hex	filename
 239474	    672	  20484	 260630	  3fa16	strace.before
 239234	    668	  19044	 258946	  3f382	strace

* file.c (sprint_open_modes): Reduce static buffer size.
Simplify separator printing.
* signal.c (sprintsigmask): Reduce static buffer size.
Simplify separator printing and printing of almost full masks.
Use stpcpy instead of sprintf and strcpy+strlen.
* strace.c (startup_child): Don't strchr() for ':' twice in a row.
* util.c (sprintflags): Exit loop early if possible.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-29 22:38:35 +01:00
3521884c91 Trivial optimization
* strace.c (cleanup): Read 'interrupted' volatile variable only once.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-29 21:17:56 +01:00
b51581e8f0 Make interactive-ness directly controllable via command line option
Defaults are often ok, but when they are not, people get confused.
"Why can't I kill strace?" and "Why strace dies on ^C when I want
to _tracee_ to die instead?" are typical complaints.

* strace.c: Replace 'interactive' variable with 'opt_intr' variable.
Define INTR_foo constants for its possible values.
Define 'interactive' as a macro.
(usage): Document -I n option.
(main): Parse -I n option, modify signal handling to accomidate new
-I 1 and -I 4 modes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-29 16:53:03 +01:00
6703816060 Suppress compiler warning
* strace.c (trace): Frame potentially unused label with ifdef/endif.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-29 16:46:46 +01:00
a3559250d4 On Ctrl-C induced detach, send SIGINT to child tracee, not SIGTERM.
* strace.c (interrupt): Remember signal number.
(cleanup): If we exiting due to signal, send that signal to child tracee.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-29 16:43:51 +01:00
31fa8a22b1 Add experimental code to use PTRACE_SEIZE, disabled by default
All new code is predicated on "ifdef USE_SEIZE". If it is not defined,
behavior is not changed.

If USE_SEIZE is enabled and run-time check shows that PTRACE_SEIZE works, then:
- All attaching is done with PTRACE_SEIZE + PTRACE_INTERRUPT.
  This means that we no longer generate (and possibly race with) SIGSTOP.
- PTRACE_EVENT_STOP will be generated if tracee is group-stopped.
  When we detect it, we issue PTRACE_LISTEN instead of PTRACE_SYSCALL.
  This leaves tracee stopped. This fixes the inability to SIGSTOP or ^Z
  a straced process.

* defs.h: Add commented-out "define USE_SEIZE 1" and define PTRACE_SEIZE
and related constants.
* strace.c: New variable post_attach_sigstop shows whether we age going
to expect SIGSTOP on attach (IOW: are we going to use PTRACE_SEIZE).
(ptrace_attach_or_seize): New function. Uses PTRACE_ATTACH or
PTRACE_SEIZE + PTRACE_INTERRUPT to attach to given pid.
(startup_attach): Use ptrace_attach_or_seize() instead of ptrace(PTRACE_ATTACH).
(startup_child): Conditionally use alternative attach method using PTRACE_SEIZE.
(test_ptrace_setoptions_followfork): More robust parameters to PTRACE_TRACEME.
(test_ptrace_seize): New function to test whether PTRACE_SEIZE works.
(main): Call test_ptrace_seize() while initializing.
(trace): If PTRACE_EVENT_STOP is seen, restart using PTRACE_LISTEN in order
to not let tracee run.
* process.c: Decode PTRACE_SEIZE, PTRACE_INTERRUPT, PTRACE_LISTEN.
* util.c (ptrace_restart): Add "LISTEN" to a possible error message.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-29 02:01:44 +01:00
2945639eb8 process_vm_readv gets EINVAL if process is gone (SIGKILLed). Don't complain.
* util.c (umoven): Don't complain on EINVAL from process_vm_readv.
(umovestr): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-28 02:49:48 +01:00
64acaa1193 Revert last change. Add a comment to prevent further misunderstanding
* time.c (sys_nanosleep): Display remaining time only on interrupt.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-28 02:29:36 +01:00
ea051f7533 Fix nanosleep decoding: second argument was not shown after success
* time.c (sys_nanosleep): Fix bug - inverted is_restart_error() check.
* syscall.c (is_restart_error): Remove redundant check.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-28 02:16:06 +01:00
3af224c5cd Use process_vm_readv instead of PTRACE_PEEKDATA to read data blocks
Currently, we use PTRACE_PEEKDATA to read things like filenames and
data passed by I/O syscalls.
PTRACE_PEEKDATA gets one word per syscall. This is VERY expensive.
For example, in order to print fstat syscall, we need to perform
more than twenty trips into kernel to fetch one struct stat!

Kernel 3.2 got a new syscall, process_vm_readv(), which can be used to
copy data blocks out of process' address space.

This change uses it in umoven() and umovestr() functions if possible,
with fallback to old method if process_vm_readv() fails.
If it returns ENOSYS, we don't try to use it anymore, eliminating
overhead of trying it on older kernels.

Result of "time strace -oLOG ls -l /usr/lib >/dev/null":
before patch: 0.372s
After patch:  0.262s

* util.c (process_vm_readv): Wrapper to call process_vm_readv syscall.
(umoven): Use process_vm_readv for block reads of tracee memory.
(umovestr): Likewise.
* linux/syscall.h: Declare new function sys_process_vm_readv.
* process.c (sys_process_vm_readv): Decoder for new syscall.
* linux/i386/syscallent.h: Add process_vm_readv, process_vm_writev syscalls.
* linux/x86_64/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-28 01:46:33 +01:00
000b601439 Fix a case of broken output if last seen syscall was exit
* defs.h: Rename tcp_last to printing_tcp. Explain what it means.
Remove printtrailer() function.
* process.c (sys_exit): Convert printtrailer() call to "printing_tcp = NULL".
* strace.c: Add new variable printing_tcp.
(cleanup): Convert printtrailer() call to "printing_tcp = NULL".
(trace): Likewise.
(trace): Fix checks for incomplete line - it was working wrongly if last syscall was exit.
(printleader): Set printing_tcp.
(printtrailer): Remove this function.
* syscall.c: Remove tcp_last variable.
(trace_syscall_entering): Don't set printing_tcp, printleader call now does it.
(trace_syscall_exiting): Convert printtrailer() call to "printing_tcp = NULL".

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-28 01:25:03 +01:00
f7db5dd876 Fix handling of test/threaded_execve.c testcase
Since 3.0, Linux has a way to identify which thread execve'ed.
This patch makes use of it in order to properly dispose
of disappeared ("superseded") thread leader,
and replace it with execve'ed thread.

Before this patch, strace was "leaking" thread which exec'ed.
It was thinking that it still runs. It would look like this:

18460 pause( <unfinished ...>     <=== thread leader
18466 execve("/proc/self/exe", ["exe", "exe"], [/* 47 vars */] <unfinished ...>
18465 +++ exited with 0 +++       <=== exits from other threads
18460 <... pause resumed> )             = 0

The last line is wrong: it's not pause resumed, it's execve resumed.
If thread leader would do exit instead of pause, it is much worse:
strace panics because it thinks it sees return from exit syscall!

And strace isn't aware 18466 (exec'ed thread) is gone.
It still thinks it's executes execve syscall.

* strace.c: New variable "static char *os_release".
(get_os_release): New static function.
(main): Call get_os_release to retrieve Linux version.
(trace): If we see PTRACE_EVENT_EXEC, retrieve old pid, and if it
differs from new one, free one of tcbs and print correct messages.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-28 01:16:02 +01:00
3449ae83c2 Fix readlink result display - was printing bogus "..." semi-randomly
* file.c (decode_readlink): Use printstr() instead of printpathn().

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-27 17:26:29 +01:00
c76ae4352e Add new test program: test/threaded_execve.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-27 15:37:13 +01:00
eebb04d4ae Make pid2tcb static
* defs.h: Remove pid2tcb declaration.
* strace.c (pid2tcb): Make this function static.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-27 15:24:48 +01:00
cfad543087 Per Dmitry's request, remove paranoid check in verror_msg()
* strace.c (verror_msg): Remove redundant check for msg != NULL.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-24 12:48:02 +01:00
846ecb9b44 More robust error check for vasprintf
* strace.c (verror_msg): More robust error check for vasprintf.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-24 11:50:05 +01:00
837399af4f Slightly more compact handling of argv[]
text	   data	    bss	    dec	    hex	filename
 238274	    672	  20484	 259430	  3f566	strace.before
 238226	    672	  20484	 259382	  3f536	strace

* strace.c (main): Slightly more compact handling of argv[]

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-24 11:50:04 +01:00
aa6ec415c1 Trivial optimization
* strace.c: Set default interactive = 1 statically instead
of doing it in main().

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-24 11:50:04 +01:00
a677da5e3f Allocate -o OUTFILE buffer only if needed
text	   data	    bss	    dec	    hex	filename
 238258	    668	  28676	 267602	  41552	strace.before
 238274	    668	  20484	 259426	  3f562	strace

* strace.c (main): Allocate -o OUTFILE buffer only if needed:
unused buffer in bss is not entirely free.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-24 11:50:04 +01:00
82bb78c149 Use single fprintf in verror_msg()
This change partially reverts commit 44d0532.

In code before commit 44d0532, single fprintf was used on purpose:
we want to send entire message as one write() call. Since stderr
is unbuffered, separate fprintf's to it always result in separate
writes, they are not coalesced. If we aren't the only program
which writes to this particular stderr, this may result
in interleaved messages.

Since this function is not performance critical, I guess
it's ok to make it less efficient.

* strace.c (verror_msg): Attempt to print the message in single
write operation. Use separate fprintfs as a fallback if malloc fails.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-24 10:17:18 +01:00
a47e6b9fbb Improve code readability (logic is unchanged)
* util.c (umoven): Move assignment out of function call. Make assignment
to a flag variable later, closer to the place where it will be used.
(umovestr): Likewise.
(uload): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-21 04:01:56 +01:00
6cecba5322 Change umovestr API: return > 0 instead of 0 if NUL was seen
* pathtrace.c (upathmatch): Adjust umovestr return value check for new API.
* util.c (printpathn): Use umovestr() > 0 return value for more efficient
(and robust - we don't depend on "no overwrote past NUL" behavior anymore)
handling of terminating NUL.
(printstr): Remove useless NUL placement before umovestr() call.
Allocate 1 byte more to outstr[] array - for NUL.
(umovestr): Change to return 1 if NUL was seen.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-20 11:56:00 +01:00
a17e55ca8f umovestr result may have no NUL, use "%.*s" instead of "%s" to print it
* system.c (sys_mount): Be careful when printing umovestr result,
it may have no terminating NUL.
(sys_sysmips): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-20 11:52:12 +01:00
a1d541ec56 Eliminate code duplication in time printing, reduce a few static buffers
text	   data	    bss	    dec	    hex	filename
 238454	    664	  28772	 267890	  41672	strace.before
 238106	    664	  28676	 267446	  414b6	strace

* defs.h: Add TIMESPEC_TEXT_BUFSIZE and TIMEVAL_TEXT_BUFSIZE defines.
Add 'int special' parameter to sprinttv().
* time.c (sprinttv): Add 'int special' parameter, and use it
similarly to 'int special' parameter of printtv_bitness().
(printtv_bitness): Use sprinttv() instead of duplicating its code.
(print_timespec): Use sprint_timespec() instead of duplicating
its code.
* desc.c (decode_select): Use TIMEVAL_TEXT_BUFSIZE instead of 128
when checking remaining buffer size.
* net.c (sys_recvmsg): Use TIMESPEC_TEXT_BUFSIZE instead of 128
for static buffer size.
* stream.c (decode_poll): Use TIMESPEC_TEXT_BUFSIZE instead of 128
when checking remaining buffer size.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-20 11:04:04 +01:00
b3c52cf02a Reduce bss usage and speed up string printing
text	   data	    bss	    dec	    hex	filename
 237913	    660	  49284	 287857	  46471	strace.before
 237973	    660	  28772	 267405	  4148d	strace

This reduces L1 D-cache pressure a bit: instead of dirtying
20k of bss, we will reuse already dirty stack area.

* util.c (printpathn): Use on-stack buffers instead of static ones.
Saves 5*MAXPATHLEN in bss.
(printstr): Use tprints() instead of tprintf("%s") when printing
formatted string. May be a bit faster, depending on libc.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-19 17:20:23 +01:00
7d55801ae9 Add support for compat_statfs64
* file.c (struct compat_statfs64, printcompat_statfs64): Define.
(sys_statfs64, sys_fstatfs64): Use it.
2012-01-18 21:19:25 +01:00
000d66f175 Add support for statfs64.f_flags
* file.c (printstatfs64): Print f_flags if available.
2012-01-18 21:19:25 +01:00
a7920a8927 Fix missing parens
* signal.c (sys_sigreturn): Add missing parens.
2012-01-18 21:19:25 +01:00
023b7700de Get rid of TCB_SIGTRAPPED
On attempts to block or set SIGTRAP handler,
for example, using sigaction syscall, we generate
an additional SIGSTOP.

This change gets rid of this SIGSTOP sending/ignoring.
It appears to work just fine.

It also works if I force strace to not use PTRACE_O_TRACESYSGOOD,
which means strace stops will be marked with SIGTRAP,
not (SIGTRAP | 0x80) - I wondered maybe that's when
this hack is needed.

So, why we even have TCB_SIGTRAPPED? No one knows. It predates
version control: this code was present in the initial commit,
in 1999. No adequate comments, either.

Moreover, TCB_SIGTRAPPED is not set in sys_rt_sigaction
and sys_sigprocmask syscalls - the ones which are most usually
used to implement signal blocking, it is only set in obsolete
sys_signal, sys_sigaction, sys_sigsetmask, and in some dead
non-Linux code.

I think whatever bug it was fixing is gone long ago -
at least as long as sys_rt_sigaction is used by glibc.
Again, since glibc (and uclibc) uses sys_rt_sigaction
and sys_sigprocmask, modified code paths are not used
by most programs anyway.

* defs.h: Remove definition of TCB_SIGTRAPPED.
* signal.c (sys_sigvec): Don't set TCB_SIGTRAPPED and don't send SIGSTOP.
(sys_sigsetmask): Likewise.
(sys_sigaction): Likewise.
(sys_signal): Likewise.
* strace.c (trace): Remove code which executes if TCB_SIGTRAPPED is set.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-18 16:30:47 +01:00
5e09d77500 When we write log, flush output buffers in a few more cases
I observed a case when signal delivery message was buffered
by stdio until it was flushed along with the next syscall
entry message.

* strace.c (trace): Flush output buffers in a few more cases.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-18 16:20:56 +01:00
bbe29b36aa Fix old sigaction display
* signal.c (sys_sigaction): Fix display of sigaction with
SIG_DFL/SIG_IGN handlers.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-18 15:30:56 +01:00
e73a89d999 Change x86_64_regs struct type from pt_regs to user_regs_struct
* syscall.c: Change x86_64_regs struct type from
pt_regs to user_regs_struct, and explain the change in comment.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-18 11:07:24 +01:00
024cad9a25 Fix struct pt_regs declaration on i386 and x86-64
* defs.h [I386] (i386_regs): Replace definition with declaration.
[X86_64] (x86_64_regs): Remove.
* syscall.c [X86_64] (x86_64_regs): Make static.
2012-01-17 18:37:13 +00:00
fe585656f8 Make ERESTARTxyz messages more descriptive
There is widespread confusion about exact meaning
of ERESTARTxyz codes. Before this change, we were showing
all four of them the same: as "(To be restarted)".

This change prints better explanations for these codes,
and contains verbose comments which explain *why* we display
codes that way - or else someone confused
is bound to come later and mangle them again.
New messages are:

ERESTARTSYS (To be restarted if SA_RESTART is set)
ERESTARTNOINTR (To be restarted)
ERESTARTNOHAND (Interrupted by signal)
ERESTART_RESTARTBLOCK (Interrupted by signal)

* syscall.c (trace_syscall_exiting): Make ERESTARTxyz messages
more descriptive.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-12 11:26:34 +01:00
3cc943825e Fix sigreturn arg count from 1 to 0 on all architectures.
* linux/alpha/syscallent.h: Change [rt_]sigreturn's arg count to 0.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/tile/syscallent.h: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-10 16:48:19 +01:00
b11322fd3c Display mask on enter to sigreturn, not on exit
sys_sigreturn() performs ugly manipulations in order to show
signal mask which is restored by this syscall: on syscall entry,
fetches it from the stack, saves it in tcp->u_arg[]
(where it used to overflow this array - fixed sometime ago),
then retrieves the mask and displays it on syscall exit.

Apparently, the motivation is to make it slightly more obvious
to user that signal mask is restored only when this syscall returns.
IMO, this hardly justifies the necessary hacks. It is much easier
to display the mask at the point when we fetch it - on syscall entry.

While at it, I made it so that we do display returned value/errno.
I see no point in hiding it and showing uninformative "= ?" instead.

Example of pause() being interrupted by ALRM which has installed handler
which re-arms ALRM:

Before the patch:

rt_sigsuspend([INT])                    = ? ERESTARTNOHAND (To be restarted)
--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
alarm(1)                                = 0
sigreturn()                             = ? (mask now [INT])

After:

rt_sigsuspend([INT])                    = ? ERESTARTNOHAND (To be restarted)
--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
alarm(1)                                = 0
sigreturn() (mask [INT])                = -1 EINTR (Interrupted system call)

* defs.h: Declare struct pt_regs i386_regs and struct pt_regs x86_64_regs.
* syscall.c: Remove "static" keywork from these structures' definitions.
* signal.c (sys_sigreturn): Display mask on enter, not on exit.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-10 16:40:35 +01:00
f1e6903703 Do not detach from tracee which experienced ptrace error.
Before this patch, if a thread got nuked by exit in another thread
and we happened to poke it at the same time, we print "????(" thingy
and detach the thread. Since we removed "detach before death" logic,
this no longer matches the behavior of other threads.
Before patch:
[pid  1780] exit_group(1)               = ?
[pid  1778] ????( <unfinished ...>
Process 1778 detached
[pid  5860] +++ exited with 1 +++
After:
[pid 17765] exit_group(1)               = ?
[pid 21680] ????( <unfinished ...>
[pid 17791] +++ exited with 1 +++
[pid 21680] +++ exited with 1 +++

* strace (trace): Do not detach from tracee which experienced ptrace error.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-04 15:15:26 +01:00
4c1963836f Remove sig parameter from detach()
* strace.c (detach): Drop sig parameter - it is zero in all calls.
(cleanup): Don't pass sig = 0 to detach() call.
(detach): Ditto.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-04 15:11:09 +01:00
856c7ed97b Enhance decoding for personalities with small wordsize
* util.c (umoven, umovestr) [SUPPORTED_PERSONALITIES > 1]: If current
personality's wordsize is less than sizeof(long), use only significant
bits of the given address.
2011-12-26 21:09:29 +00:00
a5a839a920 Enhance personality switching
On syscall entry, save current personality in the tcb structure
along with scno.
On syscall exit, restore current personality from the tcb structure.
* defs.h (struct tcb) [SUPPORTED_PERSONALITIES > 1]: Add currpers
field.
* strace.c (alloc_tcb) [SUPPORTED_PERSONALITIES > 1]: Initialize
tcp->currpers.
* syscall.c (update_personality) [SUPPORTED_PERSONALITIES > 1]: New
function.
(get_scno, trace_syscall_exiting): Use it.

Reported-by: Michael A Fetterman <mafetter@nvidia.com>
2011-12-23 00:50:49 +00:00
b05fc5463b * net.c (socktcpoptions): Add more TCP_* constants from linux/tcp.h
Reported-by: Rick Jones <rick.jones2@hp.com>
2011-12-01 21:06:00 +00:00
e0f5fd87da Fix sys_ipc/sys_semtimedop decoding on s390
The s390 kernel sys_ipc system call only takes five arguments instead of
six arguments which the common code sys_ipc implementation takes.
One of the arguments of the sys_semtimedop subcall is therefore passed in
a different register than in the common code implementation.
This leads to broken decoding of the timespec argument:

semtimedop(0, 0x3ffffb43832, 1, {...})  = -1 EAGAIN

Fixed it looks like this:

semtimedop(0, 0x3ffffc2c842, 1, {0, 10000000}) = -1 EINTR

* linux/ipc.c (sys_semtimedop): Fix timespec decoding on s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2011-12-01 20:41:42 +00:00
436d892212 strace.c (trace): Fix compilation warning 2011-11-29 00:15:59 +00:00
4d0620dd90 linux/syscall.h: Remove redundant function declarations
Remove 51 function declarations aliased to other declarations in
linux/dummy.h file.
2011-11-28 23:54:36 +00:00
a12c70d587 linux/syscall.h: Sort function declarations 2011-11-28 23:41:58 +00:00
dd760852ac linux/syscall.h: Place one function declaration per line 2011-11-28 23:25:13 +00:00
ad178c0dc0 Remove redundant parsers
* desc.c (sys_dup): Remove.
* file.c (sys_pivotroot, sys_rmdir, sys_fchdir, sys_chroot, sys_fchroot,
sys_unlink, sys_symlink, sys_rename): Remove.
* linux/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_pivotroot,
sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
* linux/dummy.h: Add aliases for sys_chroot, sys_dup, sys_pivotroot,
sys_rename, sys_rmdir, sys_symlink, sys_unlink.
* pathtrace.c (pathtrace_match): Update.
* sunos4/dummy.h: Add aliases for sys_chroot, sys_dup, sys_fchdir,
sys_fchroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink.
* svr4/dummy.h: Likewise.
* sunos4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot,
sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
* svr4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot,
sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
2011-11-28 22:48:53 +00:00
f33ee91888 Reflect the fact that nfsservctl syscall was removed from linux kernels
linux/dummy.h: Move nfsservctl to "unimplemented" section.
2011-11-28 15:53:20 +00:00
831c7e5628 x86_64: add getcpu syscall entry
* linux/x86_64/syscallent.h: Add syscall entry for getcpu.
2011-11-27 22:49:04 +00:00
00ebeeece0 Add syscall entries for new linux syscalls
* linux/dummy.h: Add printargs parsers for new syscalls.
* linux/arm/syscallent.h: Add entries for sys_clock_adjtime,
sys_name_to_handle_at, sys_open_by_handle_at, sys_sendmmsg, sys_setns
and sys_syncfs.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Add entries for sys_clock_adjtime,
sys_name_to_handle_at, sys_open_by_handle_at, sys_setns and sys_syncfs.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Add entry for sys_setns.
* linux/bfin/syscallent.h: Add entries for sys_sendmmsg and sys_setns.
* linux/hppa/syscallent.h: Add entries for sys_clock_adjtime,
fanotify_init, fanotify_mark, sys_name_to_handle_at,
sys_open_by_handle_at, sys_sendmmsg, sys_setns and sys_syncfs.
2011-11-26 23:37:23 +00:00
1cd2f96a03 Fix prctl syscall entries
* linux/mips/syscallent.h: Fix prctl handler.
* linux/tile/syscallent.h: Likewise.
2011-11-26 23:14:40 +00:00
b11adf3ad2 arm: fix io_* syscall entries
* linux/arm/syscallent.h: Fix handlers for io_setup, io_destroy,
io_getevents, io_submit and io_cancel.
2011-11-26 23:08:14 +00:00
0c79befad2 Fix mincore syscall entries
* linux/arm/syscallent.h: Fix mincore handler.
* linux/avr32/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
2011-11-26 23:03:35 +00:00
e86f54272c Fix sendmsg syscall entries
* linux/arm/syscallent.h: Fix number of sendmsg arguments.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/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/tile/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2011-11-25 23:51:53 +00:00
609ccb229a Fix epoll_wait syscall entries
* linux/arm/syscallent.h: Fix epoll_wait flags and handler.
* linux/m68k/syscallent.h: Fix epoll_wait flags.
* linux/microblaze/syscallent.h: Fix number of epoll_wait arguments.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2011-11-25 23:45:28 +00:00
6ea78df972 Fix epoll_ctl syscall entries
* linux/arm/syscallent.h: Fix epoll_ctl flags and handler.
* linux/m68k/syscallent.h: Fix epoll_ctl flags.
* linux/x86_64/syscallent.h: Fix number of epoll_ctl arguments.
2011-11-25 23:40:16 +00:00
2b1d1196b2 arm: fix epoll_create syscall entry
* linux/arm/syscallent.h: Fix epoll_create handler.
2011-11-25 23:34:12 +00:00
6710f4af09 Fix mlockall syscall entries
* linux/arm/syscallent.h: Fix number of mlockall arguments.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/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/tile/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2011-11-25 23:24:48 +00:00
a706881b3b Fix epoll_pwait syscall entries
* linux/alpha/syscallent.h: Fix number of epoll_pwait arguments.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/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/tile/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2011-11-25 23:19:47 +00:00
30a05158e3 Fix reboot syscall entries
* linux/alpha/syscallent.h: Fix number of reboot arguments.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/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/tile/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
2011-11-25 23:13:15 +00:00
c0861c0ac8 Fix swapon syscall entries
* linux/arm/syscallent.h: Fix number of swapon arguments.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/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/tile/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/alpha/syscallent.h: Fix number of swapon arguments, add TF flag.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
2011-11-25 23:04:04 +00:00
faa2fe84e5 Fix sgetmask and ssetmask syscall entries
* linux/hppa/syscallent.h: Fix sgetmask and ssetmask entries.
* linux/powerpc/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/tile/syscallent.h: Likewise.
2011-11-25 21:57:31 +00:00
9538352ee7 Rename siggetmask to sgetmask and sigsetmask to ssetmask
* linux/arm/syscallent.h: Rename siggetmask to sgetmask and
sigsetmask to ssetmask.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Rename sys_sgetmask to sys_siggetmask,
sys_ssetmask to sys_sigsetmask.
2011-11-25 21:48:26 +00:00
454dcd458a Add TRACE_IPC flag to sys_ipc syscall entries
* linux/arm/syscallent.h: Add TI flag to sys_ipc entry.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/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.
2011-11-25 19:27:23 +00:00
594399d8eb gitlog-to-changelog: update from gnulib
* gitlog-to-changelog: Update from gnulib.
* Makefile.am: Add --append-dot to gitlog-to-changelog invocation.
2011-11-05 13:32:27 +00:00
6a4ac6ccc8 Decode TIOCSCTTY's third parameter
* term.c (term_ioctl): Decode TIOCSCTTY's third parameter.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-10-22 04:52:18 +02:00
7f3aca1af9 Remove useless and obsolete "#if DONE" sections. No code changes
* linux/dummy.h: Remove "#if DONE" section.
* linux/sparc/dummy2.h: Likewise.
* linux/sparc64/dummy2.h: Likewise.
* sunos4/dummy.h: Likewise.
* svr4/dummy.h: Likewise.
2011-10-14 15:56:21 +00:00
b9e897d6aa Add names for dummy parsers. No code changes
* linux/dummy.h: Add aliases to printargs() for those of dummy parsers
that had no own names before.
* linux/*/syscallent.h: Use these new names instead of printargs.
2011-10-14 15:52:21 +00:00
9e38484d49 Sort definitions of dummy parsers. No code changes
* linux/dummy.h: Sort definitions of parsers implemented as aliases
to printargs().
2011-10-14 15:52:18 +00:00
aed334c02c sys_epoll_create1: decode flag arguments correctly
* desc.c (epollflags): Define.
(sys_epoll_create1): Use epollflags to printflags. Change "O" to "EPOLL".

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-14 10:45:19 +00:00
d99e48c0f3 Implement decoding of splice, tee and vmsplice(2) syscalls
* io.c (print_loff_t): New function.
(sys_sendfile64): Use it.
(splice_flags): New xlat structure.
(sys_tee, sys_splice, sys_vmsplice): New functions.
* linux/syscall.h (sys_tee, sys_splice, sys_vmsplice): Declare them.
* linux/*/syscallent.h: Use them.
2011-10-11 17:07:05 +00:00
c327d71258 Fix epoll_wait and epoll_pwait decoding
* desc.c (epoll_wait_common): Print "maxevents" and "timeout" arguments
as integers.

Reported-by: Марк Коренберг <socketpair@gmail.com>
2011-10-11 16:05:57 +00:00
5967c1a66b Decode EPOLLRDHUP
* desc.c (epollevents): Add EPOLLRDHUP.

Reported-by: Марк Коренберг <socketpair@gmail.com>
2011-10-11 15:55:40 +00:00
be55ce794a Remove unreachable code in umoven() and umovestr().
* util.c (umoven, umovestr): Remove unreachable code.

Reported-by: Weichuan Yan <wchyan@marvell.com>
2011-10-11 15:26:15 +00:00
f88837a666 Do post-attach initialization earlier; fix "we ignore SIGSTOP on NOMMU" bug
We set ptrace options when we see post-attach SIGSTOP.
This is wrong: it's better to set them right away on the very first
stop (whichever it will be). It also will make adding SEIZE support easier,
since SEIZE has no post-attach SIGSTOP.

We do it by adding a new bit, TCB_IGNORE_ONE_SIGSTOP, and treating
TCB_STARTUP and TCB_IGNORE_ONE_SIGSTOP as two slightly different things.

* defs.h: Add a new flag bit, TCB_IGNORE_ONE_SIGSTOP.
* process.c (internal_fork): Set TCB_IGNORE_ONE_SIGSTOP on a newly added child.
* strace.c (startup_attach): Set TCB_IGNORE_ONE_SIGSTOP after attach.
Fix a case when "strace -p PID" found PID dead but sone other of its threads
still alive.
(startup_child): Set TCB_IGNORE_ONE_SIGSTOP after attach, _if needed_.
This fixes a bogus case where we can ignore a _real_ SIGSTOP on NOMMU.
(detach): Perform anti-SIGSTOP dance only if TCB_IGNORE_ONE_SIGSTOP is set,
not if TCB_STARTUP is set.
(trace): Set TCB_IGNORE_ONE_SIGSTOP after attach.
Clear TCB_STARTUP and initialize tracee on the very first tracee stop.
Clear TCB_IGNORE_ONE_SIGSTOP when SIGSTOP is seen.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-05 14:05:46 +02:00
d116a73386 Get rid of TCB_ATTACH_DONE
* defs.h: Remove TCB_ATTACH_DONE constant.
* strace.c (startup_attach): Use TCB_STARTUP instead of TCB_ATTACH_DONE
to distinquish attached from not-yet-attached threads.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-05 14:01:33 +02:00
381dbc2292 Set TCB_STARTUP only _after_ we attached.
This fixes logic in detach() which thinks that TCB_STARTUP
means that we are already attached, but did not see SIGSTOP yet.
This also allows to get rid of TCB_ATTACH_DONE flag.

* process.c (internal_fork): Set TCB_STARTUP after attach.
* strace.c (startup_attach): Likewise.
(startup_child): Likewise.
(alloc_tcb): Do not set TCB_STARTUP on tcb allocation - we are
not attached yet.
(trace): Set TCB_STARTUP when we detech an auto-attached child.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-05 13:59:39 +02:00
6cda73ff9c Simple optimizations in trace()
* strace.c (trace): Calculate WSTOPSIG(status) once,
unify code paths to ptrace(PTRACE_SYSCALL).

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-02 16:23:53 +02:00
014ca3a53c Trivial fixes on error paths
* strace.c (startup_attach): Emit message on fork() failure.
(startup_child): Remove non-informative comment.
* util.c (ptrace_restart): use perror_msg() on error instead of fprintf().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-02 16:19:30 +02:00
ad5155af81 Fix compile failure introduced by last commit
* desc.c (decode_select): Fix double definition of nfds.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 18:18:04 +02:00
79a79ea851 Roll back "die on malloc failure" behaviour a bit
After recent change, select(2^31-1, NULL, NULL, NULL)
would make strace exit. This change caps fdsize so that
it is always in [0, 1025*1024], IOW: we will try to allocate at most
1 megabyte, which in practice will almost always work,
unlike malloc(2Gig).

* desc.c (decode_select): Cap fdsize to 1024*1024.
* pathtrace.c (pathtrace_match): Cap fdsize to 1024*1024.
* file.c (sys_getdents): Cap len to 1024*1024.
(sys_getdents64): Cap len to 1024*1024.
* util.c (dumpiov): Refuse to process iov with more than 1024*1024
elements. Don't die on malloc failure.
(dumpstr): Don't die on malloc failure.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 16:35:44 +02:00
0a295bc97f Add stpcpy to autoconf machinery
* configure.ac: Add stpcpy to AC_CHECK_FUNCS.
* defs.h: Frame stpcpy with "if !defined HAVE_STPCPY".
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 16:31:48 +02:00
b9c7ae6211 Simplify sprinttv()
* time.c (sprinttv): Trivial simplifications.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 11:40:40 +02:00
1161725b8e * desc.c (decode_select): Set tcp->auxstr as late as possible.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 11:27:37 +02:00
ab034fbf09 Reformat setuid-ing code in startup_child()
New code does the same as old one, but is more readable (I hope).

* strace.c (startup_child): Reformat setuid-ing code.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 10:27:42 +02:00
2e968c0bb7 Minor tweaks in startup_child(). Logic isn't changed (but code is)
* strace.c (startup_attach): Tweak comment.
(startup_child): Move common code out of ifdef.
Indent nested ifdefs. Tweak comments. Remove two
unnecessary calls to getpid().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 10:23:09 +02:00
60fe8c139c Use tprints with literal strings, it may be faster than tprintf
* bjm.c: Replace tprintf("str") with tprints("str").
* block.c: Likewise.
* desc.c: Likewise.
* file.c: Likewise.
* io.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* resource.c: Likewise.
* scsi.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 10:00:28 +02:00
5940e65939 Fix "format not a string literal" warning caused by tprintf(str)
* defs.h: Declare tprints().
* strace.c: Define tprints().
(tabto): Use tprints(str), since tprintf(str) was throwing a warning.
* desc.c: Use tprints(str) instead of tprintf("%s", str).
* file.c: Likewise.
* io.c: Likewise.
* net.c: Likewise.
* process.c: Likewise.
* signal.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-09-01 09:55:05 +02:00
dfa0acc8c1 Add README-linux-ptrace file
I tried to push this doc to Michael Kerrisk <mtk.manpages@gmail.com>,
but got no reply. To avoid losing the document, let it live
in strace tree for now.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-31 15:58:06 +02:00
1d46ba57a8 Make out-of-memory handling more uniform
This fixes one real bug in dumpstr().

* defs.h: Declare die_out_of_memory().
* strace.c (die_out_of_memory): New function.
(strace_popen): If allocation fails, call die_out_of_memory().
(main): Likewise.
(expand_tcbtab): Likewise.
(rebuild_pollv): Likewise.
* count.c (count_syscall): Likewise.
(call_summary_pers): Likewise.
* desc.c (decode_select): Likewise.
* file.c (sys_getdents): Likewise.
(sys_getdents64): Likewise.
(sys_getdirentries): Likewise.
* pathtrace.c (pathtrace_match): Likewise.
* syscall.c (qualify): Likewise.
* util.c (printstr): Likewise.
(dumpiov): Likewise.
(dumpstr): Likewise.
(fixvfork): Likewise.
* mem.c (sys_mincore): Don't check free() parameter for NULL.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-31 14:00:02 +02:00
2fb4db3e7a Optimization: eliminate all remaining usages of strcat()
After this change, we don't use strcat() anywhere.

* defs.h: Change sprinttv() return type to char *.
* time.c (sprinttv): Return pointer past last stored char.
* desc.c (decode_select): Change printing logic in order to eliminate
usage of strcat() - use stpcpy(), *outptr++ = ch, sprintf() instead.
Also reduce usage of strlen().
* stream.c (decode_poll): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-31 12:26:03 +02:00
8778bffdd2 Optimize string_quote() for speed
* util.c (string_quote): Speed up check for terminating NUL.
Replace strintf() with open-coded binary to hex/oct conversions -
we potentially do them for every single byte, need to be fast.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-31 12:22:56 +02:00
5284557bfa Optimization: eliminate some usages of strcat()
* defs.h: Declare stpcpy().
* util.c: Define stpcpy().
* file.c: Remove static str_append().
(sprint_open_modes): Use stpcpy() instead of str_append().
(sprintflags): Use stpcpy() instead of strcat().
(printpathn): Eliminate usage of strcat().
(printstr): Eliminate usage of strcat().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-31 12:07:38 +02:00
b5b2589231 Small optimization on AVR32
* syscall.c (syscall_enter): Optimize tcp->u_arg[i] setting
from regs.FOO for AVR32.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-30 19:04:54 +02:00
eb0e3e8f50 On X86_64 and I386, use PTRACE_GETREGS to fetch all registers
Before this change, registers were read with PTRACE_PEEKUSER
ptrace operation, one per register. This is slower than
fetching them all in one ptrace operation.

* defs.h: include asm/ptrace.h on X86_64 and I386.
* syscall.c: New static variables i386_regs and x86_64_regs.
Remove static eax/rax variables.
(get_scno): Fetch all registers with single PTRACE_GETREGS operation.
(get_syscall_result): Likewise.
(syscall_fixup_on_sysenter): Use PTRACE_GETREGS results in i386/x86_64_regs.
(syscall_enter): Set tcp->u_arg[i] from PTRACE_GETREGS results.
(get_error): Set tcp->u_rval, tcp->u_error from PTRACE_GETREGS results.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-30 18:53:49 +02:00
a673f3fa62 Do not include <limits.h>
* strace.c: Do not include <limits.h> explicitly, it is already included
implicitly by <sys/param.h>.
2011-08-30 16:07:01 +00:00
b038a43d75 Include <sys/param.h> to get PATH_MAX definition
* pathtrace.c: Include <sys/param.h> instead of <limits.h> to get
PATH_MAX definition.

Reported-by: Steve Bennett <steveb@workware.net.au>
2011-08-30 16:05:26 +00:00
77770bbf6b Indent a large set of nested ifdefs/endifs. No code changes
* defs.h: Indent a large set of nested ifdefs/endifs

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-26 19:25:09 +02:00
8b4454cba7 Rename syscall_fixup to syscall_fixup_on_sysenter
* defs.h: Tweak comment.
* syscall.c: Rename syscall_fixup to syscall_fixup_on_sysenter.
(trace_syscall_entering): Use new finction name.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-26 17:56:58 +02:00
f20bff6a73 Make syscall result reading more consistent among different arches
* syscall.c: Eliminate static flags variable for POWERPC.
(syscall_fixup): Don't fetch syscall results. Affected arches:
POWERPC, BFIN, HPPA.
(syscall_fixup_on_sysexit): Move syscall results fetching code
for this function to get_syscall_result. Affected arches:
S390X, POWERPC, BFIN, M68K, HPPA, CRIS, MICROBLAZE.
(get_syscall_result): Add syscall results fetching.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-26 17:56:03 +02:00
ece9879797 Simplify syscall_fixup[_on_sysexit]
* syscall.c (syscall_fixup): Remove checks for entering(tcp).
Remove code which executes if exiting(tcp).
(syscall_fixup_on_sysexit): Remove code which executes
if entering(tcp). Remove checks for exiting(tcp).

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 10:25:35 +02:00
20c41fd91d Split syscall_fixup into enter/exit pair of functions
* syscall.c: Create syscall_fixup_on_sysexit() which is a copy of
syscall_fixup().
(trace_syscall_exiting): Call syscall_fixup_on_sysexit() instead of
syscall_fixup().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 10:23:00 +02:00
61526c6b1e Remove stray commas in struct initializers. No code changes
* process.c: Remove stray commas in struct initializers.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 10:21:13 +02:00
102ec49354 Optimize tabto()
tabto is used in many lines of strace output.
On glibc, tprintf("%*s", col - curcol, "") is noticeably slow
compared to tprintf("                 "). Use the latter.
Observed ~15% reduction of time spent in userspace.

* defs.h: Drop extern declaration of acolumn. Make tabto()
take no parameters.
* process.c (sys_exit): Call tabto() with no parameters.
* syscall.c (trace_syscall_exiting): Call tabto() with no parameters.
* strace.c: Make acolumn static, add static char *acolumn_spaces.
(main): Allocate acolumn_spaces as a string of spaces.
(printleader): Call tabto() with no parameters.
(tabto): Use simpler method to print lots of spaces.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 01:27:59 +02:00
fabaa91ab6 * syscall.c (sys_indir): Use %ld for printing long, not %u.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 01:23:10 +02:00
cb6f056004 Opotimize "scno >= 0 && scno < nsyscalls" check
gcc can't figure out on its own that this check can be done with
single compare, and does two compares. We can help it by casting
scno to unsigned long: ((unsigned long)(scno) < nsyscalls)

* defs.h: New macro SCNO_IN_RANGE(long_var).
* count.c (count_syscall): Use SCNO_IN_RANGE() instead of open-coded check.
* syscall.c (getrval2): Use SCNO_IN_RANGE() instead of open-coded check.
This fixes a bug: missing check for scno < 0 and scno > nsyscalls
instead of scno >= nsyscalls.
(get_scno): Use SCNO_IN_RANGE() instead of open-coded check.
This fixes a bug: scno > nsyscalls instead of scno >= nsyscalls.
(known_scno): Use SCNO_IN_RANGE() instead of open-coded check.
(internal_syscall): Likewise.
(syscall_enter): Likewise.
(trace_syscall_entering): Likewise.
(get_error): Likewise.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 01:13:43 +02:00
1a5b5a7aff Remove scno_good logic in syscall exit
* syscall.c (trace_syscall_exiting): Remove scno_good logic,
it can't trigger in syscall exit.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 00:29:56 +02:00
684fb1ae3c Remove redundant assignments
* syscall.c (get_error): Remove redundant "u_error = 0" and redundant
and unclear comments.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 00:26:38 +02:00
92d443c030 Group int-sized fields together in struct tcb
* defs.h: Group int-sized fields together in struct tcb.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-25 00:25:08 +02:00
a614692fb0 Reorder functions in syscall.c. No code changes.
Old order (basically "in no particular order"):
    dumpio
    decode_subcall
    internal_syscall
    get_scno
    get_syscall_result
    known_scno
    syscall_fixup
    is_negated_errno
    get_error
    syscall_enter
    trace_syscall_entering
    trace_syscall_exiting
    trace_syscall
    printargs
    getrval2
    sys_indir
    is_restart_error

New order:
various utility functions:
    decode_subcall
    printargs
    getrval2
    sys_indir
    is_restart_error
syscall enter handling functions:
    get_scno
    known_scno
    syscall_fixup (also used in syscall exit code)
    internal_syscall (also used in syscall exit code)
    syscall_enter
    trace_syscall_entering
syscall exit handling functions:
    get_syscall_result
    is_negated_errno
    get_error
    dumpio
    trace_syscall_exiting
main syscall enter/exit function:
    trace_syscall

* syscall.c: Reorder functions so that related ones are closer
in the source.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-24 18:07:22 +02:00
06602d99b7 Rename some functions, delete unused one. No code changes
* defs.h: Rename get_scno_on_sysenter() to get_scno();
delete force_result() declaration.
* strace.c (proc_open): Rename get_scno_on_sysenter() to get_scno().
* syscall.c: Rename get_scno_on_sysenter() to get_scno().
Rename get_scno_on_sysexit() to get_syscall_result().
Delete unused force_result().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-24 17:53:52 +02:00
2ce12ed31c Unify per-architecture post-execve SIGTRAP check.
Move post-execve SIGTRAP check from get_scno_on_sysenter
(multitude of places on many architectures) to a single location
in trace_syscall_entering. This loosens the logic for some arches,
since many of them had additional checks such as scno == 0.
However, on non-ancient Linux kernels we should never have post-execve
SIGTRAP in the first place, by virtue of using PTRACE_O_TRACEEXEC.

* syscall.c (get_scno_on_sysenter): Remove tcp->flags & TCB_WAITEXECVE checks.
(trace_syscall_entering): Do tcp->flags & TCB_WAITEXECVE check here.
(get_scno_on_sysexit): Tweak comment.
(syscall_fixup): Likewise.
(trace_syscall_exiting): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-24 17:25:32 +02:00
18beb98fad Speed up x86 by avoiding EAX read on syscall entry
on x86, EAX read on syscall entry is not necessary if we know
that post-execve SIGTRAP is disabled by PTRACE_O_TRACEEXEC ptrace option.
This patch (a) moves EAX retrieval from syscall_fixup
to get_scno_on_sysexit, and (b) perform EAX retrieval in syscall_fixup
only if we are in syscall entry and PTRACE_O_TRACEEXEC option is not on.

* syscall.c (get_scno_on_sysexit): On I386 and X86_64, read eax/rax
which contain syscall return value.
(syscall_fixup): On I386 and X86_64, read eax/rax only on syscall enter
and only if PTRACE_O_TRACEEXEC is not in effect.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-24 16:59:23 +02:00
77a7459536 Do not read syscall no in get_scno_on_sysexit
* syscall.c (get_scno_on_sysexit): Remove scno retrieval code, since
we don't save it anyway. This is the first real logic change
which should make strace faster: for example, on x64 ORIG_EAX
is no longer read in each syscall exit.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-24 16:56:03 +02:00
8cd1acd46f Simplify get_scno_on_sysenter/sysexit
* syscall.c (get_scno_on_sysenter): Remove "if (exiting(tcp))" code,
make "if (entering(tcp))" code unconditional.
(get_scno_on_sysexit): Remove "if (entering(tcp))" code,
make "if (exiting(tcp))" code unconditional.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-24 16:52:57 +02:00
9a36ae5e88 get_scno is an unholy mess, make it less horrible
Currently, get_scno does *much* more than "get syscall no".
It checks for post-execve SIGTRAP. It checks for changes
in personality. It retrieves params on entry and registers on exit.
Worse still, it is different in different architectures: for example,
for AVR32 regs are fetched in get_scno(), while for e.g. I386
it is done in syscall_enter().

Another problem is that get_scno() is called on both syscall entry and
syscall exit, which is stupid: we don't need to know scno on syscall
exit, it is already known from last syscall entry and stored in
tcp->scno! In essence, get_scno() does two completely different things
on syscall entry and on exit, they are just mixed into one bottle, like
shampoo and conditioner.

The following patches will try to improve this situation.

This change duplicates get_scno into identical get_scno_on_sysenter,
get_scno_on_sysexit functions. Call them in syscall enter and syscall
exit, correspondingly.

* defs.h: Rename get_scno to get_scno_on_sysenter; declare it only
if USE_PROCFS.
* strace.c (proc_open): Call get_scno_on_sysenter instead of get_scno.
* syscall.c (get_scno): Split into two (so far identical) functions
get_scno_on_sysenter and get_scno_on_sysexit.
(trace_syscall_entering): Call get_scno_on_sysenter instead of get_scno.
(trace_syscall_exiting): Call get_scno_on_sysexit instead of get_scno.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-24 16:47:32 +02:00
5f731c4e1b Reduce code redundancy in syscall_enter()
* syscall.c [LINUX] (syscall_enter): Move tcp->u_nargs initialization
from arch-specific ifdefs to common code.  Always cache tcp->u_nargs in
a local variable and use it in for() loops.
[IA64, AVR32] Rewrite tcp->u_arg[] initialization using a loop.
2011-08-23 17:03:41 +00:00
44142a7b79 Define MAX_ARGS to 6 for all Linux arches
* defs.h: Define MAX_ARGS to 6 for all Linux arches.
* linux/ia64/syscallent.h: Change all 8-argument printargs
to MA (MAX_ARGS).
linux/mips/syscallent.h: Change all two 7-argument printargs
to MA (MAX_ARGS).

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 18:04:25 +02:00
d5e66c4b97 Fix argument printing in sys_mmap64
* mem.c (sys_mmap64): Fix a bug where we used tcp->u_args[i]
instead of argument values copied from memory.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 17:51:58 +02:00
4b887a5a9a Cache tcp->u_nargs in a local variable for for() loops
Loops of the form "for (i = 0; i < tcp->u_nargs; i++) ..."
need to fetch tcp->u_nargs from memory on every iteration
if "..." part has a function call (gcc doesn't know that
tcp->u_nargs won't change). This can be sped up
by putting tcp->u_nargs in a local variable, which might
go into a CPU register.

* syscall.c (decode_subcall): Cache tcp->u_nargs in a local variable
as for() loop limit value.
(syscall_enter): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 13:32:38 +02:00
afc64037e2 Drop checks for sysent[i].nargs == -1
* defs.h: Declare nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
* syscall.c: Define nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
(decode_subcall): Drop checks for sysent[i].nargs == -1.
(syscall_enter): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 13:29:01 +02:00
ac1ce77a23 Stop using nargs == -1 in syscallent tables
Usage -1 as argument count in syscallent tables
necessitates the check for it, a-la:
if (sysent[tcp->scno].nargs != -1)
    tcp->u_nargs = sysent[tcp->scno].nargs;
else
    tcp->u_nargs = MAX_ARGS;
which is stupid: we waste cycles checking something which
is constant and known at compile time.

* defs.h: Make struct sysent::nargs unsigned.
* freebsd/i386/syscallent.h: Replace nargs of -1 with MA.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* svr4/syscallent.h: Likewise.
* freebsd/syscalls.pl: Likewise in generator script.
* syscallent.sh: Likewise in generator script.
* syscall.c: Add define MA MAX_ARGS / undef MA around includes
of syscallent[N].h.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 13:24:17 +02:00
ed4f4f02f1 Move trace_syscall_exiting below trace_syscall_entering. No code changes.
Syscall enter happens before syscall exit. Having functions
in opposite order in the source is confusing.

* syscall.c: Move trace_syscall_exiting below trace_syscall_entering.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:02 +02:00
3b73881a0d Fix -z display.
Before this patch, the following:
    open("qwerty", O_RDONLY)    = -1 ENOENT
    write(2, "wc: qwerty: No such file or dire"..., 38) = 38
was shown totally wrongly with -z:
    open("qwerty", O_RDONLY)    = 38
(yes, that's right, write syscall is lost!)
Now it is shown "less wrongly" as:
    open("qwerty", O_RDONLY <unfinished ...>
    write(2, "wc: qwerty: No such file or dire"..., 38) = 38

* syscall.c (trace_syscall_exiting): Use common TCB_INSYSCALL clearing
via "goto ret". This fixes totally broken display of -z, but even now
it is not working as intended. Add a comment about that.
(trace_syscall_entering): Use common TCB_INSYSCALL setting
via "goto ret".

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:02 +02:00
b88f96129f Straighten up confused comments/messages about post-execve SIGTRAP handling
* defs.h: Explain TCB_INSYSCALL and TCB_WAITEXECVE bits in detail.
* strace.c (choose_pfd): Use entering/exiting macros instead of direct check
for TCB_INSYSCALL.
* syscall.c (get_scno): Use entering/exiting macros instead of direct check
for TCB_INSYSCALL. Fix comments about post-execve SIGTRAP.
(syscall_fixup): Use entering/exiting instead of direct check
for TCB_INSYSCALL. Add a comment what "not a syscall entry" message
usually means. Change wrong "stray syscall exit" messages into
"not a syscall entry" ones.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:02 +02:00
c95a88f124 count_syscall() always returns 0, optimize it
* defs.h (count_syscall): Change return type from int to void.
* count.c (count_syscall): Change return type from int to void.
* syscall.c (trace_syscall_exiting): Change code around call
to count_syscall accordingly.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:02 +02:00
2ecba32d52 Optimize out dummy PC printing on signal delivery
* strace.c (trace): Optimize out dummy PC printing on signal delivery.
While at it, tweak comments.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:02 +02:00
a7949748d1 Conditionally optimize out unused code
* syscall.c (internal_syscall): Call internal_exec only if
SUNOS4 || (LINUX && TCB_WAITEXECVE).
* process.c (internal_exec): Define this function only if
SUNOS4 || (LINUX && TCB_WAITEXECVE).
(printwaitn): Don't check wordsize if SUPPORTED_PERSONALITIES == 1.
* signal.c (sys_kill): Likewise.
* syscall.c (is_negated_errno): Likewise.
(trace_syscall_exiting): Fold a tprintf into tprintfs which follow it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:02 +02:00
0890c8a403 Cosmetic improvement in ifdefs. No code changes
* strace.c (proc_open): Change ifdefs so that braces are properly paired.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:02 +02:00
8dc0c8c5ef Exclude tcp->pfd from non-procfs systems
* defs.h: Make struct tcb::pfd fields conditional on USE_PROCFS.
* strace.c (alloc_tcb): Use tcp->pfd only if USE_PROCFS.
(droptcb): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
cfd364b011 Small optimizations related to memory allocation
* strace (expand_tcbtab): Shorten "out of memory" message.
(rebuild_pollv): Remove unnecessary NULL check before free().
* util.c (dumpstr): Add a comment about likely bug.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
5d64581e10 Improve code readability by avoiding assignments inside if()
* desc.c (decode_select): Move assignment out of if() condition.
* file.c (sprinttime): Likewise.
(sys_getdirentries): Likewise.
* io.c (sys_ioctl): Likewise.
* strace.c (test_ptrace_setoptions_followfork): Likewise.
(main): Likewise.
(proc_open): Likewise.
(detach): Likewise.
(proc_poll): Likewise.
(trace): Likewise.
* syscall.c (qualify): Likewise.
(sys_indir): Likewise.
* test/procpollable.c (main): Likewise.
* test/sfd.c (main): Likewise.
* time.c (printtv_bitness): Likewise.
(sprinttv): Likewise.
(print_timespec): Likewise.
(void sprint_timespec): Likewise.
(printitv_bitness): Likewise.
* util.c (dumpstr): Likewise.
(umovestr): Likewise.
(fixvfork): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
6b6ed5d669 Convert ioctl_next_match() to new-style C function definition
* ioctl.c (ioctl_next_match): Convert to new-style C function definition.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
39fca62801 Small optimization in signal and ioctl tables
Trivial shuffling of data tables puts them all in one file,
allowing gcc to see their sizes and eliminate variables
which store these sizes.

Surprisingly, in C mode gcc does not optimize out static const int
variables. Help it by using enums instead.

* defs.h: Stop exporting ioctlent{0,1,2}, nioctlents{0,1,2},
signalent{0,1,2}, nsignals{0,1,2}.
* ioctl.c: Remove definitions of ioctlent{,0,1,2} and nioctlents{,0,1,2}.
* signal.c: Remove definitions of signalent{,0,1,2} and nsignals{,0,1,2}.
* syscall.c: Move above definitions to this file. Make them static const
or enums if suitable.
2011-08-23 12:53:01 +02:00
5c774b2be4 Don't return int from set_personality(), no one checks it.
* defs.h (set_personality): Change return type to void.
* syscall.c (set_personality): Change return type to void.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
3ec9632376 Remove unused declaration
* defs.h: Remove unused declaration of handle_new_child().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
d9ec141671 Use natural-sized integer field for tcb::flags
* defs: Change struct tcb::flags type from short to int.
This results in smaller code at least on x86.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
deec74eb52 Make needlessly static data local
* syscall.c (get_scno): For POWERPC64 and X86-64, variable currpers
is declared static. But its old data is never used. Convert it
to ordinary local variable.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
7c9ba8b55e Optimize get_scno function
* syscall.c (get_scno): Make gpr_offset[] array static const.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
799926211a Optimize iocb_cmd_lookup
* desc.c (iocb_cmd_lookup): Make command table constant.
Reduce size of static char buffer.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
3432059f66 Correct sys_sendfile[64] type and nargs
* freebsd/i386/syscallent.h: Correct sys_sendfile nargs 7->8
* linux/mips/syscallent.h: Correct sys_sendfile64 nargs 5->4
* linux/sh/syscallent.h: Correct sys_sendfile64 nargs 5->4
* linux/sh64/syscallent.h: Correct sys_sendfile64 nargs 5->4
* linux/m68k/syscallent.h: Correct sys_sendfile64 type TF->TD|TN
* linux/microblaze/syscallent.h: Correct sys_sendfile64 type TF->TD|TN
* linux/tile/syscallent.h: Correct sys_sendfile and sys_sendfile64 type TD->TD|TN

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
4924dbd6d7 Make addflags return void
* defs.h (addflags): Change return type from int to void.
* util.c (addflags): Change return type from int to void.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
d9560c1080 Set saner MAX_ARGS (6 or 8) for X86_64 and I386
I noticed that tcp->u_args[MAX_ARGS] array is way larger than
I'd expect: for all arches except HPPA it has 32 (!) elements.

I looked at the code and so far I spotted only one abuser of
this fact: sys_sigreturn. On several arches, it saves sigset_t
into tcp->u_args[1...N] on entry and prints it on exit, a-la

memcpy(&tcp->u_arg[1], &sc.oldmask[0], sizeof(sigset_t))

The problem here is that in glibc sigset_t is insanely large:
128 bytes, and using sizeof(sigset_t) in memcpy will overrun
&tcp->u_args[1] even with MAX_ARGS == 32:
On 32 bits, sizeof(tcp->u_args) == 32*4 == 128 bytes!
We may already have a bug there!

This commit changes the code to save NSIG / 8 bytes only.
NSIG can't ever be > 256, and in practice is <= 129,
thus NSIG / 8 is <= 16 bytes == 4 32-bit words,
and even MAX_ARGS == 5 should be enough for saving signal masks.

* defs.h: Reduce MAX_ARGS for X86_64 and I386 from 32 to 8
for FreeBSD and to 6 for everyone else. Add comment about current
state of needed MAX_ARGS.
* signal.c: Add comment about size of sigset_t.
(sprintsigmask): Reduce static string buffer from 8k to 2k.
(sys_sigreturn): Fix sigset saving to save only NSIG / 8 bytes,
not sizeof(sigset_t) bytes.
* linux/mips/syscallent.h: Reduce nargs of printargs-type syscall to 7.
* linux/arm/syscallent.h: Reduce nargs of printargs-type syscall to 6.
* 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.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
9aa97968ed Optimize sys_old_mmap
* mem.c (sys_old_mmap): For Ia64 and 32-bit personality of x86-64,
copy narrow parameters from userspace by single umove, not by six
separate ones; then assign them to long u_arg[i]. For SH[64],
avoid copying of tcp->u_arg.
(sys_mmap): Add FIXME comment - SH64 and i386 seem to be handled
differently for no apparent reason.
* test/mmap_offset_decode.c: New test program, illustrates FIXME.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
31f9cb6f48 Untangle ifdef forest in sys_mmap64. No code changes
After careful analysis, it looks like !LINUX and ALPHA
pass all seven parameters in registers; and in all other cases
parameters are on stack (pointed to by tcp->u_arg[0]).
In light of this, reorganize ifdefs, making them simpler,
without changing any logic.
After this, it's apparent we use tcp->u_arg[4,5,6] and possibly
[7] without checking that it's valid to do so.
So far, just add a comment about this.

* mem.c (sys_mmap64): Rewrite ifdefs in a much simpler way.
Add comments about apparent bugs.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
72a5848741 Style and comment fixes, no code changes
* mem.c: Indent includes to show nesting better.
  (addtileflags): Fix style of this function definition;
  correct wrong endif comment, add another endif comment.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
4b08df42ff Use simpler rounding up to next multiple of 2.
* util.c (printllval): simpler rounding up to next multiple of 2.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
041b3ee42e Cosmetic fixes, no code changes
* defs.h: Add/reformat comments.
* signal.c: Remove wrong comment. Add warning directive
when we detect that NSIG is undefined. Add comment about
NSIG on ARM. Fix typo in comment.
(signame): Reformat code a bit without changes to logic.
Shorten static buffer.
(sys_rt_sigprocmask): Remove stray empty line.
* syscall.c: Add warning directive when we detect that
NSIG is undefined. Add comment about NSIG on ARM.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-23 12:53:01 +02:00
04f8b4860f Fix PTRACE_SETOPTIONS tests
* strace.c [LINUX] (kill_save_errno): New function.
(test_ptrace_setoptions_followfork): Change return type to void.
Fix and harden error handling.  Use kill_save_errno() to avoid errno
clobbering.  Treat EIO from ptrace() the same way as EINVAL.
(test_ptrace_setoptions_for_all): Use kill_save_errno() to avoid errno
clobbering.  Treat EIO from ptrace() the same way as EINVAL.
(main): Update use of test_ptrace_setoptions_followfork().
2011-08-23 12:53:00 +02:00
25caa318ee Fix compilation on linux 2.4.x
* configure.ac: Check for BLKGETSIZE64.
* block.c (block_ioctl): Check for HAVE_BLKGETSIZE64.
2011-08-23 12:53:00 +02:00
44f87efc67 Remove tcp->parent and TCB_CLONE_THREAD.
tcp->parent is used for only two things:
(1) to send signal on detach via tgkill (need to know tgid).
Solution: use tkill, it needs only tid.
(2) to optimize out ptrace options setting for new tracees.
Not a big deal if we drop this optimization: "set options" op is fast,
doing it just one extra time once per each tracee is hardly measurable.

TCB_CLONE_THREAD is a misnomer. It used only to flag sibling we attached to
in startup_attach. This is used to prevent infinite recursive rescanning
of /proc/PID/task.
Despite the name, there is no guarantee it is set only on non-leader:
if one would run "strace -f -p THREAD_ID" and THREAD_ID is *not*
a thread leader, strace will happily attach to it and all siblings
and will think that THREAD_ID is the leader! Which is a bug, but
since we no longer detach when we think tracee is going to die,
this bug no longer matters, because we do not use the knowledge
about thread group leaders for anything. (We used it to delay
leader's exit).

IOW: after this patch strace has no need to know about threads, parents
and children, and so on. Therefore it does not track that information.
It treats all tracees as independent entities. Overall,
this simplifies code a lot.

* defs.h: Add TCB_ATTACH_DONE flag, remove TCB_CLONE_THREAD flag
and struct tcb::parent field.
* process.c (internal_fork): Don't set tcpchild->parent.
* strace.c (startup_attach): Use TCB_ATTACH_DONE flag instead of
TCB_CLONE_THREAD to avoid attach attempts on already-attached threads.
Unlike TCB_CLONE_THREAD, TCB_ATTACH_DONE bit is used only temporarily,
and only in this function. We clear it on every tcb before we return.
(detach): Use tkill instead of tgkill.
(trace): Set ptrace options on new tracees unconditionally,
not only when tcp->parent == NULL.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-17 15:18:21 +02:00
833fb13cef Remove TCB_SUSPENDED constant and related code.
Since we no longer suspend waitpid'ing tracees, we have only one case when
we suspend tracee: when we pick up a new tracee created by clone/fork/vfork.

Background: on some other OSes, attach to child is done this way:
get fork's result (pid), loop ptrace(PTRACE_ATTACH) until you hook up
new process/thread. This is ugly and not safe, but what matters for us
is that it doesn't require suspending. Suspending is required
on Linux only, because on Linux attach to child is done differently.

On Linux, we use two methods of catching new tracee:
adding CLONE_THREAD bit to syscall (if needed, we change
[v]fork into clone before that), or using ptrace options.
In both cases, it may be so that new tracee appears before one which
created it returns from syscall. In this case, current code
suspends new tracee until its creator returns. Only then
strace can determine who is its parent (it needs child's pid for this,
which is visible in parent's [v]fork/clone result).
This is inherently racy. For example, what if SIGKILL kills
creator after it succeeded creating child, but before it returns?
Looks like we will have child suspended forever.

But after previous commit, we DO NOT NEED parent<->child link for anything.
Therefore we do not need suspending too. Bingo!

This patch removes suspending code. Now new tracees will be continued
right away. Next patch will remove tcp->parent member.

* defs.h: Remove TCB_SUSPENDED constant
* process.c (handle_new_child): Delete this function.
  (internal_fork): Do not call handle_new_child on syscall exit.
* strace.c (handle_ptrace_event): Delete this function.
  (trace): Do not suspend new child; remove all handling
  of now impossible TCB_SUSPENDED condition.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-17 11:30:56 +02:00
19cdada5b4 Do not detach when we think tracee is going to die.
Current code plays some ungodly tricks, trying to not detach
thread group leader until all threads exit.

Also, it detaches from a tracee when signal delivery is detected
which will cause tracee to exit.
This operation is racy (not to mention the determination
whether signal is set to SIG_DFL is a horrible hack):
after we determined that this signal is indeed fatal
but before we detach and let process die,
*other thread* may set a handler to this signal, and
we will leak the process, falsely displaying it as killed!

I need to look in the past to figure out why we even do it.
First guess is that it's a workaround for old kernel bugs:
kernel used to deliver exit notifications to the tracer,
not to real parent. These workarounds are ancient
(internal_exit is from 1995).

The patch deletes the hacks. We no longer need tcp->nclone_threads,
TCB_EXITING and TCB_GROUP_EXITING. We also lose a few rather
ugly functions.

I also added a new message: "+++ exited with EXITCODE +++"
which shows exact moment strace got exit notification.
It is analogous to existing "+++ killed by SIG +++" message.

* defs.h: Delete struct tcb::nclone_threads field,
  TCB_EXITING and TCB_GROUP_EXITING constants,
  declarations of sigishandled() and internal_exit().
* process.c (internal_exit): Delete this function.
  (handle_new_child): Don't ++tcp->nclone_threads.
* signal.c (parse_sigset_t): Delete this function.
  (sigishandled): Delete this function.
* strace.c (startup_attach): Don't tcbtab[tcbi]->nclone_threads++.
  (droptcb): Don't delay dropping if tcp->nclone_threads > 0,
  don't drop parent if its nclone_threads reached 0:
  just drop (only) this tcb unconditionally.
  (detach): don't drop parent.
  (handle_group_exit): Delete this function.
  (handle_ptrace_event): Instead of handle_group_exit, just drop tcb;
  do not panic if we see WIFEXITED from an attached pid;
  print "+++ exited with EXITCODE +++" for every WIFEXITED pid.
* syscall.c (internal_syscall):	Do not treat sys_exit specially -
  don't call internal_exit on it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-17 10:45:32 +02:00
02a08fb6f0 Declare printrusage32() on Alpha
* defs.h [ALPHA] (printrusage32): New declaration.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2011-08-16 15:35:00 +00:00
26d1b1eaa8 Slight optimization and cleanup in trace()
* strace.c (trace): Do not recalculate "cflag ? &ru : NULL"
again and again. Do not clear errno unnecessarily.
Consistently check wait errors as pid < 0, not pid == -1.
Indent ifdefs for better readability.
Remove comments after endif if ifdef/endif block is really tiny.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-15 12:24:14 +02:00
5bd67c86a9 Fix compilation on 2.4.20 kernel based system
* block.c (block_ioctl): add ifdef/endif around BLKGETSIZE64 usage
* strace.c (trace): add ifdef/endif around WIFCONTINUED usage

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-08-15 11:36:09 +02:00
1b0df40644 Check for additional PTRACE_* constants
* configure.ac (AC_CHECK_DECLS): Add PTRACE_O_TRACESYSGOOD,
PTRACE_O_TRACEEXEC, PTRACE_O_TRACEEXIT, PTRACE_EVENT_EXEC,
PTRACE_EVENT_VFORK_DONE and PTRACE_EVENT_EXIT.
* defs.h [LINUX]: Define these PTRACE_* constants when they are not
provided by <sys/ptrace.h>.

Reported-by: Douglas Mencken <dougmencken@gmail.com>
Reported-by: Steve Bennett <steveb@workware.net.au>
2011-07-19 22:13:11 +00:00
d166c55f0d Remove superfluous backslash-continuation in configure.ac
* configure.ac: remove superfluous backslash continuation
in AC_CHECK_DECLS

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-07-19 14:49:57 +02:00
9015cd9f9e Make IOCTL_WSTOP more readable
* defs.h: Make IOCTL_WSTOP more readable

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-24 23:07:24 +02:00
13d22f1aa3 Trivial cleanups
* strace.c (trace): Change ifdef LINUX to make a bit more sense,
  remove wrong comment at its endif. Slightly optimize
  "+++ killed by SIG +++" message for systems without WCOREDUMP macro.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-24 23:01:57 +02:00
e18314ed0f Remove redundant include <stdarg.h>
* strace.c: Remove redundant include <stdarg.h>

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-24 22:58:00 +02:00
178de007d1 Clean up two old comments
* strace.c (startup_attach): Remove misplaced comment.
  (trace) Remove incomplete part of a comment.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-24 22:54:25 +02:00
ead73bd349 Make a few variables static.
* defs.h: Remove tcbtab declaration.
* strace.c: Make run_uid, run_gid, outf, tcbtab, progname
  global variables static

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-24 22:49:58 +02:00
f95397afb8 Add debug output in initial attachment code
* strace.c (startup_attach): If -d, report pid and success/failure
  of every attach attempt.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-24 16:51:16 +02:00
1d5f12ecb8 Better debug logging of allocations and waitpit results
* strace.c (alloc_tcb): Print number of allocated tcb's if -d.
  (droptcb): Likewise.
  (handle_ptrace_event): Remove PTRACE_EVENT_EXEC debug message.
  (trace): Improve logging of waitpid: show WIFxxx, exitcode/signal,
  ptrace event name, WCOREDUMP - all on one line.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-24 16:41:35 +02:00
0b6c73c880 Optimize arrays of register indexes in syscall_enter
* syscall.c (syscall_enter) [BFIN]: Make register no array "static const".
  [SH]: Make register no array "const", pre-multiply it by 4.
  [SH64]: Make register no array "const".
  [X86_64]: Make register no array "const", pre-multiply it by 8.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 22:22:34 +02:00
f5d099c270 Deindent syscall_enter by removing unnecessary braces. No code changes.
syscall_enter has many long (>80 columns) lines.
It is aggravated by the fact that it has a lot of {} blocks
which are not necessary (the code is the same without them).
This patch removes {}s and deindents affected lines.
While at it, it indents ifdefs so that nesting is easier to track,
and adds a few spaces in the expressions, such as
"tcp->u_nargs*sizeof..." -> "tcp->u_nargs * sizeof...".
There is no actual changes to the code here.

* syscall.c (syscall_enter): Remove unnecessary {} blocks.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 22:10:54 +02:00
47247865eb Remove dead "ifndef CLONE_PTRACE" branch
process.c defines CLONE_PTRACE for Linux, so it can't be undefined.
Therefore ifndef CLONE_PTRACE code is dead (since at least 2004).
This patch removes it.

* process.c (handle_new_child): Remove ifdef CLONE_PTRACE/endif (but not
  the code inside) and entire ifndef CLONE_PTRACE/endif block.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 22:06:39 +02:00
91ecfac9b6 Add a comment about setbpt. No code changes.
* defs.h: Add a comment about setbpt().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 22:05:50 +02:00
c133bf0eb2 Untangle a particularly badly obfuscated bit of code. No logic changes.
* util.c (setbpt): Calculate new arg0 in more readable way.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 21:57:54 +02:00
65d7c4d66c Remove TCB_FOLLOWFORK
TCB_FOLLOWFORK flag seems to be unnecessary, because we either follow
all [v]forks/clones or don't follow any, therefore global variable
followfork is an already existing indicator of what we want to do.
This patch drops all setting/clearing of TCB_FOLLOWFORK bit,
and replaces checks for this bit by checks of followfork value.
In internal_fork, check is moved to in front of if(), since
the check is needed on both "entering" and "exiting" branch.

* defs.h: Remove TCB_FOLLOWFORK define.
* process.c (internal_fork): Do not set/clear TCB_FOLLOWFORK,
  test followfork instead of tcp->flags & TCB_FOLLOWFORK.
  (handle_new_child): Likewise.
* strace.c (startup_attach): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 21:46:37 +02:00
1c706b3809 * system.c (sys_capget, sys_capset): Fix pointer arithmetics 2011-06-23 13:25:09 +00:00
4f12af24e4 Make initial tcb allocation more readable. No logic changes.
* strace.c (main): Make initial tcb allocation more readable.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 13:16:23 +02:00
b0bafbb5d1 Do not allocate tiny cap_user_header/data structures, place them on stack.
This allows us to avoid having code to malloc them, and code to check
for malloc failure. Resulting code decrease:
   text	   data	    bss	    dec	    hex	filename
  10175	      0	     16	  10191	   27cf	system.o.old
   9797	      0	      0	   9797	   2645	system.o

* system.c (sys_capget): Put cap_user_header_t and cap_user_data_t
  on stack, rather than allocating them in heap. These structures
  are very small (a few integer fields), stack is a better place
  for them.
  (sys_capset): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 13:10:28 +02:00
cb2ad00652 Use [p]error_msg[_and_die] where appropriate. No logic changes.
Resulting size changes:
   text    data     bss     dec     hex filename
  17445      16    8572   26033    65b1 strace.o.old
  16850      16    8572   25438    635e strace.o

* strace.c: Replace fprintf[+cleanup]+exit with [p]error_msg_and_die,
  fprintf("progname: ...") with [p]error_msg where appropriate.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-23 13:05:29 +02:00
7b609d5ba0 Whitespace cleanups. No code changes.
* count.c: Place opening curly brace after if (),
  not on the next line. Almost all strace code alredy
  uses this style.
* desc.c: Likewise.
* file.c: Likewise.
* net.c: Likewise.
* pathtrace.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* signal.c: Likewise.
* strace.c: Likewise.
* syscall.c: Likewise.
* time.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-22 14:32:43 +02:00
3d5ed41252 Make strace_fopen abort on error
Error from strace_fopen in main results in call to exit(1).
Error from strace_fopen in newoutf is propagated to newoutf
callers: startup_attach (where it results in exit(1))
and alloc_tcb (where error is ignored). In second case,
the behavior doesn't seem to be right: it means with -ff
on open error for new LOGFILE.PID the output will continue
to go into *the same file as the previous process* - which
would be confusing. Moreover, on droptcb outf may be closed
and the output of other, still running process outputting
to the same outf will be lost. I don't think this is sane.
IOW: in all cases, error in strace_fopen should be fatal.

* strace.c (strace_fopen): Abort on error instead of returning NULL.
  (newoutf): Change return type to void.
  (startup_attach): Remove error check on newoutf return value.
  (main): Remove error check on strace_fopen return value.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-22 13:17:16 +02:00
1f532ab27d Make set_cloexec_flag abort on error
set_cloexec_flag() may fail only if we pass it a bad fd,
such as -1 or non-opened one. If we do, we have a bug
in the caller. It makes no sense to try to continue
running when we detect such a blatant bug in our own code.

* strace (set_cloexec_flag): Abort instead of returning error
  indicator. Change function to return void.
  (strace_fopen): Remove error check on set_cloexec_flag return value.
  (proc_open): Likewise.
  (proc_poll_open): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-22 13:11:23 +02:00
7dd23384f7 Make strace_popen abort on error
It makes no sense to postpone abort on strace_popen error
unti it returns. Moreover, out-of-memory error was exiting
without any message.
While at it, use 0 as "none" for popen_pid, as optimization.

* strace: Initialize popen_pid to 0 - this puts it in bss.
  (trace): Reset popen_pid to 0 instead of -1.
  (strace_popen): Never return NULL as error indicator,
  abort with good error message instead.
  (main): Remove NULL check of strace_popen result.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-22 13:03:56 +02:00
2b60c35b33 Delete fork_tcb()
Get rid of fork_tcb() function. It used to do what the comment
above it says, but now it doesn't do much:
it only sets tcp->flags |= TCB_FOLLOWFORK and maybe calls
expand_tcbtab(). The second operation is not necessary, since
alloc_tcp() will do it itself when needed.
This patch deletes fork_tcb(), open-coding tcp->flags |= TCB_FOLLOWFORK
where it was formerly called. It also makes nprocs, tcbtabsize and
expand_tcbtab() static. (While at it, I nuked redundant
extern char **environ declaration: strace.c had *two* of them...)

* defs.h: Remove declarations of nprocs, tcbtabsize and
  expand_tcbtab.
* process.c (fork_tcb): Remove this function.
  (internal_fork): Open-code fork_tcb.
  (handle_new_child): Likewise.
* strace.c: Remove redundant "extern char **environ". Declare
  nprocs and tcbtabsize static.
  (expand_tcbtab): Make it static.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-22 12:45:25 +02:00
18da273675 Simplify expand_tcbtab and alloc_tcb
Get rid of a few intermediate variables, simplifies a few expressions,
and uses error_msg_and_die instead of more verbose
fprintf+cleanup+exit sequence.
In alloc_tcp, I use memset to clear entire new tcp.
This not only saves a few bytes of code, but lowers the chances
of future bugs where some data "leaks out" into new tcb's
from old ones because we forgot to re-initialize it.

* strace.c (expand_tcbtab): Simplify this function. No logic changes.
  (alloc_tcb): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-22 12:41:57 +02:00
e7c9024acf Trivial fixes
* process.c (internal_fork): Remove conditionals which make no difference
  (we return 0 on both branches of these ifs).
* util.c: Fix indentation of an ifdef.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-22 00:09:25 +02:00
081e72f41a Fix build when libaio-devel is not available
* desc.c: Do not compile code that uses struct iocb unless
HAVE_LIBAIO_H is set.

Reported-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-21 15:11:57 +00:00
d1d182209e tests: finish ptrace_setoptions_* merge
* tests/Makefile.am (TESTS): Merge ptrace_setoptions_*.
* tests/ptrace_setoptions: Check for Linux kernel > 2.6.
2011-06-21 15:03:17 +00:00
b56d6d3bfe Remove write-only nchildren member from struct tcb
* defs.h: Remove nchildren member from struct tcb.
* process.c (handle_new_child): Remove inc/decrements of tcp->nchildren.
  (internal_fork): Likewise.
* strace.c (startup_attach): Likewise.
  (droptcb): Likewise.
  (alloc_tcb): Remove initialization of tcp->nchildren.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-21 16:06:28 +02:00
8f0f14b6da Fix tests/ptrace_setoptions_* to match last fix in ptrace options code
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-21 15:55:07 +02:00
f0a5f6d710 Remove write-only nzombies member from struct tcb
* defs.h: Remove nzombies member from struct tcb.
* strace.c (droptcb): Remove "tcp->parent->nzombies++".
  (alloc_tcb): Remove "tcp->nzombies = 0".

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-21 15:34:40 +02:00
f44cce48bb Fix regression introduced by "Properly handle real SIGTRAPs" change
Commit 3454e4b463
introduced a bug: sometimes, TRACECLONE/TRACE[V]FORK opts were not set.
The check (tcp->parent == NULL) in old code was meant to check
"if we are not a child created by auto-attach" - in this case,
options need to be set on the child; otherwise they are inherited
and do not need to be set.
I misunderstood the check and if tcp->parent is not NULL, I was
setting only ptrace_setoptions_for_all bits.
This change fixes the problem. Since the fixed logic makes it
unnecessary to keep two sets of options in separate variables,
I merge them back into one variable, ptrace_setoptions.

* defs.h: Merge ptrace_setoptions_followfork and ptrace_setoptions_for_all
  into one variable, ptrace_setoptions.
* strace.c: Likewise.
  (test_ptrace_setoptions_followfork): Use ptrace_setoptions variable.
  (test_ptrace_setoptions_for_all): Likewise.
  (main): Likewise.
* process.c (internal_fork): Likewise.
  (internal_exec): Likewise.
* strace.c (trace): Fix the bug where different options were set
  depending on "tcp->parent == NULL" condition. Add a comment
  which makes it more clear why this condition is checked.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-21 14:34:10 +02:00
0df9ed47af Do not suspend waitpid.
strace used to suspend waitpid until there is a child
for waitpid'ing process to collect status from.
Apparently, it was done because in some very old kernels
(circa 2002 or even earlier) there were ptrace bugs which
were making waitpid in real parent to not see children.
This kernel bug is fixed long ago. This change removes the workaround.
test/wait_must_be_interruptible.c is a test program which
illustrates why without this change strace changes
programs's behavior.

* defs.h: Delete waitpid and nclone_waiting members from from struct tcb.
  Remove declaration of internal_wait().
* process.c (internal_wait): Remove this function.
* strace.c (alloc_tcb): Do not set tcp->nclone_waiting.
  (resume): Remove this function.
  (resume_from_tcp): Remove this function.
  (detach): Do not call resume_from_tcp().
  (handle_group_exit): Do not call resume_from_tcp().
* syscall.c (internal_syscall): Do not call internal_wait().

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-18 11:38:51 +02:00
dfcd741a5a Enhance io_submit() decoding
strace didn't decode important fields in the iocb passed to io_submit.
This patch changes the code to dump them all.  Also it prefixes the fields
with names to make it easier to read.

* desc.c (iocb_cmd_lookup, print_common_flags): New functions.
(sys_io_submit): New iocb decoder.
2011-06-13 23:03:11 +00:00
8884968a46 Add argument to tprint_iov() specifying whether to decode each iovec
* defs.h (tprint_iov): Add decode_iov argument.
* io.c (tprint_iov): Implement new decode_iov argument.
(sys_readv, sys_writev, sys_sendfile, sys_preadv, sys_pwritev): Update
tprint_iov calls.
* net.c (do_msghdr): Likewise.
2011-06-13 22:58:44 +00:00
fcda7a5f4f Introduce ARRAY_SIZE() macro
* defs.h (ARRAY_SIZE): New macro.
* ioctl.c: Use it.
* pathtrace.c (pathmatch, storepath): Likewise.
* process.c (printpriv): Likewise.
* signal.c: Likewise.
* syscall.c: Likewise.
2011-06-13 21:58:43 +00:00
732f39656d Fix decoding of timer id returned by timer_create
* time.c (sys_timer_create): The kernel returns a integer, not a
pointer for the timer id in the memory pointed to by timer_id.
2011-06-13 21:37:40 +00:00
2ea2ab0590 Add test for PTRACE_O_TRACESYSGOOD
* tests/ptrace_setoptions_for_all: New file.
* tests/Makefile.am (TESTS): Add ptrace_setoptions_for_all.
2011-06-09 18:28:02 +00:00
30ecdcc121 tests: update test for linux kernel version
* tests/ptrace_setoptions_followfork: Check for Linux kernel > 2.6.
2011-06-09 18:23:09 +00:00
e254e53d8c Update ptrace_setoptions test
The test have to be adjusted after commit v4.6-5-g3454e4b.

* ptrace_setoptions: Update grep pattern, rename to
ptrace_setoptions_followfork.
* tests/Makefile.am (TESTS): Rename ptrace_setoptions to
ptrace_setoptions_followfork.
2011-06-09 16:10:07 +00:00
44d053218b * strace.c (verror_msg): Rewrite without use of heap memory allocation 2011-06-09 15:50:41 +00:00
3e90b29929 Fix MIPS syscall entries
* linux/mips/syscallent.h: Remove duplicate entries for 4336, 4337,
and 4338 syscall numbers.

Reported-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-09 15:16:01 +00:00
f07367954c Don't display bogus parameter for sigreturn syscall
* linux/*/syscallent.h: For those arches which use sys_sigreturn,
not printargs, to show [rt_]sigreturn syscall, change number of arguments
from 1 to 0: sys_sigreturn function doesn't use syscall parameters.
(I guess kernel doesn't actually _have_ any parameters for this syscall,
at least on these architectures). Do the same change for I386 and x86-64
even though they use printargs: I looked at kernel code and syscall
definitely doesn't have any parameters on these arches.
(I hesitate to change 1 to 0 params for arches I don't know -
it is remotely possible some of them do have a parameter for this syscall).

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-09 01:43:22 +02:00
56a52984ae Optimize sigreturn handling
* signal.c (sys_sigreturn): move stack pointer variables,
and for SPARC and MIPS, stack pointer and sigmask reading code
into "if (entering) ..." block, because it is only needed
in this branch; load tcp->u_arg[1] into sigmask for display
_after_ we know for sure u_arg[1] does contain valid sigmask
(IOW: perform operation only when we know we will need the result)

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-09 01:36:29 +02:00
4660fe610c Do not call umoven to fetch parameters if we have zero params
* syscall.c [I386] (syscall_enter): Do not call umoven
to fetch zero bytes. This is just an optimization.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-09 01:32:23 +02:00
eccc48c63e "Modernize" four old-style function parameter declarations
* signal.c (signame, long_to_sigset, printsigmask, printsignal):
Convert old-style C function definitions to a "modern" form.
This does not change any actual code.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-09 01:28:11 +02:00
facd45b255 Fix sigreturn decoding on MIPS
The "return 0" line was accidentally deleted circa 2007,
which made sigreturn on MIPS always display "= 0" return
instead of more informative " = ? (mask now [MASK])".

* strace.c (sys_sigreturn): Add wrongly deleted "return 0" line

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-09 01:22:10 +02:00
e62df004ce Print at least one space between SYSCALL(ARGS) and = RESULT if tracee is killed
We already do it in the normal case, but in rare code path where
tracee is gone (SIGKILLed?) sometimes we were printing this:
"SYSCALL(ARGS <unavailable>)= ? <unavailable>" - note jammed together ")=".
test/sigkill_rain.c can be used to verify the fix.

* strace.c (printleader): add a space after ")" in " <unavailable>)"

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-08 16:15:04 +02:00
7c57be862b Add fflush after printf in test/sigkill_rain.c
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-08 16:07:03 +02:00
8158e7716c Update test/* directory, it seem to be a bit bit-rotted
Added README; modified sigkill_rain.c to be more understandable,
made clone.c compile; added wait_must_be_interruptible.c test;
updated Makefile and .gitignore.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-08 14:08:59 +02:00
b63256e69b Whitespace cleanups. no code changes.
* bjm.c: Fix tabulation (such as extra spaces before tabs),
convert punctuation where it deviates from prevalent form
elsewhere in strace code, convert sizeof and offsetof where
it deviates from from prevalent form, remove space between
function/macro/array names and (parameters) or [index],
add space between "if" and (condition), correct non-standard
or wrong indentaion.
* defs.h: Likewise
* desc.c: Likewise
* file.c: Likewise
* ipc.c: Likewise
* linux/arm/syscallent.h: Likewise
* linux/avr32/syscallent.h: Likewise
* linux/hppa/syscallent.h: Likewise
* linux/i386/syscallent.h: Likewise
* linux/ioctlsort.c: Likewise
* linux/m68k/syscallent.h: Likewise
* linux/microblaze/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/tile/syscallent.h: Likewise
* linux/x86_64/syscallent.h: Likewise
* mem.c: Likewise
* net.c: Likewise
* pathtrace.c: Likewise
* process.c: Likewise
* signal.c: Likewise
* sock.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* sunos4/syscall.h: Likewise
* sunos4/syscallent.h: Likewise
* svr4/syscall.h: Likewise
* svr4/syscallent.h: Likewise
* syscall.c: Likewise
* system.c: Likewise
* test/childthread.c: Likewise
* test/leaderkill.c: Likewise
* test/skodic.c: Likewise
* time.c: Likewise
* util.c: Likewise

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-07 12:13:24 +02:00
7a5b08fb26 ARM EABI: fix 64-bit syscall's arguments decoding
ARM OABI and ARM EABI have different function parameters passing rules.
With EABI, 64-bit function parameters passed in registers are aligned to
an even-numbered register instead of using the next available pair, see
http://lkml.org/lkml/2006/1/12/175
This rule also applies to syscall's arguments.

* linux/arm/syscallent.h (pread, pwrite, truncate64, ftruncate64,
readahead, preadv, pwritev): Fix number of arguments.
* util.c (printllval): Align 64bit argument to 64bit boundary on
__ARM_EABI__.

Reported-by: Damir Shayhutdinov <damir@altlinux.org>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2011-05-30 21:14:55 +00:00
3087dd6780 Linux: implement decoding of preadv and pwritev syscalls
* io.c [LINUX && HAVE_SYS_UIO_H] (sys_preadv, sys_pwritev): New functions.
* linux/syscall.h (sys_preadv, sys_pwritev): Declare them.
* linux/*/syscallent.h: Use them.

Signed-off-by: Damir Shayhutdinov <damir@altlinux.ru>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2011-05-30 21:14:55 +00:00
1201426dd4 "Modernize" all old-style function parameter declarations
* bjm.c: Convert all remaining old-style C function definitions
to a "modern" form. This does not change any actual code.
* io.c: Likewise
* ioctl.c: Likewise
* net.c: Likewise
* proc.c: Likewise
* process.c: Likewise
* signal.c: Likewise
* sock.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* syscall.c: Likewise
* system.c: Likewise
* time.c: Likewise
* util.c: Likewise

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-05-30 14:00:14 +02:00
75422766d5 Cleanups on top of "handle SIGTRAP properly" change,
based on Dmitry's comments.

* defs.h ([p]error_msg[_and_die]): Declare new functions.
* strace.c (SYSCALLTRAP): Rename to syscall_trap_sig.
([p]error_msg[_and_die]): Define new functions.
(strace_tracer_pid): New variable, it controls which pid will
do cleanup on exit via [p]error_msg_and_die.
(main): Set strace_tracer_pid to our initial pid.
(startup_attach): Change strace_tracer_pid if we are in -D mode.
(test_ptrace_setoptions_for_all): Minor changes to logic,
such as better diagnostic messages.
2011-05-27 14:36:01 +02:00
35aba6a8dd Identifier "errno" may be a macro, it's unsafe to use it
* strace.c (strerror): Rename parameter errno to err_no
2011-05-25 15:33:26 +02:00
f8bc0655a0 Don't perform TCB_WAITEXECVE wait if not needed.
* defs.h (ptrace_setoptions_for_all): Expose this variable.
* strace.c (ptrace_setoptions_for_all): Remove "static".
* process.c (internal_exec): Don't set TCB_WAITEXECVE bit
if we know that post-execve SIGTRAP is not going to happen.
2011-05-24 20:30:24 +02:00
3454e4b463 Properly handle real SIGTRAPs.
* defs.h (ptrace_setoptions): Variable renamed to ptrace_setoptions_followfork.
* process.c (internal_fork): Ditto.
* strace.c (ptrace_setoptions_for_all): New variable.
(SYSCALLTRAP): New variable.
(error_msg_and_die): New function.
(test_ptrace_setoptions_for_all): New function.
(main): Call test_ptrace_setoptions_for_all() at init.
(handle_ptrace_event): Handle PTRACE_EVENT_EXEC (by ignoring it).
(trace): Check events and set ptrace options without -f too.
Check WSTOPSIG(status) not for SIGTRAP, but for SYSCALLTRAP.
2011-05-23 21:29:03 +02:00
1cd5371d50 Blackfin: update syscall list
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

* linux/bfin/syscallent.h: Add name_to_handle_at, open_by_handle_at,
clock_adjtime, and syncfs syscalls.
2011-04-24 19:43:13 +00:00
96e1f48087 linux: add new EHWPOISON errno
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

* linux/errnoent.h: Change ERRNO_133 to EHWPOISON.
2011-04-24 19:43:03 +00:00
8a08277d13 Add ability to print file descriptor paths and filter by those paths
* pathtrace.c: New file, implements matching syscall arguments to
user-specified file paths.
* Makefile.am (strace_SOURCES): Add pathtrace.c.
* defs.h (TCB_FILTERED, filtered): New defines.
(getfdpath, pathtrace_select, pathtrace_match, show_fd_path,
tracing_paths): New declarations.
* strace.c (show_fd_path, tracing_paths): New global variables.
(usage, main): Implement handling of -y and -P options.
* strace.1: Add descriptions of -y and -P options.
* syscall.c (trace_syscall_entering): Add path matching logic to the
print/noprint decision and set the TCB_FILTERED bit appropriately.
(trace_syscall_exiting): Use filtered() macro that checks the
TCB_FILTERED bit to determine print/noprint status.
* util.c (printfd): Use getfdpath().
2011-04-08 20:47:56 +00:00
4cee0af77b Fix BLKTRACESTOP definition
* block.c: Fix typo in the check for BLKTRACESTOP.
Reported by Gabor Z. Papp.
2011-04-07 19:58:10 +00:00
432 changed files with 30432 additions and 38340 deletions

5
.gitignore vendored
View File

@ -2,7 +2,11 @@
*.o
.deps
.libs
.version
.*.swp
*.gdb
.gdbinit
.gdb_history
/ChangeLog
/CREDITS
@ -29,6 +33,7 @@ Makefile.in
/ioctldefs.h
/ioctlsort
/strace
/test-driver
/linux/ioctlent.h

View File

@ -1,4 +1,6 @@
# Map git author names and email addresses to canonical/preferred form.
<ak@linux.intel.com> <ak@suse.de>
<holger@freyther.de> <zecke@selfish.org>
<schwab@linux-m68k.org> <schwab@redhat.com>
<schwab@linux-m68k.org> <schwab@suse.de>
<vda.linux@googlemail.com> <dvlasenk@redhat.com>

View File

@ -27,5 +27,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
$Id$

View File

@ -19,7 +19,6 @@ strace-devel@lists.sourceforge.net mailing list.
##>
Aaron Ucko ucko@vax1.rockhurst.edu
Adrien Kunysz adrien@kunysz.be
Andi Kleen ak@suse.de
Anton Blanchard anton@samba.org
Arkadiusz Miskiewicz misiek@pld.org.pl
Bai Weidong baiwd@cn.fujitsu.com

284
INSTALL
View File

@ -1,48 +1,80 @@
Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice
and this notice are preserved. This file is offered as-is, without
warranty of any kind.
Basic Installation
==================
These are generic installation instructions.
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
`./configure' to configure the package for your system.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation.
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. You can remove the program binaries and object files from the
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
@ -51,62 +83,89 @@ The simplest way to compile this package is:
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
Compiling For Multiple Architectures
====================================
./configure CC=c99 CFLAGS=-g LIBS=-lposix
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
*Note Defining Variables::, for more details.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed with
an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@ -119,62 +178,125 @@ find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
need to know the machine type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
Defining Variables
==================
`configure' recognizes the following options to control how it
operates.
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
Print a summary of the options to `configure', and exit.
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`configure' also accepts some other, not widely useful, options.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@ -4,10 +4,9 @@ SUBDIRS = tests
bin_PROGRAMS = strace
man_MANS = strace.1
bin_SCRIPTS = strace-graph
bin_SCRIPTS = strace-graph strace-log-merge
# OS is one of `linux', `sunos4', `svr4', or `freebsd'.
OS = @opsys@
OS = linux
# ARCH is `i386', `m68k', `sparc', etc.
ARCH = @arch@
@ -15,122 +14,277 @@ ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS) -I$(builddir)/$(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 \
resource.c signal.c sock.c system.c term.c time.c \
proc.c scsi.c stream.c block.c
noinst_HEADERS = defs.h
include xlat/Makemodule.am
EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
debian/changelog debian/compat debian/control debian/copyright \
debian/rules debian/source/format debian/watch \
debian/strace64.install debian/strace64.manpages \
debian/strace.docs debian/strace.examples debian/strace.install \
debian/strace.manpages debian/strace-udeb.install \
strace.spec \
strace-graph ChangeLog ChangeLog-CVS COPYRIGHT CREDITS PORTING \
README-freebsd README-linux README-sunos4 README-svr4 \
linux/ioctlsort.c linux/ioctlent.sh \
linux/ioctlent.h.in linux/errnoent.h linux/signalent.h \
linux/syscall.h linux/dummy.h \
linux/i386/ioctlent.h.in linux/i386/syscallent.h \
linux/alpha/errnoent.h linux/alpha/ioctlent.h.in \
linux/alpha/signalent.h linux/alpha/syscallent.h \
linux/arm/ioctlent.h.in linux/arm/syscallent.h \
linux/arm/syscallent1.h \
linux/arm/signalent1.h linux/arm/ioctlent1.h \
linux/arm/errnoent1.h \
linux/avr32/ioctlent.h.in linux/avr32/syscallent.h \
linux/bfin/ioctlent.h.in linux/bfin/syscallent.h \
linux/hppa/errnoent.h linux/hppa/ioctlent.h.in \
linux/hppa/signalent.h linux/hppa/syscallent.h \
linux/ia64/ioctlent.h.in \
linux/ia64/signalent.h \
linux/ia64/syscallent.h \
linux/m68k/ioctlent.h.in linux/m68k/syscallent.h \
linux/microblaze/ioctlent.h.in linux/microblaze/syscallent.h \
linux/mips/ioctlent.sh linux/mips/errnoent.h \
linux/mips/ioctlent.h.in linux/mips/signalent.h \
linux/mips/syscallent.h \
linux/powerpc/ioctlent.h.in linux/powerpc/ioctlent1.h \
linux/powerpc/syscallent.h linux/powerpc/syscallent1.h \
linux/powerpc/errnoent1.h linux/powerpc/signalent1.h \
linux/s390/ioctlent.h.in \
linux/s390/syscallent.h \
linux/s390x/ioctlent.h.in \
linux/s390x/syscallent.h \
linux/sh/syscallent.h \
linux/sh/ioctlent.h.in \
linux/sh64/ioctlent.h.in linux/sh64/syscallent.h \
linux/sparc/dummy2.h \
linux/sparc/errnoent.h linux/sparc/errnoent1.h \
linux/sparc/ioctlent.h.in linux/sparc/ioctlent1.h \
linux/sparc/signalent.h linux/sparc/signalent1.h \
linux/sparc/syscall1.h \
linux/sparc/syscallent.h linux/sparc/syscallent1.h \
linux/sparc/gen.pl \
linux/sparc64/dummy2.h linux/sparc64/errnoent.h \
linux/sparc64/errnoent1.h linux/sparc64/errnoent2.h \
linux/sparc64/ioctlent.h.in linux/sparc64/ioctlent1.h \
linux/sparc64/ioctlent2.h linux/sparc64/signalent.h \
linux/sparc64/signalent1.h linux/sparc64/signalent2.h \
linux/sparc64/syscall1.h \
linux/sparc64/syscallent.h linux/sparc64/syscallent1.h \
linux/sparc64/syscallent2.h \
linux/tile/ioctlent.h.in linux/tile/syscallent.h \
linux/x86_64/ioctlent.h.in 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 \
freebsd/ioctlent.sh \
freebsd/syscalls.cat freebsd/syscalls.pl freebsd/syscalls.print \
freebsd/i386/errnoent.h freebsd/i386/ioctlent.h \
freebsd/i386/signalent.h \
freebsd/i386/syscall.h freebsd/i386/syscallent.h \
sunos4/dummy.h sunos4/errnoent.h \
sunos4/ioctlent.h sunos4/ioctlent.sh sunos4/signalent.h \
sunos4/syscall.h sunos4/syscallent.h \
svr4/dummy.h svr4/errnoent.h svr4/ioctlent.h svr4/ioctlent.sh \
svr4/signalent.h svr4/syscall.h svr4/syscallent.h \
xlate.el
strace_SOURCES = \
aio.c \
bjm.c \
block.c \
count.c \
desc.c \
fanotify.c \
file.c \
inotify.c \
io.c \
ioctl.c \
ioprio.c \
ipc.c \
kexec.c \
keyctl.c \
ldt.c \
loop.c \
mem.c \
mtd.c \
net.c \
pathtrace.c \
process.c \
ptp.c \
quota.c \
reboot.c \
resource.c \
scsi.c \
signal.c \
sock.c \
strace.c \
stream.c \
syscall.c \
system.c \
term.c \
time.c \
util.c \
vsprintf.c
if USE_LIBUNWIND
strace_SOURCES += unwind.c
strace_CPPFLAGS = $(AM_CPPFLAGS) $(libunwind_CPPFLAGS)
strace_LDFLAGS = $(libunwind_LDFLAGS)
strace_LDADD = $(libunwind_LIBS)
else
strace_CPPFLAGS = $(AM_CPPFLAGS)
endif
noinst_HEADERS = defs.h
# Enable this to get link map generated
#strace_CFLAGS = $(AM_CFLAGS) -Wl,-Map=strace.mapfile
EXTRA_DIST = \
$(man_MANS) \
.version \
COPYING \
CREDITS \
ChangeLog \
ChangeLog-CVS \
README-linux \
README-linux-ptrace \
debian/changelog \
debian/compat \
debian/control \
debian/copyright \
debian/rules \
debian/source/format \
debian/strace-udeb.install \
debian/strace.docs \
debian/strace.examples \
debian/strace.install \
debian/strace.manpages \
debian/strace64.install \
debian/strace64.manpages \
debian/watch \
errnoent.sh \
linux/aarch64/errnoent1.h \
linux/aarch64/ioctlent.h.in \
linux/aarch64/ioctlent1.h \
linux/aarch64/signalent1.h \
linux/aarch64/syscallent.h \
linux/aarch64/syscallent1.h \
linux/alpha/errnoent.h \
linux/alpha/ioctlent.h.in \
linux/alpha/signalent.h \
linux/alpha/syscallent.h \
linux/arc/ioctlent.h.in \
linux/arc/syscallent.h \
linux/arm/ioctlent.h.in \
linux/arm/syscallent.h \
linux/avr32/ioctlent.h.in \
linux/avr32/syscallent.h \
linux/bfin/ioctlent.h.in \
linux/bfin/syscallent.h \
linux/dummy.h \
linux/errnoent.h \
linux/fanotify.h \
linux/hppa/errnoent.h \
linux/hppa/ioctlent.h.in \
linux/hppa/signalent.h \
linux/hppa/syscallent.h \
linux/i386/ioctlent.h.in \
linux/i386/syscallent.h \
linux/ia64/ioctlent.h.in \
linux/ia64/signalent.h \
linux/ia64/syscallent.h \
linux/inotify.h \
linux/ioctlent-filter.awk \
linux/ioctlent.h.in \
linux/ioctlent.sh \
linux/ioctlsort.c \
linux/kexec.h \
linux/keyctl.h \
linux/m68k/ioctlent.h.in \
linux/m68k/syscallent.h \
linux/metag/ioctlent.h.in \
linux/metag/syscallent.h \
linux/microblaze/ioctlent.h.in \
linux/microblaze/syscallent.h \
linux/mips/errnoent.h \
linux/mips/ioctlent.h.in \
linux/mips/ioctlent.sh \
linux/mips/signalent.h \
linux/mips/syscallent-compat.h \
linux/mips/syscallent-n32.h \
linux/mips/syscallent-n64.h \
linux/mips/syscallent-o32.h \
linux/mips/syscallent.h \
linux/mtd-abi.h \
linux/or1k/ioctlent.h.in \
linux/or1k/syscallent.h \
linux/personality.h \
linux/powerpc/errnoent1.h \
linux/powerpc/ioctlent.h.in \
linux/powerpc/ioctlent1.h \
linux/powerpc/signalent1.h \
linux/powerpc/syscallent.h \
linux/powerpc/syscallent1.h \
linux/ptp_clock.h \
linux/reboot.h \
linux/s390/ioctlent.h.in \
linux/s390/syscallent.h \
linux/s390x/ioctlent.h.in \
linux/s390x/syscallent.h \
linux/sh/ioctlent.h.in \
linux/sh/syscallent.h \
linux/sh64/ioctlent.h.in \
linux/sh64/syscallent.h \
linux/signalent.h \
linux/sparc/dummy2.h \
linux/sparc/errnoent.h \
linux/sparc/errnoent1.h \
linux/sparc/gen.pl \
linux/sparc/ioctlent.h.in \
linux/sparc/ioctlent1.h \
linux/sparc/signalent.h \
linux/sparc/signalent1.h \
linux/sparc/syscall1.h \
linux/sparc/syscallent.h \
linux/sparc/syscallent1.h \
linux/sparc64/dummy2.h \
linux/sparc64/errnoent.h \
linux/sparc64/errnoent1.h \
linux/sparc64/errnoent2.h \
linux/sparc64/ioctlent.h.in \
linux/sparc64/ioctlent1.h \
linux/sparc64/ioctlent2.h \
linux/sparc64/signalent.h \
linux/sparc64/signalent1.h \
linux/sparc64/signalent2.h \
linux/sparc64/syscall1.h \
linux/sparc64/syscallent.h \
linux/sparc64/syscallent1.h \
linux/sparc64/syscallent2.h \
linux/subcall.h \
linux/syscall.h \
linux/tile/errnoent1.h \
linux/tile/ioctlent.h.in \
linux/tile/ioctlent1.h \
linux/tile/signalent1.h \
linux/tile/syscallent.h \
linux/tile/syscallent1.h \
linux/ubi-user.h \
linux/x32/errnoent.h \
linux/x32/errnoent1.h \
linux/x32/ioctlent.h.in \
linux/x32/ioctlent1.h \
linux/x32/signalent.h \
linux/x32/signalent1.h \
linux/x32/syscallent.h \
linux/x32/syscallent1.h \
linux/x86_64/errnoent1.h \
linux/x86_64/errnoent2.h \
linux/x86_64/gentab.pl \
linux/x86_64/ioctlent.h.in \
linux/x86_64/ioctlent1.h \
linux/x86_64/ioctlent2.h \
linux/x86_64/signalent1.h \
linux/x86_64/signalent2.h \
linux/x86_64/syscallent.h \
linux/x86_64/syscallent1.h \
linux/x86_64/syscallent2.h \
linux/xtensa/ioctlent.h.in \
linux/xtensa/syscallent.h \
signalent.sh \
strace-graph \
strace-log-merge \
strace.spec \
syscallent.sh \
$(XLAT_INPUT_FILES) \
$(XLAT_HEADER_FILES) \
xlat/gen.sh \
xlate.el
.PHONY: srpm
srpm: dist-xz
rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
BUILT_SOURCES =
BUILT_SOURCES = .version
$(srcdir)/.version:
$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
today = $(shell date +%Y-%m-%d)
version_regexp = $(subst .,\.,$(VERSION))
news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))'
news-check: NEWS
$(AM_V_GEN)if head -1 $< | \
grep -x $(news_check_regexp) >/dev/null; then \
:; \
else \
echo >&2 '$<: check failed'; \
exit 1; \
fi
if MAINTAINER_MODE
gen_changelog_start_date = 2009-07-08 20:00
$(srcdir)/ChangeLog: $(top_srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
$(top_srcdir)/.git/refs/heads/*
$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
$(srcdir)/.version
@rm -f $@.new
(cd $(top_srcdir); \
./gitlog-to-changelog --since='$(gen_changelog_start_date)'; \
(cd $(srcdir); \
./gitlog-to-changelog --append-dot \
--since='$(gen_changelog_start_date)'; \
echo; echo; echo 'See ChangeLog-CVS for older changes.' \
) > $@.new
chmod 444 $@.new
mv -f $@.new $@
$(srcdir)/CREDITS: $(top_srcdir)/CREDITS.in $(top_srcdir)/.mailmap \
$(srcdir)/Makefile.in $(top_srcdir)/.git/refs/heads/*
$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
$(srcdir)/Makefile.in $(srcdir)/.version
$(AM_V_GEN) \
{ \
cd $(top_srcdir); \
( \
cd $(srcdir); \
sed '/^##/,$$d' CREDITS.in; \
{ sed -n '1,/^##>/d; s/ \+/\t/; s/^./&/p' CREDITS.in; \
git log --pretty=format:'%aN %aE'; \
} | LC_ALL=C sort -u \
| awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \
} > $@-t && mv $@-t $@
) > $@-t && mv $@-t $@
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
if LINUX
IOCTLDIR = /usr/include
IOCTLASM = asm
IOCTLSORT_INCLUDEDIR = $(IOCTLDIR)
ioctlent_h_in = linux/ioctlent.h.in
@ -139,16 +293,14 @@ BUILT_SOURCES += $(ioctlent_h_in)
$(srcdir)/$(ioctlent_h_in): ioctlsort
$(<D)/$(<F) > $@
ioctlsort: $(srcdir)/linux/ioctlsort.c ioctls.h ioctldefs.h
$(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLDIR) $(filter -I%,$(LINK.c)) \
$(filter-out -I%,$(LINK.c)) -I. -I$(IOCTLSORT_INCLUDEDIR) \
$(filter -I%,$(LINK.c)) \
-o $@ $<
ioctls.h: $(srcdir)/linux/ioctlent.sh
$(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
ioctldefs.h: ioctls.h ;
endif
endif
if LINUX
ioctlent_h = $(builddir)/$(OS)/ioctlent.h
BUILT_SOURCES += $(ioctlent_h)
@ -158,6 +310,5 @@ $(ioctlent_h): $(top_builddir)/config.status $(ioctlent_h_deps)
$(MKDIR_P) $(builddir)/$(OS)
cat $(ioctlent_h_deps) | \
$(COMPILE) -E -P - | \
LC_ALL=C sort -u -k3,3 -k2,2 > $@
endif
LC_ALL=C sort -u -k3,3 -k2,2 | \
awk -f $(srcdir)/linux/ioctlent-filter.awk > $@

183
NEWS
View File

@ -1,5 +1,176 @@
Noteworthy changes in release 4.6
=================================
Noteworthy changes in release 4.9 (2014-08-15)
==============================================
* Changes in behavior
* Disabled OABI support on ARM EABI systems by default,
added --enable-arm-oabi option to enable it at configure time.
* Improvements
* Added experimental -k option to print stack trace after each traced syscall.
* Added -w option to produce stats on syscall latency.
(addresses Debian bug #457497).
* Added ARC architecture support.
* Added PTRACE_GETREGS API support on PowerPC.
* Enhanced Bionic libc and musl libc support.
* Enhanced tracing of x86 personality processes on x86_64 and x32.
* Enhanced tracing of ARM personality processes on AArch64.
* Enhanced 32/64bit personality detection on PowerPC.
* Implemented decoding of add_key, ioprio_get, ioprio_set, kexec_load, keyctl,
renameat2, and request_key syscalls.
* Robustified decoding of select, pselect, and io_submit syscalls.
* Enhanced decoding of delete_module, fanotify_init, fanotify_mark, fcntl,
setdomainname, sethostname, setns, and sync_file_range syscalls.
* Enhanced decoding of signal bitmasks.
* Enhanced decoding of file descriptors.
* Enhanced siginfo_t decoding.
* Enhanced PF_NETLINK decoding.
* Updated CLOCK_* constants
(addresses Fedora bug #1088455).
* Added new syscall entries to match Linux 3.16.
* Bug fixes
* Added shmat and shmdt to the set of memory mapping related syscalls.
* Fixed detaching from stopped processes.
* Fixed fanotify_mark decoding on 32bit architectures.
* Fixed offset decoding in preadv and pwritev syscalls.
* Fixed select decoding for glibc in _FORTIFY_SOURCE mode.
* Fixed decoding of epoll_ctl syscall with EPOLL_CTL_DEL argument.
* Fixed build when <sys/ptrace.h> and <linux/ptrace.h> conflict
(addresses Fedora bug #993384).
* Miscellaneous corrections in the manual page.
(Addresses Debian bug #725987).
Noteworthy changes in release 4.8 (2013-06-03)
==============================================
* Changes in behavior
* In case of normal strace termination, when the trace output is
redirected to a pipe, strace now closes it and waits for the pipe
process termination before exit.
* Improvements
* Implemented tracing using PTRACE_SEIZE API (when available).
* Implemented more reliable PTRACE_GETREGSET-based process personality
detection on x86-64 and x32 (when available).
* Added -e trace=memory option for tracing memory mapping related syscalls.
* Documented -b option.
* Allowed exit status messages to be suppressed by giving -q option twice.
* Added AArch64 architecture support
(addresses Debian bug #693074 and Fedora bug #969858).
* Added support for OpenRISC 1000, Meta, and Xtensa architectures.
* Added tilegx personality support for Tile.
* Enhanced support of NOMMU architectures.
* Enhanced decoding of getdents, mmap, perf_event_open, ptrace, and
quotactl syscalls.
* Added new syscall entries to match Linux 3.9.
* Regenerated the list of common ioctl names from Linux 3.9.
* Updated the list of errno constants.
* Updated lists of AF_*, MADV_*, MAP_*, MSG_*, MS_*, PF_*, PR_*,
PTRACE_O_*, and TCP_* constants.
* Implemented decoding of UBI ioctls.
* Removed redundant "*32" ioctl names.
* Bug fixes
* Fixed ERESTARTNOINTR leaking to userspace on ancient kernels
(addresses Fedora bug #659382).
* Fixed kernel release string parsing
(addresses Debian bug #702309).
* Fixed decoding of *xattr syscalls
(addresses Fedora bug #885233).
* Fixed handling of files with 64-bit inode numbers by 32-bit strace
(addresses Fedora bug #912790).
* Fixed tracing forks on SPARC.
* Fixed decoding of fadvise64, fallocate, ftruncate64, io_submit, pread,
preadv, pwrite, pwritev, readahead, sigaltstack, sync_file_range, sysctl,
and truncate64 syscalls.
* Fixed categories of multiple syscalls on most of supported architectures.
* Fixed decoding of non-native 32-bit personality recv[m]msg syscalls.
* Fixed decoding of multiple 32-bit personality syscalls on x32.
* Fixed decoding of long long syscall arguments on ARM, MIPS/o32, PowerPC,
S390x, and Tile architectures.
* Fixed semtimedop decoding on S390x.
* Fixed sram_alloc decoding on Blackfin.
* Fixed build when process_vm_readv is a stab.
* Fixed build with older versions of libaio.h.
Noteworthy changes in release 4.7 (2012-05-02)
==============================================
* Changes in behavior
* strace no longer suspends waitpid until there is a child
for waitpid'ing process to collect status from.
* strace no longer detaches from a tracee which is supposed
to be going to die.
* strace now issues a new message: "+++ exited with EXITCODE +++"
which shows exact moment strace got exit notification,
analogous to existing "+++ killed by SIG +++" message.
* Improvements
* Added x32 personality support (x86_64 architecture).
* Added -y and -P options to print file descriptor paths and
filter by those paths.
* Added -I option to control strace interactivity.
* Allowed -p option to take comma or whitespace-separated list of PIDs.
* Added strace_log_merge script helper to merge timestamped "strace -ff"
log files.
* Implemented decoding of clock_adjtime, get_robust_list, migrate_pages,
preadv, prlimit64, process_vm_readv, process_vm_writev, pwritev,
recvmmsg, recvmsg, rt_tgsigqueueinfo, sendmmsg, setns, set_robust_list,
sched_rr_get_interval, splice, syslog, tee and vmsplice syscalls.
* Enhanced decoding of capget, capset, getrlimit, flistxattr, io_submit,
listxattr, setrlimit and swapon syscalls.
* Implemented decoding of loop and mtd ioctls.
* Added syscall entries for new linux syscalls.
* Added syscall entries for direct socket system calls on powerpc.
* Updated the list of errno constants.
* Updated lists of MSG_*, STA_*, and TCP_* constants.
* Regenerated the list of ioctl names from Linux 3.3.
* Enhanced switching between processes with different personalities.
* Enhanced signals reporting by using short signal names.
* Made ERESTART* messages more descriptive.
* Made parsing of numbers from strings more robust.
* Added support for compat_statfs64 and statfs64.f_flags.
* Changed read of data blocks to use single process_vm_readv syscall
(when available) instead of several PTRACE_PEEKDATA operations.
* Changed read of registers on x86 and x86-64 to use single PTRACE_GETREGS
operation instead of several PTRACE_PEEKUSER operations.
* Applied various optimizations to make strace work faster.
* Bug fixes
* Implemented proper handling of real SIGTRAPs on kernels supporting
PTRACE_O_TRACESYSGOOD.
(Addresses Fedora bug #162774).
* Fixed sockaddr_un.sun_path name in decoded output.
(Addresses Debian bug #554946).
* Fixed to avoid potential core file clobbering on exit.
(Addresses Debian bug #656398).
* Fixed a typo in documentation.
(Addresses Debian bug #653309).
* Fixed decoding of timer id returned by timer_create.
* Fixed epoll_create1, epoll_wait and epoll_pwait decoding.
* Fixed *at syscalls flags decoding.
* Fixed ARM EABI 64-bit syscall's arguments decoding.
* Fixed semtimedop decoding on s390.
* Fixed osf_sigprocmask decoding on alpha.
* Fixed ipc and socket subcall decoding on several architectures.
* Corrected syscall entries for epoll_pwait, epoll_create, epoll_ctl,
epoll_wait, mincore, mlockall, prctl, reboot, sendfile, sendfile64,
sendmsg, sgetmask, ssetmask, swapon, tgkill and tkill syscalls.
* Corrected io_* syscall entries on ARM.
* Fixed PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case.
* Fixed logging of unfinished lines in "strace -oLOG -ff" case.
* Fixed build when libaio-devel is not available.
* Fixed configure checks for PTRACE_* constants.
* Fixed compilation warnings remained on several architectures.
* Portability
* Removed all non-Linux code. After years of neglect, that dead code
just hampered further strace development.
* Linux kernel >= 2.6.18 is recommended. Older versions might still
work but they haven't been thoroughly tested with this release.
Noteworthy changes in release 4.6 (2011-03-15)
==============================================
* Changes in behavior
* Print diagnostic information about changes in personality mode to
@ -49,8 +220,8 @@ Noteworthy changes in release 4.6
* Fixed misleading italics in the manual page.
(Addresses Debian bug #589323).
Noteworthy changes in release 4.5.20
====================================
Noteworthy changes in release 4.5.20 (2010-04-13)
=================================================
* Improvements
* Implemented decoding of new linux syscalls: inotify_init1, recvmmsg.
@ -84,8 +255,8 @@ Noteworthy changes in release 4.5.20
(Addresses Debian bug #513014)
* Corrected handling of killed threads.
Noteworthy changes in release 4.5.19
====================================
Noteworthy changes in release 4.5.19 (2009-10-21)
=================================================
* Changes in behavior
* When command exits, strace now exits with the same exit status.

70
PORTING
View File

@ -1,70 +0,0 @@
I am frequently asked to port strace to a given platform. Less
frequently I am asked how one would go about porting strace to a given
platform. :-) Since I have ported strace to a few platforms already I
have some advice to the would-be strace porter.
The number one question is ``Does the native operating support a
concept which enables even the mere possibility of tracing?''. So far
I have seen two mechanisms which support system call tracing. They
are the SunOS originated feature of the PTRACE_SYSCALL argument to the
ptrace system call and the PIOCSENTRY/PIOCSEXIT ioctl for the /proc
filesystem under System V release 4 style Unix derived systems. There
may be others (surely a better one could be devised :-) but innovation
is a rare commodity so unless one of these is supported you may be
SOL.
Therefore the first step is to try `man 2 ptrace' and `man 4 proc' to
see if there is even a glimmer of hope. Without assistance from the
operating system, system call tracing is a lost cause. If there is a
native system call tracing program (however pathetic it might be :-),
you may be able to use it to trace itself to determine what mechanism
it is using for tracing the system calls of another process. If the
interface is documented you should be a happy camper. Otherwise,
unless you can tolerate the thought of many thankless hours
single-stepping in a debugger with little or nothing to show for it,
you should consider other tasks to distract you from your friends,
family, education, job, spouse and/or significant other.
If you have arrived here, your OS should have ptrace or proc or you
should have a high tolerance for pain. Then again, curious but
detached readers are invited to continue with little to risk but
boredom. If the mechanism is neither ptrace nor proc then examine how
it is intended to work and see how well it fits with what strace
already does. If it fits, fine, add a few more ifdefs. If there is a
gross mismatch, write a whole new event loop.
At this point you are responsible for determining three things: how is
the specific system call communicated, how are system call arguments
handled, and how is errno handled. These things can usually be
resolved in a day or two using a decent assembly level debugger and
some educated guesswork. For example, set a breakpoint on `read'.
Then disassemble the code and see where the arguments go. Do they go
on the stack? Do they go into registers? Some combination of the
two? Find the point where the transition from user mode to kernel
mode is made. Can you identify the arguments at this point? When the
call returns where does errno go? Into a specific register? Into a
global variable?
Next you need to determine how to decode numeric system call numbers
into system call names (syscallent.h), errno values into errno names
(errnoent.h) and ioctl values into ioctl names (ioctlent.h). Often
this fragile step can be accomplished by massaging system header files
with ad hoc shell scripts. Expect your scripts to break with every
dot rev of each OS release.
Finally, once you have the basic framework in which system calls and
their arguments can be decoded, you must do the dirty work of decoding
every useful call. Some may be similar or identical to like-named
calls in other operating systems. Go ahead and tweak what is there
to achieve what you want. If there is more difference than similarity,
then just write your own version of it using one of the existing
implementations for ideas.
The first order of decoding is the generation of suitable system call,
errno, ioctl and signal tables. Sample scripts are included to assist
with the generation of a first pass at these tables.
Good luck and feel free to contact me before and/or during any major
project.
Rick Sladkey <jrs@world.std.com>

26
README
View File

@ -1,31 +1,17 @@
This is strace 4.0, a system call tracer for SunOS 4.x, Linux, System
V release 4, Solaris 2.x and Irix 5.x. strace is released under a
Berkeley-style license at the request of Paul Kranenburg; see the file
COPYRIGHT for details.
This is strace, a system call tracer for Linux.
Read the INSTALL file for generic instructions on how to install
strace. If configure cannot guess your system configuration, you can
specify it on the command line after the other options like this:
strace is released under a Berkeley-style license at the request
of Paul Kranenburg; see the file COPYING for details.
./configure --prefix=/usr i486-linux
See the file CREDITS for a list of authors and other contributors.
A single sunos4.1 binary should work on all the sun4, sun4c and sun4m
kernel architectures. Let me know if sun4d doesn't work. Other
i486-*-sysv4 systems may work with little or no tweaking.
See the file INSTALL for compilation and installation instructions.
See the file NEWS for information on what has changed in recent
versions.
See the file PORTING if you like strace but it doesn't work on an
operating system you use frequently.
See the file CREDITS to see who has contributed to strace.
See the file TODO if you feel like helping out.
You can get the latest version of strace from its homepage at
http://sourceforge.net/projects/strace/ .
Please send bug reports and enhancements to the strace
mailinglist at strace-devel@lists.sourceforge.net, or directly to
Wichert Akkerman <wakkerma@debian.org>
mailinglist at strace-devel@lists.sourceforge.net.

View File

@ -1,26 +0,0 @@
Here's a preliminary port of strace to FreeBSD.
Here are some notes about it :
- This couldn't have been done without the sources of the truss
utility by Sean Eric Fagan, which were of great help.
- The tracing mecanism used by FreeBD is a lot like the SVR4 one, so
this port shares a lot of code with the SVR4 port, including the
akward event loop when tracing multiple processes.
- This works for i386 binaries, although support for alpha processor
should be quite straight forward, but I do not have an alpha to
test it on.
- Tracing linux binaries is not supported yet, but should be possible
with some work.
- There are some issues with following forks, and only a few FreeBSD
specific syscalls are decoded right now.
- This was tested on FreeBSD 4.0. I believe the tracing interface is
present since at least FreeBSD 3.0, so it "should" work on all
latest releases. I have no idea for other BSDs, though.
Ga<EFBFBD>l Roualland <gael.roualland@iname.com>

View File

@ -22,3 +22,10 @@ Each commit log should always start with a one-line summary, the second
line should be blank, and the remaining lines are usually ChangeLog-style
entries for all affected files, except the leading TABs which should
be omitted.
Documentation
=============
All noteworthy changes should be mentioned in NEWS. All changes in strace
command interface should be reflected in the man page. New options should
be documented both in -h output and in the man page.

542
README-linux-ptrace Normal file
View File

@ -0,0 +1,542 @@
This document describes Linux ptrace implementation in Linux kernels
version 3.0.0. (Update this notice if you update the document
to reflect newer kernels).
Ptrace userspace API.
Ptrace API (ab)uses standard Unix parent/child signaling over waitpid.
An unfortunate effect of it is that resulting API is complex and has
subtle quirks. This document aims to describe these quirks.
Debugged processes (tracees) first need to be attached to the debugging
process (tracer). Attachment and subsequent commands are per-thread: in
multi-threaded process, every thread can be individually attached to a
(potentially different) tracer, or left not attached and thus not
debugged. Therefore, "tracee" always means "(one) thread", never "a
(possibly multi-threaded) process". Ptrace commands are always sent to
a specific tracee using ptrace(PTRACE_foo, pid, ...), where pid is a
TID of the corresponding Linux thread.
After attachment, each tracee can be in two states: running or stopped.
There are many kinds of states when tracee is stopped, and in ptrace
discussions they are often conflated. Therefore, it is important to use
precise terms.
In this document, any stopped state in which tracee is ready to accept
ptrace commands from the tracer is called ptrace-stop. Ptrace-stops can
be further subdivided into signal-delivery-stop, group-stop,
syscall-stop and so on. They are described in detail later.
1.x Death under ptrace.
When a (possibly multi-threaded) process receives a killing signal (a
signal set to SIG_DFL and whose default action is to kill the process),
all threads exit. Tracees report their death to the tracer(s). This is
not a ptrace-stop (because tracer can't query tracee status such as
register contents, cannot restart tracee etc) but the notification
about this event is delivered through waitpid API similarly to
ptrace-stop.
Note that killing signal will first cause signal-delivery-stop (on one
tracee only), and only after it is injected by tracer (or after it was
dispatched to a thread which isn't traced), death from signal will
happen on ALL tracees within multi-threaded process.
SIGKILL operates similarly, with exceptions. No signal-delivery-stop is
generated for SIGKILL and therefore tracer can't suppress it. SIGKILL
kills even within syscalls (syscall-exit-stop is not generated prior to
death by SIGKILL). The net effect is that SIGKILL always kills the
process (all its threads), even if some threads of the process are
ptraced.
Tracer can kill a tracee with ptrace(PTRACE_KILL, pid, 0, 0). This
operation is deprecated, use kill/tgkill(SIGKILL) instead.
^^^ Oleg prefers to deprecate it instead of describing (and needing to
support) PTRACE_KILL's quirks.
When tracee executes exit syscall, it reports its death to its tracer.
Other threads are not affected.
When any thread executes exit_group syscall, every tracee in its thread
group reports its death to its tracer.
If PTRACE_O_TRACEEXIT option is on, PTRACE_EVENT_EXIT will happen
before actual death. This applies to exits on exit syscall, group_exit
syscall, signal deaths (except SIGKILL), and when threads are torn down
on execve in multi-threaded process.
Tracer cannot assume that ptrace-stopped tracee exists. There are many
scenarios when tracee may die while stopped (such as SIGKILL).
Therefore, tracer must always be prepared to handle ESRCH error on any
ptrace operation. Unfortunately, the same error is returned if tracee
exists but is not ptrace-stopped (for commands which require stopped
tracee), or if it is not traced by process which issued ptrace call.
Tracer needs to keep track of stopped/running state, and interpret
ESRCH as "tracee died unexpectedly" only if it knows that tracee has
been observed to enter ptrace-stop. Note that there is no guarantee
that waitpid(WNOHANG) will reliably report tracee's death status if
ptrace operation returned ESRCH. waitpid(WNOHANG) may return 0 instead.
IOW: tracee may be "not yet fully dead" but already refusing ptrace ops.
Tracer can not assume that tracee ALWAYS ends its life by reporting
WIFEXITED(status) or WIFSIGNALED(status).
??? or can it? Do we include such a promise into ptrace API?
1.x Stopped states.
When running tracee enters ptrace-stop, it notifies its tracer using
waitpid API. Tracer should use waitpid family of syscalls to wait for
tracee to stop. Most of this document assumes that tracer waits with:
pid = waitpid(pid_or_minus_1, &status, __WALL);
Ptrace-stopped tracees are reported as returns with pid > 0 and
WIFSTOPPED(status) == true.
??? Do we require __WALL usage, or will just using 0 be ok? Are the
rules different if user wants to use waitid? Will waitid require
WEXITED?
__WALL value does not include WSTOPPED and WEXITED bits, but implies
their functionality.
Setting of WCONTINUED bit in waitpid flags is not recommended: the
continued state is per-process and consuming it can confuse real parent
of the tracee.
Use of WNOHANG bit in waitpid flags may cause waitpid return 0 ("no
wait results available yet") even if tracer knows there should be a
notification. Example: kill(tracee, SIGKILL); waitpid(tracee, &status,
__WALL | WNOHANG);
??? waitid usage? WNOWAIT?
??? describe how wait notifications queue (or not queue)
The following kinds of ptrace-stops exist: signal-delivery-stops,
group-stop, PTRACE_EVENT stops, syscall-stops [, SINGLESTEP, SYSEMU,
SYSEMU_SINGLESTEP]. They all are reported as waitpid result with
WIFSTOPPED(status) == true. They may be differentiated by checking
(status >> 8) value, and if looking at (status >> 8) value doesn't
resolve ambiguity, by querying PTRACE_GETSIGINFO. (Note:
WSTOPSIG(status) macro returns ((status >> 8) & 0xff) value).
1.x.x Signal-delivery-stop
When (possibly multi-threaded) process receives any signal except
SIGKILL, kernel selects a thread which handles the signal (if signal is
generated with t[g]kill, thread selection is done by user). If selected
thread is traced, it enters signal-delivery-stop. By this point, signal
is not yet delivered to the process, and can be suppressed by tracer.
If tracer doesn't suppress the signal, it passes signal to tracee in
the next ptrace request. This second step of signal delivery is called
"signal injection" in this document. Note that if signal is blocked,
signal-delivery-stop doesn't happen until signal is unblocked, with the
usual exception that SIGSTOP can't be blocked.
Signal-delivery-stop is observed by tracer as waitpid returning with
WIFSTOPPED(status) == true, WSTOPSIG(status) == signal. If
WSTOPSIG(status) == SIGTRAP, this may be a different kind of
ptrace-stop - see "Syscall-stops" and "execve" sections below for
details. If WSTOPSIG(status) == stopping signal, this may be a
group-stop - see below.
1.x.x Signal injection and suppression.
After signal-delivery-stop is observed by tracer, tracer should restart
tracee with
ptrace(PTRACE_rest, pid, 0, sig)
call, where PTRACE_rest is one of the restarting ptrace ops. If sig is
0, then signal is not delivered. Otherwise, signal sig is delivered.
This operation is called "signal injection" in this document, to
distinguish it from signal-delivery-stop.
Note that sig value may be different from WSTOPSIG(status) value -
tracer can cause a different signal to be injected.
Note that suppressed signal still causes syscalls to return
prematurely. Kernel should always restart the syscall in this case:
tracer would observe a new syscall-enter-stop for the same syscall,
or, in case of syscalls returning ERESTART_RESTARTBLOCK,
tracer would observe a syscall-enter-stop for restart_syscall(2)
syscall. There may still be bugs in this area which cause some syscalls
to instead return with -EINTR even though no observable signal
was injected to the tracee.
This is a cause of confusion among ptrace users. One typical scenario
is that tracer observes group-stop, mistakes it for
signal-delivery-stop, restarts tracee with ptrace(PTRACE_rest, pid, 0,
stopsig) with the intention of injecting stopsig, but stopsig gets
ignored and tracee continues to run.
SIGCONT signal has a side effect of waking up (all threads of)
group-stopped process. This side effect happens before
signal-delivery-stop. Tracer can't suppress this side-effect (it can
only suppress signal injection, which only causes SIGCONT handler to
not be executed in the tracee, if such handler is installed). In fact,
waking up from group-stop may be followed by signal-delivery-stop for
signal(s) *other than* SIGCONT, if they were pending when SIGCONT was
delivered. IOW: SIGCONT may be not the first signal observed by the
tracee after it was sent.
Stopping signals cause (all threads of) process to enter group-stop.
This side effect happens after signal injection, and therefore can be
suppressed by tracer.
PTRACE_GETSIGINFO can be used to retrieve siginfo_t structure which
corresponds to delivered signal. PTRACE_SETSIGINFO may be used to
modify it. If PTRACE_SETSIGINFO has been used to alter siginfo_t,
si_signo field and sig parameter in restarting command must match,
otherwise the result is undefined.
1.x.x Group-stop
When a (possibly multi-threaded) process receives a stopping signal,
all threads stop. If some threads are traced, they enter a group-stop.
Note that stopping signal will first cause signal-delivery-stop (on one
tracee only), and only after it is injected by tracer (or after it was
dispatched to a thread which isn't traced), group-stop will be
initiated on ALL tracees within multi-threaded process. As usual, every
tracee reports its group-stop separately to corresponding tracer.
Group-stop is observed by tracer as waitpid returning with
WIFSTOPPED(status) == true, WSTOPSIG(status) == signal. The same result
is returned by some other classes of ptrace-stops, therefore the
recommended practice is to perform
ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)
call. The call can be avoided if signal number is not SIGSTOP, SIGTSTP,
SIGTTIN or SIGTTOU - only these four signals are stopping signals. If
tracer sees something else, it can't be group-stop. Otherwise, tracer
needs to call PTRACE_GETSIGINFO. If PTRACE_GETSIGINFO fails with
EINVAL, then it is definitely a group-stop. (Other failure codes are
possible, such as ESRCH "no such process" if SIGKILL killed the tracee).
As of kernel 2.6.38, after tracer sees tracee ptrace-stop and until it
restarts or kills it, tracee will not run, and will not send
notifications (except SIGKILL death) to tracer, even if tracer enters
into another waitpid call.
Currently, it causes a problem with transparent handling of stopping
signals: if tracer restarts tracee after group-stop, SIGSTOP is
effectively ignored: tracee doesn't remain stopped, it runs. If tracer
doesn't restart tracee before entering into next waitpid, future
SIGCONT will not be reported to the tracer. Which would make SIGCONT to
have no effect.
1.x.x PTRACE_EVENT stops
If tracer sets TRACE_O_TRACEfoo options, tracee will enter ptrace-stops
called PTRACE_EVENT stops.
PTRACE_EVENT stops are observed by tracer as waitpid returning with
WIFSTOPPED(status) == true, WSTOPSIG(status) == SIGTRAP. Additional bit
is set in a higher byte of status word: value ((status >> 8) & 0xffff)
will be (SIGTRAP | PTRACE_EVENT_foo << 8). The following events exist:
PTRACE_EVENT_VFORK - stop before return from vfork/clone+CLONE_VFORK.
When tracee is continued after this, it will wait for child to
exit/exec before continuing its execution (IOW: usual behavior on
vfork).
PTRACE_EVENT_FORK - stop before return from fork/clone+SIGCHLD
PTRACE_EVENT_CLONE - stop before return from clone
PTRACE_EVENT_VFORK_DONE - stop before return from
vfork/clone+CLONE_VFORK, but after vfork child unblocked this tracee by
exiting or exec'ing.
For all four stops described above: stop occurs in parent, not in newly
created thread. PTRACE_GETEVENTMSG can be used to retrieve new thread's
tid.
PTRACE_EVENT_EXEC - stop before return from exec.
PTRACE_EVENT_EXIT - stop before exit (including death from exit_group),
signal death, or exit caused by execve in multi-threaded process.
PTRACE_GETEVENTMSG returns exit status. Registers can be examined
(unlike when "real" exit happens). The tracee is still alive, it needs
to be PTRACE_CONTed or PTRACE_DETACHed to finish exit.
PTRACE_GETSIGINFO on PTRACE_EVENT stops returns si_signo = SIGTRAP,
si_code = (event << 8) | SIGTRAP.
1.x.x Syscall-stops
If tracee was restarted by PTRACE_SYSCALL, tracee enters
syscall-enter-stop just prior to entering any syscall. If tracer
restarts it with PTRACE_SYSCALL, tracee enters syscall-exit-stop when
syscall is finished, or if it is interrupted by a signal. (That is,
signal-delivery-stop never happens between syscall-enter-stop and
syscall-exit-stop, it happens *after* syscall-exit-stop).
Other possibilities are that tracee may stop in a PTRACE_EVENT stop,
exit (if it entered exit or exit_group syscall), be killed by SIGKILL,
or die silently (if execve syscall happened in another thread).
Syscall-enter-stop and syscall-exit-stop are observed by tracer as
waitpid returning with WIFSTOPPED(status) == true, WSTOPSIG(status) ==
SIGTRAP. If PTRACE_O_TRACESYSGOOD option was set by tracer, then
WSTOPSIG(status) == (SIGTRAP | 0x80).
Syscall-stops can be distinguished from signal-delivery-stop with
SIGTRAP by querying PTRACE_GETSIGINFO: si_code <= 0 if sent by usual
suspects like [tg]kill/sigqueue/etc; or = SI_KERNEL (0x80) if sent by
kernel, whereas syscall-stops have si_code = SIGTRAP or (SIGTRAP |
0x80). However, syscall-stops happen very often (twice per syscall),
and performing PTRACE_GETSIGINFO for every syscall-stop may be somewhat
expensive.
Some architectures allow to distinguish them by examining registers.
For example, on x86 rax = -ENOSYS in syscall-enter-stop. Since SIGTRAP
(like any other signal) always happens *after* syscall-exit-stop, and
at this point rax almost never contains -ENOSYS, SIGTRAP looks like
"syscall-stop which is not syscall-enter-stop", IOW: it looks like a
"stray syscall-exit-stop" and can be detected this way. But such
detection is fragile and is best avoided.
Using PTRACE_O_TRACESYSGOOD option is a recommended method, since it is
reliable and does not incur performance penalty.
Syscall-enter-stop and syscall-exit-stop are indistinguishable from
each other by tracer. Tracer needs to keep track of the sequence of
ptrace-stops in order to not misinterpret syscall-enter-stop as
syscall-exit-stop or vice versa. The rule is that syscall-enter-stop is
always followed by syscall-exit-stop, PTRACE_EVENT stop or tracee's
death - no other kinds of ptrace-stop can occur in between.
If after syscall-enter-stop tracer uses restarting command other than
PTRACE_SYSCALL, syscall-exit-stop is not generated.
PTRACE_GETSIGINFO on syscall-stops returns si_signo = SIGTRAP, si_code
= SIGTRAP or (SIGTRAP | 0x80).
1.x.x SINGLESTEP, SYSEMU, SYSEMU_SINGLESTEP
??? document PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP
1.x Informational and restarting ptrace commands.
Most ptrace commands (all except ATTACH, TRACEME, KILL) require tracee
to be in ptrace-stop, otherwise they fail with ESRCH.
When tracee is in ptrace-stop, tracer can read and write data to tracee
using informational commands. They leave tracee in ptrace-stopped state:
longv = ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);
ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);
ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);
ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);
ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);
ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);
ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);
ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);
Note that some errors are not reported. For example, setting siginfo
may have no effect in some ptrace-stops, yet the call may succeed
(return 0 and don't set errno).
ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags) affects one tracee.
Current flags are replaced. Flags are inherited by new tracees created
and "auto-attached" via active PTRACE_O_TRACE[V]FORK or
PTRACE_O_TRACECLONE options.
Another group of commands makes ptrace-stopped tracee run. They have
the form:
ptrace(PTRACE_cmd, pid, 0, sig);
where cmd is CONT, DETACH, SYSCALL, SINGLESTEP, SYSEMU, or
SYSEMU_SINGLESTEP. If tracee is in signal-delivery-stop, sig is the
signal to be injected. Otherwise, sig may be ignored.
1.x Attaching and detaching
A thread can be attached to tracer using ptrace(PTRACE_ATTACH, pid, 0,
0) call. This also sends SIGSTOP to this thread. If tracer wants this
SIGSTOP to have no effect, it needs to suppress it. Note that if other
signals are concurrently sent to this thread during attach, tracer may
see tracee enter signal-delivery-stop with other signal(s) first! The
usual practice is to reinject these signals until SIGSTOP is seen, then
suppress SIGSTOP injection. The design bug here is that attach and
concurrent SIGSTOP are racing and SIGSTOP may be lost.
??? Describe how to attach to a thread which is already group-stopped.
Since attaching sends SIGSTOP and tracer usually suppresses it, this
may cause stray EINTR return from the currently executing syscall in
the tracee, as described in "signal injection and suppression" section.
ptrace(PTRACE_TRACEME, 0, 0, 0) request turns current thread into a
tracee. It continues to run (doesn't enter ptrace-stop). A common
practice is to follow ptrace(PTRACE_TRACEME) with raise(SIGSTOP) and
allow parent (which is our tracer now) to observe our
signal-delivery-stop.
If PTRACE_O_TRACE[V]FORK or PTRACE_O_TRACECLONE options are in effect,
then children created by (vfork or clone(CLONE_VFORK)), (fork or
clone(SIGCHLD)) and (other kinds of clone) respectively are
automatically attached to the same tracer which traced their parent.
SIGSTOP is delivered to them, causing them to enter
signal-delivery-stop after they exit syscall which created them.
Detaching of tracee is performed by ptrace(PTRACE_DETACH, pid, 0, sig).
PTRACE_DETACH is a restarting operation, therefore it requires tracee
to be in ptrace-stop. If tracee is in signal-delivery-stop, signal can
be injected. Othervice, sig parameter may be silently ignored.
If tracee is running when tracer wants to detach it, the usual solution
is to send SIGSTOP (using tgkill, to make sure it goes to the correct
thread), wait for tracee to stop in signal-delivery-stop for SIGSTOP
and then detach it (suppressing SIGSTOP injection). Design bug is that
this can race with concurrent SIGSTOPs. Another complication is that
tracee may enter other ptrace-stops and needs to be restarted and
waited for again, until SIGSTOP is seen. Yet another complication is to
be sure that tracee is not already ptrace-stopped, because no signal
delivery happens while it is - not even SIGSTOP.
??? Describe how to detach from a group-stopped tracee so that it
doesn't run, but continues to wait for SIGCONT.
If tracer dies, all tracees are automatically detached and restarted,
unless they were in group-stop. Handling of restart from group-stop is
currently buggy, but "as planned" behavior is to leave tracee stopped
and waiting for SIGCONT. If tracee is restarted from
signal-delivery-stop, pending signal is injected.
1.x execve under ptrace.
During execve, kernel destroys all other threads in the process, and
resets execve'ing thread tid to tgid (process id). This looks very
confusing to tracers:
All other threads stop in PTRACE_EXIT stop, if requested by active
ptrace option. Then all other threads except thread group leader report
death as if they exited via exit syscall with exit code 0. Then
PTRACE_EVENT_EXEC stop happens, if requested by active ptrace option
(on which tracee - leader? execve-ing one?).
The execve-ing tracee changes its pid while it is in execve syscall.
(Remember, under ptrace 'pid' returned from waitpid, or fed into ptrace
calls, is tracee's tid). That is, pid is reset to process id, which
coincides with thread group leader tid.
If thread group leader has reported its death by this time, for tracer
this looks like dead thread leader "reappears from nowhere". If thread
group leader was still alive, for tracer this may look as if thread
group leader returns from a different syscall than it entered, or even
"returned from syscall even though it was not in any syscall". If
thread group leader was not traced (or was traced by a different
tracer), during execve it will appear as if it has become a tracee of
the tracer of execve'ing tracee. All these effects are the artifacts of
pid change.
PTRACE_O_TRACEEXEC option is the recommended tool for dealing with this
case. It enables PTRACE_EVENT_EXEC stop which occurs before execve
syscall return.
Pid change happens before PTRACE_EVENT_EXEC stop, not after.
When tracer receives PTRACE_EVENT_EXEC stop notification, it is
guaranteed that except this tracee and thread group leader, no other
threads from the process are alive.
On receiving this notification, tracer should clean up all its internal
data structures about all threads of this process, and retain only one
data structure, one which describes single still running tracee, with
pid = tgid = process id.
Currently, there is no way to retrieve former pid of execve-ing tracee.
If tracer doesn't keep track of its tracees' thread group relations, it
may be unable to know which tracee execve-ed and therefore no longer
exists under old pid due to pid change.
Example: two threads execve at the same time:
** we get syscall-entry-stop in thread 1: **
PID1 execve("/bin/foo", "foo" <unfinished ...>
** we issue PTRACE_SYSCALL for thread 1 **
** we get syscall-entry-stop in thread 2: **
PID2 execve("/bin/bar", "bar" <unfinished ...>
** we issue PTRACE_SYSCALL for thread 2 **
** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **
** we get syscall-exit-stop for PID0: **
PID0 <... execve resumed> ) = 0
In this situation there is no way to know which execve succeeded.
If PTRACE_O_TRACEEXEC option is NOT in effect for the execve'ing
tracee, kernel delivers an extra SIGTRAP to tracee after execve syscall
returns. This is an ordinary signal (similar to one which can be
generated by "kill -TRAP"), not a special kind of ptrace-stop.
GETSIGINFO on it has si_code = 0 (SI_USER). It can be blocked by signal
mask, and thus can happen (much) later.
Usually, tracer (for example, strace) would not want to show this extra
post-execve SIGTRAP signal to the user, and would suppress its delivery
to the tracee (if SIGTRAP is set to SIG_DFL, it is a killing signal).
However, determining *which* SIGTRAP to suppress is not easy. Setting
PTRACE_O_TRACEEXEC option and thus suppressing this extra SIGTRAP is
the recommended approach.
1.x Real parent
Ptrace API (ab)uses standard Unix parent/child signaling over waitpid.
This used to cause real parent of the process to stop receiving several
kinds of waitpid notifications when child process is traced by some
other process.
Many of these bugs have been fixed, but as of 2.6.38 several still
exist.
As of 2.6.38, the following is believed to work correctly:
- exit/death by signal is reported first to tracer, then, when tracer
consumes waitpid result, to real parent (to real parent only when the
whole multi-threaded process exits). If they are the same process, the
report is sent only once.
1.x Known bugs
Following bugs still exist:
Group-stop notifications are sent to tracer, but not to real parent.
Last confirmed on 2.6.38.6.
If thread group leader is traced and exits by calling exit syscall,
PTRACE_EVENT_EXIT stop will happen for it (if requested), but subsequent
WIFEXITED notification will not be delivered until all other threads
exit. As explained above, if one of other threads execve's, thread
group leader death will *never* be reported. If execve-ed thread is not
traced by this tracer, tracer will never know that execve happened.
??? need to test this scenario
One possible workaround is to detach thread group leader instead of
restarting it in this case. Last confirmed on 2.6.38.6.
SIGKILL signal may still cause PTRACE_EVENT_EXIT stop before actual
signal death. This may be changed in the future - SIGKILL is meant to
always immediately kill tasks even under ptrace. Last confirmed on
2.6.38.6.

View File

@ -1,85 +0,0 @@
========================================================================
This is the unmodified README from Paul Kranenburg's release of strace
for SunOS 4.1.x. Some of the notes and instructions are no longer valid
however the file has been retained for its historical value. -- jrs
========================================================================
/*
* @(#)README 2.4 92/01/21
*
* Copyright (C) 1991 Paul Kranenburg.
*
* Please send comments, enhancements or any other useful ideas to
* the address at the end of this file.
*
*/
strace(1) is a system call tracer for Sun(tm) systems much like the
Sun supplied program trace(1). strace(1) is a useful utility to sort
of debug programs for which no source is available which unfortunately
includes almost all of the Sun supplied system software.
Like trace(1), strace displays each system call and its arguments as it
is invoked by the traced process, but tries to do a better job of
decoding the arguments, displaying them in symbolic format whenever
possible. Passed structures/character arrays are read from the process'
address space and displayed in an appropriate format.
It is also possible to instruct strace to trace child processes as
they are created by the fork(2) system call. However, this is slightly
involved for two reasons: 1) the trace flag is cleared in the child
process by the fork system call, so we must make a special effort to
gain control of the child (see NOTES below), 2) our tracing manipulations
of the child may interfere with a possible wait(2) system call executed
by the (also traced) parent process. In this case we don't allow the parent
to continue until one of its children enters a state that may cause the
parent's wait(2) call to return.
NOTES.
o Not all system calls have been implemented yet as described
above (see dummy.h for a list), these calls only have their args
displayed as hex numbers.
o The program draws heavily on Sun's extensions to the ptrace(2)
system call.
o This release is based upon SunOS 4.1.1. The syscall list (syscall.h)
and ioctl's (ioctlent.m4) are probably most critically dependant
on the OS version (see also /sys/os/init_sysent.c).
You may have to edit `ioctlsort.c' and/or `ioctlent.m4' to get
`ioctlsort.c' to compile with your suite of system header files.
o The way in which child processes are caught and attached to after
the fork() call is Sparc-specific (in fact it has the looks of a
terrible hack). Also, this trick won't work with vfork(2).
Enhancements are sollicited for.
o Dynamically linked executables can be convinced to use the fork(2)
system call in stead of vfork(2) by modifying their (internal)
symbol table immediately after such a program is exec'ed. Be
warned that programs which depend on vfork's peculiar semantics
may not run as expected. Enable by the `-F' switch.
INSTALLATION.
Edit the paths in the Makefile to suit your local system.
Enter the usual make commands (`make debug' to enable the
compiler `-g' flag).
Not all sites have a complete set of include files, depending
on the selected software categories at OS install time. The
makefile tries to detect the presence of the Sunview category,
if other files are missing you may have to edit `ioctlent.h'.
COMMENTS TO:
P. Kranenburg
Department of Computer Science
Erasmus University Rotterdam
P.O. Box 1738
NL-3000 DR Rotterdam
e-mail: pk@cs.few.eur.nl

View File

@ -1,21 +0,0 @@
Even though SVR4 has truss, you may prefer using strace for a number
of reasons. Not the least of which are portability and source code.
The main event loop is awkward on systems for which procfs isn't
pollable. I think a pollable procfs is a Solaris invention so most SVR4
systems have this weakness. On Solaris, strace runs as a single
controlling process. This is a big improvement if you are debugging a
lot of processes at once.
There is no thread support but it wouldn't be very difficult to add it.
On UnixWare using the -f option to follow forked children sometimes shows
many "unfinished" system calls as strace bounces between each runnable child.
A crude workaround for this is available by adding
#define POLL_HACK 1
to the config.h file. This forces strace to check whether the last process
has finished a system call before polling other processes for events.
Wichert Akkerman <wakkerma@debian.org>

32
TODO
View File

@ -1,32 +0,0 @@
-- new entries from wta
* clone doesn't work; cloned processes can hang
* partially done: finish up change_syscall using new setargs
* do setargs for non-ia64
* generate syscallent.h from the kernel sources (asm/unistd.h)
* update linux/sparc syscall entries; Linux messed things up by overriding
all kinds of SunOS entries
* synchronize linux/**/syscallent.h, number of arguments for a syscal isn't
consistent across different architectures
-- old entries from jrs
attempt reopen of /proc file if we get EAGAIN from any /proc ioctl
kill procs we error out of on svr4
enclose "total x dents" in a comment
declare gettimeofday and pread for solaris2
update automatic remaking of autoconf targets
I don't like run on last close, change it?
parse long options?
count signals too with -c
treat attach, detach messages like signals
add pread, pwrite to I/O dumping
add system assist for qualifiers on svr4
change printcall to getcaller and fix for linux and svr4
fix fork hang for svr4 without pollable procfs
print events on entry to and revents on exit from poll
monitor procfs open and release the other child if the process wants to own it
fix incorrect syscall number if exit without entry on svr4 without pr_syscall
fix clean targets so config.h and config.status can be removed
ignore faults which occur before exec
look for more ioctls on solaris, used in nslookup for example
consider adding backtrace support
consider adding general purpose interpreter

376
aio.c Normal file
View File

@ -0,0 +1,376 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
* Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "defs.h"
/* --- Copied from libaio-0.3.109/src/libaio.h ---
* Why keep a copy instead of using external libaio.h?
* Because we want to properly decode 32-bit aio calls
* by 64-bit strace. For that, we need more definitions than
* libaio.h provides. (TODO).
* Keeping our local 32-bit compat defs in sync with libaio.h
* _without seeing libaio structs_ is hard/more bug-prone.
* A smaller benefit is that we don't need libaio installed.
*/
#define HAVE_LIBAIO_H 1
typedef enum io_iocb_cmd {
IO_CMD_PREAD = 0,
IO_CMD_PWRITE = 1,
IO_CMD_FSYNC = 2,
IO_CMD_FDSYNC = 3,
IO_CMD_POLL = 5, /* Never implemented in mainline, see io_prep_poll */
IO_CMD_NOOP = 6,
IO_CMD_PREADV = 7,
IO_CMD_PWRITEV = 8,
} io_iocb_cmd_t;
#if defined(__i386__) /* little endian, 32 bits */
#define PADDED(x, y) x; unsigned y
#define PADDEDptr(x, y) x; unsigned y
#define PADDEDul(x, y) unsigned long x; unsigned y
#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__)
#define PADDED(x, y) x, y
#define PADDEDptr(x, y) x
#define PADDEDul(x, y) unsigned long x
#elif defined(__powerpc64__) /* big endian, 64 bits */
#define PADDED(x, y) unsigned y; x
#define PADDEDptr(x,y) x
#define PADDEDul(x, y) unsigned long x
#elif defined(__PPC__) /* big endian, 32 bits */
#define PADDED(x, y) unsigned y; x
#define PADDEDptr(x, y) unsigned y; x
#define PADDEDul(x, y) unsigned y; unsigned long x
#elif defined(__s390x__) /* big endian, 64 bits */
#define PADDED(x, y) unsigned y; x
#define PADDEDptr(x,y) x
#define PADDEDul(x, y) unsigned long x
#elif defined(__s390__) /* big endian, 32 bits */
#define PADDED(x, y) unsigned y; x
#define PADDEDptr(x, y) unsigned y; x
#define PADDEDul(x, y) unsigned y; unsigned long x
#elif defined(__arm__)
# if defined (__ARMEB__) /* big endian, 32 bits */
#define PADDED(x, y) unsigned y; x
#define PADDEDptr(x, y) unsigned y; x
#define PADDEDul(x, y) unsigned y; unsigned long x
# else /* little endian, 32 bits */
#define PADDED(x, y) x; unsigned y
#define PADDEDptr(x, y) x; unsigned y
#define PADDEDul(x, y) unsigned long x; unsigned y
# endif
#else
# warning No AIO definitions for this architecture => no io_submit decoding
# undef HAVE_LIBAIO_H
#endif
#ifdef HAVE_LIBAIO_H
struct io_iocb_poll {
PADDED(int events, __pad1);
}; /* result code is the set of result flags or -'ve errno */
struct io_iocb_sockaddr {
struct sockaddr *addr;
int len;
}; /* result code is the length of the sockaddr, or -'ve errno */
struct io_iocb_common {
PADDEDptr(void *buf, __pad1);
PADDEDul(nbytes, __pad2);
long long offset;
long long __pad3;
unsigned flags;
unsigned resfd;
}; /* result code is the amount read or -'ve errno */
struct io_iocb_vector {
const struct iovec *vec;
int nr;
long long offset;
}; /* result code is the amount read or -'ve errno */
struct iocb {
PADDEDptr(void *data, __pad1); /* Return in the io completion event */
PADDED(unsigned key, __pad2); /* For use in identifying io requests */
short aio_lio_opcode;
short aio_reqprio;
int aio_fildes;
union {
struct io_iocb_common c;
struct io_iocb_vector v;
struct io_iocb_poll poll;
struct io_iocb_sockaddr saddr;
} u;
};
struct io_event {
PADDEDptr(void *data, __pad1);
PADDEDptr(struct iocb *obj, __pad2);
PADDEDul(res, __pad3);
PADDEDul(res2, __pad4);
};
#undef PADDED
#undef PADDEDptr
#undef PADDEDul
#endif /* HAVE_LIBAIO_H */
/* --- End of a chunk of libaio.h --- */
/* Not defined in libaio.h */
#ifndef IOCB_RESFD
# define IOCB_RESFD (1 << 0)
#endif
int
sys_io_setup(struct tcb *tcp)
{
if (entering(tcp))
tprintf("%ld, ", tcp->u_arg[0]);
else {
if (syserror(tcp))
tprintf("0x%0lx", tcp->u_arg[1]);
else {
unsigned long user_id;
if (umove(tcp, tcp->u_arg[1], &user_id) == 0)
tprintf("{%lu}", user_id);
else
tprints("{...}");
}
}
return 0;
}
int
sys_io_destroy(struct tcb *tcp)
{
if (entering(tcp))
tprintf("%lu", tcp->u_arg[0]);
return 0;
}
#ifdef HAVE_LIBAIO_H
enum iocb_sub {
SUB_NONE, SUB_COMMON, SUB_POLL, SUB_VECTOR
};
static enum iocb_sub
tprint_lio_opcode(unsigned cmd)
{
static const struct {
const char *name;
enum iocb_sub sub;
} cmds[] = {
{ "pread", SUB_COMMON },
{ "pwrite", SUB_COMMON },
{ "fsync", SUB_NONE },
{ "fdsync", SUB_NONE },
{ "op4", SUB_NONE },
{ "poll", SUB_POLL },
{ "noop", SUB_NONE },
{ "preadv", SUB_VECTOR },
{ "pwritev", SUB_VECTOR },
};
if (cmd < ARRAY_SIZE(cmds)) {
tprints(cmds[cmd].name);
return cmds[cmd].sub;
}
tprintf("%u /* SUB_??? */", cmd);
return SUB_NONE;
}
static void
print_common_flags(struct iocb *iocb)
{
if (iocb->u.c.flags & IOCB_RESFD)
tprintf(", resfd=%d", iocb->u.c.resfd);
if (iocb->u.c.flags & ~IOCB_RESFD)
tprintf(", flags=%x", iocb->u.c.flags);
}
#endif /* HAVE_LIBAIO_H */
int
sys_io_submit(struct tcb *tcp)
{
if (entering(tcp)) {
#ifdef HAVE_LIBAIO_H
long nr = tcp->u_arg[1];
/* if nr <= 0, we end up printing just "{}" */
tprintf("%lu, %ld, {", tcp->u_arg[0], tcp->u_arg[1]);
{
long i;
struct iocb **iocbs = (void *)tcp->u_arg[2];
//FIXME: decoding of 32-bit call by 64-bit strace
for (i = 0; i < nr; i++, iocbs++) {
enum iocb_sub sub;
struct iocb *iocbp;
struct iocb iocb;
if (i)
tprints(", ");
if (umove(tcp, (unsigned long)iocbs, &iocbp)) {
tprintf("%#lx", (unsigned long)iocbs);
/* No point in trying to read iocbs+1 etc */
/* (nr can be ridiculously large): */
break;
}
if (umove(tcp, (unsigned long)iocbp, &iocb)) {
tprintf("{%#lx}", (unsigned long)iocbp);
continue;
}
tprints("{");
if (iocb.data)
tprintf("data:%p, ", iocb.data);
if (iocb.key)
tprintf("key:%u, ", iocb.key);
sub = tprint_lio_opcode(iocb.aio_lio_opcode);
if (iocb.aio_reqprio)
tprintf(", reqprio:%d", iocb.aio_reqprio);
tprintf(", filedes:%d", iocb.aio_fildes);
switch (sub) {
case SUB_COMMON:
if (iocb.aio_lio_opcode == IO_CMD_PWRITE) {
tprints(", str:");
printstr(tcp, (unsigned long)iocb.u.c.buf,
iocb.u.c.nbytes);
} else
tprintf(", buf:%p", iocb.u.c.buf);
tprintf(", nbytes:%lu, offset:%lld",
iocb.u.c.nbytes,
iocb.u.c.offset);
print_common_flags(&iocb);
break;
case SUB_VECTOR:
tprintf(", %lld", iocb.u.v.offset);
print_common_flags(&iocb);
tprints(", ");
tprint_iov(tcp, iocb.u.v.nr,
(unsigned long)iocb.u.v.vec,
iocb.aio_lio_opcode == IO_CMD_PWRITEV
);
break;
case SUB_POLL:
tprintf(", %x", iocb.u.poll.events);
break;
case SUB_NONE:
break;
}
tprints("}");
}
}
tprints("}");
#else
tprintf("%lu, %ld, %#lx", tcp->u_arg[0], tcp->u_arg[1], tcp->u_arg[2]);
#endif
}
return 0;
}
int
sys_io_cancel(struct tcb *tcp)
{
if (entering(tcp)) {
#ifdef HAVE_LIBAIO_H
struct iocb iocb;
#endif
tprintf("%lu, ", tcp->u_arg[0]);
#ifdef HAVE_LIBAIO_H
if (umove(tcp, tcp->u_arg[1], &iocb) == 0) {
tprintf("{%p, %u, %u, %u, %d}, ",
iocb.data, iocb.key,
(unsigned)iocb.aio_lio_opcode,
(unsigned)iocb.aio_reqprio, iocb.aio_fildes);
} else
#endif
tprints("{...}, ");
} else {
if (tcp->u_rval < 0)
tprints("{...}");
else {
#ifdef HAVE_LIBAIO_H
struct io_event event;
if (umove(tcp, tcp->u_arg[2], &event) == 0)
tprintf("{%p, %p, %ld, %ld}",
event.data, event.obj,
event.res, event.res2);
else
#endif
tprints("{...}");
}
}
return 0;
}
int
sys_io_getevents(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%ld, %ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1],
tcp->u_arg[2]);
} else {
if (tcp->u_rval == 0) {
tprints("{}");
} else {
#ifdef HAVE_LIBAIO_H
struct io_event *events = (void *)tcp->u_arg[3];
long i, nr = tcp->u_rval;
for (i = 0; i < nr; i++, events++) {
struct io_event event;
if (i == 0)
tprints("{");
else
tprints(", ");
if (umove(tcp, (unsigned long)events, &event) != 0) {
tprints("{...}");
continue;
}
tprintf("{%p, %p, %ld, %ld}", event.data,
event.obj, event.res, event.res2);
}
tprints("}, ");
#else
tprints("{...}");
#endif
}
print_timespec(tcp, tcp->u_arg[4]);
}
return 0;
}

110
bjm.c
View File

@ -26,22 +26,15 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#include "defs.h"
#if defined(LINUX)
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/resource.h>
#include <sys/utsname.h>
#include <sys/user.h>
#include <sys/syscall.h>
#include <signal.h>
/* Bits of module.flags. */
@ -49,7 +42,7 @@
#define MOD_RUNNING 1
#define MOD_DELETED 2
#define MOD_AUTOCLEAN 4
#define MOD_VISITED 8
#define MOD_VISITED 8
#define MOD_USED_ONCE 16
#define MOD_JUST_FREED 32
#define MOD_INITIALIZING 64
@ -76,35 +69,18 @@ struct module_info
long usecount;
};
static const struct xlat which[] = {
{ 0, "0" },
{ QM_MODULES, "QM_MODULES" },
{ QM_DEPS, "QM_DEPS" },
{ QM_REFS, "QM_REFS" },
{ QM_SYMBOLS, "QM_SYMBOLS" },
{ QM_INFO, "QM_INFO" },
{ 0, NULL },
};
static const struct xlat modflags[] = {
{ MOD_UNINITIALIZED, "MOD_UNINITIALIZED" },
{ MOD_RUNNING, "MOD_RUNNING" },
{ MOD_DELETED, "MOD_DELETED" },
{ MOD_AUTOCLEAN, "MOD_AUTOCLEAN" },
{ MOD_VISITED, "MOD_VISITED" },
{ MOD_USED_ONCE, "MOD_USED_ONCE" },
{ MOD_JUST_FREED, "MOD_JUST_FREED" },
{ 0, NULL },
};
#include "xlat/qm_which.h"
#include "xlat/modflags.h"
#include "xlat/delete_module_flags.h"
int
sys_query_module(struct tcb *tcp)
{
if (entering(tcp)) {
printstr(tcp, tcp->u_arg[0], -1);
tprintf(", ");
printxval(which, tcp->u_arg[1], "QM_???");
tprintf(", ");
tprints(", ");
printxval(qm_which, tcp->u_arg[1], "QM_???");
tprints(", ");
} else {
size_t ret;
@ -122,11 +98,11 @@ sys_query_module(struct tcb *tcp)
printflags(modflags, mi.flags, "MOD_???");
tprintf(", usecount=%lu}, ", mi.usecount);
}
tprintf("%Zu", ret);
tprintf("%lu", (unsigned long)ret);
} else if ((tcp->u_arg[1]==QM_MODULES) ||
(tcp->u_arg[1]==QM_DEPS) ||
(tcp->u_arg[1]==QM_REFS)) {
tprintf("{");
tprints("{");
if (!abbrev(tcp)) {
char* data = malloc(tcp->u_arg[3]);
char* mod = data;
@ -134,13 +110,13 @@ sys_query_module(struct tcb *tcp)
if (!data) {
fprintf(stderr, "out of memory\n");
tprintf(" /* %Zu entries */ ", ret);
tprintf(" /* %lu entries */ ", (unsigned long)ret);
} else {
if (umoven(tcp, tcp->u_arg[2],
tcp->u_arg[3], data) < 0) {
tprintf(" /* %Zu entries */ ", ret);
tprintf(" /* %lu entries */ ", (unsigned long)ret);
} else {
for (idx=0; idx<ret; idx++) {
for (idx = 0; idx < ret; idx++) {
tprintf("%s%s",
(idx ? ", " : ""),
mod);
@ -150,10 +126,10 @@ sys_query_module(struct tcb *tcp)
free(data);
}
} else
tprintf(" /* %Zu entries */ ", ret);
tprintf("}, %Zu", ret);
tprintf(" /* %lu entries */ ", (unsigned long)ret);
tprintf("}, %lu", (unsigned long)ret);
} else if (tcp->u_arg[1]==QM_SYMBOLS) {
tprintf("{");
tprints("{");
if (!abbrev(tcp)) {
char* data = malloc(tcp->u_arg[3]);
struct module_symbol* sym = (struct module_symbol*)data;
@ -161,13 +137,13 @@ sys_query_module(struct tcb *tcp)
if (!data) {
fprintf(stderr, "out of memory\n");
tprintf(" /* %Zu entries */ ", ret);
tprintf(" /* %lu entries */ ", (unsigned long)ret);
} else {
if (umoven(tcp, tcp->u_arg[2],
tcp->u_arg[3], data) < 0) {
tprintf(" /* %Zu entries */ ", ret);
tprintf(" /* %lu entries */ ", (unsigned long)ret);
} else {
for (idx=0; idx<ret; idx++) {
for (idx = 0; idx < ret; idx++) {
tprintf("%s{name=%s, value=%lu}",
(idx ? " " : ""),
data+(long)sym->name,
@ -178,8 +154,8 @@ sys_query_module(struct tcb *tcp)
free(data);
}
} else
tprintf(" /* %Zu entries */ ", ret);
tprintf("}, %Zd", ret);
tprintf(" /* %lu entries */ ", (unsigned long)ret);
tprintf("}, %ld", (unsigned long)ret);
} else {
printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]);
tprintf(", %#lx", tcp->u_arg[4]);
@ -189,8 +165,7 @@ sys_query_module(struct tcb *tcp)
}
int
sys_create_module(tcp)
struct tcb *tcp;
sys_create_module(struct tcb *tcp)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
@ -200,14 +175,45 @@ struct tcb *tcp;
}
int
sys_init_module(tcp)
struct tcb *tcp;
sys_delete_module(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, ", tcp->u_arg[0]);
tprintf("%lu, ", tcp->u_arg[1]);
printstr(tcp, tcp->u_arg[0], -1);
tprints(", ");
printflags(delete_module_flags, tcp->u_arg[1], "O_???");
}
return 0;
}
int
sys_init_module(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
printstr(tcp, tcp->u_arg[2], -1);
}
return 0;
}
#endif /* LINUX */
#define MODULE_INIT_IGNORE_MODVERSIONS 1
#define MODULE_INIT_IGNORE_VERMAGIC 2
#include "xlat/module_init_flags.h"
int
sys_finit_module(struct tcb *tcp)
{
if (exiting(tcp))
return 0;
/* file descriptor */
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
/* param_values */
printstr(tcp, tcp->u_arg[1], -1);
tprints(", ");
/* flags */
printflags(module_init_flags, tcp->u_arg[2], "MODULE_INIT_???");
return 0;
}

36
block.c
View File

@ -26,9 +26,6 @@
*/
#include "defs.h"
#ifdef LINUX
#include <stdint.h>
#include <inttypes.h>
#include <linux/blkpg.h>
#include <linux/fs.h>
#include <linux/hdreg.h>
@ -54,7 +51,7 @@ struct blk_user_trace_setup {
#ifndef BLKTRACESTART
#define BLKTRACESTART _IO(0x12,116)
#endif
#ifndef BLKTRACESTART
#ifndef BLKTRACESTOP
#define BLKTRACESTOP _IO(0x12,117)
#endif
#ifndef BLKTRACETEARDOWN
@ -82,18 +79,14 @@ struct blk_user_trace_setup {
#define BLKSECDISCARD _IO(0x12,125)
#endif
static const struct xlat blkpg_ops[] = {
{ BLKPG_ADD_PARTITION, "BLKPG_ADD_PARTITION", },
{ BLKPG_DEL_PARTITION, "BLKPG_DEL_PARTITION", },
{ 0, NULL },
};
#include "xlat/blkpg_ops.h"
static void
print_blkpg_req(struct tcb *tcp, struct blkpg_ioctl_arg *blkpg)
{
struct blkpg_partition p;
tprintf("{");
tprints("{");
printxval(blkpg_ops, blkpg->op, "BLKPG_???");
tprintf(", flags=%d, datalen=%d, ",
@ -139,7 +132,7 @@ block_ioctl(struct tcb *tcp, long code, long arg)
if (syserror(tcp) || umove(tcp, arg, &val) < 0)
tprintf(", %#lx", arg);
else
tprintf(", %hu", val);
tprintf(", %u", (unsigned)val);
}
break;
@ -191,9 +184,10 @@ block_ioctl(struct tcb *tcp, long code, long arg)
tprintf(", %#lx", arg);
else
tprintf(", %lu", val);
}
}
break;
#ifdef HAVE_BLKGETSIZE64
/* return an uint64_t */
case BLKGETSIZE64:
if (exiting(tcp)) {
@ -204,6 +198,7 @@ block_ioctl(struct tcb *tcp, long code, long arg)
tprintf(", %" PRIu64, val);
}
break;
#endif
/* More complex types */
case BLKDISCARD:
@ -224,10 +219,12 @@ block_ioctl(struct tcb *tcp, long code, long arg)
if (syserror(tcp) || umove(tcp, arg, &geo) < 0)
tprintf(", %#lx", arg);
else
tprintf(", {heads=%hhu, sectors=%hhu, "
"cylinders=%hu, start=%lu}",
geo.heads, geo.sectors,
geo.cylinders, geo.start);
tprintf(", {heads=%u, sectors=%u, "
"cylinders=%u, start=%lu}",
(unsigned)geo.heads,
(unsigned)geo.sectors,
(unsigned)geo.cylinders,
geo.start);
}
break;
@ -237,7 +234,7 @@ block_ioctl(struct tcb *tcp, long code, long arg)
if (umove(tcp, arg, &blkpg) < 0)
tprintf(", %#lx", arg);
else {
tprintf(", ");
tprints(", ");
print_blkpg_req(tcp, &blkpg);
}
}
@ -249,10 +246,10 @@ block_ioctl(struct tcb *tcp, long code, long arg)
if (umove(tcp, arg, &buts) < 0)
tprintf(", %#lx", arg);
else
tprintf(", {act_mask=%hu, buf_size=%u, "
tprintf(", {act_mask=%u, buf_size=%u, "
"buf_nr=%u, start_lba=%" PRIu64 ", "
"end_lba=%" PRIu64 ", pid=%u}",
buts.act_mask, buts.buf_size,
(unsigned)buts.act_mask, buts.buf_size,
buts.buf_nr, buts.start_lba,
buts.end_lba, buts.pid);
}
@ -280,4 +277,3 @@ block_ioctl(struct tcb *tcp, long code, long arg)
};
return 1;
}
#endif /* LINUX */

3
bootstrap Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
./xlat/gen.sh
exec autoreconf -f -i "$@"

29
build_static_example.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh -e
BUILDFLAG=""
#BUILDFLAG="--build=i686"
#export CC="i686-gcc"
# -mpreferred-stack-boundary=2 can be used to prevent gcc 4.2.x
# from aligning stack to 16 bytes. (Which is gcc's way of supporting SSE).
# For me it saves about 6k of text segment.
# This may be unsafe if your libc expects 16 byte stack alignment
# on function entry.
export CC="x86_64-gcc"
export CFLAGS="-Os\
-fomit-frame-pointer\
-static\
-static-libgcc\
-ffunction-sections -fdata-sections\
-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1\
-fno-unwind-tables\
-fno-asynchronous-unwind-tables\
-Wl,--gc-sections\
-Wl,-Map=strace.mapfile\
"
./bootstrap
./configure $BUILDFLAG #--enable-maintainer-mode
make CC="$CC" CFLAGS="$CFLAGS"

View File

@ -1,46 +1,17 @@
dnl Process this file with autoconf to create configure. Use autoreconf.
AC_PREREQ(2.57)
AC_INIT([strace],[4.6])
AC_INIT([strace],
m4_esyscmd([./git-version-gen .tarball-version]),
[strace-devel@lists.sourceforge.net])
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([foreign check-news dist-xz no-dist-gzip silent-rules])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules parallel-tests])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_MSG_CHECKING([for supported operating system])
case "$host_os" in
*linux*)
opsys=linux
AC_DEFINE([LINUX], 1, [Define for the Linux operating system.])
;;
sunos4*)
opsys=sunos4
AC_DEFINE([SUNOS4], 1, [Define for the SunOS 4.x operating system.])
;;
solaris2* | sysv[[45]]* | irix[[56]]*)
opsys=svr4
AC_DEFINE([SVR4], 1, [Define for the System V release 4 operating
system or a derivative like Solaris 2.x or Irix 5.x.])
case "$host_os" in
sysv4.2uw*)
AC_DEFINE(UNIXWARE, 2, [Define for UnixWare systems.])
;;
sysv5*)
AC_DEFINE(UNIXWARE, 7, [Define for UnixWare systems.])
;;
esac
;;
freebsd*)
opsys=freebsd
AC_DEFINE([FREEBSD], 1, [Define for the FreeBSD operating system.])
;;
*)
AC_MSG_RESULT([NO!])
AC_MSG_ERROR([operating system $host_os is not supported by strace])
;;
esac
AC_MSG_RESULT($opsys)
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
AC_MSG_CHECKING([for supported architecture])
case "$host_cpu" in
@ -68,6 +39,10 @@ sparc*)
arch=sparc
AC_DEFINE([SPARC], 1, [Define for the SPARC architecture.])
;;
metag*)
arch=metag
AC_DEFINE([METAG], 1, [Define for the Meta architecture.])
;;
mips*)
arch=mips
AC_DEFINE([MIPS], 1, [Define for the MIPS architecture.])
@ -79,7 +54,11 @@ alpha*)
powerpc*)
arch=powerpc
AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.])
if test $host_cpu = powerpc64; then
AC_TRY_COMPILE(
[#ifndef __LP64__
# error 32 bit
#endif], [], ppc_bits=64, ppc_bits=32)
if test "$ppc_bits" = "64"; then
AC_DEFINE([POWERPC64], 1, [Define for the PowerPC64 architecture.])
fi
;;
@ -87,10 +66,18 @@ arm*)
arch=arm
AC_DEFINE([ARM], 1, [Define for the ARM architecture.])
;;
aarch64*)
arch=aarch64
AC_DEFINE([AARCH64], 1, [Define for the AArch64 architecture.])
;;
avr32*)
arch=avr32
AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
;;
arc*)
arch=arc
AC_DEFINE([ARC], 1, [Define for the ARC architecture.])
;;
s390)
arch=s390
AC_DEFINE([S390], 1, [Define for the S390 architecture.])
@ -112,8 +99,15 @@ sh*)
AC_DEFINE([SH], 1, [Define for the SH architecture.])
;;
x86?64*)
arch=x86_64
AC_DEFINE([X86_64], 1, [Define for the AMD x86-64 architecture.])
AC_TRY_COMPILE(
[#ifndef __ILP32__
# error not x32
#endif], [], arch=x32, arch=x86_64)
if test "$arch" = "x86_64"; then
AC_DEFINE([X86_64], 1, [Define for the 64bit AMD x86-64 architecture.])
else
AC_DEFINE([X32], 1, [Define for the 32bit AMD x86-64 architecture.])
fi
;;
cris|crisv10)
arch=crisv10
@ -131,6 +125,16 @@ microblaze*)
arch=microblaze
AC_DEFINE([MICROBLAZE], 1, [Define for the MicroBlaze architecture.])
;;
or1k*)
arch=or1k
AC_DEFINE([OR1K], 1, [Define for the OpenRISC 1000 architecture.])
;;
xtensa*)
arch=xtensa
AC_DEFINE([XTENSA], 1, [Define for the Xtensa architecture])
;;
*)
AC_MSG_RESULT([NO!])
AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
@ -138,50 +142,39 @@ microblaze*)
esac
AC_MSG_RESULT($arch)
AC_SUBST(opsys)
AC_SUBST(arch)
AM_CONDITIONAL([LINUX], [test x$opsys = xlinux])
AM_CONDITIONAL([I386], [test x$arch = xi386])
AM_CONDITIONAL([X86_64], [test x$arch = xx86_64])
AM_CONDITIONAL([SUNOS4], [test x$opsys = xsunos4])
AM_CONDITIONAL([SVR4], [test x$opsys = xsvr4])
AM_CONDITIONAL([FREEBSD], [test x$opsys = xfreebsd])
AC_PROG_CC
AC_GNU_SOURCE
AM_CONDITIONAL([X32], [test x$arch = xx32])
AC_INCLUDEDIR
if test "x$opsys" = "xsunos4" && test "x$arch" = "xsparc"
then
AC_MSG_CHECKING(for valid machine include directory)
if test -d "$includedir/sun4"
then
rm -f machine
ln -s $includedir/sun4 machine
AC_MSG_RESULT(yes)
AC_DEFINE(SUNOS4_KERNEL_ARCH_KLUDGE, 1, [
Define if you are have a SPARC with SUNOS4 and your want a version
of strace that will work on sun4, sun4c and sun4m kernel architectures.
Only useful if you have a symbolic link from machine to /usr/include/sun4
in the compilation directory.])
else
AC_MSG_RESULT(no)
fi
fi
AC_ARG_ENABLE([arm-oabi],
[AS_HELP_STRING([--enable-arm-oabi],
[enable OABI support on ARM EABI])],
[], [enable_arm_oabi=no])
case "$enable_arm_oabi" in
yes) enable_arm_oabi=1 ;;
no) enable_arm_oabi=0 ;;
*) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;;
esac
AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi],
[Define to 1 if you want OABI support on ARM EABI.])
gl_WARN_ADD([-Wall])
gl_WARN_ADD([-Wwrite-strings])
if test "x$opsys" = "xsunos4"
then
# SunOS 4.x header files don't declare int functions.
gl_WARN_ADD([-Wno-implicit])
fi
AC_ARG_ENABLE([gcc-Werror],
[AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])],
[case $enableval in
yes) gl_WARN_ADD([-Werror]) ;;
no) ;;
*) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;;
esac]
)
AC_SUBST([WARN_CFLAGS])
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_C_CONST
AC_C_BIGENDIAN
@ -189,14 +182,16 @@ AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_HEADER_DIRENT
AC_HEADER_STAT
AC_CHECK_MEMBERS([struct stat.st_blksize,
struct stat.st_blocks,
struct stat.st_aclcnt,
struct stat.st_flags,
struct stat.st_fstype,
struct stat.st_gen,
struct stat.st_level,
struct stat.st_rdev])
AC_CHECK_MEMBERS(m4_normalize([
struct stat.st_aclcnt,
struct stat.st_blksize,
struct stat.st_blocks,
struct stat.st_flags,
struct stat.st_fstype,
struct stat.st_gen,
struct stat.st_level,
struct stat.st_rdev
]))
AC_STAT64
AC_STATFS64
@ -210,114 +205,540 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
[#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>])
AC_CHECK_TYPES([long long])
AC_LITTLE_ENDIAN_LONG_LONG
AC_OFF_T_IS_LONG_LONG
AC_RLIM_T_IS_LONG_LONG
AC_CHECK_TYPES([struct opthdr],,, [#include <sys/socket.h>])
AC_CHECK_TYPES([struct t_opthdr],,, [#include <sys/tiuser.h>])
if test x$opsys != xlinux; then
AC_CHECK_LIB(nsl, main)
fi
AC_CHECK_FUNCS([ \
fork \
getdents \
if_indextoname \
inet_ntop \
mctl \
prctl \
pread \
sendmsg \
sigaction \
strerror \
strsignal \
sys_siglist \
_sys_siglist \
])
AC_CHECK_HEADERS([ \
inttypes.h \
ioctls.h \
libaio.h \
mqueue.h \
poll.h \
stropts.h \
termio.h \
sys/acl.h \
sys/aio.h \
sys/asynch.h \
sys/conf.h \
sys/door.h \
sys/epoll.h \
sys/filio.h \
sys/ioctl.h \
sys/nscsys.h \
sys/poll.h \
sys/ptrace.h \
sys/reg.h \
sys/stream.h \
sys/sysconfig.h \
sys/tihdr.h \
sys/tiuser.h \
sys/uio.h \
sys/vfs.h \
asm/cachectl.h \
asm/sysmips.h \
linux/capability.h \
linux/ptrace.h \
linux/utsname.h \
netinet/sctp.h \
], [], [])
AC_CHECK_FUNCS(m4_normalize([
fopen64
fork
fputs_unlocked
if_indextoname
inet_ntop
prctl
preadv
process_vm_readv
pwritev
sendmsg
sigaction
stpcpy
strerror
strsignal
]))
AC_CHECK_HEADERS(m4_normalize([
asm/cachectl.h
asm/sysmips.h
elf.h
inttypes.h
ioctls.h
linux/capability.h
linux/perf_event.h
linux/ptrace.h
linux/utsname.h
mqueue.h
netinet/sctp.h
poll.h
scsi/sg.h
stropts.h
sys/acl.h
sys/asynch.h
sys/conf.h
sys/epoll.h
sys/filio.h
sys/ioctl.h
sys/poll.h
sys/ptrace.h
sys/reg.h
sys/uio.h
sys/vfs.h
]))
AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
[], [], [#include <stddef.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>])
AC_CHECK_TYPES([struct sigcontext],,, [#include <signal.h>])
AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
AC_MP_PROCFS
AC_POLLABLE_PROCFS
AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>])
AC_STRUCT_PR_SYSCALL
AC_CHECK_MEMBERS([struct T_conn_res.QUEUE_ptr,
struct T_conn_res.ACCEPTOR_id],,,
[#include <sys/stream.h>
#include <sys/tihdr.h>])
AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>])
AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg],,,
AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,,
[#include <sys/ptrace.h>])
AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
AC_CHECK_MEMBERS([struct utsname.domainname],,, [#include <sys/utsname.h>])
AC_CHECK_MEMBERS([struct dqblk.dqb_curblocks],,, [#include <sys/quota.h>])
AC_CHECK_MEMBERS([struct sigcontext.sc_hi2],,, [#include <signal.h>
#ifdef HAVE_ASM_SIGCONTEXT_H
# include <asm/sigcontext.h>
#endif])
AC_CHECK_MEMBERS([struct sigevent._sigev_un._pad,
struct sigevent.__pad,
siginfo_t.si_syscall],,, [#include <signal.h>])
AC_CHECK_TYPES([struct flock64],,, [#include <fcntl.h>])
AC_CHECK_DECLS([sys_errlist])
AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>])
AC_CHECK_DECLS([\
PTRACE_SETOPTIONS, \
PTRACE_GETEVENTMSG, \
PTRACE_GETSIGINFO, \
PTRACE_O_TRACEFORK, \
PTRACE_O_TRACEVFORK, \
PTRACE_O_TRACECLONE, \
PTRACE_EVENT_FORK, \
PTRACE_EVENT_VFORK, \
PTRACE_EVENT_CLONE],,, [#include <sys/ptrace.h>])
AC_CHECK_DECLS(m4_normalize([
PTRACE_EVENT_CLONE,
PTRACE_EVENT_EXEC,
PTRACE_EVENT_EXIT,
PTRACE_EVENT_FORK,
PTRACE_EVENT_VFORK,
PTRACE_EVENT_VFORK_DONE,
PTRACE_GETEVENTMSG,
PTRACE_GETSIGINFO,
PTRACE_O_TRACECLONE,
PTRACE_O_TRACEEXEC,
PTRACE_O_TRACEEXIT,
PTRACE_O_TRACEFORK,
PTRACE_O_TRACESYSGOOD,
PTRACE_O_TRACEVFORK,
PTRACE_PEEKUSER,
PTRACE_POKEUSER,
PTRACE_SETOPTIONS
]),,, [#include <sys/ptrace.h>])
AC_CHECK_DECLS(m4_normalize([
P_PID,
P_PPID,
P_PGID,
P_SID,
P_CID,
P_UID,
P_GID,
P_ALL,
P_LWPID
]),,, [#include <sys/wait.h>])
AC_CHECK_DECLS(m4_normalize([
LO_FLAGS_READ_ONLY,
LO_FLAGS_AUTOCLEAR,
LO_FLAGS_PARTSCAN
]),,, [#include <linux/loop.h>])
AC_CHECK_DECLS(m4_normalize([
CTL_KERN,
CTL_VM,
CTL_NET,
CTL_PROC,
CTL_FS,
CTL_DEBUG,
CTL_DEV,
CTL_BUS,
CTL_ABI,
CTL_CPU,
CTL_ARLAN,
CTL_S390DBF,
CTL_SUNRPC,
CTL_PM,
CTL_FRV,
KERN_OSTYPE,
KERN_OSRELEASE,
KERN_OSREV,
KERN_VERSION,
KERN_SECUREMASK,
KERN_PROF,
KERN_NODENAME,
KERN_DOMAINNAME,
KERN_PANIC,
KERN_REALROOTDEV,
KERN_SPARC_REBOOT,
KERN_CTLALTDEL,
KERN_PRINTK,
KERN_NAMETRANS,
KERN_PPC_HTABRECLAIM,
KERN_PPC_ZEROPAGED,
KERN_PPC_POWERSAVE_NAP,
KERN_MODPROBE,
KERN_SG_BIG_BUFF,
KERN_ACCT,
KERN_PPC_L2CR,
KERN_RTSIGNR,
KERN_RTSIGMAX,
KERN_SHMMAX,
KERN_MSGMAX,
KERN_MSGMNB,
KERN_MSGPOOL,
KERN_SYSRQ,
KERN_MAX_THREADS,
KERN_RANDOM,
KERN_SHMALL,
KERN_MSGMNI,
KERN_SEM,
KERN_SPARC_STOP_A,
KERN_SHMMNI,
KERN_OVERFLOWUID,
KERN_OVERFLOWGID,
KERN_SHMPATH,
KERN_HOTPLUG,
KERN_IEEE_EMULATION_WARNINGS,
KERN_S390_USER_DEBUG_LOGGING,
KERN_CORE_USES_PID,
KERN_TAINTED,
KERN_CADPID,
KERN_PIDMAX,
KERN_CORE_PATTERN,
KERN_PANIC_ON_OOPS,
KERN_HPPA_PWRSW,
KERN_HPPA_UNALIGNED,
KERN_PRINTK_RATELIMIT,
KERN_PRINTK_RATELIMIT_BURST,
KERN_PTY,
KERN_NGROUPS_MAX,
KERN_SPARC_SCONS_PWROFF,
KERN_HZ_TIMER,
KERN_UNKNOWN_NMI_PANIC,
KERN_BOOTLOADER_TYPE,
KERN_RANDOMIZE,
KERN_SETUID_DUMPABLE,
KERN_SPIN_RETRY,
KERN_ACPI_VIDEO_FLAGS,
KERN_IA64_UNALIGNED,
KERN_COMPAT_LOG,
KERN_MAX_LOCK_DEPTH,
KERN_NMI_WATCHDOG,
KERN_PANIC_ON_NMI,
NET_CORE,
NET_ETHER,
NET_802,
NET_UNIX,
NET_IPV4,
NET_IPX,
NET_ATALK,
NET_NETROM,
NET_AX25,
NET_BRIDGE,
NET_ROSE,
NET_IPV6,
NET_X25,
NET_TR,
NET_DECNET,
NET_ECONET,
NET_SCTP,
NET_LLC,
NET_NETFILTER,
NET_DCCP,
NET_IRDA,
NET_CORE_WMEM_MAX,
NET_CORE_RMEM_MAX,
NET_CORE_WMEM_DEFAULT,
NET_CORE_RMEM_DEFAULT,
NET_CORE_DESTROY_DELAY,
NET_CORE_MAX_BACKLOG,
NET_CORE_FASTROUTE,
NET_CORE_MSG_COST,
NET_CORE_MSG_BURST,
NET_CORE_OPTMEM_MAX,
NET_CORE_HOT_LIST_LENGTH,
NET_CORE_DIVERT_VERSION,
NET_CORE_NO_CONG_THRESH,
NET_CORE_NO_CONG,
NET_CORE_LO_CONG,
NET_CORE_MOD_CONG,
NET_CORE_DEV_WEIGHT,
NET_CORE_SOMAXCONN,
NET_CORE_BUDGET,
NET_CORE_AEVENT_ETIME,
NET_CORE_AEVENT_RSEQTH,
NET_CORE_WARNINGS,
NET_IPV4_FORWARD,
NET_IPV4_DYNADDR,
NET_IPV4_CONF,
NET_IPV4_NEIGH,
NET_IPV4_ROUTE,
NET_IPV4_FIB_HASH,
NET_IPV4_NETFILTER,
NET_IPV4_TCP_TIMESTAMPS,
NET_IPV4_TCP_WINDOW_SCALING,
NET_IPV4_TCP_SACK,
NET_IPV4_TCP_RETRANS_COLLAPSE,
NET_IPV4_DEFAULT_TTL,
NET_IPV4_AUTOCONFIG,
NET_IPV4_NO_PMTU_DISC,
NET_IPV4_TCP_SYN_RETRIES,
NET_IPV4_IPFRAG_HIGH_THRESH,
NET_IPV4_IPFRAG_LOW_THRESH,
NET_IPV4_IPFRAG_TIME,
NET_IPV4_TCP_MAX_KA_PROBES,
NET_IPV4_TCP_KEEPALIVE_TIME,
NET_IPV4_TCP_KEEPALIVE_PROBES,
NET_IPV4_TCP_RETRIES1,
NET_IPV4_TCP_RETRIES2,
NET_IPV4_TCP_FIN_TIMEOUT,
NET_IPV4_IP_MASQ_DEBUG,
NET_TCP_SYNCOOKIES,
NET_TCP_STDURG,
NET_TCP_RFC1337,
NET_TCP_SYN_TAILDROP,
NET_TCP_MAX_SYN_BACKLOG,
NET_IPV4_LOCAL_PORT_RANGE,
NET_IPV4_ICMP_ECHO_IGNORE_ALL,
NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS,
NET_IPV4_ICMP_SOURCEQUENCH_RATE,
NET_IPV4_ICMP_DESTUNREACH_RATE,
NET_IPV4_ICMP_TIMEEXCEED_RATE,
NET_IPV4_ICMP_PARAMPROB_RATE,
NET_IPV4_ICMP_ECHOREPLY_RATE,
NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES,
NET_IPV4_IGMP_MAX_MEMBERSHIPS,
NET_TCP_TW_RECYCLE,
NET_IPV4_ALWAYS_DEFRAG,
NET_IPV4_TCP_KEEPALIVE_INTVL,
NET_IPV4_INET_PEER_THRESHOLD,
NET_IPV4_INET_PEER_MINTTL,
NET_IPV4_INET_PEER_MAXTTL,
NET_IPV4_INET_PEER_GC_MINTIME,
NET_IPV4_INET_PEER_GC_MAXTIME,
NET_TCP_ORPHAN_RETRIES,
NET_TCP_ABORT_ON_OVERFLOW,
NET_TCP_SYNACK_RETRIES,
NET_TCP_MAX_ORPHANS,
NET_TCP_MAX_TW_BUCKETS,
NET_TCP_FACK,
NET_TCP_REORDERING,
NET_TCP_ECN,
NET_TCP_DSACK,
NET_TCP_MEM,
NET_TCP_WMEM,
NET_TCP_RMEM,
NET_TCP_APP_WIN,
NET_TCP_ADV_WIN_SCALE,
NET_IPV4_NONLOCAL_BIND,
NET_IPV4_ICMP_RATELIMIT,
NET_IPV4_ICMP_RATEMASK,
NET_TCP_TW_REUSE,
NET_TCP_FRTO,
NET_TCP_LOW_LATENCY,
NET_IPV4_IPFRAG_SECRET_INTERVAL,
NET_IPV4_IGMP_MAX_MSF,
NET_TCP_NO_METRICS_SAVE,
NET_TCP_DEFAULT_WIN_SCALE,
NET_TCP_MODERATE_RCVBUF,
NET_TCP_TSO_WIN_DIVISOR,
NET_TCP_BIC_BETA,
NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
NET_TCP_CONG_CONTROL,
NET_TCP_ABC,
NET_IPV4_IPFRAG_MAX_DIST,
NET_TCP_MTU_PROBING,
NET_TCP_BASE_MSS,
NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS,
NET_TCP_DMA_COPYBREAK,
NET_TCP_SLOW_START_AFTER_IDLE,
NET_CIPSOV4_CACHE_ENABLE,
NET_CIPSOV4_CACHE_BUCKET_SIZE,
NET_CIPSOV4_RBM_OPTFMT,
NET_CIPSOV4_RBM_STRICTVALID,
NET_TCP_AVAIL_CONG_CONTROL,
NET_TCP_ALLOWED_CONG_CONTROL,
NET_TCP_MAX_SSTHRESH,
NET_TCP_FRTO_RESPONSE,
NET_IPV4_ROUTE_FLUSH,
NET_IPV4_ROUTE_MIN_DELAY,
NET_IPV4_ROUTE_MAX_DELAY,
NET_IPV4_ROUTE_GC_THRESH,
NET_IPV4_ROUTE_MAX_SIZE,
NET_IPV4_ROUTE_GC_MIN_INTERVAL,
NET_IPV4_ROUTE_GC_TIMEOUT,
NET_IPV4_ROUTE_GC_INTERVAL,
NET_IPV4_ROUTE_REDIRECT_LOAD,
NET_IPV4_ROUTE_REDIRECT_NUMBER,
NET_IPV4_ROUTE_REDIRECT_SILENCE,
NET_IPV4_ROUTE_ERROR_COST,
NET_IPV4_ROUTE_ERROR_BURST,
NET_IPV4_ROUTE_GC_ELASTICITY,
NET_IPV4_ROUTE_MTU_EXPIRES,
NET_IPV4_ROUTE_MIN_PMTU,
NET_IPV4_ROUTE_MIN_ADVMSS,
NET_IPV4_ROUTE_SECRET_INTERVAL,
NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS,
NET_IPV4_CONF_FORWARDING,
NET_IPV4_CONF_MC_FORWARDING,
NET_IPV4_CONF_PROXY_ARP,
NET_IPV4_CONF_ACCEPT_REDIRECTS,
NET_IPV4_CONF_SECURE_REDIRECTS,
NET_IPV4_CONF_SEND_REDIRECTS,
NET_IPV4_CONF_SHARED_MEDIA,
NET_IPV4_CONF_RP_FILTER,
NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE,
NET_IPV4_CONF_BOOTP_RELAY,
NET_IPV4_CONF_LOG_MARTIANS,
NET_IPV4_CONF_TAG,
NET_IPV4_CONF_ARPFILTER,
NET_IPV4_CONF_MEDIUM_ID,
NET_IPV4_CONF_NOXFRM,
NET_IPV4_CONF_NOPOLICY,
NET_IPV4_CONF_FORCE_IGMP_VERSION,
NET_IPV4_CONF_ARP_ANNOUNCE,
NET_IPV4_CONF_ARP_IGNORE,
NET_IPV4_CONF_PROMOTE_SECONDARIES,
NET_IPV4_CONF_ARP_ACCEPT,
NET_IPV4_CONF_ARP_NOTIFY,
NET_IPV6_CONF,
NET_IPV6_NEIGH,
NET_IPV6_ROUTE,
NET_IPV6_ICMP,
NET_IPV6_BINDV6ONLY,
NET_IPV6_IP6FRAG_HIGH_THRESH,
NET_IPV6_IP6FRAG_LOW_THRESH,
NET_IPV6_IP6FRAG_TIME,
NET_IPV6_IP6FRAG_SECRET_INTERVAL,
NET_IPV6_MLD_MAX_MSF,
NET_IPV6_ROUTE_FLUSH,
NET_IPV6_ROUTE_GC_THRESH,
NET_IPV6_ROUTE_MAX_SIZE,
NET_IPV6_ROUTE_GC_MIN_INTERVAL,
NET_IPV6_ROUTE_GC_TIMEOUT,
NET_IPV6_ROUTE_GC_INTERVAL,
NET_IPV6_ROUTE_GC_ELASTICITY,
NET_IPV6_ROUTE_MTU_EXPIRES,
NET_IPV6_ROUTE_MIN_ADVMSS,
NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS,
NET_UNIX_DESTROY_DELAY,
NET_UNIX_DELETE_DELAY,
NET_UNIX_MAX_DGRAM_QLEN,
VM_OVERCOMMIT_MEMORY,
VM_PAGE_CLUSTER,
VM_DIRTY_BACKGROUND,
VM_DIRTY_RATIO,
VM_DIRTY_WB_CS,
VM_DIRTY_EXPIRE_CS,
VM_NR_PDFLUSH_THREADS,
VM_OVERCOMMIT_RATIO,
VM_PAGEBUF,
VM_HUGETLB_PAGES,
VM_SWAPPINESS,
VM_LOWMEM_RESERVE_RATIO,
VM_MIN_FREE_KBYTES,
VM_MAX_MAP_COUNT,
VM_LAPTOP_MODE,
VM_BLOCK_DUMP,
VM_HUGETLB_GROUP,
VM_VFS_CACHE_PRESSURE,
VM_LEGACY_VA_LAYOUT,
VM_SWAP_TOKEN_TIMEOUT
]),,,
[#include <sys/types.h>
#include <linux/sysctl.h>])
AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <stdlib.h>
#include <linux/fs.h>], [return !BLKGETSIZE64;])],
[ac_cv_have_blkgetsize64=yes], [ac_cv_have_blkgetsize64=no])]
if test $ac_cv_have_blkgetsize64 = yes; then
AC_DEFINE([HAVE_BLKGETSIZE64], [1], [Define to 1 if you have BLKGETSIZE64.])
fi)
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([long long])
AC_CHECK_SIZEOF([off_t],,[#include <sys/types.h>])
AC_CACHE_CHECK([for SA_RESTORER], [st_cv_sa_restorer],
[st_cv_sa_restorer="$(echo SA_RESTORER |
$CPP $CPPFLAGS -P -imacros asm/signal.h - |
grep ^0x)"
test -n "$st_cv_sa_restorer" || st_cv_sa_restorer=no])
if test "x$st_cv_sa_restorer" != xno; then
AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_sa_restorer],
[SA_RESTORER defined in <asm/signal.h>])
fi
AC_CACHE_CHECK([for __builtin_popcount], [st_cv_have___builtin_popcount],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_popcount(0)])],
[st_cv_have___builtin_popcount=yes],
[st_cv_have___builtin_popcount=no])])
if test "x$st_cv_have___builtin_popcount" = xyes; then
AC_DEFINE([HAVE___BUILTIN_POPCOUNT], [1],
[Define to 1 if the system provides __builtin_popcount function])
fi
AC_PATH_PROG([PERL], [perl])
dnl stack trace with libunwind
libunwind_CPPFLAGS=
libunwind_LDFLAGS=
libunwind_LIBS=
AC_ARG_WITH([libunwind],
[AS_HELP_STRING([--with-libunwind],
[use libunwind to implement stack tracing support])],
[case "${withval}" in
yes|no|check) ;;
*) with_libunwind=yes
libunwind_CPPFLAGS="-I${withval}/include"
libunwind_LDFLAGS="-L${withval}/lib" ;;
esac],
[with_libunwind=check]
)
use_libunwind=no
AS_IF([test "x$with_libunwind" != xno],
[saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS"
AC_CHECK_HEADERS([libunwind-ptrace.h],
[saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $libunwind_LDFLAGS"
AC_CHECK_LIB([unwind], [backtrace],
[libunwind_LIBS="-lunwind $libunwind_LIBS"
AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic])
saved_LIBS="$LIBS"
LIBS="-lunwind-generic $libunwind_LIBS $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]],
[[return !unw_create_addr_space(0, 0)]])
],
[AC_MSG_RESULT([yes])
libunwind_LIBS="-lunwind-generic $libunwind_LIBS"
AC_CHECK_LIB([unwind-ptrace], [_UPT_create],
[libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS"
use_libunwind=yes
],
[if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace])
fi
],
[$libunwind_LIBS]
)
],
[AC_MSG_RESULT([no])
if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic])
fi
]
)
LIBS="$saved_LIBS"
],
[if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find libunwind])
fi
],
[$libunwind_LIBS]
)
LDFLAGS="$saved_LDFLAGS"
],
[if test "x$with_libunwind" != xcheck; then
AC_MSG_FAILURE([failed to find libunwind-ptrace.h])
fi
]
)
CPPFLAGS="$saved_CPPFLAGS"
]
)
dnl enable libunwind
AC_MSG_CHECKING([whether to enable stack tracing support using libunwind])
if test "x$use_libunwind" = xyes; then
AC_DEFINE([USE_LIBUNWIND], 1, [Compile stack tracing functionality])
AC_SUBST(libunwind_LIBS)
AC_SUBST(libunwind_LDFLAGS)
AC_SUBST(libunwind_CPPFLAGS)
fi
AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes])
AC_MSG_RESULT([$use_libunwind])
AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT

165
count.c
View File

@ -31,13 +31,13 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#include "defs.h"
/* Per-syscall stats structure */
struct call_counts {
/* time may be total latency or system time */
struct timeval time;
int calls, errors;
};
@ -47,35 +47,36 @@ static struct call_counts *countv[SUPPORTED_PERSONALITIES];
static struct timeval shortest = { 1000000, 0 };
int
count_syscall(struct tcb *tcp, struct timeval *tv)
void
count_syscall(struct tcb *tcp, const struct timeval *syscall_exiting_tv)
{
if (tcp->scno < 0 || tcp->scno >= nsyscalls)
return 0;
struct timeval wtv;
struct timeval *tv = &wtv;
struct call_counts *cc;
unsigned long scno = tcp->scno;
if (!counts)
{
if (!SCNO_IN_RANGE(scno))
return;
if (!counts) {
counts = calloc(nsyscalls, sizeof(*counts));
if (!counts)
{
fprintf(stderr,
"strace: out of memory for call counts\n");
exit(1);
}
die_out_of_memory();
}
cc = &counts[scno];
counts[tcp->scno].calls++;
cc->calls++;
if (tcp->u_error)
counts[tcp->scno].errors++;
cc->errors++;
tv_sub(tv, tv, &tcp->etime);
#ifdef LINUX
if (tv_cmp(tv, &tcp->dtime) > 0)
{
static struct timeval one_tick;
/* tv = wall clock time spent while in syscall */
tv_sub(tv, syscall_exiting_tv, &tcp->etime);
if (one_tick.tv_usec == 0)
{
/* Spent more wall clock time than spent system time? (usually yes) */
if (tv_cmp(tv, &tcp->dtime) > 0) {
static struct timeval one_tick = { -1, 0 };
if (one_tick.tv_sec == -1) {
/* Initialize it. */
struct itimerval it;
@ -84,24 +85,24 @@ count_syscall(struct tcb *tcp, struct timeval *tv)
setitimer(ITIMER_REAL, &it, NULL);
getitimer(ITIMER_REAL, &it);
one_tick = it.it_interval;
//FIXME: this hack doesn't work (tested on linux-3.6.11): one_tick = 0.000000
//tprintf(" one_tick.tv_usec:%u\n", (unsigned)one_tick.tv_usec);
}
if (tv_nz(&tcp->dtime))
*tv = tcp->dtime;
else if (tv_cmp(tv, &one_tick) > 0)
{
/* tv = system time spent, if it isn't 0 */
tv = &tcp->dtime;
else if (tv_cmp(tv, &one_tick) > 0) {
/* tv = smallest "sane" time interval */
if (tv_cmp(&shortest, &one_tick) < 0)
*tv = shortest;
tv = &shortest;
else
*tv = one_tick;
tv = &one_tick;
}
}
#endif /* LINUX */
if (tv_cmp(tv, &shortest) < 0)
shortest = *tv;
tv_add(&counts[tcp->scno].time, &counts[tcp->scno].time, tv);
return 0;
tv_add(&cc->time, &cc->time, count_wallclock ? &wtv : tv);
}
static int
@ -141,10 +142,8 @@ set_sortby(const char *sortby)
sortfun = syscall_cmp;
else if (strcmp(sortby, "nothing") == 0)
sortfun = NULL;
else
{
fprintf(stderr, "invalid sortby: `%s'\n", sortby);
exit(1);
else {
error_msg_and_die("invalid sortby: '%s'", sortby);
}
}
@ -157,28 +156,30 @@ void set_overhead(int n)
static void
call_summary_pers(FILE *outf)
{
int i, j;
int i;
int call_cum, error_cum;
struct timeval tv_cum, dtv;
double float_tv_cum;
double percent;
const char *dashes = "-------------------------";
char error_str[16];
int *sorted_count = calloc(sizeof(int), nsyscalls);
const char *dashes = "----------------";
char error_str[sizeof(int)*3];
int *sorted_count;
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n",
"% time", "seconds", "usecs/call",
"calls", "errors", "syscall");
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n",
dashes, dashes, dashes, dashes, dashes, dashes);
sorted_count = calloc(sizeof(int), nsyscalls);
if (!sorted_count)
{
fprintf(stderr, "strace: out of memory for call summary\n");
return;
}
die_out_of_memory();
call_cum = error_cum = tv_cum.tv_sec = tv_cum.tv_usec = 0;
if (overhead.tv_sec == -1)
{
if (overhead.tv_sec == -1) {
tv_mul(&overhead, &shortest, 8);
tv_div(&overhead, &overhead, 10);
}
for (i = 0; i < nsyscalls; i++)
{
for (i = 0; i < nsyscalls; i++) {
sorted_count[i] = i;
if (counts == NULL || counts[i].calls == 0)
continue;
@ -188,54 +189,50 @@ call_summary_pers(FILE *outf)
error_cum += counts[i].errors;
tv_add(&tv_cum, &tv_cum, &counts[i].time);
}
if (counts && sortfun)
qsort((void *) sorted_count, nsyscalls, sizeof(int), sortfun);
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n",
"% time", "seconds", "usecs/call",
"calls", "errors", "syscall");
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %-16.16s\n",
dashes, dashes, dashes, dashes, dashes, dashes);
if (counts)
{
for (i = 0; i < nsyscalls; i++)
{
j = sorted_count[i];
if (counts[j].calls == 0)
float_tv_cum = tv_float(&tv_cum);
if (counts) {
if (sortfun)
qsort((void *) sorted_count, nsyscalls, sizeof(int), sortfun);
for (i = 0; i < nsyscalls; i++) {
double float_syscall_time;
int idx = sorted_count[i];
struct call_counts *cc = &counts[idx];
if (cc->calls == 0)
continue;
tv_div(&dtv, &counts[j].time, counts[j].calls);
if (counts[j].errors)
sprintf(error_str, "%d", counts[j].errors);
else
error_str[0] = '\0';
percent = (100.0 * tv_float(&counts[j].time)
/ tv_float(&tv_cum));
fprintf(outf, "%6.2f %11.6f %11ld %9d %9.9s %s\n",
percent, tv_float(&counts[j].time),
(long) 1000000 * dtv.tv_sec + dtv.tv_usec,
counts[j].calls,
error_str, sysent[j].sys_name);
tv_div(&dtv, &cc->time, cc->calls);
error_str[0] = '\0';
if (cc->errors)
sprintf(error_str, "%u", cc->errors);
float_syscall_time = tv_float(&cc->time);
percent = (100.0 * float_syscall_time);
if (percent != 0.0)
percent /= float_tv_cum;
/* else: float_tv_cum can be 0.0 too and we get 0/0 = NAN */
fprintf(outf, "%6.2f %11.6f %11lu %9u %9.9s %s\n",
percent, float_syscall_time,
(long) (1000000 * dtv.tv_sec + dtv.tv_usec),
cc->calls,
error_str, sysent[idx].sys_name);
}
}
free(sorted_count);
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %-16.16s\n",
fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %s\n",
dashes, dashes, dashes, dashes, dashes, dashes);
error_str[0] = '\0';
if (error_cum)
sprintf(error_str, "%d", error_cum);
else
error_str[0] = '\0';
fprintf(outf, "%6.6s %11.6f %11.11s %9d %9.9s %s\n",
"100.00", tv_float(&tv_cum), "",
sprintf(error_str, "%u", error_cum);
fprintf(outf, "%6.6s %11.6f %11.11s %9u %9.9s %s\n",
"100.00", float_tv_cum, "",
call_cum, error_str, "total");
}
void
call_summary(FILE *outf)
{
int i, old_pers = current_personality;
int i, old_pers = current_personality;
for (i = 0; i < SUPPORTED_PERSONALITIES; ++i)
{
for (i = 0; i < SUPPORTED_PERSONALITIES; ++i) {
if (!countv[i])
continue;
@ -243,8 +240,8 @@ call_summary(FILE *outf)
set_personality(i);
if (i)
fprintf(outf,
"System call usage summary for %u bit mode:\n",
personality_wordsize[current_personality] * 8);
"System call usage summary for %d bit mode:\n",
current_wordsize * 8);
call_summary_pers(outf);
}

94
debian/changelog vendored
View File

@ -1,6 +1,50 @@
strace (4.6-1) unstable; urgency=low
strace (4.9-1) experimental; urgency=low
* New upstream version.
+ added -w option to produce stats on syscall latency, closes: #457497
+ applied miscellaneous corrections to the manpage, closes: #725987
+ fixed a typo in package description, closes: #697625
+ enabled or1k build, closes: #742235
+ enabled maximum security hardening, thanks to Markus <waldeck@gmx.de>
-- Dmitry V. Levin <ldv@altlinux.org> Fri, 15 Aug 2014 13:14:15 +0000
strace (4.8-1.1) unstable; urgency=low
* NMU
* Uploading 4.8 to unstable to fix long-standing bugs that have been
fixed for ages in experimental only.
* enable arm64 build, Closes: #749956
* enable x32 build, Closes: #727018
* lintian-inspired fixes:
+ add build-arch and build-indep targets in debian/rules
+ update standards-version to 3.9.5
+ remove ancient changelog entries causing syntax checker errors
+ add hardening using buildflags.mk
+ trivial changes to Description: fields
-- Steve McIntyre <93sam@debian.org> Thu, 10 Jul 2014 14:22:18 +0000
strace (4.8-1) experimental; urgency=low
* New upstream version.
+ Added aarch64 support, closes: #693074
+ Fixed kernel release string parsing, closes: #702309
-- Dmitry V. Levin <ldv@altlinux.org> Mon, 03 Jun 2013 15:16:17 +0000
strace (4.7-1) experimental; urgency=low
[ Dmitry V. Levin ]
* New upstream version.
+ Fixed sockaddr_un.sun_path name in decoded output, closes: #554946
+ Avoid potential core file clobbering on exit, closes: #656398
+ Fixed a typo in documentation, closes: #653309
-- Frederik Schüler <fs@debian.org> Tue, 12 Feb 2013 10:35:22 +0100
strace (4.6-1) unstable; urgency=low
* New upstream version.
+ Added HDIO_* ioctl names, closes: #450953
+ Fixed stat64 decoding on mips, closes: #599028
@ -8,6 +52,27 @@ strace (4.6-1) unstable; urgency=low
-- Dmitry V. Levin <ldv@altlinux.org> Mon, 14 Mar 2011 15:16:17 +0000
strace (4.5.20-2.3) unstable; urgency=low
* Non-maintainer upload.
* Add sh4 to arch list.
* Add powerpcspe to arch list (Closes: #579842).
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Tue, 22 Mar 2011 09:03:49 +0900
strace (4.5.20-2.2) unstable; urgency=low
* Non-maintainer upload.
* Add sh4 to arch list (Closes: #537105).
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Wed, 09 Mar 2011 09:22:01 +0900
strace (4.5.20-2.1) unstable; urgency=low
* NMU, added armhf support. (Closes: #596960)
-- Konstantinos Margaritis <markos@debian.org> Thu, 24 Feb 2011 14:47:54 +0000
strace (4.5.20-2) unstable; urgency=low
* Add missing sparc syscall defines to fix FTBFS on sparc.
@ -490,7 +555,7 @@ strace (4.2-2) frozen unstable; urgency=low
-- Wichert Akkerman <wakkerma@debian.org> Thu, 27 Jan 2000 03:22:55 +0100
strace (4.2-1) frozen unstable; urgency=low
strace (4.2-1) frozen unstable; urgency=low
* New upstream version:
+ Builds correctly on glibc2.0 again, Closes: Bug# 51648
@ -675,14 +740,14 @@ strace (3.1-12) unstable; urgency=low
-- Wichert Akkerman <wakkerma@debian.org> Mon, 6 Oct 1997 15:42:25 +0200
strace (3.1-11) unstable; urgency=LOW
strace (3.1-11) unstable; urgency=low
* Ported to libc6 / glibc2 (Bug# 11729)
* Compress manpage
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Fri, 1 Aug 1997 00:13:38 +02
strace (3.1-10) unstable; urgency=LOW
strace (3.1-10) unstable; urgency=low
* Install upstream changelog
* Added dependencies to control file for libc
@ -690,7 +755,7 @@ strace (3.1-10) unstable; urgency=LOW
-- Wichert Akkerman <wakkerma@debian.org> Fri, 11 Jul 1997 12:26:12 +0200
strace (3.1-9) stable; urgency=LOW
strace (3.1-9) stable; urgency=low
* Fixed bug with hanging children. Patch by Matthias Urlichs
* Added some more constants to net.c.
@ -698,25 +763,26 @@ strace (3.1-9) stable; urgency=LOW
-- Wichert Akkerman <wakkerma@debian.org> Mon, 21 Apr 1997 11:59:45 +0200
strace (3.1-8) frozen unstable; urgency=LOW
strace (3.1-8) frozen unstable; urgency=low
* Added detection of ROSE networking
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Tue, 12 Nov 1996 22:21:22 +0100
strace (3.1-7) stable; urgency=LOW
strace (3.1-7) stable; urgency=low
* Install manpage with correct mode (0644) (Bug#4813)
* Renamed debian changelog to changelog.Debian
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Sat, 26 Oct 1996 18:15:41 +0200
strace (3.1-6) stable; urgency=LOW
strace (3.1-6) stable; urgency=low
* Small patch for compilation on kernels 2.1.0 and later (see signal.c)
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Fri, 18 Oct 1996 00:28:47 +0200
strace (3.1-5) stable unstable; urgency=LOW
strace (3.1-5) stable unstable; urgency=low
* Moved to new packagingformat
* Fixed umoven bug (Bug# 4523)
@ -724,21 +790,20 @@ strace (3.1-5) stable unstable; urgency=LOW
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Sat, 23 Sep 1996 23:33:58 +0200
strace (3.1-4) unstable; urgency=LOW
strace (3.1-4) unstable; urgency=low
* Fixed changestemplate
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>, Thu Sep 12 14:59:44 MET DST 1996
strace (3.1-3) unstable; priority=LOW
strace (3.1-3) unstable; urgency=low
* Revamped debian files
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>, Thu Jul 11 20:19:11 MET DST 1996
strace (3.1-2) unstable; priority=LOW
strace (3.1-2) unstable; urgency=low
* Added some #ifdef's around IPX stuff to make it compilable on non-Linux
systems.
* changed debian.control and debian.rules to conform to new debian naming
@ -747,8 +812,7 @@ strace (3.1-2) unstable; priority=LOW
-- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>
strace (3.1-1) unstable; priority=LOW
strace (3.1-1) unstable; urgency=low
* Moved to new upstream version
* added more protocol families to domains

16
debian/control vendored
View File

@ -2,14 +2,14 @@ Source: strace
Maintainer: Frederik Schüler <fs@debian.org>
Section: utils
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), coreutils (>= 7.0), time
Standards-Version: 3.8.4
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.9.5
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 sparc64
Architecture: alpha amd64 arm64 armeb armel armhf hppa i386 ia64 m68k mips mipsel or1k powerpc powerpcspe ppc64 s390 s390x sh4 sparc sparc64 x32
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A system call tracer
Description: 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.
The program to be traced need not be recompiled for this, so you can
@ -23,13 +23,13 @@ Package: strace64
Architecture: i386 powerpc s390 sparc
Priority: extra
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A system call tracer for 64bit binaries
Description: 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.
The program to be traced need not be recompiled for this, so you can
use it on binaries for which you don't have source.
.
This package containts the 64bit version of the binary, intended for
This package contains the 64bit version of the binary, intended for
biarch systems with 32bit userland and 64bit kernel.
.
System calls and signals are events that happen at the user/kernel
@ -40,9 +40,9 @@ 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 sparc64
Architecture: alpha amd64 arm64 armeb armel armhf hppa i386 ia64 m68k mips mipsel or1k powerpc powerpcspe ppc64 s390 sh4 sparc sparc64 x32
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A system call tracer
Description: 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.
The program to be traced need not be recompiled for this, so you can

2
debian/copyright vendored
View File

@ -37,5 +37,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
$Id$

13
debian/rules vendored
View File

@ -2,7 +2,11 @@
#export DH_VERBOSE=1
CFLAGS = -Wall -g
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS += -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
@ -33,7 +37,12 @@ else
CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
all build: build-stamp $(extra_build_targets)
all: build
build: build-arch build-indep
build-arch: build-stamp $(extra_build_targets)
build-indep: build-stamp $(extra_build_targets)
%-stamp: %/Makefile
$(MAKE) -C $*

1
debian/strace.docs vendored
View File

@ -1,2 +1 @@
TODO
NEWS

1185
defs.h

File diff suppressed because it is too large Load Diff

791
desc.c

File diff suppressed because it is too large Load Diff

View File

@ -23,8 +23,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
awk '
/^#define[ ]+E[A-Z0-9_]+[ ]+[0-9]+/ {

50
fanotify.c Normal file
View File

@ -0,0 +1,50 @@
#include "defs.h"
#include <linux/fanotify.h>
#include "xlat/fan_classes.h"
#include "xlat/fan_init_flags.h"
int
sys_fanotify_init(struct tcb *tcp)
{
unsigned flags;
if (exiting(tcp))
return 0;
flags = tcp->u_arg[0];
printxval(fan_classes, flags & FAN_ALL_CLASS_BITS, "FAN_CLASS_???");
flags &= ~FAN_ALL_CLASS_BITS;
if (flags) {
tprints("|");
printflags(fan_init_flags, flags, "FAN_???");
}
tprints(", ");
tprint_open_modes((unsigned) tcp->u_arg[1]);
return 0;
}
#include "xlat/fan_mark_flags.h"
#include "xlat/fan_event_flags.h"
int
sys_fanotify_mark(struct tcb *tcp)
{
if (exiting(tcp))
return 0;
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
printflags(fan_mark_flags, (unsigned) tcp->u_arg[1], "FAN_MARK_???");
tprints(", ");
printflags(fan_event_flags, tcp->u_arg[2], "FAN_???");
tprints(", ");
if ((int) tcp->u_arg[3] == FAN_NOFD)
tprints("FAN_NOFD, ");
else
print_dirfd(tcp, tcp->u_arg[3]);
printpath(tcp, tcp->u_arg[4]);
return 0;
}

1773
file.c

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +0,0 @@
# Automake input for freebsd/i386/ subdirectory of strace.
noinst_HEADERS = errnoent.h ioctlent.h signalent.h syscallent.h syscall.h
BUILT_SOURCES = $(noinst_HEADERS)
ioctlent.raw: $(srcdir)/../ioctlent.sh
$(SHELL) $(srcdir)/../ioctlent.sh $(includedir) >$@
ioctlent.h: ioctlent.raw ioctlsort
./ioctlsort >$@
ioctlsort.o: $(srcdir)/../../ioctlsort.c
ioctlsort.o: ioctlent.raw
errnoent.h: $(srcdir)/../../errnoent.sh $(includedir)/errno.h
$(SHELL) $(srcdir)/../../errnoent.sh $(includedir)/errno.h >$@
signalent.h: $(srcdir)/../../signalent.sh $(includedir)/sys/signal.h
$(SHELL) $(srcdir)/../../signalent.sh $(includedir)/sys/signal.h >$@
syscallent.h: $(srcdir)/../syscalls.pl $(srcdir)/../syscalls.cat $(srcdir)/../syscalls.print /usr/src/sys/kern/syscalls.master
$(PERL) $(srcdir)/../syscalls.pl /usr/src/sys/kern/syscalls.master $(srcdir)/../syscalls.print $(srcdir)/../syscalls.cat >$@

View File

@ -1,87 +0,0 @@
"ERRNO_0", /* 0 */
"EPERM", /* 1 */
"ENOENT", /* 2 */
"ESRCH", /* 3 */
"EINTR", /* 4 */
"EIO", /* 5 */
"ENXIO", /* 6 */
"E2BIG", /* 7 */
"ENOEXEC", /* 8 */
"EBADF", /* 9 */
"ECHILD", /* 10 */
"EDEADLK", /* 11 */
"ENOMEM", /* 12 */
"EACCES", /* 13 */
"EFAULT", /* 14 */
"ENOTBLK", /* 15 */
"EBUSY", /* 16 */
"EEXIST", /* 17 */
"EXDEV", /* 18 */
"ENODEV", /* 19 */
"ENOTDIR", /* 20 */
"EISDIR", /* 21 */
"EINVAL", /* 22 */
"ENFILE", /* 23 */
"EMFILE", /* 24 */
"ENOTTY", /* 25 */
"ETXTBSY", /* 26 */
"EFBIG", /* 27 */
"ENOSPC", /* 28 */
"ESPIPE", /* 29 */
"EROFS", /* 30 */
"EMLINK", /* 31 */
"EPIPE", /* 32 */
"EDOM", /* 33 */
"ERANGE", /* 34 */
"EAGAIN", /* 35 */
"EINPROGRESS", /* 36 */
"EALREADY", /* 37 */
"ENOTSOCK", /* 38 */
"EDESTADDRREQ", /* 39 */
"EMSGSIZE", /* 40 */
"EPROTOTYPE", /* 41 */
"ENOPROTOOPT", /* 42 */
"EPROTONOSUPPORT", /* 43 */
"ESOCKTNOSUPPORT", /* 44 */
"EOPNOTSUPP", /* 45 */
"EPFNOSUPPORT", /* 46 */
"EAFNOSUPPORT", /* 47 */
"EADDRINUSE", /* 48 */
"EADDRNOTAVAIL", /* 49 */
"ENETDOWN", /* 50 */
"ENETUNREACH", /* 51 */
"ENETRESET", /* 52 */
"ECONNABORTED", /* 53 */
"ECONNRESET", /* 54 */
"ENOBUFS", /* 55 */
"EISCONN", /* 56 */
"ENOTCONN", /* 57 */
"ESHUTDOWN", /* 58 */
"ETOOMANYREFS", /* 59 */
"ETIMEDOUT", /* 60 */
"ECONNREFUSED", /* 61 */
"ELOOP", /* 62 */
"ENAMETOOLONG", /* 63 */
"EHOSTDOWN", /* 64 */
"EHOSTUNREACH", /* 65 */
"ENOTEMPTY", /* 66 */
"EPROCLIM", /* 67 */
"EUSERS", /* 68 */
"EDQUOT", /* 69 */
"ESTALE", /* 70 */
"EREMOTE", /* 71 */
"EBADRPC", /* 72 */
"ERPCMISMATCH", /* 73 */
"EPROGUNAVAIL", /* 74 */
"EPROGMISMATCH", /* 75 */
"EPROCUNAVAIL", /* 76 */
"ENOLCK", /* 77 */
"ENOSYS", /* 78 */
"EFTYPE", /* 79 */
"EAUTH", /* 80 */
"ENEEDAUTH", /* 81 */
"EIDRM", /* 82 */
"ENOMSG", /* 83 */
"EOVERFLOW", /* 84 */
"ECANCELED", /* 85 */
"ELAST", /* 86 */

File diff suppressed because it is too large Load Diff

View File

@ -1,32 +0,0 @@
"SIG_0", /* 0 */
"SIGHUP", /* 1 */
"SIGINT", /* 2 */
"SIGQUIT", /* 3 */
"SIGILL", /* 4 */
"SIGTRAP", /* 5 */
"SIGABRT", /* 6 */
"SIGEMT", /* 7 */
"SIGFPE", /* 8 */
"SIGKILL", /* 9 */
"SIGBUS", /* 10 */
"SIGSEGV", /* 11 */
"SIGSYS", /* 12 */
"SIGPIPE", /* 13 */
"SIGALRM", /* 14 */
"SIGTERM", /* 15 */
"SIGURG", /* 16 */
"SIGSTOP", /* 17 */
"SIGTSTP", /* 18 */
"SIGCONT", /* 19 */
"SIGCHLD", /* 20 */
"SIGTTIN", /* 21 */
"SIGTTOU", /* 22 */
"SIGIO", /* 23 */
"SIGXCPU", /* 24 */
"SIGXFSZ", /* 25 */
"SIGVTALRM", /* 26 */
"SIGPROF", /* 27 */
"SIGWINCH", /* 28 */
"SIGINFO", /* 29 */
"SIGUSR1", /* 30 */
"SIGUSR2", /* 31 */

View File

@ -1,274 +0,0 @@
/*
* Automatically generated by ./../syscalls.pl on Thu Mar 8 18:14:07 2001
*/
#define sys_syscall printargs
int sys_exit();
int sys_fork();
int sys_read();
int sys_write();
int sys_open();
int sys_close();
int sys_wait4();
int sys_creat();
int sys_link();
int sys_unlink();
int sys_chdir();
int sys_fchdir();
int sys_mknod();
int sys_chmod();
int sys_chown();
#define sys_break printargs
#define sys_getfsstat printargs
int sys_lseek();
int sys_getpid();
#define sys_mount printargs
#define sys_unmount printargs
#define sys_setuid printargs
int sys_getuid();
#define sys_geteuid printargs
int sys_ptrace();
int sys_recvmsg();
int sys_sendmsg();
int sys_recvfrom();
int sys_accept();
int sys_getpeername();
int sys_getsockname();
int sys_access();
int sys_chflags();
int sys_fchflags();
#define sys_sync printargs
int sys_kill();
int sys_stat();
#define sys_getppid printargs
int sys_lstat();
int sys_dup();
int sys_pipe();
#define sys_getegid printargs
#define sys_profil printargs
#define sys_ktrace printargs
int sys_sigaction();
int sys_getgid();
int sys_sigprocmask();
#define sys_getlogin printargs
#define sys_setlogin printargs
#define sys_acct printargs
int sys_sigpending();
int sys_sigaltstack();
int sys_ioctl();
#define sys_reboot printargs
#define sys_revoke printargs
int sys_symlink();
int sys_readlink();
int sys_execve();
int sys_umask();
int sys_chroot();
int sys_fstat();
#define sys_getkerninfo printargs
int sys_getpagesize();
int sys_msync();
int sys_vfork();
int sys_sbrk();
#define sys_sstk printargs
int sys_mmap();
#define sys_vadvise printargs
int sys_munmap();
int sys_mprotect();
#define sys_madvise printargs
int sys_mincore();
int sys_getgroups();
int sys_setgroups();
int sys_getpgrp();
int sys_setpgid();
int sys_setitimer();
int sys_wait();
#define sys_swapon printargs
int sys_getitimer();
int sys_gethostname();
int sys_sethostname();
int sys_getdtablesize();
int sys_dup2();
int sys_fcntl();
int sys_select();
int sys_fsync();
int sys_setpriority();
int sys_socket();
int sys_connect();
int sys_accept();
int sys_getpriority();
int sys_send();
int sys_recv();
#define sys_sigreturn printargs
int sys_bind();
int sys_setsockopt();
int sys_listen();
int sys_sigvec();
int sys_sigblock();
int sys_sigsetmask();
int sys_sigsuspend();
int sys_sigstack();
int sys_recvmsg();
int sys_sendmsg();
int sys_gettimeofday();
int sys_getrusage();
int sys_getsockopt();
int sys_readv();
int sys_writev();
int sys_settimeofday();
int sys_fchown();
int sys_fchmod();
int sys_recvfrom();
int sys_setreuid();
int sys_setregid();
int sys_rename();
int sys_truncate();
int sys_ftruncate();
int sys_flock();
int sys_mkfifo();
int sys_sendto();
int sys_shutdown();
int sys_socketpair();
int sys_mkdir();
int sys_rmdir();
int sys_utimes();
int sys_adjtime();
int sys_getpeername();
int sys_gethostid();
#define sys_sethostid printargs
int sys_getrlimit();
int sys_setrlimit();
int sys_killpg();
int sys_setsid();
int sys_quotactl();
#define sys_quota printargs
int sys_getsockname();
#define sys_nfssvc printargs
int sys_getdirentries();
int sys_statfs();
int sys_fstatfs();
#define sys_getfh printargs
int sys_getdomainname();
int sys_setdomainname();
int sys_uname();
#define sys_sysarch printargs
#define sys_rtprio printargs
#define sys_semsys printargs
#define sys_msgsys printargs
#define sys_shmsys printargs
int sys_pread();
int sys_pwrite();
#define sys_ntp_adjtime printargs
#define sys_setgid printargs
#define sys_setegid printargs
#define sys_seteuid printargs
int sys_stat();
int sys_fstat();
int sys_lstat();
int sys_pathconf();
int sys_fpathconf();
int sys_getrlimit();
int sys_setrlimit();
int sys_getdirentries();
int sys_mmap();
#define sys___syscall printargs
int sys_lseek();
int sys_truncate();
int sys_ftruncate();
int sys___sysctl();
#define sys_mlock printargs
#define sys_munlock printargs
#define sys_undelete printargs
#define sys_futimes printargs
int sys_getpgid();
int sys_poll();
#define sys___semctl printargs
int sys_semget();
int sys_semop();
int sys_msgctl();
int sys_msgget();
int sys_msgsnd();
int sys_msgrcv();
int sys_shmat();
int sys_shmctl();
int sys_shmdt();
int sys_shmget();
#define sys_clock_gettime printargs
#define sys_clock_settime printargs
#define sys_clock_getres printargs
#define sys_nanosleep printargs
#define sys_minherit printargs
#define sys_rfork printargs
#define sys_openbsd_poll printargs
#define sys_issetugid printargs
#define sys_lchown printargs
int sys_getdents();
#define sys_lchmod printargs
#define sys_netbsd_lchown printargs
#define sys_lutimes printargs
#define sys_netbsd_msync printargs
#define sys_nstat printargs
#define sys_nfstat printargs
#define sys_nlstat printargs
#define sys_fhstatfs printargs
#define sys_fhopen printargs
#define sys_fhstat printargs
#define sys_modnext printargs
#define sys_modstat printargs
#define sys_modfnext printargs
#define sys_modfind printargs
#define sys_kldload printargs
#define sys_kldunload printargs
#define sys_kldfind printargs
#define sys_kldnext printargs
#define sys_kldstat printargs
#define sys_kldfirstmod printargs
int sys_getsid();
int sys_setresuid();
int sys_setresgid();
#define sys_aio_return printargs
#define sys_aio_suspend printargs
#define sys_aio_cancel printargs
#define sys_aio_error printargs
#define sys_aio_read printargs
#define sys_aio_write printargs
#define sys_lio_listio printargs
#define sys_yield printargs
#define sys_thr_sleep printargs
#define sys_thr_wakeup printargs
#define sys_mlockall printargs
#define sys_munlockall printargs
int sys___getcwd();
#define sys_sched_setparam printargs
#define sys_sched_getparam printargs
#define sys_sched_setscheduler printargs
#define sys_sched_getscheduler printargs
#define sys_sched_yield printargs
#define sys_sched_get_priority_max printargs
#define sys_sched_get_priority_min printargs
#define sys_sched_rr_get_interval printargs
#define sys_utrace printargs
int sys_sendfile();
#define sys_kldsym printargs
#define sys_jail printargs
int sys_sigprocmask();
int sys_sigsuspend();
int sys_sigaction();
int sys_sigpending();
#define sys_sigreturn printargs
#define sys___acl_get_file printargs
#define sys___acl_set_file printargs
#define sys___acl_get_fd printargs
#define sys___acl_set_fd printargs
#define sys___acl_delete_file printargs
#define sys___acl_delete_fd printargs
#define sys___acl_aclcheck_file printargs
#define sys___acl_aclcheck_fd printargs
#define sys_extattrctl printargs
#define sys_extattr_set_file printargs
#define sys_extattr_get_file printargs
#define sys_extattr_delete_file printargs
#define sys_aio_waitcomplete printargs
#define sys_getresuid printargs
#define sys_getresgid printargs
#define sys_kqueue printargs
#define sys_kevent printargs

View File

@ -1,368 +0,0 @@
/*
* Automatically generated by ./../syscalls.pl on Thu Mar 8 18:14:07 2001
*/
{ 1, 0, sys_syscall, "syscall" }, /* 0 */
{ 1, 0, sys_exit, "exit" }, /* 1 */
{ 1, 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, TF, sys_close, "close" }, /* 6 */
{ 4, TP, sys_wait4, "wait4" }, /* 7 */
{ 2, TD|TF, sys_creat, "creat?" }, /* 8 */
{ 2, TF, sys_link, "link" }, /* 9 */
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ -1, 0, printargs, "SYS_11" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, sys_chown, "chown" }, /* 16 */
{ 1, 0, sys_break, "break" }, /* 17 */
{ 3, 0, sys_getfsstat, "getfsstat" }, /* 18 */
{ 3, TD, sys_lseek, "lseek?" }, /* 19 */
{ 1, 0, sys_getpid, "getpid" }, /* 20 */
{ 4, TF, sys_mount, "mount" }, /* 21 */
{ 2, TF, sys_unmount, "unmount" }, /* 22 */
{ 1, 0, sys_setuid, "setuid" }, /* 23 */
{ 1, 0, sys_getuid, "getuid" }, /* 24 */
{ 1, 0, sys_geteuid, "geteuid" }, /* 25 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 27 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 28 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 29 */
{ 3, TN, sys_accept, "accept" }, /* 30 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 31 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 32 */
{ 2, TF, sys_access, "access" }, /* 33 */
{ 2, TF, sys_chflags, "chflags" }, /* 34 */
{ 2, TF, sys_fchflags, "fchflags" }, /* 35 */
{ 1, 0, sys_sync, "sync" }, /* 36 */
{ 2, TS, sys_kill, "kill" }, /* 37 */
{ 2, TF, sys_stat, "stat?" }, /* 38 */
{ 1, 0, sys_getppid, "getppid" }, /* 39 */
{ 2, TF, sys_lstat, "lstat?" }, /* 40 */
{ 1, TD, sys_dup, "dup" }, /* 41 */
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_getegid, "getegid" }, /* 43 */
{ 4, 0, sys_profil, "profil" }, /* 44 */
{ 4, 0, sys_ktrace, "ktrace" }, /* 45 */
{ 3, TS, sys_sigaction, "sigaction?" }, /* 46 */
{ 1, 0, sys_getgid, "getgid" }, /* 47 */
{ 2, TS, sys_sigprocmask, "sigprocmask?" }, /* 48 */
{ 2, 0, sys_getlogin, "getlogin" }, /* 49 */
{ 1, 0, sys_setlogin, "setlogin" }, /* 50 */
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 1, TS, sys_sigpending, "sigpending?" }, /* 52 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 53 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 1, 0, sys_reboot, "reboot" }, /* 55 */
{ 1, 0, sys_revoke, "revoke" }, /* 56 */
{ 2, TF, sys_symlink, "symlink" }, /* 57 */
{ 3, TF, sys_readlink, "readlink" }, /* 58 */
{ 3, TF|TP, sys_execve, "execve" }, /* 59 */
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, TD, sys_fstat, "fstat?" }, /* 62 */
{ 4, 0, sys_getkerninfo, "getkerninfo?" }, /* 63 */
{ 1, 0, sys_getpagesize, "getpagesize?" }, /* 64 */
{ 3, 0, sys_msync, "msync" }, /* 65 */
{ 1, TP, sys_vfork, "vfork" }, /* 66 */
{ -1, 0, printargs, "SYS_67" }, /* 67 */
{ -1, 0, printargs, "SYS_68" }, /* 68 */
{ 1, 0, sys_sbrk, "sbrk" }, /* 69 */
{ 1, 0, sys_sstk, "sstk" }, /* 70 */
{ 6, 0, sys_mmap, "mmap?" }, /* 71 */
{ 1, 0, sys_vadvise, "vadvise" }, /* 72 */
{ 2, 0, sys_munmap, "munmap" }, /* 73 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 74 */
{ 3, 0, sys_madvise, "madvise" }, /* 75 */
{ -1, 0, printargs, "SYS_76" }, /* 76 */
{ -1, 0, printargs, "SYS_77" }, /* 77 */
{ 3, 0, sys_mincore, "mincore" }, /* 78 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 79 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 80 */
{ 1, 0, sys_getpgrp, "getpgrp" }, /* 81 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 82 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 83 */
{ 1, TP, sys_wait, "wait?" }, /* 84 */
{ 1, TF, sys_swapon, "swapon" }, /* 85 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 86 */
{ 2, 0, sys_gethostname, "gethostname?" }, /* 87 */
{ 2, 0, sys_sethostname, "sethostname?" }, /* 88 */
{ 1, 0, sys_getdtablesize, "getdtablesize" }, /* 89 */
{ 2, TD, sys_dup2, "dup2" }, /* 90 */
{ -1, 0, printargs, "SYS_91" }, /* 91 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 92 */
{ 5, TD, sys_select, "select" }, /* 93 */
{ -1, 0, printargs, "SYS_94" }, /* 94 */
{ 1, TD, sys_fsync, "fsync" }, /* 95 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 96 */
{ 3, TN, sys_socket, "socket" }, /* 97 */
{ 3, TN, sys_connect, "connect" }, /* 98 */
{ 3, TN, sys_accept, "accept" }, /* 99 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 100 */
{ 4, TN, sys_send, "send?" }, /* 101 */
{ 4, TN, sys_recv, "recv?" }, /* 102 */
{ 1, TS, sys_sigreturn, "sigreturn?" }, /* 103 */
{ 3, TN, sys_bind, "bind" }, /* 104 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 105 */
{ 2, TN, sys_listen, "listen" }, /* 106 */
{ -1, 0, printargs, "SYS_107" }, /* 107 */
{ 3, TS, sys_sigvec, "sigvec?" }, /* 108 */
{ 1, TS, sys_sigblock, "sigblock?" }, /* 109 */
{ 1, TS, sys_sigsetmask, "sigsetmask?" }, /* 110 */
{ 1, TS, sys_sigsuspend, "sigsuspend?" }, /* 111 */
{ 2, TS, sys_sigstack, "sigstack?" }, /* 112 */
{ 3, TN, sys_recvmsg, "recvmsg?" }, /* 113 */
{ 3, TN, sys_sendmsg, "sendmsg?" }, /* 114 */
{ -1, 0, printargs, "SYS_115" }, /* 115 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 116 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 117 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */
{ -1, 0, printargs, "SYS_119" }, /* 119 */
{ 3, TD, sys_readv, "readv" }, /* 120 */
{ 3, TD, sys_writev, "writev" }, /* 121 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 122 */
{ 3, TD, sys_fchown, "fchown" }, /* 123 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 124 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 125 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 126 */
{ 2, 0, sys_setregid, "setregid" }, /* 127 */
{ 2, TF, sys_rename, "rename" }, /* 128 */
{ 2, TF, sys_truncate, "truncate?" }, /* 129 */
{ 2, TD, sys_ftruncate, "ftruncate?" }, /* 130 */
{ 2, TD, sys_flock, "flock" }, /* 131 */
{ 2, 0, sys_mkfifo, "mkfifo" }, /* 132 */
{ 6, TN, sys_sendto, "sendto" }, /* 133 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 134 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 135 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 136 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 137 */
{ 2, TF, sys_utimes, "utimes" }, /* 138 */
{ -1, 0, printargs, "SYS_139" }, /* 139 */
{ 2, 0, sys_adjtime, "adjtime" }, /* 140 */
{ 3, TN, sys_getpeername, "getpeername?" }, /* 141 */
{ 1, 0, sys_gethostid, "gethostid?" }, /* 142 */
{ 1, 0, sys_sethostid, "sethostid?" }, /* 143 */
{ 2, 0, sys_getrlimit, "getrlimit?" }, /* 144 */
{ 2, 0, sys_setrlimit, "setrlimit?" }, /* 145 */
{ 2, TS, sys_killpg, "killpg?" }, /* 146 */
{ 1, 0, sys_setsid, "setsid" }, /* 147 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 148 */
{ 1, 0, sys_quota, "quota?" }, /* 149 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 150 */
{ -1, 0, printargs, "SYS_151" }, /* 151 */
{ -1, 0, printargs, "SYS_152" }, /* 152 */
{ -1, 0, printargs, "SYS_153" }, /* 153 */
{ -1, 0, printargs, "SYS_154" }, /* 154 */
{ 2, 0, sys_nfssvc, "nfssvc" }, /* 155 */
{ 4, 0, sys_getdirentries, "getdirentries?" }, /* 156 */
{ 2, TF, sys_statfs, "statfs" }, /* 157 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 158 */
{ -1, 0, printargs, "SYS_159" }, /* 159 */
{ -1, 0, printargs, "SYS_160" }, /* 160 */
{ 2, 0, sys_getfh, "getfh" }, /* 161 */
{ 2, 0, sys_getdomainname, "getdomainname" }, /* 162 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 163 */
{ 1, 0, sys_uname, "uname" }, /* 164 */
{ 2, 0, sys_sysarch, "sysarch" }, /* 165 */
{ 3, 0, sys_rtprio, "rtprio" }, /* 166 */
{ -1, 0, printargs, "SYS_167" }, /* 167 */
{ -1, 0, printargs, "SYS_168" }, /* 168 */
{ 5, TI, sys_semsys, "semsys" }, /* 169 */
{ 6, TI, sys_msgsys, "msgsys" }, /* 170 */
{ 4, TI, sys_shmsys, "shmsys" }, /* 171 */
{ -1, 0, printargs, "SYS_172" }, /* 172 */
{ 5, TD, sys_pread, "pread" }, /* 173 */
{ 5, TD, sys_pwrite, "pwrite" }, /* 174 */
{ -1, 0, printargs, "SYS_175" }, /* 175 */
{ 1, 0, sys_ntp_adjtime, "ntp_adjtime" }, /* 176 */
{ -1, 0, printargs, "SYS_177" }, /* 177 */
{ -1, 0, printargs, "SYS_178" }, /* 178 */
{ -1, 0, printargs, "SYS_179" }, /* 179 */
{ -1, 0, printargs, "SYS_180" }, /* 180 */
{ 1, 0, sys_setgid, "setgid" }, /* 181 */
{ 1, 0, sys_setegid, "setegid" }, /* 182 */
{ 1, 0, sys_seteuid, "seteuid" }, /* 183 */
{ -1, 0, printargs, "SYS_184" }, /* 184 */
{ -1, 0, printargs, "SYS_185" }, /* 185 */
{ -1, 0, printargs, "SYS_186" }, /* 186 */
{ -1, 0, printargs, "SYS_187" }, /* 187 */
{ 2, TF, sys_stat, "stat" }, /* 188 */
{ 2, TD, sys_fstat, "fstat" }, /* 189 */
{ 2, TF, sys_lstat, "lstat" }, /* 190 */
{ 2, TF, sys_pathconf, "pathconf" }, /* 191 */
{ 2, 0, sys_fpathconf, "fpathconf" }, /* 192 */
{ -1, 0, printargs, "SYS_193" }, /* 193 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 194 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 195 */
{ 4, 0, sys_getdirentries, "getdirentries" }, /* 196 */
{ 7, 0, sys_mmap, "mmap" }, /* 197 */
{ 1, 0, sys___syscall, "__syscall" }, /* 198 */
{ 4, TD, sys_lseek, "lseek" }, /* 199 */
{ 3, TF, sys_truncate, "truncate" }, /* 200 */
{ 3, TD, sys_ftruncate, "ftruncate" }, /* 201 */
{ 6, 0, sys___sysctl, "__sysctl" }, /* 202 */
{ 2, 0, sys_mlock, "mlock" }, /* 203 */
{ 2, 0, sys_munlock, "munlock" }, /* 204 */
{ 1, 0, sys_undelete, "undelete" }, /* 205 */
{ 2, 0, sys_futimes, "futimes" }, /* 206 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 207 */
{ -1, 0, printargs, "SYS_208" }, /* 208 */
{ 3, TN, sys_poll, "poll" }, /* 209 */
{ -1, 0, printargs, "SYS_210" }, /* 210 */
{ -1, 0, printargs, "SYS_211" }, /* 211 */
{ -1, 0, printargs, "SYS_212" }, /* 212 */
{ -1, 0, printargs, "SYS_213" }, /* 213 */
{ -1, 0, printargs, "SYS_214" }, /* 214 */
{ -1, 0, printargs, "SYS_215" }, /* 215 */
{ -1, 0, printargs, "SYS_216" }, /* 216 */
{ -1, 0, printargs, "SYS_217" }, /* 217 */
{ -1, 0, printargs, "SYS_218" }, /* 218 */
{ -1, 0, printargs, "SYS_219" }, /* 219 */
{ 4, 0, sys___semctl, "__semctl" }, /* 220 */
{ 3, TI, sys_semget, "semget" }, /* 221 */
{ 3, TI, sys_semop, "semop" }, /* 222 */
{ -1, 0, printargs, "SYS_223" }, /* 223 */
{ 3, TI, sys_msgctl, "msgctl" }, /* 224 */
{ 2, TI, sys_msgget, "msgget" }, /* 225 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 226 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 227 */
{ 3, TI, sys_shmat, "shmat" }, /* 228 */
{ 3, TI, sys_shmctl, "shmctl" }, /* 229 */
{ 1, TI, sys_shmdt, "shmdt" }, /* 230 */
{ 3, TI, sys_shmget, "shmget" }, /* 231 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 232 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 233 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 234 */
{ -1, 0, printargs, "SYS_235" }, /* 235 */
{ -1, 0, printargs, "SYS_236" }, /* 236 */
{ -1, 0, printargs, "SYS_237" }, /* 237 */
{ -1, 0, printargs, "SYS_238" }, /* 238 */
{ -1, 0, printargs, "SYS_239" }, /* 239 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 240 */
{ -1, 0, printargs, "SYS_241" }, /* 241 */
{ -1, 0, printargs, "SYS_242" }, /* 242 */
{ -1, 0, printargs, "SYS_243" }, /* 243 */
{ -1, 0, printargs, "SYS_244" }, /* 244 */
{ -1, 0, printargs, "SYS_245" }, /* 245 */
{ -1, 0, printargs, "SYS_246" }, /* 246 */
{ -1, 0, printargs, "SYS_247" }, /* 247 */
{ -1, 0, printargs, "SYS_248" }, /* 248 */
{ -1, 0, printargs, "SYS_249" }, /* 249 */
{ 3, 0, sys_minherit, "minherit" }, /* 250 */
{ 1, 0, sys_rfork, "rfork" }, /* 251 */
{ 3, 0, sys_openbsd_poll, "openbsd_poll" }, /* 252 */
{ 1, 0, sys_issetugid, "issetugid" }, /* 253 */
{ 3, TF, sys_lchown, "lchown" }, /* 254 */
{ -1, 0, printargs, "SYS_255" }, /* 255 */
{ -1, 0, printargs, "SYS_256" }, /* 256 */
{ -1, 0, printargs, "SYS_257" }, /* 257 */
{ -1, 0, printargs, "SYS_258" }, /* 258 */
{ -1, 0, printargs, "SYS_259" }, /* 259 */
{ -1, 0, printargs, "SYS_260" }, /* 260 */
{ -1, 0, printargs, "SYS_261" }, /* 261 */
{ -1, 0, printargs, "SYS_262" }, /* 262 */
{ -1, 0, printargs, "SYS_263" }, /* 263 */
{ -1, 0, printargs, "SYS_264" }, /* 264 */
{ -1, 0, printargs, "SYS_265" }, /* 265 */
{ -1, 0, printargs, "SYS_266" }, /* 266 */
{ -1, 0, printargs, "SYS_267" }, /* 267 */
{ -1, 0, printargs, "SYS_268" }, /* 268 */
{ -1, 0, printargs, "SYS_269" }, /* 269 */
{ -1, 0, printargs, "SYS_270" }, /* 270 */
{ -1, 0, printargs, "SYS_271" }, /* 271 */
{ 3, TD, sys_getdents, "getdents" }, /* 272 */
{ -1, 0, printargs, "SYS_273" }, /* 273 */
{ 2, 0, sys_lchmod, "lchmod" }, /* 274 */
{ 3, 0, sys_netbsd_lchown, "netbsd_lchown" }, /* 275 */
{ 2, 0, sys_lutimes, "lutimes" }, /* 276 */
{ 3, 0, sys_netbsd_msync, "netbsd_msync" }, /* 277 */
{ 2, 0, sys_nstat, "nstat" }, /* 278 */
{ 2, 0, sys_nfstat, "nfstat" }, /* 279 */
{ 2, 0, sys_nlstat, "nlstat" }, /* 280 */
{ -1, 0, printargs, "SYS_281" }, /* 281 */
{ -1, 0, printargs, "SYS_282" }, /* 282 */
{ -1, 0, printargs, "SYS_283" }, /* 283 */
{ -1, 0, printargs, "SYS_284" }, /* 284 */
{ -1, 0, printargs, "SYS_285" }, /* 285 */
{ -1, 0, printargs, "SYS_286" }, /* 286 */
{ -1, 0, printargs, "SYS_287" }, /* 287 */
{ -1, 0, printargs, "SYS_288" }, /* 288 */
{ -1, 0, printargs, "SYS_289" }, /* 289 */
{ -1, 0, printargs, "SYS_290" }, /* 290 */
{ -1, 0, printargs, "SYS_291" }, /* 291 */
{ -1, 0, printargs, "SYS_292" }, /* 292 */
{ -1, 0, printargs, "SYS_293" }, /* 293 */
{ -1, 0, printargs, "SYS_294" }, /* 294 */
{ -1, 0, printargs, "SYS_295" }, /* 295 */
{ -1, 0, printargs, "SYS_296" }, /* 296 */
{ 2, 0, sys_fhstatfs, "fhstatfs" }, /* 297 */
{ 2, 0, sys_fhopen, "fhopen" }, /* 298 */
{ 2, 0, sys_fhstat, "fhstat" }, /* 299 */
{ 1, 0, sys_modnext, "modnext" }, /* 300 */
{ 2, 0, sys_modstat, "modstat" }, /* 301 */
{ 1, 0, sys_modfnext, "modfnext" }, /* 302 */
{ 1, 0, sys_modfind, "modfind" }, /* 303 */
{ 1, 0, sys_kldload, "kldload" }, /* 304 */
{ 1, 0, sys_kldunload, "kldunload" }, /* 305 */
{ 1, 0, sys_kldfind, "kldfind" }, /* 306 */
{ 1, 0, sys_kldnext, "kldnext" }, /* 307 */
{ 2, 0, sys_kldstat, "kldstat" }, /* 308 */
{ 1, 0, sys_kldfirstmod, "kldfirstmod" }, /* 309 */
{ 1, 0, sys_getsid, "getsid" }, /* 310 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 311 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 312 */
{ -1, 0, printargs, "SYS_313" }, /* 313 */
{ 1, 0, sys_aio_return, "aio_return" }, /* 314 */
{ 3, 0, sys_aio_suspend, "aio_suspend" }, /* 315 */
{ 2, 0, sys_aio_cancel, "aio_cancel" }, /* 316 */
{ 1, 0, sys_aio_error, "aio_error" }, /* 317 */
{ 1, 0, sys_aio_read, "aio_read" }, /* 318 */
{ 1, 0, sys_aio_write, "aio_write" }, /* 319 */
{ 4, 0, sys_lio_listio, "lio_listio" }, /* 320 */
{ 1, 0, sys_yield, "yield" }, /* 321 */
{ 1, 0, sys_thr_sleep, "thr_sleep" }, /* 322 */
{ 1, 0, sys_thr_wakeup, "thr_wakeup" }, /* 323 */
{ 1, 0, sys_mlockall, "mlockall" }, /* 324 */
{ 1, 0, sys_munlockall, "munlockall" }, /* 325 */
{ 2, 0, sys___getcwd, "__getcwd" }, /* 326 */
{ 2, 0, sys_sched_setparam, "sched_setparam" }, /* 327 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 328 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 329 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 330 */
{ 1, 0, sys_sched_yield, "sched_yield" }, /* 331 */
{ 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 332 */
{ 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 333 */
{ 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 334 */
{ 2, 0, sys_utrace, "utrace" }, /* 335 */
{ 7, TD|TN, sys_sendfile, "sendfile" }, /* 336 */
{ 3, 0, sys_kldsym, "kldsym" }, /* 337 */
{ 1, 0, sys_jail, "jail" }, /* 338 */
{ -1, 0, printargs, "SYS_339" }, /* 339 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 340 */
{ 1, TS, sys_sigsuspend, "sigsuspend" }, /* 341 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 342 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 343 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 344 */
{ -1, 0, printargs, "SYS_345" }, /* 345 */
{ -1, 0, printargs, "SYS_346" }, /* 346 */
{ 3, 0, sys___acl_get_file, "__acl_get_file" }, /* 347 */
{ 3, 0, sys___acl_set_file, "__acl_set_file" }, /* 348 */
{ 3, 0, sys___acl_get_fd, "__acl_get_fd" }, /* 349 */
{ 3, 0, sys___acl_set_fd, "__acl_set_fd" }, /* 350 */
{ 2, 0, sys___acl_delete_file, "__acl_delete_file" }, /* 351 */
{ 2, 0, sys___acl_delete_fd, "__acl_delete_fd" }, /* 352 */
{ 3, 0, sys___acl_aclcheck_file, "__acl_aclcheck_file" }, /* 353 */
{ 3, 0, sys___acl_aclcheck_fd, "__acl_aclcheck_fd" }, /* 354 */
{ 4, 0, sys_extattrctl, "extattrctl" }, /* 355 */
{ 4, 0, sys_extattr_set_file, "extattr_set_file" }, /* 356 */
{ 4, 0, sys_extattr_get_file, "extattr_get_file" }, /* 357 */
{ 2, 0, sys_extattr_delete_file, "extattr_delete_file" }, /* 358 */
{ 2, 0, sys_aio_waitcomplete, "aio_waitcomplete" }, /* 359 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 360 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 361 */
{ 1, 0, sys_kqueue, "kqueue" }, /* 362 */
{ 6, 0, sys_kevent, "kevent" }, /* 363 */

View File

@ -1,62 +0,0 @@
#!/bin/sh
# initialy from $FreeBSD: src/usr.bin/kdump/mkioctls,v 1.18 2000/08/02 07:37:44 ru Exp $
# changed by Ga<47>l Roualland.
# Validate arg count.
if [ $# -ne 1 ]
then
echo "usage: $0 include-directory" >&2
exit 1
fi
# build a list of files with ioctls
ioctl_includes=`
cd $1
find * -name '*.h' -follow |
egrep -v '^(netns)/' |
xargs egrep -l \
'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]'`
# Generate the output file.
echo '/* This file is automatically generated by ioctlent.sh */'
echo
echo '/* XXX obnoxious prerequisites. */'
echo '#define COMPAT_43'
echo
echo '#include <sys/types.h>'
echo '#include <sys/param.h>'
echo '#include <sys/devicestat.h>'
echo '#include <sys/disklabel.h>'
echo '#include <sys/socket.h>'
echo '#include <sys/time.h>'
echo '#include <sys/tty.h>'
echo '#include <net/ethernet.h>'
echo '#include <net/if.h>'
echo '#include <net/if_var.h>'
echo '#include <net/route.h>'
echo '#include <netatm/atm.h>'
echo '#include <netatm/atm_if.h>'
echo '#include <netatm/atm_sap.h>'
echo '#include <netatm/atm_sys.h>'
echo '#include <netinet/in.h>'
echo '#include <netinet/ip_compat.h>'
echo '#include <netinet/ip_fil.h>'
echo '#include <netinet/ip_auth.h>'
echo '#include <netinet/ip_nat.h>'
echo '#include <netinet/ip_frag.h>'
echo '#include <netinet/ip_state.h>'
echo '#include <netinet/ip_mroute.h>'
echo '#include <netinet6/in6_var.h>'
echo '#include <netinet6/nd6.h>'
echo '#include <netinet6/ip6_mroute.h>'
echo '#include <cam/cam.h>'
echo '#include <stdio.h>'
echo
echo "$ioctl_includes" | sed -e 's/^/#include </' -e s'/$/>/'
echo
echo 'struct ioctlent ioctlent [] ='
echo '{'
(cd $1 && for i in $ioctl_includes ; do echo "#include <$i>" | gcc -I$1 -E -dM - | egrep '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | sed -n -e 's|^#[ ]*define[ ]*\([A-Za-z_][A-Za-z0-9_]*\).*| { "'$i'", "\1", \1 },|p' ; done )
echo '};'

View File

@ -1,177 +0,0 @@
#
# Copyright (c) 2000, Ga<47>l Roualland <gael.roualland@iname.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
#
# Syscalls categories
# syntax: syscall catmask
#
# mostly built from other archs/os syscallent.h
# file calls
access TF
acct TF
acl TF
chdir TF
chmod TF
chown TF
chroot TF
creat TF
close TF
chflags TF
fstat64 TF
fstat TF
fchdir TF
fchflags TF
lchown TF
link TF
lstat TF
lstat64 TF
lxstat TF
mkdir TF
mknod TF
mount TF
oldlstat TF
oldstat TF
oldumount TF
open TF
outime TF
pathconf TF
pread TF
pwrite TF
readlink TF
rename TF
rmdir TF
sendfile TF
stat TF
stat64 TF
statfs TF
statvfs TF
swapon TF
symlink TF
truncate TF
umount TF
unlink TF
unmount TF
uselib TF
utime TF
utimes TF
xmknod TF
xstat TF
# file/process calls
exec TF|TP
execv TF|TP
execve TF|TP
# IPC calls
msgctl TI
msgget TI
msgrcv TI
msgsnd TI
msgsys TI
semctl TI
semget TI
semop TI
semsys TI
shmat TI
shmctl TI
shmdt TI
shmget TI
shmsys TI
# network calls
accept TN
bind TN
connect TN
getmsg TN
getpeername TN
getpmsg TN
getsockname TN
getsockopt TN
listen TN
poll TN
putmsg TN
putpmsg TN
recv TN
recvfrom TN
recvmsg TN
send TN
sendmsg TN
sendto TN
setsockopt TN
shutdown TN
socket TN
socketpair TN
# process calls
_exit TP
clone TP
fork TP
fork1 TP
owait TP
owait3 TP
vfork TP
wait TP
wait4 TP
waitid TP
waitpid TP
waitsys TP
# signal calls
kill TS
killpg TS
ksigqueue TS
pause TS
rt_sigaction TS
rt_sigpending TS
rt_sigprocmask TS
rt_sigqueueinfo TS
rt_sigreturn TS
rt_sigsuspend TS
rt_sigtimedwait TS
sigaction TS
sigaltstack TS
sigblock TS
sigcleanup TS
sigfillset TS
siggetmask TS
sighold TS
sigignore TS
signal TS
sigpause TS
sigpending TS
sigpoll TS
sigprocmask TS
sigrelse TS
sigreturn TS
sigsendset TS
sigset TS
sigsetmask TS
sigstack TS
sigsuspend TS
sigtimedwait TS
sigvec TS

View File

@ -1,156 +0,0 @@
#!/usr/bin/perl -w
#
# Copyright (c) 2000, Ga<47>l Roualland <gael.roualland@iname.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
#/
# Buils syscall.h and syscallent.h from:
# - syscalls.cat containing lines of format: syscall catmask
# - syscalls.print containing lines of format: syscall [printfunction]
# if no printfunction is provided, sys_<call> is used.
# - syscalls.master in the FreeBSD kernel source tree (/usr/src/sys/kern)
use strict;
use POSIX;
use vars qw(%sysprint %syscat);
sub usage() {
print STDERR
"usage: $0 syscalls.master [<syscalls.print>] [<syscalls.cat>]\n";
exit 1;
}
sub readprint ($) {
my($fprint) = @_;
open (PRINT, "< $fprint") || die "can't open $fprint: $!";
while(<PRINT>) {
chomp;
s/^\s*//;
s/\s+$//;
s/#.*$//;
my($sys, $func) = split(/\s+/);
if (defined($sys)) {
if (defined($func)) {
$sysprint{$sys} = $func;
} else {
$sysprint{$sys} = "sys_$sys";
}
}
}
close(PRINT);
}
sub readcat ($) {
my($fcat) = @_;
open (CAT, "< $fcat") || die "can't open $fcat: $!";
while(<CAT>) {
chomp;
s/^\s*//;
s/\s+$//;
s/#.*$//;
my($sys, $cat) = split(/\s+/);
$syscat{$sys} = $cat if (defined($sys) && defined($cat));
}
close(CAT);
}
usage if (!defined($ARGV[0]) || defined($ARGV[3]));
%sysprint = ();
readprint $ARGV[1] if defined $ARGV[1];
%syscat = ();
readcat $ARGV[2] if defined $ARGV[2];
open(MASTER, "< $ARGV[0]") || die "can't open $ARGV[0]: $!";
open(SYSCALL, "> syscall.h") || die "can't create syscall.h: $!";
print SYSCALL "/*\n * Automatically generated by $0 on " . ctime(time()) . " */\n\n";
print "/*\n * Automatically generated by $0 on " . ctime(time()) . " */\n\n";
my $sysnum = 0;
while (<MASTER>) {
chomp;
# join broken lines
while (/\\$/) {
my $line;
s/\\$//;
$line = <MASTER>;
chomp($line);
$_ = "$_$line";
}
if (/^(\d+)\s+(?:MPSAFE\s+)?(\w+)\s+\w+\s+\{\s*([^}]+)\s*\}([^}]*)$/) {
my($compat, $proto, $ext, $name, $nargs, @args, $pfunc, $cat);
next if $2 eq 'OBSOL' || $2 eq 'UNIMPL';
$compat = $2 eq 'COMPAT' ? '?' : "";
$proto = $3;
$ext = $4;
if ($1 > $sysnum) { # syscall gap
while($sysnum < $1) {
print " { -1,\t0,\tprintargs,\t\"SYS_$sysnum\"\t}, /* $sysnum */\n";
$sysnum++;
}
} elsif ($1 < $sysnum) {
warn "error in master file: syscall $1 found, expecting $sysnum.";
}
if ($proto =~ /^[^\s]+\s+([^\s]+)\s*\(([^)]*)\);/) {
my @args = split(/,/, $2);
$nargs = @args;
$name = $1;
$name = $1 if ($ext =~ /^\s*([^\s]+)\s+[^\s]+\s+[^\s]+$/);
if (defined($sysprint{$name})) {
$pfunc = $sysprint{$name};
print SYSCALL "int $pfunc();\n";
} else {
$pfunc = "sys_$name";
print SYSCALL "#define $pfunc printargs\n";
}
if (defined($syscat{$name})) {
$cat = $syscat{$name};
} else {
$cat = "0";
}
$name .= $compat;
print " { $nargs,\t$cat,\t$pfunc,\t\"$name\"\t}, /* $sysnum */\n";
$sysnum++;
} else {
warn "bad syscall specification for $sysnum: $proto";
}
}
}

View File

@ -1,192 +0,0 @@
#
# Copyright (c) 2000, Ga<47>l Roualland <gael.roualland@iname.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
#
# Printable syscalls
# syntax: syscall [printfunc]
#
# mostly built from sys_* functions in source code
__getcwd
__sysctl
accept
access
adjtime
alarm
bind
brk
capget
capset
chdir
chflags
chmod
chown
chroot
close
connect
creat
dup
dup2
errlist
execv
execve
exit
fchdir
fchflags
fchmod
fchown
fchroot
fcntl
flock
fork
fpathconf
fstat
fstatfs
fsync
ftruncate
getdents
getdirentries
getdomainname
getdtablesize
getgid
getgroups
gethostid
gethostname
getitimer
getpagesize
getpeername
getpgid
getpgrp
getpid
getpriority
getrlimit
getrusage
getsid
getsockname
getsockopt
gettimeofday
getuid
indir
ioctl
kill
killpg
link
listen
lseek
lstat
mincore
mkdir
mkfifo
mknod
mmap
mprotect
msgctl
msgget
msgrcv
msgsnd
msync
munmap
nerr
nice
open
pathconf
pipe
poll
pread
ptrace
pwrite
quotactl
read
readlink
readv
recv
recvfrom
recvmsg
rename
rmdir
sbrk
select
semctl
semget
semop
send
sendfile
sendmsg
sendto
setdomainname
setgroups
sethostname
setitimer
setpgid
setpgrp
setpriority
setregid
setresgid
setresuid
setreuid
setrlimit
setsid
setsockopt
settimeofday
shmat
shmctl
shmdt
shmget
shutdown
sigaction
sigaltstack
sigblock
sigcleanup
signal
sigpause
sigpending
sigprocmask
sigsetmask
sigstack
sigsuspend
sigvec
socket
socketpair
stat
statfs
stime
symlink
sysctl
time
times
truncate
umask
uname
unlink
utime
utimes
vfork
wait
wait4
waitpid
write
writev

28
generate_xlat_in.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
convert() {
sed -n '/^\(static \)\?const struct xlat '"$n"'\[\] = {$/,/^};$/{
s/^[[:space:]]*XLAT(\([^)]\+\)).*/\1/p
s/^[[:space:]]*{[[:space:]]*(\?\(1<<[^),[:space:]]\+\).*/\1/p
s/.*not NULL-terminated.*/#unterminated/p
s/^\([[:space:]]*{.*\)/\1/p
s/^\t*\( *[/*].*\)/\1/p}' "$f" >> xlat/"$n".in
sed -i '/^\(static \)\?const struct xlat '"$n"'\[\] = {$/,/^};$/c #include "xlat/'"$n"'.h"' "$f"
}
for f; do
for n in $(sed -n 's/^\(static \)\?const struct xlat \([a-z0-9_]\+\)\[\] = {$/\2/p' "$f"); do
case "$n" in
cacheflush_flags|struct_user_offsets) # skip
;;
ioprio_class|ioprio_who|mtd_mode_options|personality_options|syslog_action_type|ubi_volume_props|ubi_volume_types)
echo '#unconditional' > xlat/"$n".in
convert
;;
*)
> xlat/"$n".in
convert
;;
esac
done
done

225
git-version-gen Executable file
View File

@ -0,0 +1,225 @@
#!/bin/sh
# Print a version string.
scriptversion=2012-12-31.23; # UTC
# Copyright (C) 2007-2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
# It may be run two ways:
# - from a git repository in which the "git describe" command below
# produces useful output (thus requiring at least one signed tag)
# - from a non-git-repo directory containing a .tarball-version file, which
# presumes this script is invoked like "./git-version-gen .tarball-version".
# In order to use intra-version strings in your project, you will need two
# separate generated version string files:
#
# .tarball-version - present only in a distribution tarball, and not in
# a checked-out repository. Created with contents that were learned at
# the last time autoconf was run, and used by git-version-gen. Must not
# be present in either $(srcdir) or $(builddir) for git-version-gen to
# give accurate answers during normal development with a checked out tree,
# but must be present in a tarball when there is no version control system.
# Therefore, it cannot be used in any dependencies. GNUmakefile has
# hooks to force a reconfigure at distribution time to get the value
# correct, without penalizing normal development with extra reconfigures.
#
# .version - present in a checked-out repository and in a distribution
# tarball. Usable in dependencies, particularly for files that don't
# want to depend on config.h but do want to track version changes.
# Delete this file prior to any autoconf run where you want to rebuild
# files to pick up a version string change; and leave it stale to
# minimize rebuild time after unrelated changes to configure sources.
#
# As with any generated file in a VC'd directory, you should add
# /.version to .gitignore, so that you don't accidentally commit it.
# .tarball-version is never generated in a VC'd directory, so needn't
# be listed there.
#
# Use the following line in your configure.ac, so that $(VERSION) will
# automatically be up-to-date each time configure is run (and note that
# since configure.ac no longer includes a version string, Makefile rules
# should not depend on configure.ac for version updates).
#
# AC_INIT([GNU project],
# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
# [bug-project@example])
#
# Then use the following lines in your Makefile.am, so that .version
# will be present for dependencies, and so that .version and
# .tarball-version will exist in distribution tarballs.
#
# EXTRA_DIST = $(top_srcdir)/.version
# BUILT_SOURCES = $(top_srcdir)/.version
# $(top_srcdir)/.version:
# echo $(VERSION) > $@-t && mv $@-t $@
# dist-hook:
# echo $(VERSION) > $(distdir)/.tarball-version
me=$0
version="git-version-gen $scriptversion
Copyright 2011 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
usage="\
Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
Print a version string.
Options:
--prefix prefix of git tags (default 'v')
--fallback fallback version to use if \"git --version\" fails
--help display this help and exit
--version output version information and exit
Running without arguments will suffice in most cases."
prefix=v
fallback=
while test $# -gt 0; do
case $1 in
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
--prefix) shift; prefix="$1";;
--fallback) shift; fallback="$1";;
-*)
echo "$0: Unknown option '$1'." >&2
echo "$0: Try '--help' for more information." >&2
exit 1;;
*)
if test "x$tarball_version_file" = x; then
tarball_version_file="$1"
elif test "x$tag_sed_script" = x; then
tag_sed_script="$1"
else
echo "$0: extra non-option argument '$1'." >&2
exit 1
fi;;
esac
shift
done
if test "x$tarball_version_file" = x; then
echo "$usage"
exit 1
fi
tag_sed_script="${tag_sed_script:-s/x/x/}"
nl='
'
# Avoid meddling by environment variable of the same name.
v=
v_from_git=
# First see if there is a tarball-only version file.
# then try "git describe", then default.
if test -f $tarball_version_file
then
v=`cat $tarball_version_file` || v=
case $v in
*$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
*) v= ;;
esac
test "x$v" = x \
&& echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
fi
if test "x$v" != x
then
: # use $v
# Otherwise, if there is at least one git commit involving the working
# directory, and "git describe" output looks sensible, use that to
# derive a version string.
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
&& v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
&& case $v in
$prefix[0-9]*) ;;
*) (exit 1) ;;
esac
then
# Is this a new git that lists number of commits since the last
# tag or the previous older version that did not?
# Newer: v6.10-77-g0f8faeb
# Older: v6.10-g0f8faeb
case $v in
*-*-*) : git describe is okay three part flavor ;;
*-*)
: git describe is older two part flavor
# Recreate the number of commits and rewrite such that the
# result is the same as if we were using the newer version
# of git describe.
vtag=`echo "$v" | sed 's/-.*//'`
commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
|| { commit_list=failed;
echo "$0: WARNING: git rev-list failed" 1>&2; }
numcommits=`echo "$commit_list" | wc -l`
v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
test "$commit_list" = failed && v=UNKNOWN
;;
esac
# Change the first '-' to a '.', so version-comparing tools work properly.
# Remove the "g" in git describe's output string, to save a byte.
v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/'`;
v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN
else
v=$fallback
fi
v=`echo "$v" |sed "s/^$prefix//"`
# Test whether to append the "-dirty" suffix only if the version
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version.
if test "x$v_from_git" != x; then
# Don't declare a version "dirty" merely because a time stamp has changed.
git update-index --refresh > /dev/null 2>&1
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
case "$dirty" in
'') ;;
*) # Append the suffix only if there isn't one already.
case $v in
*-dirty) ;;
*) v="$v-dirty" ;;
esac ;;
esac
fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "$v" | tr -d "$nl"
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,13 +1,15 @@
#!/usr/bin/perl
eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
& eval 'exec perl -wS "$0" $argv:q'
if 0;
# Convert git log output to ChangeLog format.
my $VERSION = '2009-06-04 08:53'; # UTC
my $VERSION = '2011-10-31 16:06'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
# Copyright (C) 2008-2011 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -60,6 +62,11 @@ OPTIONS:
--since=DATE convert only the logs since DATE;
the default is to convert all log entries.
--format=FMT set format string for commit subject and body;
see 'man git-log' for the list of format metacharacters;
the default is '%s%n%b%n'
--append-dot append a dot to the first line of each commit message if
there is no other punctuation or blank at the end.
--help display this help and exit
--version output version information and exit
@ -95,16 +102,23 @@ sub quoted_cmd(@)
}
{
my $since_date = '1970-01-01 UTC';
my $since_date;
my $format_string = '%s%n%b%n';
my $append_dot = 0;
GetOptions
(
help => sub { usage 0 },
version => sub { print "$ME version $VERSION\n"; exit },
'since=s' => \$since_date,
'format=s' => \$format_string,
'append-dot' => \$append_dot,
) or usage 1;
my @cmd = (qw (git log --log-size), "--since=$since_date",
'--pretty=format:%ct %an <%ae>%n%n%s%n%b%n', @ARGV);
defined $since_date
and unshift @ARGV, "--since=$since_date";
my @cmd = (qw (git log --log-size),
'--pretty=format:%ct %an <%ae>%n%n'.$format_string, @ARGV);
open PIPE, '-|', @cmd
or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n"
. "(Is your Git too old? Version 1.5.1 or later is required.)\n");
@ -145,6 +159,13 @@ sub quoted_cmd(@)
# Omit "Signed-off-by..." lines.
@line = grep !/^Signed-off-by: .*>$/, @line;
# Remove leading and trailing blank lines.
if (@line)
{
while ($line[0] =~ /^\s*$/) { shift @line; }
while ($line[$#line] =~ /^\s*$/) { pop @line; }
}
# If there were any lines
if (@line == 0)
{
@ -152,9 +173,17 @@ sub quoted_cmd(@)
}
else
{
# Remove leading and trailing blank lines.
while ($line[0] =~ /^\s*$/) { shift @line; }
while ($line[$#line] =~ /^\s*$/) { pop @line; }
if ($append_dot)
{
# If the first line of the message has enough room, then
if (length $line[0] < 72)
{
# append a dot if there is no other punctuation or blank
# at the end.
$line[0] =~ /[[:punct:]\s]$/
or $line[0] .= '.';
}
}
# Prefix each non-empty line with a TAB.
@line = map { length $_ ? "\t$_" : '' } @line;
@ -174,6 +203,7 @@ sub quoted_cmd(@)
}
# Local Variables:
# mode: perl
# indent-tabs-mode: nil
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "my $VERSION = '"

42
inotify.c Normal file
View File

@ -0,0 +1,42 @@
#include "defs.h"
#include <fcntl.h>
#include <linux/inotify.h>
#include "xlat/inotify_flags.h"
#include "xlat/inotify_init_flags.h"
int
sys_inotify_add_watch(struct tcb *tcp)
{
if (entering(tcp)) {
/* file descriptor */
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
/* pathname */
printpath(tcp, tcp->u_arg[1]);
tprints(", ");
/* mask */
printflags(inotify_flags, tcp->u_arg[2], "IN_???");
}
return 0;
}
int
sys_inotify_rm_watch(struct tcb *tcp)
{
if (entering(tcp)) {
/* file descriptor */
printfd(tcp, tcp->u_arg[0]);
/* watch descriptor */
tprintf(", %d", (int) tcp->u_arg[1]);
}
return 0;
}
int
sys_inotify_init1(struct tcb *tcp)
{
if (entering(tcp))
printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
return 0;
}

356
io.c
View File

@ -26,24 +26,12 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#include "defs.h"
#include <fcntl.h>
#if HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_LONG_LONG_OFF_T
/*
* Hacks for systems that have a long long off_t
*/
#define sys_pread64 sys_pread
#define sys_pwrite64 sys_pwrite
# include <sys/uio.h>
#endif
int
@ -51,7 +39,7 @@ sys_read(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@ -67,7 +55,7 @@ sys_write(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[2]);
}
@ -75,26 +63,24 @@ sys_write(struct tcb *tcp)
}
#if HAVE_SYS_UIO_H
/*
* data_size limits the cumulative size of printed data.
* Example: recvmsg returing a short read.
*/
void
tprint_iov(tcp, len, addr)
struct tcb * tcp;
unsigned long len;
unsigned long addr;
tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov, unsigned long data_size)
{
#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
#if SUPPORTED_PERSONALITIES > 1
union {
struct { u_int32_t base; u_int32_t len; } iov32;
struct { u_int64_t base; u_int64_t len; } iov64;
} iov;
#define sizeof_iov \
(personality_wordsize[current_personality] == 4 \
? sizeof(iov.iov32) : sizeof(iov.iov64))
(current_wordsize == 4 ? sizeof(iov.iov32) : sizeof(iov.iov64))
#define iov_iov_base \
(personality_wordsize[current_personality] == 4 \
? (u_int64_t) iov.iov32.base : iov.iov64.base)
(current_wordsize == 4 ? (uint64_t) iov.iov32.base : iov.iov64.base)
#define iov_iov_len \
(personality_wordsize[current_personality] == 4 \
? (u_int64_t) iov.iov32.len : iov.iov64.len)
(current_wordsize == 4 ? (uint64_t) iov.iov32.len : iov.iov64.len)
#else
struct iovec iov;
#define sizeof_iov sizeof(iov)
@ -105,7 +91,7 @@ unsigned long addr;
int failed = 0;
if (!len) {
tprintf("[]");
tprints("[]");
return;
}
size = len * sizeof_iov;
@ -121,24 +107,31 @@ unsigned long addr;
} else {
abbrev_end = end;
}
tprintf("[");
tprints("[");
for (cur = addr; cur < end; cur += sizeof_iov) {
if (cur > addr)
tprintf(", ");
tprints(", ");
if (cur >= abbrev_end) {
tprintf("...");
tprints("...");
break;
}
if (umoven(tcp, cur, sizeof_iov, (char *) &iov) < 0) {
tprintf("?");
tprints("?");
failed = 1;
break;
}
tprintf("{");
printstr(tcp, (long) iov_iov_base, iov_iov_len);
tprints("{");
if (decode_iov) {
unsigned long len = iov_iov_len;
if (len > data_size)
len = data_size;
data_size -= len;
printstr(tcp, (long) iov_iov_base, len);
} else
tprintf("%#lx", (long) iov_iov_base);
tprintf(", %lu}", (unsigned long)iov_iov_len);
}
tprintf("]");
tprints("]");
if (failed)
tprintf(" %#lx", addr);
#undef sizeof_iov
@ -146,19 +139,25 @@ unsigned long addr;
#undef iov_iov_len
}
void
tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov)
{
tprint_iov_upto(tcp, len, addr, decode_iov, (unsigned long) -1L);
}
int
sys_readv(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
} else {
if (syserror(tcp)) {
tprintf("%#lx, %lu",
tcp->u_arg[1], tcp->u_arg[2]);
return 0;
}
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
@ -169,103 +168,14 @@ sys_writev(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
tprints(", ");
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
#endif
#if defined(SVR4)
int
sys_pread(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
#if UNIXWARE
/* off_t is signed int */
tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
#else
tprintf(", %lu, %llu", tcp->u_arg[2],
LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
#endif
}
return 0;
}
int
sys_pwrite(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
#if UNIXWARE
/* off_t is signed int */
tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
#else
tprintf(", %lu, %llu", tcp->u_arg[2],
LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
#endif
}
return 0;
}
#endif /* SVR4 */
#ifdef FREEBSD
#include <sys/types.h>
#include <sys/socket.h>
int
sys_sendfile(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
printfd(tcp, tcp->u_arg[1]);
tprintf(", %llu, %lu",
LONG_LONG(tcp->u_arg[2], tcp->u_arg[3]),
tcp->u_arg[4]);
} else {
off_t offset;
if (!tcp->u_arg[5])
tprintf(", NULL");
else {
struct sf_hdtr hdtr;
if (umove(tcp, tcp->u_arg[5], &hdtr) < 0)
tprintf(", %#lx", tcp->u_arg[5]);
else {
tprintf(", { ");
tprint_iov(tcp, hdtr.hdr_cnt, hdtr.headers);
tprintf(", %u, ", hdtr.hdr_cnt);
tprint_iov(tcp, hdtr.trl_cnt, hdtr.trailers);
tprintf(", %u }", hdtr.hdr_cnt);
}
}
if (!tcp->u_arg[6])
tprintf(", NULL");
else if (umove(tcp, tcp->u_arg[6], &offset) < 0)
tprintf(", %#lx", tcp->u_arg[6]);
else
tprintf(", [%llu]", offset);
tprintf(", %lu", tcp->u_arg[7]);
}
return 0;
}
#endif /* FREEBSD */
#ifdef LINUX
/* The SH4 ABI does allow long longs in odd-numbered registers, but
does not allow them to be split between registers and memory - and
there are only four argument registers for normal functions. As a
@ -282,7 +192,7 @@ sys_pread(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@ -299,7 +209,7 @@ sys_pwrite(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%llu", PREAD_OFFSET_ARG);
@ -307,93 +217,197 @@ sys_pwrite(struct tcb *tcp)
return 0;
}
#if HAVE_SYS_UIO_H
static void
print_llu_from_low_high_val(struct tcb *tcp, int arg)
{
#if SIZEOF_LONG == SIZEOF_LONG_LONG
tprintf("%lu", (unsigned long) tcp->u_arg[arg]);
#elif defined(LINUX_MIPSN32)
tprintf("%llu", (unsigned long long) tcp->ext_arg[arg]);
#else
# ifdef X32
if (current_personality == 0)
tprintf("%llu", (unsigned long long) tcp->ext_arg[arg]);
else
# endif
tprintf("%llu",
((unsigned long long) (unsigned long) tcp->u_arg[arg + 1] << sizeof(long) * 8)
| (unsigned long long) (unsigned long) tcp->u_arg[arg]);
#endif
}
int
sys_preadv(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
} else {
if (syserror(tcp)) {
tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
return 0;
}
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
tprintf(", %lu, ", tcp->u_arg[2]);
print_llu_from_low_high_val(tcp, 3);
}
return 0;
}
int
sys_pwritev(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
tprintf(", %lu, ", tcp->u_arg[2]);
print_llu_from_low_high_val(tcp, 3);
}
return 0;
}
#endif /* HAVE_SYS_UIO_H */
static void
print_off_t(struct tcb *tcp, long addr)
{
unsigned long offset;
if (!addr) {
tprints("NULL");
return;
}
#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
if (current_wordsize == 4) {
uint32_t off;
if (umove(tcp, addr, &off) < 0)
tprintf("%#lx", addr);
else
tprintf("[%u]", off);
} else
#endif
if (umove(tcp, addr, &offset) < 0)
tprintf("%#lx", addr);
else
tprintf("[%lu]", offset);
}
int
sys_sendfile(struct tcb *tcp)
{
if (entering(tcp)) {
off_t offset;
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
printfd(tcp, tcp->u_arg[1]);
tprintf(", ");
if (!tcp->u_arg[2])
tprintf("NULL");
else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else
tprintf("[%lu]", offset);
tprints(", ");
print_off_t(tcp, tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[3]);
}
return 0;
}
void
print_loff_t(struct tcb *tcp, long addr)
{
loff_t offset;
if (!addr)
tprints("NULL");
else if (umove(tcp, addr, &offset) < 0)
tprintf("%#lx", addr);
else
tprintf("[%llu]", (unsigned long long int) offset);
}
int
sys_sendfile64(struct tcb *tcp)
{
if (entering(tcp)) {
loff_t offset;
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
printfd(tcp, tcp->u_arg[1]);
tprintf(", ");
if (!tcp->u_arg[2])
tprintf("NULL");
else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else
tprintf("[%llu]", (unsigned long long int) offset);
tprints(", ");
print_loff_t(tcp, tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[3]);
}
return 0;
}
#endif /* LINUX */
#include "xlat/splice_flags.h"
#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
int
sys_pread64(struct tcb *tcp)
sys_tee(struct tcb *tcp)
{
if (entering(tcp)) {
/* int fd_in */
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%#llx", 3);
tprints(", ");
/* int fd_out */
printfd(tcp, tcp->u_arg[1]);
tprints(", ");
/* size_t len */
tprintf("%lu, ", tcp->u_arg[2]);
/* unsigned int flags */
printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
}
return 0;
}
int
sys_pwrite64(struct tcb *tcp)
sys_splice(struct tcb *tcp)
{
if (entering(tcp)) {
/* int fd_in */
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
printllval(tcp, "%#llx", 3);
tprints(", ");
/* loff_t *off_in */
print_loff_t(tcp, tcp->u_arg[1]);
tprints(", ");
/* int fd_out */
printfd(tcp, tcp->u_arg[2]);
tprints(", ");
/* loff_t *off_out */
print_loff_t(tcp, tcp->u_arg[3]);
tprints(", ");
/* size_t len */
tprintf("%lu, ", tcp->u_arg[4]);
/* unsigned int flags */
printflags(splice_flags, tcp->u_arg[5], "SPLICE_F_???");
}
return 0;
}
int
sys_vmsplice(struct tcb *tcp)
{
if (entering(tcp)) {
/* int fd */
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
/* const struct iovec *iov, unsigned long nr_segs */
tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
tprintf(", %lu, ", tcp->u_arg[2]);
/* unsigned int flags */
printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
}
return 0;
}
#endif
int
sys_ioctl(struct tcb *tcp)
{
const struct ioctlent *iop;
const struct_ioctlent *iop;
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
iop = ioctl_lookup(tcp->u_arg[1]);
if (iop) {
tprintf("%s", iop->symbol);
tprints(iop->symbol);
while ((iop = ioctl_next_match(iop)))
tprintf(" or %s", iop->symbol);
} else
@ -401,8 +415,8 @@ sys_ioctl(struct tcb *tcp)
ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
}
else {
int ret;
if (!(ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2])))
int ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
if (!ret)
tprintf(", %#lx", tcp->u_arg[2]);
else
return ret - 1;

115
ioctl.c
View File

@ -26,138 +26,79 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#include "defs.h"
const struct ioctlent ioctlent0[] = {
/*
* `ioctlent.h' may be generated from `ioctlent.raw' by the auxiliary
* program `ioctlsort', such that the list is sorted by the `code' field.
* This has the side-effect of resolving the _IO.. macros into
* plain integers, eliminating the need to include here everything
* in "/usr/include" .
*/
#include "ioctlent.h"
};
#ifdef LINUX
#include <asm/ioctl.h>
#endif
const int nioctlents0 = sizeof ioctlent0 / sizeof ioctlent0[0];
#if SUPPORTED_PERSONALITIES >= 2
const struct ioctlent ioctlent1[] = {
#include "ioctlent1.h"
};
const int nioctlents1 = sizeof ioctlent1 / sizeof ioctlent1[0];
#endif /* SUPPORTED_PERSONALITIES >= 2 */
#if SUPPORTED_PERSONALITIES >= 3
const struct ioctlent ioctlent2[] = {
#include "ioctlent2.h"
};
const int nioctlents2 = sizeof ioctlent2 / sizeof ioctlent2[0];
#endif /* SUPPORTED_PERSONALITIES >= 3 */
const struct ioctlent *ioctlent;
int nioctlents;
static int
compare(a, b)
const void *a;
const void *b;
compare(const void *a, const void *b)
{
unsigned long code1 = ((struct ioctlent *) a)->code;
unsigned long code2 = ((struct ioctlent *) b)->code;
unsigned long code1 = (long) a;
unsigned long code2 = ((struct_ioctlent *) b)->code;
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
}
const struct ioctlent *
ioctl_lookup(code)
long code;
const struct_ioctlent *
ioctl_lookup(long code)
{
struct ioctlent *iop, ioent;
struct_ioctlent *iop;
ioent.code = code;
#ifdef LINUX
ioent.code &= (_IOC_NRMASK<<_IOC_NRSHIFT) | (_IOC_TYPEMASK<<_IOC_TYPESHIFT);
#endif
iop = (struct ioctlent *) bsearch((char *) &ioent, (char *) ioctlent,
nioctlents, sizeof(struct ioctlent), compare);
while (iop > ioctlent)
if ((--iop)->code != ioent.code) {
code &= (_IOC_NRMASK<<_IOC_NRSHIFT) | (_IOC_TYPEMASK<<_IOC_TYPESHIFT);
iop = bsearch((void*)code, ioctlent,
nioctlents, sizeof(ioctlent[0]), compare);
while (iop > ioctlent) {
iop--;
if (iop->code != code) {
iop++;
break;
}
}
return iop;
}
const struct ioctlent *
ioctl_next_match(iop)
const struct ioctlent *iop;
const struct_ioctlent *
ioctl_next_match(const struct_ioctlent *iop)
{
long code;
code = (iop++)->code;
code = iop->code;
iop++;
if (iop < ioctlent + nioctlents && iop->code == code)
return iop;
return NULL;
}
int
ioctl_decode(tcp, code, arg)
struct tcb *tcp;
long code, arg;
ioctl_decode(struct tcb *tcp, long code, long arg)
{
switch ((code >> 8) & 0xff) {
#ifdef LINUX
#if defined(ALPHA) || defined(POWERPC)
case 'f': case 't': case 'T':
#else /* !ALPHA */
case 0x54:
#endif /* !ALPHA */
#else /* !LINUX */
case 'f': case 't': case 'T':
#endif /* !LINUX */
return term_ioctl(tcp, code, arg);
#ifdef LINUX
case 0x89:
#else /* !LINUX */
case 'r': case 's': case 'i':
#ifndef FREEBSD
case 'p':
#endif
#endif /* !LINUX */
return sock_ioctl(tcp, code, arg);
#ifdef USE_PROCFS
#ifndef HAVE_MP_PROCFS
#ifndef FREEBSD
case 'q':
#else
case 'p':
#endif
return proc_ioctl(tcp, code, arg);
#endif
#endif /* USE_PROCFS */
#ifdef HAVE_SYS_STREAM_H
case 'S':
return stream_ioctl(tcp, code, arg);
#endif /* HAVE_SYS_STREAM_H */
#ifdef LINUX
case 'p':
return rtc_ioctl(tcp, code, arg);
case 0x03:
case 0x12:
return block_ioctl(tcp, code, arg);
#ifdef HAVE_SCSI_SG_H
case 0x22:
return scsi_ioctl(tcp, code, arg);
#endif
case 'L':
return loop_ioctl(tcp, code, arg);
case 'M':
return mtd_ioctl(tcp, code, arg);
case 'o':
case 'O':
return ubi_ioctl(tcp, code, arg);
case '=':
return ptp_ioctl(tcp, code, arg);
default:
break;
}

View File

@ -1,69 +0,0 @@
/*
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
* Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#include <stdio.h>
#ifdef STDC_HEADERS
#include <stdlib.h>
#endif
struct ioctlent {
const char *doth;
const char *symbol;
unsigned long code;
};
#include "ioctlent.raw"
int nioctlents = sizeof ioctlent / sizeof ioctlent[0];
int
compare(a, b)
const void *a;
const void *b;
{
unsigned long code1 = ((struct ioctlent *) a)->code;
unsigned long code2 = ((struct ioctlent *) b)->code;
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
}
int
main(int argc, const char *argv[])
{
int i;
qsort(ioctlent, nioctlents, sizeof ioctlent[0], compare);
for (i = 0; i < nioctlents; i++) {
printf("{\"%s\", \"%s\", %#lx},\n",
ioctlent[i].doth, ioctlent[i].symbol, ioctlent[i].code);
}
return 0;
}

75
ioprio.c Normal file
View File

@ -0,0 +1,75 @@
#include "defs.h"
enum {
IOPRIO_WHO_PROCESS = 1,
IOPRIO_WHO_PGRP,
IOPRIO_WHO_USER
};
#include "xlat/ioprio_who.h"
enum {
IOPRIO_CLASS_NONE,
IOPRIO_CLASS_RT,
IOPRIO_CLASS_BE,
IOPRIO_CLASS_IDLE
};
#include "xlat/ioprio_class.h"
#define IOPRIO_CLASS_SHIFT (13)
#define IOPRIO_PRIO_MASK ((1ul << IOPRIO_CLASS_SHIFT) - 1)
#define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT)
#define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK)
static const char *
sprint_ioprio(int ioprio)
{
static char outstr[256];
const char *str;
int class, data;
class = IOPRIO_PRIO_CLASS(ioprio);
data = IOPRIO_PRIO_DATA(ioprio);
str = xlookup(ioprio_class, class);
if (str)
sprintf(outstr, "IOPRIO_PRIO_VALUE(%s,%d)", str, data);
else
sprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */,%d)",
class, "IOPRIO_CLASS_???", data);
return outstr;
}
int
sys_ioprio_get(struct tcb *tcp)
{
if (entering(tcp)) {
/* int which */
printxval(ioprio_who, tcp->u_arg[0], "IOPRIO_WHO_???");
/* int who */
tprintf(", %d", (int) tcp->u_arg[1]);
return 0;
} else {
if (syserror(tcp))
return 0;
tcp->auxstr = sprint_ioprio(tcp->u_rval);
return RVAL_STR;
}
}
int
sys_ioprio_set(struct tcb *tcp)
{
if (entering(tcp)) {
/* int which */
printxval(ioprio_who, tcp->u_arg[0], "IOPRIO_WHO_???");
/* int who */
tprintf(", %d, ", (int) tcp->u_arg[1]);
/* int ioprio */
tprints(sprint_ioprio(tcp->u_arg[2]));
}
return 0;
}

257
ipc.c
View File

@ -26,18 +26,12 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#include "defs.h"
#if defined(LINUX) || defined(SUNOS4) || defined(FREEBSD)
# ifdef HAVE_MQUEUE_H
# include <mqueue.h>
# endif
#ifdef HAVE_MQUEUE_H
# include <mqueue.h>
#endif
#include <fcntl.h>
#include <sys/ipc.h>
#include <sys/sem.h>
@ -63,112 +57,30 @@
#define SEM_INFO 19
#endif
#if defined LINUX && !defined IPC_64
#if !defined IPC_64
# define IPC_64 0x100
#endif
extern void printsigevent(struct tcb *tcp, long arg);
static const struct xlat msgctl_flags[] = {
{ IPC_RMID, "IPC_RMID" },
{ IPC_SET, "IPC_SET" },
{ IPC_STAT, "IPC_STAT" },
#ifdef LINUX
{ IPC_INFO, "IPC_INFO" },
{ MSG_STAT, "MSG_STAT" },
{ MSG_INFO, "MSG_INFO" },
#endif /* LINUX */
{ 0, NULL },
};
#include "xlat/msgctl_flags.h"
#include "xlat/semctl_flags.h"
#include "xlat/shmctl_flags.h"
#include "xlat/resource_flags.h"
#include "xlat/shm_resource_flags.h"
#include "xlat/shm_flags.h"
#include "xlat/ipc_msg_flags.h"
#include "xlat/semop_flags.h"
static const struct xlat semctl_flags[] = {
{ IPC_RMID, "IPC_RMID" },
{ IPC_SET, "IPC_SET" },
{ IPC_STAT, "IPC_STAT" },
#ifdef LINUX
{ IPC_INFO, "IPC_INFO" },
{ SEM_STAT, "SEM_STAT" },
{ SEM_INFO, "SEM_INFO" },
#endif /* LINUX */
{ GETPID, "GETPID" },
{ GETVAL, "GETVAL" },
{ GETALL, "GETALL" },
{ GETNCNT, "GETNCNT" },
{ GETZCNT, "GETZCNT" },
{ SETVAL, "SETVAL" },
{ SETALL, "SETALL" },
{ 0, NULL },
};
static const struct xlat shmctl_flags[] = {
{ IPC_RMID, "IPC_RMID" },
{ IPC_SET, "IPC_SET" },
{ IPC_STAT, "IPC_STAT" },
#ifdef LINUX
{ IPC_INFO, "IPC_INFO" },
{ SHM_STAT, "SHM_STAT" },
{ SHM_INFO, "SHM_INFO" },
#endif /* LINUX */
#ifdef SHM_LOCK
{ SHM_LOCK, "SHM_LOCK" },
#endif
#ifdef SHM_UNLOCK
{ SHM_UNLOCK, "SHM_UNLOCK" },
#endif
{ 0, NULL },
};
static const struct xlat resource_flags[] = {
{ IPC_CREAT, "IPC_CREAT" },
{ IPC_EXCL, "IPC_EXCL" },
{ IPC_NOWAIT, "IPC_NOWAIT" },
{ 0, NULL },
};
static const struct xlat shm_resource_flags[] = {
{ IPC_CREAT, "IPC_CREAT" },
{ IPC_EXCL, "IPC_EXCL" },
#ifdef SHM_HUGETLB
{ SHM_HUGETLB, "SHM_HUGETLB" },
#endif
{ 0, NULL },
};
static const struct xlat shm_flags[] = {
#ifdef LINUX
{ SHM_REMAP, "SHM_REMAP" },
#endif /* LINUX */
{ SHM_RDONLY, "SHM_RDONLY" },
{ SHM_RND, "SHM_RND" },
{ 0, NULL },
};
static const struct xlat msg_flags[] = {
{ MSG_NOERROR, "MSG_NOERROR" },
#ifdef LINUX
{ MSG_EXCEPT, "MSG_EXCEPT" },
#endif /* LINUX */
{ IPC_NOWAIT, "IPC_NOWAIT" },
{ 0, NULL },
};
static const struct xlat semop_flags[] = {
{ SEM_UNDO, "SEM_UNDO" },
{ IPC_NOWAIT, "IPC_NOWAIT" },
{ 0, NULL },
};
int sys_msgget(tcp)
struct tcb *tcp;
int sys_msgget(struct tcb *tcp)
{
if (entering(tcp)) {
if (tcp->u_arg[0])
tprintf("%#lx", tcp->u_arg[0]);
tprintf("%#lx, ", tcp->u_arg[0]);
else
tprintf("IPC_PRIVATE");
tprintf(", ");
tprints("IPC_PRIVATE, ");
if (printflags(resource_flags, tcp->u_arg[1] & ~0777, NULL) != 0)
tprintf("|");
tprints("|");
tprintf("%#lo", tcp->u_arg[1] & 0777);
}
return 0;
@ -176,32 +88,28 @@ struct tcb *tcp;
#ifdef IPC_64
# define PRINTCTL(flagset, arg, dflt) \
if ((arg) & IPC_64) tprintf("IPC_64|"); \
if ((arg) & IPC_64) tprints("IPC_64|"); \
printxval((flagset), (arg) &~ IPC_64, dflt)
#else
# define PRINTCTL printxval
#endif
static int
indirect_ipccall(tcp)
struct tcb *tcp;
indirect_ipccall(struct tcb *tcp)
{
#ifdef LINUX
#ifdef X86_64
return current_personality > 0;
return current_personality == 1;
#endif
#if defined IA64
return tcp->scno < 1024; /* ia32 emulation syscalls are low */
#endif
#if !defined MIPS && !defined HPPA
return 1;
#endif
#endif /* LINUX */
#if defined(ALPHA) || defined(MIPS) || defined(HPPA) || defined(__ARM_EABI__) || defined(AARCH64)
return 0;
#endif
return 1;
}
int sys_msgctl(tcp)
struct tcb *tcp;
int sys_msgctl(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
@ -222,10 +130,10 @@ tprint_msgsnd(struct tcb *tcp, long addr, unsigned long count,
} else {
tprintf("{%lu, ", mtype);
printstr(tcp, addr + sizeof(mtype), count);
tprintf("}");
tprints("}");
}
tprintf(", %lu, ", count);
printflags(msg_flags, flags, "MSG_???");
printflags(ipc_msg_flags, flags, "MSG_???");
}
int sys_msgsnd(struct tcb *tcp)
@ -253,7 +161,7 @@ tprint_msgrcv(struct tcb *tcp, long addr, unsigned long count, long msgtyp)
} else {
tprintf("{%lu, ", mtype);
printstr(tcp, addr + sizeof(mtype), count);
tprintf("}");
tprints("}");
}
tprintf(", %lu, %ld, ", count, msgtyp);
}
@ -276,11 +184,11 @@ int sys_msgrcv(struct tcb *tcp)
tprint_msgrcv(tcp, (long) tmp.msgp,
tcp->u_arg[1], tmp.msgtyp);
}
printflags(msg_flags, tcp->u_arg[2], "MSG_???");
printflags(ipc_msg_flags, tcp->u_arg[2], "MSG_???");
} else {
tprint_msgrcv(tcp, tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3]);
printflags(msg_flags, tcp->u_arg[4], "MSG_???");
printflags(ipc_msg_flags, tcp->u_arg[4], "MSG_???");
}
}
return 0;
@ -301,13 +209,13 @@ tprint_sembuf(struct tcb *tcp, long addr, unsigned long count)
return;
}
for(i = 0; i < max_count; ++i) {
for (i = 0; i < max_count; ++i) {
struct sembuf sb;
if (i)
tprintf(", ");
tprints(", ");
if (umove(tcp, addr + i * sizeof(struct sembuf), &sb) < 0) {
if (i) {
tprintf("{???}");
tprints("{???}");
break;
} else {
tprintf("%#lx, %lu", addr, count);
@ -315,15 +223,15 @@ tprint_sembuf(struct tcb *tcp, long addr, unsigned long count)
}
} else {
if (!i)
tprintf("{");
tprints("{");
tprintf("{%u, %d, ", sb.sem_num, sb.sem_op);
printflags(semop_flags, sb.sem_flg, "SEM_???");
tprintf("}");
tprints("}");
}
}
if (i < max_count || max_count < count)
tprintf(", ...");
tprints(", ...");
tprintf("}, %lu", count);
}
@ -341,73 +249,68 @@ int sys_semop(struct tcb *tcp)
return 0;
}
#ifdef LINUX
int sys_semtimedop(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
tprint_sembuf(tcp, tcp->u_arg[3], tcp->u_arg[1]);
tprintf(", ");
printtv(tcp, tcp->u_arg[5]);
tprints(", ");
#if defined(S390) || defined(S390X)
printtv(tcp, tcp->u_arg[2]);
#else
printtv(tcp, tcp->u_arg[4]);
#endif
} else {
tprint_sembuf(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", ");
tprints(", ");
printtv(tcp, tcp->u_arg[3]);
}
}
return 0;
}
#endif
int sys_semget(tcp)
struct tcb *tcp;
int sys_semget(struct tcb *tcp)
{
if (entering(tcp)) {
if (tcp->u_arg[0])
tprintf("%#lx", tcp->u_arg[0]);
else
tprintf("IPC_PRIVATE");
tprintf(", %lu", tcp->u_arg[1]);
tprintf(", ");
tprints("IPC_PRIVATE");
tprintf(", %lu, ", tcp->u_arg[1]);
if (printflags(resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
tprintf("|");
tprints("|");
tprintf("%#lo", tcp->u_arg[2] & 0777);
}
return 0;
}
int sys_semctl(tcp)
struct tcb *tcp;
int sys_semctl(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
tprintf(", %lu, ", tcp->u_arg[1]);
tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
PRINTCTL(semctl_flags, tcp->u_arg[2], "SEM_???");
tprintf(", %#lx", tcp->u_arg[3]);
}
return 0;
}
int sys_shmget(tcp)
struct tcb *tcp;
int sys_shmget(struct tcb *tcp)
{
if (entering(tcp)) {
if (tcp->u_arg[0])
tprintf("%#lx", tcp->u_arg[0]);
else
tprintf("IPC_PRIVATE");
tprintf(", %lu", tcp->u_arg[1]);
tprintf(", ");
tprints("IPC_PRIVATE");
tprintf(", %lu, ", tcp->u_arg[1]);
if (printflags(shm_resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
tprintf("|");
tprints("|");
tprintf("%#lo", tcp->u_arg[2] & 0777);
}
return 0;
}
int sys_shmctl(tcp)
struct tcb *tcp;
int sys_shmctl(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
@ -421,39 +324,31 @@ struct tcb *tcp;
return 0;
}
int sys_shmat(tcp)
struct tcb *tcp;
int sys_shmat(struct tcb *tcp)
{
#ifdef LINUX
unsigned long raddr;
#endif /* LINUX */
if (exiting(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
if (indirect_ipccall(tcp)) {
tprintf(", %#lx", tcp->u_arg[3]);
tprintf(", ");
tprintf(", %#lx, ", tcp->u_arg[3]);
printflags(shm_flags, tcp->u_arg[1], "SHM_???");
} else {
tprintf(", %#lx", tcp->u_arg[1]);
tprintf(", ");
tprintf(", %#lx, ", tcp->u_arg[1]);
printflags(shm_flags, tcp->u_arg[2], "SHM_???");
}
if (syserror(tcp))
return 0;
/* HPPA does not use an IPC multiplexer on Linux. */
#if defined(LINUX) && !defined(HPPA)
if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
return RVAL_NONE;
tcp->u_rval = raddr;
#endif /* LINUX */
if (indirect_ipccall(tcp)) {
unsigned long raddr;
if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
return RVAL_NONE;
tcp->u_rval = raddr;
}
return RVAL_HEX;
}
return 0;
}
int sys_shmdt(tcp)
struct tcb *tcp;
int sys_shmdt(struct tcb *tcp)
{
if (entering(tcp)) {
if (indirect_ipccall(tcp)) {
@ -465,15 +360,12 @@ struct tcb *tcp;
return 0;
}
#endif /* defined(LINUX) || defined(SUNOS4) || defined(FREEBSD) */
#ifdef LINUX
int
sys_mq_open(struct tcb *tcp)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
tprintf(", ");
tprints(", ");
/* flags */
tprint_open_modes(tcp->u_arg[1]);
if (tcp->u_arg[1] & O_CREAT) {
@ -484,10 +376,11 @@ sys_mq_open(struct tcb *tcp)
/* mode */
tprintf(", %#lo, ", tcp->u_arg[2]);
if (umove(tcp, tcp->u_arg[3], &attr) < 0)
tprintf("{ ??? }");
tprints("{???}");
else
tprintf("{mq_maxmsg=%ld, mq_msgsize=%ld}",
attr.mq_maxmsg, attr.mq_msgsize);
(long) attr.mq_maxmsg,
(long) attr.mq_msgsize);
# endif
}
}
@ -533,20 +426,21 @@ static void
printmqattr(struct tcb *tcp, long addr)
{
if (addr == 0)
tprintf("NULL");
tprints("NULL");
else {
# ifndef HAVE_MQUEUE_H
tprintf("%#lx", addr);
# else
struct mq_attr attr;
if (umove(tcp, addr, &attr) < 0) {
tprintf("{...}");
tprints("{...}");
return;
}
tprintf("{mq_flags=");
tprints("{mq_flags=");
tprint_open_modes(attr.mq_flags);
tprintf(", mq_maxmsg=%ld, mq_msgsize=%ld, mq_curmsg=%ld}",
attr.mq_maxmsg, attr.mq_msgsize, attr.mq_curmsgs);
(long) attr.mq_maxmsg, (long) attr.mq_msgsize,
(long) attr.mq_curmsgs);
# endif
}
}
@ -557,9 +451,14 @@ sys_mq_getsetattr(struct tcb *tcp)
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printmqattr(tcp, tcp->u_arg[1]);
tprintf(", ");
tprints(", ");
} else
printmqattr(tcp, tcp->u_arg[2]);
return 0;
}
#endif
int
sys_ipc(struct tcb *tcp)
{
return printargs(tcp);
}

90
kexec.c Normal file
View File

@ -0,0 +1,90 @@
#include "defs.h"
#include <linux/kexec.h>
#include "xlat/kexec_arch_values.h"
#include "xlat/kexec_flags.h"
static void
print_kexec_segments(struct tcb *tcp, unsigned long addr, unsigned long len)
{
#if SUPPORTED_PERSONALITIES > 1
union {
struct { u_int32_t buf, bufsz, mem, memsz; } seg32;
struct { u_int64_t buf, bufsz, mem, memsz; } seg64;
} seg;
# define sizeof_seg \
(current_wordsize == 4 ? sizeof(seg.seg32) : sizeof(seg.seg64))
# define seg_buf \
(current_wordsize == 4 ? (uint64_t) seg.seg32.buf : seg.seg64.buf)
# define seg_bufsz \
(current_wordsize == 4 ? (uint64_t) seg.seg32.bufsz : seg.seg64.bufsz)
# define seg_mem \
(current_wordsize == 4 ? (uint64_t) seg.seg32.mem : seg.seg64.mem)
# define seg_memsz \
(current_wordsize == 4 ? (uint64_t) seg.seg32.memsz : seg.seg64.memsz)
#else
struct kexec_segment seg;
# define sizeof_seg sizeof(seg)
# define seg_buf seg.buf
# define seg_bufsz seg.bufsz
# define seg_mem seg.mem
# define seg_memsz seg.memsz
#endif
unsigned int i, failed;
if (!len) {
tprints("[]");
return;
}
if (len > KEXEC_SEGMENT_MAX) {
tprintf("%#lx", addr);
return;
}
failed = 0;
tprints("[");
for (i = 0; i < len; ++i) {
if (i)
tprints(", ");
if (umoven(tcp, addr + i * sizeof_seg, sizeof_seg,
(char *) &seg) < 0) {
tprints("?");
failed = 1;
break;
}
tprintf("{%#lx, %lu, %#lx, %lu}",
(long) seg_buf, (unsigned long) seg_bufsz,
(long) seg_mem, (unsigned long) seg_memsz);
}
tprints("]");
if (failed)
tprintf(" %#lx", addr);
}
int
sys_kexec_load(struct tcb *tcp)
{
unsigned long n;
if (exiting(tcp))
return 0;
/* entry, nr_segments */
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
/* segments */
print_kexec_segments(tcp, tcp->u_arg[2], tcp->u_arg[1]);
tprints(", ");
/* flags */
n = tcp->u_arg[3];
printxval(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???");
n &= ~KEXEC_ARCH_MASK;
if (n) {
tprints("|");
printflags(kexec_flags, n, "KEXEC_???");
}
return 0;
}

379
keyctl.c Normal file
View File

@ -0,0 +1,379 @@
#include "defs.h"
#include <linux/keyctl.h>
typedef int32_t key_serial_t;
#include "xlat/key_spec.h"
static void
print_keyring_serial_number(key_serial_t id)
{
const char *str = xlookup(key_spec, id);
if (str)
tprints(str);
else
tprintf("%d", id);
}
int
sys_add_key(struct tcb *tcp)
{
if (entering(tcp)) {
/* type */
printstr(tcp, tcp->u_arg[0], -1);
/* description */
tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
/* payload */
tprints(", ");
printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]);
/* payload length */
tprintf(", %lu, ", tcp->u_arg[3]);
/* keyring serial number */
print_keyring_serial_number(tcp->u_arg[4]);
}
return 0;
}
int
sys_request_key(struct tcb *tcp)
{
if (entering(tcp)) {
/* type */
printstr(tcp, tcp->u_arg[0], -1);
/* description */
tprints(", ");
printstr(tcp, tcp->u_arg[1], -1);
/* callout_info */
tprints(", ");
printstr(tcp, tcp->u_arg[2], -1);
/* keyring serial number */
tprints(", ");
print_keyring_serial_number(tcp->u_arg[3]);
}
return 0;
}
static int
keyctl_get_keyring_id(struct tcb *tcp, key_serial_t id, int create)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id);
tprintf(", %d", create);
}
return 0;
}
static int
keyctl_join_session_keyring(struct tcb *tcp, long addr)
{
if (entering(tcp)) {
tprints(", ");
printstr(tcp, addr, -1);
}
return 0;
}
static int
keyctl_update_key(struct tcb *tcp, key_serial_t id, long addr, long len)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id);
tprints(", ");
printstr(tcp, addr, len);
tprintf(", %lu", len);
}
return 0;
}
static int
keyctl_handle_key(struct tcb *tcp, key_serial_t id)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id);
}
return 0;
}
static int
keyctl_handle_key_key(struct tcb *tcp, key_serial_t id1, key_serial_t id2)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id1);
tprints(", ");
print_keyring_serial_number(id2);
}
return 0;
}
static int
keyctl_read_key(struct tcb *tcp, key_serial_t id, long addr, long len)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id);
tprints(", ");
} else {
if (addr && syserror(tcp))
tprintf("%#lx", addr);
else {
long rval = tcp->u_rval > len ?
len : (tcp->u_rval ? -1 : 0);
printstr(tcp, addr, rval);
}
tprintf(", %lu", len);
}
return 0;
}
static int
keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, long addr1,
long addr2, key_serial_t id2)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id1);
tprints(", ");
printstr(tcp, addr1, -1);
tprints(", ");
printstr(tcp, addr2, -1);
tprints(", ");
print_keyring_serial_number(id2);
}
return 0;
}
static int
keyctl_chown_key(struct tcb *tcp, key_serial_t id, int user, int group)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id);
tprintf(", %d, %d", user, group);
}
return 0;
}
static int
keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, long addr,
long len, key_serial_t id2)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id1);
tprints(", ");
printstr(tcp, addr, len);
tprintf(", %lu, ", len);
print_keyring_serial_number(id2);
}
return 0;
}
static int
keyctl_instantiate_key_iov(struct tcb *tcp, key_serial_t id1,
long addr, long len, key_serial_t id2)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id1);
tprints(", ");
tprint_iov(tcp, len, addr, 1);
tprintf(", %lu, ", len);
print_keyring_serial_number(id2);
}
return 0;
}
static int
keyctl_negate_key(struct tcb *tcp, key_serial_t id1, unsigned timeout,
key_serial_t id2)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id1);
tprintf(", %u, ", timeout);
print_keyring_serial_number(id2);
}
return 0;
}
static int
keyctl_reject_key(struct tcb *tcp, key_serial_t id1, unsigned timeout,
unsigned error, key_serial_t id2)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id1);
tprintf(", %u, %u, ", timeout, error);
print_keyring_serial_number(id2);
}
return 0;
}
static int
keyctl_set_timeout(struct tcb *tcp, key_serial_t id, unsigned timeout)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id);
tprintf(", %u", timeout);
}
return 0;
}
static int
keyctl_get_persistent(struct tcb *tcp, int uid, key_serial_t id)
{
if (entering(tcp)) {
tprintf(", %d, ", uid);
print_keyring_serial_number(id);
}
return 0;
}
#define KEY_POS_VIEW 0x01000000
#define KEY_POS_READ 0x02000000
#define KEY_POS_WRITE 0x04000000
#define KEY_POS_SEARCH 0x08000000
#define KEY_POS_LINK 0x10000000
#define KEY_POS_SETATTR 0x20000000
#define KEY_POS_ALL 0x3f000000
#define KEY_USR_VIEW 0x00010000
#define KEY_USR_READ 0x00020000
#define KEY_USR_WRITE 0x00040000
#define KEY_USR_SEARCH 0x00080000
#define KEY_USR_LINK 0x00100000
#define KEY_USR_SETATTR 0x00200000
#define KEY_USR_ALL 0x003f0000
#define KEY_GRP_VIEW 0x00000100
#define KEY_GRP_READ 0x00000200
#define KEY_GRP_WRITE 0x00000400
#define KEY_GRP_SEARCH 0x00000800
#define KEY_GRP_LINK 0x00001000
#define KEY_GRP_SETATTR 0x00002000
#define KEY_GRP_ALL 0x00003f00
#define KEY_OTH_VIEW 0x00000001
#define KEY_OTH_READ 0x00000002
#define KEY_OTH_WRITE 0x00000004
#define KEY_OTH_SEARCH 0x00000008
#define KEY_OTH_LINK 0x00000010
#define KEY_OTH_SETATTR 0x00000020
#define KEY_OTH_ALL 0x0000003f
#include "xlat/key_perms.h"
static int
keyctl_setperm_key(struct tcb *tcp, key_serial_t id, uint32_t perm)
{
if (entering(tcp)) {
tprints(", ");
print_keyring_serial_number(id);
tprints(", ");
printflags(key_perms, perm, "KEY_???");
}
return 0;
}
#include "xlat/key_reqkeys.h"
static int
keyctl_set_reqkey_keyring(struct tcb *tcp, int reqkey)
{
if (entering(tcp)) {
tprints(", ");
printxval(key_reqkeys, reqkey, "KEY_REQKEY_DEFL_???");
}
return 0;
}
#include "xlat/keyctl_commands.h"
int
sys_keyctl(struct tcb *tcp)
{
int cmd = tcp->u_arg[0];
if (entering(tcp))
printxval(keyctl_commands, cmd, "KEYCTL_???");
switch (cmd) {
case KEYCTL_GET_KEYRING_ID:
return keyctl_get_keyring_id(tcp, tcp->u_arg[1], tcp->u_arg[2]);
case KEYCTL_JOIN_SESSION_KEYRING:
return keyctl_join_session_keyring(tcp, tcp->u_arg[1]);
case KEYCTL_UPDATE:
return keyctl_update_key(tcp, tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3]);
case KEYCTL_REVOKE:
case KEYCTL_CLEAR:
case KEYCTL_INVALIDATE:
case KEYCTL_ASSUME_AUTHORITY:
return keyctl_handle_key(tcp, tcp->u_arg[1]);
case KEYCTL_LINK:
case KEYCTL_UNLINK:
return keyctl_handle_key_key(tcp, tcp->u_arg[1], tcp->u_arg[2]);
case KEYCTL_DESCRIBE:
case KEYCTL_READ:
case KEYCTL_GET_SECURITY:
return keyctl_read_key(tcp, tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3]);
case KEYCTL_SEARCH:
return keyctl_keyring_search(tcp, tcp->u_arg[1], tcp->u_arg[2],
tcp->u_arg[3], tcp->u_arg[4]);
case KEYCTL_CHOWN:
return keyctl_chown_key(tcp, tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3]);
case KEYCTL_SETPERM:
return keyctl_setperm_key(tcp, tcp->u_arg[1], tcp->u_arg[2]);
case KEYCTL_INSTANTIATE:
return keyctl_instantiate_key(tcp, tcp->u_arg[1], tcp->u_arg[2],
tcp->u_arg[3], tcp->u_arg[4]);
case KEYCTL_NEGATE:
return keyctl_negate_key(tcp, tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3]);
case KEYCTL_SET_REQKEY_KEYRING:
return keyctl_set_reqkey_keyring(tcp, tcp->u_arg[1]);
case KEYCTL_SET_TIMEOUT:
return keyctl_set_timeout(tcp, tcp->u_arg[1], tcp->u_arg[2]);
case KEYCTL_SESSION_TO_PARENT:
return 0;
case KEYCTL_REJECT:
return keyctl_reject_key(tcp, tcp->u_arg[1], tcp->u_arg[2],
tcp->u_arg[3], tcp->u_arg[4]);
case KEYCTL_INSTANTIATE_IOV:
return keyctl_instantiate_key_iov(tcp, tcp->u_arg[1],
tcp->u_arg[2], tcp->u_arg[3],
tcp->u_arg[4]);
case KEYCTL_GET_PERSISTENT:
return keyctl_get_persistent(tcp, tcp->u_arg[1], tcp->u_arg[2]);
default:
if (entering(tcp))
tprintf(", %#lx, %#lx, %#lx, %#lx",
tcp->u_arg[1], tcp->u_arg[2],
tcp->u_arg[3], tcp->u_arg[4]);
}
return 0;
}

110
ldt.c Normal file
View File

@ -0,0 +1,110 @@
#include "defs.h"
#if defined I386 || defined X86_64 || defined X32
# include <asm/ldt.h>
void
print_user_desc(struct tcb *tcp, long addr)
{
struct user_desc desc;
if (umove(tcp, addr, &desc) < 0) {
tprintf("%lx", addr);
return;
}
if (!verbose(tcp)) {
tprintf("{entry_number:%d, ...}", desc.entry_number);
return;
}
tprintf("{entry_number:%d, "
"base_addr:%#08x, "
"limit:%d, "
"seg_32bit:%d, "
"contents:%d, "
"read_exec_only:%d, "
"limit_in_pages:%d, "
"seg_not_present:%d, "
"useable:%d}",
desc.entry_number,
desc.base_addr,
desc.limit,
desc.seg_32bit,
desc.contents,
desc.read_exec_only,
desc.limit_in_pages,
desc.seg_not_present,
desc.useable);
}
int
sys_modify_ldt(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
if (tcp->u_arg[1] == 0
|| tcp->u_arg[2] != sizeof(struct user_desc)) {
tprintf("%lx", tcp->u_arg[1]);
} else {
print_user_desc(tcp, tcp->u_arg[1]);
}
tprintf(", %lu", tcp->u_arg[2]);
}
return 0;
}
int
sys_set_thread_area(struct tcb *tcp)
{
if (entering(tcp)) {
print_user_desc(tcp, tcp->u_arg[0]);
} else {
struct user_desc desc;
if (syserror(tcp) || umove(tcp, tcp->u_arg[0], &desc) < 0) {
/* returned entry_number is not available */
} else {
static char outstr[32];
sprintf(outstr, "entry_number:%d", desc.entry_number);
tcp->auxstr = outstr;
return RVAL_STR;
}
}
return 0;
}
int
sys_get_thread_area(struct tcb *tcp)
{
if (exiting(tcp)) {
if (syserror(tcp))
tprintf("%lx", tcp->u_arg[0]);
else
print_user_desc(tcp, tcp->u_arg[0]);
}
return 0;
}
#endif /* I386 || X86_64 || X32 */
#if defined(M68K) || defined(MIPS)
int
sys_set_thread_area(struct tcb *tcp)
{
if (entering(tcp))
tprintf("%#lx", tcp->u_arg[0]);
return 0;
}
#endif
#if defined(M68K)
int
sys_get_thread_area(struct tcb *tcp)
{
return RVAL_HEX;
}
#endif

View File

@ -0,0 +1,2 @@
/* Native AArch64 */
#include "../errnoent.h"

View File

@ -0,0 +1 @@
#include "../arm/ioctlent.h.in"

View File

@ -0,0 +1 @@
#include "ioctlent.h"

View File

@ -0,0 +1 @@
#include "../signalent.h"

View File

@ -0,0 +1 @@
#include "../arm/syscallent.h"

335
linux/aarch64/syscallent1.h Normal file
View File

@ -0,0 +1,335 @@
{ 2, 0, sys_io_setup, "io_setup" }, /* 0 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 2 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 5 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 8 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 11 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 12 */
{ 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 14 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 17 */
{ 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */
{ 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */
{ 1, TD, sys_dup, "dup" }, /* 23 */
{ 3, TD, sys_dup3, "dup3" }, /* 24 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 25 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 29 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */
{ 2, TD, sys_flock, "flock" }, /* 32 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 37 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 38 */
{ 2, TF, sys_umount2, "umount2" }, /* 39 */
{ 5, TF, sys_mount, "mount" }, /* 40 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */
{ 2, TF, sys_statfs, "statfs64" }, /* 43 */
{ 2, TD, sys_fstatfs, "fstatfs64" }, /* 44 */
{ 2, TF, sys_truncate, "truncate64" }, /* 45 */
{ 2, TD, sys_ftruncate, "ftruncate64" }, /* 46 */
{ 4, TD, sys_fallocate, "fallocate" }, /* 47 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */
{ 1, TF, sys_chdir, "chdir" }, /* 49 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 50 */
{ 1, TF, sys_chroot, "chroot" }, /* 51 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 52 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */
{ 3, TD, sys_fchown, "fchown" }, /* 55 */
{ 4, TD|TF, sys_openat, "openat" }, /* 56 */
{ 1, TD, sys_close, "close" }, /* 57 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 58 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 59 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 60 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 61 */
{ 3, TD, sys_lseek, "lseek" }, /* 62 */
{ 3, TD, sys_read, "read" }, /* 63 */
{ 3, TD, sys_write, "write" }, /* 64 */
{ 3, TD, sys_readv, "readv" }, /* 65 */
{ 3, TD, sys_writev, "writev" }, /* 66 */
{ 4, TD, sys_pread, "pread64" }, /* 67 */
{ 4, TD, sys_pwrite, "pwrite64" }, /* 68 */
{ 4, TD, sys_preadv, "preadv" }, /* 69 */
{ 4, TD, sys_pwritev, "pwritev" }, /* 70 */
{ 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 72 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 73 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */
{ 6, TD, sys_splice, "splice" }, /* 76 */
{ 4, TD, sys_tee, "tee" }, /* 77 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */
{ 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 79 */
{ 2, TD, sys_fstat, "fstat" }, /* 80 */
{ 0, 0, sys_sync, "sync" }, /* 81 */
{ 1, TD, sys_fsync, "fsync" }, /* 82 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */
{ 4, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */
{ 1, TF, sys_acct, "acct" }, /* 89 */
{ 2, 0, sys_capget, "capget" }, /* 90 */
{ 2, 0, sys_capset, "capset" }, /* 91 */
{ 1, 0, sys_personality, "personality" }, /* 92 */
{ 1, TP|SE, sys_exit, "exit" }, /* 93 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 94 */
{ 5, TP, sys_waitid, "waitid" }, /* 95 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */
{ 1, TP, sys_unshare, "unshare" }, /* 97 */
{ 6, 0, sys_futex, "futex" }, /* 98 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 102 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 103 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */
{ 3, 0, sys_init_module, "init_module" }, /* 105 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 106 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 107 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */
{ 3, 0, sys_syslog, "syslog" }, /* 116 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 117 */
{ 0, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */
{ 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 125 */
{ 1, 0, sys_sched_get_priority_min, "sched_get_priority_min" }, /* 126 */
{ 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */
{ 2, TS, sys_kill, "kill" }, /* 129 */
{ 2, TS, sys_kill, "tkill" }, /* 130 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 131 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 140 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 141 */
{ 4, 0, sys_reboot, "reboot" }, /* 142 */
{ 2, 0, sys_setregid, "setregid" }, /* 143 */
{ 1, 0, sys_setgid, "setgid" }, /* 144 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 145 */
{ 1, 0, sys_setuid, "setuid" }, /* 146 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 147 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 148 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 149 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 150 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */
{ 1, 0, sys_times, "times" }, /* 153 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 154 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 155 */
{ 1, 0, sys_getsid, "getsid" }, /* 156 */
{ 0, 0, sys_setsid, "setsid" }, /* 157 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 158 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 159 */
{ 1, 0, sys_uname, "uname" }, /* 160 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 161 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 165 */
{ 1, 0, sys_umask, "umask" }, /* 166 */
{ 5, 0, sys_prctl, "prctl" }, /* 167 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 168 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */
{ 0, 0, sys_getpid, "getpid" }, /* 172 */
{ 0, 0, sys_getppid, "getppid" }, /* 173 */
{ 0, NF, sys_getuid, "getuid" }, /* 174 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 175 */
{ 0, NF, sys_getgid, "getgid" }, /* 176 */
{ 0, NF, sys_getegid, "getegid" }, /* 177 */
{ 0, 0, sys_gettid, "gettid" }, /* 178 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 180 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */
{ 4, TI, sys_msgget, "msgget" }, /* 186 */
{ 3, TI, sys_msgctl, "msgctl" }, /* 187 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */
{ 4, TI, sys_semget, "semget" }, /* 190 */
{ 4, TI, sys_semctl, "semctl" }, /* 191 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */
{ 4, TI, sys_semop, "semop" }, /* 193 */
{ 4, TI, sys_shmget, "shmget" }, /* 194 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 195 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 196 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 197 */
{ 3, TN, sys_socket, "socket" }, /* 198 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 199 */
{ 3, TN, sys_bind, "bind" }, /* 200 */
{ 2, TN, sys_listen, "listen" }, /* 201 */
{ 3, TN, sys_accept, "accept" }, /* 202 */
{ 3, TN, sys_connect, "connect" }, /* 203 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 204 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 205 */
{ 6, TN, sys_sendto, "sendto" }, /* 206 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 210 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */
{ 3, TD, sys_readahead, "readahead" }, /* 213 */
{ 1, TM|SI, sys_brk, "brk" }, /* 214 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 215 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 216 */
{ 5, 0, sys_add_key, "add_key" }, /* 217 */
{ 4, 0, sys_request_key, "request_key" }, /* 218 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 219 */
{ 5, TP, sys_clone, "clone" }, /* 220 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 221 */
{ 6, TD|TM|SI, sys_mmap, "mmap" }, /* 222 */
{ 4, TD, sys_fadvise64, "fadvise64" }, /* 223 */
{ 2, TF, sys_swapon, "swapon" }, /* 224 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 225 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 226 */
{ 3, TM, sys_msync, "msync" }, /* 227 */
{ 3, TM, sys_msync, "msync" }, /* 228 */
{ 2, TM, sys_munlock, "munlock" }, /* 229 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 230 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 231 */
{ 3, TM, sys_mincore, "mincore" }, /* 232 */
{ 3, TM, sys_madvise, "madvise" }, /* 233 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 234 */
{ 6, TM, sys_mbind, "mbind" }, /* 235 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 239 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */
{ 4, TN, sys_accept4, "accept4" }, /* 242 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */
/* Arch-specific block, not used on AArch64 */
[244 ... 259] = { },
{ 4, TP, sys_wait4, "wait4" }, /* 260 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */
{ 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 267 */
{ 2, TD, sys_setns, "setns" }, /* 268 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 272 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 273 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 274 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 275 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 276 */
/* Blank down to 1023 */
[277 ... 1023] = { },
/* Quote from asm-generic/unistd.h:
*
* All syscalls below here should go away really,
* these are provided for both review and as a porting
* help for the C library version.
*
* Last chance: are any of these important enough to
* enable by default?
*/
{ 3, TD|TF, sys_open, "open" }, /* 1024 */
{ 2, TF, sys_link, "link" }, /* 1025 */
{ 1, TF, sys_unlink, "unlink" }, /* 1026 */
{ 3, TF, sys_mknod, "mknod" }, /* 1027 */
{ 2, TF, sys_chmod, "chmod" }, /* 1028 */
{ 3, TF, sys_chown, "chown" }, /* 1029 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 1030 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 1031 */
{ 3, TF, sys_chown, "lchown" }, /* 1032 */
{ 2, TF, sys_access, "access" }, /* 1033 */
{ 2, TF, sys_rename, "rename" }, /* 1034 */
{ 3, TF, sys_readlink, "readlink" }, /* 1035 */
{ 2, TF, sys_symlink, "symlink" }, /* 1036 */
{ 2, TF, sys_utimes, "utimes" }, /* 1037 */
{ 2, TF, sys_stat, "stat" }, /* 1038 */
{ 2, TF, sys_lstat, "lstat" }, /* 1039 */
{ 1, TD, sys_pipe, "pipe" }, /* 1040 */
{ 2, TD, sys_dup2, "dup2" }, /* 1041 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 1042 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 1043 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 1044 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 1045 */
{ 4, TD|TN, sys_sendfile64, "sendfile" }, /* 1046 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 1047 */
{ 2, TF, sys_truncate, "truncate" }, /* 1048 */
{ 2, TF, sys_stat, "stat" }, /* 1049 */
{ 2, TF, sys_lstat, "lstat" }, /* 1050 */
{ 2, TD, sys_fstat, "fstat" }, /* 1051 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 1052 */
{ 4, TD, sys_fadvise64, "fadvise64" }, /* 1053 */
{ 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 1054 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 1055 */
{ 2, TF, sys_statfs, "statfs" }, /* 1056 */
{ 3, TD, sys_lseek, "lseek" }, /* 1057 */
{ 6, TD|TM|SI, sys_mmap, "mmap" }, /* 1058 */
{ 1, 0, sys_alarm, "alarm" }, /* 1059 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 1060 */
{ 0, TS, sys_pause, "pause" }, /* 1061 */
{ 1, 0, sys_time, "time" }, /* 1062 */
{ 2, TF, sys_utime, "utime" }, /* 1063 */
{ 2, TD|TF, sys_creat, "creat" }, /* 1064 */
{ 3, TD, sys_getdents, "getdents" }, /* 1065 */
{ 3, TD|TF, sys_futimesat, "futimesat" }, /* 1066 */
{ 5, TD, sys_select, "select" }, /* 1067 */
{ 3, TD, sys_poll, "poll" }, /* 1068 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 1069 */
{ 2, 0, sys_ustat, "ustat" }, /* 1070 */
{ 0, TP, sys_vfork, "vfork" }, /* 1071 */
{ 4, TP, sys_wait4, "wait4" }, /* 1072 */
{ 6, TN, sys_recv, "recv" }, /* 1073 */
{ 4, TN, sys_send, "send" }, /* 1074 */
{ 2, 0, sys_bdflush, "bdflush" }, /* 1075 */
{ 2, TF, sys_umount, "umount" }, /* 1076 */
{ 1, TF, sys_uselib, "uselib" }, /* 1077 */
{ 1, 0, sys_sysctl, "sysctl" }, /* 1078 */
{ 0, TP, sys_fork, "fork" }, /* 1079 */

View File

@ -24,12 +24,10 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
{ 6, 0, printargs, "osf_syscall" }, /* 0, not implemented */
{ 1, TP, sys_exit, "exit" }, /* 1 */
{ 1, TP|SE, sys_exit, "exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, TD, sys_read, "read" }, /* 3 */
{ 3, TD, sys_write, "write" }, /* 4 */
@ -41,16 +39,16 @@
{ 1, TF, sys_unlink, "unlink" }, /* 10 */
{ 5, 0, printargs, "osf_execve" }, /* 11, not implemented */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 13 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
{ 2, TF, sys_chmod, "chmod" }, /* 15 */
{ 3, TF, sys_chown, "chown" }, /* 16 */
{ 1, 0, sys_brk, "brk" }, /* 17 */
{ 1, TM|SI, sys_brk, "brk" }, /* 17 */
{ 5, 0, printargs, "osf_getfsstat" }, /* 18, not implemented */
{ 3, TF, sys_lseek, "lseek" }, /* 19 */
{ 3, TD, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getxpid" }, /* 20 */
{ 4, 0, printargs, "osf_mount" }, /* 21 */
{ 2, 0, sys_umount2, "umount" }, /* 22 */
{ 2, TF, sys_umount2, "umount" }, /* 22 */
{ 1, 0, sys_setuid, "setuid" }, /* 23 */
{ 0, NF, sys_getuid, "getxuid" }, /* 24 */
{ 5, 0, printargs, "exec_with_loader" }, /* 25, not implemented */
@ -76,37 +74,37 @@
{ 3, TD|TF, sys_open, "open" }, /* 45 */
{ 5, 0, printargs, "osf_old_sigaction" }, /* 46, not implemented */
{ 1, NF, sys_getgid, "getxgid" }, /* 47 */
{ 3, TS, printargs, "osf_sigprocmask" }, /* 48 */
{ 2, TS, sys_sigprocmask, "osf_sigprocmask" }, /* 48 */
{ 5, 0, printargs, "osf_getlogin" }, /* 49, not implemented */
{ 5, 0, printargs, "osf_setlogin" }, /* 50, not implemented */
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 52 */
{ 5, 0, printargs, "SYS_53" }, /* 53 */
{ 5, 0, NULL, NULL }, /* 53 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 5, 0, printargs, "osf_reboot" }, /* 55, not implemented */
{ 5, 0, printargs, "osf_revoke" }, /* 56, not implemented */
{ 2, TF, sys_symlink, "symlink" }, /* 57 */
{ 3, TF, sys_readlink, "readlink" }, /* 58 */
{ 3, TF|TP, sys_execve, "execve" }, /* 59 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 59 */
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 5, 0, printargs, "osf_old_fstat" }, /* 62, not implemented */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 63 */
{ 0, 0, sys_getpagesize, "getpagesize" }, /* 64 */
{ 5, 0, printargs, "osf_mremap" }, /* 65, not implemented */
{ 0, TP, sys_fork, "vfork" }, /* 66 */
{ 5, TM, printargs, "osf_mremap" }, /* 65, not implemented */
{ 0, TP, sys_vfork, "vfork" }, /* 66 */
{ 2, TF, sys_stat, "stat" }, /* 67 */
{ 2, TF, sys_lstat, "lstat" }, /* 68 */
{ 5, 0, printargs, "osf_sbrk" }, /* 69, not implemented */
{ 5, TM, printargs, "osf_sbrk" }, /* 69, not implemented */
{ 5, 0, printargs, "osf_sstk" }, /* 70, not implemented */
{ 6, TD, sys_mmap, "mmap" }, /* 71 */
{ 6, TD|TM|SI, sys_mmap, "mmap" }, /* 71 */
{ 5, 0, printargs, "osf_old_vadvise" }, /* 72, not implemented */
{ 2, 0, sys_munmap, "munmap" }, /* 73 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 74 */
{ 3, 0, sys_madvise, "madvise" }, /* 75 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 73 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 74 */
{ 3, TM, sys_madvise, "madvise" }, /* 75 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 76 */
{ 5, 0, printargs, "osf_kmodcall" }, /* 77, not implemented */
{ 5, 0, printargs, "osf_mincore" }, /* 78, not implemented */
{ 5, TM, printargs, "osf_mincore" }, /* 78, not implemented */
{ 2, 0, sys_getgroups, "getgroups" }, /* 79 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 80 */
{ 5, 0, printargs, "osf_old_getpgrp" }, /* 81, not implemented */
@ -131,7 +129,7 @@
{ 2, 0, sys_getpriority, "osf_getpriority" }, /* 100 */
{ 4, TN, sys_send, "send" }, /* 101 */
{ 4, TN, sys_recv, "recv" }, /* 102 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 103 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 103 */
{ 3, TN, sys_bind, "bind" }, /* 104 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 105 */
{ 2, TN, sys_listen, "listen" }, /* 106 */
@ -147,7 +145,7 @@
{ 2, 0, sys_osf_gettimeofday, "osf_gettimeofday" }, /* 116 */
{ 2, 0, sys_osf_getrusage, "osf_getrusage" }, /* 117 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */
{ 5, 0, printargs, "SYS_119" }, /* 119 */
{ 5, 0, NULL, NULL }, /* 119 */
{ 3, TD, sys_readv, "readv" }, /* 120 */
{ 3, TD, sys_writev, "writev" }, /* 121 */
{ 2, 0, sys_osf_settimeofday, "osf_settimeofday" }, /* 122 */
@ -176,57 +174,57 @@
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
{ 5, 0, printargs, "osf_old_killpg" }, /* 146, not implemented */
{ 0, 0, sys_setsid, "setsid" }, /* 147 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 148 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 148 */
{ 5, 0, printargs, "osf_oldquota" }, /* 149, not implemented */
{ 3, TN, sys_getsockname, "getsockname" }, /* 150 */
{ 5, 0, printargs, "SYS_151" }, /* 151 */
{ 5, 0, printargs, "SYS_152" }, /* 152 */
{ 5, 0, NULL, NULL }, /* 151 */
{ 5, 0, NULL, NULL }, /* 152 */
{ 5, 0, printargs, "osf_pid_block" }, /* 153, not implemented */
{ 5, 0, printargs, "osf_pid_unblock" }, /* 154, not implemented */
{ 5, 0, printargs, "SYS_155" }, /* 155 */
{ 5, 0, NULL, NULL }, /* 155 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 156 */
{ 5, 0, printargs, "osf_sigwaitprim" }, /* 157, not implemented */
{ 5, 0, printargs, "osf_nfssvc" }, /* 158, not implemented */
{ 4, 0, printargs, "osf_getdirentries" }, /* 159 */
{ 3, 0, osf_statfs, "osf_statfs" }, /* 160 */
{ 3, 0, osf_fstatfs, "osf_fstatfs" }, /* 161 */
{ 5, 0, printargs, "SYS_162" }, /* 162 */
{ 5, 0, NULL, NULL }, /* 162 */
{ 5, 0, printargs, "osf_asynch_daemon" }, /* 163, not implemented */
{ 5, 0, printargs, "osf_getfh" }, /* 164, not implemented */
{ 2, 0, printargs, "osf_getdomainname" }, /* 165 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 166 */
{ 5, 0, printargs, "SYS_167" }, /* 167 */
{ 5, 0, printargs, "SYS_168" }, /* 168 */
{ 5, 0, NULL, NULL }, /* 167 */
{ 5, 0, NULL, NULL }, /* 168 */
{ 5, 0, printargs, "osf_exportfs" }, /* 169, not implemented */
{ 5, 0, printargs, "SYS_170" }, /* 170 */
{ 5, 0, printargs, "SYS_171" }, /* 171 */
{ 5, 0, printargs, "SYS_172" }, /* 172 */
{ 5, 0, printargs, "SYS_173" }, /* 173 */
{ 5, 0, printargs, "SYS_174" }, /* 174 */
{ 5, 0, printargs, "SYS_175" }, /* 175 */
{ 5, 0, printargs, "SYS_176" }, /* 176 */
{ 5, 0, printargs, "SYS_177" }, /* 177 */
{ 5, 0, printargs, "SYS_178" }, /* 178 */
{ 5, 0, printargs, "SYS_179" }, /* 179 */
{ 5, 0, printargs, "SYS_180" }, /* 180 */
{ 5, 0, NULL, NULL }, /* 170 */
{ 5, 0, NULL, NULL }, /* 171 */
{ 5, 0, NULL, NULL }, /* 172 */
{ 5, 0, NULL, NULL }, /* 173 */
{ 5, 0, NULL, NULL }, /* 174 */
{ 5, 0, NULL, NULL }, /* 175 */
{ 5, 0, NULL, NULL }, /* 176 */
{ 5, 0, NULL, NULL }, /* 177 */
{ 5, 0, NULL, NULL }, /* 178 */
{ 5, 0, NULL, NULL }, /* 179 */
{ 5, 0, NULL, NULL }, /* 180 */
{ 5, 0, printargs, "osf_alt_plock" }, /* 181, not implemented */
{ 5, 0, printargs, "SYS_182" }, /* 182 */
{ 5, 0, printargs, "SYS_183" }, /* 183 */
{ 5, 0, NULL, NULL }, /* 182 */
{ 5, 0, NULL, NULL }, /* 183 */
{ 5, 0, printargs, "osf_getmnt" }, /* 184, not implemented */
{ 5, 0, printargs, "SYS_185" }, /* 185 */
{ 5, 0, printargs, "SYS_186" }, /* 186 */
{ 5, 0, NULL, NULL }, /* 185 */
{ 5, 0, NULL, NULL }, /* 186 */
{ 5, 0, printargs, "osf_alt_sigpending" }, /* 187, not implemented */
{ 5, 0, printargs, "osf_alt_setsid" }, /* 188, not implemented */
{ 5, 0, printargs, "SYS_189" }, /* 189 */
{ 5, 0, printargs, "SYS_190" }, /* 190 */
{ 5, 0, printargs, "SYS_191" }, /* 191 */
{ 5, 0, printargs, "SYS_192" }, /* 192 */
{ 5, 0, printargs, "SYS_193" }, /* 193 */
{ 5, 0, printargs, "SYS_194" }, /* 194 */
{ 5, 0, printargs, "SYS_195" }, /* 195 */
{ 5, 0, printargs, "SYS_196" }, /* 196 */
{ 5, 0, printargs, "SYS_197" }, /* 197 */
{ 5, 0, printargs, "SYS_198" }, /* 198 */
{ 5, 0, NULL, NULL }, /* 189 */
{ 5, 0, NULL, NULL }, /* 190 */
{ 5, 0, NULL, NULL }, /* 191 */
{ 5, 0, NULL, NULL }, /* 192 */
{ 5, 0, NULL, NULL }, /* 193 */
{ 5, 0, NULL, NULL }, /* 194 */
{ 5, 0, NULL, NULL }, /* 195 */
{ 5, 0, NULL, NULL }, /* 196 */
{ 5, 0, NULL, NULL }, /* 197 */
{ 5, 0, NULL, NULL }, /* 198 */
{ 4, 0, printargs, "osf_swapon" }, /* 199 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 200 */
{ 4, TI, sys_msgget, "msgget" }, /* 201 */
@ -237,33 +235,33 @@
{ 4, TI, printargs, "semop" }, /* 206 */
{ 1, 0, printargs, "osf_utsname" }, /* 207 */
{ 3, TF, sys_chown, "lchown" }, /* 208 */
{ 3, TI, printargs, "osf_shmat" }, /* 209 */
{ 3, TI|TM, printargs, "osf_shmat" }, /* 209 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 210 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 211 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 211 */
{ 4, TI, sys_shmget, "shmget" }, /* 212 */
{ 5, 0, printargs, "osf_mvalid" }, /* 213, not implemented */
{ 5, 0, printargs, "osf_getaddressconf" }, /* 214, not implemented */
{ 5, 0, printargs, "osf_msleep" }, /* 215, not implemented */
{ 5, 0, printargs, "osf_mwakeup" }, /* 216, not implemented */
{ 3, 0, sys_msync, "msync" }, /* 217 */
{ 3, TM, sys_msync, "msync" }, /* 217 */
{ 5, 0, printargs, "osf_signal" }, /* 218, not implemented */
{ 5, 0, printargs, "osf_utc_gettime" }, /* 219, not implemented */
{ 5, 0, printargs, "osf_utc_adjtime" }, /* 220, not implemented */
{ 5, 0, printargs, "SYS_221" }, /* 221 */
{ 5, 0, NULL, NULL }, /* 221 */
{ 5, 0, printargs, "osf_security" }, /* 222, not implemented */
{ 5, 0, printargs, "osf_kloadcall" }, /* 223, not implemented */
{ 5, 0, printargs, "SYS_224" }, /* 224 */
{ 5, 0, printargs, "SYS_225" }, /* 225 */
{ 5, 0, printargs, "SYS_226" }, /* 226 */
{ 5, 0, printargs, "SYS_227" }, /* 227 */
{ 5, 0, printargs, "SYS_228" }, /* 228 */
{ 5, 0, printargs, "SYS_229" }, /* 229 */
{ 5, 0, printargs, "SYS_230" }, /* 230 */
{ 5, 0, printargs, "SYS_231" }, /* 231 */
{ 5, 0, printargs, "SYS_232" }, /* 232 */
{ 5, 0, NULL, NULL }, /* 224 */
{ 5, 0, NULL, NULL }, /* 225 */
{ 5, 0, NULL, NULL }, /* 226 */
{ 5, 0, NULL, NULL }, /* 227 */
{ 5, 0, NULL, NULL }, /* 228 */
{ 5, 0, NULL, NULL }, /* 229 */
{ 5, 0, NULL, NULL }, /* 230 */
{ 5, 0, NULL, NULL }, /* 231 */
{ 5, 0, NULL, NULL }, /* 232 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 233 */
{ 1, 0, sys_getsid, "getsid" }, /* 234 */
{ 5, 0, sys_sigaltstack, "sigaltstack" }, /* 235 */
{ 5, TS, sys_sigaltstack, "sigaltstack" }, /* 235 */
{ 5, 0, printargs, "osf_waitid" }, /* 236, not implemented */
{ 5, 0, printargs, "osf_priocntlset" }, /* 237, not implemented */
{ 5, 0, printargs, "osf_sigsendset" }, /* 238, not implemented */
@ -277,7 +275,7 @@
{ 5, 0, printargs, "osf_ntp_gettime" }, /* 246, not implemented */
{ 5, 0, printargs, "osf_pathconf" }, /* 247, not implemented */
{ 5, 0, printargs, "osf_fpathconf" }, /* 248, not implemented */
{ 5, 0, printargs, "SYS_249" }, /* 249 */
{ 5, 0, NULL, NULL }, /* 249 */
{ 5, 0, printargs, "osf_uswitch" }, /* 250, not implemented */
{ 2, 0, printargs, "osf_usleep_thread" }, /* 251 */
{ 5, 0, printargs, "osf_audcntl" }, /* 252, not implemented */
@ -290,44 +288,44 @@
{ 5, 0, printargs, "osf_swapctl" }, /* 259, not implemented */
{ 5, 0, printargs, "osf_memcntl" }, /* 260, not implemented */
{ 5, 0, printargs, "osf_fdatasync" }, /* 261, not implemented */
{ 5, 0, printargs, "SYS_262" }, /* 262 */
{ 5, 0, printargs, "SYS_263" }, /* 263 */
{ 5, 0, printargs, "SYS_264" }, /* 264 */
{ 5, 0, printargs, "SYS_265" }, /* 265 */
{ 5, 0, printargs, "SYS_266" }, /* 266 */
{ 5, 0, printargs, "SYS_267" }, /* 267 */
{ 5, 0, printargs, "SYS_268" }, /* 268 */
{ 5, 0, printargs, "SYS_269" }, /* 269 */
{ 5, 0, printargs, "SYS_270" }, /* 270 */
{ 5, 0, printargs, "SYS_271" }, /* 271 */
{ 5, 0, printargs, "SYS_272" }, /* 272 */
{ 5, 0, printargs, "SYS_273" }, /* 273 */
{ 5, 0, printargs, "SYS_274" }, /* 274 */
{ 5, 0, printargs, "SYS_275" }, /* 275 */
{ 5, 0, printargs, "SYS_276" }, /* 276 */
{ 5, 0, printargs, "SYS_277" }, /* 277 */
{ 5, 0, printargs, "SYS_278" }, /* 278 */
{ 5, 0, printargs, "SYS_279" }, /* 279 */
{ 5, 0, printargs, "SYS_280" }, /* 280 */
{ 5, 0, printargs, "SYS_281" }, /* 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, NULL, NULL }, /* 262 */
{ 5, 0, NULL, NULL }, /* 263 */
{ 5, 0, NULL, NULL }, /* 264 */
{ 5, 0, NULL, NULL }, /* 265 */
{ 5, 0, NULL, NULL }, /* 266 */
{ 5, 0, NULL, NULL }, /* 267 */
{ 5, 0, NULL, NULL }, /* 268 */
{ 5, 0, NULL, NULL }, /* 269 */
{ 5, 0, NULL, NULL }, /* 270 */
{ 5, 0, NULL, NULL }, /* 271 */
{ 5, 0, NULL, NULL }, /* 272 */
{ 5, 0, NULL, NULL }, /* 273 */
{ 5, 0, NULL, NULL }, /* 274 */
{ 5, 0, NULL, NULL }, /* 275 */
{ 5, 0, NULL, NULL }, /* 276 */
{ 5, 0, NULL, NULL }, /* 277 */
{ 5, 0, NULL, NULL }, /* 278 */
{ 5, 0, NULL, NULL }, /* 279 */
{ 5, 0, NULL, NULL }, /* 280 */
{ 5, 0, NULL, NULL }, /* 281 */
{ 5, 0, NULL, NULL }, /* 282 */
{ 5, 0, NULL, NULL }, /* 283 */
{ 5, 0, NULL, NULL }, /* 284 */
{ 5, 0, NULL, NULL }, /* 285 */
{ 5, 0, NULL, NULL }, /* 286 */
{ 5, 0, NULL, NULL }, /* 287 */
{ 5, 0, NULL, NULL }, /* 288 */
{ 5, 0, NULL, NULL }, /* 289 */
{ 5, 0, NULL, NULL }, /* 290 */
{ 5, 0, NULL, NULL }, /* 291 */
{ 5, 0, NULL, NULL }, /* 292 */
{ 5, 0, NULL, NULL }, /* 293 */
{ 5, 0, NULL, NULL }, /* 294 */
{ 5, 0, NULL, NULL }, /* 295 */
{ 5, 0, NULL, NULL }, /* 296 */
{ 5, 0, NULL, NULL }, /* 297 */
{ 5, 0, NULL, NULL }, /* 298 */
{ 5, 0, NULL, NULL }, /* 299 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 300 */
{ 3, 0, printargs, "sethae" }, /* 301 */
{ 5, TF, sys_mount, "mount" }, /* 302 */
@ -339,18 +337,18 @@
{ 2, 0, sys_delete_module, "delete_module" }, /* 308 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 309 */
{ 3, 0, sys_syslog, "syslog" }, /* 310 */
{ 3, 0, sys_reboot, "reboot" }, /* 311 */
{ 4, 0, sys_reboot, "reboot" }, /* 311 */
{ 5, TP, sys_clone, "clone" }, /* 312 */
{ 1, 0, sys_uselib, "uselib" }, /* 313 */
{ 2, 0, sys_mlock, "mlock" }, /* 314 */
{ 2, 0, sys_munlock, "munlock" }, /* 315 */
{ 1, 0, sys_mlockall, "mlockall" }, /* 316 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 317 */
{ 1, TF, sys_uselib, "uselib" }, /* 313 */
{ 2, TM, sys_mlock, "mlock" }, /* 314 */
{ 2, TM, sys_munlock, "munlock" }, /* 315 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 316 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 317 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 318 */
{ 1, 0, sys_sysctl, "sysctl" }, /* 319 */
{ 0, 0, sys_idle, "idle" }, /* 320 */
{ 1, 0, sys_umount, "oldumount" }, /* 321 */
{ 1, 0, sys_swapon, "swapon" }, /* 322 */
{ 1, TF, sys_umount, "oldumount" }, /* 321 */
{ 2, TF, sys_swapon, "swapon" }, /* 322 */
{ 1, 0, sys_times, "times" }, /* 323 */
{ 1, 0, sys_personality, "personality" }, /* 324 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 325 */
@ -369,18 +367,18 @@
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 338 */
{ 1, 0, sys_uname, "uname" }, /* 339 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 340 */
{ 5, 0, sys_mremap, "mremap" }, /* 341 */
{ 5, 0, printargs, "nfsservctl" }, /* 342 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 341 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 342 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 343 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 344 */
{ 5, 0, printargs, "pciconfig_read" }, /* 345 */
{ 5, 0, printargs, "pciconfig_write" }, /* 346 */
{ 5, 0, sys_query_module, "query_module" }, /* 347 */
{ 5, 0, sys_prctl, "prctl" }, /* 348 */
{ 5, TD, sys_pread, "pread" }, /* 349 */
{ 5, TD, sys_pwrite, "pwrite" }, /* 350 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 351 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 352 */
{ 4, TD, sys_pread, "pread" }, /* 349 */
{ 4, TD, sys_pwrite, "pwrite" }, /* 350 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 351 */
{ 5, TS, sys_rt_sigaction, "rt_sigaction" }, /* 352 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 353 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 354 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 355 */
@ -391,11 +389,11 @@
{ 3, 0, sys_settimeofday, "settimeofday" }, /* 360 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 361 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 362 */
{ 2, 0, sys_utimes, "utimes" }, /* 363 */
{ 2, TF, sys_utimes, "utimes" }, /* 363 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 364 */
{ 4, TP, sys_wait4, "wait4" }, /* 365 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 366 */
{ 2, 0, sys_getcwd, "getcwd" }, /* 367 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 367 */
{ 2, 0, sys_capget, "capget" }, /* 368 */
{ 2, 0, sys_capset, "capset" }, /* 369 */
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 370 */
@ -403,12 +401,12 @@
{ 3, 0, sys_getresgid, "getresgid" }, /* 372 */
{ 4, 0, printargs, "dipc" }, /* 373, not implemented */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 374 */
{ 3, 0, sys_mincore, "mincore" }, /* 375 */
{ 3, TM, sys_mincore, "mincore" }, /* 375 */
{ 3, 0, printargs, "pciconfig_iobase" }, /* 376 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 377 */
{ 0, 0, printargs, "gettid" }, /* 378 */
{ 4, TD, sys_readahead, "readahead" }, /* 379 */
{ 5, 0, printargs, "SYS_380" }, /* 380 */
{ 0, 0, sys_gettid, "gettid" }, /* 378 */
{ 3, TD, sys_readahead, "readahead" }, /* 379 */
{ 5, 0, NULL, NULL }, /* 380 */
{ 2, TS, sys_kill, "tkill" }, /* 381 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 382 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 383 */
@ -425,23 +423,23 @@
{ 6, 0, sys_futex, "futex" }, /* 394 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 395 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 396 */
{ 5, 0, printargs, "tuxcall" }, /* 397 */
{ 5, 0, sys_tuxcall, "tuxcall" }, /* 397 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 398 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 399 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 400 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 400 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 401 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 402 */
{ 5, 0, printargs, "SYS_403" }, /* 403 */
{ 5, 0, printargs, "SYS_404" }, /* 404 */
{ 1, TP, sys_exit, "exit_group" }, /* 405 */
{ 4, 0, printargs, "lookup_dcookie" }, /* 406 */
{ 5, 0, NULL, NULL }, /* 403 */
{ 5, 0, NULL, NULL }, /* 404 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 405 */
{ 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 406 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 407 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 408 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 409 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages" }, /* 410 */
{ 1, 0, printargs, "set_tid_address" }, /* 411 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 410 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 411 */
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 412 */
{ 4, TD, printargs, "fadvise" }, /* 413 */
{ 4, TD, sys_fadvise64, "fadvise" }, /* 413 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 414 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 415 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 416 */
@ -456,28 +454,28 @@
{ 2, TF, sys_stat64, "stat64" }, /* 425 */
{ 2, TF, sys_lstat64, "lstat64" }, /* 426 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 427 */
{ 5, 0, printargs, "vserver" }, /* 428 ??? */
{ 5, 0, printargs, "mbind" }, /* 429 ??? */
{ 5, 0, printargs, "get_mempolicy" }, /* 430 ??? */
{ 5, 0, printargs, "set_mempolicy" }, /* 431 ??? */
{ 5, 0, sys_vserver, "vserver" }, /* 428 ??? */
{ 5, TM, printargs, "mbind" }, /* 429 ??? */
{ 5, TM, printargs, "get_mempolicy" }, /* 430 ??? */
{ 5, TM, printargs, "set_mempolicy" }, /* 431 ??? */
{ 4, 0, sys_mq_open, "mq_open" }, /* 432 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 433 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 434 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 435 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 436 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 437 */
{ 4, 0, printargs, "waitid" }, /* 438 */
{ 5, 0, printargs, "add_key" }, /* 439 */
{ 4, 0, printargs, "request_key" }, /* 440 */
{ 5, 0, printargs, "keyctl" }, /* 441 */
{ 3, 0, printargs, "ioprio_set" }, /* 442 */
{ 2, 0, printargs, "ioprio_get" }, /* 443 */
{ 0, TD, printargs, "inotify_init" }, /* 444 */
{ 5, TP, sys_waitid, "waitid" }, /* 438 */
{ 5, 0, sys_add_key, "add_key" }, /* 439 */
{ 4, 0, sys_request_key, "request_key" }, /* 440 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 441 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 442 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 443 */
{ 0, TD, sys_inotify_init, "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, 0, sys_kexec_load, "kexec_load" }, /* 448 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 449 */
{ 4, TD|TF, sys_openat, "openat" }, /* 450 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 451 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 452 */
@ -494,21 +492,21 @@
{ 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 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 466 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 467 */
{ 6, TD, sys_splice, "splice" }, /* 468 */
{ 4, TD, sys_sync_file_range, "sync_file_range" }, /* 469 */
{ 4, TD, sys_tee, "tee" }, /* 470 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 471 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 472 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 473 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 474 */
{ 6, 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, TD, sys_fallocate, "fallocate" }, /* 480 */
{ 4, TD, 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 */
@ -518,10 +516,21 @@
{ 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 */
{ 2, TD, printargs, "fanotify_init" }, /* 494 */
{ 5, TD|TF, printargs, "fanotify_mark" }, /* 495 */
{ 4, 0, printargs, "prlimit64" }, /* 496 */
{ 4, TD, sys_preadv, "preadv" }, /* 490 */
{ 4, TD, sys_pwritev, "pwritev" }, /* 491 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 492 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 493 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 494 */
{ 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 495 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 496 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 497 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 498 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 499 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 500 */
{ 2, TD, sys_setns, "setns" }, /* 501 */
{ 4, TN, sys_accept4, "accept4" }, /* 502 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 503 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 504 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 505 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 506 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 507 */

1
linux/arc/ioctlent.h.in Normal file
View File

@ -0,0 +1 @@
#include "../i386/ioctlent.h.in"

264
linux/arc/syscallent.h Normal file
View File

@ -0,0 +1,264 @@
{ 2, 0, sys_io_setup, "io_setup" }, /* 0 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 2 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 5 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 8 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 11 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 12 */
{ 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 14 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 17 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */
{ 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */
{ 1, TD, sys_dup, "dup" }, /* 23 */
{ 3, TD, sys_dup3, "dup3" }, /* 24 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 25 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 29 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */
{ 2, TD, sys_flock, "flock" }, /* 32 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 37 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 38 */
{ 2, TF, sys_umount2, "umount2" }, /* 39 */
{ 5, TF, sys_mount, "mount" }, /* 40 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */
{ }, /* 42 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 43 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 44 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 45 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 46 */
{ 6, TD, sys_fallocate, "fallocate" }, /* 47 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */
{ 1, TF, sys_chdir, "chdir" }, /* 49 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 50 */
{ 1, TF, sys_chroot, "chroot" }, /* 51 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 52 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */
{ 3, TD, sys_fchown, "fchown" }, /* 55 */
{ 4, TD|TF, sys_openat, "openat" }, /* 56 */
{ 1, TD, sys_close, "close" }, /* 57 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 58 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 59 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 60 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 61 */
{ 5, TD, sys_llseek, "_llseek" }, /* 62 */
{ 3, TD, sys_read, "read" }, /* 63 */
{ 3, TD, sys_write, "write" }, /* 64 */
{ 3, TD, sys_readv, "readv" }, /* 65 */
{ 3, TD, sys_writev, "writev" }, /* 66 */
{ 5, TD, sys_pread, "pread64" }, /* 67 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 68 */
{ 5, TD, sys_preadv, "preadv" }, /* 69 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 70 */
{ 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 72 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 73 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */
{ 6, TD, sys_splice, "splice" }, /* 76 */
{ 4, TD, sys_tee, "tee" }, /* 77 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */
{ 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 79 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 80 */
{ 0, 0, sys_sync, "sync" }, /* 81 */
{ 1, TD, sys_fsync, "fsync" }, /* 82 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */
{ 1, TF, sys_acct, "acct" }, /* 89 */
{ 2, 0, sys_capget, "capget" }, /* 90 */
{ 2, 0, sys_capset, "capset" }, /* 91 */
{ 1, 0, sys_personality, "personality" }, /* 92 */
{ 1, TP|SE, sys_exit, "exit" }, /* 93 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 94 */
{ 5, TP, sys_waitid, "waitid" }, /* 95 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */
{ 1, TP, sys_unshare, "unshare" }, /* 97 */
{ 6, 0, sys_futex, "futex" }, /* 98 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 102 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 103 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */
{ 3, 0, sys_init_module, "init_module" }, /* 105 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 106 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 107 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */
{ 3, 0, sys_syslog, "syslog" }, /* 116 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 117 */
{ 2, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */
{ 1, 0, sys_sched_get_priority_max, "sched_get_priority_max"}, /* 125 */
{ 1, 0, sys_sched_get_priority_min, "sched_get_priority_min"}, /* 126 */
{ 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */
{ 2, TS, sys_kill, "kill" }, /* 129 */
{ 2, TS, sys_kill, "tkill" }, /* 130 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 131 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 140 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 141 */
{ 4, 0, sys_reboot, "reboot" }, /* 142 */
{ 2, 0, sys_setregid, "setregid" }, /* 143 */
{ 1, 0, sys_setgid, "setgid" }, /* 144 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 145 */
{ 1, 0, sys_setuid, "setuid" }, /* 146 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 147 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 148 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 149 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 150 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */
{ 1, 0, sys_times, "times" }, /* 153 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 154 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 155 */
{ 1, 0, sys_getsid, "getsid" }, /* 156 */
{ 0, 0, sys_setsid, "setsid" }, /* 157 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 158 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 159 */
{ 1, 0, sys_uname, "uname" }, /* 160 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 161 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 165 */
{ 1, 0, sys_umask, "umask" }, /* 166 */
{ 5, 0, sys_prctl, "prctl" }, /* 167 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 168 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */
{ 0, 0, sys_getpid, "getpid" }, /* 172 */
{ 0, 0, sys_getppid, "getppid" }, /* 173 */
{ 0, NF, sys_getuid, "getuid" }, /* 174 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 175 */
{ 0, NF, sys_getgid, "getgid" }, /* 176 */
{ 0, NF, sys_getegid, "getegid" }, /* 177 */
{ 0, 0, sys_gettid, "gettid" }, /* 178 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 180 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */
{ 2, TI, sys_msgget, "msgget" }, /* 186 */
{ 3, TI, sys_msgctl, "msgctl" }, /* 187 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */
{ 3, TI, sys_semget, "semget" }, /* 190 */
{ 4, TI, sys_semctl, "semctl" }, /* 191 */
{ 4, TI, sys_semtimedop, "semtimedop" }, /* 192 */
{ 3, TI, sys_semop, "semop" }, /* 193 */
{ 3, TI, sys_shmget, "shmget" }, /* 194 */
{ 3, TI, sys_shmctl, "shmctl" }, /* 195 */
{ 3, TI|TM|SI, sys_shmat, "shmat" }, /* 196 */
{ 1, TI|TM|SI, sys_shmdt, "shmdt" }, /* 197 */
{ 3, TN, sys_socket, "socket" }, /* 198 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 199 */
{ 3, TN, sys_bind, "bind" }, /* 200 */
{ 2, TN, sys_listen, "listen" }, /* 201 */
{ 3, TN, sys_accept, "accept" }, /* 202 */
{ 3, TN, sys_connect, "connect" }, /* 203 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 204 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 205 */
{ 6, TN, sys_sendto, "sendto" }, /* 206 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 210 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */
{ 4, TD, sys_readahead, "readahead" }, /* 213 */
{ 1, TM|SI, sys_brk, "brk" }, /* 214 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 215 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 216 */
{ 5, 0, sys_add_key, "add_key" }, /* 217 */
{ 4, 0, sys_request_key, "request_key" }, /* 218 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 219 */
{ 5, TP, sys_clone, "clone" }, /* 220 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 221 */
{ 6, TD|TM|SI, sys_mmap, "mmap2" }, /* 222 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 223 */
{ 2, TF, sys_swapon, "swapon" }, /* 224 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 225 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 226 */
{ 3, TM, sys_msync, "msync" }, /* 227 */
{ 2, TM, sys_mlock, "mlock" }, /* 228 */
{ 2, TM, sys_munlock, "munlock" }, /* 229 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 230 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 231 */
{ 3, TM, sys_mincore, "mincore" }, /* 232 */
{ 3, TM, sys_madvise, "madvise" }, /* 233 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 234 */
{ 6, TM, sys_mbind, "mbind" }, /* 235 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 239 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */
{ 4, TN, sys_accept4, "accept4" }, /* 242 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */
{ 3, 0, printargs, "arc_cacheflush" }, /* 244 */
{ 1, 0, printargs, "arc_settls" }, /* 245 */
{ 0, 0, printargs, "arc_gettls" }, /* 246 */
[247 ... 259] = { },
{ 4, TP, sys_wait4, "wait4" }, /* 260 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */
{ 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 267 */
{ 2, TD, sys_setns, "setns" }, /* 268 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 272 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 273 */

View File

@ -1,2 +0,0 @@
/* Our second set comes from the i386 files. */
#include "linux/ioctlent.h"

View File

@ -1,2 +0,0 @@
/* Our second set comes from the i386 files. */
#include "../signalent.h"

View File

@ -24,30 +24,28 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
{ 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */
{ 1, TP, sys_exit, "exit" }, /* 1 */
{ 1, TP|SE, sys_exit, "exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, 0, sys_read, "read" }, /* 3 */
{ 3, 0, sys_write, "write" }, /* 4 */
{ 3, TF, sys_open, "open" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 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, TF, sys_creat, "creat" }, /* 8 */
{ 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 */
{ 3, TF|TP|SE|SI, 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 */
{ 0, 0, sys_break, "break" }, /* 17 */
{ 0, TM, sys_break, "break" }, /* 17 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 18 */
{ 3, 0, sys_lseek, "lseek" }, /* 19 */
{ 3, TD, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 5, TF, sys_mount, "mount" }, /* 21 */
{ 1, TF, sys_umount, "oldumount" }, /* 22 */
@ -56,7 +54,7 @@
{ 1, 0, sys_stime, "stime" }, /* 25 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 1, 0, sys_alarm, "alarm" }, /* 27 */
{ 2, 0, sys_oldfstat, "oldfstat" }, /* 28 */
{ 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
{ 0, TS, sys_pause, "pause" }, /* 29 */
{ 2, TF, sys_utime, "utime" }, /* 30 */
{ 2, 0, sys_stty, "stty" }, /* 31 */
@ -69,11 +67,11 @@
{ 2, TF, sys_rename, "rename" }, /* 38 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 39 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 40 */
{ 1, 0, sys_dup, "dup" }, /* 41 */
{ 1, 0, sys_pipe, "pipe" }, /* 42 */
{ 1, TD, sys_dup, "dup" }, /* 41 */
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 0, 0, sys_prof, "prof" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, TM|SI, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, NF, sys_getgid, "getgid" }, /* 47 */
{ 3, TS, sys_signal, "signal" }, /* 48 */
@ -82,8 +80,8 @@
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 2, TF, sys_umount2, "umount" }, /* 52 */
{ 0, 0, sys_lock, "lock" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 55 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 55 */
{ 0, 0, sys_mpx, "mpx" }, /* 56 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 57 */
{ 2, 0, sys_ulimit, "ulimit" }, /* 58 */
@ -91,13 +89,13 @@
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, 0, sys_ustat, "ustat" }, /* 62 */
{ 2, 0, sys_dup2, "dup2" }, /* 63 */
{ 2, TD, sys_dup2, "dup2" }, /* 63 */
{ 0, 0, sys_getppid, "getppid" }, /* 64 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 67 */
{ 0, TS, sys_siggetmask, "siggetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 69 */
{ 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
@ -110,33 +108,33 @@
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 80 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 81 */
{ 1, 0, sys_oldselect, "oldselect" }, /* 82 */
{ 1, TD, sys_oldselect, "oldselect" }, /* 82 */
{ 2, TF, sys_symlink, "symlink" }, /* 83 */
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, TF, sys_uselib, "uselib" }, /* 86 */
{ 1, TF, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, 0, sys_readdir, "readdir" }, /* 89 */
{ 6, TD, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_swapon, "swapon" }, /* 87 */
{ 4, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, TD, sys_readdir, "readdir" }, /* 89 */
{ 1, TD|TM|SI, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 94 */
{ 3, 0, sys_fchown, "fchown" }, /* 95 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 94 */
{ 3, TD, sys_fchown, "fchown" }, /* 95 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 96 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 97 */
{ 4, 0, sys_profil, "profil" }, /* 98 */
{ 2, TF, sys_statfs, "statfs" }, /* 99 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 101 */
{ 2, 0, sys_socketcall, "socketcall" }, /* 102 */
{ 2, TD, sys_socketcall, "socketcall" }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
{ 2, TF, sys_stat, "stat" }, /* 106 */
{ 2, TF, sys_lstat, "lstat" }, /* 107 */
{ 2, 0, sys_fstat, "fstat" }, /* 108 */
{ 2, TD, sys_fstat, "fstat" }, /* 108 */
{ 1, 0, sys_olduname, "olduname" }, /* 109 */
{ 1, 0, sys_iopl, "iopl" }, /* 110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
@ -145,43 +143,43 @@
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 6, 0, sys_ipc, "ipc" }, /* 117 */
{ 1, 0, sys_fsync, "fsync" }, /* 118 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 6, TI, sys_ipc, "ipc" }, /* 117 */
{ 1, TD, sys_fsync, "fsync" }, /* 118 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 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 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */
{ 5, 0, sys_llseek, "_llseek" }, /* 140 */
{ 3, 0, sys_getdents, "getdents" }, /* 141 */
{ 5, 0, sys_select, "select" }, /* 142 */
{ 2, 0, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 3, 0, sys_readv, "readv" }, /* 145 */
{ 3, 0, sys_writev, "writev" }, /* 146 */
{ 5, TD, sys_llseek, "_llseek" }, /* 140 */
{ 3, TD, sys_getdents, "getdents" }, /* 141 */
{ 5, TD, sys_select, "select" }, /* 142 */
{ 2, TD, sys_flock, "flock" }, /* 143 */
{ 3, TM, sys_msync, "msync" }, /* 144 */
{ 3, TD, sys_readv, "readv" }, /* 145 */
{ 3, TD, sys_writev, "writev" }, /* 146 */
{ 1, 0, sys_getsid, "getsid" }, /* 147 */
{ 1, 0, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
{ 2, 0, sys_mlock, "mlock" }, /* 150 */
{ 2, 0, sys_munlock, "munlock" }, /* 151 */
{ 2, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 2, TM, sys_mlock, "mlock" }, /* 150 */
{ 2, TM, sys_munlock, "munlock" }, /* 151 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 152 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 153 */
{ 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */
@ -191,26 +189,26 @@
{ 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 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
{ 5, 0, sys_vm86, "vm86" }, /* 166 */
{ 5, 0, sys_query_module, "query_module" }, /* 167 */
{ 3, 0, sys_poll, "poll" }, /* 168 */
{ 3, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, TD, sys_poll, "poll" }, /* 168 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 171 */
{ 5, 0, sys_prctl, "prctl" }, /* 172 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
{ 5, TF, sys_pread, "pread" }, /* 180 */
{ 5, TF, sys_pwrite, "pwrite" }, /* 181 */
{ 6, TD, sys_pread, "pread" }, /* 180 */
{ 6, TD, sys_pwrite, "pwrite" }, /* 181 */
{ 3, TF, sys_chown, "chown" }, /* 182 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 183 */
{ 2, 0, sys_capget, "capget" }, /* 184 */
@ -221,12 +219,12 @@
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
{ 0, TP, sys_vfork, "vfork" }, /* 190 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
{ 6, TD, sys_mmap, "mmap2" }, /* 192 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 193 */
{ 3, TF, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 6, TD|TM|SI, sys_mmap_pgoff, "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, TF, sys_fstat64, "fstat64" }, /* 197 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 197 */
{ 3, TF, sys_chown, "lchown32" }, /* 198 */
{ 0, NF, sys_getuid, "getuid32" }, /* 199 */
@ -237,7 +235,7 @@
{ 2, 0, sys_setregid, "setregid32" }, /* 204 */
{ 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
{ 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
{ 3, 0, sys_fchown, "fchown32" }, /* 207 */
{ 3, TD, sys_fchown, "fchown32" }, /* 207 */
{ 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
{ 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
{ 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
@ -247,18 +245,18 @@
{ 1, 0, sys_setgid, "setgid32" }, /* 214 */
{ 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
{ 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
{ 3, 0, sys_getdents64, "getdents64" }, /* 217 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 217 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 218 */
{ 3, 0, printargs, "mincore" }, /* 219 */
{ 3, 0, sys_madvise, "madvise" }, /* 220 */
{ 3, 0, sys_fcntl, "fcntl64" }, /* 221 */
{ 5, 0, printargs, "SYS_222" }, /* 222 */
{ 5, 0, printargs, "SYS_223" }, /* 223 */
{ 0, 0, printargs, "gettid" }, /* 224 */
{ 4, 0, sys_readahead, "readahead" }, /* 225 */
{ 3, TM, sys_mincore, "mincore" }, /* 219 */
{ 3, TM, sys_madvise, "madvise" }, /* 220 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 221 */
{ 5, 0, NULL, NULL }, /* 222 */
{ 5, 0, NULL, NULL }, /* 223 */
{ 0, 0, sys_gettid, "gettid" }, /* 224 */
{ 5, TD, sys_readahead, "readahead" }, /* 225 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 226 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */
{ 5, 0, sys_fsetxattr, "fsetxattr" }, /* 228 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 229 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */
@ -273,20 +271,20 @@
{ 6, 0, sys_futex, "futex" }, /* 240 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 241 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 242 */
{ 2, 0, printargs, "io_setup" }, /* 243 */
{ 1, 0, printargs, "io_destroy" }, /* 244 */
{ 5, 0, printargs, "io_getevents" }, /* 245 */
{ 3, 0, printargs, "io_submit" }, /* 246 */
{ 3, 0, printargs, "io_cancel" }, /* 247 */
{ 1, TP, sys_exit, "exit_group" }, /* 248 */
{ 4, 0, printargs, "lookup_dcookie"}, /* 249 */
{ 1, TD, printargs, "epoll_create" }, /* 250 */
{ 4, 0, printargs, "epoll_ctl" }, /* 251 */
{ 4, 0, printargs, "epoll_wait" }, /* 252 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 253 */
{ 5, 0, printargs, "SYS_254" }, /* 254 */
{ 5, 0, printargs, "SYS_255" }, /* 255 */
{ 1, 0, printargs, "set_tid_address"}, /* 256 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 243 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 244 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 245 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 246 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 247 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 248 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 249 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 250 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 251 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 252 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages"}, /* 253 */
{ 5, 0, NULL, NULL }, /* 254 */
{ 5, 0, NULL, NULL }, /* 255 */
{ 1, 0, sys_set_tid_address, "set_tid_address"}, /* 256 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 257 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 258 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 259 */
@ -297,7 +295,7 @@
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 264 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 265 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 266 */
{ 3, 0, sys_fstatfs64, "fstatfs64" }, /* 267 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 267 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 268 */
{ 2, TF, sys_utimes, "utimes" }, /* 269 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 270 */
@ -335,23 +333,23 @@
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 302 */
{ 4, TI, sys_msgget, "msgget" }, /* 303 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 304 */
{ 4, TI, sys_shmat, "shmat" }, /* 305 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 306 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 305 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 306 */
{ 4, TI, sys_shmget, "shmget" }, /* 307 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 308 */
{ 5, 0, printargs, "add_key" }, /* 309 */
{ 4, 0, printargs, "request_key" }, /* 310 */
{ 5, 0, printargs, "keyctl" }, /* 311 */
{ 5, 0, sys_add_key, "add_key" }, /* 309 */
{ 4, 0, sys_request_key, "request_key" }, /* 310 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 311 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 312 */
{ 5, 0, printargs, "vserver" }, /* 313 */
{ 3, 0, printargs, "ioprio_set" }, /* 314 */
{ 2, 0, printargs, "ioprio_get" }, /* 315 */
{ 0, TD, printargs, "inotify_init" }, /* 316 */
{ 5, 0, sys_vserver, "vserver" }, /* 313 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 314 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 315 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 316 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 317 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 318 */
{ 6, 0, sys_mbind, "mbind" }, /* 319 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 320 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 321 */
{ 6, TM, sys_mbind, "mbind" }, /* 319 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 320 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 321 */
{ 4, TD|TF, sys_openat, "openat" }, /* 322 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 323 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 324 */
@ -368,16 +366,16 @@
{ 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 */
{ 6, TD, printargs, "splice" }, /* 340 */
{ 5, 0, printargs, "SYS_341" }, /* 341 */
{ 4, TD, printargs, "tee" }, /* 342 */
{ 4, TD, printargs, "vmsplice" }, /* 343 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 344 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 338 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 339 */
{ 6, TD, sys_splice, "splice" }, /* 340 */
{ 6, TD, sys_sync_file_range2, "sync_file_range2"}, /* 341 */
{ 4, TD, sys_tee, "tee" }, /* 342 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 343 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 344 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 345 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 346 */
{ 5, 0, printargs, "kexec_load" }, /* 347 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 346 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 347 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 348 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 349 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 350 */
@ -391,51 +389,51 @@
{ 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, TD, sys_preadv, "preadv" }, /* 361 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 362 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 363 */
{ 5, TD, sys_perf_event_open, "perf_event_open"}, /* 364 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 365 */
{ 4, TN, sys_accept4, "accept4" }, /* 366 */
{ 2, TD, printargs, "fanotify_init" }, /* 367 */
{ 5, TD|TF, printargs, "fanotify_mark" }, /* 368 */
{ 4, 0, printargs, "prlimit64" }, /* 369 */
{ 5, 0, printargs, "SYS_370" }, /* 370 */
{ 5, 0, printargs, "SYS_371" }, /* 371 */
{ 5, 0, printargs, "SYS_372" }, /* 372 */
{ 5, 0, printargs, "SYS_373" }, /* 373 */
{ 5, 0, printargs, "SYS_374" }, /* 374 */
{ 5, 0, printargs, "SYS_375" }, /* 375 */
{ 5, 0, printargs, "SYS_376" }, /* 376 */
{ 5, 0, printargs, "SYS_377" }, /* 377 */
{ 5, 0, printargs, "SYS_378" }, /* 378 */
{ 5, 0, printargs, "SYS_379" }, /* 379 */
{ 5, 0, printargs, "SYS_380" }, /* 380 */
{ 5, 0, printargs, "SYS_381" }, /* 381 */
{ 5, 0, printargs, "SYS_382" }, /* 382 */
{ 5, 0, printargs, "SYS_383" }, /* 383 */
{ 5, 0, printargs, "SYS_384" }, /* 384 */
{ 5, 0, printargs, "SYS_385" }, /* 385 */
{ 5, 0, printargs, "SYS_386" }, /* 386 */
{ 5, 0, printargs, "SYS_387" }, /* 387 */
{ 5, 0, printargs, "SYS_388" }, /* 388 */
{ 5, 0, printargs, "SYS_389" }, /* 389 */
{ 5, 0, printargs, "SYS_390" }, /* 390 */
{ 5, 0, printargs, "SYS_391" }, /* 391 */
{ 5, 0, printargs, "SYS_392" }, /* 392 */
{ 5, 0, printargs, "SYS_393" }, /* 393 */
{ 5, 0, printargs, "SYS_394" }, /* 394 */
{ 5, 0, printargs, "SYS_395" }, /* 395 */
{ 5, 0, printargs, "SYS_396" }, /* 396 */
{ 5, 0, printargs, "SYS_397" }, /* 397 */
{ 5, 0, printargs, "SYS_398" }, /* 398 */
{ 5, 0, printargs, "SYS_399" }, /* 399 */
#ifndef __ARM_EABI__
#if SYS_socket_subcall != 400
#error fix me
#endif
{ 8, 0, printargs, "socket_subcall"}, /* 400 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 367 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 368 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 369 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 370 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 371 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 372 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 373 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 374 */
{ 2, TD, sys_setns, "setns" }, /* 375 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 376 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 377 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 378 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 379 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 380 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 381 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 382 */
#ifdef __ARM_EABI__
# define ARM_LAST_ORDINARY_SYSCALL 382
#else
{ 5, 0, NULL, NULL }, /* 383 */
{ 5, 0, NULL, NULL }, /* 384 */
{ 5, 0, NULL, NULL }, /* 385 */
{ 5, 0, NULL, NULL }, /* 386 */
{ 5, 0, NULL, NULL }, /* 387 */
{ 5, 0, NULL, NULL }, /* 388 */
{ 5, 0, NULL, NULL }, /* 389 */
{ 5, 0, NULL, NULL }, /* 390 */
{ 5, 0, NULL, NULL }, /* 391 */
{ 5, 0, NULL, NULL }, /* 392 */
{ 5, 0, NULL, NULL }, /* 393 */
{ 5, 0, NULL, NULL }, /* 394 */
{ 5, 0, NULL, NULL }, /* 395 */
{ 5, 0, NULL, NULL }, /* 396 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
#define SYS_socket_subcall 400
#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 3, TN, sys_connect, "connect" }, /* 403 */
@ -451,14 +449,14 @@
{ 2, TN, sys_shutdown, "shutdown" }, /* 413 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
#if SYS_ipc_subcall != 420
#error fix me
#endif
# if SYS_ipc_subcall != 420
# error fix me
# endif
{ 4, 0, printargs, "ipc_subcall" }, /* 420 */
{ 4, TI, sys_semop, "semop" }, /* 421 */
{ 4, TI, sys_semget, "semget" }, /* 422 */
@ -480,8 +478,26 @@
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */
#endif
# define ARM_LAST_ORDINARY_SYSCALL 444
#endif /* !EABI */
/* __ARM_NR_cmpxchg (0x000ffff0).
* Remapped by shuffle_scno() to be directly after ordinary syscalls
* in this table.
*/
{ 5, 0, printargs, "cmpxchg" },
/* ARM specific syscalls. Encoded with scno 0x000f00xx.
* Remapped by shuffle_scno() to be directly after __ARM_NR_cmpxchg.
*/
{ 5, 0, NULL, NULL }, /* 0 */
{ 5, 0, printargs, "breakpoint" }, /* 1 */
{ 5, 0, printargs, "cacheflush" }, /* 2 */
{ 5, 0, printargs, "usr26" }, /* 3 */
{ 5, 0, printargs, "usr32" }, /* 4 */
{ 5, 0, printargs, "set_tls" }, /* 5 */
#define ARM_LAST_SPECIAL_SYSCALL 5

View File

@ -1,7 +0,0 @@
/* ARM specific syscalls */
{ 5, 0, printargs, "SYS_0" }, /* 0 */
{ 5, 0, printargs, "breakpoint" }, /* 1 */
{ 5, 0, printargs, "cacheflush" }, /* 2 */
{ 5, 0, printargs, "usr26" }, /* 3 */
{ 5, 0, printargs, "usr32" }, /* 4 */
{ 5, 0, printargs, "set_tls" }, /* 5 */

View File

@ -23,12 +23,10 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
{ 0, 0, sys_setup, "setup" }, /* 0 */
{ 1, TP, sys_exit, "_exit" }, /* 1 */
{ 1, TP|SE, sys_exit, "_exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, TD, sys_read, "read" }, /* 3 */
{ 3, TD, sys_write, "write" }, /* 4 */
@ -38,7 +36,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 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, 0, sys_time, "time" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
@ -72,7 +70,7 @@
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 5, TP, sys_clone, "clone" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, TM|SI, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, NF, sys_getgid, "getgid" }, /* 47 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 48 */
@ -84,7 +82,7 @@
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 55 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 56 */
{ 5, 0, sys_mremap, "mremap" }, /* 57 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 57 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 58 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 59 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 60 */
@ -94,8 +92,8 @@
{ 0, 0, sys_getppid, "getppid" }, /* 64 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 67 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 68 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 67 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 68 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 69 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 70 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 71 */
@ -115,10 +113,10 @@
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 5, TD, sys_pread, "pread" }, /* 86 */
{ 5, TD, sys_pwrite, "pwrite" }, /* 87 */
{ 1, TF, sys_swapon, "swapon" }, /* 88 */
{ 3, 0, sys_reboot, "reboot" }, /* 89 */
{ 6, TD, sys_mmap, "mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_swapon, "swapon" }, /* 88 */
{ 4, 0, sys_reboot, "reboot" }, /* 89 */
{ 6, TD|TM|SI, sys_mmap_pgoff, "mmap" }, /* 90 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 94 */
@ -135,16 +133,16 @@
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 106 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 107 */
{ 6, 0, sys_ipc, "ipc" }, /* 108 */
{ 6, TI, sys_ipc, "ipc" }, /* 108 */
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 109 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 110 */
{ 1, 0, sys_uname, "uname" }, /* 111 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 112 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 113 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 113 */
{ 0, TP, sys_vfork, "vfork" }, /* 114 */
{ 3, 0, sys_init_module, "init_module" }, /* 115 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 116 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 117 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 117 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 118 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 119 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 120 */
@ -152,16 +150,16 @@
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 122 */
{ 3, TD, sys_getdents, "getdents" }, /* 123 */
{ 2, TD, sys_flock, "flock" }, /* 124 */
{ 3, 0, sys_msync, "msync" }, /* 125 */
{ 3, TM, sys_msync, "msync" }, /* 125 */
{ 3, TD, sys_readv, "readv" }, /* 126 */
{ 3, TD, sys_writev, "writev" }, /* 127 */
{ 1, 0, sys_getsid, "getsid" }, /* 128 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 129 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 130 */
{ 2, 0, sys_mlock, "mlock" }, /* 131 */
{ 2, 0, sys_munlock, "munlock" }, /* 132 */
{ 2, 0, sys_mlockall, "mlockall" }, /* 133 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 134 */
{ 2, TM, sys_mlock, "mlock" }, /* 131 */
{ 2, TM, sys_munlock, "munlock" }, /* 132 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 133 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 134 */
{ 0, 0, sys_sched_setparam, "sched_setparam"}, /* 135 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 136 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 137 */
@ -172,7 +170,7 @@
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 142 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 143 */
{ 3, TD, sys_poll, "poll" }, /* 144 */
{ 3, 0, printargs, "nfsservctl" }, /* 145 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 145 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 146 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 147 */
{ 5, 0, sys_prctl, "prctl" }, /* 148 */
@ -191,19 +189,19 @@
{ 2, TN, sys_shutdown, "shutdown" }, /* 161 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 162 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 163 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 164 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 165 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 164 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 165 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 166 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 167 */
{ 2, TF, sys_stat64, "stat64" }, /* 168 */
{ 2, TF, sys_lstat64, "lstat64" }, /* 169 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 170 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 171 */
{ 3, 0, printargs, "mincore" }, /* 172 */
{ 3, 0, sys_madvise, "madvise" }, /* 173 */
{ 3, TM, sys_mincore, "mincore" }, /* 172 */
{ 3, TM, sys_madvise, "madvise" }, /* 173 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 174 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 175 */
{ 0, 0, printargs, "gettid" }, /* 176 */
{ 0, 0, sys_gettid, "gettid" }, /* 176 */
{ 4, TD, sys_readahead, "readahead" }, /* 177 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 178 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 179 */
@ -217,7 +215,7 @@
{ 2, TF, sys_removexattr, "removexattr" }, /* 187 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 188 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 189 */
{ 2, 0, sys_kill, "tkill" }, /* 190 */
{ 2, TS, sys_kill, "tkill" }, /* 190 */
{ 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 191 */
{ 6, 0, sys_futex, "futex" }, /* 192 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 193 */
@ -230,13 +228,13 @@
{ 3, 0, sys_io_submit, "io_submit" }, /* 200 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 201 */
{ 5, TD, sys_fadvise64, "fadvise64" }, /* 202 */
{ 1, TP, sys_exit, "exit_group" }, /* 203 */
{ 4, 0, printargs, "lookup_dcookie"}, /* 204 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 203 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 204 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 205 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 206 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 207 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 208 */
{ 1, 0, printargs, "set_tid_address"}, /* 209 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages"}, /* 208 */
{ 1, 0, sys_set_tid_address, "set_tid_address"}, /* 209 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 210 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 211 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 212 */
@ -249,25 +247,25 @@
{ 3, TF, sys_statfs64, "statfs64" }, /* 219 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 220 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 221 */
{ 5, 0, printargs, "SYS_222" }, /* 222 */
{ 5, 0, NULL, NULL }, /* 222 */
{ 2, TF, sys_utimes, "utimes" }, /* 223 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 224 */
{ 3, 0, printargs, "cacheflush" }, /* 225 */
{ 5, 0, printargs, "vserver" }, /* 226 */
{ 5, 0, sys_vserver, "vserver" }, /* 226 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 227 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 228 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 229 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 230 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 231 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 232 */
{ 5, 0, printargs, "kexec_load" }, /* 233 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 233 */
{ 5, TP, sys_waitid, "waitid" }, /* 234 */
{ 5, 0, printargs, "add_key" }, /* 235 */
{ 4, 0, printargs, "request_key" }, /* 236 */
{ 5, 0, printargs, "keyctl" }, /* 237 */
{ 3, 0, printargs, "ioprio_set" }, /* 238 */
{ 2, 0, printargs, "ioprio_get" }, /* 239 */
{ 0, 0, printargs, "inotify_init" }, /* 240 */
{ 5, 0, sys_add_key, "add_key" }, /* 235 */
{ 4, 0, sys_request_key, "request_key" }, /* 236 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 237 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 238 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 239 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 240 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 241 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 242 */
{ 4, TD|TF, sys_openat, "openat" }, /* 243 */
@ -285,14 +283,14 @@
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 255 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 256 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 257 */
{ 1, TD, sys_unshare, "unshare" }, /* 258 */
{ 2, 0, printargs, "set_robust_list" }, /* 259 */
{ 3, 0, printargs, "get_robust_list" }, /* 260 */
{ 6, TD, printargs, "splice" }, /* 261 */
{ 4, TD, printargs, "sync_file_range" }, /* 262 */
{ 4, TD, printargs, "tee" }, /* 263 */
{ 4, TD, printargs, "vmsplice" }, /* 264 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 265 */
{ 1, TP, sys_unshare, "unshare" }, /* 258 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 259 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 260 */
{ 6, TD, sys_splice, "splice" }, /* 261 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 262 */
{ 4, TD, sys_tee, "tee" }, /* 263 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 264 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 265 */
{ 4, TI, sys_msgget, "msgget" }, /* 266 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 267 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 268 */
@ -301,11 +299,13 @@
{ 4, TI, sys_semop, "semop" }, /* 271 */
{ 4, TI, sys_semctl, "semctl" }, /* 272 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 273 */
{ 4, TI, sys_shmat, "shmat" }, /* 274 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 274 */
{ 4, TI, sys_shmget, "shmget" }, /* 275 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 276 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 276 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 277 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 278 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 279 */
{ 2, TD, sys_timerfd, "timerfd_create" }, /* 280 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 281 */
{ 5, 0, NULL, NULL }, /* 282 */
{ 2, TD, sys_setns, "setns" }, /* 283 */

View File

@ -1,86 +1,8 @@
{"asm/bfin_sport.h", "SPORT_IOC_CONFIG", 0x5001},
{"asm/bfin_sport.h", "SPORT_IOC_GET_SYSTEMCLOCK", 0x5002},
{"asm/bfin_sport.h", "SPORT_IOC_SET_BAUDRATE", 0x5003},
{"asm-generic/ioctls.h", "TCGETS", 0x5401},
{"asm-generic/ioctls.h", "TCSETS", 0x5402},
{"asm-generic/ioctls.h", "TCSETSW", 0x5403},
{"asm-generic/ioctls.h", "TCSETSF", 0x5404},
{"asm-generic/ioctls.h", "TCGETA", 0x5405},
{"asm-generic/ioctls.h", "TCSETA", 0x5406},
{"asm-generic/ioctls.h", "TCSETAW", 0x5407},
{"asm-generic/ioctls.h", "TCSETAF", 0x5408},
{"asm-generic/ioctls.h", "TCSBRK", 0x5409},
{"asm-generic/ioctls.h", "TCXONC", 0x540a},
{"asm-generic/ioctls.h", "TCFLSH", 0x540b},
{"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
{"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
{"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
{"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
{"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
{"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
{"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
{"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
{"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
{"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
{"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
{"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
{"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
{"asm-generic/ioctls.h", "FIONREAD", 0x541b},
{"asm-generic/ioctls.h", "TIOCLINUX", 0x541c},
{"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
{"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
{"asm-generic/ioctls.h", "FIONBIO", 0x5421},
{"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
{"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
{"asm-generic/ioctls.h", "TCSBRKP", 0x5425},
{"asm-generic/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
{"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
{"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
{"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
{"asm-generic/ioctls.h", "TCGETS2", 0x542a},
{"asm-generic/ioctls.h", "TCSETS2", 0x542b},
{"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
{"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
{"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
{"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
{"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
{"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
{"asm-generic/ioctls.h", "TCGETX", 0x5432},
{"asm-generic/ioctls.h", "TCSETX", 0x5433},
{"asm-generic/ioctls.h", "TCSETXF", 0x5434},
{"asm-generic/ioctls.h", "TCSETXW", 0x5435},
{"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
{"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
{"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
{"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
{"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455},
{"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
{"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459},
{"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a},
{"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d},
{"asm/ioctls.h", "FIOQSIZE", 0x545e},
{"asm-generic/ioctls.h", "TIOCGHAYESESP", 0x545e},
{"asm-generic/ioctls.h", "TIOCSHAYESESP", 0x545f},
{"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_SET_PERIOD", 0x7402},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_START", 0x7406},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_STOP", 0x7408},
{"asm/bfin_simple_timer.h", "BFIN_SIMPLE_TIMER_READ", 0x740a},
{"asm-generic/sockios.h", "FIOSETOWN", 0x8901},
{"asm-generic/sockios.h", "SIOCSPGRP", 0x8902},
{"asm-generic/sockios.h", "FIOGETOWN", 0x8903},
{"asm-generic/sockios.h", "SIOCGPGRP", 0x8904},
{"asm-generic/sockios.h", "SIOCATMARK", 0x8905},
{"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906},
{"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907},

View File

@ -24,12 +24,10 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
{ 1, TP, sys_exit, "_exit" }, /* 1 */
{ 1, TP|SE, sys_exit, "_exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, TD, sys_read, "read" }, /* 3 */
{ 3, TD, sys_write, "write" }, /* 4 */
@ -39,13 +37,13 @@
{ 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 */
{ 3, TF|TP|SE|SI, 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, "chown" }, /* 16 */
{ 0, 0, sys_break, "break" }, /* 17 */
{ 0, TM, sys_break, "break" }, /* 17 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 18 */
{ 3, TD, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
@ -73,7 +71,7 @@
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 0, 0, sys_prof, "prof" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, TM|SI, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, NF, sys_getgid, "getgid" }, /* 47 */
{ 3, TS, sys_signal, "signal" }, /* 48 */
@ -96,8 +94,8 @@
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 67 */
{ 0, TS, sys_siggetmask, "siggetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 69 */
{ 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
@ -115,11 +113,11 @@
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, TF, sys_uselib, "uselib" }, /* 86 */
{ 1, TF, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 2, TF, sys_swapon, "swapon" }, /* 87 */
{ 4, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, TD, sys_readdir, "readdir" }, /* 89 */
{ 6, TD, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 6, TD|TM|SI, printargs, "old_mmap" }, /* 90: not implemented in kernel */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 94 */
@ -145,25 +143,25 @@
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 6, 0, sys_ipc, "ipc" }, /* 117 */
{ 6, TI, sys_ipc, "ipc" }, /* 117 */
{ 1, TD, sys_fsync, "fsync" }, /* 118 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 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 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 3, 0, printargs, "sysfs" }, /* 135 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */
@ -172,16 +170,16 @@
{ 3, TD, sys_getdents, "getdents" }, /* 141 */
{ 5, TD, sys_select, "select" }, /* 142 */
{ 2, TD, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 3, TM, sys_msync, "msync" }, /* 144 */
{ 3, TD, sys_readv, "readv" }, /* 145 */
{ 3, TD, sys_writev, "writev" }, /* 146 */
{ 1, 0, sys_getsid, "getsid" }, /* 147 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
{ 2, 0, sys_mlock, "mlock" }, /* 150 */
{ 2, 0, sys_munlock, "munlock" }, /* 151 */
{ 2, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 2, TM, sys_mlock, "mlock" }, /* 150 */
{ 2, TM, sys_munlock, "munlock" }, /* 151 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 152 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 153 */
{ 0, 0, sys_sched_setparam, "sched_setparam" }, /* 154 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 155 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 156 */
@ -191,17 +189,17 @@
{ 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 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
{ 5, 0, sys_vm86, "vm86" }, /* 166 */
{ 5, 0, sys_query_module, "query_module" }, /* 167 */
{ 3, TD, sys_poll, "poll" }, /* 168 */
{ 3, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 171 */
{ 5, 0, sys_prctl, "prctl" }, /* 172 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 173 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 175 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
@ -220,7 +218,7 @@
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
{ 0, TP, sys_vfork, "vfork" }, /* 190 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
{ 6, TD, sys_mmap, "mmap2" }, /* 192 */
{ 6, TD|TM|SI, sys_mmap_pgoff, "mmap2" }, /* 192 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 193 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 2, TF, sys_stat64, "stat64" }, /* 195 */
@ -246,13 +244,13 @@
{ 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
{ 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
{ 3, 0, sys_mincore, "mincore" }, /* 218 */
{ 3, 0, sys_madvise, "madvise" }, /* 219 */
{ 3, TM, sys_mincore, "mincore" }, /* 218 */
{ 3, TM, sys_madvise, "madvise" }, /* 219 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 220 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 221 */
{ 4, 0, printargs, "SYS_222" }, /* 222 */
{ 5, 0, printargs, "security" }, /* 223 */
{ 0, 0, printargs, "gettid" }, /* 224 */
{ 4, 0, NULL, NULL }, /* 222 */
{ 5, 0, sys_security, "security" }, /* 223 */
{ 0, 0, sys_gettid, "gettid" }, /* 224 */
{ 4, TD, sys_readahead, "readahead" }, /* 225 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 226 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */
@ -280,14 +278,14 @@
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
{ 5, 0, printargs, "alloc_hugepages" }, /* 250 */
{ 1, 0, printargs, "free_hugepages" }, /* 251 */
{ 1, TP, sys_exit, "exit_group" }, /* 252 */
{ 4, 0, printargs, "lookup_dcookie" }, /* 253 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 252 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 253 */
{ 1, 0, printargs, "bfin_spinlock" }, /* 254 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 255 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 256 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 257 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages" }, /* 258 */
{ 1, 0, printargs, "set_tid_address" }, /* 259 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 258 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 259 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 260 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 261 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 262 */
@ -302,27 +300,27 @@
{ 3, TS, sys_tgkill, "tgkill" }, /* 271 */
{ 2, TF, sys_utimes, "utimes" }, /* 272 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 273 */
{ 5, 0, printargs, "vserver" }, /* 274 */
{ 6, 0, sys_mbind, "mbind" }, /* 275 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 276 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 277 */
{ 5, 0, sys_vserver, "vserver" }, /* 274 */
{ 6, TM, sys_mbind, "mbind" }, /* 275 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 276 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 277 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 278 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 279 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 280 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 281 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 282 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 283 */
{ 5, 0, printargs, "kexec_load" }, /* 284 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 284 */
{ 5, TP, sys_waitid, "waitid" }, /* 285 */
{ 5, 0, printargs, "add_key" }, /* 286 */
{ 4, 0, printargs, "request_key" }, /* 287 */
{ 5, 0, printargs, "keyctl" }, /* 288 */
{ 3, 0, printargs, "ioprio_set" }, /* 289 */
{ 2, 0, printargs, "ioprio_get" }, /* 290 */
{ 0, TD, printargs, "inotify_init" }, /* 291 */
{ 5, 0, sys_add_key, "add_key" }, /* 286 */
{ 4, 0, sys_request_key, "request_key" }, /* 287 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 288 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 289 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 290 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 291 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */
{ 4, 0, printargs, "migrate_pages" }, /* 294 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 294 */
{ 4, TD|TF, sys_openat, "openat" }, /* 295 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */
@ -351,9 +349,9 @@
{ 2, TN, sys_listen, "listen" }, /* 320 */
{ 4, TN, sys_recv, "recv" }, /* 321 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 322 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 323 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 323 */
{ 4, TN, sys_send, "send" }, /* 324 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 325 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 325 */
{ 6, TN, sys_sendto, "sendto" }, /* 326 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 327 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 328 */
@ -366,24 +364,24 @@
{ 4, TI, sys_msgget, "msgget" }, /* 335 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 336 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 337 */
{ 4, TI, sys_shmat, "shmat" }, /* 338 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 338 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 339 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 340 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 340 */
{ 4, TI, sys_shmget, "shmget" }, /* 341 */
{ 6, TD, printargs, "splice" }, /* 342 */
{ 4, TD, printargs, "sync_file_range" }, /* 343 */
{ 4, TD, printargs, "tee" }, /* 344 */
{ 4, TD, printargs, "vmsplice" }, /* 345 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 346 */
{ 6, TD, sys_splice, "splice" }, /* 342 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 343 */
{ 4, TD, sys_tee, "tee" }, /* 344 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 345 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 346 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 347 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 348 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 349 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 350 */
{ 5, 0, sys_pread, "pread64" }, /* 351 */
{ 5, 0, sys_pwrite, "pwrite64" }, /* 352 */
{ 5, TD, sys_pread, "pread64" }, /* 351 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 352 */
{ 5, TD, sys_fadvise64, "fadvise64" }, /* 353 */
{ 2, 0, printargs, "set_robust_list" }, /* 354 */
{ 3, 0, printargs, "get_robust_list" }, /* 355 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 354 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 355 */
{ 6, TD, sys_fallocate, "fallocate" }, /* 356 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 357 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 358 */
@ -394,12 +392,20 @@
{ 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, TD, printargs, "perf_event_open" }, /* 369 */
{ 5, TD, sys_preadv, "preadv" }, /* 366 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 367 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 368 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 369 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 370 */
{ 2, TD, printargs, "fanotify_init" }, /* 371 */
{ 5, TD|TF, printargs, "fanotify_mark" }, /* 372 */
{ 4, 0, printargs, "prlimit64" }, /* 373 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 371 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 372 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 373 */
{ 3, 0, sys_cacheflush, "cacheflush" }, /* 374 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 375 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 376 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 377 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 378 */
{ 2, TD, sys_setns, "setns" }, /* 379 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 380 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 381 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 382 */

View File

@ -24,202 +24,137 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
#ifndef HAVE_STRUCT___OLD_KERNEL_STAT
#define sys_oldfstat printargs
#define sys_oldstat printargs
#endif
/* still unfinished */
#define sys_ioperm printargs
#define sys_syslog printargs
#define sys_iopl printargs
#define sys_vm86old printargs
#define sys_get_kernel_syms printargs
#define sys_bdflush printargs
#define sys_kcmp printargs
#define sys_lookup_dcookie printargs
#define sys_name_to_handle_at printargs
#define sys_open_by_handle_at printargs
#define sys_sched_getattr printargs
#define sys_sched_setattr printargs
#define sys_sysfs printargs
#define sys_afs_syscall printargs
#define sys_vm86old printargs
#define sys_vm86 printargs
/* machine-specific */
#ifndef I386
#define sys_modify_ldt printargs
#ifndef M68K
#define sys_get_thread_area printargs
#define sys_set_thread_area printargs
#if !(defined I386 || defined X86_64 || defined X32)
# define sys_modify_ldt printargs
# ifndef M68K
# define sys_get_thread_area printargs
# ifndef MIPS
# define sys_set_thread_area printargs
# endif
# endif
#endif
#endif
#define sys_sched_yield printargs
#define sys_sched_get_priority_max sys_sched_get_priority_min
#define sys_sched_rr_get_interval printargs
/* like another call */
#define sys_uselib sys_chdir
#define sys_umount sys_chdir
#define sys_swapon sys_chdir
#define sys_swapoff sys_chdir
#define sys_delete_module sys_open
#define sys_acct sys_chdir
#define sys_chroot sys_chdir
#define sys_clock_getres sys_clock_gettime
#define sys_fchdir sys_close
#define sys_getgid sys_getuid
#define sys_fdatasync sys_close
#define sys_fsync sys_close
#define sys_getegid sys_getuid
#define sys_geteuid sys_getuid
#define sys_getgid sys_getuid
#define sys_getresgid sys_getresuid
#define sys_lstat sys_stat
#define sys_lstat64 sys_stat64
#define sys_mlock sys_munmap
#define sys_mq_unlink sys_chdir
#define sys_munlock sys_munmap
#define sys_oldlstat sys_oldstat
#define sys_pivotroot sys_link
#define sys_rename sys_link
#define sys_rmdir sys_chdir
#define sys_sched_get_priority_max sys_sched_get_priority_min
#define sys_set_robust_list sys_munmap
#define sys_setfsgid sys_setfsuid
#define sys_acct sys_chdir
#define sys_fdatasync sys_close
#define sys_mlock sys_munmap
#define sys_munlock sys_munmap
#define sys_clock_getres sys_clock_gettime
#define sys_mq_unlink sys_unlink
#define sys_setgid sys_setuid
#define sys_setregid sys_setreuid
#define sys_setresgid sys_setresuid
#define sys_swapoff sys_chdir
#define sys_symlink sys_link
#define sys_syncfs sys_close
#define sys_umount sys_chdir
#define sys_unlink sys_chdir
#define sys_uselib sys_chdir
#define sys_vfork sys_fork
/* printargs does the right thing */
#define sys_setup printargs
#define sys_getpid printargs
#define sys_pause printargs
#define sys_sync printargs
#define sys_getppid printargs
#define sys_getpgrp printargs
#define sys_setsid printargs
#define sys_vhangup printargs
#define sys_idle printargs
#define sys_getpgid printargs
#define sys_munlockall printargs
#define sys_timer_getoverrun printargs
#define sys_timer_delete printargs
#define sys_getpid printargs
#define sys_getppid printargs
#define sys_gettid printargs
#define sys_idle printargs
#define sys_inotify_init printargs
#define sys_munlockall printargs
#define sys_pause printargs
#define sys_rt_sigreturn printargs
#define sys_sched_yield printargs
#define sys_setsid printargs
#define sys_set_tid_address printargs
#define sys_setup printargs
#define sys_sync printargs
#define sys_timer_delete printargs
#define sys_timer_getoverrun printargs
#define sys_vhangup printargs
/* subcall entry points */
#define sys_socketcall printargs
#define sys_ipc printargs
/* printargs_lu/ld does the right thing */
#define sys_alarm printargs_lu
#define sys_getpgrp printargs_lu
#define sys_getsid printargs_lu
#define sys_nice printargs_ld
#define sys_setpgid printargs_lu
#define sys_setpgrp printargs_lu
/* unimplemented */
#define sys_stty printargs
#define sys_gtty printargs
#define sys_afs_syscall printargs
#define sys_break printargs
#define sys_ftime printargs
#define sys_prof printargs
#define sys_phys printargs
#define sys_get_kernel_syms printargs
#define sys_gtty printargs
#define sys_lock printargs
#define sys_mpx printargs
#define sys_ulimit printargs
#define sys_nfsservctl printargs
#define sys_phys printargs
#define sys_profil printargs
#define sys_prof printargs
#define sys_security printargs
#define sys_stty printargs
#define sys_tuxcall printargs
#define sys_ulimit printargs
#define sys_ustat printargs
#define sys_break printargs
#define sys_vserver printargs
/* deprecated */
#define sys_olduname printargs
#define sys_bdflush printargs
#define sys_oldolduname printargs
#define sys_olduname printargs
/* no library support */
#ifndef HAVE_SENDMSG
#define sys_sendmsg printargs
#define sys_recvmsg printargs
#define sys_recvmsg printargs
#define sys_sendmsg printargs
#endif
#ifndef SYS_getpmsg
#define sys_getpmsg printargs
/* Who has STREAMS syscalls?
* Linux hasn't. Solaris has (had?).
* Just in case I miss something, retain in for Sparc.
* Note: SYS_get/putpmsg may be defined even though syscalls
* return ENOSYS. Can't just check defined(SYS_getpmsg).
*/
#if (!defined(SPARC) && !defined(SPARC64)) || !defined(SYS_getpmsg)
#define sys_getpmsg printargs
#endif
#ifndef SYS_putpmsg
#define sys_putpmsg printargs
#endif
#ifndef HAVE_STRUCT___OLD_KERNEL_STAT
#define sys_oldstat printargs
#define sys_oldfstat printargs
#define sys_oldlstat printargs
#endif
#if DONE
#define sys_oldselect printargs
#define sys_msync printargs
#define sys_flock printargs
#define sys_getdents printargs
#define sys_stime printargs
#define sys_time printargs
#define sys_times printargs
#define sys_mount printargs
#define sys_nice printargs
#define sys_mprotect printargs
#define sys_sigprocmask printargs
#define sys_adjtimex printargs
#define sys_sysinfo printargs
#define sys_ipc printargs
#define sys_setdomainname printargs
#define sys_statfs printargs
#define sys_fstatfs printargs
#define sys_ptrace printargs
#define sys_sigreturn printargs
#define sys_fsync printargs
#define sys_alarm printargs
#define sys_socketcall printargs
#define sys_sigsuspend printargs
#define sys_utime printargs
#define sys_brk printargs
#define sys_mmap printargs
#define sys_munmap printargs
#define sys_select printargs
#define sys_setuid printargs
#define sys_setgid printargs
#define sys_setreuid printargs
#define sys_setregid printargs
#define sys_getgroups printargs
#define sys_setgroups printargs
#define sys_setrlimit printargs
#define sys_getrlimit printargs
#define sys_getrusage printargs
#define sys_getpriority printargs
#define sys_setpriority printargs
#define sys_setpgid printargs
#define sys_access printargs
#define sys_sethostname printargs
#define sys_readdir printargs
#define sys_waitpid printargs
#define sys_wait4 printargs
#define sys_execve printargs
#define sys_fork printargs
#define sys_uname printargs
#define sys_pipe printargs
#define sys_siggetmask printargs
#define sys_sigsetmask printargs
#define sys_exit printargs
#define sys_kill printargs
#define sys_signal printargs
#define sys_sigaction printargs
#define sys_sigpending printargs
#define sys_fcntl printargs
#define sys_dup printargs
#define sys_dup2 printargs
#define sys_close printargs
#define sys_ioctl printargs
#define sys_read printargs
#define sys_write printargs
#define sys_open printargs
#define sys_creat printargs
#define sys_link printargs
#define sys_unlink printargs
#define sys_chdir printargs
#define sys_mknod printargs
#define sys_chmod printargs
#define sys_chown printargs
#define sys_lseek printargs
#define sys_rename printargs
#define sys_mkdir printargs
#define sys_rmdir printargs
#define sys_umask printargs
#define sys_chroot printargs
#define sys_gettimeofday printargs
#define sys_settimeofday printargs
#define sys_symlink printargs
#define sys_readlink printargs
#define sys_truncate printargs
#define sys_ftruncate printargs
#define sys_fchmod printargs
#define sys_fchown printargs
#define sys_setitimer printargs
#define sys_getitimer printargs
#define sys_stat printargs
#define sys_lstat printargs
#define sys_fstat printargs
#define sys_personality printargs
#define sys_poll printargs
#define sys_create_module printargs
#define sys_init_module printargs
#define sys_quotactl printargs
#define sys_mlockall printargs
#define sys_reboot printargs
#if (!defined(SPARC) && !defined(SPARC64)) || !defined(SYS_putpmsg)
#define sys_putpmsg printargs
#endif

6
linux/dummy_check.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
grep '^#define' dummy.h | cut -f2 | \
while read func; do
grep -q -F -- "${func}(" syscall.h && echo "Defined as macro and as func: $func"
done

View File

@ -135,7 +135,7 @@
"EOWNERDEAD", /* 130 */
"ENOTRECOVERABLE", /* 131 */
"ERFKILL", /* 132 */
"ERRNO_133", /* 133 */
"EHWPOISON", /* 133 */
"ERRNO_134", /* 134 */
"ERRNO_135", /* 135 */
"ERRNO_136", /* 136 */
@ -519,8 +519,8 @@
"ERESTARTNOHAND", /* 514 */
"ENOIOCTLCMD", /* 515 */
"ERESTART_RESTARTBLOCK", /* 516 */
"ERRNO_517", /* 517 */
"ERRNO_518", /* 518 */
"EPROBE_DEFER", /* 517 */
"EOPENSTALE", /* 518 */
"ERRNO_519", /* 519 */
"ERRNO_520", /* 520 */
"EBADHANDLE", /* 521 */

116
linux/fanotify.h Normal file
View File

@ -0,0 +1,116 @@
#ifndef _LINUX_FANOTIFY_H
#define _LINUX_FANOTIFY_H
#include <linux/types.h>
/* the following events that user-space can register for */
#define FAN_ACCESS 0x00000001 /* File was accessed */
#define FAN_MODIFY 0x00000002 /* File was modified */
#define FAN_CLOSE_WRITE 0x00000008 /* Writtable file closed */
#define FAN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */
#define FAN_OPEN 0x00000020 /* File was opened */
#define FAN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
#define FAN_OPEN_PERM 0x00010000 /* File open in perm check */
#define FAN_ACCESS_PERM 0x00020000 /* File accessed in perm check */
#define FAN_ONDIR 0x40000000 /* event occurred against dir */
#define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */
/* helper events */
#define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */
/* flags used for fanotify_init() */
#define FAN_CLOEXEC 0x00000001
#define FAN_NONBLOCK 0x00000002
/* These are NOT bitwise flags. Both bits are used togther. */
#define FAN_CLASS_NOTIF 0x00000000
#define FAN_CLASS_CONTENT 0x00000004
#define FAN_CLASS_PRE_CONTENT 0x00000008
#define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \
FAN_CLASS_PRE_CONTENT)
#define FAN_UNLIMITED_QUEUE 0x00000010
#define FAN_UNLIMITED_MARKS 0x00000020
#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \
FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\
FAN_UNLIMITED_MARKS)
/* flags used for fanotify_modify_mark() */
#define FAN_MARK_ADD 0x00000001
#define FAN_MARK_REMOVE 0x00000002
#define FAN_MARK_DONT_FOLLOW 0x00000004
#define FAN_MARK_ONLYDIR 0x00000008
#define FAN_MARK_MOUNT 0x00000010
#define FAN_MARK_IGNORED_MASK 0x00000020
#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040
#define FAN_MARK_FLUSH 0x00000080
#define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\
FAN_MARK_REMOVE |\
FAN_MARK_DONT_FOLLOW |\
FAN_MARK_ONLYDIR |\
FAN_MARK_MOUNT |\
FAN_MARK_IGNORED_MASK |\
FAN_MARK_IGNORED_SURV_MODIFY |\
FAN_MARK_FLUSH)
/*
* All of the events - we build the list by hand so that we can add flags in
* the future and not break backward compatibility. Apps will get only the
* events that they originally wanted. Be sure to add new events here!
*/
#define FAN_ALL_EVENTS (FAN_ACCESS |\
FAN_MODIFY |\
FAN_CLOSE |\
FAN_OPEN)
/*
* All events which require a permission response from userspace
*/
#define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\
FAN_ACCESS_PERM)
#define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\
FAN_ALL_PERM_EVENTS |\
FAN_Q_OVERFLOW)
#define FANOTIFY_METADATA_VERSION 3
struct fanotify_event_metadata {
__u32 event_len;
__u8 vers;
__u8 reserved;
__u16 metadata_len;
__aligned_u64 mask;
__s32 fd;
__s32 pid;
};
struct fanotify_response {
__s32 fd;
__u32 response;
};
/* Legit userspace responses to a _PERM event */
#define FAN_ALLOW 0x01
#define FAN_DENY 0x02
/* No fd set in event */
#define FAN_NOFD -1
/* Helper functions to deal with fanotify_event_metadata buffers */
#define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata))
#define FAN_EVENT_NEXT(meta, len) ((len) -= (meta)->event_len, \
(struct fanotify_event_metadata*)(((char *)(meta)) + \
(meta)->event_len))
#define FAN_EVENT_OK(meta, len) ((long)(len) >= (long)FAN_EVENT_METADATA_LEN && \
(long)(meta)->event_len >= (long)FAN_EVENT_METADATA_LEN && \
(long)(meta)->event_len <= (long)(len))
#endif /* _LINUX_FANOTIFY_H */

View File

@ -1,12 +1,9 @@
/*
* Copyright (c) 2001 Hewlett-Packard, Matthew Wilcox
*
* $Id$
*
*/
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
{ 1, TP, sys_exit, "exit" }, /* 1 */
{ 1, TP|SE, sys_exit, "exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, TD, sys_read, "read" }, /* 3 */
{ 3, TD, sys_write, "write" }, /* 4 */
@ -16,7 +13,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 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 11 */
{ 1, TF, sys_chdir, "chdir" }, /* 12 */
{ 1, 0, sys_time, "time" }, /* 13 */
{ 3, TF, sys_mknod, "mknod" }, /* 14 */
@ -24,7 +21,7 @@
{ 3, TF, sys_chown, "lchown" }, /* 16 */
{ 3, TN, sys_socket, "socket" }, /* 17 */
{ 2, TF, sys_stat, "newstat" }, /* 18 */
{ 3, TF, sys_lseek, "lseek" }, /* 19 */
{ 3, TD, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 5, TF, sys_mount, "mount" }, /* 21 */
{ 3, TN, sys_bind, "bind" }, /* 22 */
@ -34,8 +31,8 @@
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 1, 0, sys_alarm, "alarm" }, /* 27 */
{ 2, TD, sys_fstat, "newfstat" }, /* 28 */
{ 0, 0, sys_pause, "pause" }, /* 29 */
{ 2, 0, sys_utime, "utime" }, /* 30 */
{ 0, TS, sys_pause, "pause" }, /* 29 */
{ 2, TF, sys_utime, "utime" }, /* 30 */
{ 3, TN, sys_connect, "connect" }, /* 31 */
{ 2, TN, sys_listen, "listen" }, /* 32 */
{ 2, TF, sys_access, "access" }, /* 33 */
@ -50,14 +47,14 @@
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, TM|SI, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, NF, sys_getgid, "getgid" }, /* 47 */
{ 2, 0, sys_signal, "signal" }, /* 48 */
{ 2, TS, sys_signal, "signal" }, /* 48 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 49 */
{ 0, NF, sys_getegid, "getegid" }, /* 50 */
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 2, 0, sys_umount2, "umount2" }, /* 52 */
{ 2, TF, sys_umount2, "umount2" }, /* 52 */
{ 3, TN, sys_getpeername, "lock" }, /* 53 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 55 */
@ -73,11 +70,11 @@
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 67 */
{ 5, 0, printargs, "sgetmask" }, /* 68 */
{ 5, 0, printargs, "ssetmask" }, /* 69 */
{ 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, 0, sys_mincore, "mincore" }, /* 72 */
{ 3, TM, sys_mincore, "mincore" }, /* 72 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 73 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 74 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
@ -91,12 +88,12 @@
{ 2, TF, sys_symlink, "symlink" }, /* 83 */
{ 2, TF, sys_lstat, "newlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, 0, sys_uselib, "uselib" }, /* 86 */
{ 1, 0, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 6, TD, sys_mmap, "mmap2" }, /* 89 */
{ 6, TD, sys_mmap, "mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 1, TF, sys_uselib, "uselib" }, /* 86 */
{ 2, TF, sys_swapon, "swapon" }, /* 87 */
{ 4, 0, sys_reboot, "reboot" }, /* 88 */
{ 6, TD|TM|SI, sys_mmap_4koff, "mmap2" }, /* 89 */
{ 6, TD|TM|SI, sys_mmap, "mmap" }, /* 90 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 94 */
@ -107,7 +104,7 @@
{ 2, TF, sys_statfs, "statfs" }, /* 99 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
{ 2, TF, sys_stat64, "stat64" }, /* 101 */
{ 5, 0, printargs, "SYS_102" }, /* 102 */
{ 5, 0, NULL, NULL }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
@ -115,50 +112,50 @@
{ 2, 0, sys_capset, "capset" }, /* 107 */
{ 5, TD, sys_pread, "pread" }, /* 108 */
{ 5, TD, sys_pwrite, "pwrite" }, /* 109 */
{ 2, 0, sys_getcwd, "getcwd" }, /* 110 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 112 */
{ 0, 0, sys_vfork, "vfork" }, /* 113 */
{ 0, TP, sys_vfork, "vfork" }, /* 113 */
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 117 */
{ 1, TD, sys_fsync, "fsync" }, /* 118 */
{ 3, 0, sys_madvise, "madvise" }, /* 119 */
{ 3, TM, sys_madvise, "madvise" }, /* 119 */
{ 5, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 122 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 4, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TF, sys_fchdir, "fchdir" }, /* 133 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 5, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */
{ 5, TF, sys_llseek, "_llseek" }, /* 140 */
{ 5, TD, sys_llseek, "_llseek" }, /* 140 */
{ 3, TD, sys_getdents, "getdents" }, /* 141 */
{ 5, TD, sys_select, "_newselect" }, /* 142 */
{ 2, TD, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 3, TM, sys_msync, "msync" }, /* 144 */
{ 3, TD, sys_readv, "readv" }, /* 145 */
{ 3, TD, sys_writev, "writev" }, /* 146 */
{ 1, 0, sys_getsid, "getsid" }, /* 147 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
{ 2, 0, sys_mlock, "mlock" }, /* 150 */
{ 2, 0, sys_munlock, "munlock" }, /* 151 */
{ 1, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 1, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 2, TM, sys_mlock, "mlock" }, /* 150 */
{ 2, TM, sys_munlock, "munlock" }, /* 151 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 152 */
{ 1, TM, sys_munlockall, "munlockall" }, /* 153 */
{ 2, 0, sys_sched_setparam, "sched_setparam" }, /* 154 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 155 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 156 */
@ -168,17 +165,17 @@
{ 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 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_setresuid, "getresuid" }, /* 165 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 166 */
{ 5, 0, sys_query_module, "query_module" }, /* 167 */
{ 3, TD, sys_poll, "poll" }, /* 168 */
{ 3, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_setresgid, "getresgid" }, /* 171 */
{ 5, 0, sys_prctl, "prctl" }, /* 172 */
{ 1, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */
{ 0, TS, sys_sigreturn, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 175 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
@ -188,8 +185,8 @@
{ 3, TF, sys_chown, "chown" }, /* 180 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 181 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 182 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 183 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 184 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 183 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 184 */
{ 4, TI, sys_semop, "semop" }, /* 185 */
{ 4, TI, sys_semget, "semget" }, /* 186 */
{ 4, TI, sys_semctl, "semctl" }, /* 187 */
@ -197,8 +194,8 @@
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 189 */
{ 4, TI, sys_msgget, "msgget" }, /* 190 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 191 */
{ 3, TI, sys_shmat, "shmat" }, /* 192 */
{ 1, TI, sys_shmdt, "shmdt" }, /* 193 */
{ 3, TI|TM|SI, sys_shmat, "shmat" }, /* 192 */
{ 1, TI|TM|SI, sys_shmdt, "shmdt" }, /* 193 */
{ 3, TI, sys_shmget, "shmget" }, /* 194 */
{ 3, TI, sys_shmctl, "shmctl" }, /* 195 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 196 */
@ -211,10 +208,10 @@
{ 5, 0, printargs, "attrctl" }, /* 203 */
{ 5, 0, printargs, "acl_get" }, /* 204 */
{ 5, 0, printargs, "acl_set" }, /* 205 */
{ 0, 0, printargs, "gettid" }, /* 206 */
{ 0, 0, sys_gettid, "gettid" }, /* 206 */
{ 4, TD, sys_readahead, "readahead" }, /* 207 */
{ 2, TS, sys_kill, "tkill" }, /* 208 */
{ 4, TD|TN, sys_sendfile, "sendfile64" }, /* 209 */
{ 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 209 */
{ 6, 0, sys_futex, "futex" }, /* 210 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 211 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 212 */
@ -227,22 +224,22 @@
{ 4, 0, sys_io_cancel, "io_cancel" }, /* 219 */
{ 5, 0, printargs, "alloc_hugepages" }, /* 220 */
{ 1, 0, printargs, "free_hugepages" }, /* 221 */
{ 1, TP, sys_exit, "exit_group" }, /* 222 */
{ 4, 0, printargs, "lookup_dcookie" }, /* 223 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 222 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 223 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 224 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 225 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 226 */
{ 5, 0, printargs, "remap_file_pages" }, /* 227 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 228 */
{ 5, TM|SI, printargs, "remap_file_pages" }, /* 227 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 228 */
{ 5, 0, printargs, "mq_open" }, /* 229 */
{ 5, 0, printargs, "mq_unlink" }, /* 230 */
{ 5, 0, printargs, "mq_timedsend" }, /* 231 */
{ 5, 0, printargs, "mq_timedreceive" }, /* 232 */
{ 5, 0, printargs, "mq_notify" }, /* 233 */
{ 5, 0, printargs, "mq_getsetattr" }, /* 234 */
{ 4, 0, printargs, "waitid" }, /* 235 */
{ 5, TD, printargs, "fadvise64_64" }, /* 236 */
{ 5, 0, printargs, "set_tid_address" }, /* 237 */
{ 5, TP, sys_waitid, "waitid" }, /* 235 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 236 */
{ 5, 0, sys_set_tid_address, "set_tid_address" }, /* 237 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 238 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 239 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 240 */
@ -251,7 +248,7 @@
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 243 */
{ 5, TF, sys_listxattr, "listxattr" }, /* 244 */
{ 5, TF, sys_listxattr, "llistxattr" }, /* 245 */
{ 5, 0, sys_flistxattr, "flistxattr" }, /* 246 */
{ 5, TD, sys_flistxattr, "flistxattr" }, /* 246 */
{ 5, TF, sys_removexattr, "removexattr" }, /* 247 */
{ 5, TF, sys_removexattr, "lremovexattr" }, /* 248 */
{ 5, TD, sys_fremovexattr, "fremovexattr" }, /* 249 */
@ -264,20 +261,20 @@
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 256 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 257 */
{ 5, 0, printargs, "clock_nanosleep" }, /* 258 */
{ 5, 0, printargs, "tgkill" }, /* 259 */
{ 5, 0, printargs, "mbind" }, /* 260 */
{ 5, 0, printargs, "get_mempolicy" }, /* 261 */
{ 5, 0, printargs, "set_mempolicy" }, /* 262 */
{ 5, 0, printargs, "vserver" }, /* 263 */
{ 5, 0, printargs, "add_key" }, /* 264 */
{ 4, 0, printargs, "request_key" }, /* 265 */
{ 5, 0, printargs, "keyctl" }, /* 266 */
{ 3, 0, printargs, "ioprio_set" }, /* 267 */
{ 2, 0, printargs, "ioprio_get" }, /* 268 */
{ 0, TD, printargs, "inotify_init" }, /* 269 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 259 */
{ 5, TM, printargs, "mbind" }, /* 260 */
{ 5, TM, printargs, "get_mempolicy" }, /* 261 */
{ 5, TM, printargs, "set_mempolicy" }, /* 262 */
{ 5, 0, sys_vserver, "vserver" }, /* 263 */
{ 5, 0, sys_add_key, "add_key" }, /* 264 */
{ 4, 0, sys_request_key, "request_key" }, /* 265 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 266 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 267 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 268 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 269 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 270 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 271 */
{ 4, 0, printargs, "migrate_pages" }, /* 272 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 272 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 273 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 274 */
{ 4, TD|TF, sys_openat, "openat" }, /* 275 */
@ -294,18 +291,18 @@
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 286 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 287 */
{ 1, TP, sys_unshare, "unshare" }, /* 288 */
{ 2, 0, printargs, "set_robust_list" }, /* 289 */
{ 3, 0, printargs, "get_robust_list" }, /* 290 */
{ 6, TD, printargs, "splice" }, /* 291 */
{ 4, TD, printargs, "sync_file_range" }, /* 292 */
{ 4, TD, printargs, "tee" }, /* 293 */
{ 4, TD, printargs, "vmsplice" }, /* 294 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 295 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 289 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 290 */
{ 6, TD, sys_splice, "splice" }, /* 291 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 292 */
{ 4, TD, sys_tee, "tee" }, /* 293 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 294 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 295 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 296 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 297 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 298 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 299 */
{ 4, 0, printargs, "kexec_load" }, /* 300 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 300 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 301 */
{ 3, TD, printargs, "signalfd" }, /* 302 */
{ 4, TD, printargs, "timerfd" }, /* 303 */
@ -320,10 +317,26 @@
{ 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, TD, printargs, "perf_event_open" }, /* 318 */
{ 5, TD, sys_preadv, "preadv" }, /* 315 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 316 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 317 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 318 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 319 */
{ 4, TN, sys_accept4, "accept4" }, /* 320 */
{ 4, 0, printargs, "prlimit64" }, /* 321 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 321 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 322 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 323 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 324 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 325 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 326 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 327 */
{ 2, TD, sys_setns, "setns" }, /* 328 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 329 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 330 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 331 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 332 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 333 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 334 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 335 */
{ 2, TF, sys_utimes, "utimes" }, /* 336 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 337 */

View File

@ -1,99 +1,15 @@
{"asm/mtrr.h", "MTRRIOC32_ADD_ENTRY", 0x4d00},
{"asm/mtrr.h", "MTRRIOC_ADD_ENTRY", 0x4d00},
{"asm/mce.h", "MCE_GET_RECORD_LEN", 0x4d01},
{"asm/mtrr.h", "MTRRIOC32_SET_ENTRY", 0x4d01},
{"asm/mtrr.h", "MTRRIOC_SET_ENTRY", 0x4d01},
{"asm/mce.h", "MCE_GET_LOG_LEN", 0x4d02},
{"asm/mtrr.h", "MTRRIOC32_DEL_ENTRY", 0x4d02},
{"asm/mtrr.h", "MTRRIOC_DEL_ENTRY", 0x4d02},
{"asm/mce.h", "MCE_GETCLEAR_FLAGS", 0x4d03},
{"asm/mtrr.h", "MTRRIOC32_GET_ENTRY", 0x4d03},
{"asm/mtrr.h", "MTRRIOC_GET_ENTRY", 0x4d03},
{"asm/mtrr.h", "MTRRIOC32_KILL_ENTRY", 0x4d04},
{"asm/mtrr.h", "MTRRIOC_KILL_ENTRY", 0x4d04},
{"asm/mtrr.h", "MTRRIOC32_ADD_PAGE_ENTRY", 0x4d05},
{"asm/mtrr.h", "MTRRIOC_ADD_PAGE_ENTRY", 0x4d05},
{"asm/mtrr.h", "MTRRIOC32_SET_PAGE_ENTRY", 0x4d06},
{"asm/mtrr.h", "MTRRIOC_SET_PAGE_ENTRY", 0x4d06},
{"asm/mtrr.h", "MTRRIOC32_DEL_PAGE_ENTRY", 0x4d07},
{"asm/mtrr.h", "MTRRIOC_DEL_PAGE_ENTRY", 0x4d07},
{"asm/mtrr.h", "MTRRIOC32_GET_PAGE_ENTRY", 0x4d08},
{"asm/mtrr.h", "MTRRIOC_GET_PAGE_ENTRY", 0x4d08},
{"asm/mtrr.h", "MTRRIOC_KILL_PAGE_ENTRY", 0x4d09},
{"asm-generic/ioctls.h", "TCGETS", 0x5401},
{"asm-generic/ioctls.h", "TCSETS", 0x5402},
{"asm-generic/ioctls.h", "TCSETSW", 0x5403},
{"asm-generic/ioctls.h", "TCSETSF", 0x5404},
{"asm-generic/ioctls.h", "TCGETA", 0x5405},
{"asm-generic/ioctls.h", "TCSETA", 0x5406},
{"asm-generic/ioctls.h", "TCSETAW", 0x5407},
{"asm-generic/ioctls.h", "TCSETAF", 0x5408},
{"asm-generic/ioctls.h", "TCSBRK", 0x5409},
{"asm-generic/ioctls.h", "TCXONC", 0x540a},
{"asm-generic/ioctls.h", "TCFLSH", 0x540b},
{"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
{"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
{"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
{"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
{"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
{"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
{"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
{"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
{"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
{"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
{"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
{"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
{"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
{"asm-generic/ioctls.h", "FIONREAD", 0x541b},
{"asm-generic/ioctls.h", "TIOCLINUX", 0x541c},
{"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
{"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
{"asm-generic/ioctls.h", "FIONBIO", 0x5421},
{"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
{"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
{"asm-generic/ioctls.h", "TCSBRKP", 0x5425},
{"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
{"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
{"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
{"asm-generic/ioctls.h", "TCGETS2", 0x542a},
{"asm-generic/ioctls.h", "TCSETS2", 0x542b},
{"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
{"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
{"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
{"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
{"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
{"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
{"asm-generic/ioctls.h", "TCGETX", 0x5432},
{"asm-generic/ioctls.h", "TCSETX", 0x5433},
{"asm-generic/ioctls.h", "TCSETXF", 0x5434},
{"asm-generic/ioctls.h", "TCSETXW", 0x5435},
{"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
{"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
{"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
{"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
{"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455},
{"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
{"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459},
{"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a},
{"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d},
{"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/msr.h", "X86_IOC_RDMSR_REGS", 0x63a0},
{"asm/msr.h", "X86_IOC_WRMSR_REGS", 0x63a1},
{"asm-generic/sockios.h", "FIOSETOWN", 0x8901},
{"asm-generic/sockios.h", "SIOCSPGRP", 0x8902},
{"asm-generic/sockios.h", "FIOGETOWN", 0x8903},
{"asm-generic/sockios.h", "SIOCGPGRP", 0x8904},
{"asm-generic/sockios.h", "SIOCATMARK", 0x8905},
{"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906},
{"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907},

View File

@ -24,28 +24,26 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
{ 1, TP, sys_exit, "_exit", SYS_exit }, /* 1 */
{ 0, TP, sys_fork, "fork", SYS_fork }, /* 2 */
{ 3, TD, sys_read, "read", SYS_read }, /* 3 */
{ 3, TD, sys_write, "write", SYS_write }, /* 4 */
{ 1, TP|SE, 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", SYS_wait4 }, /* 7 */
{ 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", SYS_execve }, /* 11 */
{ 3, TF|TP|SE|SI, 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 */
{ 0, 0, sys_break, "break" }, /* 17 */
{ 0, TM, sys_break, "break" }, /* 17 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 18 */
{ 3, TD, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
@ -73,7 +71,7 @@
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 0, 0, sys_prof, "prof" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, TM|SI, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, NF, sys_getgid, "getgid" }, /* 47 */
{ 3, TS, sys_signal, "signal" }, /* 48 */
@ -96,8 +94,8 @@
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 67 */
{ 0, TS, sys_siggetmask, "siggetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 69 */
{ 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
@ -115,11 +113,11 @@
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, TF, sys_uselib, "uselib" }, /* 86 */
{ 1, TF, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 2, TF, sys_swapon, "swapon" }, /* 87 */
{ 4, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, TD, sys_readdir, "readdir" }, /* 89 */
{ 6, TD, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 6, TD|TM|SI, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 94 */
@ -130,7 +128,7 @@
{ 2, TF, sys_statfs, "statfs" }, /* 99 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 101 */
{ 2, TD, sys_socketcall, "socketcall", SYS_socketcall }, /* 102 */
{ 2, TD, sys_socketcall, "socketcall" }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
@ -142,28 +140,28 @@
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
{ 0, 0, sys_idle, "idle" }, /* 112 */
{ 1, 0, sys_vm86old, "vm86old" }, /* 113 */
{ 4, TP, sys_wait4, "wait4", SYS_wait4 }, /* 114 */
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 6, 0, sys_ipc, "ipc", SYS_ipc }, /* 117 */
{ 6, TI, sys_ipc, "ipc" }, /* 117 */
{ 1, TD, sys_fsync, "fsync" }, /* 118 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 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 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 3, 0, sys_sysfs, "sysfs", SYS_sysfs }, /* 135 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */
@ -172,16 +170,16 @@
{ 3, TD, sys_getdents, "getdents" }, /* 141 */
{ 5, TD, sys_select, "select" }, /* 142 */
{ 2, TD, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 3, TD, sys_readv, "readv", SYS_readv }, /* 145 */
{ 3, TD, sys_writev, "writev", SYS_writev }, /* 146 */
{ 3, TM, sys_msync, "msync" }, /* 144 */
{ 3, TD, sys_readv, "readv" }, /* 145 */
{ 3, TD, sys_writev, "writev" }, /* 146 */
{ 1, 0, sys_getsid, "getsid" }, /* 147 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
{ 2, 0, sys_mlock, "mlock" }, /* 150 */
{ 2, 0, sys_munlock, "munlock" }, /* 151 */
{ 2, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 2, TM, sys_mlock, "mlock" }, /* 150 */
{ 2, TM, sys_munlock, "munlock" }, /* 151 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 152 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 153 */
{ 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */
@ -191,26 +189,26 @@
{ 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 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
{ 5, 0, sys_vm86, "vm86" }, /* 166 */
{ 5, 0, sys_query_module, "query_module" }, /* 167 */
{ 3, TD, sys_poll, "poll" }, /* 168 */
{ 3, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 171 */
{ 5, 0, sys_prctl, "prctl" }, /* 172 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
{ 5, TD, sys_pread, "pread64", SYS_read }, /* 180 */
{ 5, TD, sys_pwrite, "pwrite64", SYS_write }, /* 181 */
{ 5, TD, sys_pread, "pread64" }, /* 180 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 181 */
{ 3, TF, sys_chown, "chown" }, /* 182 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 183 */
{ 2, 0, sys_capget, "capget" }, /* 184 */
@ -219,9 +217,9 @@
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
{ 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
{ 0, TP, sys_vfork, "vfork", SYS_vfork }, /* 190 */
{ 0, TP, sys_vfork, "vfork" }, /* 190 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
{ 6, TD, sys_mmap, "mmap2" }, /* 192 */
{ 6, TD|TM|SI, sys_mmap_pgoff, "mmap2" }, /* 192 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 193 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 2, TF, sys_stat64, "stat64" }, /* 195 */
@ -248,13 +246,13 @@
{ 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
{ 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
{ 3, 0, sys_mincore, "mincore" }, /* 218 */
{ 3, 0, sys_madvise, "madvise" }, /* 219 */
{ 3, TM, sys_mincore, "mincore" }, /* 218 */
{ 3, TM, sys_madvise, "madvise" }, /* 219 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 220 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 221 */
{ 4, 0, printargs, "SYS_222" }, /* 222 */
/*TODO*/{ 5, 0, printargs, "security" }, /* 223 */
{ 0, 0, printargs, "gettid" }, /* 224 */
{ 6, 0, NULL, NULL }, /* 222 */
{ 5, 0, sys_security, "security" }, /* 223 */
{ 0, 0, sys_gettid, "gettid" }, /* 224 */
{ 4, TD, sys_readahead, "readahead" }, /* 225 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 226 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */
@ -281,14 +279,14 @@
{ 3, 0, sys_io_submit, "io_submit" }, /* 248 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
{ 5, TD, sys_fadvise64, "fadvise64" }, /* 250 */
{ 5, 0, printargs, "SYS_251" }, /* 251 */
{ 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */
{ 4, 0, printargs, "lookup_dcookie"}, /* 253 */
{ 6, 0, NULL, NULL }, /* 251 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 252 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 253 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 254 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 256 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 257 */
{ 1, 0, printargs, "set_tid_address"}, /* 258 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages"}, /* 257 */
{ 1, 0, sys_set_tid_address, "set_tid_address"}, /* 258 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 259 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 260 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 261 */
@ -303,28 +301,28 @@
{ 3, TS, sys_tgkill, "tgkill" }, /* 270 */
{ 2, TF, sys_utimes, "utimes" }, /* 271 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 272 */
{ 5, 0, printargs, "vserver" }, /* 273 */
{ 6, 0, sys_mbind, "mbind" }, /* 274 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 275 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 276 */
{ 5, 0, sys_vserver, "vserver" }, /* 273 */
{ 6, TM, sys_mbind, "mbind" }, /* 274 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 275 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 276 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 277 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 278 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 279 */
{ 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, "kexec_load" }, /* 283 */
{ 5, TP, sys_waitid, "waitid", SYS_waitid }, /* 284 */
{ 5, 0, printargs, "SYS_285" }, /* 285 */
{ 5, 0, printargs, "add_key" }, /* 286 */
{ 4, 0, printargs, "request_key" }, /* 287 */
{ 5, 0, printargs, "keyctl" }, /* 288 */
{ 3, 0, printargs, "ioprio_set" }, /* 289 */
{ 2, 0, printargs, "ioprio_get" }, /* 290 */
{ 0, TD, printargs, "inotify_init" }, /* 291 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 283 */
{ 5, TP, sys_waitid, "waitid" }, /* 284 */
{ 6, 0, NULL, NULL }, /* 285 */
{ 5, 0, sys_add_key, "add_key" }, /* 286 */
{ 4, 0, sys_request_key, "request_key" }, /* 287 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 288 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 289 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 290 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 291 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */
{ 4, 0, printargs, "migrate_pages" }, /* 294 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 294 */
{ 4, TD|TF, sys_openat, "openat" }, /* 295 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */
@ -341,15 +339,15 @@
{ 6, TD, sys_pselect6, "pselect6" }, /* 308 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 309 */
{ 1, TP, sys_unshare, "unshare" }, /* 310 */
{ 2, 0, printargs, "set_robust_list" }, /* 311 */
{ 3, 0, printargs, "get_robust_list" }, /* 312 */
{ 6, TD, printargs, "splice" }, /* 313 */
{ 4, TD, printargs, "sync_file_range" }, /* 314 */
{ 4, TD, printargs, "tee" }, /* 315 */
{ 4, TD, printargs, "vmsplice" }, /* 316 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 317 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 311 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 312 */
{ 6, TD, sys_splice, "splice" }, /* 313 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 314 */
{ 4, TD, sys_tee, "tee" }, /* 315 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 316 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 317 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 318 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 320 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */
{ 2, TD, sys_timerfd_create, "timerfd_create"}, /* 322 */
@ -363,78 +361,76 @@
{ 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, TD, sys_preadv, "preadv" }, /* 333 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 334 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 335 */
{ 5, TD, sys_perf_event_open, "perf_event_open"}, /* 336 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 337 */
{ 2, TD, printargs, "fanotify_init" }, /* 338 */
{ 5, TD|TF, printargs, "fanotify_mark" }, /* 339 */
{ 4, 0, printargs, "prlimit64" }, /* 340 */
{ 5, 0, printargs, "SYS_341" }, /* 341 */
{ 5, 0, printargs, "SYS_342" }, /* 342 */
{ 5, 0, printargs, "SYS_343" }, /* 343 */
{ 5, 0, printargs, "SYS_344" }, /* 344 */
{ 5, 0, printargs, "SYS_345" }, /* 345 */
{ 5, 0, printargs, "SYS_346" }, /* 346 */
{ 5, 0, printargs, "SYS_347" }, /* 347 */
{ 5, 0, printargs, "SYS_348" }, /* 348 */
{ 5, 0, printargs, "SYS_349" }, /* 349 */
{ 5, 0, printargs, "SYS_350" }, /* 350 */
{ 5, 0, printargs, "SYS_351" }, /* 351 */
{ 5, 0, printargs, "SYS_352" }, /* 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 */
{ 5, 0, printargs, "SYS_367" }, /* 367 */
{ 5, 0, printargs, "SYS_368" }, /* 368 */
{ 5, 0, printargs, "SYS_369" }, /* 369 */
{ 5, 0, printargs, "SYS_370" }, /* 370 */
{ 5, 0, printargs, "SYS_371" }, /* 371 */
{ 5, 0, printargs, "SYS_372" }, /* 372 */
{ 5, 0, printargs, "SYS_373" }, /* 373 */
{ 5, 0, printargs, "SYS_374" }, /* 374 */
{ 5, 0, printargs, "SYS_375" }, /* 375 */
{ 5, 0, printargs, "SYS_376" }, /* 376 */
{ 5, 0, printargs, "SYS_377" }, /* 377 */
{ 5, 0, printargs, "SYS_378" }, /* 378 */
{ 5, 0, printargs, "SYS_379" }, /* 379 */
{ 5, 0, printargs, "SYS_380" }, /* 380 */
{ 5, 0, printargs, "SYS_381" }, /* 381 */
{ 5, 0, printargs, "SYS_382" }, /* 382 */
{ 5, 0, printargs, "SYS_383" }, /* 383 */
{ 5, 0, printargs, "SYS_384" }, /* 384 */
{ 5, 0, printargs, "SYS_385" }, /* 385 */
{ 5, 0, printargs, "SYS_386" }, /* 386 */
{ 5, 0, printargs, "SYS_387" }, /* 387 */
{ 5, 0, printargs, "SYS_388" }, /* 388 */
{ 5, 0, printargs, "SYS_389" }, /* 389 */
{ 5, 0, printargs, "SYS_390" }, /* 390 */
{ 5, 0, printargs, "SYS_391" }, /* 391 */
{ 5, 0, printargs, "SYS_392" }, /* 392 */
{ 5, 0, printargs, "SYS_393" }, /* 393 */
{ 5, 0, printargs, "SYS_394" }, /* 394 */
{ 5, 0, printargs, "SYS_395" }, /* 395 */
{ 5, 0, printargs, "SYS_396" }, /* 396 */
{ 5, 0, printargs, "SYS_397" }, /* 397 */
{ 5, 0, printargs, "SYS_398" }, /* 398 */
{ 5, 0, printargs, "SYS_399" }, /* 399 */
#if SYS_socket_subcall != 400
#error fix me
#endif
{ 8, 0, printargs, "socket_subcall"}, /* 400 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 338 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 339 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 340 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 341 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 342 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 343 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 344 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 345 */
{ 2, TD, sys_setns, "setns" }, /* 346 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 347 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 348 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 349 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 350 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 351 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 352 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 353 */
{ 5, 0, NULL, NULL }, /* 354 */
{ 5, 0, NULL, NULL }, /* 355 */
{ 5, 0, NULL, NULL }, /* 356 */
{ 5, 0, NULL, NULL }, /* 357 */
{ 5, 0, NULL, NULL }, /* 358 */
{ 5, 0, NULL, NULL }, /* 359 */
{ 5, 0, NULL, NULL }, /* 360 */
{ 5, 0, NULL, NULL }, /* 361 */
{ 5, 0, NULL, NULL }, /* 362 */
{ 5, 0, NULL, NULL }, /* 363 */
{ 5, 0, NULL, NULL }, /* 364 */
{ 5, 0, NULL, NULL }, /* 365 */
{ 5, 0, NULL, NULL }, /* 366 */
{ 5, 0, NULL, NULL }, /* 367 */
{ 5, 0, NULL, NULL }, /* 368 */
{ 5, 0, NULL, NULL }, /* 369 */
{ 5, 0, NULL, NULL }, /* 370 */
{ 5, 0, NULL, NULL }, /* 371 */
{ 5, 0, NULL, NULL }, /* 372 */
{ 5, 0, NULL, NULL }, /* 373 */
{ 5, 0, NULL, NULL }, /* 374 */
{ 5, 0, NULL, NULL }, /* 375 */
{ 5, 0, NULL, NULL }, /* 376 */
{ 5, 0, NULL, NULL }, /* 377 */
{ 5, 0, NULL, NULL }, /* 378 */
{ 5, 0, NULL, NULL }, /* 379 */
{ 5, 0, NULL, NULL }, /* 380 */
{ 5, 0, NULL, NULL }, /* 381 */
{ 5, 0, NULL, NULL }, /* 382 */
{ 5, 0, NULL, NULL }, /* 383 */
{ 5, 0, NULL, NULL }, /* 384 */
{ 5, 0, NULL, NULL }, /* 385 */
{ 5, 0, NULL, NULL }, /* 386 */
{ 5, 0, NULL, NULL }, /* 387 */
{ 5, 0, NULL, NULL }, /* 388 */
{ 5, 0, NULL, NULL }, /* 389 */
{ 5, 0, NULL, NULL }, /* 390 */
{ 5, 0, NULL, NULL }, /* 391 */
{ 5, 0, NULL, NULL }, /* 392 */
{ 5, 0, NULL, NULL }, /* 393 */
{ 5, 0, NULL, NULL }, /* 394 */
{ 5, 0, NULL, NULL }, /* 395 */
{ 5, 0, NULL, NULL }, /* 396 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
#define SYS_socket_subcall 400
#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 3, TN, sys_connect, "connect" }, /* 403 */
@ -443,15 +439,15 @@
{ 3, TN, sys_getsockname, "getsockname" }, /* 406 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 407 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 408 */
{ 4, TN, sys_send, "send", SYS_sub_send }, /* 409 */
{ 4, TN, sys_recv, "recv", SYS_sub_recv }, /* 410 */
{ 6, TN, sys_sendto, "sendto", SYS_sub_sendto }, /* 411 */
{ 6, TN, sys_recvfrom, "recvfrom", SYS_sub_recvfrom }, /* 412 */
{ 4, TN, sys_send, "send" }, /* 409 */
{ 4, TN, sys_recv, "recv" }, /* 410 */
{ 6, TN, sys_sendto, "sendto" }, /* 411 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 412 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 413 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
@ -479,7 +475,7 @@
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */

File diff suppressed because it is too large Load Diff

42
linux/inotify.h Normal file
View File

@ -0,0 +1,42 @@
/*
* Inode based directory notification for Linux
*
* Copyright (C) 2005 John McCutchan
*/
#ifndef _LINUX_INOTIFY_H
#define _LINUX_INOTIFY_H
/* the following are legal, implemented events that user-space can watch for */
#define IN_ACCESS 0x00000001 /* File was accessed */
#define IN_MODIFY 0x00000002 /* File was modified */
#define IN_ATTRIB 0x00000004 /* Metadata changed */
#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */
#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */
#define IN_OPEN 0x00000020 /* File was opened */
#define IN_MOVED_FROM 0x00000040 /* File was moved from X */
#define IN_MOVED_TO 0x00000080 /* File was moved to Y */
#define IN_CREATE 0x00000100 /* Subfile was created */
#define IN_DELETE 0x00000200 /* Subfile was deleted */
#define IN_DELETE_SELF 0x00000400 /* Self was deleted */
#define IN_MOVE_SELF 0x00000800 /* Self was moved */
/* the following are legal events. they are sent as needed to any watch */
#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */
#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
#define IN_IGNORED 0x00008000 /* File was ignored */
/* helper events */
#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */
#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */
/* special flags */
#define IN_ONLYDIR 0x01000000 /* only watch the path if it is a directory */
#define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */
#define IN_EXCL_UNLINK 0x04000000 /* exclude events on unlinked objects */
#define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */
#define IN_ISDIR 0x40000000 /* event occurred against dir */
#define IN_ONESHOT 0x80000000 /* only send event once */
#endif /* _LINUX_INOTIFY_H */

19
linux/ioctlent-filter.awk Normal file
View File

@ -0,0 +1,19 @@
#!/bin/awk -f
# Filter out redundant "*32" symbols.
BEGIN {
s=""
c=""
}
NF == 3 && $2 ~ /^"[^",]*",$/ {
if ($2 == s && $3 == c)
next
s = $2
sub(/",$/, "32\",", s)
c = $3
}
{
print
}

View File

@ -62,6 +62,7 @@
{"linux/hdreg.h", "HDIO_SET_BUSSTATE", 0x032d},
{"linux/hdreg.h", "HDIO_SET_QDMA", 0x032e},
{"linux/hdreg.h", "HDIO_SET_ADDRESS", 0x032f},
{"linux/vm_sockets.h", "IOCTL_VM_SOCKETS_GET_LOCAL_CID", 0x07b9},
{"linux/raid/md_u.h", "RAID_VERSION", 0x0910},
{"linux/raid/md_u.h", "GET_ARRAY_INFO", 0x0911},
{"linux/raid/md_u.h", "GET_DISK_INFO", 0x0912},
@ -103,7 +104,6 @@
{"linux/fs.h", "BLKBSZSET", 0x1271},
{"linux/fs.h", "BLKGETSIZE64", 0x1272},
{"linux/fs.h", "BLKTRACESETUP", 0x1273},
{"linux/blktrace_api.h", "BLKTRACESETUP32", 0x1273},
{"linux/fs.h", "BLKTRACESTART", 0x1274},
{"linux/fs.h", "BLKTRACESTOP", 0x1275},
{"linux/fs.h", "BLKTRACETEARDOWN", 0x1276},
@ -114,6 +114,8 @@
{"linux/fs.h", "BLKPBSZGET", 0x127b},
{"linux/fs.h", "BLKDISCARDZEROES", 0x127c},
{"linux/fs.h", "BLKSECDISCARD", 0x127d},
{"linux/fs.h", "BLKROTATIONAL", 0x127e},
{"linux/fs.h", "BLKZEROOUT", 0x127f},
{"rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT", 0x1b01},
{"rdma/ib_user_mad.h", "IB_USER_MAD_UNREGISTER_AGENT", 0x1b02},
{"rdma/ib_user_mad.h", "IB_USER_MAD_ENABLE_PKEY", 0x1b03},
@ -166,6 +168,7 @@
{"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_PHY_PACKET", 0x2315},
{"linux/firewire-cdev.h", "FW_CDEV_IOC_RECEIVE_PHY_PACKETS", 0x2316},
{"linux/firewire-cdev.h", "FW_CDEV_IOC_SET_ISO_CHANNELS", 0x2317},
{"linux/firewire-cdev.h", "FW_CDEV_IOC_FLUSH_ISO", 0x2318},
{"linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", 0x2400},
{"linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", 0x2401},
{"linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", 0x2402},
@ -173,10 +176,6 @@
{"linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", 0x2404},
{"linux/perf_event.h", "PERF_EVENT_IOC_SET_OUTPUT", 0x2405},
{"linux/perf_event.h", "PERF_EVENT_IOC_SET_FILTER", 0x2406},
{"linux/i2o.h", "BLKI2OGRSTRAT", 0x3201},
{"linux/i2o.h", "BLKI2OGWSTRAT", 0x3202},
{"linux/i2o.h", "BLKI2OSRSTRAT", 0x3203},
{"linux/i2o.h", "BLKI2OSWSTRAT", 0x3204},
{"linux/suspend_ioctls.h", "SNAPSHOT_FREEZE", 0x3301},
{"linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", 0x3302},
{"linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", 0x3304},
@ -191,6 +190,26 @@
{"linux/suspend_ioctls.h", "SNAPSHOT_PREF_IMAGE_SIZE", 0x3312},
{"linux/suspend_ioctls.h", "SNAPSHOT_AVAIL_SWAP_SIZE", 0x3313},
{"linux/suspend_ioctls.h", "SNAPSHOT_ALLOC_SWAP_PAGE", 0x3314},
{"linux/vfio.h", "VFIO_GET_API_VERSION", 0x3b64},
{"linux/vfio.h", "VFIO_CHECK_EXTENSION", 0x3b65},
{"linux/vfio.h", "VFIO_SET_IOMMU", 0x3b66},
{"linux/vfio.h", "VFIO_GROUP_GET_STATUS", 0x3b67},
{"linux/vfio.h", "VFIO_GROUP_SET_CONTAINER", 0x3b68},
{"linux/vfio.h", "VFIO_GROUP_UNSET_CONTAINER", 0x3b69},
{"linux/vfio.h", "VFIO_GROUP_GET_DEVICE_FD", 0x3b6a},
{"linux/vfio.h", "VFIO_DEVICE_GET_INFO", 0x3b6b},
{"linux/vfio.h", "VFIO_DEVICE_GET_REGION_INFO", 0x3b6c},
{"linux/vfio.h", "VFIO_DEVICE_GET_IRQ_INFO", 0x3b6d},
{"linux/vfio.h", "VFIO_DEVICE_SET_IRQS", 0x3b6e},
{"linux/vfio.h", "VFIO_DEVICE_RESET", 0x3b6f},
{"linux/vfio.h", "VFIO_IOMMU_GET_INFO", 0x3b70},
{"linux/vfio.h", "VFIO_IOMMU_MAP_DMA", 0x3b71},
{"linux/vfio.h", "VFIO_IOMMU_UNMAP_DMA", 0x3b72},
{"linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", 0x3d01},
{"linux/ptp_clock.h", "PTP_EXTTS_REQUEST", 0x3d02},
{"linux/ptp_clock.h", "PTP_PEROUT_REQUEST", 0x3d03},
{"linux/ptp_clock.h", "PTP_ENABLE_PPS", 0x3d04},
{"linux/ptp_clock.h", "PTP_SYS_OFFSET", 0x3d05},
{"linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", 0x4003},
{"linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", 0x4004},
{"linux/agpgart.h", "AGPIOC_INFO", 0x4100},
@ -253,15 +272,14 @@
{"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x4209},
{"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a},
{"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0x420b},
{"linux/cciss_ioctl.h", "CCISS_PASSTHRU32", 0x420b},
{"linux/cciss_ioctl.h", "CCISS_DEREGDISK", 0x420c},
{"linux/cciss_ioctl.h", "CCISS_REGNEWDISK", 0x420d},
{"linux/cciss_ioctl.h", "CCISS_REGNEWD", 0x420e},
{"linux/cciss_ioctl.h", "CCISS_RESCANDISK", 0x4210},
{"linux/cciss_ioctl.h", "CCISS_GETLUNINFO", 0x4211},
{"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU", 0x4212},
{"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU32", 0x4212},
{"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x4300},
{"sound/compress_offload.h", "SNDRV_COMPRESS_IOCTL_VERSION", 0x4300},
{"linux/capi.h", "CAPI_REGISTER", 0x4301},
{"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0x4301},
{"linux/soundcard.h", "SNDCTL_COPR_RDATA", 0x4302},
@ -276,14 +294,29 @@
{"linux/soundcard.h", "SNDCTL_COPR_SENDMSG", 0x4308},
{"linux/capi.h", "CAPI_GET_PROFILE", 0x4309},
{"linux/soundcard.h", "SNDCTL_COPR_RCVMSG", 0x4309},
{"sound/compress_offload.h", "SNDRV_COMPRESS_GET_CAPS", 0x4310},
{"sound/compress_offload.h", "SNDRV_COMPRESS_GET_CODEC_CAPS", 0x4311},
{"sound/compress_offload.h", "SNDRV_COMPRESS_SET_PARAMS", 0x4312},
{"sound/compress_offload.h", "SNDRV_COMPRESS_GET_PARAMS", 0x4313},
{"sound/compress_offload.h", "SNDRV_COMPRESS_SET_METADATA", 0x4314},
{"sound/compress_offload.h", "SNDRV_COMPRESS_GET_METADATA", 0x4315},
{"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0x4320},
{"sound/compress_offload.h", "SNDRV_COMPRESS_TSTAMP", 0x4320},
{"linux/capi.h", "CAPI_GET_ERRCODE", 0x4321},
{"sound/compress_offload.h", "SNDRV_COMPRESS_AVAIL", 0x4321},
{"linux/capi.h", "CAPI_INSTALLED", 0x4322},
{"linux/capi.h", "CAPI_GET_FLAGS", 0x4323},
{"linux/capi.h", "CAPI_SET_FLAGS", 0x4324},
{"linux/capi.h", "CAPI_CLR_FLAGS", 0x4325},
{"linux/capi.h", "CAPI_NCCI_OPENCOUNT", 0x4326},
{"linux/capi.h", "CAPI_NCCI_GETUNIT", 0x4327},
{"sound/compress_offload.h", "SNDRV_COMPRESS_PAUSE", 0x4330},
{"sound/compress_offload.h", "SNDRV_COMPRESS_RESUME", 0x4331},
{"sound/compress_offload.h", "SNDRV_COMPRESS_START", 0x4332},
{"sound/compress_offload.h", "SNDRV_COMPRESS_STOP", 0x4333},
{"sound/compress_offload.h", "SNDRV_COMPRESS_DRAIN", 0x4334},
{"sound/compress_offload.h", "SNDRV_COMPRESS_NEXT_TRACK", 0x4335},
{"sound/compress_offload.h", "SNDRV_COMPRESS_PARTIAL_DRAIN", 0x4336},
{"linux/input.h", "EVIOCGVERSION", 0x4501},
{"linux/input.h", "EVIOCGID", 0x4502},
{"linux/input.h", "EVIOCGREP", 0x4503},
@ -295,6 +328,7 @@
{"linux/input.h", "EVIOCRMFF", 0x4581},
{"linux/input.h", "EVIOCGEFFECTS", 0x4584},
{"linux/input.h", "EVIOCGRAB", 0x4590},
{"linux/input.h", "EVIOCSCLOCKID", 0x45a0},
{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600},
{"video/da8xx-fb.h", "FBIOGET_CONTRAST", 0x4601},
{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601},
@ -326,9 +360,7 @@
{"video/sstfb.h", "SSTFB_GET_VGAPASS", 0x46dd},
{"video/sstfb.h", "SSTFB_SET_VGAPASS", 0x46dd},
{"linux/gigaset_dev.h", "GIGASET_REDIR", 0x4700},
{"linux/gsmmux.h", "GSMIOC_GETCONF", 0x4700},
{"linux/gigaset_dev.h", "GIGASET_CONFIG", 0x4701},
{"linux/gsmmux.h", "GSMIOC_SETCONF", 0x4701},
{"linux/gigaset_dev.h", "GIGASET_BRKCHARS", 0x4702},
{"linux/gigaset_dev.h", "GIGASET_VERSION", 0x4703},
{"sound/asound.h", "SNDRV_HWDEP_IOCTL_PVERSION", 0x4800},
@ -352,15 +384,11 @@
{"linux/hiddev.h", "HIDIOCGUCODE", 0x480d},
{"linux/hiddev.h", "HIDIOCGFLAG", 0x480e},
{"linux/hiddev.h", "HIDIOCSFLAG", 0x480f},
{"sound/hda_hwdep.h", "HDA_IOCTL_PVERSION", 0x4810},
{"linux/hiddev.h", "HIDIOCGCOLLECTIONINDEX", 0x4810},
{"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_INFO", 0x4810},
{"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_INFO", 0x4810},
{"sound/hda_hwdep.h", "HDA_IOCTL_VERB_WRITE", 0x4811},
{"linux/hiddev.h", "HIDIOCGCOLLECTIONINFO", 0x4811},
{"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CODE_POKE", 0x4811},
{"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_LOAD_CODE", 0x4811},
{"sound/hda_hwdep.h", "HDA_IOCTL_GET_WCAP", 0x4812},
{"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CODE_PEEK", 0x4812},
{"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_UNLOAD_CODE", 0x4812},
{"linux/hiddev.h", "HIDIOCGUSAGES", 0x4813},
@ -386,11 +414,12 @@
{"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_PEAK_RMS", 0x4840},
{"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_CONFIG_INFO", 0x4841},
{"sound/hdsp.h", "SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE", 0x4842},
{"sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_VERSION", 0x4843},
{"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_VERSION", 0x4843},
{"sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_MIXER", 0x4844},
{"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_MIXER", 0x4844},
{"sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_9632_AEB", 0x4845},
{"sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_LTC", 0x4846},
{"sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_VERSION", 0x4848},
{"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_STOP", 0x4880},
{"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_VERSION", 0x4880},
{"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CONTINUE", 0x4881},
@ -450,15 +479,6 @@
{"linux/isdn.h", "IIOCNETALN", 0x4920},
{"linux/isdn.h", "IIOCNETDLN", 0x4921},
{"linux/isdn.h", "IIOCNETGPN", 0x4922},
{"linux/mISDNif.h", "IMADDTIMER", 0x4940},
{"linux/mISDNif.h", "IMDELTIMER", 0x4941},
{"linux/mISDNif.h", "IMGETVERSION", 0x4942},
{"linux/mISDNif.h", "IMGETCOUNT", 0x4943},
{"linux/mISDNif.h", "IMGETDEVINFO", 0x4944},
{"linux/mISDNif.h", "IMCTRLREQ", 0x4945},
{"linux/mISDNif.h", "IMCLEAR_L2", 0x4946},
{"linux/mISDNif.h", "IMSETDEVNAME", 0x4947},
{"linux/mISDNif.h", "IMHOLD_L1", 0x4948},
{"linux/isdn.h", "IIOCDBGVAR", 0x497f},
{"linux/isdn.h", "IIOCDRVCTL", 0x4980},
{"linux/kd.h", "KIOCSOUND", 0x4b2f},
@ -515,17 +535,17 @@
{"linux/loop.h", "LOOP_GET_STATUS64", 0x4c05},
{"linux/loop.h", "LOOP_CHANGE_FD", 0x4c06},
{"linux/loop.h", "LOOP_SET_CAPACITY", 0x4c07},
{"linux/loop.h", "LOOP_CTL_ADD", 0x4c80},
{"linux/loop.h", "LOOP_CTL_REMOVE", 0x4c81},
{"linux/loop.h", "LOOP_CTL_GET_FREE", 0x4c82},
{"mtd/mtd-abi.h", "MEMGETINFO", 0x4d01},
{"linux/fsl-diu-fb.h", "MFB_SET_CHROMA_KEY", 0x4d01},
{"mtd/mtd-abi.h", "MEMERASE", 0x4d02},
{"mtd/mtd-abi.h", "MEMWRITEOOB", 0x4d03},
{"linux/fsl-diu-fb.h", "MFB_SET_BRIGHTNESS", 0x4d03},
{"mtd/mtd-abi.h", "MEMREADOOB", 0x4d04},
{"mtd/mtd-abi.h", "MEMLOCK", 0x4d05},
{"mtd/mtd-abi.h", "MEMUNLOCK", 0x4d06},
{"mtd/mtd-abi.h", "MEMGETREGIONCOUNT", 0x4d07},
{"mtd/mtd-abi.h", "MEMGETREGIONINFO", 0x4d08},
{"mtd/mtd-abi.h", "MEMSETOOBSEL", 0x4d09},
{"mtd/mtd-abi.h", "MEMGETOOBSEL", 0x4d0a},
{"mtd/mtd-abi.h", "MEMGETBADBLOCK", 0x4d0b},
{"mtd/mtd-abi.h", "MEMSETBADBLOCK", 0x4d0c},
@ -540,6 +560,7 @@
{"mtd/mtd-abi.h", "MEMWRITEOOB64", 0x4d15},
{"mtd/mtd-abi.h", "MEMREADOOB64", 0x4d16},
{"mtd/mtd-abi.h", "MEMISLOCKED", 0x4d17},
{"mtd/mtd-abi.h", "MEMWRITE", 0x4d18},
{"linux/soundcard.h", "SOUND_MIXER_INFO", 0x4d65},
{"linux/soundcard.h", "SOUND_OLD_MIXER_INFO", 0x4d65},
{"linux/soundcard.h", "SOUND_MIXER_ACCESS", 0x4d66},
@ -559,7 +580,7 @@
{"mtd/ubi-user.h", "UBI_IOCEBMAP", 0x4f03},
{"mtd/ubi-user.h", "UBI_IOCEBUNMAP", 0x4f04},
{"mtd/ubi-user.h", "UBI_IOCEBISMAP", 0x4f05},
{"mtd/ubi-user.h", "UBI_IOCSETPROP", 0x4f06},
{"mtd/ubi-user.h", "UBI_IOCSETVOLPROP", 0x4f06},
{"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x5000},
{"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x5001},
{"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0x5002},
@ -617,15 +638,15 @@
{"linux/soundcard.h", "SNDCTL_SYNTH_CONTROL", 0x5115},
{"linux/soundcard.h", "SNDCTL_SYNTH_REMOVESAMPLE", 0x5116},
{"linux/random.h", "RNDGETENTCNT", 0x5200},
{"media/rds.h", "RDS_CMD_OPEN", 0x5201},
{"linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", 0x5201},
{"linux/random.h", "RNDADDTOENTCNT", 0x5201},
{"media/rds.h", "RDS_CMD_CLOSE", 0x5202},
{"media/saa6588.h", "SAA6588_CMD_OPEN", 0x5201},
{"linux/random.h", "RNDGETPOOL", 0x5202},
{"media/rds.h", "RDS_CMD_READ", 0x5203},
{"media/saa6588.h", "SAA6588_CMD_CLOSE", 0x5202},
{"linux/random.h", "RNDADDENTROPY", 0x5203},
{"media/rds.h", "RDS_CMD_POLL", 0x5204},
{"media/saa6588.h", "SAA6588_CMD_READ", 0x5203},
{"linux/random.h", "RNDZAPENTCNT", 0x5204},
{"media/saa6588.h", "SAA6588_CMD_POLL", 0x5204},
{"linux/random.h", "RNDCLEARPOOL", 0x5206},
{"net/bluetooth/rfcomm.h", "RFCOMMCREATEDEV", 0x52c8},
{"net/bluetooth/rfcomm.h", "RFCOMMRELEASEDEV", 0x52c9},
@ -721,21 +742,94 @@
{"sound/asound.h", "SNDRV_TIMER_IOCTL_PVERSION", 0x5400},
{"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0x5401},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_NEXT_DEVICE", 0x5401},
{"asm-generic/ioctls.h", "TCGETS", 0x5401},
{"linux/soundcard.h", "SNDCTL_TMR_START", 0x5402},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_TREAD", 0x5402},
{"asm-generic/ioctls.h", "TCSETS", 0x5402},
{"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x5403},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_GINFO", 0x5403},
{"asm-generic/ioctls.h", "TCSETSW", 0x5403},
{"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x5404},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_GPARAMS", 0x5404},
{"asm-generic/ioctls.h", "TCSETSF", 0x5404},
{"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0x5405},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_GSTATUS", 0x5405},
{"asm-generic/ioctls.h", "TCGETA", 0x5405},
{"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0x5406},
{"asm-generic/ioctls.h", "TCSETA", 0x5406},
{"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x5407},
{"asm-generic/ioctls.h", "TCSETAW", 0x5407},
{"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x5408},
{"asm-generic/ioctls.h", "TCSETAF", 0x5408},
{"asm-generic/ioctls.h", "TCSBRK", 0x5409},
{"asm-generic/ioctls.h", "TCXONC", 0x540a},
{"asm-generic/ioctls.h", "TCFLSH", 0x540b},
{"asm-generic/ioctls.h", "TIOCEXCL", 0x540c},
{"asm-generic/ioctls.h", "TIOCNXCL", 0x540d},
{"asm-generic/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_SELECT", 0x5410},
{"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_INFO", 0x5411},
{"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_PARAMS", 0x5412},
{"asm-generic/ioctls.h", "TIOCSTI", 0x5412},
{"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_STATUS", 0x5414},
{"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
{"asm-generic/ioctls.h", "TIOCMGET", 0x5415},
{"asm-generic/ioctls.h", "TIOCMBIS", 0x5416},
{"asm-generic/ioctls.h", "TIOCMBIC", 0x5417},
{"asm-generic/ioctls.h", "TIOCMSET", 0x5418},
{"asm-generic/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm-generic/ioctls.h", "TIOCSSOFTCAR", 0x541a},
{"asm-generic/ioctls.h", "FIONREAD", 0x541b},
{"asm-generic/ioctls.h", "TIOCLINUX", 0x541c},
{"asm-generic/ioctls.h", "TIOCCONS", 0x541d},
{"asm-generic/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm-generic/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm-generic/ioctls.h", "TIOCPKT", 0x5420},
{"asm-generic/ioctls.h", "FIONBIO", 0x5421},
{"asm-generic/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm-generic/ioctls.h", "TIOCSETD", 0x5423},
{"asm-generic/ioctls.h", "TIOCGETD", 0x5424},
{"asm-generic/ioctls.h", "TCSBRKP", 0x5425},
{"asm-generic/ioctls.h", "TIOCSBRK", 0x5427},
{"asm-generic/ioctls.h", "TIOCCBRK", 0x5428},
{"asm-generic/ioctls.h", "TIOCGSID", 0x5429},
{"asm-generic/ioctls.h", "TCGETS2", 0x542a},
{"asm-generic/ioctls.h", "TCSETS2", 0x542b},
{"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
{"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
{"asm-generic/ioctls.h", "TIOCGRS485", 0x542e},
{"asm-generic/ioctls.h", "TIOCSRS485", 0x542f},
{"asm-generic/ioctls.h", "TIOCGPTN", 0x5430},
{"asm-generic/ioctls.h", "TIOCSPTLCK", 0x5431},
{"asm-generic/ioctls.h", "TCGETX", 0x5432},
{"asm-generic/ioctls.h", "TIOCGDEV", 0x5432},
{"asm-generic/ioctls.h", "TCSETX", 0x5433},
{"asm-generic/ioctls.h", "TCSETXF", 0x5434},
{"asm-generic/ioctls.h", "TCSETXW", 0x5435},
{"asm-generic/ioctls.h", "TIOCSIG", 0x5436},
{"asm-generic/ioctls.h", "TIOCVHANGUP", 0x5437},
{"asm-generic/ioctls.h", "TIOCGPKT", 0x5438},
{"asm-generic/ioctls.h", "TIOCGPTLCK", 0x5439},
{"asm-generic/ioctls.h", "TIOCGEXCL", 0x5440},
{"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
{"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
{"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
{"asm-generic/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm-generic/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm-generic/ioctls.h", "TIOCSERSWILD", 0x5455},
{"asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
{"asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
{"asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
{"asm-generic/ioctls.h", "TIOCSERGETLSR", 0x5459},
{"asm-generic/ioctls.h", "TIOCSERGETMULTI", 0x545a},
{"asm-generic/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm-generic/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm-generic/ioctls.h", "TIOCGICOUNT", 0x545d},
{"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_START", 0x54a0},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_STOP", 0x54a1},
{"sound/asound.h", "SNDRV_TIMER_IOCTL_CONTINUE", 0x54a2},
@ -757,27 +851,22 @@
{"linux/if_tun.h", "TUNDETACHFILTER", 0x54d6},
{"linux/if_tun.h", "TUNGETVNETHDRSZ", 0x54d7},
{"linux/if_tun.h", "TUNSETVNETHDRSZ", 0x54d8},
{"linux/if_tun.h", "TUNSETQUEUE", 0x54d9},
{"sound/asound.h", "SNDRV_CTL_IOCTL_PVERSION", 0x5500},
{"linux/usbdevice_fs.h", "USBDEVFS_CONTROL", 0x5500},
{"linux/usbdevice_fs.h", "USBDEVFS_CONTROL32", 0x5500},
{"sound/asound.h", "SNDRV_CTL_IOCTL_CARD_INFO", 0x5501},
{"linux/uinput.h", "UI_DEV_CREATE", 0x5501},
{"linux/uinput.h", "UI_DEV_DESTROY", 0x5502},
{"linux/usbdevice_fs.h", "USBDEVFS_BULK", 0x5502},
{"linux/usbdevice_fs.h", "USBDEVFS_BULK32", 0x5502},
{"linux/usbdevice_fs.h", "USBDEVFS_RESETEP", 0x5503},
{"linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", 0x5504},
{"linux/usbdevice_fs.h", "USBDEVFS_SETCONFIGURATION", 0x5505},
{"linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", 0x5508},
{"linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", 0x550a},
{"linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", 0x550a},
{"linux/usbdevice_fs.h", "USBDEVFS_DISCARDURB", 0x550b},
{"linux/usbdevice_fs.h", "USBDEVFS_REAPURB", 0x550c},
{"linux/usbdevice_fs.h", "USBDEVFS_REAPURB32", 0x550c},
{"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY", 0x550d},
{"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY32", 0x550d},
{"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", 0x550e},
{"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", 0x550e},
{"linux/usbdevice_fs.h", "USBDEVFS_CLAIMINTERFACE", 0x550f},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LIST", 0x5510},
{"linux/usbdevice_fs.h", "USBDEVFS_RELEASEINTERFACE", 0x5510},
@ -785,7 +874,6 @@
{"linux/usbdevice_fs.h", "USBDEVFS_CONNECTINFO", 0x5511},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_READ", 0x5512},
{"linux/usbdevice_fs.h", "USBDEVFS_IOCTL", 0x5512},
{"linux/usbdevice_fs.h", "USBDEVFS_IOCTL32", 0x5512},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_WRITE", 0x5513},
{"linux/usbdevice_fs.h", "USBDEVFS_HUB_PORTINFO", 0x5513},
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LOCK", 0x5514},
@ -801,7 +889,9 @@
{"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_REMOVE", 0x5519},
{"linux/usbdevice_fs.h", "USBDEVFS_RELEASE_PORT", 0x5519},
{"sound/asound.h", "SNDRV_CTL_IOCTL_TLV_READ", 0x551a},
{"linux/usbdevice_fs.h", "USBDEVFS_GET_CAPABILITIES", 0x551a},
{"sound/asound.h", "SNDRV_CTL_IOCTL_TLV_WRITE", 0x551b},
{"linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT_CLAIM", 0x551b},
{"sound/asound.h", "SNDRV_CTL_IOCTL_TLV_COMMAND", 0x551c},
{"sound/asound.h", "SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE", 0x5520},
{"sound/asound.h", "SNDRV_CTL_IOCTL_HWDEP_INFO", 0x5521},
@ -821,6 +911,7 @@
{"linux/uinput.h", "UI_SET_FFBIT", 0x556b},
{"linux/uinput.h", "UI_SET_PHYS", 0x556c},
{"linux/uinput.h", "UI_SET_SWBIT", 0x556d},
{"linux/uinput.h", "UI_SET_PROPBIT", 0x556e},
{"linux/uinput.h", "UI_BEGIN_FF_UPLOAD", 0x55c8},
{"linux/uinput.h", "UI_END_FF_UPLOAD", 0x55c9},
{"linux/uinput.h", "UI_BEGIN_FF_ERASE", 0x55ca},
@ -835,7 +926,9 @@
{"linux/vt.h", "VT_SETMODE", 0x5602},
{"linux/vt.h", "VT_GETSTATE", 0x5603},
{"linux/videodev2.h", "VIDIOC_G_FMT", 0x5604},
{"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_FMT", 0x5604},
{"linux/vt.h", "VT_SENDSIG", 0x5604},
{"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FMT", 0x5605},
{"linux/videodev2.h", "VIDIOC_S_FMT", 0x5605},
{"linux/vt.h", "VT_RELDISP", 0x5605},
{"linux/vt.h", "VT_ACTIVATE", 0x5606},
@ -851,45 +944,44 @@
{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
{"linux/vt.h", "VT_GETHIFONTMASK", 0x560d},
{"linux/videodev2.h", "VIDIOC_OVERLAY", 0x560e},
{"linux/videodev2.h", "VIDIOC_OVERLAY_OLD", 0x560e},
{"linux/vt.h", "VT_WAITEVENT", 0x560e},
{"linux/videodev2.h", "VIDIOC_QBUF", 0x560f},
{"linux/vt.h", "VT_SETACTIVATE", 0x560f},
{"linux/videodev2.h", "VIDIOC_EXPBUF", 0x5610},
{"linux/videodev2.h", "VIDIOC_DQBUF", 0x5611},
{"linux/videodev2.h", "VIDIOC_STREAMON", 0x5612},
{"linux/videodev2.h", "VIDIOC_STREAMOFF", 0x5613},
{"linux/videodev2.h", "VIDIOC_G_PARM", 0x5615},
{"linux/videodev2.h", "VIDIOC_S_PARM", 0x5616},
{"linux/videodev2.h", "VIDIOC_S_PARM_OLD", 0x5616},
{"linux/videodev2.h", "VIDIOC_G_STD", 0x5617},
{"linux/videodev2.h", "VIDIOC_S_STD", 0x5618},
{"linux/videodev2.h", "VIDIOC_ENUMSTD", 0x5619},
{"linux/videodev2.h", "VIDIOC_ENUMINPUT", 0x561a},
{"linux/videodev2.h", "VIDIOC_G_CTRL", 0x561b},
{"linux/videodev2.h", "VIDIOC_S_CTRL", 0x561c},
{"linux/videodev2.h", "VIDIOC_S_CTRL_OLD", 0x561c},
{"linux/videodev2.h", "VIDIOC_G_TUNER", 0x561d},
{"linux/videodev2.h", "VIDIOC_S_TUNER", 0x561e},
{"linux/videodev2.h", "VIDIOC_G_AUDIO", 0x5621},
{"linux/videodev2.h", "VIDIOC_G_AUDIO_OLD", 0x5621},
{"linux/videodev2.h", "VIDIOC_S_AUDIO", 0x5622},
{"linux/videodev2.h", "VIDIOC_QUERYCTRL", 0x5624},
{"linux/videodev2.h", "VIDIOC_QUERYMENU", 0x5625},
{"linux/videodev2.h", "VIDIOC_G_INPUT", 0x5626},
{"linux/videodev2.h", "VIDIOC_S_INPUT", 0x5627},
{"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_EDID", 0x5628},
{"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_EDID", 0x5629},
{"linux/videodev2.h", "VIDIOC_G_OUTPUT", 0x562e},
{"linux/videodev2.h", "VIDIOC_S_OUTPUT", 0x562f},
{"linux/videodev2.h", "VIDIOC_ENUMOUTPUT", 0x5630},
{"linux/videodev2.h", "VIDIOC_G_AUDOUT", 0x5631},
{"linux/videodev2.h", "VIDIOC_G_AUDOUT_OLD", 0x5631},
{"linux/videodev2.h", "VIDIOC_S_AUDOUT", 0x5632},
{"linux/videodev2.h", "VIDIOC_G_MODULATOR", 0x5636},
{"linux/videodev2.h", "VIDIOC_S_MODULATOR", 0x5637},
{"linux/videodev2.h", "VIDIOC_G_FREQUENCY", 0x5638},
{"linux/videodev2.h", "VIDIOC_S_FREQUENCY", 0x5639},
{"linux/videodev2.h", "VIDIOC_CROPCAP", 0x563a},
{"linux/videodev2.h", "VIDIOC_CROPCAP_OLD", 0x563a},
{"linux/videodev2.h", "VIDIOC_G_CROP", 0x563b},
{"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_CROP", 0x563b},
{"linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_CROP", 0x563c},
{"linux/videodev2.h", "VIDIOC_S_CROP", 0x563c},
{"linux/videodev2.h", "VIDIOC_G_JPEGCOMP", 0x563d},
{"linux/videodev2.h", "VIDIOC_S_JPEGCOMP", 0x563e},
@ -922,9 +1014,20 @@
{"linux/videodev2.h", "VIDIOC_DQEVENT", 0x5659},
{"linux/videodev2.h", "VIDIOC_SUBSCRIBE_EVENT", 0x565a},
{"linux/videodev2.h", "VIDIOC_UNSUBSCRIBE_EVENT", 0x565b},
{"linux/videodev2.h", "VIDIOC_CREATE_BUFS", 0x565c},
{"linux/videodev2.h", "VIDIOC_PREPARE_BUF", 0x565d},
{"linux/videodev2.h", "VIDIOC_G_SELECTION", 0x565e},
{"linux/videodev2.h", "VIDIOC_S_SELECTION", 0x565f},
{"linux/videodev2.h", "VIDIOC_DECODER_CMD", 0x5660},
{"linux/videodev2.h", "VIDIOC_TRY_DECODER_CMD", 0x5661},
{"linux/videodev2.h", "VIDIOC_ENUM_DV_TIMINGS", 0x5662},
{"linux/videodev2.h", "VIDIOC_QUERY_DV_TIMINGS", 0x5663},
{"linux/videodev2.h", "VIDIOC_DV_TIMINGS_CAP", 0x5664},
{"linux/videodev2.h", "VIDIOC_ENUM_FREQ_BANDS", 0x5665},
{"linux/ivtvfb.h", "IVTVFB_IOC_DMA_FRAME", 0x56c0},
{"linux/ivtv.h", "IVTV_IOC_DMA_FRAME", 0x56c0},
{"media/si4713.h", "SI4713_IOC_MEASURE_RNL", 0x56c0},
{"linux/ivtv.h", "IVTV_IOC_PASSTHROUGH_MODE", 0x56c1},
{"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_PVERSION", 0x5700},
{"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x5700},
{"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_INFO", 0x5701},
@ -943,8 +1046,6 @@
{"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DROP", 0x5730},
{"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DRAIN", 0x5731},
{"linux/pktcdvd.h", "PACKET_CTRL_CMD", 0x5801},
{"linux/falloc.h", "FS_IOC_RESVSP", 0x5828},
{"linux/falloc.h", "FS_IOC_RESVSP64", 0x582a},
{"linux/fs.h", "FIFREEZE", 0x5877},
{"linux/fs.h", "FITHAW", 0x5878},
{"linux/fs.h", "FITRIM", 0x5879},
@ -1033,35 +1134,15 @@
{"linux/chio.h", "CHIOINITELEM", 0x6311},
{"linux/chio.h", "CHIOSVOLTAG", 0x6312},
{"linux/chio.h", "CHIOGVPARAMS", 0x6313},
{"linux/comstats.h", "COM_GETPORTSTATS", 0x631e},
{"linux/comstats.h", "COM_CLRPORTSTATS", 0x631f},
{"linux/comstats.h", "COM_GETBRDSTATS", 0x6320},
{"linux/comstats.h", "COM_READPORT", 0x6328},
{"linux/comstats.h", "COM_READBOARD", 0x6329},
{"linux/comstats.h", "COM_READPANEL", 0x632a},
{"linux/cm4000_cs.h", "CM_IOSDBGLVL", 0x63fa},
{"media/v4l2-common.h", "TUNER_SET_CONFIG", 0x645c},
{"media/v4l2-common.h", "VIDIOC_INT_RESET", 0x6466},
{"media/s5p_fimc.h", "S5P_FIMC_TX_END_NOTIFY", 0x6500},
{"linux/fs.h", "FS_IOC32_GETFLAGS", 0x6601},
{"linux/fs.h", "FS_IOC_GETFLAGS", 0x6601},
{"linux/fs.h", "FS_IOC32_SETFLAGS", 0x6602},
{"linux/fs.h", "FS_IOC_SETFLAGS", 0x6602},
{"linux/ext3_fs.h", "EXT3_IOC32_GETVERSION", 0x6603},
{"linux/ext3_fs.h", "EXT3_IOC_GETVERSION", 0x6603},
{"linux/ext3_fs.h", "EXT3_IOC32_SETVERSION", 0x6604},
{"linux/ext3_fs.h", "EXT3_IOC_SETVERSION", 0x6604},
{"linux/ext2_fs.h", "EXT2_IOC_GETRSVSZ", 0x6605},
{"linux/ext3_fs.h", "EXT3_IOC32_GETRSVSZ", 0x6605},
{"linux/ext3_fs.h", "EXT3_IOC_GETRSVSZ", 0x6605},
{"linux/ext2_fs.h", "EXT2_IOC_SETRSVSZ", 0x6606},
{"linux/ext3_fs.h", "EXT3_IOC32_SETRSVSZ", 0x6606},
{"linux/ext3_fs.h", "EXT3_IOC_SETRSVSZ", 0x6606},
{"linux/ext3_fs.h", "EXT3_IOC32_GROUP_EXTEND", 0x6607},
{"linux/ext3_fs.h", "EXT3_IOC_GROUP_EXTEND", 0x6607},
{"linux/ext3_fs.h", "EXT3_IOC_GROUP_ADD", 0x6608},
{"linux/fs.h", "FS_IOC_FIEMAP", 0x660b},
{"linux/ext3_fs.h", "EXT3_IOC32_WAIT_FOR_READONLY", 0x6663},
{"linux/ext3_fs.h", "EXT3_IOC_WAIT_FOR_READONLY", 0x6663},
{"linux/usb/functionfs.h", "FUNCTIONFS_FIFO_STATUS", 0x6701},
{"linux/usb/gadgetfs.h", "GADGETFS_FIFO_STATUS", 0x6701},
{"linux/usb/functionfs.h", "FUNCTIONFS_FIFO_FLUSH", 0x6702},
@ -1104,7 +1185,6 @@
{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", 0x690b},
{"media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", 0x690b},
{"linux/i2o-dev.h", "I2OPASSTHRU", 0x690c},
{"linux/i2o-dev.h", "I2OPASSTHRU32", 0x690c},
{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG", 0x690c},
{"media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", 0x690c},
{"linux/ipmi.h", "IPMICTL_SEND_COMMAND", 0x690d},
@ -1179,18 +1259,14 @@
{"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x6c42},
{"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0x6c43},
{"linux/synclink.h", "MGSL_IOCSPARAMS", 0x6d00},
{"linux/synclink.h", "MGSL_IOCSPARAMS32", 0x6d00},
{"linux/mmtimer.h", "MMTIMER_GETOFFSET", 0x6d00},
{"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0x6d00},
{"linux/synclink.h", "MGSL_IOCGPARAMS", 0x6d01},
{"linux/synclink.h", "MGSL_IOCGPARAMS32", 0x6d01},
{"linux/mmtimer.h", "MMTIMER_GETRES", 0x6d01},
{"linux/msm_mdp.h", "MSMFB_GRP_DISP", 0x6d01},
{"linux/mtio.h", "MTIOCTOP", 0x6d01},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", 0x6d01},
{"linux/synclink.h", "MGSL_IOCSTXIDLE", 0x6d02},
{"linux/mmtimer.h", "MMTIMER_GETFREQ", 0x6d02},
{"linux/msm_mdp.h", "MSMFB_BLIT", 0x6d02},
{"linux/mtio.h", "MTIOCGET", 0x6d02},
{"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0x6d02},
{"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03},
@ -1372,6 +1448,8 @@
{"linux/rtc.h", "RTC_WKALM_RD", 0x7010},
{"linux/rtc.h", "RTC_PLL_GET", 0x7011},
{"linux/rtc.h", "RTC_PLL_SET", 0x7012},
{"linux/rtc.h", "RTC_VL_READ", 0x7013},
{"linux/rtc.h", "RTC_VL_CLR", 0x7014},
{"linux/nvram.h", "NVRAM_INIT", 0x7040},
{"linux/nvram.h", "NVRAM_SETCKS", 0x7041},
{"linux/ppdev.h", "PPSETMODE", 0x7080},
@ -1401,6 +1479,7 @@
{"linux/pps.h", "PPS_SETPARAMS", 0x70a2},
{"linux/pps.h", "PPS_GETCAP", 0x70a3},
{"linux/pps.h", "PPS_FETCH", 0x70a4},
{"linux/pps.h", "PPS_KC_BIND", 0x70a5},
{"linux/serio.h", "SPIOCSTYPE", 0x7101},
{"linux/telephony.h", "PHONE_CAPABILITIES", 0x7180},
{"linux/telephony.h", "PHONE_CAPABILITIES_LIST", 0x7181},
@ -1495,42 +1574,36 @@
{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x7202},
{"linux/msdos_fs.h", "FAT_IOCTL_GET_ATTRIBUTES", 0x7210},
{"linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", 0x7211},
{"linux/cdk.h", "STL_BINTR", 0x7314},
{"linux/cdk.h", "STL_BSTART", 0x7315},
{"linux/cdk.h", "STL_BSTOP", 0x7316},
{"linux/cdk.h", "STL_BRESET", 0x7317},
{"linux/cdk.h", "STL_GETPFLAG", 0x7350},
{"linux/cdk.h", "STL_SETPFLAG", 0x7351},
{"linux/if_ppp.h", "PPPIOCGL2TPSTATS", 0x7436},
{"linux/if_ppp.h", "PPPIOCGCHAN", 0x7437},
{"linux/if_ppp.h", "PPPIOCATTCHAN", 0x7438},
{"linux/if_ppp.h", "PPPIOCDISCONN", 0x7439},
{"linux/if_ppp.h", "PPPIOCCONNECT", 0x743a},
{"linux/if_ppp.h", "PPPIOCSMRRU", 0x743b},
{"linux/if_ppp.h", "PPPIOCDETACH", 0x743c},
{"linux/if_ppp.h", "PPPIOCATTACH", 0x743d},
{"linux/if_ppp.h", "PPPIOCNEWUNIT", 0x743e},
{"linux/if_ppp.h", "PPPIOCGIDLE", 0x743f},
{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x7440},
{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x7441},
{"linux/if_ppp.h", "PPPIOCSACTIVE", 0x7446},
{"linux/if_ppp.h", "PPPIOCSPASS", 0x7447},
{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x744b},
{"linux/if_ppp.h", "PPPIOCGNPMODE", 0x744c},
{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x744d},
{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x744e},
{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x744f},
{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x7450},
{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x7451},
{"linux/if_ppp.h", "PPPIOCSMRU", 0x7452},
{"linux/if_ppp.h", "PPPIOCGMRU", 0x7453},
{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x7454},
{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x7455},
{"linux/if_ppp.h", "PPPIOCGUNIT", 0x7456},
{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x7457},
{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x7458},
{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x7459},
{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x745a},
{"linux/ppp-ioctl.h", "PPPIOCGL2TPSTATS", 0x7436},
{"linux/ppp-ioctl.h", "PPPIOCGCHAN", 0x7437},
{"linux/ppp-ioctl.h", "PPPIOCATTCHAN", 0x7438},
{"linux/ppp-ioctl.h", "PPPIOCDISCONN", 0x7439},
{"linux/ppp-ioctl.h", "PPPIOCCONNECT", 0x743a},
{"linux/ppp-ioctl.h", "PPPIOCSMRRU", 0x743b},
{"linux/ppp-ioctl.h", "PPPIOCDETACH", 0x743c},
{"linux/ppp-ioctl.h", "PPPIOCATTACH", 0x743d},
{"linux/ppp-ioctl.h", "PPPIOCNEWUNIT", 0x743e},
{"linux/ppp-ioctl.h", "PPPIOCGIDLE", 0x743f},
{"linux/ppp-ioctl.h", "PPPIOCSDEBUG", 0x7440},
{"linux/ppp-ioctl.h", "PPPIOCGDEBUG", 0x7441},
{"linux/ppp-ioctl.h", "PPPIOCSACTIVE", 0x7446},
{"linux/ppp-ioctl.h", "PPPIOCSPASS", 0x7447},
{"linux/ppp-ioctl.h", "PPPIOCSNPMODE", 0x744b},
{"linux/ppp-ioctl.h", "PPPIOCGNPMODE", 0x744c},
{"linux/ppp-ioctl.h", "PPPIOCSCOMPRESS", 0x744d},
{"linux/ppp-ioctl.h", "PPPIOCXFERUNIT", 0x744e},
{"linux/ppp-ioctl.h", "PPPIOCSXASYNCMAP", 0x744f},
{"linux/ppp-ioctl.h", "PPPIOCGXASYNCMAP", 0x7450},
{"linux/ppp-ioctl.h", "PPPIOCSMAXCID", 0x7451},
{"linux/ppp-ioctl.h", "PPPIOCSMRU", 0x7452},
{"linux/ppp-ioctl.h", "PPPIOCGMRU", 0x7453},
{"linux/ppp-ioctl.h", "PPPIOCSRASYNCMAP", 0x7454},
{"linux/ppp-ioctl.h", "PPPIOCGRASYNCMAP", 0x7455},
{"linux/ppp-ioctl.h", "PPPIOCGUNIT", 0x7456},
{"linux/ppp-ioctl.h", "PPPIOCSASYNCMAP", 0x7457},
{"linux/ppp-ioctl.h", "PPPIOCGASYNCMAP", 0x7458},
{"linux/ppp-ioctl.h", "PPPIOCSFLAGS", 0x7459},
{"linux/ppp-ioctl.h", "PPPIOCGFLAGS", 0x745a},
{"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0x7480},
{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x7481},
{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x7482},
@ -1541,97 +1614,43 @@
{"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x7487},
{"linux/isdn_ppp.h", "PPPIOCGIFNAME", 0x7488},
{"linux/toshiba.h", "TOSH_SMM", 0x7490},
{"linux/uvcvideo.h", "UVCIOC_CTRL_MAP", 0x7520},
{"linux/uvcvideo.h", "UVCIOC_CTRL_QUERY", 0x7521},
{"linux/sonypi.h", "SONYPI_IOCGBRT", 0x7600},
{"linux/sonypi.h", "SONYPI_IOCSBRT", 0x7600},
{"media/v4l2-subdev.h", "V4L2_SUBDEV_IR_RX_NOTIFY", 0x7600},
{"linux/fs.h", "FS_IOC32_GETVERSION", 0x7601},
{"linux/fs.h", "FS_IOC_GETVERSION", 0x7601},
{"media/v4l2-subdev.h", "V4L2_SUBDEV_IR_TX_NOTIFY", 0x7601},
{"linux/videodev.h", "VIDIOCGCAP", 0x7601},
{"linux/fs.h", "FS_IOC32_SETVERSION", 0x7602},
{"linux/fs.h", "FS_IOC_SETVERSION", 0x7602},
{"linux/sonypi.h", "SONYPI_IOCGBAT1CAP", 0x7602},
{"linux/videodev.h", "VIDIOCGCHAN", 0x7602},
{"linux/sonypi.h", "SONYPI_IOCGBAT1REM", 0x7603},
{"linux/videodev.h", "VIDIOCSCHAN", 0x7603},
{"linux/sonypi.h", "SONYPI_IOCGBAT2CAP", 0x7604},
{"linux/videodev.h", "VIDIOCGTUNER", 0x7604},
{"linux/sonypi.h", "SONYPI_IOCGBAT2REM", 0x7605},
{"linux/videodev.h", "VIDIOCSTUNER", 0x7605},
{"linux/videodev.h", "VIDIOCGPICT", 0x7606},
{"linux/sonypi.h", "SONYPI_IOCGBATFLAGS", 0x7607},
{"linux/videodev.h", "VIDIOCSPICT", 0x7607},
{"linux/sonypi.h", "SONYPI_IOCGBLUE", 0x7608},
{"linux/videodev.h", "VIDIOCCAPTURE", 0x7608},
{"linux/sonypi.h", "SONYPI_IOCSBLUE", 0x7609},
{"linux/videodev.h", "VIDIOCGWIN", 0x7609},
{"linux/sonypi.h", "SONYPI_IOCGFAN", 0x760a},
{"linux/videodev.h", "VIDIOCSWIN", 0x760a},
{"linux/sonypi.h", "SONYPI_IOCSFAN", 0x760b},
{"linux/videodev.h", "VIDIOCGFBUF", 0x760b},
{"linux/sonypi.h", "SONYPI_IOCGTEMP", 0x760c},
{"linux/videodev.h", "VIDIOCSFBUF", 0x760c},
{"linux/videodev.h", "VIDIOCKEY", 0x760d},
{"linux/videodev.h", "VIDIOCGFREQ", 0x760e},
{"linux/videodev.h", "VIDIOCSFREQ", 0x760f},
{"linux/videodev.h", "VIDIOCGAUDIO", 0x7610},
{"linux/videodev.h", "VIDIOCSAUDIO", 0x7611},
{"linux/videodev.h", "VIDIOCSYNC", 0x7612},
{"linux/videodev.h", "VIDIOCMCAPTURE", 0x7613},
{"linux/videodev.h", "VIDIOCGMBUF", 0x7614},
{"linux/videodev.h", "VIDIOCGUNIT", 0x7615},
{"linux/videodev.h", "VIDIOCGCAPTURE", 0x7616},
{"linux/videodev.h", "VIDIOCSCAPTURE", 0x7617},
{"linux/videodev.h", "VIDIOCSPLAYMODE", 0x7618},
{"linux/videodev.h", "VIDIOCSWRITEMODE", 0x7619},
{"linux/videodev.h", "VIDIOCGPLAYINFO", 0x761a},
{"linux/videodev.h", "VIDIOCSMICROCODE", 0x761b},
{"linux/videodev.h", "VIDIOCGVBIFMT", 0x761c},
{"linux/videodev.h", "VIDIOCSVBIFMT", 0x761d},
{"linux/meye.h", "MEYEIOC_G_PARAMS", 0x76c0},
{"media/pwc-ioctl.h", "VIDIOCPWCRUSER", 0x76c0},
{"linux/meye.h", "MEYEIOC_S_PARAMS", 0x76c1},
{"media/pwc-ioctl.h", "VIDIOCPWCSUSER", 0x76c1},
{"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x76c2},
{"media/pwc-ioctl.h", "VIDIOCPWCFACTORY", 0x76c2},
{"linux/meye.h", "MEYEIOC_SYNC", 0x76c3},
{"media/pwc-ioctl.h", "VIDIOCPWCGCQUAL", 0x76c3},
{"media/pwc-ioctl.h", "VIDIOCPWCSCQUAL", 0x76c3},
{"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4},
{"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x76c5},
{"media/pwc-ioctl.h", "VIDIOCPWCGSERIAL", 0x76c6},
{"media/pwc-ioctl.h", "VIDIOCPWCPROBE", 0x76c7},
{"media/pwc-ioctl.h", "VIDIOCPWCGAGC", 0x76c8},
{"media/pwc-ioctl.h", "VIDIOCPWCSAGC", 0x76c8},
{"media/pwc-ioctl.h", "VIDIOCPWCSSHUTTER", 0x76c9},
{"media/pwc-ioctl.h", "VIDIOCPWCGAWB", 0x76ca},
{"media/pwc-ioctl.h", "VIDIOCPWCSAWB", 0x76ca},
{"media/pwc-ioctl.h", "VIDIOCPWCGAWBSPEED", 0x76cb},
{"media/pwc-ioctl.h", "VIDIOCPWCSAWBSPEED", 0x76cb},
{"media/pwc-ioctl.h", "VIDIOCPWCGLED", 0x76cd},
{"media/pwc-ioctl.h", "VIDIOCPWCSLED", 0x76cd},
{"media/pwc-ioctl.h", "VIDIOCPWCGCONTOUR", 0x76ce},
{"media/pwc-ioctl.h", "VIDIOCPWCSCONTOUR", 0x76ce},
{"media/pwc-ioctl.h", "VIDIOCPWCGBACKLIGHT", 0x76cf},
{"media/pwc-ioctl.h", "VIDIOCPWCSBACKLIGHT", 0x76cf},
{"media/pwc-ioctl.h", "VIDIOCPWCGFLICKER", 0x76d0},
{"media/pwc-ioctl.h", "VIDIOCPWCSFLICKER", 0x76d0},
{"media/pwc-ioctl.h", "VIDIOCPWCGDYNNOISE", 0x76d1},
{"media/pwc-ioctl.h", "VIDIOCPWCSDYNNOISE", 0x76d1},
{"media/pwc-ioctl.h", "VIDIOCPWCGREALSIZE", 0x76d2},
{"media/pwc-ioctl.h", "VIDIOCPWCMPTGRANGE", 0x76d3},
{"media/pwc-ioctl.h", "VIDIOCPWCMPTRESET", 0x76d3},
{"media/pwc-ioctl.h", "VIDIOCPWCMPTGANGLE", 0x76d4},
{"media/pwc-ioctl.h", "VIDIOCPWCMPTSANGLE", 0x76d4},
{"media/pwc-ioctl.h", "VIDIOCPWCMPTSTATUS", 0x76d5},
{"media/pwc-ioctl.h", "VIDIOCPWCGVIDCMD", 0x76d7},
{"media/pwc-ioctl.h", "VIDIOCPWCGVIDTABLE", 0x76d8},
{"media/ovcamchip.h", "OVCAMCHIP_CMD_Q_SUBTYPE", 0x8800},
{"media/ovcamchip.h", "OVCAMCHIP_CMD_INITIALIZE", 0x8801},
{"media/ovcamchip.h", "OVCAMCHIP_CMD_S_CTRL", 0x8802},
{"media/ovcamchip.h", "OVCAMCHIP_CMD_G_CTRL", 0x8803},
{"media/ovcamchip.h", "OVCAMCHIP_CMD_S_MODE", 0x8804},
{"media/ovcamchip.h", "OVCAMCHIP_MAX_CMD", 0x883f},
{"linux/media.h", "MEDIA_IOC_DEVICE_INFO", 0x7c00},
{"linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", 0x7c01},
{"linux/media.h", "MEDIA_IOC_ENUM_LINKS", 0x7c02},
{"linux/media.h", "MEDIA_IOC_SETUP_LINK", 0x7c03},
{"asm-generic/sockios.h", "FIOSETOWN", 0x8901},
{"asm-generic/sockios.h", "SIOCSPGRP", 0x8902},
{"asm-generic/sockios.h", "FIOGETOWN", 0x8903},
{"asm-generic/sockios.h", "SIOCGPGRP", 0x8904},
{"asm-generic/sockios.h", "SIOCATMARK", 0x8905},
{"asm-generic/sockios.h", "SIOCGSTAMP", 0x8906},
{"asm-generic/sockios.h", "SIOCGSTAMPNS", 0x8907},
{"linux/sockios.h", "SIOCADDRT", 0x890b},
{"linux/sockios.h", "SIOCDELRT", 0x890c},
{"linux/sockios.h", "SIOCRTMSG", 0x890d},
@ -1678,6 +1697,7 @@
{"linux/sockios.h", "SIOCGMIIREG", 0x8948},
{"linux/sockios.h", "SIOCSMIIREG", 0x8949},
{"linux/sockios.h", "SIOCWANDEV", 0x894a},
{"linux/sockios.h", "SIOCOUTQNSD", 0x894b},
{"linux/sockios.h", "SIOCDARP", 0x8953},
{"linux/sockios.h", "SIOCGARP", 0x8954},
{"linux/sockios.h", "SIOCSARP", 0x8955},
@ -1766,11 +1786,56 @@
{"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x9362},
{"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x9363},
{"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0x9364},
{"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", 0x9364},
{"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x9365},
{"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x9366},
{"linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", 0x9367},
{"linux/auto_fs4.h", "AUTOFS_IOC_ASKUMOUNT", 0x9370},
{"linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", 0x9401},
{"linux/btrfs.h", "BTRFS_IOC_DEFRAG", 0x9402},
{"linux/btrfs.h", "BTRFS_IOC_RESIZE", 0x9403},
{"linux/btrfs.h", "BTRFS_IOC_SCAN_DEV", 0x9404},
{"linux/btrfs.h", "BTRFS_IOC_TRANS_START", 0x9406},
{"linux/btrfs.h", "BTRFS_IOC_TRANS_END", 0x9407},
{"linux/btrfs.h", "BTRFS_IOC_SYNC", 0x9408},
{"linux/btrfs.h", "BTRFS_IOC_CLONE", 0x9409},
{"linux/btrfs.h", "BTRFS_IOC_ADD_DEV", 0x940a},
{"linux/btrfs.h", "BTRFS_IOC_RM_DEV", 0x940b},
{"linux/btrfs.h", "BTRFS_IOC_BALANCE", 0x940c},
{"linux/btrfs.h", "BTRFS_IOC_CLONE_RANGE", 0x940d},
{"linux/btrfs.h", "BTRFS_IOC_SUBVOL_CREATE", 0x940e},
{"linux/btrfs.h", "BTRFS_IOC_SNAP_DESTROY", 0x940f},
{"linux/btrfs.h", "BTRFS_IOC_DEFRAG_RANGE", 0x9410},
{"linux/btrfs.h", "BTRFS_IOC_TREE_SEARCH", 0x9411},
{"linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", 0x9412},
{"linux/btrfs.h", "BTRFS_IOC_DEFAULT_SUBVOL", 0x9413},
{"linux/btrfs.h", "BTRFS_IOC_SPACE_INFO", 0x9414},
{"linux/btrfs.h", "BTRFS_IOC_WAIT_SYNC", 0x9416},
{"linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", 0x9417},
{"linux/btrfs.h", "BTRFS_IOC_START_SYNC", 0x9418},
{"linux/btrfs.h", "BTRFS_IOC_SUBVOL_CREATE_V2", 0x9418},
{"linux/btrfs.h", "BTRFS_IOC_SUBVOL_GETFLAGS", 0x9419},
{"linux/btrfs.h", "BTRFS_IOC_SUBVOL_SETFLAGS", 0x941a},
{"linux/btrfs.h", "BTRFS_IOC_SCRUB", 0x941b},
{"linux/btrfs.h", "BTRFS_IOC_SCRUB_CANCEL", 0x941c},
{"linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", 0x941d},
{"linux/btrfs.h", "BTRFS_IOC_DEV_INFO", 0x941e},
{"linux/btrfs.h", "BTRFS_IOC_FS_INFO", 0x941f},
{"linux/btrfs.h", "BTRFS_IOC_BALANCE_V2", 0x9420},
{"linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", 0x9421},
{"linux/btrfs.h", "BTRFS_IOC_BALANCE_PROGRESS", 0x9422},
{"linux/btrfs.h", "BTRFS_IOC_INO_PATHS", 0x9423},
{"linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO", 0x9424},
{"linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", 0x9425},
{"linux/btrfs.h", "BTRFS_IOC_SEND", 0x9426},
{"linux/btrfs.h", "BTRFS_IOC_DEVICES_READY", 0x9427},
{"linux/btrfs.h", "BTRFS_IOC_QUOTA_CTL", 0x9428},
{"linux/btrfs.h", "BTRFS_IOC_QGROUP_ASSIGN", 0x9429},
{"linux/btrfs.h", "BTRFS_IOC_QGROUP_CREATE", 0x942a},
{"linux/btrfs.h", "BTRFS_IOC_QGROUP_LIMIT", 0x942b},
{"linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", 0x9431},
{"linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", 0x9432},
{"linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", 0x9434},
{"linux/btrfs.h", "BTRFS_IOC_DEV_REPLACE", 0x9435},
{"linux/nbd.h", "NBD_SET_SOCK", 0xab00},
{"linux/nbd.h", "NBD_SET_BLKSIZE", 0xab01},
{"linux/nbd.h", "NBD_SET_SIZE", 0xab02},
@ -1781,6 +1846,7 @@
{"linux/nbd.h", "NBD_SET_SIZE_BLOCKS", 0xab07},
{"linux/nbd.h", "NBD_DISCONNECT", 0xab08},
{"linux/nbd.h", "NBD_SET_TIMEOUT", 0xab09},
{"linux/nbd.h", "NBD_SET_FLAGS", 0xab0a},
{"linux/raw.h", "RAW_SETBIND", 0xac00},
{"linux/raw.h", "RAW_GETBIND", 0xac01},
{"linux/kvm.h", "KVM_GET_API_VERSION", 0xae00},
@ -1799,6 +1865,9 @@
{"linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", 0xae46},
{"linux/kvm.h", "KVM_SET_TSS_ADDR", 0xae47},
{"linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", 0xae48},
{"linux/kvm.h", "KVM_S390_UCAS_MAP", 0xae50},
{"linux/kvm.h", "KVM_S390_UCAS_UNMAP", 0xae51},
{"linux/kvm.h", "KVM_S390_VCPU_FAULT", 0xae52},
{"linux/kvm.h", "KVM_CREATE_IRQCHIP", 0xae60},
{"linux/kvm.h", "KVM_IRQ_LINE", 0xae61},
{"linux/kvm.h", "KVM_GET_IRQCHIP", 0xae62},
@ -1861,11 +1930,27 @@
{"linux/kvm.h", "KVM_GET_DEBUGREGS", 0xaea1},
{"linux/kvm.h", "KVM_PPC_GET_PVINFO", 0xaea1},
{"linux/kvm.h", "KVM_SET_DEBUGREGS", 0xaea2},
{"linux/kvm.h", "KVM_SET_TSC_KHZ", 0xaea2},
{"linux/kvm.h", "KVM_ENABLE_CAP", 0xaea3},
{"linux/kvm.h", "KVM_GET_TSC_KHZ", 0xaea3},
{"linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", 0xaea4},
{"linux/kvm.h", "KVM_GET_XSAVE", 0xaea4},
{"linux/kvm.h", "KVM_SET_XSAVE", 0xaea5},
{"linux/kvm.h", "KVM_SIGNAL_MSI", 0xaea5},
{"linux/kvm.h", "KVM_GET_XCRS", 0xaea6},
{"linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", 0xaea6},
{"linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", 0xaea7},
{"linux/kvm.h", "KVM_SET_XCRS", 0xaea7},
{"linux/kvm.h", "KVM_CREATE_SPAPR_TCE", 0xaea8},
{"linux/kvm.h", "KVM_ALLOCATE_RMA", 0xaea9},
{"linux/kvm.h", "KVM_DIRTY_TLB", 0xaeaa},
{"linux/kvm.h", "KVM_PPC_GET_HTAB_FD", 0xaeaa},
{"linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", 0xaeab},
{"linux/kvm.h", "KVM_GET_ONE_REG", 0xaeab},
{"linux/kvm.h", "KVM_SET_ONE_REG", 0xaeac},
{"linux/kvm.h", "KVM_KVMCLOCK_CTRL", 0xaead},
{"linux/kvm.h", "KVM_ARM_VCPU_INIT", 0xaeae},
{"linux/kvm.h", "KVM_GET_REG_LIST", 0xaeb0},
{"linux/vhost.h", "VHOST_GET_FEATURES", 0xaf00},
{"linux/vhost.h", "VHOST_SET_FEATURES", 0xaf00},
{"linux/vhost.h", "VHOST_SET_OWNER", 0xaf01},
@ -1883,10 +1968,7 @@
{"linux/vhost.h", "VHOST_NET_SET_BACKEND", 0xaf30},
{"linux/if_pppox.h", "PPPOEIOCSFWD", 0xb100},
{"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101},
{"linux/usb/iowarrior.h", "IOW_WRITE", 0xc001},
{"linux/usb/iowarrior.h", "IOW_READ", 0xc002},
{"linux/usb/iowarrior.h", "IOW_GETINFO", 0xc003},
{"linux/reiserfs_fs.h", "REISERFS_IOC32_UNPACK", 0xcd01},
{"linux/mmc/ioctl.h", "MMC_IOC_CMD", 0xb300},
{"linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", 0xcd01},
{"video/sisfb.h", "SISFB_GET_INFO_SIZE", 0xf300},
{"video/sisfb.h", "SISFB_GET_INFO", 0xf301},

View File

@ -1,5 +1,4 @@
#! /bin/sh
#
# Copyright (c) 2001 Wichert Akkerman <wichert@cistron.nl>
# All rights reserved.
#
@ -24,9 +23,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
#
# Validate arg count.
case $# in
@ -51,13 +47,12 @@ lookup_ioctls()
# Build the list of all ioctls
regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\+0x'"$type"'..\>'
(cd "$dir" && grep "$regexp" "$@" /dev/null 2>/dev/null) |
(cd "$dir" && for f; do grep "$regexp" "$f" "uapi/$f" 2>/dev/null; done) |
sed -ne "s,$asm/,asm/,g"'
s/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*\(0x'"$type"'..\).*/ { "\1", "\2", \3 },/p' \
>> ioctls.h
}
> ioctls.h
lookup_ioctls 03 linux/hdreg.h
@ -99,9 +94,11 @@ regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\
-e 's/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*_S\?I.*(\([^[,]*\)[[:space:]]*,[[:space:]]*\([^,)]*\).*/ { "\1", "\2", _IOC(_IOC_NONE,\3,\4,0) },/p' \
>> ioctls.h
# Sort and drop dups?
# sort -u <ioctls.h >ioctls1.h && mv ioctls1.h ioctls.h
# Strip uapi/ prefix
sed -i 's|"uapi/|"|' ioctls.h
# Sort and drop dups
sort -u -o ioctls.h ioctls.h
> ioctldefs.h

View File

@ -22,16 +22,14 @@ struct ioctlent ioctls[] = {
int nioctls = sizeof(ioctls) / sizeof(ioctls[0]);
int compare(const void* a, const void* b) {
unsigned long code1 = ((struct ioctlent *) a)->code;
unsigned long code2 = ((struct ioctlent *) b)->code;
const char *name1 = ((struct ioctlent *) a)->name;
const char *name2 = ((struct ioctlent *) b)->name;
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : strcmp (name1, name2);
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : strcmp(name1, name2);
}
int main(int argc, char** argv) {
int i;
@ -41,10 +39,10 @@ int main(int argc, char** argv) {
(_IOC_TYPEMASK << _IOC_TYPESHIFT);
qsort(ioctls, nioctls, sizeof(ioctls[0]), compare);
puts ("\t/* Generated by ioctlsort */");
puts("\t/* Generated by ioctlsort */");
for (i = 0; i < nioctls; i++)
if (i == 0 || ioctls[i].code != ioctls[i-1].code ||
strcmp (ioctls[i].name, ioctls[i-1].name))
strcmp(ioctls[i].name, ioctls[i-1].name))
printf("\t{\"%s\",\t\"%s\",\t%#06lx},\n",
ioctls[i].header, ioctls[i].name, ioctls[i].code);

50
linux/kexec.h Normal file
View File

@ -0,0 +1,50 @@
#ifndef LINUX_KEXEC_H
#define LINUX_KEXEC_H
/* kexec system call - It loads the new kernel to boot into.
* kexec does not sync, or unmount filesystems so if you need
* that to happen you need to do that yourself.
*/
/* kexec flags for different usage scenarios */
#define KEXEC_ON_CRASH 0x00000001
#define KEXEC_PRESERVE_CONTEXT 0x00000002
#define KEXEC_ARCH_MASK 0xffff0000
/* These values match the ELF architecture values.
* Unless there is a good reason that should continue to be the case.
*/
#define KEXEC_ARCH_DEFAULT ( 0 << 16)
#define KEXEC_ARCH_386 ( 3 << 16)
#define KEXEC_ARCH_X86_64 (62 << 16)
#define KEXEC_ARCH_PPC (20 << 16)
#define KEXEC_ARCH_PPC64 (21 << 16)
#define KEXEC_ARCH_IA_64 (50 << 16)
#define KEXEC_ARCH_ARM (40 << 16)
#define KEXEC_ARCH_S390 (22 << 16)
#define KEXEC_ARCH_SH (42 << 16)
#define KEXEC_ARCH_MIPS_LE (10 << 16)
#define KEXEC_ARCH_MIPS ( 8 << 16)
/* The artificial cap on the number of segments passed to kexec_load. */
#define KEXEC_SEGMENT_MAX 16
/*
* This structure is used to hold the arguments that are used when
* loading kernel binaries.
*/
struct kexec_segment {
const void *buf;
size_t bufsz;
const void *mem;
size_t memsz;
};
/* Load a new kernel image as described by the kexec_segment array
* consisting of passed number of segments at the entry-point address.
* The flags allow different useage types.
*/
extern int kexec_load(void *, size_t, struct kexec_segment *,
unsigned long int);
#endif /* LINUX_KEXEC_H */

61
linux/keyctl.h Normal file
View File

@ -0,0 +1,61 @@
/* keyctl.h: keyctl command IDs
*
* Copyright (C) 2004, 2008 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _LINUX_KEYCTL_H
#define _LINUX_KEYCTL_H
/* special process keyring shortcut IDs */
#define KEY_SPEC_THREAD_KEYRING -1 /* - key ID for thread-specific keyring */
#define KEY_SPEC_PROCESS_KEYRING -2 /* - key ID for process-specific keyring */
#define KEY_SPEC_SESSION_KEYRING -3 /* - key ID for session-specific keyring */
#define KEY_SPEC_USER_KEYRING -4 /* - key ID for UID-specific keyring */
#define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */
#define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */
#define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */
#define KEY_SPEC_REQUESTOR_KEYRING -8 /* - key ID for request_key() dest keyring */
/* request-key default keyrings */
#define KEY_REQKEY_DEFL_NO_CHANGE -1
#define KEY_REQKEY_DEFL_DEFAULT 0
#define KEY_REQKEY_DEFL_THREAD_KEYRING 1
#define KEY_REQKEY_DEFL_PROCESS_KEYRING 2
#define KEY_REQKEY_DEFL_SESSION_KEYRING 3
#define KEY_REQKEY_DEFL_USER_KEYRING 4
#define KEY_REQKEY_DEFL_USER_SESSION_KEYRING 5
#define KEY_REQKEY_DEFL_GROUP_KEYRING 6
#define KEY_REQKEY_DEFL_REQUESTOR_KEYRING 7
/* keyctl commands */
#define KEYCTL_GET_KEYRING_ID 0 /* ask for a keyring's ID */
#define KEYCTL_JOIN_SESSION_KEYRING 1 /* join or start named session keyring */
#define KEYCTL_UPDATE 2 /* update a key */
#define KEYCTL_REVOKE 3 /* revoke a key */
#define KEYCTL_CHOWN 4 /* set ownership of a key */
#define KEYCTL_SETPERM 5 /* set perms on a key */
#define KEYCTL_DESCRIBE 6 /* describe a key */
#define KEYCTL_CLEAR 7 /* clear contents of a keyring */
#define KEYCTL_LINK 8 /* link a key into a keyring */
#define KEYCTL_UNLINK 9 /* unlink a key from a keyring */
#define KEYCTL_SEARCH 10 /* search for a key in a keyring */
#define KEYCTL_READ 11 /* read a key or keyring's contents */
#define KEYCTL_INSTANTIATE 12 /* instantiate a partially constructed key */
#define KEYCTL_NEGATE 13 /* negate a partially constructed key */
#define KEYCTL_SET_REQKEY_KEYRING 14 /* set default request-key keyring */
#define KEYCTL_SET_TIMEOUT 15 /* set key timeout */
#define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */
#define KEYCTL_GET_SECURITY 17 /* get key security label */
#define KEYCTL_SESSION_TO_PARENT 18 /* apply session keyring to parent process */
#define KEYCTL_REJECT 19 /* reject a partially constructed key */
#define KEYCTL_INSTANTIATE_IOV 20 /* instantiate a partially constructed key */
#define KEYCTL_INVALIDATE 21 /* invalidate a key */
#define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */
#endif /* _LINUX_KEYCTL_H */

View File

@ -24,30 +24,28 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*/
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
{ 1, TP, sys_exit, "_exit" }, /* 1 */
{ 1, TP|SE, sys_exit, "_exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, 0, sys_read, "read" }, /* 3 */
{ 3, 0, sys_write, "write" }, /* 4 */
{ 3, TF, sys_open, "open" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 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, TF, sys_creat, "creat" }, /* 8 */
{ 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 */
{ 3, TF|TP|SE|SI, 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, "chown" }, /* 16 */
{ 0, 0, sys_break, "break" }, /* 17 */
{ 0, TM, sys_break, "break" }, /* 17 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 18 */
{ 3, 0, sys_lseek, "lseek" }, /* 19 */
{ 3, TD, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 5, TF, sys_mount, "mount" }, /* 21 */
{ 1, TF, sys_umount, "oldumount" }, /* 22 */
@ -56,7 +54,7 @@
{ 1, 0, sys_stime, "stime" }, /* 25 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 1, 0, sys_alarm, "alarm" }, /* 27 */
{ 2, 0, sys_oldfstat, "oldfstat" }, /* 28 */
{ 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
{ 0, TS, sys_pause, "pause" }, /* 29 */
{ 2, TF, sys_utime, "utime" }, /* 30 */
{ 2, 0, sys_stty, "stty" }, /* 31 */
@ -69,11 +67,11 @@
{ 2, TF, sys_rename, "rename" }, /* 38 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 39 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 40 */
{ 1, 0, sys_dup, "dup" }, /* 41 */
{ 1, 0, sys_pipe, "pipe" }, /* 42 */
{ 1, TD, sys_dup, "dup" }, /* 41 */
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 0, 0, sys_prof, "prof" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, TM|SI, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, NF, sys_getgid, "getgid" }, /* 47 */
{ 3, TS, sys_signal, "signal" }, /* 48 */
@ -82,8 +80,8 @@
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 2, TF, sys_umount2, "umount" }, /* 52 */
{ 0, 0, sys_lock, "lock" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 55 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 55 */
{ 0, 0, sys_mpx, "mpx" }, /* 56 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 57 */
{ 2, 0, sys_ulimit, "ulimit" }, /* 58 */
@ -91,13 +89,13 @@
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, 0, sys_ustat, "ustat" }, /* 62 */
{ 2, 0, sys_dup2, "dup2" }, /* 63 */
{ 2, TD, sys_dup2, "dup2" }, /* 63 */
{ 0, 0, sys_getppid, "getppid" }, /* 64 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 67 */
{ 0, TS, sys_siggetmask, "siggetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 69 */
{ 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
@ -110,33 +108,33 @@
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 80 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 81 */
{ 1, 0, sys_oldselect, "oldselect" }, /* 82 */
{ 1, TD, sys_oldselect, "oldselect" }, /* 82 */
{ 2, TF, sys_symlink, "symlink" }, /* 83 */
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, TF, sys_uselib, "uselib" }, /* 86 */
{ 1, TF, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, 0, sys_readdir, "readdir" }, /* 89 */
{ 6, TD, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_swapon, "swapon" }, /* 87 */
{ 4, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, TD, sys_readdir, "readdir" }, /* 89 */
{ 1, TD|TM|SI, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 94 */
{ 3, 0, sys_fchown, "fchown" }, /* 95 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 94 */
{ 3, TD, sys_fchown, "fchown" }, /* 95 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 96 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 97 */
{ 4, 0, sys_profil, "profil" }, /* 98 */
{ 2, TF, sys_statfs, "statfs" }, /* 99 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 101 */
{ 2, 0, sys_socketcall, "socketcall" }, /* 102 */
{ 2, TD, sys_socketcall, "socketcall" }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
{ 2, TF, sys_stat, "stat" }, /* 106 */
{ 2, TF, sys_lstat, "lstat" }, /* 107 */
{ 2, 0, sys_fstat, "fstat" }, /* 108 */
{ 2, TD, sys_fstat, "fstat" }, /* 108 */
{ 1, 0, sys_olduname, "olduname" }, /* 109 */
{ 1, 0, sys_iopl, "iopl" }, /* 110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
@ -145,43 +143,43 @@
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 6, 0, sys_ipc, "ipc" }, /* 117 */
{ 1, 0, sys_fsync, "fsync" }, /* 118 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 6, TI, sys_ipc, "ipc" }, /* 117 */
{ 1, TD, sys_fsync, "fsync" }, /* 118 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 5, TP, sys_clone, "clone" }, /* 120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 121 */
{ 1, 0, sys_uname, "uname" }, /* 122 */
{ 4, 0, sys_cacheflush, "cacheflush" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */
{ 5, 0, sys_llseek, "_llseek" }, /* 140 */
{ 3, 0, sys_getdents, "getdents" }, /* 141 */
{ 5, 0, sys_select, "select" }, /* 142 */
{ 2, 0, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 3, 0, sys_readv, "readv" }, /* 145 */
{ 3, 0, sys_writev, "writev" }, /* 146 */
{ 5, TD, sys_llseek, "_llseek" }, /* 140 */
{ 3, TD, sys_getdents, "getdents" }, /* 141 */
{ 5, TD, sys_select, "select" }, /* 142 */
{ 2, TD, sys_flock, "flock" }, /* 143 */
{ 3, TM, sys_msync, "msync" }, /* 144 */
{ 3, TD, sys_readv, "readv" }, /* 145 */
{ 3, TD, sys_writev, "writev" }, /* 146 */
{ 1, 0, sys_getsid, "getsid" }, /* 147 */
{ 1, 0, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
{ 2, 0, sys_mlock, "mlock" }, /* 150 */
{ 2, 0, sys_munlock, "munlock" }, /* 151 */
{ 2, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 2, TM, sys_mlock, "mlock" }, /* 150 */
{ 2, TM, sys_munlock, "munlock" }, /* 151 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 152 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 153 */
{ 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */
@ -191,25 +189,25 @@
{ 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 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "getpagesize" }, /* 166 */
{ 5, 0, sys_query_module, "query_module" }, /* 167 */
{ 3, 0, sys_poll, "poll" }, /* 168 */
{ 3, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, TD, sys_poll, "poll" }, /* 168 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 171 */
{ 5, 0, sys_prctl, "prctl" }, /* 172 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
{ 5, TF, sys_pread, "pread64" }, /* 180 */
{ 5, TF, sys_pwrite, "pwrite64" }, /* 181 */
{ 5, TD, sys_pread, "pread64" }, /* 180 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 181 */
{ 3, TF, sys_chown, "lchown" }, /* 182 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 183 */
{ 2, 0, sys_capget, "capget" }, /* 184 */
@ -220,12 +218,12 @@
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
{ 0, TP, sys_vfork, "vfork" }, /* 190 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
{ 6, TD, sys_mmap, "mmap2" }, /* 192 */
{ 6, TD|TM|SI, sys_mmap_pgoff, "mmap2" }, /* 192 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 193 */
{ 3, TF, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 2, TF, sys_stat64, "stat64" }, /* 195 */
{ 2, TF, sys_lstat64, "lstat64" }, /* 196 */
{ 2, TF, sys_fstat64, "fstat64" }, /* 197 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 197 */
{ 3, TF, sys_chown, "chown32" }, /* 198 */
{ 0, NF, sys_getuid, "getuid32" }, /* 199 */
{ 0, NF, sys_getgid, "getgid32" }, /* 200 */
@ -235,7 +233,7 @@
{ 2, 0, sys_setregid, "setregid32" }, /* 204 */
{ 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
{ 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
{ 3, 0, sys_fchown, "fchown32" }, /* 207 */
{ 3, TD, sys_fchown, "fchown32" }, /* 207 */
{ 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
{ 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
{ 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
@ -246,14 +244,14 @@
{ 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
{ 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
{ 5, 0, printargs, "SYS_218" }, /* 218 */
{ 5, 0, printargs, "SYS_219" }, /* 219 */
{ 5, 0, NULL, NULL }, /* 218 */
{ 5, 0, NULL, NULL }, /* 219 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 220 */
{ 0, 0, printargs, "gettid" }, /* 221 */
{ 0, 0, sys_gettid, "gettid" }, /* 221 */
{ 2, TS, sys_kill, "tkill" }, /* 222 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 223 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 224 */
{ 5, 0, sys_fsetxattr, "fsetxattr" }, /* 225 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 225 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 226 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 227 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 228 */
@ -264,24 +262,24 @@
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 233 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 234 */
{ 6, 0, sys_futex, "futex" }, /* 235 */
{ 4, TF, sys_sendfile64, "sendfile64" }, /* 236 */
{ 3, 0, sys_mincore, "mincore" }, /* 237 */
{ 3, 0, sys_madvise, "madvise" }, /* 238 */
{ 3, 0, sys_fcntl, "fcntl64" }, /* 239 */
{ 4, 0, sys_readahead, "readahead" }, /* 240 */
{ 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 236 */
{ 3, TM, sys_mincore, "mincore" }, /* 237 */
{ 3, TM, sys_madvise, "madvise" }, /* 238 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 239 */
{ 4, TD, sys_readahead, "readahead" }, /* 240 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 241 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 242 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 243 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 244 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 245 */
{ 5, TD, sys_fadvise64, "fadvise64" }, /* 246 */
{ 1, TP, sys_exit, "exit_group" }, /* 247 */
{ 4, 0, printargs, "lookup_dcookie"}, /* 248 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 247 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 248 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 249 */
{ 4, 0, sys_epoll_ctl, "epoll_ctl" }, /* 250 */
{ 4, 0, sys_epoll_wait, "epoll_wait" }, /* 251 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 252 */
{ 1, 0, printargs, "set_tid_address"}, /* 253 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages"}, /* 252 */
{ 1, 0, sys_set_tid_address, "set_tid_address"}, /* 253 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 254 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 255 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 256 */
@ -292,13 +290,13 @@
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 263 */
{ 3, TF, sys_fstatfs64, "fstatfs64" }, /* 264 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 264 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 265 */
{ 2, TF, sys_utimes, "utimes" }, /* 266 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 267 */
{ 6, 0, sys_mbind, "mbind" }, /* 268 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 269 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 270 */
{ 6, TM, sys_mbind, "mbind" }, /* 268 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 269 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 270 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 271 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 272 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 273 */
@ -306,16 +304,16 @@
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */
{ 5, TP, sys_waitid, "waitid" }, /* 277 */
{ 5, 0, printargs, "vserver" }, /* 278 */
{ 5, 0, printargs, "add_key" }, /* 279 */
{ 5, 0, printargs, "request_key" }, /* 280 */
{ 5, 0, printargs, "keyctl" }, /* 281 */
{ 3, 0, printargs, "ioprio_set" }, /* 282 */
{ 2, 0, printargs, "ioprio_get" }, /* 283 */
{ 0, TD, printargs, "inotify_init" }, /* 284 */
{ 5, 0, sys_vserver, "vserver" }, /* 278 */
{ 5, 0, sys_add_key, "add_key" }, /* 279 */
{ 5, 0, sys_request_key, "request_key" }, /* 280 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 281 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 282 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 283 */
{ 0, TD, sys_inotify_init, "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, TM, sys_migrate_pages, "migrate_pages" }, /* 287 */
{ 4, TD|TF, sys_openat, "openat" }, /* 288 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 289 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 290 */
@ -332,18 +330,18 @@
{ 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 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 304 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 305 */
{ 6, TD, sys_splice, "splice" }, /* 306 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 307 */
{ 4, TD, sys_tee, "tee" }, /* 308 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 309 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 310 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 311 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 312 */
{ 5, 0, printargs, "kexec_load" }, /* 313 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 313 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 314 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 315 */
{ 6, 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 */
@ -357,82 +355,80 @@
{ 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, TD, sys_preadv, "preadv" }, /* 329 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 330 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 331 */
{ 5, TD, sys_perf_event_open, "perf_event_open"}, /* 332 */
{ 0, 0, sys_get_thread_area, "get_thread_area"}, /* 333 */
{ 1, 0, sys_set_thread_area, "set_thread_area"}, /* 334 */
{ 6, 0, printargs, "atomic_comxchg_32"}, /* 335 */
{ 0, 0, printargs, "atomic_barrier"}, /* 336 */
{ 2, TD, printargs, "fanotify_init" }, /* 337 */
{ 5, TD|TF, printargs, "fanotify_mark" }, /* 338 */
{ 4, 0, printargs, "prlimit64" }, /* 339 */
{ 5, 0, printargs, "SYS_340" }, /* 340 */
{ 5, 0, printargs, "SYS_341" }, /* 341 */
{ 5, 0, printargs, "SYS_342" }, /* 342 */
{ 5, 0, printargs, "SYS_343" }, /* 343 */
{ 5, 0, printargs, "SYS_344" }, /* 344 */
{ 5, 0, printargs, "SYS_345" }, /* 345 */
{ 5, 0, printargs, "SYS_346" }, /* 346 */
{ 5, 0, printargs, "SYS_347" }, /* 347 */
{ 5, 0, printargs, "SYS_348" }, /* 348 */
{ 5, 0, printargs, "SYS_349" }, /* 349 */
{ 5, 0, printargs, "SYS_350" }, /* 350 */
{ 5, 0, printargs, "SYS_351" }, /* 351 */
{ 5, 0, printargs, "SYS_352" }, /* 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 */
{ 5, 0, printargs, "SYS_367" }, /* 367 */
{ 5, 0, printargs, "SYS_368" }, /* 368 */
{ 5, 0, printargs, "SYS_369" }, /* 369 */
{ 5, 0, printargs, "SYS_370" }, /* 370 */
{ 5, 0, printargs, "SYS_371" }, /* 371 */
{ 5, 0, printargs, "SYS_372" }, /* 372 */
{ 5, 0, printargs, "SYS_373" }, /* 373 */
{ 5, 0, printargs, "SYS_374" }, /* 374 */
{ 5, 0, printargs, "SYS_375" }, /* 375 */
{ 5, 0, printargs, "SYS_376" }, /* 376 */
{ 5, 0, printargs, "SYS_377" }, /* 377 */
{ 5, 0, printargs, "SYS_378" }, /* 378 */
{ 5, 0, printargs, "SYS_379" }, /* 379 */
{ 5, 0, printargs, "SYS_380" }, /* 380 */
{ 5, 0, printargs, "SYS_381" }, /* 381 */
{ 5, 0, printargs, "SYS_382" }, /* 382 */
{ 5, 0, printargs, "SYS_383" }, /* 383 */
{ 5, 0, printargs, "SYS_384" }, /* 384 */
{ 5, 0, printargs, "SYS_385" }, /* 385 */
{ 5, 0, printargs, "SYS_386" }, /* 386 */
{ 5, 0, printargs, "SYS_387" }, /* 387 */
{ 5, 0, printargs, "SYS_388" }, /* 388 */
{ 5, 0, printargs, "SYS_389" }, /* 389 */
{ 5, 0, printargs, "SYS_390" }, /* 390 */
{ 5, 0, printargs, "SYS_391" }, /* 391 */
{ 5, 0, printargs, "SYS_392" }, /* 392 */
{ 5, 0, printargs, "SYS_393" }, /* 393 */
{ 5, 0, printargs, "SYS_394" }, /* 394 */
{ 5, 0, printargs, "SYS_395" }, /* 395 */
{ 5, 0, printargs, "SYS_396" }, /* 396 */
{ 5, 0, printargs, "SYS_397" }, /* 397 */
{ 5, 0, printargs, "SYS_398" }, /* 398 */
{ 5, 0, printargs, "SYS_399" }, /* 399 */
#if SYS_socket_subcall != 400
#error fix me
#endif
{ 8, 0, printargs, "socket_subcall"}, /* 400 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 337 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 338 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 339 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 340 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 341 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 342 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 343 */
{ 2, TD, sys_setns, "setns" }, /* 344 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 345 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 346 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 347 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 348 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 349 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 350 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 351 */
{ 5, 0, NULL, NULL }, /* 352 */
{ 5, 0, NULL, NULL }, /* 353 */
{ 5, 0, NULL, NULL }, /* 354 */
{ 5, 0, NULL, NULL }, /* 355 */
{ 5, 0, NULL, NULL }, /* 356 */
{ 5, 0, NULL, NULL }, /* 357 */
{ 5, 0, NULL, NULL }, /* 358 */
{ 5, 0, NULL, NULL }, /* 359 */
{ 5, 0, NULL, NULL }, /* 360 */
{ 5, 0, NULL, NULL }, /* 361 */
{ 5, 0, NULL, NULL }, /* 362 */
{ 5, 0, NULL, NULL }, /* 363 */
{ 5, 0, NULL, NULL }, /* 364 */
{ 5, 0, NULL, NULL }, /* 365 */
{ 5, 0, NULL, NULL }, /* 366 */
{ 5, 0, NULL, NULL }, /* 367 */
{ 5, 0, NULL, NULL }, /* 368 */
{ 5, 0, NULL, NULL }, /* 369 */
{ 5, 0, NULL, NULL }, /* 370 */
{ 5, 0, NULL, NULL }, /* 371 */
{ 5, 0, NULL, NULL }, /* 372 */
{ 5, 0, NULL, NULL }, /* 373 */
{ 5, 0, NULL, NULL }, /* 374 */
{ 5, 0, NULL, NULL }, /* 375 */
{ 5, 0, NULL, NULL }, /* 376 */
{ 5, 0, NULL, NULL }, /* 377 */
{ 5, 0, NULL, NULL }, /* 378 */
{ 5, 0, NULL, NULL }, /* 379 */
{ 5, 0, NULL, NULL }, /* 380 */
{ 5, 0, NULL, NULL }, /* 381 */
{ 5, 0, NULL, NULL }, /* 382 */
{ 5, 0, NULL, NULL }, /* 383 */
{ 5, 0, NULL, NULL }, /* 384 */
{ 5, 0, NULL, NULL }, /* 385 */
{ 5, 0, NULL, NULL }, /* 386 */
{ 5, 0, NULL, NULL }, /* 387 */
{ 5, 0, NULL, NULL }, /* 388 */
{ 5, 0, NULL, NULL }, /* 389 */
{ 5, 0, NULL, NULL }, /* 390 */
{ 5, 0, NULL, NULL }, /* 391 */
{ 5, 0, NULL, NULL }, /* 392 */
{ 5, 0, NULL, NULL }, /* 393 */
{ 5, 0, NULL, NULL }, /* 394 */
{ 5, 0, NULL, NULL }, /* 395 */
{ 5, 0, NULL, NULL }, /* 396 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
#define SYS_socket_subcall 400
#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 3, TN, sys_connect, "connect" }, /* 403 */
@ -448,8 +444,8 @@
{ 2, TN, sys_shutdown, "shutdown" }, /* 413 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 414 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 415 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 416 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 417 */
{ 4, TN, sys_accept4, "accept4" }, /* 418 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 419 */
@ -477,7 +473,7 @@
{ 4, 0, printargs, "ipc_subcall" }, /* 438 */
{ 4, 0, printargs, "ipc_subcall" }, /* 439 */
{ 4, 0, printargs, "ipc_subcall" }, /* 440 */
{ 4, TI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 441 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 442 */
{ 4, TI, sys_shmget, "shmget" }, /* 443 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 444 */

View File

@ -0,0 +1 @@
#include "../i386/ioctlent.h.in"

266
linux/metag/syscallent.h Normal file
View File

@ -0,0 +1,266 @@
{ 2, 0, sys_io_setup, "io_setup" }, /* 0 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 2 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 5 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 8 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 11 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 12 */
{ 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 14 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 17 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */
{ 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */
{ 1, TD, sys_dup, "dup" }, /* 23 */
{ 3, TD, sys_dup3, "dup3" }, /* 24 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 25 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 29 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */
{ 2, TD, sys_flock, "flock" }, /* 32 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 37 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 38 */
{ 2, TF, sys_umount2, "umount" }, /* 39 */
{ 5, TF, sys_mount, "mount" }, /* 40 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */
{ }, /* 42 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 43 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 44 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 45 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 46 */
{ 6, TD, sys_fallocate, "fallocate" }, /* 47 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */
{ 1, TF, sys_chdir, "chdir" }, /* 49 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 50 */
{ 1, TF, sys_chroot, "chroot" }, /* 51 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 52 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */
{ 3, TD, sys_fchown, "fchown" }, /* 55 */
{ 4, TD|TF, sys_openat, "openat" }, /* 56 */
{ 1, TD, sys_close, "close" }, /* 57 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 58 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 59 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 60 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 61 */
{ 5, TD, sys_llseek, "_llseek" }, /* 62 */
{ 3, TD, sys_read, "read" }, /* 63 */
{ 3, TD, sys_write, "write" }, /* 64 */
{ 3, TD, sys_readv, "readv" }, /* 65 */
{ 3, TD, sys_writev, "writev" }, /* 66 */
{ 5, TD, sys_pread, "pread64" }, /* 67 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 68 */
{ 5, TD, sys_preadv, "preadv" }, /* 69 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 70 */
{ 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 72 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 73 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */
{ 6, TD, sys_splice, "splice" }, /* 76 */
{ 4, TD, sys_tee, "tee" }, /* 77 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */
{ 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 79 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 80 */
{ 0, 0, sys_sync, "sync" }, /* 81 */
{ 1, TD, sys_fsync, "fsync" }, /* 82 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */
{ 1, TF, sys_acct, "acct" }, /* 89 */
{ 2, 0, sys_capget, "capget" }, /* 90 */
{ 2, 0, sys_capset, "capset" }, /* 91 */
{ 1, 0, sys_personality, "personality" }, /* 92 */
{ 1, TP|SE, sys_exit, "exit" }, /* 93 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 94 */
{ 5, TP, sys_waitid, "waitid" }, /* 95 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */
{ 1, TP, sys_unshare, "unshare" }, /* 97 */
{ 6, 0, sys_futex, "futex" }, /* 98 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 102 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 103 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */
{ 3, 0, sys_init_module, "init_module" }, /* 105 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 106 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 107 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */
{ 3, 0, sys_syslog, "syslog" }, /* 116 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 117 */
{ 2, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */
{ 1, 0, sys_sched_get_priority_max, "sched_get_priority_max"}, /* 125 */
{ 1, 0, sys_sched_get_priority_min, "sched_get_priority_min"}, /* 126 */
{ 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */
{ 2, TS, sys_kill, "kill" }, /* 129 */
{ 2, TS, sys_kill, "tkill" }, /* 130 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 131 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 140 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 141 */
{ 4, 0, sys_reboot, "reboot" }, /* 142 */
{ 2, 0, sys_setregid, "setregid" }, /* 143 */
{ 1, 0, sys_setgid, "setgid" }, /* 144 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 145 */
{ 1, 0, sys_setuid, "setuid" }, /* 146 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 147 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 148 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 149 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 150 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */
{ 1, 0, sys_times, "times" }, /* 153 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 154 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 155 */
{ 1, 0, sys_getsid, "getsid" }, /* 156 */
{ 0, 0, sys_setsid, "setsid" }, /* 157 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 158 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 159 */
{ 1, 0, sys_uname, "uname" }, /* 160 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 161 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 163 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 165 */
{ 1, 0, sys_umask, "umask" }, /* 166 */
{ 5, 0, sys_prctl, "prctl" }, /* 167 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 168 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */
{ 0, 0, sys_getpid, "getpid" }, /* 172 */
{ 0, 0, sys_getppid, "getppid" }, /* 173 */
{ 0, NF, sys_getuid, "getuid" }, /* 174 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 175 */
{ 0, NF, sys_getgid, "getgid" }, /* 176 */
{ 0, NF, sys_getegid, "getegid" }, /* 177 */
{ 0, 0, sys_gettid, "gettid" }, /* 178 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 180 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */
{ 2, TI, sys_msgget, "msgget" }, /* 186 */
{ 3, TI, sys_msgctl, "msgctl" }, /* 187 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 188 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */
{ 3, TI, sys_semget, "semget" }, /* 190 */
{ 4, TI, sys_semctl, "semctl" }, /* 191 */
{ 4, TI, sys_semtimedop, "semtimedop" }, /* 192 */
{ 3, TI, sys_semop, "semop" }, /* 193 */
{ 3, TI, sys_shmget, "shmget" }, /* 194 */
{ 3, TI, sys_shmctl, "shmctl" }, /* 195 */
{ 3, TI|TM|SI, sys_shmat, "shmat" }, /* 196 */
{ 1, TI|TM|SI, sys_shmdt, "shmdt" }, /* 197 */
{ 3, TN, sys_socket, "socket" }, /* 198 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 199 */
{ 3, TN, sys_bind, "bind" }, /* 200 */
{ 2, TN, sys_listen, "listen" }, /* 201 */
{ 3, TN, sys_accept, "accept" }, /* 202 */
{ 3, TN, sys_connect, "connect" }, /* 203 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 204 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 205 */
{ 6, TN, sys_sendto, "sendto" }, /* 206 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 210 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */
{ 4, TD, sys_readahead, "readahead" }, /* 213 */
{ 1, TM|SI, sys_brk, "brk" }, /* 214 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 215 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 216 */
{ 5, 0, sys_add_key, "add_key" }, /* 217 */
{ 4, 0, sys_request_key, "request_key" }, /* 218 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 219 */
{ 5, TP, sys_clone, "clone" }, /* 220 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 221 */
{ 6, TD|TM|SI, sys_mmap, "mmap2" }, /* 222 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 223 */
{ 2, TF, sys_swapon, "swapon" }, /* 224 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 225 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 226 */
{ 3, TM, sys_msync, "msync" }, /* 227 */
{ 2, TM, sys_mlock, "mlock" }, /* 228 */
{ 2, TM, sys_munlock, "munlock" }, /* 229 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 230 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 231 */
{ 3, TM, sys_mincore, "mincore" }, /* 232 */
{ 3, TM, sys_madvise, "madvise" }, /* 233 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 234 */
{ 6, TM, sys_mbind, "mbind" }, /* 235 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 239 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */
{ 4, TN, sys_accept4, "accept4" }, /* 242 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */
{ }, /* 244 */
{ 2, 0, printargs, "metag_setglobalbit" }, /* 245 */
{ 1, 0, printargs, "metag_set_fpu_flags" }, /* 246 */
{ 1, 0, printargs, "metag_set_tls" }, /* 247 */
{ 0, 0, printargs, "metag_get_tls" }, /* 248 */
[249 ... 259] = { },
{ 4, TP, sys_wait4, "wait4" }, /* 260 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 267 */
{ 2, TD, sys_setns, "setns" }, /* 268 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 272 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 273 */

View File

@ -27,25 +27,25 @@
*/
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
{ 1, TP, sys_exit, "_exit" }, /* 1 */
{ 1, TP|SE, sys_exit, "_exit" }, /* 1 */
{ 0, TP, sys_fork, "fork" }, /* 2 */
{ 3, 0, sys_read, "read" }, /* 3 */
{ 3, 0, sys_write, "write" }, /* 4 */
{ 3, TF, sys_open, "open" }, /* 5 */
{ 1, 0, sys_close, "close" }, /* 6 */
{ 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, TF, sys_creat, "creat" }, /* 8 */
{ 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 */
{ 3, TF|TP|SE|SI, 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 */
{ 0, 0, sys_break, "break" }, /* 17 */
{ 0, TM, sys_break, "break" }, /* 17 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 18 */
{ 3, 0, sys_lseek, "lseek" }, /* 19 */
{ 3, TD, sys_lseek, "lseek" }, /* 19 */
{ 0, 0, sys_getpid, "getpid" }, /* 20 */
{ 5, TF, sys_mount, "mount" }, /* 21 */
{ 1, TF, sys_umount, "oldumount" }, /* 22 */
@ -54,7 +54,7 @@
{ 1, 0, sys_stime, "stime" }, /* 25 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 26 */
{ 1, 0, sys_alarm, "alarm" }, /* 27 */
{ 2, 0, sys_oldfstat, "oldfstat" }, /* 28 */
{ 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
{ 0, TS, sys_pause, "pause" }, /* 29 */
{ 2, TF, sys_utime, "utime" }, /* 30 */
{ 2, 0, sys_stty, "stty" }, /* 31 */
@ -67,11 +67,11 @@
{ 2, TF, sys_rename, "rename" }, /* 38 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 39 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 40 */
{ 1, 0, sys_dup, "dup" }, /* 41 */
{ 1, 0, sys_pipe, "pipe" }, /* 42 */
{ 1, TD, sys_dup, "dup" }, /* 41 */
{ 1, TD, sys_pipe, "pipe" }, /* 42 */
{ 1, 0, sys_times, "times" }, /* 43 */
{ 0, 0, sys_prof, "prof" }, /* 44 */
{ 1, 0, sys_brk, "brk" }, /* 45 */
{ 1, TM|SI, sys_brk, "brk" }, /* 45 */
{ 1, 0, sys_setgid, "setgid" }, /* 46 */
{ 0, NF, sys_getgid, "getgid" }, /* 47 */
{ 3, TS, sys_signal, "signal" }, /* 48 */
@ -80,8 +80,8 @@
{ 1, TF, sys_acct, "acct" }, /* 51 */
{ 2, TF, sys_umount2, "umount" }, /* 52 */
{ 0, 0, sys_lock, "lock" }, /* 53 */
{ 3, 0, sys_ioctl, "ioctl" }, /* 54 */
{ 3, 0, sys_fcntl, "fcntl" }, /* 55 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 54 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 55 */
{ 0, 0, sys_mpx, "mpx" }, /* 56 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 57 */
{ 2, 0, sys_ulimit, "ulimit" }, /* 58 */
@ -89,13 +89,13 @@
{ 1, 0, sys_umask, "umask" }, /* 60 */
{ 1, TF, sys_chroot, "chroot" }, /* 61 */
{ 2, 0, sys_ustat, "ustat" }, /* 62 */
{ 2, 0, sys_dup2, "dup2" }, /* 63 */
{ 2, TD, sys_dup2, "dup2" }, /* 63 */
{ 0, 0, sys_getppid, "getppid" }, /* 64 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
{ 0, 0, sys_setsid, "setsid" }, /* 66 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 67 */
{ 0, TS, sys_siggetmask, "siggetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "sigsetmask" }, /* 69 */
{ 0, TS, sys_siggetmask, "sgetmask" }, /* 68 */
{ 1, TS, sys_sigsetmask, "ssetmask" }, /* 69 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 70 */
{ 2, 0, sys_setregid, "setregid" }, /* 71 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
@ -108,33 +108,33 @@
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 80 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 81 */
{ 1, 0, sys_oldselect, "oldselect" }, /* 82 */
{ 1, TD, sys_oldselect, "oldselect" }, /* 82 */
{ 2, TF, sys_symlink, "symlink" }, /* 83 */
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 84 */
{ 3, TF, sys_readlink, "readlink" }, /* 85 */
{ 1, TF, sys_uselib, "uselib" }, /* 86 */
{ 1, TF, sys_swapon, "swapon" }, /* 87 */
{ 3, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, 0, sys_readdir, "readdir" }, /* 89 */
{ 6, TD, sys_old_mmap, "old_mmap" }, /* 90 */
{ 2, 0, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_swapon, "swapon" }, /* 87 */
{ 4, 0, sys_reboot, "reboot" }, /* 88 */
{ 3, TD, sys_readdir, "readdir" }, /* 89 */
{ 6, TD|TM|SI, sys_mmap, "old_mmap" }, /* 90 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 91 */
{ 2, TF, sys_truncate, "truncate" }, /* 92 */
{ 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, 0, sys_fchmod, "fchmod" }, /* 94 */
{ 3, 0, sys_fchown, "fchown" }, /* 95 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 94 */
{ 3, TD, sys_fchown, "fchown" }, /* 95 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 96 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 97 */
{ 4, 0, sys_profil, "profil" }, /* 98 */
{ 2, TF, sys_statfs, "statfs" }, /* 99 */
{ 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
{ 3, 0, sys_ioperm, "ioperm" }, /* 101 */
{ 2, 0, sys_socketcall, "socketcall" }, /* 102 */
{ 2, TD, sys_socketcall, "socketcall" }, /* 102 */
{ 3, 0, sys_syslog, "syslog" }, /* 103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 105 */
{ 2, TF, sys_stat, "stat" }, /* 106 */
{ 2, TF, sys_lstat, "lstat" }, /* 107 */
{ 2, 0, sys_fstat, "fstat" }, /* 108 */
{ 2, TD, sys_fstat, "fstat" }, /* 108 */
{ 1, 0, sys_olduname, "olduname" }, /* 109 */
{ 1, 0, sys_iopl, "iopl" }, /* 110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 111 */
@ -143,43 +143,43 @@
{ 4, TP, sys_wait4, "wait4" }, /* 114 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
{ 6, 0, sys_ipc, "ipc" }, /* 117 */
{ 1, 0, sys_fsync, "fsync" }, /* 118 */
{ 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 6, TI, sys_ipc, "ipc" }, /* 117 */
{ 1, TD, sys_fsync, "fsync" }, /* 118 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 119 */
{ 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, sys_modify_ldt, "modify_ldt" }, /* 123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 126 */
{ 2, 0, sys_create_module, "create_module" }, /* 127 */
{ 3, 0, sys_init_module, "init_module" }, /* 128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 130 */
{ 4, 0, sys_quotactl, "quotactl" }, /* 131 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 132 */
{ 1, 0, sys_fchdir, "fchdir" }, /* 133 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 133 */
{ 0, 0, sys_bdflush, "bdflush" }, /* 134 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 135 */
{ 1, 0, sys_personality, "personality" }, /* 136 */
{ 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 138 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 139 */
{ 5, 0, sys_llseek, "_llseek" }, /* 140 */
{ 3, 0, sys_getdents, "getdents" }, /* 141 */
{ 5, 0, sys_select, "select" }, /* 142 */
{ 2, 0, sys_flock, "flock" }, /* 143 */
{ 3, 0, sys_msync, "msync" }, /* 144 */
{ 3, 0, sys_readv, "readv" }, /* 145 */
{ 3, 0, sys_writev, "writev" }, /* 146 */
{ 5, TD, sys_llseek, "_llseek" }, /* 140 */
{ 3, TD, sys_getdents, "getdents" }, /* 141 */
{ 5, TD, sys_select, "select" }, /* 142 */
{ 2, TD, sys_flock, "flock" }, /* 143 */
{ 3, TM, sys_msync, "msync" }, /* 144 */
{ 3, TD, sys_readv, "readv" }, /* 145 */
{ 3, TD, sys_writev, "writev" }, /* 146 */
{ 1, 0, sys_getsid, "getsid" }, /* 147 */
{ 1, 0, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 148 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
{ 2, 0, sys_mlock, "mlock" }, /* 150 */
{ 2, 0, sys_munlock, "munlock" }, /* 151 */
{ 2, 0, sys_mlockall, "mlockall" }, /* 152 */
{ 0, 0, sys_munlockall, "munlockall" }, /* 153 */
{ 2, TM, sys_mlock, "mlock" }, /* 150 */
{ 2, TM, sys_munlock, "munlock" }, /* 151 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 152 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 153 */
{ 0, 0, sys_sched_setparam, "sched_setparam"}, /* 154 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 155 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */
@ -189,25 +189,25 @@
{ 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 */
{ 5, 0, sys_mremap, "mremap" }, /* 163 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 163 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 164 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 165 */
{ 5, 0, printargs, "vm86" }, /* 166 */
{ 5, 0, sys_vm86, "vm86" }, /* 166 */
{ 5, 0, sys_query_module, "query_module" }, /* 167 */
{ 3, 0, sys_poll, "poll" }, /* 168 */
{ 3, 0, printargs, "nfsservctl" }, /* 169 */
{ 3, TD, sys_poll, "poll" }, /* 168 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 170 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 171 */
{ 5, 0, sys_prctl, "prctl" }, /* 172 */
{ 1, TS, printargs, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 173 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 174 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 175 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 176 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
{ 5, TF, sys_pread, "pread64" }, /* 180 */
{ 5, TF, sys_pwrite, "pwrite64" }, /* 181 */
{ 5, TD, sys_pread, "pread64" }, /* 180 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 181 */
{ 3, TF, sys_chown, "chown" }, /* 182 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 183 */
{ 2, 0, sys_capget, "capget" }, /* 184 */
@ -218,12 +218,12 @@
{ 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
{ 0, TP, sys_vfork, "vfork" }, /* 190 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
{ 6, TD, sys_mmap, "mmap2" }, /* 192 */
{ 6, TD|TM|SI, sys_mmap_pgoff, "mmap2" }, /* 192 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 193 */
{ 3, TF, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
{ 2, TF, sys_stat64, "stat64" }, /* 195 */
{ 2, TF, sys_lstat64, "lstat64" }, /* 196 */
{ 2, TF, sys_fstat64, "fstat64" }, /* 197 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 197 */
{ 3, TF, sys_chown, "lchown32" }, /* 198 */
{ 0, NF, sys_getuid, "getuid32" }, /* 199 */
{ 0, NF, sys_getgid, "getgid32" }, /* 200 */
@ -233,7 +233,7 @@
{ 2, 0, sys_setregid, "setregid32" }, /* 204 */
{ 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
{ 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
{ 3, 0, sys_fchown, "fchown32" }, /* 207 */
{ 3, TD, sys_fchown, "fchown32" }, /* 207 */
{ 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
{ 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
{ 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
@ -244,17 +244,17 @@
{ 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
{ 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
{ 3, 0, sys_mincore, "mincore" }, /* 218 */
{ 3, 0, sys_madvise, "madvise" }, /* 219 */
{ 3, TM, sys_mincore, "mincore" }, /* 218 */
{ 3, TM, sys_madvise, "madvise" }, /* 219 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 220 */
{ 3, 0, sys_fcntl, "fcntl64" }, /* 221 */
{ 4, 0, printargs, "SYS_222" }, /* 222 */
{ 4, 0, printargs, "SYS_223" }, /* 223 */
{ 0, 0, printargs, "gettid" }, /* 224 */
{ 4, 0, sys_readahead, "readahead" }, /* 225 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 221 */
{ 4, 0, NULL, NULL }, /* 222 */
{ 4, 0, NULL, NULL }, /* 223 */
{ 0, 0, sys_gettid, "gettid" }, /* 224 */
{ 4, TD, sys_readahead, "readahead" }, /* 225 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 226 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */
{ 5, 0, sys_fsetxattr, "fsetxattr" }, /* 228 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 229 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */
@ -265,7 +265,7 @@
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */
{ 2, TS, sys_kill, "tkill" }, /* 238 */
{ 4, TF, sys_sendfile64, "sendfile64" }, /* 239 */
{ 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 239 */
{ 6, 0, sys_futex, "futex" }, /* 240 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 241 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 242 */
@ -277,14 +277,14 @@
{ 3, 0, sys_io_submit, "io_submit" }, /* 248 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
{ 5, TD, sys_fadvise64, "fadvise64" }, /* 250 */
{ 0, 0, printargs, "SYS_251" }, /* 251 */
{ 1, TP, sys_exit, "exit_group" }, /* 252 */
{ 4, 0, printargs, "lookup_dcookie"}, /* 253 */
{ 0, 0, NULL, NULL }, /* 251 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 252 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 253 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 254 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */
{ 3, TD, sys_epoll_wait, "epoll_wait" }, /* 256 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 257 */
{ 1, 0, printargs, "set_tid_address"}, /* 258 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 256 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages"}, /* 257 */
{ 1, 0, sys_set_tid_address, "set_tid_address"}, /* 258 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 259 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 260 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 261 */
@ -299,28 +299,28 @@
{ 3, TS, sys_tgkill, "tgkill" }, /* 270 */
{ 2, TF, sys_utimes, "utimes" }, /* 271 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 272 */
{ 5, 0, printargs, "vserver" }, /* 273 */
{ 4, 0, sys_mbind, "mbind" }, /* 274 */
{ 5, 0, sys_get_mempolicy, "get_mempolicy" }, /* 275 */
{ 3, 0, sys_set_mempolicy, "set_mempolicy" }, /* 276 */
{ 5, 0, sys_vserver, "vserver" }, /* 273 */
{ 4, TM, sys_mbind, "mbind" }, /* 274 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 275 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 276 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 277 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 278 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 279 */
{ 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, "kexec_load" }, /* 283 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 283 */
{ 5, TP, sys_waitid, "waitid" }, /* 284 */
{ 5, 0, printargs, "SYS_285" }, /* 285 */
{ 5, 0, printargs, "add_key" }, /* 286 */
{ 4, 0, printargs, "request_key" }, /* 287 */
{ 5, 0, printargs, "keyctl" }, /* 288 */
{ 3, 0, printargs, "ioprio_set" }, /* 289 */
{ 2, 0, printargs, "ioprio_get" }, /* 290 */
{ 0, TD, printargs, "inotify_init" }, /* 291 */
{ 5, 0, NULL, NULL }, /* 285 */
{ 5, 0, sys_add_key, "add_key" }, /* 286 */
{ 4, 0, sys_request_key, "request_key" }, /* 287 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 288 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 289 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 290 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 291 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 292 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 293 */
{ 4, 0, printargs, "migrate_pages" }, /* 294 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 294 */
{ 4, TD|TF, sys_openat, "openat" }, /* 295 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 296 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 297 */
@ -332,28 +332,25 @@
{ 5, TD|TF, sys_linkat, "linkat" }, /* 303 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 304 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 305 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 306 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 307 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 308 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 309 */
{ 1, TP, sys_unshare, "unshare" }, /* 310 */
{ 2, 0, printargs, "set_robust_list" }, /* 311 */
{ 3, 0, printargs, "get_robust_list" }, /* 312 */
{ 6, TD, printargs, "splice" }, /* 313 */
{ 4, TD, printargs, "sync_file_range"}, /* 314 */
{ 4, TD, printargs, "tee" }, /* 315 */
{ 5, TD, printargs, "vmsplice" }, /* 316 */
{ 6, 0, sys_move_pages, "move_pages" }, /* 317 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 311 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 312 */
{ 6, TD, sys_splice, "splice" }, /* 313 */
{ 6, TD, sys_sync_file_range, "sync_file_range"}, /* 314 */
{ 4, TD, sys_tee, "tee" }, /* 315 */
{ 5, TD, sys_vmsplice, "vmsplice" }, /* 316 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 317 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 318 */
{ 5, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 320 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 322 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 323 */
{ 6, 0, printargs, "fallocate" }, /* 324 */
{ 6, TD, sys_fallocate, "fallocate" }, /* 324 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 325 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 326 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 327 */
@ -364,9 +361,9 @@
{ 4, TI, sys_msgget, "msgget" }, /* 332 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 333 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 334 */
{ 4, TI, sys_shmat, "shmat" }, /* 335 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 335 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 336 */
{ 4, TI, sys_shmdt, "shmdt" }, /* 337 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 337 */
{ 4, TI, sys_shmget, "shmget" }, /* 338 */
{ 4, TD|TS, printargs, "signalfd4" }, /* 339 */
{ 2, TD, printargs, "eventfd2" }, /* 340 */
@ -389,14 +386,27 @@
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 357 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 358 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 359 */
{ 5, TN, sys_sendmsg, "sendmsg" }, /* 360 */
{ 5, TN, sys_recvmsg, "recvmsg" }, /* 361 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 360 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 361 */
{ 4, TN, sys_accept4, "accept4" }, /* 362 */
{ 5, TD, printargs, "preadv" }, /* 363 */
{ 5, TD, printargs, "pwritev" }, /* 364 */
{ 4, TP|TS, printargs, "rt_tgsigqueueinfo" }, /* 365 */
{ 5, TN, printargs, "perf_event_open" }, /* 366 */
{ 5, TD, sys_preadv, "preadv" }, /* 363 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 364 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 365 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 366 */
{ 5, TN, printargs, "recvmmsg" }, /* 367 */
{ 2, TD, printargs, "fanotify_init" }, /* 368 */
{ 5, TD|TF, printargs, "fanotify_mark" }, /* 369 */
{ 4, 0, printargs, "prlimit64" }, /* 370 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 368 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 369 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 370 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 371 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 372 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 373 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 374 */
{ 2, TD, sys_setns, "setns" }, /* 375 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 376 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 377 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 378 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 379 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 380 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 381 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 382 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 383 */

View File

@ -26,8 +26,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# $Id$
# Files to find.
file_find='asm/*.h linux/*.h scsi/*.h'

View File

@ -0,0 +1,870 @@
{ 0, 0, printargs, "svr4_syscall" }, /* 000 */
{ 0, 0, printargs, "svr4_exit" }, /* 001 */
{ 0, 0, printargs, "svr4_fork" }, /* 002 */
{ 0, 0, printargs, "svr4_read" }, /* 003 */
{ 0, 0, printargs, "svr4_write" }, /* 004 */
{ 0, 0, printargs, "svr4_open" }, /* 005 */
{ 0, 0, printargs, "svr4_close" }, /* 006 */
{ 0, 0, printargs, "svr4_wait" }, /* 007 */
{ 0, 0, printargs, "svr4_creat" }, /* 008 */
{ 0, 0, printargs, "svr4_link" }, /* 009 */
{ 0, 0, printargs, "svr4_unlink" }, /* 010 */
{ 0, 0, printargs, "svr4_exec" }, /* 011 */
{ 0, 0, printargs, "svr4_chdir" }, /* 012 */
{ 0, 0, printargs, "svr4_gtime" }, /* 013 */
{ 0, 0, printargs, "svr4_mknod" }, /* 014 */
{ 0, 0, printargs, "svr4_chmod" }, /* 015 */
{ 0, 0, printargs, "svr4_chown" }, /* 016 */
{ 0, TM, printargs, "svr4_sbreak" }, /* 017 */
{ 0, 0, printargs, "svr4_stat" }, /* 018 */
{ 0, 0, printargs, "svr4_lseek" }, /* 019 */
{ 0, 0, printargs, "svr4_getpid" }, /* 020 */
{ 0, 0, printargs, "svr4_mount" }, /* 021 */
{ 0, 0, printargs, "svr4_umount" }, /* 022 */
{ 0, 0, printargs, "svr4_setuid" }, /* 023 */
{ 0, 0, printargs, "svr4_getuid" }, /* 024 */
{ 0, 0, printargs, "svr4_stime" }, /* 025 */
{ 0, 0, printargs, "svr4_ptrace" }, /* 026 */
{ 0, 0, printargs, "svr4_alarm" }, /* 027 */
{ 0, 0, printargs, "svr4_fstat" }, /* 028 */
{ 0, 0, printargs, "svr4_pause" }, /* 029 */
{ 0, 0, printargs, "svr4_utime" }, /* 030 */
{ 0, 0, printargs, "svr4_stty" }, /* 031 */
{ 0, 0, printargs, "svr4_gtty" }, /* 032 */
{ 0, 0, printargs, "svr4_access" }, /* 033 */
{ 0, 0, printargs, "svr4_nice" }, /* 034 */
{ 0, 0, printargs, "svr4_statfs" }, /* 035 */
{ 0, 0, printargs, "svr4_sync" }, /* 036 */
{ 0, 0, printargs, "svr4_kill" }, /* 037 */
{ 0, 0, printargs, "svr4_fstatfs" }, /* 038 */
{ 0, 0, printargs, "svr4_setpgrp" }, /* 039 */
{ 0, 0, printargs, "svr4_cxenix" }, /* 040 */
{ 0, 0, printargs, "svr4_dup" }, /* 041 */
{ 0, 0, printargs, "svr4_pipe" }, /* 042 */
{ 0, 0, printargs, "svr4_times" }, /* 043 */
{ 0, 0, printargs, "svr4_profil" }, /* 044 */
{ 0, 0, printargs, "svr4_plock" }, /* 045 */
{ 0, 0, printargs, "svr4_setgid" }, /* 046 */
{ 0, 0, printargs, "svr4_getgid" }, /* 047 */
{ 0, 0, printargs, "svr4_sig" }, /* 048 */
{ 0, 0, printargs, "svr4_msgsys" }, /* 049 */
{ 0, 0, printargs, "svr4_sysmips" }, /* 050 */
{ 0, 0, printargs, "svr4_sysacct" }, /* 051 */
{ 0, 0, printargs, "svr4_shmsys" }, /* 052 */
{ 0, 0, printargs, "svr4_semsys" }, /* 053 */
{ 0, 0, printargs, "svr4_ioctl" }, /* 054 */
{ 0, 0, printargs, "svr4_uadmin" }, /* 055 */
{ 0, 0, printargs, "svr4_exch" }, /* 056 */
{ 0, 0, printargs, "svr4_utssys" }, /* 057 */
{ 0, 0, printargs, "svr4_fsync" }, /* 058 */
{ 0, 0, printargs, "svr4_exece" }, /* 059 */
{ 0, 0, printargs, "svr4_umask" }, /* 060 */
{ 0, 0, printargs, "svr4_chroot" }, /* 061 */
{ 0, 0, printargs, "svr4_fcntl" }, /* 062 */
{ 0, 0, printargs, "svr4_ulimit" }, /* 063 */
{ 0, 0, NULL, NULL }, /* 064 */
{ 0, 0, NULL, NULL }, /* 065 */
{ 0, 0, NULL, NULL }, /* 066 */
{ 0, 0, NULL, NULL }, /* 067 */
{ 0, 0, NULL, NULL }, /* 068 */
{ 0, 0, NULL, NULL }, /* 069 */
{ 0, 0, printargs, "svr4_advfs" }, /* 070 */
{ 0, 0, printargs, "svr4_unadvfs" }, /* 071 */
{ 0, 0, NULL, NULL }, /* 072 */
{ 0, 0, NULL, NULL }, /* 073 */
{ 0, 0, printargs, "svr4_rfstart" }, /* 074 */
{ 0, 0, NULL, NULL }, /* 075 */
{ 0, 0, printargs, "svr4_rdebug" }, /* 076 */
{ 0, 0, printargs, "svr4_rfstop" }, /* 077 */
{ 0, 0, printargs, "svr4_rfsys" }, /* 078 */
{ 0, 0, printargs, "svr4_rmdir" }, /* 079 */
{ 0, 0, printargs, "svr4_mkdir" }, /* 080 */
{ 0, 0, printargs, "svr4_getdents" }, /* 081 */
{ 0, 0, printargs, "svr4_libattach" }, /* 082 */
{ 0, 0, printargs, "svr4_libdetach" }, /* 083 */
{ 0, 0, printargs, "svr4_sysfs" }, /* 084 */
{ 0, 0, printargs, "svr4_getmsg" }, /* 085 */
{ 0, 0, printargs, "svr4_putmsg" }, /* 086 */
{ 0, 0, printargs, "svr4_poll" }, /* 087 */
{ 0, 0, printargs, "svr4_lstat" }, /* 088 */
{ 0, 0, printargs, "svr4_symlink" }, /* 089 */
{ 0, 0, printargs, "svr4_readlink" }, /* 090 */
{ 0, 0, printargs, "svr4_setgroups" }, /* 091 */
{ 0, 0, printargs, "svr4_getgroups" }, /* 092 */
{ 0, 0, printargs, "svr4_fchmod" }, /* 093 */
{ 0, 0, printargs, "svr4_fchown" }, /* 094 */
{ 0, 0, printargs, "svr4_sigprocmask" }, /* 095 */
{ 0, 0, printargs, "svr4_sigsuspend" }, /* 096 */
{ 0, 0, printargs, "svr4_sigaltstack" }, /* 097 */
{ 0, 0, printargs, "svr4_sigaction" }, /* 098 */
{ 0, 0, printargs, "svr4_sigpending" }, /* 099 */
{ 0, 0, printargs, "svr4_setcontext" }, /* 0100 */
{ 0, 0, printargs, "svr4_evsys" }, /* 0101 */
{ 0, 0, printargs, "svr4_evtrapret" }, /* 0102 */
{ 0, 0, printargs, "svr4_statvfs" }, /* 0103 */
{ 0, 0, printargs, "svr4_fstatvfs" }, /* 0104 */
{ 0, 0, NULL, NULL }, /* 105 */
{ 0, 0, printargs, "svr4_nfssys" }, /* 0106 */
{ 0, 0, printargs, "svr4_waitid" }, /* 0107 */
{ 0, 0, printargs, "svr4_sigsendset" }, /* 0108 */
{ 0, 0, printargs, "svr4_hrtsys" }, /* 0109 */
{ 0, 0, printargs, "svr4_acancel" }, /* 0110 */
{ 0, 0, printargs, "svr4_async" }, /* 0111 */
{ 0, 0, printargs, "svr4_priocntlset" }, /* 0112 */
{ 0, 0, printargs, "svr4_pathconf" }, /* 0113 */
{ 0, TM, printargs, "svr4_mincore" }, /* 0114 */
{ 0, TD|TM|SI, printargs, "svr4_mmap" }, /* 0115 */
{ 0, TM|SI, printargs, "svr4_mprotect" }, /* 0116 */
{ 0, TM|SI, printargs, "svr4_munmap" }, /* 0117 */
{ 0, 0, printargs, "svr4_fpathconf" }, /* 0118 */
{ 0, 0, printargs, "svr4_vfork" }, /* 0119 */
{ 0, 0, printargs, "svr4_fchdir" }, /* 0120 */
{ 0, 0, printargs, "svr4_readv" }, /* 0121 */
{ 0, 0, printargs, "svr4_writev" }, /* 0122 */
{ 0, 0, printargs, "svr4_xstat" }, /* 0123 */
{ 0, 0, printargs, "svr4_lxstat" }, /* 0124 */
{ 0, 0, printargs, "svr4_fxstat" }, /* 0125 */
{ 0, 0, printargs, "svr4_xmknod" }, /* 0126 */
{ 0, 0, printargs, "svr4_clocal" }, /* 0127 */
{ 0, 0, printargs, "svr4_setrlimit" }, /* 0128 */
{ 0, 0, printargs, "svr4_getrlimit" }, /* 0129 */
{ 0, 0, printargs, "svr4_lchown" }, /* 0130 */
{ 0, 0, printargs, "svr4_memcntl" }, /* 0131 */
{ 0, 0, printargs, "svr4_getpmsg" }, /* 0132 */
{ 0, 0, printargs, "svr4_putpmsg" }, /* 0133 */
{ 0, 0, printargs, "svr4_rename" }, /* 0134 */
{ 0, 0, printargs, "svr4_nuname" }, /* 0135 */
{ 0, 0, printargs, "svr4_setegid" }, /* 0136 */
{ 0, 0, printargs, "svr4_sysconf" }, /* 0137 */
{ 0, 0, printargs, "svr4_adjtime" }, /* 0138 */
{ 0, 0, printargs, "svr4_sysinfo" }, /* 0139 */
{ 0, 0, NULL, NULL }, /* 140 */
{ 0, 0, printargs, "svr4_seteuid" }, /* 0141 */
{ 0, 0, printargs, "svr4_PYRAMID_statis" }, /* 0142 */
{ 0, 0, printargs, "svr4_PYRAMID_tuning" }, /* 0143 */
{ 0, 0, printargs, "svr4_PYRAMID_forcerr" }, /* 0144 */
{ 0, 0, printargs, "svr4_PYRAMID_mpcntl" }, /* 0145 */
{ 0, 0, NULL, NULL }, /* 146 */
{ 0, 0, NULL, NULL }, /* 147 */
{ 0, 0, NULL, NULL }, /* 148 */
{ 0, 0, NULL, NULL }, /* 149 */
{ 0, 0, NULL, NULL }, /* 150 */
{ 0, 0, NULL, NULL }, /* 151 */
{ 0, 0, NULL, NULL }, /* 152 */
{ 0, 0, NULL, NULL }, /* 153 */
{ 0, 0, NULL, NULL }, /* 154 */
{ 0, 0, NULL, NULL }, /* 155 */
{ 0, 0, NULL, NULL }, /* 156 */
{ 0, 0, NULL, NULL }, /* 157 */
{ 0, 0, NULL, NULL }, /* 158 */
{ 0, 0, NULL, NULL }, /* 159 */
{ 0, 0, NULL, NULL }, /* 160 */
{ 0, 0, NULL, NULL }, /* 161 */
{ 0, 0, NULL, NULL }, /* 162 */
{ 0, 0, NULL, NULL }, /* 163 */
{ 0, 0, NULL, NULL }, /* 164 */
{ 0, 0, NULL, NULL }, /* 165 */
{ 0, 0, NULL, NULL }, /* 166 */
{ 0, 0, NULL, NULL }, /* 167 */
{ 0, 0, NULL, NULL }, /* 168 */
{ 0, 0, NULL, NULL }, /* 169 */
{ 0, 0, NULL, NULL }, /* 170 */
{ 0, 0, NULL, NULL }, /* 171 */
{ 0, 0, NULL, NULL }, /* 172 */
{ 0, 0, NULL, NULL }, /* 173 */
{ 0, 0, NULL, NULL }, /* 174 */
{ 0, 0, NULL, NULL }, /* 175 */
{ 0, 0, NULL, NULL }, /* 176 */
{ 0, 0, NULL, NULL }, /* 177 */
{ 0, 0, NULL, NULL }, /* 178 */
{ 0, 0, NULL, NULL }, /* 179 */
{ 0, 0, NULL, NULL }, /* 180 */
{ 0, 0, NULL, NULL }, /* 181 */
{ 0, 0, NULL, NULL }, /* 182 */
{ 0, 0, NULL, NULL }, /* 183 */
{ 0, 0, NULL, NULL }, /* 184 */
{ 0, 0, NULL, NULL }, /* 185 */
{ 0, 0, NULL, NULL }, /* 186 */
{ 0, 0, NULL, NULL }, /* 187 */
{ 0, 0, NULL, NULL }, /* 188 */
{ 0, 0, NULL, NULL }, /* 189 */
{ 0, 0, NULL, NULL }, /* 190 */
{ 0, 0, NULL, NULL }, /* 191 */
{ 0, 0, NULL, NULL }, /* 192 */
{ 0, 0, NULL, NULL }, /* 193 */
{ 0, 0, NULL, NULL }, /* 194 */
{ 0, 0, NULL, NULL }, /* 195 */
{ 0, 0, NULL, NULL }, /* 196 */
{ 0, 0, NULL, NULL }, /* 197 */
{ 0, 0, NULL, NULL }, /* 198 */
{ 0, 0, NULL, NULL }, /* 199 */
{ 0, 0, NULL, NULL }, /* 200 */
{ 0, 0, printargs, "svr4_aread" }, /* 0201 */
{ 0, 0, printargs, "svr4_awrite" }, /* 0202 */
{ 0, 0, printargs, "svr4_listio" }, /* 0203 */
{ 0, 0, printargs, "svr4_mips_acancel" }, /* 0204 */
{ 0, 0, printargs, "svr4_astatus" }, /* 0205 */
{ 0, 0, printargs, "svr4_await" }, /* 0206 */
{ 0, 0, printargs, "svr4_areadv" }, /* 0207 */
{ 0, 0, printargs, "svr4_awritev" }, /* 0208 */
[209 ... 999] = { }, /* 999 */ /* end of SVR4 */
{ 0, 0, printargs, "sysv_syscall" }, /* 1000 */ /* start of SYSV */
{ 0, 0, printargs, "sysv_exit" }, /* 1001 */
{ 0, 0, printargs, "sysv_fork" }, /* 1002 */
{ 0, 0, printargs, "sysv_read" }, /* 1003 */
{ 0, 0, printargs, "sysv_write" }, /* 1004 */
{ 0, 0, printargs, "sysv_open" }, /* 1005 */
{ 0, 0, printargs, "sysv_close" }, /* 1006 */
{ 0, 0, printargs, "sysv_wait" }, /* 1007 */
{ 0, 0, printargs, "sysv_creat" }, /* 1008 */
{ 0, 0, printargs, "sysv_link" }, /* 1009 */
{ 0, 0, printargs, "sysv_unlink" }, /* 1010 */
{ 0, 0, printargs, "sysv_execv" }, /* 1011 */
{ 0, 0, printargs, "sysv_chdir" }, /* 1012 */
{ 0, 0, printargs, "sysv_time" }, /* 1013 */
{ 0, 0, printargs, "sysv_mknod" }, /* 1014 */
{ 0, 0, printargs, "sysv_chmod" }, /* 1015 */
{ 0, 0, printargs, "sysv_chown" }, /* 1016 */
{ 0, TM|SI, printargs, "sysv_brk" }, /* 1017 */
{ 0, 0, printargs, "sysv_stat" }, /* 1018 */
{ 0, 0, printargs, "sysv_lseek" }, /* 1019 */
{ 0, 0, printargs, "sysv_getpid" }, /* 1020 */
{ 0, 0, printargs, "sysv_mount" }, /* 1021 */
{ 0, 0, printargs, "sysv_umount" }, /* 1022 */
{ 0, 0, printargs, "sysv_setuid" }, /* 1023 */
{ 0, 0, printargs, "sysv_getuid" }, /* 1024 */
{ 0, 0, printargs, "sysv_stime" }, /* 1025 */
{ 0, 0, printargs, "sysv_ptrace" }, /* 1026 */
{ 0, 0, printargs, "sysv_alarm" }, /* 1027 */
{ 0, 0, printargs, "sysv_fstat" }, /* 1028 */
{ 0, 0, printargs, "sysv_pause" }, /* 1029 */
{ 0, 0, printargs, "sysv_utime" }, /* 1030 */
{ 0, 0, printargs, "sysv_stty" }, /* 1031 */
{ 0, 0, printargs, "sysv_gtty" }, /* 1032 */
{ 0, 0, printargs, "sysv_access" }, /* 1033 */
{ 0, 0, printargs, "sysv_nice" }, /* 1034 */
{ 0, 0, printargs, "sysv_statfs" }, /* 1035 */
{ 0, 0, printargs, "sysv_sync" }, /* 1036 */
{ 0, 0, printargs, "sysv_kill" }, /* 1037 */
{ 0, 0, printargs, "sysv_fstatfs" }, /* 1038 */
{ 0, 0, printargs, "sysv_setpgrp" }, /* 1039 */
{ 0, 0, printargs, "sysv_syssgi" }, /* 1040 */
{ 0, 0, printargs, "sysv_dup" }, /* 1041 */
{ 0, 0, printargs, "sysv_pipe" }, /* 1042 */
{ 0, 0, printargs, "sysv_times" }, /* 1043 */
{ 0, 0, printargs, "sysv_profil" }, /* 1044 */
{ 0, 0, printargs, "sysv_plock" }, /* 1045 */
{ 0, 0, printargs, "sysv_setgid" }, /* 1046 */
{ 0, 0, printargs, "sysv_getgid" }, /* 1047 */
{ 0, 0, printargs, "sysv_sig" }, /* 1048 */
{ 0, 0, printargs, "sysv_msgsys" }, /* 1049 */
{ 0, 0, printargs, "sysv_sysmips" }, /* 1050 */
{ 0, 0, printargs, "sysv_acct" }, /* 1051 */
{ 0, 0, printargs, "sysv_shmsys" }, /* 1052 */
{ 0, 0, printargs, "sysv_semsys" }, /* 1053 */
{ 0, 0, printargs, "sysv_ioctl" }, /* 1054 */
{ 0, 0, printargs, "sysv_uadmin" }, /* 1055 */
{ 0, 0, printargs, "sysv_sysmp" }, /* 1056 */
{ 0, 0, printargs, "sysv_utssys" }, /* 1057 */
{ 0, 0, NULL, NULL }, /* 1058 */
{ 0, 0, printargs, "sysv_execve" }, /* 1059 */
{ 0, 0, printargs, "sysv_umask" }, /* 1060 */
{ 0, 0, printargs, "sysv_chroot" }, /* 1061 */
{ 0, 0, printargs, "sysv_fcntl" }, /* 1062 */
{ 0, 0, printargs, "sysv_ulimit" }, /* 1063 */
{ 0, 0, NULL, NULL }, /* 1064 */
{ 0, 0, NULL, NULL }, /* 1065 */
{ 0, 0, NULL, NULL }, /* 1066 */
{ 0, 0, NULL, NULL }, /* 1067 */
{ 0, 0, NULL, NULL }, /* 1068 */
{ 0, 0, NULL, NULL }, /* 1069 */
{ 0, 0, printargs, "sysv_advfs" }, /* 1070 */
{ 0, 0, printargs, "sysv_unadvfs" }, /* 1071 */
{ 0, 0, printargs, "sysv_rmount" }, /* 1072 */
{ 0, 0, printargs, "sysv_rumount" }, /* 1073 */
{ 0, 0, printargs, "sysv_rfstart" }, /* 1074 */
{ 0, 0, printargs, "sysv_getrlimit64" }, /* 1075 */
{ 0, 0, printargs, "sysv_setrlimit64" }, /* 1076 */
{ 0, 0, printargs, "sysv_nanosleep" }, /* 1077 */
{ 0, 0, printargs, "sysv_lseek64" }, /* 1078 */
{ 0, 0, printargs, "sysv_rmdir" }, /* 1079 */
{ 0, 0, printargs, "sysv_mkdir" }, /* 1080 */
{ 0, 0, printargs, "sysv_getdents" }, /* 1081 */
{ 0, 0, printargs, "sysv_sginap" }, /* 1082 */
{ 0, 0, printargs, "sysv_sgikopt" }, /* 1083 */
{ 0, 0, printargs, "sysv_sysfs" }, /* 1084 */
{ 0, 0, printargs, "sysv_getmsg" }, /* 1085 */
{ 0, 0, printargs, "sysv_putmsg" }, /* 1086 */
{ 0, 0, printargs, "sysv_poll" }, /* 1087 */
{ 0, 0, printargs, "sysv_sigreturn" }, /* 1088 */
{ 0, 0, printargs, "sysv_accept" }, /* 1089 */
{ 0, 0, printargs, "sysv_bind" }, /* 1090 */
{ 0, 0, printargs, "sysv_connect" }, /* 1091 */
{ 0, 0, printargs, "sysv_gethostid" }, /* 1092 */
{ 0, 0, printargs, "sysv_getpeername" }, /* 1093 */
{ 0, 0, printargs, "sysv_getsockname" }, /* 1094 */
{ 0, 0, printargs, "sysv_getsockopt" }, /* 1095 */
{ 0, 0, printargs, "sysv_listen" }, /* 1096 */
{ 0, 0, printargs, "sysv_recv" }, /* 1097 */
{ 0, 0, printargs, "sysv_recvfrom" }, /* 1098 */
{ 0, 0, printargs, "sysv_recvmsg" }, /* 1099 */
{ 0, 0, printargs, "sysv_select" }, /* 1100 */
{ 0, 0, printargs, "sysv_send" }, /* 1101 */
{ 0, 0, printargs, "sysv_sendmsg" }, /* 1102 */
{ 0, 0, printargs, "sysv_sendto" }, /* 1103 */
{ 0, 0, printargs, "sysv_sethostid" }, /* 1104 */
{ 0, 0, printargs, "sysv_setsockopt" }, /* 1105 */
{ 0, 0, printargs, "sysv_shutdown" }, /* 1106 */
{ 0, 0, printargs, "sysv_socket" }, /* 1107 */
{ 0, 0, printargs, "sysv_gethostname" }, /* 1108 */
{ 0, 0, printargs, "sysv_sethostname" }, /* 1109 */
{ 0, 0, printargs, "sysv_getdomainname" }, /* 1110 */
{ 0, 0, printargs, "sysv_setdomainname" }, /* 1111 */
{ 0, 0, printargs, "sysv_truncate" }, /* 1112 */
{ 0, 0, printargs, "sysv_ftruncate" }, /* 1113 */
{ 0, 0, printargs, "sysv_rename" }, /* 1114 */
{ 0, 0, printargs, "sysv_symlink" }, /* 1115 */
{ 0, 0, printargs, "sysv_readlink" }, /* 1116 */
{ 0, 0, printargs, "sysv_lstat" }, /* 1117 */
{ 0, 0, printargs, "sysv_nfsmount" }, /* 1118 */
{ 0, 0, printargs, "sysv_nfssvc" }, /* 1119 */
{ 0, 0, printargs, "sysv_getfh" }, /* 1120 */
{ 0, 0, printargs, "sysv_async_daemon" }, /* 1121 */
{ 0, 0, printargs, "sysv_exportfs" }, /* 1122 */
{ 0, 0, printargs, "sysv_setregid" }, /* 1123 */
{ 0, 0, printargs, "sysv_setreuid" }, /* 1124 */
{ 0, 0, printargs, "sysv_getitimer" }, /* 1125 */
{ 0, 0, printargs, "sysv_setitimer" }, /* 1126 */
{ 0, 0, printargs, "sysv_adjtime" }, /* 1127 */
{ 0, 0, printargs, "sysv_BSD_getime" }, /* 1128 */
{ 0, 0, printargs, "sysv_sproc" }, /* 1129 */
{ 0, 0, printargs, "sysv_prctl" }, /* 1130 */
{ 0, 0, printargs, "sysv_procblk" }, /* 1131 */
{ 0, 0, printargs, "sysv_sprocsp" }, /* 1132 */
{ 0, 0, printargs, "sysv_sgigsc" }, /* 1133 */
{ 0, TD|TM|SI, printargs, "sysv_mmap" }, /* 1134 */
{ 0, TM|SI, printargs, "sysv_munmap" }, /* 1135 */
{ 0, TM|SI, printargs, "sysv_mprotect" }, /* 1136 */
{ 0, TM, printargs, "sysv_msync" }, /* 1137 */
{ 0, TM, printargs, "sysv_madvise" }, /* 1138 */
{ 0, 0, printargs, "sysv_pagelock" }, /* 1139 */
{ 0, 0, printargs, "sysv_getpagesize" }, /* 1140 */
{ 0, TF, printargs, "sysv_quotactl" }, /* 1141 */
{ 0, 0, printargs, "sysv_libdetach" }, /* 1142 */
{ 0, 0, printargs, "sysv_BSDgetpgrp" }, /* 1143 */
{ 0, 0, printargs, "sysv_BSDsetpgrp" }, /* 1144 */
{ 0, 0, printargs, "sysv_vhangup" }, /* 1145 */
{ 0, 0, printargs, "sysv_fsync" }, /* 1146 */
{ 0, 0, printargs, "sysv_fchdir" }, /* 1147 */
{ 0, 0, printargs, "sysv_getrlimit" }, /* 1148 */
{ 0, 0, printargs, "sysv_setrlimit" }, /* 1149 */
{ 0, 0, printargs, "sysv_cacheflush" }, /* 1150 */
{ 0, 0, printargs, "sysv_cachectl" }, /* 1151 */
{ 0, 0, printargs, "sysv_fchown" }, /* 1152 */
{ 0, 0, printargs, "sysv_fchmod" }, /* 1153 */
{ 0, 0, printargs, "sysv_wait3" }, /* 1154 */
{ 0, 0, printargs, "sysv_socketpair" }, /* 1155 */
{ 0, 0, printargs, "sysv_sysinfo" }, /* 1156 */
{ 0, 0, printargs, "sysv_nuname" }, /* 1157 */
{ 0, 0, printargs, "sysv_xstat" }, /* 1158 */
{ 0, 0, printargs, "sysv_lxstat" }, /* 1159 */
{ 0, 0, printargs, "sysv_fxstat" }, /* 1160 */
{ 0, 0, printargs, "sysv_xmknod" }, /* 1161 */
{ 0, 0, printargs, "sysv_ksigaction" }, /* 1162 */
{ 0, 0, printargs, "sysv_sigpending" }, /* 1163 */
{ 0, 0, printargs, "sysv_sigprocmask" }, /* 1164 */
{ 0, 0, printargs, "sysv_sigsuspend" }, /* 1165 */
{ 0, 0, printargs, "sysv_sigpoll" }, /* 1166 */
{ 0, 0, printargs, "sysv_swapctl" }, /* 1167 */
{ 0, 0, printargs, "sysv_getcontext" }, /* 1168 */
{ 0, 0, printargs, "sysv_setcontext" }, /* 1169 */
{ 0, 0, printargs, "sysv_waitsys" }, /* 1170 */
{ 0, 0, printargs, "sysv_sigstack" }, /* 1171 */
{ 0, 0, printargs, "sysv_sigaltstack" }, /* 1172 */
{ 0, 0, printargs, "sysv_sigsendset" }, /* 1173 */
{ 0, 0, printargs, "sysv_statvfs" }, /* 1174 */
{ 0, 0, printargs, "sysv_fstatvfs" }, /* 1175 */
{ 0, 0, printargs, "sysv_getpmsg" }, /* 1176 */
{ 0, 0, printargs, "sysv_putpmsg" }, /* 1177 */
{ 0, 0, printargs, "sysv_lchown" }, /* 1178 */
{ 0, 0, printargs, "sysv_priocntl" }, /* 1179 */
{ 0, 0, printargs, "sysv_ksigqueue" }, /* 1180 */
{ 0, 0, printargs, "sysv_readv" }, /* 1181 */
{ 0, 0, printargs, "sysv_writev" }, /* 1182 */
{ 0, 0, printargs, "sysv_truncate64" }, /* 1183 */
{ 0, 0, printargs, "sysv_ftruncate64" }, /* 1184 */
{ 0, TD|TM|SI, printargs, "sysv_mmap64" }, /* 1185 */
{ 0, 0, printargs, "sysv_dmi" }, /* 1186 */
{ 0, 0, printargs, "sysv_pread" }, /* 1187 */
{ 0, 0, printargs, "sysv_pwrite" }, /* 1188 */
[1189 ... 1999] = { }, /* 1999 */ /* end of SYSV */
{ 0, 0, printargs, "bsd43_syscall" }, /* 2000 */ /* start of BSD 4.3 */
{ 0, 0, printargs, "bsd43_exit" }, /* 2001 */
{ 0, 0, printargs, "bsd43_fork" }, /* 2002 */
{ 0, 0, printargs, "bsd43_read" }, /* 2003 */
{ 0, 0, printargs, "bsd43_write" }, /* 2004 */
{ 0, 0, printargs, "bsd43_open" }, /* 2005 */
{ 0, 0, printargs, "bsd43_close" }, /* 2006 */
{ 0, 0, printargs, "bsd43_wait" }, /* 2007 */
{ 0, 0, printargs, "bsd43_creat" }, /* 2008 */
{ 0, 0, printargs, "bsd43_link" }, /* 2009 */
{ 0, 0, printargs, "bsd43_unlink" }, /* 2010 */
{ 0, 0, printargs, "bsd43_exec" }, /* 2011 */
{ 0, 0, printargs, "bsd43_chdir" }, /* 2012 */
{ 0, 0, printargs, "bsd43_time" }, /* 2013 */
{ 0, 0, printargs, "bsd43_mknod" }, /* 2014 */
{ 0, 0, printargs, "bsd43_chmod" }, /* 2015 */
{ 0, 0, printargs, "bsd43_chown" }, /* 2016 */
{ 0, TM, printargs, "bsd43_sbreak" }, /* 2017 */
{ 0, 0, printargs, "bsd43_oldstat" }, /* 2018 */
{ 0, 0, printargs, "bsd43_lseek" }, /* 2019 */
{ 0, 0, printargs, "bsd43_getpid" }, /* 2020 */
{ 0, 0, printargs, "bsd43_oldmount" }, /* 2021 */
{ 0, 0, printargs, "bsd43_umount" }, /* 2022 */
{ 0, 0, printargs, "bsd43_setuid" }, /* 2023 */
{ 0, 0, printargs, "bsd43_getuid" }, /* 2024 */
{ 0, 0, printargs, "bsd43_stime" }, /* 2025 */
{ 0, 0, printargs, "bsd43_ptrace" }, /* 2026 */
{ 0, 0, printargs, "bsd43_alarm" }, /* 2027 */
{ 0, 0, printargs, "bsd43_oldfstat" }, /* 2028 */
{ 0, 0, printargs, "bsd43_pause" }, /* 2029 */
{ 0, 0, printargs, "bsd43_utime" }, /* 2030 */
{ 0, 0, printargs, "bsd43_stty" }, /* 2031 */
{ 0, 0, printargs, "bsd43_gtty" }, /* 2032 */
{ 0, 0, printargs, "bsd43_access" }, /* 2033 */
{ 0, 0, printargs, "bsd43_nice" }, /* 2034 */
{ 0, 0, printargs, "bsd43_ftime" }, /* 2035 */
{ 0, 0, printargs, "bsd43_sync" }, /* 2036 */
{ 0, 0, printargs, "bsd43_kill" }, /* 2037 */
{ 0, 0, printargs, "bsd43_stat" }, /* 2038 */
{ 0, 0, printargs, "bsd43_oldsetpgrp" }, /* 2039 */
{ 0, 0, printargs, "bsd43_lstat" }, /* 2040 */
{ 0, 0, printargs, "bsd43_dup" }, /* 2041 */
{ 0, 0, printargs, "bsd43_pipe" }, /* 2042 */
{ 0, 0, printargs, "bsd43_times" }, /* 2043 */
{ 0, 0, printargs, "bsd43_profil" }, /* 2044 */
{ 0, 0, printargs, "bsd43_msgsys" }, /* 2045 */
{ 0, 0, printargs, "bsd43_setgid" }, /* 2046 */
{ 0, 0, printargs, "bsd43_getgid" }, /* 2047 */
{ 0, 0, printargs, "bsd43_ssig" }, /* 2048 */
{ 0, 0, NULL, NULL }, /* 2049 */
{ 0, 0, NULL, NULL }, /* 2050 */
{ 0, 0, printargs, "bsd43_sysacct" }, /* 2051 */
{ 0, 0, printargs, "bsd43_phys" }, /* 2052 */
{ 0, 0, printargs, "bsd43_lock" }, /* 2053 */
{ 0, 0, printargs, "bsd43_ioctl" }, /* 2054 */
{ 0, 0, printargs, "bsd43_reboot" }, /* 2055 */
{ 0, 0, printargs, "bsd43_mpxchan" }, /* 2056 */
{ 0, 0, printargs, "bsd43_symlink" }, /* 2057 */
{ 0, 0, printargs, "bsd43_readlink" }, /* 2058 */
{ 0, 0, printargs, "bsd43_execve" }, /* 2059 */
{ 0, 0, printargs, "bsd43_umask" }, /* 2060 */
{ 0, 0, printargs, "bsd43_chroot" }, /* 2061 */
{ 0, 0, printargs, "bsd43_fstat" }, /* 2062 */
{ 0, 0, NULL, NULL }, /* 2063 */
{ 0, 0, printargs, "bsd43_getpagesize" }, /* 2064 */
{ 0, TM|SI, printargs, "bsd43_mremap" }, /* 2065 */
{ 0, 0, printargs, "bsd43_vfork" }, /* 2066 */
{ 0, 0, printargs, "bsd43_vread" }, /* 2067 */
{ 0, 0, printargs, "bsd43_vwrite" }, /* 2068 */
{ 0, TM|SI, printargs, "bsd43_sbrk" }, /* 2069 */
{ 0, 0, printargs, "bsd43_sstk" }, /* 2070 */
{ 0, TD|TM|SI, printargs, "bsd43_mmap" }, /* 2071 */
{ 0, 0, printargs, "bsd43_vadvise" }, /* 2072 */
{ 0, TM|SI, printargs, "bsd43_munmap" }, /* 2073 */
{ 0, TM|SI, printargs, "bsd43_mprotect" }, /* 2074 */
{ 0, TM, printargs, "bsd43_madvise" }, /* 2075 */
{ 0, 0, printargs, "bsd43_vhangup" }, /* 2076 */
{ 0, 0, printargs, "bsd43_vlimit" }, /* 2077 */
{ 0, TM, printargs, "bsd43_mincore" }, /* 2078 */
{ 0, 0, printargs, "bsd43_getgroups" }, /* 2079 */
{ 0, 0, printargs, "bsd43_setgroups" }, /* 2080 */
{ 0, 0, printargs, "bsd43_getpgrp" }, /* 2081 */
{ 0, 0, printargs, "bsd43_setpgrp" }, /* 2082 */
{ 0, 0, printargs, "bsd43_setitimer" }, /* 2083 */
{ 0, 0, printargs, "bsd43_wait3" }, /* 2084 */
{ 0, 0, printargs, "bsd43_swapon" }, /* 2085 */
{ 0, 0, printargs, "bsd43_getitimer" }, /* 2086 */
{ 0, 0, printargs, "bsd43_gethostname" }, /* 2087 */
{ 0, 0, printargs, "bsd43_sethostname" }, /* 2088 */
{ 0, 0, printargs, "bsd43_getdtablesize" }, /* 2089 */
{ 0, 0, printargs, "bsd43_dup2" }, /* 2090 */
{ 0, 0, printargs, "bsd43_getdopt" }, /* 2091 */
{ 0, 0, printargs, "bsd43_fcntl" }, /* 2092 */
{ 0, 0, printargs, "bsd43_select" }, /* 2093 */
{ 0, 0, printargs, "bsd43_setdopt" }, /* 2094 */
{ 0, 0, printargs, "bsd43_fsync" }, /* 2095 */
{ 0, 0, printargs, "bsd43_setpriority" }, /* 2096 */
{ 0, 0, printargs, "bsd43_socket" }, /* 2097 */
{ 0, 0, printargs, "bsd43_connect" }, /* 2098 */
{ 0, 0, printargs, "bsd43_oldaccept" }, /* 2099 */
{ 0, 0, printargs, "bsd43_getpriority" }, /* 2100 */
{ 0, 0, printargs, "bsd43_send" }, /* 2101 */
{ 0, 0, printargs, "bsd43_recv" }, /* 2102 */
{ 0, 0, printargs, "bsd43_sigreturn" }, /* 2103 */
{ 0, 0, printargs, "bsd43_bind" }, /* 2104 */
{ 0, 0, printargs, "bsd43_setsockopt" }, /* 2105 */
{ 0, 0, printargs, "bsd43_listen" }, /* 2106 */
{ 0, 0, printargs, "bsd43_vtimes" }, /* 2107 */
{ 0, 0, printargs, "bsd43_sigvec" }, /* 2108 */
{ 0, 0, printargs, "bsd43_sigblock" }, /* 2109 */
{ 0, 0, printargs, "bsd43_sigsetmask" }, /* 2110 */
{ 0, 0, printargs, "bsd43_sigpause" }, /* 2111 */
{ 0, 0, printargs, "bsd43_sigstack" }, /* 2112 */
{ 0, 0, printargs, "bsd43_oldrecvmsg" }, /* 2113 */
{ 0, 0, printargs, "bsd43_oldsendmsg" }, /* 2114 */
{ 0, 0, printargs, "bsd43_vtrace" }, /* 2115 */
{ 0, 0, printargs, "bsd43_gettimeofday" }, /* 2116 */
{ 0, 0, printargs, "bsd43_getrusage" }, /* 2117 */
{ 0, 0, printargs, "bsd43_getsockopt" }, /* 2118 */
{ 0, 0, NULL, NULL }, /* 2119 */
{ 0, 0, printargs, "bsd43_readv" }, /* 2120 */
{ 0, 0, printargs, "bsd43_writev" }, /* 2121 */
{ 0, 0, printargs, "bsd43_settimeofday" }, /* 2122 */
{ 0, 0, printargs, "bsd43_fchown" }, /* 2123 */
{ 0, 0, printargs, "bsd43_fchmod" }, /* 2124 */
{ 0, 0, printargs, "bsd43_oldrecvfrom" }, /* 2125 */
{ 0, 0, printargs, "bsd43_setreuid" }, /* 2126 */
{ 0, 0, printargs, "bsd43_setregid" }, /* 2127 */
{ 0, 0, printargs, "bsd43_rename" }, /* 2128 */
{ 0, 0, printargs, "bsd43_truncate" }, /* 2129 */
{ 0, 0, printargs, "bsd43_ftruncate" }, /* 2130 */
{ 0, 0, printargs, "bsd43_flock" }, /* 2131 */
{ 0, 0, printargs, "bsd43_semsys" }, /* 2132 */
{ 0, 0, printargs, "bsd43_sendto" }, /* 2133 */
{ 0, 0, printargs, "bsd43_shutdown" }, /* 2134 */
{ 0, 0, printargs, "bsd43_socketpair" }, /* 2135 */
{ 0, 0, printargs, "bsd43_mkdir" }, /* 2136 */
{ 0, 0, printargs, "bsd43_rmdir" }, /* 2137 */
{ 0, 0, printargs, "bsd43_utimes" }, /* 2138 */
{ 0, 0, printargs, "bsd43_sigcleanup" }, /* 2139 */
{ 0, 0, printargs, "bsd43_adjtime" }, /* 2140 */
{ 0, 0, printargs, "bsd43_oldgetpeername" }, /* 2141 */
{ 0, 0, printargs, "bsd43_gethostid" }, /* 2142 */
{ 0, 0, printargs, "bsd43_sethostid" }, /* 2143 */
{ 0, 0, printargs, "bsd43_getrlimit" }, /* 2144 */
{ 0, 0, printargs, "bsd43_setrlimit" }, /* 2145 */
{ 0, 0, printargs, "bsd43_killpg" }, /* 2146 */
{ 0, 0, printargs, "bsd43_shmsys" }, /* 2147 */
{ 0, 0, printargs, "bsd43_quota" }, /* 2148 */
{ 0, 0, printargs, "bsd43_qquota" }, /* 2149 */
{ 0, 0, printargs, "bsd43_oldgetsockname" }, /* 2150 */
{ 0, 0, printargs, "bsd43_sysmips" }, /* 2151 */
{ 0, 0, printargs, "bsd43_cacheflush" }, /* 2152 */
{ 0, 0, printargs, "bsd43_cachectl" }, /* 2153 */
{ 0, 0, printargs, "bsd43_debug" }, /* 2154 */
{ 0, 0, NULL, NULL }, /* 2155 */
{ 0, 0, NULL, NULL }, /* 2156 */
{ 0, 0, printargs, "bsd43_nfs_mount" }, /* 2157 */
{ 0, 0, printargs, "bsd43_nfs_svc" }, /* 2158 */
{ 0, 0, printargs, "bsd43_getdirentries" }, /* 2159 */
{ 0, 0, printargs, "bsd43_statfs" }, /* 2160 */
{ 0, 0, printargs, "bsd43_fstatfs" }, /* 2161 */
{ 0, 0, printargs, "bsd43_unmount" }, /* 2162 */
{ 0, 0, printargs, "bsd43_async_daemon" }, /* 2163 */
{ 0, 0, printargs, "bsd43_nfs_getfh" }, /* 2164 */
{ 0, 0, printargs, "bsd43_getdomainname" }, /* 2165 */
{ 0, 0, printargs, "bsd43_setdomainname" }, /* 2166 */
{ 0, 0, printargs, "bsd43_pcfs_mount" }, /* 2167 */
{ 0, TF, printargs, "bsd43_quotactl" }, /* 2168 */
{ 0, 0, printargs, "bsd43_oldexportfs" }, /* 2169 */
{ 0, 0, printargs, "bsd43_smount" }, /* 2170 */
{ 0, 0, printargs, "bsd43_mipshwconf" }, /* 2171 */
{ 0, 0, printargs, "bsd43_exportfs" }, /* 2172 */
{ 0, 0, printargs, "bsd43_nfsfh_open" }, /* 2173 */
{ 0, 0, printargs, "bsd43_libattach" }, /* 2174 */
{ 0, 0, printargs, "bsd43_libdetach" }, /* 2175 */
{ 0, 0, printargs, "bsd43_accept" }, /* 2176 */
{ 0, 0, NULL, NULL }, /* 2177 */
{ 0, 0, NULL, NULL }, /* 2178 */
{ 0, 0, printargs, "bsd43_recvmsg" }, /* 2179 */
{ 0, 0, printargs, "bsd43_recvfrom" }, /* 2180 */
{ 0, 0, printargs, "bsd43_sendmsg" }, /* 2181 */
{ 0, 0, printargs, "bsd43_getpeername" }, /* 2182 */
{ 0, 0, printargs, "bsd43_getsockname" }, /* 2183 */
{ 0, 0, printargs, "bsd43_aread" }, /* 2184 */
{ 0, 0, printargs, "bsd43_awrite" }, /* 2185 */
{ 0, 0, printargs, "bsd43_listio" }, /* 2186 */
{ 0, 0, printargs, "bsd43_acancel" }, /* 2187 */
{ 0, 0, printargs, "bsd43_astatus" }, /* 2188 */
{ 0, 0, printargs, "bsd43_await" }, /* 2189 */
{ 0, 0, printargs, "bsd43_areadv" }, /* 2190 */
{ 0, 0, printargs, "bsd43_awritev" }, /* 2191 */
[2192 ... 2999] = { }, /* 2999 */ /* end of BSD 4.3 */
{ 0, 0, printargs, "posix_syscall" }, /* 3000 */ /* start of POSIX */
{ 0, 0, printargs, "posix_exit" }, /* 3001 */
{ 0, 0, printargs, "posix_fork" }, /* 3002 */
{ 0, 0, printargs, "posix_read" }, /* 3003 */
{ 0, 0, printargs, "posix_write" }, /* 3004 */
{ 0, 0, printargs, "posix_open" }, /* 3005 */
{ 0, 0, printargs, "posix_close" }, /* 3006 */
{ 0, 0, printargs, "posix_wait" }, /* 3007 */
{ 0, 0, printargs, "posix_creat" }, /* 3008 */
{ 0, 0, printargs, "posix_link" }, /* 3009 */
{ 0, 0, printargs, "posix_unlink" }, /* 3010 */
{ 0, 0, printargs, "posix_exec" }, /* 3011 */
{ 0, 0, printargs, "posix_chdir" }, /* 3012 */
{ 0, 0, printargs, "posix_gtime" }, /* 3013 */
{ 0, 0, printargs, "posix_mknod" }, /* 3014 */
{ 0, 0, printargs, "posix_chmod" }, /* 3015 */
{ 0, 0, printargs, "posix_chown" }, /* 3016 */
{ 0, TM, printargs, "posix_sbreak" }, /* 3017 */
{ 0, 0, printargs, "posix_stat" }, /* 3018 */
{ 0, 0, printargs, "posix_lseek" }, /* 3019 */
{ 0, 0, printargs, "posix_getpid" }, /* 3020 */
{ 0, 0, printargs, "posix_mount" }, /* 3021 */
{ 0, 0, printargs, "posix_umount" }, /* 3022 */
{ 0, 0, printargs, "posix_setuid" }, /* 3023 */
{ 0, 0, printargs, "posix_getuid" }, /* 3024 */
{ 0, 0, printargs, "posix_stime" }, /* 3025 */
{ 0, 0, printargs, "posix_ptrace" }, /* 3026 */
{ 0, 0, printargs, "posix_alarm" }, /* 3027 */
{ 0, 0, printargs, "posix_fstat" }, /* 3028 */
{ 0, 0, printargs, "posix_pause" }, /* 3029 */
{ 0, 0, printargs, "posix_utime" }, /* 3030 */
{ 0, 0, printargs, "posix_stty" }, /* 3031 */
{ 0, 0, printargs, "posix_gtty" }, /* 3032 */
{ 0, 0, printargs, "posix_access" }, /* 3033 */
{ 0, 0, printargs, "posix_nice" }, /* 3034 */
{ 0, 0, printargs, "posix_statfs" }, /* 3035 */
{ 0, 0, printargs, "posix_sync" }, /* 3036 */
{ 0, 0, printargs, "posix_kill" }, /* 3037 */
{ 0, 0, printargs, "posix_fstatfs" }, /* 3038 */
{ 0, 0, printargs, "posix_getpgrp" }, /* 3039 */
{ 0, 0, printargs, "posix_syssgi" }, /* 3040 */
{ 0, 0, printargs, "posix_dup" }, /* 3041 */
{ 0, 0, printargs, "posix_pipe" }, /* 3042 */
{ 0, 0, printargs, "posix_times" }, /* 3043 */
{ 0, 0, printargs, "posix_profil" }, /* 3044 */
{ 0, 0, printargs, "posix_lock" }, /* 3045 */
{ 0, 0, printargs, "posix_setgid" }, /* 3046 */
{ 0, 0, printargs, "posix_getgid" }, /* 3047 */
{ 0, 0, printargs, "posix_sig" }, /* 3048 */
{ 0, 0, printargs, "posix_msgsys" }, /* 3049 */
{ 0, 0, printargs, "posix_sysmips" }, /* 3050 */
{ 0, 0, printargs, "posix_sysacct" }, /* 3051 */
{ 0, 0, printargs, "posix_shmsys" }, /* 3052 */
{ 0, 0, printargs, "posix_semsys" }, /* 3053 */
{ 0, 0, printargs, "posix_ioctl" }, /* 3054 */
{ 0, 0, printargs, "posix_uadmin" }, /* 3055 */
{ 0, 0, printargs, "posix_exch" }, /* 3056 */
{ 0, 0, printargs, "posix_utssys" }, /* 3057 */
{ 0, 0, NULL, NULL }, /* 3058 */
{ 0, 0, printargs, "posix_exece" }, /* 3059 */
{ 0, 0, printargs, "posix_umask" }, /* 3060 */
{ 0, 0, printargs, "posix_chroot" }, /* 3061 */
{ 0, 0, printargs, "posix_fcntl" }, /* 3062 */
{ 0, 0, printargs, "posix_ulimit" }, /* 3063 */
{ 0, 0, NULL, NULL }, /* 3064 */
{ 0, 0, NULL, NULL }, /* 3065 */
{ 0, 0, NULL, NULL }, /* 3066 */
{ 0, 0, NULL, NULL }, /* 3067 */
{ 0, 0, NULL, NULL }, /* 3068 */
{ 0, 0, NULL, NULL }, /* 3069 */
{ 0, 0, printargs, "posix_advfs" }, /* 3070 */
{ 0, 0, printargs, "posix_unadvfs" }, /* 3071 */
{ 0, 0, printargs, "posix_rmount" }, /* 3072 */
{ 0, 0, printargs, "posix_rumount" }, /* 3073 */
{ 0, 0, printargs, "posix_rfstart" }, /* 3074 */
{ 0, 0, NULL, NULL }, /* 3075 */
{ 0, 0, printargs, "posix_rdebug" }, /* 3076 */
{ 0, 0, printargs, "posix_rfstop" }, /* 3077 */
{ 0, 0, printargs, "posix_rfsys" }, /* 3078 */
{ 0, 0, printargs, "posix_rmdir" }, /* 3079 */
{ 0, 0, printargs, "posix_mkdir" }, /* 3080 */
{ 0, 0, printargs, "posix_getdents" }, /* 3081 */
{ 0, 0, printargs, "posix_sginap" }, /* 3082 */
{ 0, 0, printargs, "posix_sgikopt" }, /* 3083 */
{ 0, 0, printargs, "posix_sysfs" }, /* 3084 */
{ 0, 0, printargs, "posix_getmsg" }, /* 3085 */
{ 0, 0, printargs, "posix_putmsg" }, /* 3086 */
{ 0, 0, printargs, "posix_poll" }, /* 3087 */
{ 0, 0, printargs, "posix_sigreturn" }, /* 3088 */
{ 0, 0, printargs, "posix_accept" }, /* 3089 */
{ 0, 0, printargs, "posix_bind" }, /* 3090 */
{ 0, 0, printargs, "posix_connect" }, /* 3091 */
{ 0, 0, printargs, "posix_gethostid" }, /* 3092 */
{ 0, 0, printargs, "posix_getpeername" }, /* 3093 */
{ 0, 0, printargs, "posix_getsockname" }, /* 3094 */
{ 0, 0, printargs, "posix_getsockopt" }, /* 3095 */
{ 0, 0, printargs, "posix_listen" }, /* 3096 */
{ 0, 0, printargs, "posix_recv" }, /* 3097 */
{ 0, 0, printargs, "posix_recvfrom" }, /* 3098 */
{ 0, 0, printargs, "posix_recvmsg" }, /* 3099 */
{ 0, 0, printargs, "posix_select" }, /* 3100 */
{ 0, 0, printargs, "posix_send" }, /* 3101 */
{ 0, 0, printargs, "posix_sendmsg" }, /* 3102 */
{ 0, 0, printargs, "posix_sendto" }, /* 3103 */
{ 0, 0, printargs, "posix_sethostid" }, /* 3104 */
{ 0, 0, printargs, "posix_setsockopt" }, /* 3105 */
{ 0, 0, printargs, "posix_shutdown" }, /* 3106 */
{ 0, 0, printargs, "posix_socket" }, /* 3107 */
{ 0, 0, printargs, "posix_gethostname" }, /* 3108 */
{ 0, 0, printargs, "posix_sethostname" }, /* 3109 */
{ 0, 0, printargs, "posix_getdomainname" }, /* 3110 */
{ 0, 0, printargs, "posix_setdomainname" }, /* 3111 */
{ 0, 0, printargs, "posix_truncate" }, /* 3112 */
{ 0, 0, printargs, "posix_ftruncate" }, /* 3113 */
{ 0, 0, printargs, "posix_rename" }, /* 3114 */
{ 0, 0, printargs, "posix_symlink" }, /* 3115 */
{ 0, 0, printargs, "posix_readlink" }, /* 3116 */
{ 0, 0, printargs, "posix_lstat" }, /* 3117 */
{ 0, 0, printargs, "posix_nfs_mount" }, /* 3118 */
{ 0, 0, printargs, "posix_nfs_svc" }, /* 3119 */
{ 0, 0, printargs, "posix_nfs_getfh" }, /* 3120 */
{ 0, 0, printargs, "posix_async_daemon" }, /* 3121 */
{ 0, 0, printargs, "posix_exportfs" }, /* 3122 */
{ 0, 0, printargs, "posix_SGI_setregid" }, /* 3123 */
{ 0, 0, printargs, "posix_SGI_setreuid" }, /* 3124 */
{ 0, 0, printargs, "posix_getitimer" }, /* 3125 */
{ 0, 0, printargs, "posix_setitimer" }, /* 3126 */
{ 0, 0, printargs, "posix_adjtime" }, /* 3127 */
{ 0, 0, printargs, "posix_SGI_bsdgettime" }, /* 3128 */
{ 0, 0, printargs, "posix_SGI_sproc" }, /* 3129 */
{ 0, 0, printargs, "posix_SGI_prctl" }, /* 3130 */
{ 0, 0, printargs, "posix_SGI_blkproc" }, /* 3131 */
{ 0, 0, NULL, NULL }, /* 3132 */
{ 0, 0, printargs, "posix_SGI_sgigsc" }, /* 3133 */
{ 0, TD|TM|SI, printargs, "posix_SGI_mmap" }, /* 3134 */
{ 0, TM|SI, printargs, "posix_SGI_munmap" }, /* 3135 */
{ 0, TM|SI, printargs, "posix_SGI_mprotect" }, /* 3136 */
{ 0, TM, printargs, "posix_SGI_msync" }, /* 3137 */
{ 0, TM, printargs, "posix_SGI_madvise" }, /* 3138 */
{ 0, 0, printargs, "posix_SGI_mpin" }, /* 3139 */
{ 0, 0, printargs, "posix_SGI_getpagesize" }, /* 3140 */
{ 0, 0, printargs, "posix_SGI_libattach" }, /* 3141 */
{ 0, 0, printargs, "posix_SGI_libdetach" }, /* 3142 */
{ 0, 0, printargs, "posix_SGI_getpgrp" }, /* 3143 */
{ 0, 0, printargs, "posix_SGI_setpgrp" }, /* 3144 */
{ 0, 0, NULL, NULL }, /* 3145 */
{ 0, 0, NULL, NULL }, /* 3146 */
{ 0, 0, NULL, NULL }, /* 3147 */
{ 0, 0, NULL, NULL }, /* 3148 */
{ 0, 0, NULL, NULL }, /* 3149 */
{ 0, 0, printargs, "posix_cacheflush" }, /* 3150 */
{ 0, 0, printargs, "posix_cachectl" }, /* 3151 */
{ 0, 0, printargs, "posix_fchown" }, /* 3152 */
{ 0, 0, printargs, "posix_fchmod" }, /* 3153 */
{ 0, 0, printargs, "posix_wait3" }, /* 3154 */
{ 0, TD|TM|SI, printargs, "posix_mmap" }, /* 3155 */
{ 0, TM|SI, printargs, "posix_munmap" }, /* 3156 */
{ 0, TM, printargs, "posix_madvise" }, /* 3157 */
{ 0, 0, printargs, "posix_BSD_getpagesize" }, /* 3158 */
{ 0, 0, printargs, "posix_setreuid" }, /* 3159 */
{ 0, 0, printargs, "posix_setregid" }, /* 3160 */
{ 0, 0, printargs, "posix_setpgid" }, /* 3161 */
{ 0, 0, printargs, "posix_getgroups" }, /* 3162 */
{ 0, 0, printargs, "posix_setgroups" }, /* 3163 */
{ 0, 0, printargs, "posix_gettimeofday" }, /* 3164 */
{ 0, 0, printargs, "posix_getrusage" }, /* 3165 */
{ 0, 0, printargs, "posix_getrlimit" }, /* 3166 */
{ 0, 0, printargs, "posix_setrlimit" }, /* 3167 */
{ 0, 0, printargs, "posix_waitpid" }, /* 3168 */
{ 0, 0, printargs, "posix_dup2" }, /* 3169 */
{ 0, 0, NULL, NULL }, /* 3170 */
{ 0, 0, NULL, NULL }, /* 3171 */
{ 0, 0, NULL, NULL }, /* 3172 */
{ 0, 0, NULL, NULL }, /* 3173 */
{ 0, 0, NULL, NULL }, /* 3174 */
{ 0, 0, NULL, NULL }, /* 3175 */
{ 0, 0, NULL, NULL }, /* 3176 */
{ 0, 0, NULL, NULL }, /* 3177 */
{ 0, 0, NULL, NULL }, /* 3178 */
{ 0, 0, NULL, NULL }, /* 3179 */
{ 0, 0, NULL, NULL }, /* 3180 */
{ 0, 0, NULL, NULL }, /* 3181 */
{ 0, 0, NULL, NULL }, /* 3182 */
{ 0, 0, NULL, NULL }, /* 3183 */
{ 0, 0, NULL, NULL }, /* 3184 */
{ 0, 0, NULL, NULL }, /* 3185 */
{ 0, 0, NULL, NULL }, /* 3186 */
{ 0, 0, NULL, NULL }, /* 3187 */
{ 0, 0, NULL, NULL }, /* 3188 */
{ 0, 0, NULL, NULL }, /* 3189 */
{ 0, 0, NULL, NULL }, /* 3190 */
{ 0, 0, NULL, NULL }, /* 3191 */
{ 0, 0, NULL, NULL }, /* 3192 */
{ 0, 0, NULL, NULL }, /* 3193 */
{ 0, 0, NULL, NULL }, /* 3194 */
{ 0, 0, NULL, NULL }, /* 3195 */
{ 0, 0, NULL, NULL }, /* 3196 */
{ 0, 0, NULL, NULL }, /* 3197 */
{ 0, 0, NULL, NULL }, /* 3198 */
{ 0, 0, NULL, NULL }, /* 3199 */
{ 0, 0, NULL, NULL }, /* 3200 */
{ 0, 0, NULL, NULL }, /* 3201 */
{ 0, 0, NULL, NULL }, /* 3202 */
{ 0, 0, NULL, NULL }, /* 3203 */
{ 0, 0, NULL, NULL }, /* 3204 */
{ 0, 0, NULL, NULL }, /* 3205 */
{ 0, 0, NULL, NULL }, /* 3206 */
{ 0, 0, NULL, NULL }, /* 3207 */
{ 0, 0, NULL, NULL }, /* 3208 */
{ 0, 0, NULL, NULL }, /* 3209 */
{ 0, 0, NULL, NULL }, /* 3210 */
{ 0, 0, NULL, NULL }, /* 3211 */
{ 0, 0, NULL, NULL }, /* 3212 */
{ 0, 0, NULL, NULL }, /* 3213 */
{ 0, 0, NULL, NULL }, /* 3214 */
{ 0, 0, NULL, NULL }, /* 3215 */
{ 0, 0, NULL, NULL }, /* 3216 */
{ 0, 0, NULL, NULL }, /* 3217 */
{ 0, 0, NULL, NULL }, /* 3218 */
{ 0, 0, NULL, NULL }, /* 3219 */
{ 0, 0, NULL, NULL }, /* 3220 */
{ 0, 0, NULL, NULL }, /* 3221 */
{ 0, 0, NULL, NULL }, /* 3222 */
{ 0, 0, NULL, NULL }, /* 3223 */
{ 0, 0, NULL, NULL }, /* 3224 */
{ 0, 0, NULL, NULL }, /* 3225 */
{ 0, 0, NULL, NULL }, /* 3226 */
{ 0, 0, NULL, NULL }, /* 3227 */
{ 0, 0, NULL, NULL }, /* 3228 */
{ 0, 0, NULL, NULL }, /* 3229 */
{ 0, 0, NULL, NULL }, /* 3230 */
{ 0, 0, NULL, NULL }, /* 3231 */
{ 0, 0, NULL, NULL }, /* 3232 */
{ 0, 0, NULL, NULL }, /* 3233 */
{ 0, 0, NULL, NULL }, /* 3234 */
{ 0, 0, NULL, NULL }, /* 3235 */
{ 0, 0, NULL, NULL }, /* 3236 */
{ 0, 0, NULL, NULL }, /* 3237 */
{ 0, 0, NULL, NULL }, /* 3238 */
{ 0, 0, NULL, NULL }, /* 3239 */
{ 0, 0, NULL, NULL }, /* 3240 */
{ 0, 0, NULL, NULL }, /* 3241 */
{ 0, 0, NULL, NULL }, /* 3242 */
{ 0, 0, NULL, NULL }, /* 3243 */
{ 0, 0, NULL, NULL }, /* 3244 */
{ 0, 0, NULL, NULL }, /* 3245 */
{ 0, 0, NULL, NULL }, /* 3246 */
{ 0, 0, NULL, NULL }, /* 3247 */
{ 0, 0, NULL, NULL }, /* 3248 */
{ 0, 0, NULL, NULL }, /* 3249 */
{ 0, 0, NULL, NULL }, /* 3250 */
{ 0, 0, NULL, NULL }, /* 3251 */
{ 0, 0, NULL, NULL }, /* 3252 */
{ 0, 0, NULL, NULL }, /* 3253 */
{ 0, 0, NULL, NULL }, /* 3254 */
{ 0, 0, NULL, NULL }, /* 3255 */
{ 0, 0, NULL, NULL }, /* 3256 */
{ 0, 0, NULL, NULL }, /* 3257 */
{ 0, 0, NULL, NULL }, /* 3258 */
{ 0, 0, NULL, NULL }, /* 3259 */
{ 0, 0, printargs, "posix_netboot" }, /* 3260 */
{ 0, 0, printargs, "posix_netunboot" }, /* 3261 */
{ 0, 0, printargs, "posix_rdump" }, /* 3262 */
{ 0, 0, printargs, "posix_setsid" }, /* 3263 */
{ 0, 0, printargs, "posix_getmaxsig" }, /* 3264 */
{ 0, 0, printargs, "posix_sigpending" }, /* 3265 */
{ 0, 0, printargs, "posix_sigprocmask" }, /* 3266 */
{ 0, 0, printargs, "posix_sigsuspend" }, /* 3267 */
{ 0, 0, printargs, "posix_sigaction" }, /* 3268 */
[3269 ... 3999] = { }, /* 3999 */ /* end of POSIX */

636
linux/mips/syscallent-n32.h Normal file
View File

@ -0,0 +1,636 @@
#if defined LINUX_MIPSN32
/* For an N32 strace decode the N32 64-bit syscalls. */
{ 3, TD, sys_read, "read" }, /* 6000 */ /* start of Linux N32 */
{ 3, TD, sys_write, "write" }, /* 6001 */
{ 3, TD|TF, sys_open, "open" }, /* 6002 */
{ 1, TD, sys_close, "close" }, /* 6003 */
{ 2, TF, sys_stat64, "stat" }, /* 6004 */
{ 2, TD, sys_fstat64, "fstat" }, /* 6005 */
{ 2, TF, sys_lstat64, "lstat" }, /* 6006 */
{ 3, TD, sys_poll, "poll" }, /* 6007 */
{ 3, TD, sys_lseek, "lseek" }, /* 6008 */
{ 6, TD|TM|SI, sys_mmap, "mmap" }, /* 6009 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 6010 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 6011 */
{ 1, TM|SI, sys_brk, "brk" }, /* 6012 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 6013 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 6014 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 6015 */
{ 4, TD, sys_pread, "pread64" }, /* 6016 */
{ 4, TD, sys_pwrite, "pwrite64" }, /* 6017 */
{ 3, TD, sys_readv, "readv" }, /* 6018 */
{ 3, TD, sys_writev, "writev" }, /* 6019 */
{ 2, TF, sys_access, "access" }, /* 6020 */
{ 1, TD, sys_pipe, "pipe" }, /* 6021 */
{ 5, TD, sys_select, "_newselect" }, /* 6022 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 6023 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 6024 */
{ 3, TM, sys_msync, "msync" }, /* 6025 */
{ 3, TM, sys_mincore, "mincore" }, /* 6026 */
{ 3, TM, sys_madvise, "madvise" }, /* 6027 */
{ 3, TI, sys_shmget, "shmget" }, /* 6028 */
{ 3, TI|TM|SI, sys_shmat, "shmat" }, /* 6029 */
{ 3, TI, sys_shmctl, "shmctl" }, /* 6030 */
{ 1, TD, sys_dup, "dup" }, /* 6031 */
{ 2, TD, sys_dup2, "dup2" }, /* 6032 */
{ 0, TS, sys_pause, "pause" }, /* 6033 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 6034 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 6035 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 6036 */
{ 1, 0, sys_alarm, "alarm" }, /* 6037 */
{ 0, 0, sys_getpid, "getpid" }, /* 6038 */
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 6039 */
{ 3, TN, sys_socket, "socket" }, /* 6040 */
{ 3, TN, sys_connect, "connect" }, /* 6041 */
{ 3, TN, sys_accept, "accept" }, /* 6042 */
{ 6, TN, sys_sendto, "sendto" }, /* 6043 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 6044 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 6045 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 6046 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 6047 */
{ 3, TN, sys_bind, "bind" }, /* 6048 */
{ 2, TN, sys_listen, "listen" }, /* 6049 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 6050 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 6051 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 6052 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 6053 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 6054 */
{ 5, TP, sys_clone, "clone" }, /* 6055 */
{ 0, TP, sys_fork, "fork" }, /* 6056 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 6057 */
{ 1, TP|SE, sys_exit, "exit" }, /* 6058 */
{ 4, TP, sys_wait4, "wait4" }, /* 6059 */
{ 2, TS, sys_kill, "kill" }, /* 6060 */
{ 1, 0, sys_uname, "uname" }, /* 6061 */
{ 3, TI, sys_semget, "semget" }, /* 6062 */
{ 3, TI, printargs, "semop" }, /* 6063 */
{ 4, TI, sys_semctl, "semctl" }, /* 6064 */
{ 1, TI|TM|SI, sys_shmdt, "shmdt" }, /* 6065 */
{ 2, TI, sys_msgget, "msgget" }, /* 6066 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 6067 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 6068 */
{ 3, TI, sys_msgctl, "msgctl" }, /* 6069 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 6070 */
{ 2, TD, sys_flock, "flock" }, /* 6071 */
{ 1, TD, sys_fsync, "fsync" }, /* 6072 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 6073 */
{ 2, TF, sys_truncate64, "truncate" }, /* 6074 */
{ 2, TD, sys_ftruncate64, "ftruncate" }, /* 6075 */
{ 3, TD, sys_getdents, "getdents" }, /* 6076 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 6077 */
{ 1, TF, sys_chdir, "chdir" }, /* 6078 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 6079 */
{ 2, TF, sys_rename, "rename" }, /* 6080 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 6081 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 6082 */
{ 2, TD|TF, sys_creat, "creat" }, /* 6083 */
{ 2, TF, sys_link, "link" }, /* 6084 */
{ 1, TF, sys_unlink, "unlink" }, /* 6085 */
{ 2, TF, sys_symlink, "symlink" }, /* 6086 */
{ 3, TF, sys_readlink, "readlink" }, /* 6087 */
{ 2, TF, sys_chmod, "chmod" }, /* 6088 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 6089 */
{ 3, TF, sys_chown, "chown" }, /* 6090 */
{ 3, TD, sys_fchown, "fchown" }, /* 6091 */
{ 3, TF, sys_chown, "lchown" }, /* 6092 */
{ 1, 0, sys_umask, "umask" }, /* 6093 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 6094 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 6095 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 6096 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 6097 */
{ 1, 0, sys_times, "times" }, /* 6098 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 6099 */
{ 0, NF, sys_getuid, "getuid" }, /* 6100 */
{ 3, 0, sys_syslog, "syslog" }, /* 6101 */
{ 0, NF, sys_getgid, "getgid" }, /* 6102 */
{ 1, 0, sys_setuid, "setuid" }, /* 6103 */
{ 1, 0, sys_setgid, "setgid" }, /* 6104 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 6105 */
{ 0, NF, sys_getegid, "getegid" }, /* 6106 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 6107 */
{ 0, 0, sys_getppid, "getppid" }, /* 6108 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 6109 */
{ 0, 0, sys_setsid, "setsid" }, /* 6110 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 6111 */
{ 2, 0, sys_setregid, "setregid" }, /* 6112 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 6113 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 6114 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 6115 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 6116 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 6117 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 6118 */
{ 0, 0, sys_getpgid, "getpgid" }, /* 6119 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 6120 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 6121 */
{ 1, 0, sys_getsid, "getsid" }, /* 6122 */
{ 2, 0, sys_capget, "capget" }, /* 6123 */
{ 2, 0, sys_capset, "capset" }, /* 6124 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 6125 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 6126 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 6127 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 6128 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 6129 */
{ 2, TF, sys_utime, "utime" }, /* 6130 */
{ 3, TF, sys_mknod, "mknod" }, /* 6131 */
{ 1, 0, sys_personality, "personality" }, /* 6132 */
{ 2, 0, sys_ustat, "ustat" }, /* 6133 */
{ 3, TF, sys_statfs, "statfs" }, /* 6134 */
{ 3, TD, sys_fstatfs, "fstatfs" }, /* 6135 */
{ 5, 0, sys_sysfs, "sysfs" }, /* 6136 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 6137 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 6138 */
{ 2, 0, sys_sched_setparam, "sched_setparam"}, /* 6139 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 6140 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 6141 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 6142 */
{ 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 6143 */
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 6144 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 6145 */
{ 2, TM, sys_mlock, "mlock" }, /* 6146 */
{ 2, TM, sys_munlock, "munlock" }, /* 6147 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 6148 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 6149 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 6150 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 6151 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 6152 */
{ 5, 0, sys_prctl, "prctl" }, /* 6153 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 6154 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 6155 */
{ 1, TF, sys_chroot, "chroot" }, /* 6156 */
{ 0, 0, sys_sync, "sync" }, /* 6157 */
{ 1, TF, sys_acct, "acct" }, /* 6158 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 6159 */
{ 5, TF, sys_mount, "mount" }, /* 6160 */
{ 2, TF, sys_umount2, "umount2" }, /* 6161 */
{ 2, TF, sys_swapon, "swapon" }, /* 6162 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 6163 */
{ 4, 0, sys_reboot, "reboot" }, /* 6164 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 6165 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 6166 */
{ 2, 0, sys_create_module, "create_module" }, /* 6167 */
{ 4, 0, sys_init_module, "init_module" }, /* 6168 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 6169 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 6170 */
{ 5, 0, sys_query_module, "query_module" }, /* 6171 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 6172 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 6173 */
{ 5, TN, printargs, "getpmsg" }, /* 6174 */
{ 5, TN, printargs, "putpmsg" }, /* 6175 */
{ 0, 0, sys_afs_syscall, "afs_syscall" }, /* 6176 */
{ 0, 0, printargs, "reserved177" }, /* 6177 */
{ 0, 0, sys_gettid, "gettid" }, /* 6178 */
{ 3, TD, sys_readahead, "readahead" }, /* 6179 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 6180 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 6181 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 6182 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 6183 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 6184 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 6185 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 6186 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 6187 */
{ 3, TD, sys_flistxattr, "flistxattr" }, /* 6188 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 6189 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 6190 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 6191 */
{ 2, TS, sys_kill, "tkill" }, /* 6192 */
{ 1, 0, sys_time, "time" }, /* 6193 */
{ 6, 0, sys_futex, "futex" }, /* 6194 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 6195 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 6196 */
{ 3, 0, printargs, "cacheflush" }, /* 6197 */
{ 3, 0, printargs, "cachectl" }, /* 6198 */
{ 4, 0, sys_sysmips, "sysmips" }, /* 6199 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 6200 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 6201 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 6202 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 6203 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 6204 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 6205 */
{ 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 6206 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 6207 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 6208 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 6209 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 6210 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 6211 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 6212 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 6213 */
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 6214 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 6215 */
{ 4, TD, sys_fadvise64, "fadvise64" }, /* 6216 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 6217 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 6218 */
{ 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 6219 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 6220 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 6221 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 6222 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 6223 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 6224 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 6225 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 6226 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 6227 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 6228 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 6229 */
{ 2, TF, sys_utimes, "utimes" }, /* 6230 */
{ 6, TM, sys_mbind, "mbind" }, /* 6231 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 6232 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 6233 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 6234 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 6235 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 6236 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 6237 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 6238 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 6239 */
{ 5, 0, sys_vserver, "vserver" }, /* 6240 */
{ 5, TP, sys_waitid, "waitid" }, /* 6241 */
[6242] = { },
{ 5, 0, sys_add_key, "add_key" }, /* 6243 */
{ 4, 0, sys_request_key, "request_key" }, /* 6244 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 6245 */
{ 1, 0, sys_set_thread_area, "set_thread_area" }, /* 6246 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 6247 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 6248 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 6249 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 6250 */
{ 4, TD|TF, sys_openat, "openat" }, /* 6251 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 6252 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 6253 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 6254 */
{ 3, TD|TF, sys_futimesat, "futimesat" }, /* 6255 */
{ 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 6256 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 6257 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 6258 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 6259 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 6260 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 6261 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 6262 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 6263 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 6264 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 6265 */
{ 1, TP, sys_unshare, "unshare" }, /* 6266 */
{ 6, TD, sys_splice, "splice" }, /* 6267 */
{ 4, TD, sys_sync_file_range, "sync_file_range" }, /* 6268 */
{ 4, TD, sys_tee, "tee" }, /* 6269 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 6270 */
{ 6, TM, printargs, "move_pages" }, /* 6271 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 6272 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 6273 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 6274 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 6275 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 6276 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 6277 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 6278 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 6279 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 6280 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 6281 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 6282 */
{ 4, TD, sys_fallocate, "fallocate" }, /* 6283 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 6284 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 6285 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 6286 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 6287 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 6288 */
{ 1, TD, sys_epoll_create1, "epoll_create1" }, /* 6289 */
{ 3, TD, sys_dup3, "dup3" }, /* 6290 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 6291 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 6292 */
{ 4, TD, sys_preadv, "preadv" }, /* 6293 */
{ 4, TD, sys_pwritev, "pwritev" }, /* 6294 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 6295 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 6296 */
{ 4, TN, sys_accept4, "accept4" }, /* 6297 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 6298 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 6299 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 6300 */
{ 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 6301 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 6302 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 6303 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 6304 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 6305 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 6306 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 6307 */
{ 2, TD, sys_setns, "setns" }, /* 6308 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 6309 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 6310 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 6311 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 6312 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 6313 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 6314 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 6315 */
#else
{ 0, 0, printargs, "n32_read" }, /* 6000 */
{ 0, 0, printargs, "n32_write" }, /* 6001 */
{ 0, 0, printargs, "n32_open" }, /* 6002 */
{ 0, 0, printargs, "n32_close" }, /* 6003 */
{ 0, 0, printargs, "n32_stat" }, /* 6004 */
{ 0, 0, printargs, "n32_fstat" }, /* 6005 */
{ 0, 0, printargs, "n32_lstat" }, /* 6006 */
{ 0, 0, printargs, "n32_poll" }, /* 6007 */
{ 0, 0, printargs, "n32_lseek" }, /* 6008 */
{ 0, TD|TM|SI, printargs, "n32_mmap" }, /* 6009 */
{ 0, TM|SI, printargs, "n32_mprotect" }, /* 6010 */
{ 0, TM|SI, printargs, "n32_munmap" }, /* 6011 */
{ 0, TM|SI, printargs, "n32_brk" }, /* 6012 */
{ 0, 0, printargs, "n32_rt_sigaction" }, /* 6013 */
{ 0, 0, printargs, "n32_rt_sigprocmask" }, /* 6014 */
{ 0, 0, printargs, "n32_ioctl" }, /* 6015 */
{ 0, 0, printargs, "n32_pread64" }, /* 6016 */
{ 0, 0, printargs, "n32_pwrite64" }, /* 6017 */
{ 0, 0, printargs, "n32_readv" }, /* 6018 */
{ 0, 0, printargs, "n32_writev" }, /* 6019 */
{ 0, 0, printargs, "n32_access" }, /* 6020 */
{ 0, 0, printargs, "n32_pipe" }, /* 6021 */
{ 0, 0, printargs, "n32__newselect" }, /* 6022 */
{ 0, 0, printargs, "n32_sched_yield" }, /* 6023 */
{ 0, TM|SI, printargs, "n32_mremap" }, /* 6024 */
{ 0, TM, printargs, "n32_msync" }, /* 6025 */
{ 0, TM, printargs, "n32_mincore" }, /* 6026 */
{ 0, TM, printargs, "n32_madvise" }, /* 6027 */
{ 0, 0, printargs, "n32_shmget" }, /* 6028 */
{ 0, TI|TM|SI, printargs, "n32_shmat" }, /* 6029 */
{ 0, 0, printargs, "n32_shmctl" }, /* 6030 */
{ 0, 0, printargs, "n32_dup" }, /* 6031 */
{ 0, 0, printargs, "n32_dup2" }, /* 6032 */
{ 0, 0, printargs, "n32_pause" }, /* 6033 */
{ 0, 0, printargs, "n32_nanosleep" }, /* 6034 */
{ 0, 0, printargs, "n32_getitimer" }, /* 6035 */
{ 0, 0, printargs, "n32_setitimer" }, /* 6036 */
{ 0, 0, printargs, "n32_alarm" }, /* 6037 */
{ 0, 0, printargs, "n32_getpid" }, /* 6038 */
{ 0, 0, printargs, "n32_sendfile" }, /* 6039 */
{ 0, 0, printargs, "n32_socket" }, /* 6040 */
{ 0, 0, printargs, "n32_connect" }, /* 6041 */
{ 0, 0, printargs, "n32_accept" }, /* 6042 */
{ 0, 0, printargs, "n32_sendto" }, /* 6043 */
{ 0, 0, printargs, "n32_recvfrom" }, /* 6044 */
{ 0, 0, printargs, "n32_sendmsg" }, /* 6045 */
{ 0, 0, printargs, "n32_recvmsg" }, /* 6046 */
{ 0, 0, printargs, "n32_shutdown" }, /* 6047 */
{ 0, 0, printargs, "n32_bind" }, /* 6048 */
{ 0, 0, printargs, "n32_listen" }, /* 6049 */
{ 0, 0, printargs, "n32_getsockname" }, /* 6050 */
{ 0, 0, printargs, "n32_getpeername" }, /* 6051 */
{ 0, 0, printargs, "n32_socketpair" }, /* 6052 */
{ 0, 0, printargs, "n32_setsockopt" }, /* 6053 */
{ 0, 0, printargs, "n32_getsockopt" }, /* 6054 */
{ 5, TP, printargs, "n32_clone" }, /* 6055 */
{ 0, TP, printargs, "n32_fork" }, /* 6056 */
{ 3, TF|TP|SE|SI, printargs, "n32_execve" }, /* 6057 */
{ 1, TP|SE, printargs, "n32_exit" }, /* 6058 */
{ 4, TP, printargs, "n32_wait4" }, /* 6059 */
{ 0, 0, printargs, "n32_kill" }, /* 6060 */
{ 0, 0, printargs, "n32_uname" }, /* 6061 */
{ 0, 0, printargs, "n32_semget" }, /* 6062 */
{ 0, 0, printargs, "n32_semop" }, /* 6063 */
{ 0, 0, printargs, "n32_semctl" }, /* 6064 */
{ 0, TI|TM|SI, printargs, "n32_shmdt" }, /* 6065 */
{ 0, 0, printargs, "n32_msgget" }, /* 6066 */
{ 0, 0, printargs, "n32_msgsnd" }, /* 6067 */
{ 0, 0, printargs, "n32_msgrcv" }, /* 6068 */
{ 0, 0, printargs, "n32_msgctl" }, /* 6069 */
{ 0, 0, printargs, "n32_fcntl" }, /* 6070 */
{ 0, 0, printargs, "n32_flock" }, /* 6071 */
{ 0, 0, printargs, "n32_fsync" }, /* 6072 */
{ 0, 0, printargs, "n32_fdatasync" }, /* 6073 */
{ 0, 0, printargs, "n32_truncate" }, /* 6074 */
{ 0, 0, printargs, "n32_ftruncate" }, /* 6075 */
{ 0, 0, printargs, "n32_getdents" }, /* 6076 */
{ 0, 0, printargs, "n32_getcwd" }, /* 6077 */
{ 0, 0, printargs, "n32_chdir" }, /* 6078 */
{ 0, 0, printargs, "n32_fchdir" }, /* 6079 */
{ 0, 0, printargs, "n32_rename" }, /* 6080 */
{ 0, 0, printargs, "n32_mkdir" }, /* 6081 */
{ 0, 0, printargs, "n32_rmdir" }, /* 6082 */
{ 0, 0, printargs, "n32_creat" }, /* 6083 */
{ 0, 0, printargs, "n32_link" }, /* 6084 */
{ 0, 0, printargs, "n32_unlink" }, /* 6085 */
{ 0, 0, printargs, "n32_symlink" }, /* 6086 */
{ 0, 0, printargs, "n32_readlink" }, /* 6087 */
{ 0, 0, printargs, "n32_chmod" }, /* 6088 */
{ 0, 0, printargs, "n32_fchmod" }, /* 6089 */
{ 0, 0, printargs, "n32_chown" }, /* 6090 */
{ 0, 0, printargs, "n32_fchown" }, /* 6091 */
{ 0, 0, printargs, "n32_lchown" }, /* 6092 */
{ 0, 0, printargs, "n32_umask" }, /* 6093 */
{ 0, 0, printargs, "n32_gettimeofday" }, /* 6094 */
{ 0, 0, printargs, "n32_getrlimit" }, /* 6095 */
{ 0, 0, printargs, "n32_getrusage" }, /* 6096 */
{ 0, 0, printargs, "n32_sysinfo" }, /* 6097 */
{ 0, 0, printargs, "n32_times" }, /* 6098 */
{ 0, 0, printargs, "n32_ptrace" }, /* 6099 */
{ 0, 0, printargs, "n32_getuid" }, /* 6100 */
{ 0, 0, printargs, "n32_syslog" }, /* 6101 */
{ 0, 0, printargs, "n32_getgid" }, /* 6102 */
{ 0, 0, printargs, "n32_setuid" }, /* 6103 */
{ 0, 0, printargs, "n32_setgid" }, /* 6104 */
{ 0, 0, printargs, "n32_geteuid" }, /* 6105 */
{ 0, 0, printargs, "n32_getegid" }, /* 6106 */
{ 0, 0, printargs, "n32_setpgid" }, /* 6107 */
{ 0, 0, printargs, "n32_getppid" }, /* 6108 */
{ 0, 0, printargs, "n32_getpgrp" }, /* 6109 */
{ 0, 0, printargs, "n32_setsid" }, /* 6110 */
{ 0, 0, printargs, "n32_setreuid" }, /* 6111 */
{ 0, 0, printargs, "n32_setregid" }, /* 6112 */
{ 0, 0, printargs, "n32_getgroups" }, /* 6113 */
{ 0, 0, printargs, "n32_setgroups" }, /* 6114 */
{ 0, 0, printargs, "n32_setresuid" }, /* 6115 */
{ 0, 0, printargs, "n32_getresuid" }, /* 6116 */
{ 0, 0, printargs, "n32_setresgid" }, /* 6117 */
{ 0, 0, printargs, "n32_getresgid" }, /* 6118 */
{ 0, 0, printargs, "n32_getpgid" }, /* 6119 */
{ 0, 0, printargs, "n32_setfsuid" }, /* 6120 */
{ 0, 0, printargs, "n32_setfsgid" }, /* 6121 */
{ 0, 0, printargs, "n32_getsid" }, /* 6122 */
{ 0, 0, printargs, "n32_capget" }, /* 6123 */
{ 0, 0, printargs, "n32_capset" }, /* 6124 */
{ 0, 0, printargs, "n32_rt_sigpending" }, /* 6125 */
{ 0, 0, printargs, "n32_rt_sigtimedwait" }, /* 6126 */
{ 0, 0, printargs, "n32_rt_sigqueueinfo" }, /* 6127 */
{ 0, 0, printargs, "n32_rt_sigsuspend" }, /* 6128 */
{ 0, 0, printargs, "n32_sigaltstack" }, /* 6129 */
{ 0, 0, printargs, "n32_utime" }, /* 6130 */
{ 0, 0, printargs, "n32_mknod" }, /* 6131 */
{ 0, 0, printargs, "n32_personality" }, /* 6132 */
{ 0, 0, printargs, "n32_ustat" }, /* 6133 */
{ 0, 0, printargs, "n32_statfs" }, /* 6134 */
{ 0, 0, printargs, "n32_fstatfs" }, /* 6135 */
{ 0, 0, printargs, "n32_sysfs" }, /* 6136 */
{ 0, 0, printargs, "n32_getpriority" }, /* 6137 */
{ 0, 0, printargs, "n32_setpriority" }, /* 6138 */
{ 0, 0, printargs, "n32_sched_setparam" }, /* 6139 */
{ 0, 0, printargs, "n32_sched_getparam" }, /* 6140 */
{ 0, 0, printargs, "n32_sched_setscheduler"}, /* 6141 */
{ 0, 0, printargs, "n32_sched_getscheduler"}, /* 6142 */
{ 0, 0, printargs, "n32_sched_get_priority_max"}, /* 6143 */
{ 0, 0, printargs, "n32_sched_get_priority_min"}, /* 6144 */
{ 0, 0, printargs, "n32_sched_rr_get_interval"}, /* 6145 */
{ 0, TM, printargs, "n32_mlock" }, /* 6146 */
{ 0, TM, printargs, "n32_munlock" }, /* 6147 */
{ 0, TM, printargs, "n32_mlockall" }, /* 6148 */
{ 0, TM, printargs, "n32_munlockall" }, /* 6149 */
{ 0, 0, printargs, "n32_vhangup" }, /* 6150 */
{ 0, 0, printargs, "n32_pivot_root" }, /* 6151 */
{ 0, 0, printargs, "n32__sysctl" }, /* 6152 */
{ 0, 0, printargs, "n32_prctl" }, /* 6153 */
{ 0, 0, printargs, "n32_adjtimex" }, /* 6154 */
{ 0, 0, printargs, "n32_setrlimit" }, /* 6155 */
{ 0, 0, printargs, "n32_chroot" }, /* 6156 */
{ 0, 0, printargs, "n32_sync" }, /* 6157 */
{ 0, 0, printargs, "n32_acct" }, /* 6158 */
{ 0, 0, printargs, "n32_settimeofday" }, /* 6159 */
{ 0, 0, printargs, "n32_mount" }, /* 6160 */
{ 0, 0, printargs, "n32_umount2" }, /* 6161 */
{ 0, 0, printargs, "n32_swapon" }, /* 6162 */
{ 0, 0, printargs, "n32_swapoff" }, /* 6163 */
{ 0, 0, printargs, "n32_reboot" }, /* 6164 */
{ 0, 0, printargs, "n32_sethostname" }, /* 6165 */
{ 0, 0, printargs, "n32_setdomainname" }, /* 6166 */
{ 0, 0, printargs, "n32_create_module" }, /* 6167 */
{ 0, 0, printargs, "n32_init_module" }, /* 6168 */
{ 0, 0, printargs, "n32_delete_module" }, /* 6169 */
{ 0, 0, printargs, "n32_get_kernel_syms" }, /* 6170 */
{ 0, 0, printargs, "n32_query_module" }, /* 6171 */
{ 0, TF, printargs, "n32_quotactl" }, /* 6172 */
{ 0, 0, printargs, "n32_nfsservctl" }, /* 6173 */
{ 0, 0, printargs, "n32_getpmsg" }, /* 6174 */
{ 0, 0, printargs, "n32_putpmsg" }, /* 6175 */
{ 0, 0, printargs, "n32_afs_syscall" }, /* 6176 */
{ 0, 0, printargs, "n32_reserved177" }, /* 6177 */
{ 0, 0, printargs, "n32_gettid" }, /* 6178 */
{ 0, 0, printargs, "n32_readahead" }, /* 6179 */
{ 0, 0, printargs, "n32_setxattr" }, /* 6180 */
{ 0, 0, printargs, "n32_lsetxattr" }, /* 6181 */
{ 0, 0, printargs, "n32_fsetxattr" }, /* 6182 */
{ 0, 0, printargs, "n32_getxattr" }, /* 6183 */
{ 0, 0, printargs, "n32_lgetxattr" }, /* 6184 */
{ 0, 0, printargs, "n32_fgetxattr" }, /* 6185 */
{ 0, 0, printargs, "n32_listxattr" }, /* 6186 */
{ 0, 0, printargs, "n32_llistxattr" }, /* 6187 */
{ 0, 0, printargs, "n32_flistxattr" }, /* 6188 */
{ 0, 0, printargs, "n32_removexattr" }, /* 6189 */
{ 0, 0, printargs, "n32_lremovexattr" }, /* 6190 */
{ 0, 0, printargs, "n32_fremovexattr" }, /* 6191 */
{ 0, 0, printargs, "n32_tkill" }, /* 6192 */
{ 0, 0, printargs, "n32_time" }, /* 6193 */
{ 0, 0, printargs, "n32_futex" }, /* 6194 */
{ 0, 0, printargs, "n32_sched_setaffinity" }, /* 6195 */
{ 0, 0, printargs, "n32_sched_getaffinity" }, /* 6196 */
{ 0, 0, printargs, "n32_cacheflush" }, /* 6197 */
{ 0, 0, printargs, "n32_cachectl" }, /* 6198 */
{ 0, 0, printargs, "n32_sysmips" }, /* 6199 */
{ 0, 0, printargs, "n32_io_setup" }, /* 6200 */
{ 0, 0, printargs, "n32_io_destroy" }, /* 6201 */
{ 0, 0, printargs, "n32_io_getevents" }, /* 6202 */
{ 0, 0, printargs, "n32_io_submit" }, /* 6203 */
{ 0, 0, printargs, "n32_io_cancel" }, /* 6204 */
{ 1, TP|SE, printargs, "n32_exit_group" }, /* 6205 */
{ 0, 0, printargs, "n32_lookup_dcookie" }, /* 6206 */
{ 0, 0, printargs, "n32_epoll_create" }, /* 6207 */
{ 0, 0, printargs, "n32_epoll_ctl" }, /* 6208 */
{ 0, 0, printargs, "n32_epoll_wait" }, /* 6209 */
{ 0, TM|SI, printargs, "n32_remap_file_pages" }, /* 6210 */
{ 0, 0, printargs, "n32_rt_sigreturn" }, /* 6211 */
{ 0, 0, printargs, "n32_fcntl64" }, /* 6212 */
{ 0, 0, printargs, "n32_set_tid_address" }, /* 6213 */
{ 0, 0, printargs, "n32_restart_syscall" }, /* 6214 */
{ 0, 0, printargs, "n32_semtimedop" }, /* 6215 */
{ 0, 0, printargs, "n32_fadvise64" }, /* 6216 */
{ 0, 0, printargs, "n32_statfs64" }, /* 6217 */
{ 0, 0, printargs, "n32_fstatfs64" }, /* 6218 */
{ 0, 0, printargs, "n32_sendfile64" }, /* 6219 */
{ 3, 0, printargs, "n32_timer_create" }, /* 6220 */
{ 4, 0, printargs, "n32_timer_settime" }, /* 6221 */
{ 2, 0, printargs, "n32_timer_gettime" }, /* 6222 */
{ 1, 0, printargs, "n32_timer_getoverrun" }, /* 6223 */
{ 1, 0, printargs, "n32_timer_delete" }, /* 6224 */
{ 2, 0, printargs, "n32_clock_settime" }, /* 6225 */
{ 2, 0, printargs, "n32_clock_gettime" }, /* 6226 */
{ 2, 0, printargs, "n32_clock_getres" }, /* 6227 */
{ 4, 0, printargs, "n32_clock_nanosleep" }, /* 6228 */
{ 3, 0, printargs, "n32_tgkill" }, /* 6229 */
{ 2, 0, printargs, "n32_utimes" }, /* 6230 */
{ 6, TM, printargs, "n32_mbind" }, /* 6231 */
{ 5, TM, printargs, "n32_get_mempolicy" }, /* 6232 */
{ 3, TM, printargs, "n32_set_mempolicy" }, /* 6233 */
{ 4, 0, printargs, "n32_mq_open" }, /* 6234 */
{ 1, 0, printargs, "n32_mq_unlink" }, /* 6235 */
{ 5, 0, printargs, "n32_mq_timedsend" }, /* 6236 */
{ 5, 0, printargs, "n32_mq_timedreceive" }, /* 6237 */
{ 2, 0, printargs, "n32_mq_notify" }, /* 6238 */
{ 3, 0, printargs, "n32_mq_getsetattr" }, /* 6239 */
{ 5, 0, printargs, "n32_vserver" }, /* 6240 */
{ 5, TP, printargs, "n32_waitid" }, /* 6241 */
{ 0, 0, printargs, "n32_SYS_6242" }, /* 6242 */
{ 5, 0, printargs, "n32_add_key" }, /* 6243 */
{ 4, 0, printargs, "n32_request_key" }, /* 6244 */
{ 5, 0, printargs, "n32_keyctl" }, /* 6245 */
{ 1, 0, printargs, "n32_set_thread_area" }, /* 6246 */
{ 0, TD, printargs, "n32_inotify_init" }, /* 6247 */
{ 3, TD, printargs, "n32_inotify_add_watch" }, /* 6248 */
{ 2, TD, printargs, "n32_inotify_rm_watch" }, /* 6249 */
{ 4, TM, printargs, "n32_migrate_pages" }, /* 6250 */
{ 4, TD|TF, printargs, "n32_openat" }, /* 6251 */
{ 3, TD|TF, printargs, "n32_mkdirat" }, /* 6252 */
{ 4, TD|TF, printargs, "n32_mknodat" }, /* 6253 */
{ 5, TD|TF, printargs, "n32_fchownat" }, /* 6254 */
{ 3, TD|TF, printargs, "n32_futimesat" }, /* 6255 */
{ 4, TD|TF, printargs, "n32_newfstatat" }, /* 6256 */
{ 3, TD|TF, printargs, "n32_unlinkat" }, /* 6257 */
{ 4, TD|TF, printargs, "n32_renameat" }, /* 6258 */
{ 5, TD|TF, printargs, "n32_linkat" }, /* 6259 */
{ 3, TD|TF, printargs, "n32_symlinkat" }, /* 6260 */
{ 4, TD|TF, printargs, "n32_readlinkat" }, /* 6261 */
{ 3, TD|TF, printargs, "n32_fchmodat" }, /* 6262 */
{ 3, TD|TF, printargs, "n32_faccessat" }, /* 6263 */
{ 6, TD, printargs, "n32_pselect6" }, /* 6264 */
{ 5, TD, printargs, "n32_ppoll" }, /* 6265 */
{ 1, TP, printargs, "n32_unshare" }, /* 6266 */
{ 6, TD, printargs, "n32_splice" }, /* 6267 */
{ 4, TD, printargs, "n32_sync_file_range" }, /* 6268 */
{ 4, TD, printargs, "n32_tee" }, /* 6269 */
{ 4, TD, printargs, "n32_vmsplice" }, /* 6270 */
{ 6, TM, printargs, "n32_move_pages" }, /* 6271 */
{ 2, 0, printargs, "n32_set_robust_list" }, /* 6272 */
{ 3, 0, printargs, "n32_get_robust_list" }, /* 6273 */
{ 5, 0, printargs, "n32_kexec_load" }, /* 6274 */
{ 3, 0, printargs, "n32_getcpu" }, /* 6275 */
{ 5, TD, printargs, "n32_epoll_pwait" }, /* 6276 */
{ 3, 0, printargs, "n32_ioprio_set" }, /* 6277 */
{ 2, 0, printargs, "n32_ioprio_get" }, /* 6278 */
{ 4, TD|TF, printargs, "n32_utimensat" }, /* 6279 */
{ 3, TD|TS, printargs, "n32_signalfd" }, /* 6280 */
{ 4, TD, printargs, "n32_timerfd" }, /* 6281 */
{ 1, TD, printargs, "n32_eventfd" }, /* 6282 */
{ 6, TD, printargs, "n32_fallocate" }, /* 6283 */
{ 2, TD, printargs, "n32_timerfd_create" }, /* 6284 */
{ 2, TD, printargs, "n32_timerfd_gettime" }, /* 6285 */
{ 4, TD, printargs, "n32_timerfd_settime" }, /* 6286 */
{ 4, TD|TS, printargs, "n32_signalfd4" }, /* 6287 */
{ 2, TD, printargs, "n32_eventfd2" }, /* 6288 */
{ 1, TD, printargs, "n32_epoll_create1" }, /* 6289 */
{ 3, TD, printargs, "n32_dup3" }, /* 6290 */
{ 2, TD, printargs, "n32_pipe2" }, /* 6291 */
{ 1, TD, printargs, "n32_inotify_init1" }, /* 6292 */
{ 5, TD, printargs, "n32_preadv" }, /* 6293 */
{ 5, TD, printargs, "n32_pwritev" }, /* 6294 */
{ 4, TP|TS, printargs, "n32_rt_tgsigqueueinfo" }, /* 6295 */
{ 5, TD, printargs, "n32_perf_event_open" }, /* 6296 */
{ 4, TN, printargs, "n32_accept4" }, /* 6297 */
{ 5, TN, printargs, "n32_recvmmsg" }, /* 6298 */
{ 3, TD, printargs, "n32_getdents64" }, /* 6299 */
{ 2, 0, printargs, "n32_fanotify_init" }, /* 6300 */
{ 5, 0, printargs, "n32_fanotify_mark" }, /* 6301 */
{ 4, 0, printargs, "n32_prlimit64" }, /* 6302 */
{ 5, TD|TF, printargs, "n32_name_to_handle_at" }, /* 6303 */
{ 3, TD, printargs, "n32_open_by_handle_at" }, /* 6304 */
{ 2, 0, printargs, "n32_clock_adjtime" }, /* 6305 */
{ 1, TD, printargs, "n32_syncfs" }, /* 6306 */
{ 4, TN, printargs, "n32_sendmmsg" }, /* 6307 */
{ 2, TD, printargs, "n32_setns" }, /* 6308 */
{ 6, 0, printargs, "n32_process_vm_readv" }, /* 6309 */
{ 6, 0, printargs, "n32_process_vm_writev" }, /* 6310 */
{ 5, 0, printargs, "n32_kcmp" }, /* 6311 */
{ 3, TD, printargs, "n32_finit_module" }, /* 6312 */
{ 3, 0, printargs, "n32_sched_setattr" }, /* 6313 */
{ 4, 0, printargs, "n32_sched_getattr" }, /* 6314 */
{ 5, TD|TF, printargs, "n32_renameat2" }, /* 6315 */
#endif

629
linux/mips/syscallent-n64.h Normal file
View File

@ -0,0 +1,629 @@
#if defined LINUX_MIPSN64
/* For an N64 strace decode the N64 64-bit syscalls. */
{ 3, TD, sys_read, "read" }, /* 5000 */ /* start of Linux N64 */
{ 3, TD, sys_write, "write" }, /* 5001 */
{ 3, TD|TF, sys_open, "open" }, /* 5002 */
{ 1, TD, sys_close, "close" }, /* 5003 */
{ 2, TF, sys_stat, "stat" }, /* 5004 */
{ 2, TD, sys_fstat, "fstat" }, /* 5005 */
{ 2, TF, sys_lstat, "lstat" }, /* 5006 */
{ 3, TD, sys_poll, "poll" }, /* 5007 */
{ 3, TD, sys_lseek, "lseek" }, /* 5008 */
{ 6, TD|TM|SI, sys_mmap, "mmap" }, /* 5009 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 5010 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 5011 */
{ 1, TM|SI, sys_brk, "brk" }, /* 5012 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 5013 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 5014 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 5015 */
{ 4, TD, sys_pread, "pread64" }, /* 5016 */
{ 4, TD, sys_pwrite, "pwrite64" }, /* 5017 */
{ 3, TD, sys_readv, "readv" }, /* 5018 */
{ 3, TD, sys_writev, "writev" }, /* 5019 */
{ 2, TF, sys_access, "access" }, /* 5020 */
{ 1, TD, sys_pipe, "pipe" }, /* 5021 */
{ 5, TD, sys_select, "_newselect" }, /* 5022 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 5023 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 5024 */
{ 3, TM, sys_msync, "msync" }, /* 5025 */
{ 3, TM, sys_mincore, "mincore" }, /* 5026 */
{ 3, TM, sys_madvise, "madvise" }, /* 5027 */
{ 3, TI, sys_shmget, "shmget" }, /* 5028 */
{ 3, TI|TM|SI, sys_shmat, "shmat" }, /* 5029 */
{ 3, TI, sys_shmctl, "shmctl" }, /* 5030 */
{ 1, TD, sys_dup, "dup" }, /* 5031 */
{ 2, TD, sys_dup2, "dup2" }, /* 5032 */
{ 0, TS, sys_pause, "pause" }, /* 5033 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 5034 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 5035 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 5036 */
{ 1, 0, sys_alarm, "alarm" }, /* 5037 */
{ 0, 0, sys_getpid, "getpid" }, /* 5038 */
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 5039 */
{ 3, TN, sys_socket, "socket" }, /* 5040 */
{ 3, TN, sys_connect, "connect" }, /* 5041 */
{ 3, TN, sys_accept, "accept" }, /* 5042 */
{ 6, TN, sys_sendto, "sendto" }, /* 5043 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 5044 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 5045 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 5046 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 5047 */
{ 3, TN, sys_bind, "bind" }, /* 5048 */
{ 2, TN, sys_listen, "listen" }, /* 5049 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 5050 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 5051 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 5052 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 5053 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 5054 */
{ 5, TP, sys_clone, "clone" }, /* 5055 */
{ 0, TP, sys_fork, "fork" }, /* 5056 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 5057 */
{ 1, TP|SE, sys_exit, "exit" }, /* 5058 */
{ 4, TP, sys_wait4, "wait4" }, /* 5059 */
{ 2, TS, sys_kill, "kill" }, /* 5060 */
{ 1, 0, sys_uname, "uname" }, /* 5061 */
{ 3, TI, sys_semget, "semget" }, /* 5062 */
{ 3, TI, printargs, "semop" }, /* 5063 */
{ 4, TI, sys_semctl, "semctl" }, /* 5064 */
{ 1, TI|TM|SI, sys_shmdt, "shmdt" }, /* 5065 */
{ 2, TI, sys_msgget, "msgget" }, /* 5066 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 5067 */
{ 5, TI, sys_msgrcv, "msgrcv" }, /* 5068 */
{ 3, TI, sys_msgctl, "msgctl" }, /* 5069 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 5070 */
{ 2, TD, sys_flock, "flock" }, /* 5071 */
{ 1, TD, sys_fsync, "fsync" }, /* 5072 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 5073 */
{ 2, TF, sys_truncate, "truncate" }, /* 5074 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 5075 */
{ 3, TD, sys_getdents, "getdents" }, /* 5076 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 5077 */
{ 1, TF, sys_chdir, "chdir" }, /* 5078 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 5079 */
{ 2, TF, sys_rename, "rename" }, /* 5080 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 5081 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 5082 */
{ 2, TD|TF, sys_creat, "creat" }, /* 5083 */
{ 2, TF, sys_link, "link" }, /* 5084 */
{ 1, TF, sys_unlink, "unlink" }, /* 5085 */
{ 2, TF, sys_symlink, "symlink" }, /* 5086 */
{ 3, TF, sys_readlink, "readlink" }, /* 5087 */
{ 2, TF, sys_chmod, "chmod" }, /* 5088 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 5089 */
{ 3, TF, sys_chown, "chown" }, /* 5090 */
{ 3, TD, sys_fchown, "fchown" }, /* 5091 */
{ 3, TF, sys_chown, "lchown" }, /* 5092 */
{ 1, 0, sys_umask, "umask" }, /* 5093 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 5094 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 5095 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 5096 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 5097 */
{ 1, 0, sys_times, "times" }, /* 5098 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 5099 */
{ 0, NF, sys_getuid, "getuid" }, /* 5100 */
{ 3, 0, sys_syslog, "syslog" }, /* 5101 */
{ 0, NF, sys_getgid, "getgid" }, /* 5102 */
{ 1, 0, sys_setuid, "setuid" }, /* 5103 */
{ 1, 0, sys_setgid, "setgid" }, /* 5104 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 5105 */
{ 0, NF, sys_getegid, "getegid" }, /* 5106 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 5107 */
{ 0, 0, sys_getppid, "getppid" }, /* 5108 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 5109 */
{ 0, 0, sys_setsid, "setsid" }, /* 5110 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 5111 */
{ 2, 0, sys_setregid, "setregid" }, /* 5112 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 5113 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 5114 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 5115 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 5116 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 5117 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 5118 */
{ 0, 0, sys_getpgid, "getpgid" }, /* 5119 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 5120 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 5121 */
{ 1, 0, sys_getsid, "getsid" }, /* 5122 */
{ 2, 0, sys_capget, "capget" }, /* 5123 */
{ 2, 0, sys_capset, "capset" }, /* 5124 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 5125 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 5126 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 5127 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 5128 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 5129 */
{ 2, TF, sys_utime, "utime" }, /* 5130 */
{ 3, TF, sys_mknod, "mknod" }, /* 5131 */
{ 1, 0, sys_personality, "personality" }, /* 5132 */
{ 2, 0, sys_ustat, "ustat" }, /* 5133 */
{ 3, TF, sys_statfs, "statfs" }, /* 5134 */
{ 3, TD, sys_fstatfs, "fstatfs" }, /* 5135 */
{ 5, 0, sys_sysfs, "sysfs" }, /* 5136 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 5137 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 5138 */
{ 2, 0, sys_sched_setparam, "sched_setparam"}, /* 5139 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 5140 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 5141 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 5142 */
{ 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 5143 */
{ 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 5144 */
{ 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 5145 */
{ 2, TM, sys_mlock, "mlock" }, /* 5146 */
{ 2, TM, sys_munlock, "munlock" }, /* 5147 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 5148 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 5149 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 5150 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 5151 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 5152 */
{ 5, 0, sys_prctl, "prctl" }, /* 5153 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 5154 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 5155 */
{ 1, TF, sys_chroot, "chroot" }, /* 5156 */
{ 0, 0, sys_sync, "sync" }, /* 5157 */
{ 1, TF, sys_acct, "acct" }, /* 5158 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 5159 */
{ 5, TF, sys_mount, "mount" }, /* 5160 */
{ 2, TF, sys_umount2, "umount2" }, /* 5161 */
{ 2, TF, sys_swapon, "swapon" }, /* 5162 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 5163 */
{ 4, 0, sys_reboot, "reboot" }, /* 5164 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 5165 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 5166 */
{ 2, 0, sys_create_module, "create_module" }, /* 5167 */
{ 4, 0, sys_init_module, "init_module" }, /* 5168 */
{ 1, 0, sys_delete_module, "delete_module" }, /* 5169 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 5170 */
{ 5, 0, sys_query_module, "query_module" }, /* 5171 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 5172 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 5173 */
{ 5, TN, printargs, "getpmsg" }, /* 5174 */
{ 5, TN, printargs, "putpmsg" }, /* 5175 */
{ 0, 0, sys_afs_syscall, "afs_syscall" }, /* 5176 */
{ 0, 0, printargs, "reserved177" }, /* 5177 */
{ 0, 0, sys_gettid, "gettid" }, /* 5178 */
{ 3, TD, sys_readahead, "readahead" }, /* 5179 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 5180 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 5181 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 5182 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 5183 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 5184 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 5185 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 5186 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 5187 */
{ 3, TD, sys_flistxattr, "flistxattr" }, /* 5188 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 5189 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 5190 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 5191 */
{ 2, TS, sys_kill, "tkill" }, /* 5192 */
{ 1, 0, sys_time, "time" }, /* 5193 */
{ 6, 0, sys_futex, "futex" }, /* 5194 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 5195 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 5196 */
{ 3, 0, printargs, "cacheflush" }, /* 5197 */
{ 3, 0, printargs, "cachectl" }, /* 5198 */
{ 4, 0, sys_sysmips, "sysmips" }, /* 5199 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 5200 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 5201 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 5202 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 5203 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 5204 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 5205 */
{ 3, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 5206 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 5207 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 5208 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 5209 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 5210 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 5211 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 5212 */
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 5213 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 5214 */
{ 4, TD, sys_fadvise64_64, "fadvise64_64" }, /* 5215 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 5216 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 5217 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 5218 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 5219 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 5220 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 5221 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 5222 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 5223 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 5224 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 5225 */
{ 2, TF, sys_utimes, "utimes" }, /* 5226 */
{ 6, TM, sys_mbind, "mbind" }, /* 5227 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 5228 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 5229 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 5230 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 5231 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 5232 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 5233 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 5234 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 5235 */
{ 5, 0, sys_vserver, "vserver" }, /* 5236 */
{ 5, TP, sys_waitid, "waitid" }, /* 5237 */
[5238] = { },
{ 5, 0, sys_add_key, "add_key" }, /* 5239 */
{ 4, 0, sys_request_key, "request_key" }, /* 5230 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 5241 */
{ 1, 0, sys_set_thread_area, "set_thread_area" }, /* 5242 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 5243 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 5244 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 5245 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 5246 */
{ 4, TD|TF, sys_openat, "openat" }, /* 5247 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 5248 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 5249 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 5250 */
{ 3, TD|TF, sys_futimesat, "futimesat" }, /* 5251 */
{ 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 5252 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 5253 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 5254 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 5255 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 5256 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 5257 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 5258 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 5259 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 5260 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 5261 */
{ 1, TP, sys_unshare, "unshare" }, /* 5262 */
{ 6, TD, sys_splice, "splice" }, /* 5263 */
{ 4, TD, sys_sync_file_range, "sync_file_range" }, /* 5264 */
{ 4, TD, sys_tee, "tee" }, /* 5265 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 5266 */
{ 6, TM, printargs, "move_pages" }, /* 5267 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 5268 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 5269 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 5270 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 5271 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 5272 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 5273 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 5274 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 5275 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 5276 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 5277 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 5278 */
{ 4, TD, sys_fallocate, "fallocate" }, /* 5279 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 5280 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 5281 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 5282 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 5283 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 5284 */
{ 1, TD, sys_epoll_create1, "epoll_create1" }, /* 5285 */
{ 3, TD, sys_dup3, "dup3" }, /* 5286 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 5287 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 5288 */
{ 4, TD, sys_preadv, "preadv" }, /* 5289 */
{ 4, TD, sys_pwritev, "pwritev" }, /* 5290 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 5291 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 5292 */
{ 4, TN, sys_accept4, "accept4" }, /* 5293 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 5294 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 5295 */
{ 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 5296 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 5297 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 5298 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 5299 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 5300 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 5301 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 5302 */
{ 2, TD, sys_setns, "setns" }, /* 5303 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 5304 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 5305 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 5306 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 5307 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 5308 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 5309 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 5310 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 5311 */
#else
{ 0, 0, printargs, "n64_read" }, /* 5000 */
{ 0, 0, printargs, "n64_write" }, /* 5001 */
{ 0, 0, printargs, "n64_open" }, /* 5002 */
{ 0, 0, printargs, "n64_close" }, /* 5003 */
{ 0, 0, printargs, "n64_stat" }, /* 5004 */
{ 0, 0, printargs, "n64_fstat" }, /* 5005 */
{ 0, 0, printargs, "n64_lstat" }, /* 5006 */
{ 0, 0, printargs, "n64_poll" }, /* 5007 */
{ 0, 0, printargs, "n64_lseek" }, /* 5008 */
{ 0, TD|TM|SI, printargs, "n64_mmap" }, /* 5009 */
{ 0, TM|SI, printargs, "n64_mprotect" }, /* 5010 */
{ 0, TM|SI, printargs, "n64_munmap" }, /* 5011 */
{ 0, TM|SI, printargs, "n64_brk" }, /* 5012 */
{ 0, 0, printargs, "n64_rt_sigaction" }, /* 5013 */
{ 0, 0, printargs, "n64_rt_sigprocmask" }, /* 5014 */
{ 0, 0, printargs, "n64_ioctl" }, /* 5015 */
{ 0, 0, printargs, "n64_pread" }, /* 5016 */
{ 0, 0, printargs, "n64_pwrite" }, /* 5017 */
{ 0, 0, printargs, "n64_readv" }, /* 5018 */
{ 0, 0, printargs, "n64_writev" }, /* 5019 */
{ 0, 0, printargs, "n64_access" }, /* 5020 */
{ 0, 0, printargs, "n64_pipe" }, /* 5021 */
{ 0, 0, printargs, "n64__newselect" }, /* 5022 */
{ 0, 0, printargs, "n64_sched_yield" }, /* 5023 */
{ 0, TM|SI, printargs, "n64_mremap" }, /* 5024 */
{ 0, TM, printargs, "n64_msync" }, /* 5025 */
{ 0, TM, printargs, "n64_mincore" }, /* 5026 */
{ 0, TM, printargs, "n64_madvise" }, /* 5027 */
{ 0, 0, printargs, "n64_shmget" }, /* 5028 */
{ 0, TI|TM|SI, printargs, "n64_shmat" }, /* 5029 */
{ 0, 0, printargs, "n64_shmctl" }, /* 5030 */
{ 0, 0, printargs, "n64_dup" }, /* 5031 */
{ 0, 0, printargs, "n64_dup2" }, /* 5032 */
{ 0, 0, printargs, "n64_pause" }, /* 5033 */
{ 0, 0, printargs, "n64_nanosleep" }, /* 5034 */
{ 0, 0, printargs, "n64_getitimer" }, /* 5035 */
{ 0, 0, printargs, "n64_setitimer" }, /* 5036 */
{ 0, 0, printargs, "n64_alarm" }, /* 5037 */
{ 0, 0, printargs, "n64_getpid" }, /* 5038 */
{ 0, 0, printargs, "n64_sendfile" }, /* 5039 */
{ 0, 0, printargs, "n64_socketcall" }, /* 5040 */
{ 0, 0, printargs, "n64_connect" }, /* 5041 */
{ 0, 0, printargs, "n64_accept" }, /* 5042 */
{ 0, 0, printargs, "n64_sendto" }, /* 5043 */
{ 0, 0, printargs, "n64_recvfrom" }, /* 5044 */
{ 0, 0, printargs, "n64_sendmsg" }, /* 5045 */
{ 0, 0, printargs, "n64_recvmsg" }, /* 5046 */
{ 0, 0, printargs, "n64_shutdown" }, /* 5047 */
{ 0, 0, printargs, "n64_bind" }, /* 5048 */
{ 0, 0, printargs, "n64_listen" }, /* 5049 */
{ 0, 0, printargs, "n64_getsockname" }, /* 5050 */
{ 0, 0, printargs, "n64_getpeername" }, /* 5051 */
{ 0, 0, printargs, "n64_socketpair" }, /* 5052 */
{ 0, 0, printargs, "n64_setsockopt" }, /* 5053 */
{ 0, 0, printargs, "n64_getsockopt" }, /* 5054 */
{ 5, TP, printargs, "n64_clone" }, /* 5055 */
{ 0, TP, printargs, "n64_fork" }, /* 5056 */
{ 3, TF|TP|SE|SI, printargs, "n64_execve" }, /* 5057 */
{ 1, TP|SE, printargs, "n64_exit" }, /* 5058 */
{ 4, TP, printargs, "n64_wait4" }, /* 5059 */
{ 0, 0, printargs, "n64_kill" }, /* 5060 */
{ 0, 0, printargs, "n64_uname" }, /* 5061 */
{ 0, 0, printargs, "n64_semget" }, /* 5062 */
{ 0, 0, printargs, "n64_semop" }, /* 5063 */
{ 0, 0, printargs, "n64_semctl" }, /* 5064 */
{ 0, TI|TM|SI, printargs, "n64_shmdt" }, /* 5065 */
{ 0, 0, printargs, "n64_msgget" }, /* 5066 */
{ 0, 0, printargs, "n64_msgsnd" }, /* 5067 */
{ 0, 0, printargs, "n64_msgrcv" }, /* 5068 */
{ 0, 0, printargs, "n64_msgctl" }, /* 5069 */
{ 0, 0, printargs, "n64_fcntl" }, /* 5070 */
{ 0, 0, printargs, "n64_flock" }, /* 5071 */
{ 0, 0, printargs, "n64_fsync" }, /* 5072 */
{ 0, 0, printargs, "n64_fdatasync" }, /* 5073 */
{ 0, 0, printargs, "n64_truncate" }, /* 5074 */
{ 0, 0, printargs, "n64_ftruncate" }, /* 5075 */
{ 0, 0, printargs, "n64_getdents" }, /* 5076 */
{ 0, 0, printargs, "n64_getcwd" }, /* 5077 */
{ 0, 0, printargs, "n64_chdir" }, /* 5078 */
{ 0, 0, printargs, "n64_fchdir" }, /* 5079 */
{ 0, 0, printargs, "n64_rename" }, /* 5080 */
{ 0, 0, printargs, "n64_mkdir" }, /* 5081 */
{ 0, 0, printargs, "n64_rmdir" }, /* 5082 */
{ 0, 0, printargs, "n64_creat" }, /* 5083 */
{ 0, 0, printargs, "n64_link" }, /* 5084 */
{ 0, 0, printargs, "n64_unlink" }, /* 5085 */
{ 0, 0, printargs, "n64_symlink" }, /* 5086 */
{ 0, 0, printargs, "n64_readlink" }, /* 5087 */
{ 0, 0, printargs, "n64_chmod" }, /* 5088 */
{ 0, 0, printargs, "n64_fchmod" }, /* 5089 */
{ 0, 0, printargs, "n64_chown" }, /* 5090 */
{ 0, 0, printargs, "n64_fchown" }, /* 5091 */
{ 0, 0, printargs, "n64_lchown" }, /* 5092 */
{ 0, 0, printargs, "n64_umask" }, /* 5093 */
{ 0, 0, printargs, "n64_gettimeofday" }, /* 5094 */
{ 0, 0, printargs, "n64_getrlimit" }, /* 5095 */
{ 0, 0, printargs, "n64_getrusage" }, /* 5096 */
{ 0, 0, printargs, "n64_sysinfo" }, /* 5097 */
{ 0, 0, printargs, "n64_times" }, /* 5098 */
{ 0, 0, printargs, "n64_ptrace" }, /* 5099 */
{ 0, 0, printargs, "n64_getuid" }, /* 5100 */
{ 0, 0, printargs, "n64_syslog" }, /* 5101 */
{ 0, 0, printargs, "n64_getgid" }, /* 5102 */
{ 0, 0, printargs, "n64_setuid" }, /* 5103 */
{ 0, 0, printargs, "n64_setgid" }, /* 5104 */
{ 0, 0, printargs, "n64_geteuid" }, /* 5105 */
{ 0, 0, printargs, "n64_getegid" }, /* 5106 */
{ 0, 0, printargs, "n64_setpgid" }, /* 5107 */
{ 0, 0, printargs, "n64_getppid" }, /* 5108 */
{ 0, 0, printargs, "n64_getpgrp" }, /* 5109 */
{ 0, 0, printargs, "n64_setsid" }, /* 5110 */
{ 0, 0, printargs, "n64_setreuid" }, /* 5111 */
{ 0, 0, printargs, "n64_setregid" }, /* 5112 */
{ 0, 0, printargs, "n64_getgroups" }, /* 5113 */
{ 0, 0, printargs, "n64_setgroups" }, /* 5114 */
{ 0, 0, printargs, "n64_setresuid" }, /* 5115 */
{ 0, 0, printargs, "n64_getresuid" }, /* 5116 */
{ 0, 0, printargs, "n64_setresgid" }, /* 5117 */
{ 0, 0, printargs, "n64_getresgid" }, /* 5118 */
{ 0, 0, printargs, "n64_getpgid" }, /* 5119 */
{ 0, 0, printargs, "n64_setfsuid" }, /* 5120 */
{ 0, 0, printargs, "n64_setfsgid" }, /* 5121 */
{ 0, 0, printargs, "n64_getsid" }, /* 5122 */
{ 0, 0, printargs, "n64_capget" }, /* 5123 */
{ 0, 0, printargs, "n64_capset" }, /* 5124 */
{ 0, 0, printargs, "n64_rt_sigpending" }, /* 5125 */
{ 0, 0, printargs, "n64_rt_sigtimedwait" }, /* 5126 */
{ 0, 0, printargs, "n64_rt_sigqueueinfo" }, /* 5127 */
{ 0, 0, printargs, "n64_rt_sigsuspend" }, /* 5128 */
{ 0, 0, printargs, "n64_sigaltstack" }, /* 5129 */
{ 0, 0, printargs, "n64_utime" }, /* 5130 */
{ 0, 0, printargs, "n64_mknod" }, /* 5131 */
{ 0, 0, printargs, "n64_personality" }, /* 5132 */
{ 0, 0, printargs, "n64_ustat" }, /* 5133 */
{ 0, 0, printargs, "n64_statfs" }, /* 5134 */
{ 0, 0, printargs, "n64_fstatfs" }, /* 5135 */
{ 0, 0, printargs, "n64_sysfs" }, /* 5136 */
{ 0, 0, printargs, "n64_getpriority" }, /* 5137 */
{ 0, 0, printargs, "n64_setpriority" }, /* 5138 */
{ 0, 0, printargs, "n64_sched_setparam" }, /* 5139 */
{ 0, 0, printargs, "n64_sched_getparam" }, /* 5140 */
{ 0, 0, printargs, "n64_sched_setscheduler"}, /* 5141 */
{ 0, 0, printargs, "n64_sched_getscheduler"}, /* 5142 */
{ 0, 0, printargs, "n64_sched_get_priority_max"}, /* 5143 */
{ 0, 0, printargs, "n64_sched_get_priority_min"}, /* 5144 */
{ 0, 0, printargs, "n64_sched_rr_get_interval"}, /* 5145 */
{ 0, TM, printargs, "n64_mlock" }, /* 5146 */
{ 0, TM, printargs, "n64_munlock" }, /* 5147 */
{ 0, TM, printargs, "n64_mlockall" }, /* 5148 */
{ 0, TM, printargs, "n64_munlockall" }, /* 5149 */
{ 0, 0, printargs, "n64_vhangup" }, /* 5150 */
{ 0, 0, printargs, "n64_pivot_root" }, /* 5151 */
{ 0, 0, printargs, "n64__sysctl" }, /* 5152 */
{ 0, 0, printargs, "n64_prctl" }, /* 5153 */
{ 0, 0, printargs, "n64_adjtimex" }, /* 5154 */
{ 0, 0, printargs, "n64_setrlimit" }, /* 5155 */
{ 0, 0, printargs, "n64_chroot" }, /* 5156 */
{ 0, 0, printargs, "n64_sync" }, /* 5157 */
{ 0, 0, printargs, "n64_acct" }, /* 5158 */
{ 0, 0, printargs, "n64_settimeofday" }, /* 5159 */
{ 0, 0, printargs, "n64_mount" }, /* 5160 */
{ 0, 0, printargs, "n64_umount" }, /* 5161 */
{ 0, 0, printargs, "n64_swapon" }, /* 5162 */
{ 0, 0, printargs, "n64_swapoff" }, /* 5163 */
{ 0, 0, printargs, "n64_reboot" }, /* 5164 */
{ 0, 0, printargs, "n64_sethostname" }, /* 5165 */
{ 0, 0, printargs, "n64_setdomainname" }, /* 5166 */
{ 0, 0, printargs, "n64_create_module" }, /* 5167 */
{ 0, 0, printargs, "n64_init_module" }, /* 5168 */
{ 0, 0, printargs, "n64_delete_module" }, /* 5169 */
{ 0, 0, printargs, "n64_get_kernel_syms" }, /* 5170 */
{ 0, 0, printargs, "n64_query_module" }, /* 5171 */
{ 0, TF, printargs, "n64_quotactl" }, /* 5172 */
{ 0, 0, printargs, "n64_nfsservctl" }, /* 5173 */
{ 0, 0, printargs, "n64_getpmsg" }, /* 5174 */
{ 0, 0, printargs, "n64_putpmsg" }, /* 5175 */
{ 0, 0, printargs, "n64_afs_syscall" }, /* 5176 */
{ 0, 0, printargs, "n64_reserved177" }, /* 5177 */
{ 0, 0, printargs, "n64_gettid" }, /* 5178 */
{ 0, 0, printargs, "n64_readahead" }, /* 5179 */
{ 0, 0, printargs, "n64_setxattr" }, /* 5180 */
{ 0, 0, printargs, "n64_lsetxattr" }, /* 5181 */
{ 0, 0, printargs, "n64_fsetxattr" }, /* 5182 */
{ 0, 0, printargs, "n64_getxattr" }, /* 5183 */
{ 0, 0, printargs, "n64_lgetxattr" }, /* 5184 */
{ 0, 0, printargs, "n64_fgetxattr" }, /* 5185 */
{ 0, 0, printargs, "n64_listxattr" }, /* 5186 */
{ 0, 0, printargs, "n64_llistxattr" }, /* 5187 */
{ 0, 0, printargs, "n64_flistxattr" }, /* 5188 */
{ 0, 0, printargs, "n64_removexattr" }, /* 5189 */
{ 0, 0, printargs, "n64_lremovexattr" }, /* 5190 */
{ 0, 0, printargs, "n64_fremovexattr" }, /* 5191 */
{ 0, 0, printargs, "n64_tkill" }, /* 5192 */
{ 0, 0, printargs, "n64_time" }, /* 5193 */
{ 0, 0, printargs, "n64_futex" }, /* 5194 */
{ 0, 0, printargs, "n64_sched_setaffinity" }, /* 5195 */
{ 0, 0, printargs, "n64_sched_getaffinity" }, /* 5196 */
{ 0, 0, printargs, "n64_cacheflush" }, /* 5197 */
{ 0, 0, printargs, "n64_cachectl" }, /* 5198 */
{ 0, 0, printargs, "n64_sysmips" }, /* 5199 */
{ 0, 0, printargs, "n64_io_setup" }, /* 5200 */
{ 0, 0, printargs, "n64_io_destroy" }, /* 5201 */
{ 0, 0, printargs, "n64_io_getevents" }, /* 5202 */
{ 0, 0, printargs, "n64_io_submit" }, /* 5203 */
{ 0, 0, printargs, "n64_io_cancel" }, /* 5204 */
{ 1, TP|SE, printargs, "n64_exit_group" }, /* 5205 */
{ 0, 0, printargs, "n64_lookup_dcookie" }, /* 5206 */
{ 0, 0, printargs, "n64_epoll_create" }, /* 5207 */
{ 0, 0, printargs, "n64_epoll_ctl" }, /* 5208 */
{ 0, 0, printargs, "n64_epoll_wait" }, /* 5209 */
{ 0, TM|SI, printargs, "n64_remap_file_pages" }, /* 5210 */
{ 0, 0, printargs, "n64_rt_sigreturn" }, /* 5211 */
{ 1, 0, printargs, "n64_set_tid_address" }, /* 5212 */
{ 0, 0, printargs, "n64_restart_syscall" }, /* 5213 */
{ 5, TI, printargs, "n64_semtimedop" }, /* 5214 */
{ 0, 0, printargs, "n64_fadvise64_64" }, /* 5215 */
{ 0, 0, printargs, "n64_timer_create" }, /* 5216 */
{ 0, 0, printargs, "n64_timer_settime" }, /* 5217 */
{ 0, 0, printargs, "n64_timer_gettime" }, /* 5218 */
{ 0, 0, printargs, "n64_timer_getoverrun" }, /* 5219 */
{ 0, 0, printargs, "n64_timer_delete" }, /* 5220 */
{ 0, 0, printargs, "n64_clock_settime" }, /* 5221 */
{ 0, 0, printargs, "n64_clock_gettime" }, /* 5222 */
{ 0, 0, printargs, "n64_clock_getres" }, /* 5223 */
{ 0, 0, printargs, "n64_clock_nanosleep" }, /* 5224 */
{ 0, 0, printargs, "n64_tgkill" }, /* 5225 */
{ 0, 0, printargs, "n64_utimes" }, /* 5226 */
{ 6, TM, printargs, "n64_mbind" }, /* 5227 */
{ 5, TM, printargs, "n64_get_mempolicy" }, /* 5228 */
{ 3, TM, printargs, "n64_set_mempolicy" }, /* 5229 */
{ 0, 0, printargs, "n64_mq_open" }, /* 5230 */
{ 0, 0, printargs, "n64_mq_unlink" }, /* 5231 */
{ 0, 0, printargs, "n64_mq_timedsend" }, /* 5232 */
{ 0, 0, printargs, "n64_mq_timedreceive" }, /* 5233 */
{ 0, 0, printargs, "n64_mq_notify" }, /* 5234 */
{ 0, 0, printargs, "n64_mq_getsetattr" }, /* 5235 */
{ 5, 0, printargs, "n64_vserver" }, /* 5236 */
{ 5, TP, printargs, "n64_waitid" }, /* 5237 */
{ 0, 0, printargs, "n64_SYS_5238" }, /* 5238 */
{ 0, 0, printargs, "n64_add_key" }, /* 5239 */
{ 0, 0, printargs, "n64_request_key" }, /* 5230 */
{ 0, 0, printargs, "n64_keyctl" }, /* 5241 */
{ 0, 0, printargs, "n64_set_thread_area" }, /* 5242 */
{ 0, 0, printargs, "n64_inotify_init" }, /* 5243 */
{ 0, 0, printargs, "n64_inotify_add_watch" }, /* 5244 */
{ 0, 0, printargs, "n64_inotify_rm_watch" }, /* 5245 */
{ 0, TM, printargs, "n64_migrate_pages" }, /* 5246 */
{ 0, 0, printargs, "n64_openat" }, /* 5247 */
{ 0, 0, printargs, "n64_mkdirat" }, /* 5248 */
{ 0, 0, printargs, "n64_mknodat" }, /* 5249 */
{ 0, 0, printargs, "n64_fchownat" }, /* 5250 */
{ 0, 0, printargs, "n64_futimesat" }, /* 5251 */
{ 0, 0, printargs, "n64_newfstatat" }, /* 5252 */
{ 0, 0, printargs, "n64_unlinkat" }, /* 5253 */
{ 0, 0, printargs, "n64_renameat" }, /* 5254 */
{ 0, 0, printargs, "n64_linkat" }, /* 5255 */
{ 0, 0, printargs, "n64_symlinkat" }, /* 5256 */
{ 0, 0, printargs, "n64_readlinkat" }, /* 5257 */
{ 0, 0, printargs, "n64_fchmodat" }, /* 5258 */
{ 0, 0, printargs, "n64_faccessat" }, /* 5259 */
{ 0, 0, printargs, "n64_pselect6" }, /* 5260 */
{ 0, 0, printargs, "n64_ppoll" }, /* 5261 */
{ 1, TP, printargs, "n64_unshare" }, /* 5262 */
{ 0, 0, printargs, "n64_splice" }, /* 5263 */
{ 0, 0, printargs, "n64_sync_file_range" }, /* 5264 */
{ 0, 0, printargs, "n64_tee" }, /* 5265 */
{ 0, 0, printargs, "n64_vmsplice" }, /* 5266 */
{ 0, TM, printargs, "n64_move_pages" }, /* 5267 */
{ 0, 0, printargs, "n64_set_robust_list" }, /* 5268 */
{ 0, 0, printargs, "n64_get_robust_list" }, /* 5269 */
{ 0, 0, printargs, "n64_kexec_load" }, /* 5270 */
{ 0, 0, printargs, "n64_getcpu" }, /* 5271 */
{ 0, 0, printargs, "n64_epoll_pwait" }, /* 5272 */
{ 0, 0, printargs, "n64_ioprio_set" }, /* 5273 */
{ 0, 0, printargs, "n64_ioprio_get" }, /* 5274 */
{ 0, 0, printargs, "n64_utimensat" }, /* 5275 */
{ 0, 0, printargs, "n64_signalfd" }, /* 5276 */
{ 4, TD, printargs, "n64_timerfd" }, /* 5277 */
{ 0, 0, printargs, "n64_eventfd" }, /* 5278 */
{ 0, 0, printargs, "n64_fallocate" }, /* 5279 */
{ 0, 0, printargs, "n64_timerfd_create" }, /* 5280 */
{ 0, 0, printargs, "n64_timerfd_gettime" }, /* 5281 */
{ 0, 0, printargs, "n64_timerfd_settime" }, /* 5282 */
{ 0, 0, printargs, "n64_signalfd4" }, /* 5283 */
{ 0, 0, printargs, "n64_eventfd2" }, /* 5284 */
{ 0, 0, printargs, "n64_epoll_create1" }, /* 5285 */
{ 0, 0, printargs, "n64_dup3" }, /* 5286 */
{ 0, 0, printargs, "n64_pipe2" }, /* 5287 */
{ 0, 0, printargs, "n64_inotify_init1" }, /* 5288 */
{ 0, 0, printargs, "n64_preadv" }, /* 5289 */
{ 0, 0, printargs, "n64_pwritev" }, /* 5290 */
{ 4, TP|TS, printargs, "n64_rt_tgsigqueueinfo" }, /* 5291 */
{ 0, 0, printargs, "n64_perf_event_open" }, /* 5292 */
{ 0, 0, printargs, "n64_accept4" }, /* 5293 */
{ 0, 0, printargs, "n64_recvmmsg" }, /* 5294 */
{ 2, 0, printargs, "n64_fanotify_init" }, /* 5295 */
{ 5, 0, printargs, "n64_fanotify_mark" }, /* 5296 */
{ 4, 0, printargs, "n64_prlimit64" }, /* 5297 */
{ 5, TD|TF, printargs, "n64_name_to_handle_at" }, /* 5298 */
{ 3, TD, printargs, "n64_open_by_handle_at" }, /* 5299 */
{ 2, 0, printargs, "n64_clock_adjtime" }, /* 5300 */
{ 1, TD, printargs, "n64_syncfs" }, /* 5301 */
{ 4, TN, printargs, "n64_sendmmsg" }, /* 5302 */
{ 2, TD, printargs, "n64_setns" }, /* 5303 */
{ 6, 0, printargs, "n64_process_vm_readv" }, /* 5304 */
{ 6, 0, printargs, "n64_process_vm_writev" }, /* 5305 */
{ 5, 0, printargs, "n64_kcmp" }, /* 5306 */
{ 3, TD, printargs, "n64_finit_module" }, /* 5307 */
{ 3, TD, printargs, "n64_getdents64" }, /* 5308 */
{ 3, 0, printargs, "n64_sched_setattr" }, /* 5309 */
{ 4, 0, printargs, "n64_sched_getattr" }, /* 5310 */
{ 5, TD|TF, printargs, "n64_renameat2" }, /* 5311 */
#endif
[5308 ... 5999] = { }, /* 5999 */ /* end of Linux N64 */

709
linux/mips/syscallent-o32.h Normal file
View File

@ -0,0 +1,709 @@
#if defined LINUX_MIPSO32
/* For an O32 strace, decode the o32 syscalls. */
{ MA, 0, printargs, "syscall" }, /* 4000 */ /* start of Linux o32 */
{ 1, TP|SE, sys_exit, "exit" }, /* 4001 */
{ 0, TP, sys_fork, "fork" }, /* 4002 */
{ 3, TD, sys_read, "read" }, /* 4003 */
{ 3, TD, sys_write, "write" }, /* 4004 */
{ 3, TD|TF, sys_open, "open" }, /* 4005 */
{ 1, TD, sys_close, "close" }, /* 4006 */
{ 3, TP, sys_waitpid, "waitpid" }, /* 4007 */
{ 2, TD|TF, sys_creat, "creat" }, /* 4008 */
{ 2, TF, sys_link, "link" }, /* 4009 */
{ 1, TF, sys_unlink, "unlink" }, /* 4010 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 4011 */
{ 1, TF, sys_chdir, "chdir" }, /* 4012 */
{ 1, 0, sys_time, "time" }, /* 4013 */
{ 3, TF, sys_mknod, "mknod" }, /* 4014 */
{ 2, TF, sys_chmod, "chmod" }, /* 4015 */
{ 3, TF, sys_chown, "lchown" }, /* 4016 */
{ 0, TM, sys_break, "break" }, /* 4017 */
{ 2, TF, sys_oldstat, "oldstat" }, /* 4018 */
{ 3, TD, sys_lseek, "lseek" }, /* 4019 */
{ 0, 0, sys_getpid, "getpid" }, /* 4020 */
{ 5, TF, sys_mount, "mount" }, /* 4021 */
{ 1, TF, sys_umount, "umount" }, /* 4022 */
{ 1, 0, sys_setuid, "setuid" }, /* 4023 */
{ 0, NF, sys_getuid, "getuid" }, /* 4024 */
{ 1, 0, sys_stime, "stime" }, /* 4025 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 4026 */
{ 1, 0, sys_alarm, "alarm" }, /* 4027 */
{ 2, TD, sys_oldfstat, "oldfstat" }, /* 4028 */
{ 0, TS, sys_pause, "pause" }, /* 4029 */
{ 2, TF, sys_utime, "utime" }, /* 4030 */
{ 0, 0, sys_stty, "stty" }, /* 4031 */
{ 0, 0, sys_gtty, "gtty" }, /* 4032 */
{ 2, TF, sys_access, "access" }, /* 4033 */
{ 1, 0, sys_nice, "nice" }, /* 4034 */
{ 1, 0, sys_ftime, "ftime" }, /* 4035 */
{ 0, 0, sys_sync, "sync" }, /* 4036 */
{ 2, TS, sys_kill, "kill" }, /* 4037 */
{ 2, TF, sys_rename, "rename" }, /* 4038 */
{ 2, TF, sys_mkdir, "mkdir" }, /* 4039 */
{ 1, TF, sys_rmdir, "rmdir" }, /* 4040 */
{ 1, TD, sys_dup, "dup" }, /* 4041 */
{ 1, TD, sys_pipe, "pipe" }, /* 4042 */
{ 1, 0, sys_times, "times" }, /* 4043 */
{ 0, 0, sys_prof, "prof" }, /* 4044 */
{ 1, TM|SI, sys_brk, "brk" }, /* 4045 */
{ 1, 0, sys_setgid, "setgid" }, /* 4046 */
{ 0, NF, sys_getgid, "getgid" }, /* 4047 */
{ 1, TS, sys_signal, "signal" }, /* 4048 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 4049 */
{ 0, NF, sys_getegid, "getegid" }, /* 4050 */
{ 1, TF, sys_acct, "acct" }, /* 4051 */
{ 2, TF, sys_umount2, "umount2" }, /* 4052 */
{ 0, 0, sys_lock, "lock" }, /* 4053 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 4054 */
{ 3, TD, sys_fcntl, "fcntl" }, /* 4055 */
{ 0, 0, sys_mpx, "mpx" }, /* 4056 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 4057 */
{ 0, 0, sys_ulimit, "ulimit" }, /* 4058 */
{ 1, 0, sys_oldolduname, "oldolduname" }, /* 4059 */
{ 1, 0, sys_umask, "umask" }, /* 4060 */
{ 1, TF, sys_chroot, "chroot" }, /* 4061 */
{ 2, 0, sys_ustat, "ustat" }, /* 4062 */
{ 2, TD, sys_dup2, "dup2" }, /* 4063 */
{ 0, 0, sys_getppid, "getppid" }, /* 4064 */
{ 0, 0, sys_getpgrp, "getpgrp" }, /* 4065 */
{ 0, 0, sys_setsid, "setsid" }, /* 4066 */
{ 3, TS, sys_sigaction, "sigaction" }, /* 4067 */
{ 0, TS, sys_siggetmask, "sgetmask" }, /* 4068 */
{ 1, TS, sys_sigsetmask, "ssetmask" }, /* 4069 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 4070 */
{ 2, 0, sys_setregid, "setregid" }, /* 4071 */
{ 3, TS, sys_sigsuspend, "sigsuspend" }, /* 4072 */
{ 1, TS, sys_sigpending, "sigpending" }, /* 4073 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 4074 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 4075 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 4076 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 4077 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 4078 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 4079 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 4080 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 4081 */
{ 0, 0, printargs, "reserved82" }, /* 4082 */
{ 2, TF, sys_symlink, "symlink" }, /* 4083 */
{ 2, TF, sys_oldlstat, "oldlstat" }, /* 4084 */
{ 3, TF, sys_readlink, "readlink" }, /* 4085 */
{ 1, TF, sys_uselib, "uselib" }, /* 4086 */
{ 2, TF, sys_swapon, "swapon" }, /* 4087 */
{ 4, 0, sys_reboot, "reboot" }, /* 4088 */
{ 3, TD, sys_readdir, "readdir" }, /* 4089 */
{ 6, TD|TM|SI, sys_mmap, "mmap" }, /* 4090 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 4091 */
{ 2, TF, sys_truncate, "truncate" }, /* 4092 */
{ 2, TD, sys_ftruncate, "ftruncate" }, /* 4093 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 4094 */
{ 3, TD, sys_fchown, "fchown" }, /* 4095 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 4096 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 4097 */
{ 0, 0, sys_profil, "profil" }, /* 4098 */
{ 3, TF, sys_statfs, "statfs" }, /* 4099 */
{ 3, TD, sys_fstatfs, "fstatfs" }, /* 4100 */
{ 0, 0, sys_ioperm, "ioperm" }, /* 4101 */
{ 2, TD, sys_socketcall, "socketcall" }, /* 4102 */
{ 3, 0, sys_syslog, "syslog" }, /* 4103 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 4104 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 4105 */
{ 2, TF, sys_stat, "stat" }, /* 4106 */
{ 2, TF, sys_lstat, "lstat" }, /* 4107 */
{ 2, TD, sys_fstat, "fstat" }, /* 4108 */
{ 1, 0, sys_olduname, "olduname" }, /* 4109 */
{ 0, 0, sys_iopl, "iopl" }, /* 4110 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 4111 */
{ 0, 0, sys_idle, "idle" }, /* 4112 */
{ 5, 0, sys_vm86old, "vm86" }, /* 4113 */
{ 4, TP, sys_wait4, "wait4" }, /* 4114 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 4115 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 4116 */
{ 6, TI, sys_ipc, "ipc" }, /* 4117 */
{ 1, TD, sys_fsync, "fsync" }, /* 4118 */
{ 0, TS, sys_sigreturn, "sigreturn" }, /* 4119 */
{ 5, TP, sys_clone, "clone" }, /* 4120 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 4121 */
{ 1, 0, sys_uname, "uname" }, /* 4122 */
{ 0, 0, sys_modify_ldt, "modify_ldt" }, /* 4123 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 4124 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 4125 */
{ 3, TS, sys_sigprocmask, "sigprocmask" }, /* 4126 */
{ 2, 0, sys_create_module, "create_module" }, /* 4127 */
{ 3, 0, sys_init_module, "init_module" }, /* 4128 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 4129 */
{ 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 4130 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 4131 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 4132 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 4133 */
{ 2, 0, sys_bdflush, "bdflush" }, /* 4134 */
{ 3, 0, sys_sysfs, "sysfs" }, /* 4135 */
{ 1, 0, sys_personality, "personality" }, /* 4136 */
{ 0, 0, sys_afs_syscall, "afs_syscall" }, /* 4137 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 4138 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 4139 */
{ 5, TD, sys_llseek, "_llseek" }, /* 4140 */
{ 3, TD, sys_getdents, "getdents" }, /* 4141 */
{ 5, TD, sys_select, "_newselect" }, /* 4142 */
{ 2, TD, sys_flock, "flock" }, /* 4143 */
{ 3, TM, sys_msync, "msync" }, /* 4144 */
{ 3, TD, sys_readv, "readv" }, /* 4145 */
{ 3, TD, sys_writev, "writev" }, /* 4146 */
{ 3, 0, printargs, "cacheflush" }, /* 4147 */
{ 3, 0, printargs, "cachectl" }, /* 4148 */
{ 4, 0, sys_sysmips, "sysmips" }, /* 4149 */
{ 0, 0, sys_setup, "setup" }, /* 4150 */
{ 1, 0, sys_getsid, "getsid" }, /* 4151 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 4152 */
{ 1, 0, sys_sysctl, "_sysctl" }, /* 4153 */
{ 2, TM, sys_mlock, "mlock" }, /* 4154 */
{ 2, TM, sys_munlock, "munlock" }, /* 4155 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 4156 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 4157 */
{ 2, 0, sys_sched_setparam, "sched_setparam"}, /* 4158 */
{ 2, 0, sys_sched_getparam, "sched_getparam"}, /* 4159 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 4160 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 4161 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 4162 */
{ 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 4163 */
{ 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 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 4167 */
{ 3, TN, sys_accept, "accept" }, /* 4168 */
{ 3, TN, sys_bind, "bind" }, /* 4169 */
{ 3, TN, sys_connect, "connect" }, /* 4170 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 4171 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 4172 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 4173 */
{ 2, TN, sys_listen, "listen" }, /* 4174 */
{ 4, TN, sys_recv, "recv" }, /* 4175 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 4176 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 4177 */
{ 4, TN, sys_send, "send" }, /* 4178 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 4179 */
{ 6, TN, sys_sendto, "sendto" }, /* 4180 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 4181 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 4182 */
{ 3, TN, sys_socket, "socket" }, /* 4183 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 4184 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 4185 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 4186 */
{ 5, 0, sys_query_module, "query_module" }, /* 4187 */
{ 3, TD, sys_poll, "poll" }, /* 4188 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 4189 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 4190 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 4191 */
{ 5, 0, sys_prctl, "prctl" }, /* 4192 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 4193 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 4194 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 4195 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 4196 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"},/* 4197 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"},/* 4198 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 4199 */
{ 6, TD, sys_pread, "pread64" }, /* 4200 */
{ 6, TD, sys_pwrite, "pwrite64" }, /* 4201 */
{ 3, TF, sys_chown, "chown" }, /* 4202 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 4203 */
{ 2, 0, sys_capget, "capget" }, /* 4204 */
{ 2, 0, sys_capset, "capset" }, /* 4205 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 4206 */
{ 4, TD|TN, sys_sendfile, "sendfile" }, /* 4207 */
{ 5, TN, printargs, "getpmsg" }, /* 4208 */
{ 5, TN, printargs, "putpmsg" }, /* 4209 */
{ 6, TD|TM|SI, sys_mmap_4koff, "mmap2" }, /* 4210 */
{ 4, TF, sys_truncate64, "truncate64" }, /* 4211 */
{ 4, TD, sys_ftruncate64, "ftruncate64" }, /* 4212 */
{ 2, TF, sys_stat64, "stat64" }, /* 4213 */
{ 2, TF, sys_lstat64, "lstat64" }, /* 4214 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 4215 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 4216 */
{ 3, TM, sys_mincore, "mincore" }, /* 4217 */
{ 3, TM, sys_madvise, "madvise" }, /* 4218 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 4219 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 4220 */
{ 0, 0, NULL, NULL }, /* 4221 */
{ 0, 0, sys_gettid, "gettid" }, /* 4222 */
{ 5, TD, sys_readahead, "readahead" }, /* 4223 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 4224 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 4225 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 4226 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 4227 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 4228 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 4229 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 4230 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 4231 */
{ 3, TD, sys_flistxattr, "flistxattr" }, /* 4232 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 4233 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 4234 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 4235 */
{ 2, TS, sys_kill, "tkill" }, /* 4236 */
{ 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 4237 */
{ 6, 0, sys_futex, "futex" }, /* 4238 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 4239 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 4240 */
{ 2, 0, sys_io_setup, "io_setup" }, /* 4241 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 4242 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 4243 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 4244 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 4245 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 4246 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 4247 */
{ 1, TD, sys_epoll_create, "epoll_create" }, /* 4248 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 4249 */
{ 4, TD, sys_epoll_wait, "epoll_wait" }, /* 4250 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages"}, /* 4251 */
{ 1, 0, sys_set_tid_address, "set_tid_address"}, /* 4252 */
{ 0, 0, sys_restart_syscall, "restart_syscall"}, /* 4253 */
{ 7, TD, sys_fadvise64_64, "fadvise64_64" }, /* 4254 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 4255 */
{ 2, TD, sys_fstatfs64, "fstatfs64" }, /* 4256 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 4257 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 4258 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 4259 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 4260 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 4261 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 4262 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 4263 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 4264 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 4265 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 4266 */
{ 2, TF, sys_utimes, "utimes" }, /* 4267 */
{ 4, TM, sys_mbind, "mbind" }, /* 4268 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 4269 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 4270 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 4271 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 4272 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 4273 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 4274 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 4275 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 4276 */
{ 5, 0, sys_vserver, "vserver" }, /* 4277 */
{ 5, TP, sys_waitid, "waitid" }, /* 4278 */
{ 0, 0, NULL, NULL }, /* 4279 */
{ 5, 0, sys_add_key, "add_key" }, /* 4280 */
{ 4, 0, sys_request_key, "request_key" }, /* 4281 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 4282 */
{ 1, 0, sys_set_thread_area, "set_thread_area" }, /* 4283 */
{ 0, TD, sys_inotify_init, "inotify_init" }, /* 4284 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 4285 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 4286 */
{ 4, TM, sys_migrate_pages, "migrate_pages" }, /* 4287 */
{ 4, TD|TF, sys_openat, "openat" }, /* 4288 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 4289 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 4290 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 4291 */
{ 3, TD|TF, sys_futimesat, "futimesat" }, /* 4292 */
{ 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 4293 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 4294 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 4295 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 4296 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 4297 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 4298 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 4299 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 4300 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 4301 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 4302 */
{ 1, TP, sys_unshare, "unshare" }, /* 4303 */
{ 6, TD, sys_splice, "splice" }, /* 4304 */
{ 7, TD, sys_sync_file_range, "sync_file_range" }, /* 4305 */
{ 4, TD, sys_tee, "tee" }, /* 4306 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 4307 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 4308 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 4309 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 4310 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 4311 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 4312 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 4313 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 4314 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 4315 */
{ 4, 0, printargs, "utimensat" }, /* 4316 */
{ 3, TD|TS, sys_signalfd, "signalfd" }, /* 4317 */
{ 4, TD, sys_timerfd, "timerfd" }, /* 4318 */
{ 1, TD, sys_eventfd, "eventfd" }, /* 4319 */
{ 6, TD, sys_fallocate, "fallocate" }, /* 4320 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 4321 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 4322 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 4323 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 4324 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 4325 */
{ 1, TD, sys_epoll_create1, "epoll_create1" }, /* 4326 */
{ 3, TD, sys_dup3, "dup3" }, /* 4327 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 4328 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 4329 */
{ 5, TD, sys_preadv, "preadv" }, /* 4330 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 4331 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 4332 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 4333 */
{ 4, TN, sys_accept4, "accept4" }, /* 4334 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 4335 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 4336 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 4337 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 4338 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 4339 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 4340 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 4341 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 4342 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 4343 */
{ 2, TD, sys_setns, "setns" }, /* 4344 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 4345 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 4346 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 4347 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 4348 */
{ 3, 0, sys_sched_setattr, "sched_setattr" }, /* 4349 */
{ 4, 0, sys_sched_getattr, "sched_getattr" }, /* 4350 */
{ 5, TD|TF, sys_renameat2, "renameat2" }, /* 4351 */
#else
{ 0, 0, printargs, "o32_syscall" }, /* 4000 */
{ 1, TP|SE, printargs, "o32_exit" }, /* 4001 */
{ 0, TP, printargs, "o32_fork" }, /* 4002 */
{ 0, 0, printargs, "o32_read" }, /* 4003 */
{ 0, 0, printargs, "o32_write" }, /* 4004 */
{ 0, 0, printargs, "o32_open" }, /* 4005 */
{ 0, 0, printargs, "o32_close" }, /* 4006 */
{ 3, TP, printargs, "o32_waitpid" }, /* 4007 */
{ 0, 0, printargs, "o32_creat" }, /* 4008 */
{ 0, 0, printargs, "o32_link" }, /* 4009 */
{ 0, 0, printargs, "o32_unlink" }, /* 4010 */
{ 3, TF|TP|SE|SI, printargs, "o32_execve" }, /* 4011 */
{ 0, 0, printargs, "o32_chdir" }, /* 4012 */
{ 0, 0, printargs, "o32_time" }, /* 4013 */
{ 0, 0, printargs, "o32_mknod" }, /* 4014 */
{ 0, 0, printargs, "o32_chmod" }, /* 4015 */
{ 0, 0, printargs, "o32_lchown" }, /* 4016 */
{ 0, TM, printargs, "o32_break" }, /* 4017 */
{ 0, 0, printargs, "o32_oldstat" }, /* 4018 */
{ 0, 0, printargs, "o32_lseek" }, /* 4019 */
{ 0, 0, printargs, "o32_getpid" }, /* 4020 */
{ 0, 0, printargs, "o32_mount" }, /* 4021 */
{ 0, 0, printargs, "o32_umount" }, /* 4022 */
{ 0, 0, printargs, "o32_setuid" }, /* 4023 */
{ 0, 0, printargs, "o32_getuid" }, /* 4024 */
{ 0, 0, printargs, "o32_stime" }, /* 4025 */
{ 0, 0, printargs, "o32_ptrace" }, /* 4026 */
{ 0, 0, printargs, "o32_alarm" }, /* 4027 */
{ 0, 0, printargs, "o32_oldfstat" }, /* 4028 */
{ 0, 0, printargs, "o32_pause" }, /* 4029 */
{ 0, 0, printargs, "o32_utime" }, /* 4030 */
{ 0, 0, printargs, "o32_stty" }, /* 4031 */
{ 0, 0, printargs, "o32_gtty" }, /* 4032 */
{ 0, 0, printargs, "o32_access" }, /* 4033 */
{ 0, 0, printargs, "o32_nice" }, /* 4034 */
{ 0, 0, printargs, "o32_ftime" }, /* 4035 */
{ 0, 0, printargs, "o32_sync" }, /* 4036 */
{ 0, 0, printargs, "o32_kill" }, /* 4037 */
{ 0, 0, printargs, "o32_rename" }, /* 4038 */
{ 0, 0, printargs, "o32_mkdir" }, /* 4039 */
{ 0, 0, printargs, "o32_rmdir" }, /* 4040 */
{ 0, 0, printargs, "o32_dup" }, /* 4041 */
{ 0, 0, printargs, "o32_pipe" }, /* 4042 */
{ 0, 0, printargs, "o32_times" }, /* 4043 */
{ 0, 0, printargs, "o32_prof" }, /* 4044 */
{ 0, TM|SI, printargs, "o32_brk" }, /* 4045 */
{ 0, 0, printargs, "o32_setgid" }, /* 4046 */
{ 0, 0, printargs, "o32_getgid" }, /* 4047 */
{ 0, 0, printargs, "o32_signal" }, /* 4048 */
{ 0, 0, printargs, "o32_geteuid" }, /* 4049 */
{ 0, 0, printargs, "o32_getegid" }, /* 4050 */
{ 0, 0, printargs, "o32_acct" }, /* 4051 */
{ 0, 0, printargs, "o32_umount2" }, /* 4052 */
{ 0, 0, printargs, "o32_lock" }, /* 4053 */
{ 0, 0, printargs, "o32_ioctl" }, /* 4054 */
{ 0, 0, printargs, "o32_fcntl" }, /* 4055 */
{ 0, 0, printargs, "o32_mpx" }, /* 4056 */
{ 0, 0, printargs, "o32_setpgid" }, /* 4057 */
{ 0, 0, printargs, "o32_ulimit" }, /* 4058 */
{ 0, 0, printargs, "o32_oldolduname" }, /* 4059 */
{ 0, 0, printargs, "o32_umask" }, /* 4060 */
{ 0, 0, printargs, "o32_chroot" }, /* 4061 */
{ 0, 0, printargs, "o32_ustat" }, /* 4062 */
{ 0, 0, printargs, "o32_dup2" }, /* 4063 */
{ 0, 0, printargs, "o32_getppid" }, /* 4064 */
{ 0, 0, printargs, "o32_getpgrp" }, /* 4065 */
{ 0, 0, printargs, "o32_setsid" }, /* 4066 */
{ 0, 0, printargs, "o32_sigaction" }, /* 4067 */
{ 0, 0, printargs, "o32_siggetmask" }, /* 4068 */
{ 0, 0, printargs, "o32_sigsetmask" }, /* 4069 */
{ 0, 0, printargs, "o32_setreuid" }, /* 4070 */
{ 0, 0, printargs, "o32_setregid" }, /* 4071 */
{ 0, 0, printargs, "o32_sigsuspend" }, /* 4072 */
{ 0, 0, printargs, "o32_sigpending" }, /* 4073 */
{ 0, 0, printargs, "o32_sethostname" }, /* 4074 */
{ 0, 0, printargs, "o32_setrlimit" }, /* 4075 */
{ 0, 0, printargs, "o32_getrlimit" }, /* 4076 */
{ 0, 0, printargs, "o32_getrusage" }, /* 4077 */
{ 0, 0, printargs, "o32_gettimeofday" }, /* 4078 */
{ 0, 0, printargs, "o32_settimeofday" }, /* 4079 */
{ 0, 0, printargs, "o32_getgroups" }, /* 4080 */
{ 0, 0, printargs, "o32_setgroups" }, /* 4081 */
{ 0, 0, printargs, "o32_reserved82" }, /* 4082 */
{ 0, 0, printargs, "o32_symlink" }, /* 4083 */
{ 0, 0, printargs, "o32_oldlstat" }, /* 4084 */
{ 0, 0, printargs, "o32_readlink" }, /* 4085 */
{ 0, 0, printargs, "o32_uselib" }, /* 4086 */
{ 0, 0, printargs, "o32_swapon" }, /* 4087 */
{ 0, 0, printargs, "o32_reboot" }, /* 4088 */
{ 0, 0, printargs, "o32_readdir" }, /* 4089 */
{ 0, TD|TM|SI, printargs, "o32_mmap" }, /* 4090 */
{ 0, TM|SI, printargs, "o32_munmap" }, /* 4091 */
{ 0, 0, printargs, "o32_truncate" }, /* 4092 */
{ 0, 0, printargs, "o32_ftruncate" }, /* 4093 */
{ 0, 0, printargs, "o32_fchmod" }, /* 4094 */
{ 0, 0, printargs, "o32_fchown" }, /* 4095 */
{ 0, 0, printargs, "o32_getpriority" }, /* 4096 */
{ 0, 0, printargs, "o32_setpriority" }, /* 4097 */
{ 0, 0, printargs, "o32_profil" }, /* 4098 */
{ 0, 0, printargs, "o32_statfs" }, /* 4099 */
{ 0, 0, printargs, "o32_fstatfs" }, /* 4100 */
{ 0, 0, printargs, "o32_ioperm" }, /* 4101 */
{ 0, 0, printargs, "o32_socketcall" }, /* 4102 */
{ 0, 0, printargs, "o32_syslog" }, /* 4103 */
{ 0, 0, printargs, "o32_setitimer" }, /* 4104 */
{ 0, 0, printargs, "o32_getitimer" }, /* 4105 */
{ 0, 0, printargs, "o32_stat" }, /* 4106 */
{ 0, 0, printargs, "o32_lstat" }, /* 4107 */
{ 0, 0, printargs, "o32_fstat" }, /* 4108 */
{ 0, 0, printargs, "o32_olduname" }, /* 4109 */
{ 0, 0, printargs, "o32_iopl" }, /* 4110 */
{ 0, 0, printargs, "o32_vhangup" }, /* 4111 */
{ 0, 0, printargs, "o32_idle" }, /* 4112 */
{ 0, 0, printargs, "o32_vm86" }, /* 4113 */
{ 4, TP, printargs, "o32_wait4" }, /* 4114 */
{ 0, 0, printargs, "o32_swapoff" }, /* 4115 */
{ 0, 0, printargs, "o32_sysinfo" }, /* 4116 */
{ 0, 0, printargs, "o32_ipc" }, /* 4117 */
{ 0, 0, printargs, "o32_fsync" }, /* 4118 */
{ 0, 0, printargs, "o32_sigreturn" }, /* 4119 */
{ 5, TP, printargs, "o32_clone" }, /* 4120 */
{ 0, 0, printargs, "o32_setdomainname" }, /* 4121 */
{ 0, 0, printargs, "o32_uname" }, /* 4122 */
{ 0, 0, printargs, "o32_modify_ldt" }, /* 4123 */
{ 0, 0, printargs, "o32_adjtimex" }, /* 4124 */
{ 0, TM|SI, printargs, "o32_mprotect" }, /* 4125 */
{ 0, 0, printargs, "o32_sigprocmask" }, /* 4126 */
{ 0, 0, printargs, "o32_create_module" }, /* 4127 */
{ 0, 0, printargs, "o32_init_module" }, /* 4128 */
{ 0, 0, printargs, "o32_delete_module" }, /* 4129 */
{ 0, 0, printargs, "o32_get_kernel_syms"}, /* 4130 */
{ 0, TF, printargs, "o32_quotactl" }, /* 4131 */
{ 0, 0, printargs, "o32_getpgid" }, /* 4132 */
{ 0, 0, printargs, "o32_fchdir" }, /* 4133 */
{ 0, 0, printargs, "o32_bdflush" }, /* 4134 */
{ 0, 0, printargs, "o32_sysfs" }, /* 4135 */
{ 0, 0, printargs, "o32_personality" }, /* 4136 */
{ 0, 0, printargs, "o32_afs_syscall" }, /* 4137 */
{ 0, 0, printargs, "o32_setfsuid" }, /* 4138 */
{ 0, 0, printargs, "o32_setfsgid" }, /* 4139 */
{ 0, 0, printargs, "o32__llseek" }, /* 4140 */
{ 0, 0, printargs, "o32_getdents" }, /* 4141 */
{ 0, 0, printargs, "o32__newselect" }, /* 4142 */
{ 0, 0, printargs, "o32_flock" }, /* 4143 */
{ 0, TM, printargs, "o32_msync" }, /* 4144 */
{ 0, 0, printargs, "o32_readv" }, /* 4145 */
{ 0, 0, printargs, "o32_writev" }, /* 4146 */
{ 0, 0, printargs, "o32_cacheflush" }, /* 4147 */
{ 0, 0, printargs, "o32_cachectl" }, /* 4148 */
{ 0, 0, printargs, "o32_sysmips" }, /* 4149 */
{ 0, 0, printargs, "o32_setup" }, /* 4150 */
{ 0, 0, printargs, "o32_getsid" }, /* 4151 */
{ 0, 0, printargs, "o32_fdatasync" }, /* 4152 */
{ 0, 0, printargs, "o32__sysctl" }, /* 4153 */
{ 0, TM, printargs, "o32_mlock" }, /* 4154 */
{ 0, TM, printargs, "o32_munlock" }, /* 4155 */
{ 0, TM, printargs, "o32_mlockall" }, /* 4156 */
{ 0, TM, printargs, "o32_munlockall" }, /* 4157 */
{ 0, 0, printargs, "o32_sched_setparam"}, /* 4158 */
{ 0, 0, printargs, "o32_sched_getparam"}, /* 4159 */
{ 0, 0, printargs, "o32_sched_setscheduler"}, /* 4160 */
{ 0, 0, printargs, "o32_sched_getscheduler"}, /* 4161 */
{ 0, 0, printargs, "o32_sched_yield" }, /* 4162 */
{ 0, 0, printargs, "o32_sched_get_priority_max"}, /* 4163 */
{ 0, 0, printargs, "o32_sched_get_priority_min"},/* 4164 */
{ 0, 0, printargs, "o32_sched_rr_get_interval"}, /* 4165 */
{ 0, 0, printargs, "o32_nanosleep" }, /* 4166 */
{ 0, TM|SI, printargs, "o32_mremap" }, /* 4167 */
{ 0, 0, printargs, "o32_accept" }, /* 4168 */
{ 0, 0, printargs, "o32_bind" }, /* 4169 */
{ 0, 0, printargs, "o32_connect" }, /* 4170 */
{ 0, 0, printargs, "o32_getpeername" }, /* 4171 */
{ 0, 0, printargs, "o32_getsockname" }, /* 4172 */
{ 0, 0, printargs, "o32_getsockopt" }, /* 4173 */
{ 0, 0, printargs, "o32_listen" }, /* 4174 */
{ 0, 0, printargs, "o32_recv" }, /* 4175 */
{ 0, 0, printargs, "o32_recvfrom" }, /* 4176 */
{ 0, 0, printargs, "o32_recvmsg" }, /* 4177 */
{ 0, 0, printargs, "o32_send" }, /* 4178 */
{ 0, 0, printargs, "o32_sendmsg" }, /* 4179 */
{ 0, 0, printargs, "o32_sendto" }, /* 4180 */
{ 0, 0, printargs, "o32_setsockopt" }, /* 4181 */
{ 0, 0, printargs, "o32_shutdown" }, /* 4182 */
{ 0, 0, printargs, "o32_socket" }, /* 4183 */
{ 0, 0, printargs, "o32_socketpair" }, /* 4184 */
{ 0, 0, printargs, "o32_setresuid" }, /* 4185 */
{ 0, 0, printargs, "o32_getresuid" }, /* 4186 */
{ 0, 0, printargs, "o32_query_module" }, /* 4187 */
{ 0, 0, printargs, "o32_poll" }, /* 4188 */
{ 0, 0, printargs, "o32_nfsservctl" }, /* 4189 */
{ 0, 0, printargs, "o32_setresgid" }, /* 4190 */
{ 0, 0, printargs, "o32_getresgid" }, /* 4191 */
{ 0, 0, printargs, "o32_prctl" }, /* 4192 */
{ 0, 0, printargs, "o32_rt_sigreturn" }, /* 4193 */
{ 0, 0, printargs, "o32_rt_sigaction" }, /* 4194 */
{ 0, 0, printargs, "o32_rt_sigprocmask"}, /* 4195 */
{ 0, 0, printargs, "o32_rt_sigpending" }, /* 4196 */
{ 0, 0, printargs, "o32_rt_sigtimedwait"},/* 4197 */
{ 0, 0, printargs, "o32_rt_sigqueueinfo"},/* 4198 */
{ 0, 0, printargs, "o32_rt_siguspend" }, /* 4199 */
{ 0, 0, printargs, "o32_pread64" }, /* 4200 */
{ 0, 0, printargs, "o32_pwrite64" }, /* 4201 */
{ 0, 0, printargs, "o32_chown" }, /* 4202 */
{ 0, 0, printargs, "o32_getcwd" }, /* 4203 */
{ 0, 0, printargs, "o32_capget" }, /* 4204 */
{ 0, 0, printargs, "o32_capset" }, /* 4205 */
{ 0, 0, printargs, "o32_sigaltstack" }, /* 4206 */
{ 0, 0, printargs, "o32_sendfile" }, /* 4207 */
{ 5, TN, printargs, "o32_getpmsg" }, /* 4208 */
{ 5, TN, printargs, "o32_putpmsg" }, /* 4209 */
{ 6, TD|TM|SI, printargs, "o32_mmap2" }, /* 4210 */
{ 0, 0, printargs, "o32_truncate64" }, /* 4211 */
{ 0, 0, printargs, "o32_ftruncate64" }, /* 4212 */
{ 0, 0, printargs, "o32_stat64" }, /* 4213 */
{ 0, 0, printargs, "o32_lstat64" }, /* 4214 */
{ 0, 0, printargs, "o32_fstat64" }, /* 4215 */
{ 0, 0, printargs, "o32_pivot_root" }, /* 4216 */
{ 0, TM, printargs, "o32_mincore" }, /* 4217 */
{ 0, TM, printargs, "o32_madvise" }, /* 4218 */
{ 0, 0, printargs, "o32_getdents64" }, /* 4219 */
{ 0, 0, printargs, "o32_fcntl64" }, /* 4220 */
{ 0, 0, NULL, NULL }, /* 4221 */
{ 0, 0, printargs, "o32_gettid" }, /* 4222 */
{ 5, TD, printargs, "o32_readahead" }, /* 4223 */
{ 5, TF, printargs, "o32_setxattr" }, /* 4224 */
{ 5, TF, printargs, "o32_lsetxattr" }, /* 4225 */
{ 5, TD, printargs, "o32_fsetxattr" }, /* 4226 */
{ 4, TF, printargs, "o32_getxattr" }, /* 4227 */
{ 4, TF, printargs, "o32_lgetxattr" }, /* 4228 */
{ 4, TD, printargs, "o32_fgetxattr" }, /* 4229 */
{ 3, TF, printargs, "o32_listxattr" }, /* 4230 */
{ 3, TF, printargs, "o32_llistxattr" }, /* 4231 */
{ 3, TD, printargs, "o32_flistxattr" }, /* 4232 */
{ 2, TF, printargs, "o32_removexattr" }, /* 4233 */
{ 2, TF, printargs, "o32_lremovexattr" }, /* 4234 */
{ 2, TD, printargs, "o32_fremovexattr" }, /* 4235 */
{ 2, TS, printargs, "o32_tkill" }, /* 4236 */
{ 5, TD|TN, printargs, "o32_sendfile64" }, /* 4237 */
{ 6, 0, printargs, "o32_futex" }, /* 4238 */
{ 3, 0, printargs, "o32_sched_setaffinity"}, /* 4239 */
{ 3, 0, printargs, "o32_sched_getaffinity"}, /* 4240 */
{ 2, 0, printargs, "o32_io_setup" }, /* 4241 */
{ 1, 0, printargs, "o32_io_destroy" }, /* 4242 */
{ 5, 0, printargs, "o32_io_getevents" }, /* 4243 */
{ 3, 0, printargs, "o32_io_submit" }, /* 4244 */
{ 3, 0, printargs, "o32_io_cancel" }, /* 4245 */
{ 1, TP|SE, printargs, "o32_exit_group" }, /* 4246 */
{ 3, 0, printargs, "o32_lookup_dcookie"}, /* 4247 */
{ 1, TD, printargs, "o32_epoll_create" }, /* 4248 */
{ 4, TD, printargs, "o32_epoll_ctl" }, /* 4249 */
{ 4, TD, printargs, "o32_epoll_wait" }, /* 4250 */
{ 5, TM|SI, printargs, "o32_remap_file_pages"}, /* 4251 */
{ 1, 0, printargs, "o32_set_tid_address"}, /* 4252 */
{ 0, 0, printargs, "o32_restart_syscall"}, /* 4253 */
{ MA, 0, printargs, "o32_fadvise64_64" }, /* 4254 */
{ 3, TF, printargs, "o32_statfs64" }, /* 4255 */
{ 2, TD, printargs, "o32_fstatfs64" }, /* 4256 */
{ 3, 0, printargs, "o32_timer_create" }, /* 4257 */
{ 4, 0, printargs, "o32_timer_settime" }, /* 4258 */
{ 2, 0, printargs, "o32_timer_gettime" }, /* 4259 */
{ 1, 0, printargs, "o32_timer_getoverrun"}, /* 4260 */
{ 1, 0, printargs, "o32_timer_delete" }, /* 4261 */
{ 2, 0, printargs, "o32_clock_settime" }, /* 4262 */
{ 2, 0, printargs, "o32_clock_gettime" }, /* 4263 */
{ 2, 0, printargs, "o32_clock_getres" }, /* 4264 */
{ 4, 0, printargs, "o32_clock_nanosleep"}, /* 4265 */
{ 3, TS, printargs, "o32_tgkill" }, /* 4266 */
{ 2, TF, printargs, "o32_utimes" }, /* 4267 */
{ 4, TM, printargs, "o32_mbind" }, /* 4268 */
{ 5, TM, printargs, "o32_get_mempolicy" }, /* 4269 */
{ 3, TM, printargs, "o32_set_mempolicy" }, /* 4270 */
{ 4, 0, printargs, "o32_mq_open" }, /* 4271 */
{ 1, 0, printargs, "o32_mq_unlink" }, /* 4272 */
{ 5, 0, printargs, "o32_mq_timedsend" }, /* 4273 */
{ 5, 0, printargs, "o32_mq_timedreceive"}, /* 4274 */
{ 2, 0, printargs, "o32_mq_notify" }, /* 4275 */
{ 3, 0, printargs, "o32_mq_getsetattr" }, /* 4276 */
{ 5, 0, printargs, "o32_vserver" }, /* 4277 */
{ 5, TP, printargs, "o32_waitid" }, /* 4278 */
{ 0, 0, printargs, "o32_SYS_4279" }, /* 4279 */
{ 5, 0, printargs, "o32_add_key" }, /* 4280 */
{ 4, 0, printargs, "o32_request_key" }, /* 4281 */
{ 5, 0, printargs, "o32_keyctl" }, /* 4282 */
{ 1, 0, printargs, "o32_set_thread_area" }, /* 4283 */
{ 0, TD, printargs, "o32_inotify_init" }, /* 4284 */
{ 3, TD, printargs, "o32_inotify_add_watch" }, /* 4285 */
{ 2, TD, printargs, "o32_inotify_rm_watch" }, /* 4286 */
{ 4, TM, printargs, "o32_migrate_pages" }, /* 4287 */
{ 4, TD|TF, printargs, "o32_openat" }, /* 4288 */
{ 3, TD|TF, printargs, "o32_mkdirat" }, /* 4289 */
{ 4, TD|TF, printargs, "o32_mknodat" }, /* 4290 */
{ 5, TD|TF, printargs, "o32_fchownat" }, /* 4291 */
{ 3, TD|TF, printargs, "o32_futimesat" }, /* 4292 */
{ 4, TD|TF, printargs, "o32_fstatat64" }, /* 4293 */
{ 3, TD|TF, printargs, "o32_unlinkat" }, /* 4294 */
{ 4, TD|TF, printargs, "o32_renameat" }, /* 4295 */
{ 5, TD|TF, printargs, "o32_linkat" }, /* 4296 */
{ 3, TD|TF, printargs, "o32_symlinkat" }, /* 4297 */
{ 4, TD|TF, printargs, "o32_readlinkat" }, /* 4298 */
{ 3, TD|TF, printargs, "o32_fchmodat" }, /* 4299 */
{ 3, TD|TF, printargs, "o32_faccessat" }, /* 4300 */
{ 6, TD, printargs, "o32_pselect6" }, /* 4301 */
{ 5, TD, printargs, "o32_ppoll" }, /* 4302 */
{ 1, TP, printargs, "o32_unshare" }, /* 4303 */
{ 6, TD, printargs, "o32_splice" }, /* 4304 */
{ 4, TD, printargs, "o32_sync_file_range" }, /* 4305 */
{ 4, TD, printargs, "o32_tee" }, /* 4306 */
{ 4, TD, printargs, "o32_vmsplice" }, /* 4307 */
{ 6, TM, printargs, "o32_move_pages" }, /* 4308 */
{ 2, 0, printargs, "o32_set_robust_list" }, /* 4309 */
{ 3, 0, printargs, "o32_get_robust_list" }, /* 4310 */
{ 4, 0, printargs, "o32_kexec_load" }, /* 4311 */
{ 3, 0, printargs, "o32_getcpu" }, /* 4312 */
{ 5, TD, printargs, "o32_epoll_pwait" }, /* 4313 */
{ 3, 0, printargs, "o32_ioprio_set" }, /* 4314 */
{ 2, 0, printargs, "o32_ioprio_get" }, /* 4315 */
{ 4, 0, printargs, "o32_utimensat" }, /* 4316 */
{ 3, TD|TS, printargs, "o32_signalfd" }, /* 4317 */
{ 4, TD, printargs, "o32_timerfd" }, /* 4318 */
{ 1, TD, printargs, "o32_eventfd" }, /* 4319 */
{ 6, TD, printargs, "o32_fallocate" }, /* 4320 */
{ 2, TD, printargs, "o32_timerfd_create" }, /* 4321 */
{ 2, TD, printargs, "o32_timerfd_gettime" }, /* 4322 */
{ 4, TD, printargs, "o32_timerfd_settime" }, /* 4323 */
{ 4, TD|TS, printargs, "o32_signalfd4" }, /* 4324 */
{ 2, TD, printargs, "o32_eventfd2" }, /* 4325 */
{ 1, TD, printargs, "o32_epoll_create1" }, /* 4326 */
{ 3, TD, printargs, "o32_dup3" }, /* 4327 */
{ 2, TD, printargs, "o32_pipe2" }, /* 4328 */
{ 1, TD, printargs, "o32_inotify_init1" }, /* 4329 */
{ 5, TD, printargs, "o32_preadv" }, /* 4330 */
{ 5, TD, printargs, "o32_pwritev" }, /* 4331 */
{ 4, TP|TS, printargs, "o32_rt_tgsigqueueinfo" }, /* 4332 */
{ 5, TD, printargs, "o32_perf_event_open" }, /* 4333 */
{ 4, TN, printargs, "o32_accept4" }, /* 4334 */
{ 5, TN, printargs, "o32_recvmmsg" }, /* 4335 */
{ 2, TD, printargs, "o32_fanotify_init" }, /* 4336 */
{ 6, TD|TF, printargs, "o32_fanotify_mark" }, /* 4337 */
{ 4, 0, printargs, "o32_prlimit64" }, /* 4338 */
{ 5, TD|TF, printargs, "o32_name_to_handle_at"}, /* 4339 */
{ 3, TD, printargs, "o32_open_by_handle_at"}, /* 4340 */
{ 2, 0, printargs, "o32_clock_adjtime" }, /* 4341 */
{ 1, TD, printargs, "o32_syncfs" }, /* 4342 */
{ 4, TN, printargs, "o32_sendmmsg" }, /* 4343 */
{ 2, TD, printargs, "o32_setns" }, /* 4344 */
{ 6, 0, printargs, "o32_process_vm_readv" }, /* 4345 */
{ 6, 0, printargs, "o32_process_vm_writev" }, /* 4346 */
{ 5, 0, printargs, "o32_kcmp" }, /* 4347 */
{ 3, TD, printargs, "o32_finit_module" }, /* 4348 */
{ 3, 0, printargs, "o32_sched_setattr" }, /* 4349 */
{ 4, 0, printargs, "o32_sched_getattr" }, /* 4350 */
{ 5, TD|TF, printargs, "o32_renameat2" }, /* 4351 */
#endif
[4349 ... 4999] = { }, /* 4999 */ /* end of Linux o32 */

File diff suppressed because it is too large Load Diff

278
linux/mtd-abi.h Normal file
View File

@ -0,0 +1,278 @@
/*
* Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org> et al.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __MTD_ABI_H__
#define __MTD_ABI_H__
#include <linux/types.h>
struct erase_info_user {
__u32 start;
__u32 length;
};
struct erase_info_user64 {
__u64 start;
__u64 length;
};
struct mtd_oob_buf {
__u32 start;
__u32 length;
unsigned char *ptr;
};
struct mtd_oob_buf64 {
__u64 start;
__u32 pad;
__u32 length;
__u64 usr_ptr;
};
/**
* MTD operation modes
*
* @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default)
* @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas
* which are defined by the internal ecclayout
* @MTD_OPS_RAW: data are transferred as-is, with no error correction;
* this mode implies %MTD_OPS_PLACE_OOB
*
* These modes can be passed to ioctl(MEMWRITE) and are also used internally.
* See notes on "MTD file modes" for discussion on %MTD_OPS_RAW vs.
* %MTD_FILE_MODE_RAW.
*/
enum {
MTD_OPS_PLACE_OOB = 0,
MTD_OPS_AUTO_OOB = 1,
MTD_OPS_RAW = 2,
};
/**
* struct mtd_write_req - data structure for requesting a write operation
*
* @start: start address
* @len: length of data buffer
* @ooblen: length of OOB buffer
* @usr_data: user-provided data buffer
* @usr_oob: user-provided OOB buffer
* @mode: MTD mode (see "MTD operation modes")
* @padding: reserved, must be set to 0
*
* This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB
* writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
* write data-only, set @usr_oob == NULL. However, setting both @usr_data and
* @usr_oob to NULL is not allowed.
*/
struct mtd_write_req {
__u64 start;
__u64 len;
__u64 ooblen;
__u64 usr_data;
__u64 usr_oob;
__u8 mode;
__u8 padding[7];
};
#define MTD_ABSENT 0
#define MTD_RAM 1
#define MTD_ROM 2
#define MTD_NORFLASH 3
#define MTD_NANDFLASH 4
#define MTD_DATAFLASH 6
#define MTD_UBIVOLUME 7
#define MTD_MLCNANDFLASH 8
#define MTD_WRITEABLE 0x400 /* Device is writeable */
#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */
#define MTD_NO_ERASE 0x1000 /* No erase necessary */
#define MTD_POWERUP_LOCK 0x2000 /* Always locked after reset */
/* Some common devices / combinations of capabilities */
#define MTD_CAP_ROM 0
#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)
/* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */
#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended)
#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode)
#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read)
#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default
/* OTP mode selection */
#define MTD_OTP_OFF 0
#define MTD_OTP_FACTORY 1
#define MTD_OTP_USER 2
struct mtd_info_user {
__u8 type;
__u32 flags;
__u32 size; /* Total size of the MTD */
__u32 erasesize;
__u32 writesize;
__u32 oobsize; /* Amount of OOB data per block (e.g. 16) */
__u64 padding; /* Old obsolete field; do not use */
};
struct region_info_user {
__u32 offset; /* At which this region starts,
* from the beginning of the MTD */
__u32 erasesize; /* For this region */
__u32 numblocks; /* Number of blocks in this region */
__u32 regionindex;
};
struct otp_info {
__u32 start;
__u32 length;
__u32 locked;
};
/*
* Note, the following ioctl existed in the past and was removed:
* #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
* Try to avoid adding a new ioctl with the same ioctl number.
*/
/* Get basic MTD characteristics info (better to use sysfs) */
#define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
/* Erase segment of MTD */
#define MEMERASE _IOW('M', 2, struct erase_info_user)
/* Write out-of-band data from MTD */
#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
/* Read out-of-band data from MTD */
#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
/* Lock a chip (for MTD that supports it) */
#define MEMLOCK _IOW('M', 5, struct erase_info_user)
/* Unlock a chip (for MTD that supports it) */
#define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
/* Get the number of different erase regions */
#define MEMGETREGIONCOUNT _IOR('M', 7, int)
/* Get information about the erase region for a specific index */
#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
/* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
/* Check if an eraseblock is bad */
#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t)
/* Mark an eraseblock as bad */
#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t)
/* Set OTP (One-Time Programmable) mode (factory vs. user) */
#define OTPSELECT _IOR('M', 13, int)
/* Get number of OTP (One-Time Programmable) regions */
#define OTPGETREGIONCOUNT _IOW('M', 14, int)
/* Get all OTP (One-Time Programmable) info about MTD */
#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
/* Lock a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
#define OTPLOCK _IOR('M', 16, struct otp_info)
/* Get ECC layout (deprecated) */
#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout_user)
/* Get statistics about corrected/uncorrected errors */
#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
/* Set MTD mode on a per-file-descriptor basis (see "MTD file modes") */
#define MTDFILEMODE _IO('M', 19)
/* Erase segment of MTD (supports 64-bit address) */
#define MEMERASE64 _IOW('M', 20, struct erase_info_user64)
/* Write data to OOB (64-bit version) */
#define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64)
/* Read data from OOB (64-bit version) */
#define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64)
/* Check if chip is locked (for MTD that supports it) */
#define MEMISLOCKED _IOR('M', 23, struct erase_info_user)
/*
* Most generic write interface; can write in-band and/or out-of-band in various
* modes (see "struct mtd_write_req"). This ioctl is not supported for flashes
* without OOB, e.g., NOR flash.
*/
#define MEMWRITE _IOWR('M', 24, struct mtd_write_req)
/*
* Obsolete legacy interface. Keep it in order not to break userspace
* interfaces
*/
struct nand_oobinfo {
__u32 useecc;
__u32 eccbytes;
__u32 oobfree[8][2];
__u32 eccpos[32];
};
struct nand_oobfree {
__u32 offset;
__u32 length;
};
#define MTD_MAX_OOBFREE_ENTRIES 8
#define MTD_MAX_ECCPOS_ENTRIES 64
/*
* OBSOLETE: ECC layout control structure. Exported to user-space via ioctl
* ECCGETLAYOUT for backwards compatbility and should not be mistaken as a
* complete set of ECC information. The ioctl truncates the larger internal
* structure to retain binary compatibility with the static declaration of the
* ioctl. Note that the "MTD_MAX_..._ENTRIES" macros represent the max size of
* the user struct, not the MAX size of the internal struct nand_ecclayout.
*/
struct nand_ecclayout_user {
__u32 eccbytes;
__u32 eccpos[MTD_MAX_ECCPOS_ENTRIES];
__u32 oobavail;
struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
};
/**
* struct mtd_ecc_stats - error correction stats
*
* @corrected: number of corrected bits
* @failed: number of uncorrectable errors
* @badblocks: number of bad blocks in this partition
* @bbtblocks: number of blocks reserved for bad block tables
*/
struct mtd_ecc_stats {
__u32 corrected;
__u32 failed;
__u32 badblocks;
__u32 bbtblocks;
};
/*
* MTD file modes - for read/write access to MTD
*
* @MTD_FILE_MODE_NORMAL: OTP disabled, ECC enabled
* @MTD_FILE_MODE_OTP_FACTORY: OTP enabled in factory mode
* @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode
* @MTD_FILE_MODE_RAW: OTP disabled, ECC disabled
*
* These modes can be set via ioctl(MTDFILEMODE). The mode mode will be retained
* separately for each open file descriptor.
*
* Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW -
* raw access to the flash, without error correction or autoplacement schemes.
* Wherever possible, the MTD_OPS_* mode will override the MTD_FILE_MODE_* mode
* (e.g., when using ioctl(MEMWRITE)), but in some cases, the MTD_FILE_MODE is
* used out of necessity (e.g., `write()', ioctl(MEMWRITEOOB64)).
*/
enum mtd_file_modes {
MTD_FILE_MODE_NORMAL = MTD_OTP_OFF,
MTD_FILE_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
MTD_FILE_MODE_OTP_USER = MTD_OTP_USER,
MTD_FILE_MODE_RAW,
};
#endif /* __MTD_ABI_H__ */

1
linux/or1k/ioctlent.h.in Normal file
View File

@ -0,0 +1 @@
#include "../i386/ioctlent.h.in"

262
linux/or1k/syscallent.h Normal file
View File

@ -0,0 +1,262 @@
{ 2, 0, sys_io_setup, "io_setup" }, /* 0 */
{ 1, 0, sys_io_destroy, "io_destroy" }, /* 1 */
{ 3, 0, sys_io_submit, "io_submit" }, /* 2 */
{ 3, 0, sys_io_cancel, "io_cancel" }, /* 3 */
{ 5, 0, sys_io_getevents, "io_getevents" }, /* 4 */
{ 5, TF, sys_setxattr, "setxattr" }, /* 5 */
{ 5, TF, sys_setxattr, "lsetxattr" }, /* 6 */
{ 5, TD, sys_fsetxattr, "fsetxattr" }, /* 7 */
{ 4, TF, sys_getxattr, "getxattr" }, /* 8 */
{ 4, TF, sys_getxattr, "lgetxattr" }, /* 9 */
{ 4, TD, sys_fgetxattr, "fgetxattr" }, /* 10 */
{ 3, TF, sys_listxattr, "listxattr" }, /* 11 */
{ 3, TF, sys_listxattr, "llistxattr" }, /* 12 */
{ 3, TD, sys_flistxattr, "flistxattr" }, /* 13 */
{ 2, TF, sys_removexattr, "removexattr" }, /* 14 */
{ 2, TF, sys_removexattr, "lremovexattr" }, /* 15 */
{ 2, TD, sys_fremovexattr, "fremovexattr" }, /* 16 */
{ 2, TF, sys_getcwd, "getcwd" }, /* 17 */
{ 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 18 */
{ 2, TD, sys_eventfd2, "eventfd2" }, /* 19 */
{ 1, TD, sys_epoll_create1, "epoll_create1" }, /* 20 */
{ 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 21 */
{ 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 22 */
{ 1, TD, sys_dup, "dup" }, /* 23 */
{ 3, TD, sys_dup3, "dup3" }, /* 24 */
{ 3, TD, sys_fcntl, "fcntl64" }, /* 25 */
{ 1, TD, sys_inotify_init1, "inotify_init1" }, /* 26 */
{ 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 27 */
{ 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 28 */
{ 3, TD, sys_ioctl, "ioctl" }, /* 29 */
{ 3, 0, sys_ioprio_set, "ioprio_set" }, /* 30 */
{ 2, 0, sys_ioprio_get, "ioprio_get" }, /* 31 */
{ 2, TD, sys_flock, "flock" }, /* 32 */
{ 4, TD|TF, sys_mknodat, "mknodat" }, /* 33 */
{ 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 34 */
{ 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 35 */
{ 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 36 */
{ 5, TD|TF, sys_linkat, "linkat" }, /* 37 */
{ 4, TD|TF, sys_renameat, "renameat" }, /* 38 */
{ 2, TF, sys_umount2, "umount" }, /* 39 */
{ 5, TF, sys_mount, "mount" }, /* 40 */
{ 2, TF, sys_pivotroot, "pivot_root" }, /* 41 */
{ 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */
{ 3, TF, sys_statfs64, "statfs64" }, /* 43 */
{ 3, TD, sys_fstatfs64, "fstatfs64" }, /* 44 */
{ 3, TF, sys_truncate64, "truncate64" }, /* 45 */
{ 3, TD, sys_ftruncate64, "ftruncate64" }, /* 46 */
{ 6, TD, sys_fallocate, "fallocate" }, /* 47 */
{ 3, TD|TF, sys_faccessat, "faccessat" }, /* 48 */
{ 1, TF, sys_chdir, "chdir" }, /* 49 */
{ 1, TD, sys_fchdir, "fchdir" }, /* 50 */
{ 1, TF, sys_chroot, "chroot" }, /* 51 */
{ 2, TD, sys_fchmod, "fchmod" }, /* 52 */
{ 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 53 */
{ 5, TD|TF, sys_fchownat, "fchownat" }, /* 54 */
{ 3, TD, sys_fchown, "fchown" }, /* 55 */
{ 4, TD|TF, sys_openat, "openat" }, /* 56 */
{ 1, TD, sys_close, "close" }, /* 57 */
{ 0, 0, sys_vhangup, "vhangup" }, /* 58 */
{ 2, TD, sys_pipe2, "pipe2" }, /* 59 */
{ 4, TF, sys_quotactl, "quotactl" }, /* 60 */
{ 3, TD, sys_getdents64, "getdents64" }, /* 61 */
{ 5, TD, sys_llseek, "_llseek" }, /* 62 */
{ 3, TD, sys_read, "read" }, /* 63 */
{ 3, TD, sys_write, "write" }, /* 64 */
{ 3, TD, sys_readv, "readv" }, /* 65 */
{ 3, TD, sys_writev, "writev" }, /* 66 */
{ 5, TD, sys_pread, "pread64" }, /* 67 */
{ 5, TD, sys_pwrite, "pwrite64" }, /* 68 */
{ 5, TD, sys_preadv, "preadv" }, /* 69 */
{ 5, TD, sys_pwritev, "pwritev" }, /* 70 */
{ 4, TD|TN, sys_sendfile64, "sendfile" }, /* 71 */
{ 6, TD, sys_pselect6, "pselect6" }, /* 72 */
{ 5, TD, sys_ppoll, "ppoll" }, /* 73 */
{ 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 74 */
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 75 */
{ 6, TD, sys_splice, "splice" }, /* 76 */
{ 4, TD, sys_tee, "tee" }, /* 77 */
{ 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 78 */
{ 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 79 */
{ 2, TD, sys_fstat64, "fstat64" }, /* 80 */
{ 0, 0, sys_sync, "sync" }, /* 81 */
{ 1, TD, sys_fsync, "fsync" }, /* 82 */
{ 1, TD, sys_fdatasync, "fdatasync" }, /* 83 */
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 84 */
{ 2, TD, sys_timerfd_create, "timerfd_create" }, /* 85 */
{ 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 86 */
{ 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 87 */
{ 4, TD|TF, sys_utimensat, "utimensat" }, /* 88 */
{ 1, TF, sys_acct, "acct" }, /* 89 */
{ 2, 0, sys_capget, "capget" }, /* 90 */
{ 2, 0, sys_capset, "capset" }, /* 91 */
{ 1, 0, sys_personality, "personality" }, /* 92 */
{ 1, TP|SE, sys_exit, "exit" }, /* 93 */
{ 1, TP|SE, sys_exit, "exit_group" }, /* 94 */
{ 5, TP, sys_waitid, "waitid" }, /* 95 */
{ 1, 0, sys_set_tid_address, "set_tid_address" }, /* 96 */
{ 1, TP, sys_unshare, "unshare" }, /* 97 */
{ 6, 0, sys_futex, "futex" }, /* 98 */
{ 2, 0, sys_set_robust_list, "set_robust_list" }, /* 99 */
{ 3, 0, sys_get_robust_list, "get_robust_list" }, /* 100 */
{ 2, 0, sys_nanosleep, "nanosleep" }, /* 101 */
{ 2, 0, sys_getitimer, "getitimer" }, /* 102 */
{ 3, 0, sys_setitimer, "setitimer" }, /* 103 */
{ 4, 0, sys_kexec_load, "kexec_load" }, /* 104 */
{ 3, 0, sys_init_module, "init_module" }, /* 105 */
{ 2, 0, sys_delete_module, "delete_module" }, /* 106 */
{ 3, 0, sys_timer_create, "timer_create" }, /* 107 */
{ 2, 0, sys_timer_gettime, "timer_gettime" }, /* 108 */
{ 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 109 */
{ 4, 0, sys_timer_settime, "timer_settime" }, /* 110 */
{ 1, 0, sys_timer_delete, "timer_delete" }, /* 111 */
{ 2, 0, sys_clock_settime, "clock_settime" }, /* 112 */
{ 2, 0, sys_clock_gettime, "clock_gettime" }, /* 113 */
{ 2, 0, sys_clock_getres, "clock_getres" }, /* 114 */
{ 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 115 */
{ 3, 0, sys_syslog, "syslog" }, /* 116 */
{ 4, 0, sys_ptrace, "ptrace" }, /* 117 */
{ 2, 0, sys_sched_setparam, "sched_setparam" }, /* 118 */
{ 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 119 */
{ 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 120 */
{ 2, 0, sys_sched_getparam, "sched_getparam" }, /* 121 */
{ 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 122 */
{ 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 123 */
{ 0, 0, sys_sched_yield, "sched_yield" }, /* 124 */
{ 1, 0, sys_sched_get_priority_max, "sched_get_priority_max"}, /* 125 */
{ 1, 0, sys_sched_get_priority_min, "sched_get_priority_min"}, /* 126 */
{ 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval" }, /* 127 */
{ 0, 0, sys_restart_syscall, "restart_syscall" }, /* 128 */
{ 2, TS, sys_kill, "kill" }, /* 129 */
{ 2, TS, sys_kill, "tkill" }, /* 130 */
{ 3, TS, sys_tgkill, "tgkill" }, /* 131 */
{ 2, TS, sys_sigaltstack, "sigaltstack" }, /* 132 */
{ 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 133 */
{ 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 134 */
{ 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 135 */
{ 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 136 */
{ 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 137 */
{ 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 138 */
{ 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 139 */
{ 3, 0, sys_setpriority, "setpriority" }, /* 140 */
{ 2, 0, sys_getpriority, "getpriority" }, /* 141 */
{ 4, 0, sys_reboot, "reboot" }, /* 142 */
{ 2, 0, sys_setregid, "setregid" }, /* 143 */
{ 1, 0, sys_setgid, "setgid" }, /* 144 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 145 */
{ 1, 0, sys_setuid, "setuid" }, /* 146 */
{ 3, 0, sys_setresuid, "setresuid" }, /* 147 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 148 */
{ 3, 0, sys_setresgid, "setresgid" }, /* 149 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 150 */
{ 1, NF, sys_setfsuid, "setfsuid" }, /* 151 */
{ 1, NF, sys_setfsgid, "setfsgid" }, /* 152 */
{ 1, 0, sys_times, "times" }, /* 153 */
{ 2, 0, sys_setpgid, "setpgid" }, /* 154 */
{ 1, 0, sys_getpgid, "getpgid" }, /* 155 */
{ 1, 0, sys_getsid, "getsid" }, /* 156 */
{ 0, 0, sys_setsid, "setsid" }, /* 157 */
{ 2, 0, sys_getgroups, "getgroups" }, /* 158 */
{ 2, 0, sys_setgroups, "setgroups" }, /* 159 */
{ 1, 0, sys_uname, "uname" }, /* 160 */
{ 2, 0, sys_sethostname, "sethostname" }, /* 161 */
{ 2, 0, sys_setdomainname, "setdomainname" }, /* 162 */
{ 2, 0, sys_getrlimit, "oldgetrlimit" }, /* 163 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 164 */
{ 2, 0, sys_getrusage, "getrusage" }, /* 165 */
{ 1, 0, sys_umask, "umask" }, /* 166 */
{ 5, 0, sys_prctl, "prctl" }, /* 167 */
{ 3, 0, sys_getcpu, "getcpu" }, /* 168 */
{ 2, 0, sys_gettimeofday, "gettimeofday" }, /* 169 */
{ 2, 0, sys_settimeofday, "settimeofday" }, /* 170 */
{ 1, 0, sys_adjtimex, "adjtimex" }, /* 171 */
{ 0, 0, sys_getpid, "getpid" }, /* 172 */
{ 0, 0, sys_getppid, "getppid" }, /* 173 */
{ 0, NF, sys_getuid, "getuid" }, /* 174 */
{ 0, NF, sys_geteuid, "geteuid" }, /* 175 */
{ 0, NF, sys_getgid, "getgid" }, /* 176 */
{ 0, NF, sys_getegid, "getegid" }, /* 177 */
{ 0, 0, sys_gettid, "gettid" }, /* 178 */
{ 1, 0, sys_sysinfo, "sysinfo" }, /* 179 */
{ 4, 0, sys_mq_open, "mq_open" }, /* 180 */
{ 1, 0, sys_mq_unlink, "mq_unlink" }, /* 181 */
{ 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 182 */
{ 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 183 */
{ 2, 0, sys_mq_notify, "mq_notify" }, /* 184 */
{ 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 185 */
{ 4, TI, sys_msgget, "msgget" }, /* 186 */
{ 4, TI, sys_msgctl, "msgctl" }, /* 187 */
{ 4, TI, sys_msgrcv, "msgrcv" }, /* 188 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 189 */
{ 4, TI, sys_semget, "semget" }, /* 190 */
{ 4, TI, sys_semctl, "semctl" }, /* 191 */
{ 5, TI, sys_semtimedop, "semtimedop" }, /* 192 */
{ 4, TI, sys_semop, "semop" }, /* 193 */
{ 4, TI, sys_shmget, "shmget" }, /* 194 */
{ 4, TI, sys_shmctl, "shmctl" }, /* 195 */
{ 4, TI|TM|SI, sys_shmat, "shmat" }, /* 196 */
{ 4, TI|TM|SI, sys_shmdt, "shmdt" }, /* 197 */
{ 3, TN, sys_socket, "socket" }, /* 198 */
{ 4, TN, sys_socketpair, "socketpair" }, /* 199 */
{ 3, TN, sys_bind, "bind" }, /* 200 */
{ 2, TN, sys_listen, "listen" }, /* 201 */
{ 3, TN, sys_accept, "accept" }, /* 202 */
{ 3, TN, sys_connect, "connect" }, /* 203 */
{ 3, TN, sys_getsockname, "getsockname" }, /* 204 */
{ 3, TN, sys_getpeername, "getpeername" }, /* 205 */
{ 6, TN, sys_sendto, "sendto" }, /* 206 */
{ 6, TN, sys_recvfrom, "recvfrom" }, /* 207 */
{ 5, TN, sys_setsockopt, "setsockopt" }, /* 208 */
{ 5, TN, sys_getsockopt, "getsockopt" }, /* 209 */
{ 2, TN, sys_shutdown, "shutdown" }, /* 210 */
{ 3, TN, sys_sendmsg, "sendmsg" }, /* 211 */
{ 3, TN, sys_recvmsg, "recvmsg" }, /* 212 */
{ 4, TD, sys_readahead, "readahead" }, /* 213 */
{ 1, TM|SI, sys_brk, "brk" }, /* 214 */
{ 2, TM|SI, sys_munmap, "munmap" }, /* 215 */
{ 5, TM|SI, sys_mremap, "mremap" }, /* 216 */
{ 5, 0, sys_add_key, "add_key" }, /* 217 */
{ 4, 0, sys_request_key, "request_key" }, /* 218 */
{ 5, 0, sys_keyctl, "keyctl" }, /* 219 */
{ 5, TP, sys_clone, "clone" }, /* 220 */
{ 3, TF|TP|SE|SI, sys_execve, "execve" }, /* 221 */
{ 6, TD|TM|SI, sys_mmap_pgoff, "mmap2" }, /* 222 */
{ 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 223 */
{ 2, TF, sys_swapon, "swapon" }, /* 224 */
{ 1, TF, sys_swapoff, "swapoff" }, /* 225 */
{ 3, TM|SI, sys_mprotect, "mprotect" }, /* 226 */
{ 3, TM, sys_msync, "msync" }, /* 227 */
{ 2, TM, sys_mlock, "mlock" }, /* 228 */
{ 2, TM, sys_munlock, "munlock" }, /* 229 */
{ 1, TM, sys_mlockall, "mlockall" }, /* 230 */
{ 0, TM, sys_munlockall, "munlockall" }, /* 231 */
{ 3, TM, sys_mincore, "mincore" }, /* 232 */
{ 3, TM, sys_madvise, "madvise" }, /* 233 */
{ 5, TM|SI, sys_remap_file_pages, "remap_file_pages" }, /* 234 */
{ 6, TM, sys_mbind, "mbind" }, /* 235 */
{ 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 236 */
{ 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 237 */
{ 5, TM, sys_migrate_pages, "migrate_pages" }, /* 238 */
{ 6, TM, sys_move_pages, "move_pages" }, /* 239 */
{ 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 240 */
{ 5, TD, sys_perf_event_open, "perf_event_open" }, /* 241 */
{ 4, TN, sys_accept4, "accept4" }, /* 242 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 243 */
{ 6, NF, sys_or1k_atomic, "or1k_atomic" }, /* 244 */
[245 ... 259] = { },
{ 4, TP, sys_wait4, "wait4" }, /* 260 */
{ 4, 0, sys_prlimit64, "prlimit64" }, /* 261 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 262 */
{ 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 263 */
{ 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 264 */
{ 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 265 */
{ 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 266 */
{ 1, TD, sys_syncfs, "syncfs" }, /* 267 */
{ 2, TD, sys_setns, "setns" }, /* 268 */
{ 4, TN, sys_sendmmsg, "sendmmsg" }, /* 269 */
{ 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 270 */
{ 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 271 */
{ 5, 0, sys_kcmp, "kcmp" }, /* 272 */
{ 3, TD, sys_finit_module, "finit_module" }, /* 273 */

69
linux/personality.h Normal file
View File

@ -0,0 +1,69 @@
#ifndef _LINUX_PERSONALITY_H
#define _LINUX_PERSONALITY_H
/*
* Flags for bug emulation.
*
* These occupy the top three bytes.
*/
enum {
UNAME26 = 0x0020000,
ADDR_NO_RANDOMIZE = 0x0040000, /* disable randomization of VA space */
FDPIC_FUNCPTRS = 0x0080000, /* userspace function ptrs point to descriptors
* (signal handling)
*/
MMAP_PAGE_ZERO = 0x0100000,
ADDR_COMPAT_LAYOUT = 0x0200000,
READ_IMPLIES_EXEC = 0x0400000,
ADDR_LIMIT_32BIT = 0x0800000,
SHORT_INODE = 0x1000000,
WHOLE_SECONDS = 0x2000000,
STICKY_TIMEOUTS = 0x4000000,
ADDR_LIMIT_3GB = 0x8000000,
};
/*
* Security-relevant compatibility flags that must be
* cleared upon setuid or setgid exec:
*/
#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC | \
ADDR_NO_RANDOMIZE | \
ADDR_COMPAT_LAYOUT | \
MMAP_PAGE_ZERO)
/*
* Personality types.
*
* These go in the low byte. Avoid using the top bit, it will
* conflict with error returns.
*/
enum {
PER_LINUX = 0x0000,
PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT,
PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS,
PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS |
WHOLE_SECONDS | SHORT_INODE,
PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,
PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE,
PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS,
PER_BSD = 0x0006,
PER_SUNOS = 0x0006 | STICKY_TIMEOUTS,
PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
PER_LINUX32 = 0x0008,
PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB,
PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS,/* IRIX5 32-bit */
PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS,/* IRIX6 new 32-bit */
PER_IRIX64 = 0x000b | STICKY_TIMEOUTS,/* IRIX6 64-bit */
PER_RISCOS = 0x000c,
PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
PER_OSF4 = 0x000f, /* OSF/1 v4 */
PER_HPUX = 0x0010,
PER_MASK = 0x00ff,
};
#endif /* _LINUX_PERSONALITY_H */

View File

@ -1,36 +1,18 @@
{"asm-generic/ioctls.h", "TCGETS", 0x5401},
{"asm-generic/ioctls.h", "TCSETS", 0x5402},
{"asm-generic/ioctls.h", "TCSETSW", 0x5403},
{"asm-generic/ioctls.h", "TCSETSF", 0x5404},
{"asm-generic/ioctls.h", "TCGETA", 0x5405},
{"asm-generic/ioctls.h", "TCSETA", 0x5406},
{"asm-generic/ioctls.h", "TCSETAW", 0x5407},
{"asm-generic/ioctls.h", "TCSETAF", 0x5408},
{"asm-generic/ioctls.h", "TCSBRK", 0x5409},
{"asm-generic/ioctls.h", "TCXONC", 0x540a},
{"asm-generic/ioctls.h", "TCFLSH", 0x540b},
{"asm/ioctls.h", "TIOCEXCL", 0x540c},
{"asm/ioctls.h", "TIOCNXCL", 0x540d},
{"asm/ioctls.h", "TIOCSCTTY", 0x540e},
{"asm-generic/ioctls.h", "TIOCGPGRP", 0x540f},
{"asm-generic/ioctls.h", "TIOCSPGRP", 0x5410},
{"asm-generic/ioctls.h", "TIOCOUTQ", 0x5411},
{"asm/ioctls.h", "TIOCSTI", 0x5412},
{"asm-generic/ioctls.h", "TIOCGWINSZ", 0x5413},
{"asm-generic/ioctls.h", "TIOCSWINSZ", 0x5414},
{"asm/ioctls.h", "TIOCMGET", 0x5415},
{"asm/ioctls.h", "TIOCMBIS", 0x5416},
{"asm/ioctls.h", "TIOCMBIC", 0x5417},
{"asm/ioctls.h", "TIOCMSET", 0x5418},
{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419},
{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a},
{"asm-generic/ioctls.h", "FIONREAD", 0x541b},
{"asm/ioctls.h", "TIOCLINUX", 0x541c},
{"asm/ioctls.h", "TIOCCONS", 0x541d},
{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
{"asm/ioctls.h", "TIOCPKT", 0x5420},
{"asm-generic/ioctls.h", "FIONBIO", 0x5421},
{"asm/ioctls.h", "TIOCNOTTY", 0x5422},
{"asm/ioctls.h", "TIOCSETD", 0x5423},
{"asm/ioctls.h", "TIOCGETD", 0x5424},
@ -38,22 +20,11 @@
{"asm/ioctls.h", "TIOCSBRK", 0x5427},
{"asm/ioctls.h", "TIOCCBRK", 0x5428},
{"asm/ioctls.h", "TIOCGSID", 0x5429},
{"asm-generic/ioctls.h", "TCGETS2", 0x542a},
{"asm-generic/ioctls.h", "TCSETS2", 0x542b},
{"asm-generic/ioctls.h", "TCSETSW2", 0x542c},
{"asm-generic/ioctls.h", "TCSETSF2", 0x542d},
{"asm/ioctls.h", "TIOCGRS485", 0x542e},
{"asm/ioctls.h", "TIOCSRS485", 0x542f},
{"asm/ioctls.h", "TIOCGPTN", 0x5430},
{"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
{"asm-generic/ioctls.h", "TCGETX", 0x5432},
{"asm-generic/ioctls.h", "TCSETX", 0x5433},
{"asm-generic/ioctls.h", "TCSETXF", 0x5434},
{"asm-generic/ioctls.h", "TCSETXW", 0x5435},
{"asm/ioctls.h", "TIOCSIG", 0x5436},
{"asm-generic/ioctls.h", "FIONCLEX", 0x5450},
{"asm-generic/ioctls.h", "FIOCLEX", 0x5451},
{"asm-generic/ioctls.h", "FIOASYNC", 0x5452},
{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
@ -65,7 +36,6 @@
{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
{"asm-generic/ioctls.h", "FIOQSIZE", 0x5460},
{"asm/ioctls.h", "FIOCLEX", 0x6601},
{"asm/ioctls.h", "FIONCLEX", 0x6602},
{"asm/ioctls.h", "FIOASYNC", 0x667d},

Some files were not shown because too many files have changed in this diff Show More