Upgrade to upstream tip of tree strace.
Change-Id: I56ccbfbb64885c61f160145f181e42dab78adefb
diff --git a/Android.mk b/Android.mk
index 279aa30..902e659 100644
--- a/Android.mk
+++ b/Android.mk
@@ -6,23 +6,31 @@
strace_version := $(shell grep Version $(LOCAL_PATH)/strace.spec | cut -d " " -f 2)
LOCAL_SRC_FILES := \
+ 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 \
loop.c \
mem.c \
mtd.c \
net.c \
pathtrace.c \
- proc.c \
process.c \
+ ptp.c \
quota.c \
+ reboot.c \
resource.c \
+ scsi.c \
signal.c \
sock.c \
strace.c \
@@ -32,6 +40,7 @@
term.c \
time.c \
util.c \
+ vsprintf.c \
LOCAL_SHARED_LIBRARIES :=
@@ -80,6 +89,7 @@
-DHAVE_STATFS64=1 \
-DHAVE_STDBOOL_H=1 \
-DHAVE_STRERROR=1 \
+ -DHAVE_STRUCT_FLOCK64=1 \
-DHAVE_STRUCT_MSGHDR_MSG_CONTROL=1 \
-DHAVE_STRUCT_SIGCONTEXT \
-DHAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID=1 \
@@ -97,17 +107,11 @@
-DVERSION='"$(strace_version)"' \
-DSIZEOF_LONG_LONG=8 \
-DSTDC_HEADERS=1 \
+ -DSTRACE_KNOWS_ONLY_EABI=1 \
-D_LFS64_LARGEFILE=1 \
LOCAL_CFLAGS += -D_GNU_SOURCE=1 -D_POSIX_SOURCE=1
-# bionic doesn't have fputs_unlocked.
-LOCAL_CFLAGS += -Dfputs_unlocked=fputs
-# bionic doesn't have fopen64.
-LOCAL_CFLAGS += -Dfopen64=fopen
-# uapi's asm/sigcontext.h doesn't have sigcontext_struct.
-LOCAL_CFLAGS += -Dsigcontext_struct=sigcontext
-
LOCAL_CFLAGS_64 += -DSIZEOF_LONG=8 -DSIZEOF_RLIM_T=8
LOCAL_CFLAGS_32 += -DSIZEOF_LONG=4 -DSIZEOF_RLIM_T=4 -DHAVE_STAT64=1
diff --git a/Android.patch b/Android.patch
deleted file mode 100644
index b6b34e2..0000000
--- a/Android.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff -r -u -d /home/enh/Downloads/strace-4.8/defs.h ./defs.h
---- /home/enh/Downloads/strace-4.8/defs.h 2013-05-14 07:10:42.000000000 -0700
-+++ ./defs.h 2014-01-09 14:34:13.520344153 -0800
-@@ -222,7 +222,7 @@
- # define PTRACE_EVENT_EXIT 6
- #endif
-
--#if !defined(__GLIBC__)
-+#if !defined(__GLIBC__) && !defined(__BIONIC__)
- # define PTRACE_PEEKUSER PTRACE_PEEKUSR
- # define PTRACE_POKEUSER PTRACE_POKEUSR
- #endif
-diff -r -u -d /home/enh/Downloads/strace-4.8/ioctl.c ./ioctl.c
---- /home/enh/Downloads/strace-4.8/ioctl.c 2013-05-02 15:50:55.000000000 -0700
-+++ ./ioctl.c 2014-01-08 17:40:04.763917183 -0800
-@@ -86,8 +86,10 @@
- case 0x03:
- case 0x12:
- return block_ioctl(tcp, code, arg);
-+#ifndef HAVE_ANDROID_OS
- case 0x22:
- return scsi_ioctl(tcp, code, arg);
-+#endif
- case 'L':
- return loop_ioctl(tcp, code, arg);
- case 'M':
-diff -r -u -d /home/enh/Downloads/strace-4.8/util.c ./util.c
---- /home/enh/Downloads/strace-4.8/util.c 2013-05-06 11:23:01.000000000 -0700
-+++ ./util.c 2014-01-08 17:40:04.803916706 -0800
-@@ -46,7 +46,9 @@
-
- #ifdef HAVE_SYS_REG_H
- # include <sys/reg.h>
--# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-+# ifndef PTRACE_PEEKUSR
-+# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-+# endif
- #elif defined(HAVE_LINUX_PTRACE_H)
- # undef PTRACE_SYSCALL
- # ifdef HAVE_STRUCT_IA64_FPREG
diff --git a/COPYRIGHT b/COPYRIGHT
deleted file mode 100644
index e9078d3..0000000
--- a/COPYRIGHT
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
-Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
-Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
-Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
-Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
-Copyright (C) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
-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.
diff --git a/CREDITS b/CREDITS
deleted file mode 100644
index 399bcaf..0000000
--- a/CREDITS
+++ /dev/null
@@ -1,130 +0,0 @@
-The primary authors of strace were:
-
- Paul Kranenburg <pk@cs.few.eur.nl>
- Branko Lankester <branko@hacktic.nl>
- Rick Sladkey <jrs@world.std.com>
-
-These people have contributed to strace. Some have reported problems, others
-have contributed improvements to the documentation, actual code, provided
-information, provided resources, or helped to port strace to new systems.
-Those contributions are described in the version control logs and ChangeLog-CVS
-file. If your name has been left out, if you'd rather not be listed, or if
-you'd prefer a different address be used, please send a note to the
-strace-devel@lists.sourceforge.net mailing list.
-
- Aaron Ucko <ucko@vax1.rockhurst.edu>
- Adrien Kunysz <adrien@kunysz.be>
- Andi Kleen <ak@linux.intel.com>
- Andreas Schwab <schwab@linux-m68k.org>
- Anton Blanchard <anton@samba.org>
- Arkadiusz Miskiewicz <misiek@pld.org.pl>
- Bai Weidong <baiwd@cn.fujitsu.com>
- Ben Noordhuis <info@bnoordhuis.nl>
- Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
- Bo Kullmar <bk@kullmar.se>
- Cai Fei <caifei@cn.fujitsu.com>
- Carlos O'Donell <carlos@systemhalted.org>
- Carmelo AMOROSO <carmelo.amoroso@st.com>
- Chris Metcalf <cmetcalf@tilera.com>
- Chris Zankel <chris@zankel.net>
- Christian Svensson <blue@cmd.nu>
- D.J. Barrow <djbarrow@de.ibm.com>
- Damir Shayhutdinov <damir@altlinux.ru>
- Daniel P. Berrange <berrange@redhat.com>
- David Daney <ddaney@caviumnetworks.com>
- David Mosberger-Tang <davidm@hpl.hp.com>
- David S. Miller <davem@caip.rutgers.edu>
- David Wilder <wilder@us.ibm.com>
- David Woodhouse <dwmw2@redhat.com>
- Denys Vlasenko <vda.linux@googlemail.com>
- Dmitry V. Levin <ldv@altlinux.org>
- Douglas Mencken <dougmencken@gmail.com>
- Edgar E. Iglesias <edgar.iglesias@gmail.com>
- Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
- Florian Lohoff <flo@rfc822.org>
- Frederik Schüler <fs@debian.org>
- Gabor Gombas <gombasg@sztaki.hu>
- Ganesan Rajagopal <rganesan@myrealbox.com>
- Gaël Roualland <gael.roualland@iname.com>
- Grant Edwards <grant.b.edwards@gmail.com>
- Greg Banks <gbanks@pocketpenguins.com>
- H.J. Lu <hongjiu.lu@intel.com>
- Heiko Carstens <heiko.carstens@de.ibm.com>
- Henrik Storner <storner@osiris.ping.dk>
- Holger Hans Peter Freyther <holger@freyther.de>
- Jakub Bogusz <qboosh@pld-linux.org>
- Jakub Jelinek <jj@ultra.linux.cz>
- James Hogan <james.hogan@imgtec.com>
- Jan Kratochvil <jan.kratochvil@redhat.com>
- Jeff Mahoney <jeffm@suse.com>
- Joe Ilacqua <spike@world.std.com>
- Johannes Stezenbach <js@sig21.net>
- John Hughes <john@Calva.COM>
- John Spencer <maillist-strace@barfooze.de>
- Ju"rgen Fluk <louis@marco.de>
- Juergen Weigert <jnweiger@immd4.informatik.uni-erlangen.de>
- Keith Thompson <kst@alsys.com>
- Kirill A. Shutemov <kirill@shutemov.name>
- Kyle McMartin <kyle@mcmartin.ca>
- Lai JiangShan <laijs@cn.fujitsu.com>
- Leonard N. Zubkoff <lnz@dandelion.com>
- Linus Torvalds <Linus.Torvalds@cs.helsinki.fi>
- Lupe Christoph <lupe@alanya.isar.muc.de>
- Mark Wielaard <mjw@redhat.com>
- Marty Leisner <leisner@sdsp.mc.xerox.com>
- Matt Day <mday@artisoft.com>
- Matthias Pfaller <leo@dachau.marco.de>
- Maxim Shchetynin <maxim@de.ibm.com>
- Maxin B. John <maxin.john@enea.com>
- Michael E Chastain <mec@duracef.shout.net>
- Michael Holzheu <holzheu@de.ibm.com>
- Michail Litvak <mci@owl.openwall.com>
- Michal Ludvig <mludvig@suse.cz>
- Mike Frysinger <vapier@gentoo.org>
- Mike Stroyan <mike.stroyan@hp.com>
- Muttley Meen <muttley.meen@gmail.com>
- Namhyung Kim <namhyung.kim@lge.com>
- Nate Eldredge <nate@cartsys.com>
- Nate Sammons <nate@users.sourceforge.net>
- Neil Campbell <lists@thebatcave.org.uk>
- Paolo Bonzini <pbonzini@redhat.com>
- Paul Mundt <lethal@linux-sh.org>
- Pavel Machek <pavel@ucw.cz>
- Peter Jones <pjones@redhat.com>
- Pádraig Brady <P@draigBrady.com>
- Rajeev V. Pillai <rajeevvp@gmail.com>
- Ralf Baechle <ralf@linux-mips.org>
- Randolph Chung <tausq@debian.org>
- Reuben Sumner <rasumner@undergrad.math.uwaterloo.ca>
- Richard Braakman <dark@xs4all.nl>
- Richard Henderson <richard@twiddle.tamu.edu>
- Richard Hirst <rhirst@linuxcare.com>
- Roland Borde <bo@uebemc.siemens.de>
- Roland McGrath <roland@redhat.com>
- Sami Farin <safari@u.safari.iki.fi>
- Scott Tsai <scottt958@yahoo.com.tw>
- Sebastian Pipping <sebastian@pipping.org>
- Sergei Trofimovich <slyfox@gentoo.org>
- Simon Murray <simon@transitive.com>
- Solar Designer <solar@openwall.com>
- Srinivasa Ds <srinivasa@in.ibm.com>
- Stanislav Brabec <sbrabec@suse.cz>
- Steve Bennett <steveb@workware.net.au>
- Steve McIntyre <steve.mcintyre@linaro.org>
- Thanh Ma <tma@encore.com>
- Thiemo Seufer <ths@networkno.de>
- Thomas Bogendoerfer <tsbogend@bigbug.franken.de>
- Tim Yamin <plasmaroo@gentoo.org>
- Timo Lindfors <timo.lindfors@iki.fi>
- Tom Dyas <tdyas@eden.rutgers.edu>
- Tommi Rantala <ext-tommi.1.rantala@nokia.com>
- Topi Miettinen <Topi.Miettinen@nic.fi>
- Ulrich Drepper <drepper@redhat.com>
- Wang Chao <wang.chao@cn.fujitsu.com>
- Wichert Akkerman <wichert@deephackmode.org>
- Xiaoning Ding <dingxn@gmail.com>
- Yang Zhiguo <yzgcsu@cn.fujitsu.com>
- Zach Brown <zach.brown@oracle.com>
- Zev Weiss <zev@bewilderbeest.net>
- Zhang Le <zhilg@users.sourceforge.net>
- Марк Коренберг <socketpair@gmail.com>
diff --git a/CREDITS.in b/CREDITS.in
new file mode 100644
index 0000000..a614b20
--- /dev/null
+++ b/CREDITS.in
@@ -0,0 +1,90 @@
+The primary authors of strace were:
+
+ Paul Kranenburg <pk@cs.few.eur.nl>
+ Branko Lankester <branko@hacktic.nl>
+ Rick Sladkey <jrs@world.std.com>
+
+These people have contributed to strace. Some have reported problems, others
+have contributed improvements to the documentation, actual code, provided
+information, provided resources, or helped to port strace to new systems.
+Those contributions are described in the version control logs and ChangeLog-CVS
+file. If your name has been left out, if you'd rather not be listed, or if
+you'd prefer a different address be used, please send a note to the
+strace-devel@lists.sourceforge.net mailing list.
+
+##<
+## There is no need to list here any name that appears as an Author in
+## "git log" output. Those are automatically added when this template
+## is used to generate the CREDITS file.
+##>
+Aaron Ucko ucko@vax1.rockhurst.edu
+Adrien Kunysz adrien@kunysz.be
+Anton Blanchard anton@samba.org
+Arkadiusz Miskiewicz misiek@pld.org.pl
+Bai Weidong baiwd@cn.fujitsu.com
+Bo Kullmar bk@kullmar.se
+Cai Fei caifei@cn.fujitsu.com
+D.J. Barrow djbarrow@de.ibm.com
+David Mosberger-Tang davidm@hpl.hp.com
+David S. Miller davem@caip.rutgers.edu
+David Wilder wilder@us.ibm.com
+David Woodhouse dwmw2@redhat.com
+Douglas Mencken dougmencken@gmail.com
+Fernando Luis Vazquez Cao fernando@oss.ntt.co.jp
+Florian Lohoff flo@rfc822.org
+Gabor Gombas gombasg@sztaki.hu
+Ganesan Rajagopal rganesan@myrealbox.com
+Gaël Roualland gael.roualland@iname.com
+Greg Banks gbanks@pocketpenguins.com
+Henrik Storner storner@osiris.ping.dk
+Jakub Jelinek jj@ultra.linux.cz
+Jeff Mahoney jeffm@suse.com
+Joe Ilacqua spike@world.std.com
+Johannes Stezenbach js@sig21.net
+Ju"rgen Fluk louis@marco.de
+Juergen Weigert jnweiger@immd4.informatik.uni-erlangen.de
+Keith Thompson kst@alsys.com
+Kyle McMartin kyle@mcmartin.ca
+Lai JiangShan laijs@cn.fujitsu.com
+Leonard N. Zubkoff lnz@dandelion.com
+Linus Torvalds Linus.Torvalds@cs.helsinki.fi
+Lupe Christoph lupe@alanya.isar.muc.de
+Marty Leisner leisner@sdsp.mc.xerox.com
+Matt Day mday@artisoft.com
+Matthias Pfaller leo@dachau.marco.de
+Maxim Shchetynin maxim@de.ibm.com
+Michael E Chastain mec@duracef.shout.net
+Michael Holzheu holzheu@de.ibm.com
+Michail Litvak mci@owl.openwall.com
+Mike Stroyan mike.stroyan@hp.com
+Muttley Meen muttley.meen@gmail.com
+Nate Eldredge nate@cartsys.com
+Paul Mundt lethal@linux-sh.org
+Peter Jones pjones@redhat.com
+Pádraig Brady P@draigBrady.com
+Rajeev V. Pillai rajeevvp@gmail.com
+Randolph Chung tausq@debian.org
+Reuben Sumner rasumner@undergrad.math.uwaterloo.ca
+Richard Braakman dark@xs4all.nl
+Richard Henderson richard@twiddle.tamu.edu
+Richard Hirst rhirst@linuxcare.com
+Roland Borde bo@uebemc.siemens.de
+Sami Farin safari@u.safari.iki.fi
+Scott Tsai scottt958@yahoo.com.tw
+Simon Murray simon@transitive.com
+Solar Designer solar@openwall.com
+Srinivasa Ds srinivasa@in.ibm.com
+Steve Bennett steveb@workware.net.au
+Thanh Ma tma@encore.com
+Thiemo Seufer ths@networkno.de
+Thomas Bogendoerfer tsbogend@bigbug.franken.de
+Tim Yamin plasmaroo@gentoo.org
+Timo Lindfors timo.lindfors@iki.fi
+Tom Dyas tdyas@eden.rutgers.edu
+Tommi Rantala ext-tommi.1.rantala@nokia.com
+Topi Miettinen Topi.Miettinen@nic.fi
+Xiaoning Ding dingxn@gmail.com
+Yang Zhiguo yzgcsu@cn.fujitsu.com
+Zach Brown zach.brown@oracle.com
+Zhang Le zhilg@users.sourceforge.net
+Марк Коренберг socketpair@gmail.com
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index c135d85..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,7507 +0,0 @@
-2013-06-03 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- Prepare for 4.8 release.
- * NEWS: Update for 4.8 release.
- * debian/changelog: 4.8-1.
- * strace.spec: 4.8-1.
-
-2013-06-02 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- Fix "make dist" regression introduced by commit v4.7-184-gd648f29.
- * Makefile.am (EXTRA_DIST): Add linux/ubi-user.h.
-
-2013-05-28 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-23 Chris Metcalf <cmetcalf@tilera.com>
-
- 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.
-
- 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.
-
-2013-05-17 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2013-05-17 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- Update PTRACE_O_* constants.
- * process.c (ptrace_setoptions_flags): Sync with Linux 3.9.
-
- Update AF_*, PF_*, MSG_*, and TCP_* constants.
- * net.c (domains, addrfams, protocols, socktcpoptions): Sync with
- Linux 3.9.
-
-2013-05-14 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- Update PR_* constants.
- * process.c (prctl_options): Add PR_SET_PTRACER.
-
-2013-05-14 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
-2013-05-13 Daniel P. Berrange <berrange@redhat.com>
-
- 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.
-
-2013-05-11 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-10 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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-08 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- tests/net: fix portability issues.
- * tests/net-accept-connect.c: Fix address length passed to bind()
- and connect().
- * tests/net: Update regexps.
-
- 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.
-
- 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-07 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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 Mike Frysinger <vapier@gentoo.org>
-
- mips: fix build regression.
- The recent commit (2690fadc8b35190dddd29274a7405bac13adc469) 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 James Hogan <james.hogan@imgtec.com>
-
- 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.
-
- 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.
-
-2013-05-07 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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-06 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Chris Zankel <chris@zankel.net>
-
- 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.
-
-2013-05-06 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- tests/stat: enhance regexps.
- * tests/stat: Enhance regexps that check tracing of stat/stat64 and
- fstatat/fstatat64 syscalls.
-
-2013-05-06 Chris Metcalf <cmetcalf@tilera.com>
-
- 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.
-
-2013-05-06 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Mike Frysinger <vapier@gentoo.org>
-
- 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 Chris Metcalf <cmetcalf@tilera.com>
-
- 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.
-
-2013-05-06 Mike Frysinger <vapier@gentoo.org>
-
- 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-05 Mike Frysinger <vapier@gentoo.org>
-
- s390: fix # of args truncate64/ftruncate64 takes.
- * linux/s390/syscallent.h: Change nargs to 3 for truncate64/ftruncate64.
-
- 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-04 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Mike Frysinger <vapier@gentoo.org>
-
- Fix building for sparc64 targets.
- * util.c (printllval): Handle SPARC64 define.
-
- Fix building for mips n64 targets.
- * util.c (printllval): Handle LINUX_MIPSN64 define.
-
-2013-05-03 Dmitry V. Levin <ldv@altlinux.org>
-
- hppa: fix stat64 and fstat64 decoding.
- * file.c [HPPA]: Do not redefine stat64 to hpux_stat64.
-
- 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-02 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
- 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.
-
- 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 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Mike Frysinger <vapier@gentoo.org>
-
- tests: stat: fix clean up of sample file.
- * tests/stat: Also rm the sample file at the end of the test.
-
- Ignore more files.
- * .gitignore: Add gdb related files.
- * tests/.gitignore: Ignore test logs.
-
-2013-05-02 Dmitry V. Levin <ldv@altlinux.org>
-
- x32: fix decoding of i386 truncate and ftruncate syscalls.
- * linux/x32/syscallent1.h: Remove sys_*truncate64 redirections.
-
- x32: fix printllval-based decoders of i386 syscalls.
- * util.c (printllval) [X32]: Handle i386 personality.
-
- tests: add basic test for ftruncate, lseek and stat family syscalls.
- * tests/stat: New test.
- * tests/Makefile.am (TESTS): Add stat.
-
-2013-05-01 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- x86_64: decode __old_kernel_stat based syscalls.
- * linux/x86_64/syscallent1.h: Remove sys_old*stat redirections.
-
- 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 James Hogan <james.hogan@imgtec.com>
-
- 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.
-
- 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.
-
-2013-05-01 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
- 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.
-
-2013-04-30 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- Makefile.am: sort long lists to ease maintenance.
- * Makefile.am (strace_SOURCES, EXTRA_DIST): Sort, place one list element
- per line.
-
- 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.
-
- build: fix "make dist" regression introduced by commit v4.7-29-g17e3860.
- * Makefile.am (EXTRA_DIST): Add linux/ioctlent-filter.awk.
-
-2013-04-30 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2013-03-31 Zev Weiss <zev@bewilderbeest.net>
-
- 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.
-
-2013-03-30 Andreas Schwab <schwab@suse.de>
-
- 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.
-
- AArch64: Fix printing of long long value.
- * util.c (printllval): Fix printing of long long values on
- AArch64.
-
-2013-03-27 Dmitry V. Levin <ldv@altlinux.org>
-
- Update PR_* constants.
- * process.c (prctl_options): Add more PR_* constants from linux/prctl.h.
-
-2013-03-25 Chris Zankel <chris@zankel.net>
-
- 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.
-
-2013-03-22 Denys Vlasenko <vda.linux@googlemail.com>
-
- Add example script which builds static (possibly cross-compiled) strace.
-
-2013-03-21 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-20 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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-18 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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 Maxin B. John <maxin.john@enea.com>
-
- 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.
-
-2013-03-18 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- Include <sys/uio.h> and <elf.h> on all architectures.
- * syscall.c: Include <sys/uio.h> and <elf.h> on all architectures.
-
- x86-64: enhance PTRACE_GETREGSET test.
- * syscall.c (get_regs) [X86_64]: Check whether PTRACE_GETREGSET
- works regardless of the kernel version.
-
- x32: use PTRACE_GETREGSET unconditionally.
- * syscall.c (get_regs) [X32]: Assume that PTRACE_GETREGSET always works
- regardless of the kernel version.
-
- x86-64, x32: do not include linux/ptrace.h unnecessarily.
- * syscall.c [X86_64 || X32]: Stop including linux/ptrace.h.
-
- i386, tile, x32: do not redefine ptrace prototype.
- * defs.h [I386 || TILE || X32]: Use ptrace prototype from sys/ptrace.h.
-
- 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-14 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-07 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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
-
-2013-03-06 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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).
-
- Makefile: add commented-out tweak to generate link map.
-
- 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
-
-2013-03-05 Denys Vlasenko <vda.linux@googlemail.com>
-
- Fix wrongly indented closing curly brace. No code changes.
-
- strace_vfprintf: if malloc fails, exit gracefully.
-
-2013-03-05 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- Emit better message for ERESTARTNOHAND return.
-
- 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
-
- Fix printstrbufarg's address argument to be long, not int.
-
- Remove variable tracing_paths and check in pathtrace_match.
-
- 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
-
- metag,or1k: whitesace style fix. no code changes.
-
- 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
-
-2013-03-05 James Hogan <james.hogan@imgtec.com>
-
- 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.
-
- Cc: Christian Svensson <blue@cmd.nu>
-
-2013-03-01 Denys Vlasenko <vda.linux@googlemail.com>
-
- umovestr: speed up check for NUL byte in the fetched word.
-
-2013-03-01 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Chris Metcalf <cmetcalf@tilera.com>
-
- 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.
-
-2013-02-27 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2013-02-26 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2013-02-26 Ben Noordhuis <info@bnoordhuis.nl>
-
- 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.
-
-2013-02-26 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- Shorten help text - no need to show deprecated option -F.
-
-2013-02-23 Denys Vlasenko <vda.linux@googlemail.com>
-
- Merge adjacent tprint's.
-
- Correct i > MAX_NSYSCALLS commparison: should be i >= MAX_NSYSCALLS.
-
-2013-02-22 Denys Vlasenko <vda.linux@googlemail.com>
-
- Fix wrong offset display in dumpstr.
- BTW, the new code from prev commit is 5 times faster
- than old one :)
-
- 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.
-
- 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
-
- 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".
-
- 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
-
-2013-02-21 Denys Vlasenko <vda.linux@googlemail.com>
-
- Remove unused QUAL_FAULT code (was used by non-Linux code only).
-
- 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
-
- 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].
-
- 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.
-
-2013-02-20 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
-2013-02-19 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- Improve comment text. No code changes.
-
- 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.
-
- 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.
-
- 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.
-
-2013-02-18 Denys Vlasenko <vda.linux@googlemail.com>
-
- Remove unused function sys_mmap64.
- No wonder that it is unused.
- It's code looked quite questionable.
-
- * mem.c (sys_mmap64): Remove this function.
-
- 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.
-
- 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.
-
- 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.
-
-2013-02-17 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- Use explicit long type instead of off_t.
- * file.c (sys_lseek): Use long instead of off_t.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- Cosmetic fixes to syscall tables, no code changes.
-
-2013-02-16 Denys Vlasenko <vda.linux@googlemail.com>
-
- Make linux/mips/syscallent.h smaller.
- * linux/mips/syscallent.h: Remove trailing empty elements.
- Compactify huge stretches of NULL elements in the middle.
-
- 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.
-
- Mass rename of SCNO_IN_RANGE define to SCNO_IS_VALID.
-
- 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.
-
-2013-02-15 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- Remove unnecessary "return 0" statements.
- * util.c (change_syscall): Remove dummy "return 0"s.
-
-2013-02-14 Denys Vlasenko <vda.linux@googlemail.com>
-
- x86: fix required kernel version for GETREGSET.
- * syscall.c (get_regs): [X86] Use GETREGSET only if kernel >= 2.6.35
-
- Whitespace fix, no code changes.
-
-2013-02-14 Christian Svensson <blue@cmd.nu>
-
- 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).
-
-2013-02-14 Denys Vlasenko <vda.linux@googlemail.com>
-
- [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.
-
-2013-02-13 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
- Decode struct iov in PTRACE_GET/SETREGSET.
- * process.c (sys_ptrace): Decode struct iov in PTRACE_GET/SETREGSET.
-
-2013-02-12 Denys Vlasenko <vda.linux@googlemail.com>
-
- Unify representations of struct user fields for subarchitectures.
- * process.c: Unify MIPS and LINUX_MIPSN32, and SH and SH64 parts of
- struct_user_offsets[].
-
- 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.
-
- 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.
-
- 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].
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
-2013-02-11 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2013-02-09 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2013-02-08 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
-2013-02-07 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2013-02-06 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- Stop needlessly using static variable.
- * syscall.c: Remove static long psr.
- (get_scno): Use local psr variable.
- (get_syscall_result): Likewise.
-
- 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.
-
-2013-02-05 Ben Noordhuis <info@bnoordhuis.nl>
-
- 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.
-
-2013-02-05 Chris Metcalf <cmetcalf@tilera.com>
-
- 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.
-
-2013-02-05 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-
- mount: decode MS_NOSEC.
- * system.c (MS_NOSEC): Define.
- (mount_flags): Add MS_NOSEC.
-
- mmap: decode MAP_UNINITIALIZED.
- * mem.c (mmap_flags): Add MAP_UNINITIALIZED.
-
-2013-02-05 Dmitry V. Levin <ldv@altlinux.org>
-
- Print 64-bit instruction pointers zero padded.
- * syscall.c (printcall): Print 64-bit instruction pointers zero padded.
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- Simple bug fix for x86_86.
- * syscall.c (printcall): Use x86_64_regs.rip, not x86_64_regs.ip.
-
-2013-02-05 Chris Metcalf <cmetcalf@tilera.com>
-
- 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.
-
-2013-02-05 Denys Vlasenko <vda.linux@googlemail.com>
-
- Small optimization for SPARC[64] get_scno.
- * syscall.c: Remove static unsigned long trap veriable.
- (get_scno): Use local trap variable.
-
- Do not compile getrval2() if not needed.
- * syscall.c (getrval2): Do not compile it for architetures where
- it isn't ever used.
-
- 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.
-
-2012-12-15 Stanislav Brabec <sbrabec@suse.cz>
-
- 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.
-
-2012-12-08 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix *xattr decoding.
- * file.c (print_xattr_val): Do not attempt to decode a zero sized array.
- Fixes RH#885233.
-
-2012-12-08 Stanislav Brabec <sbrabec@suse.cz>
-
- 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-06 John Spencer <maillist-strace@barfooze.de>
-
- Fix glibc version checks.
- * util.c: Check if __GLIBC__ is defined before using it.
- * signal.c: Likewise. Fix __GLIBC_MINOR__ checks.
-
-2012-11-29 James Hogan <james.hogan@imgtec.com>
-
- 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.
-
-2012-11-12 Steve McIntyre <steve.mcintyre@linaro.org>
-
- 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.
-
-2012-11-12 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-10-27 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-26 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Steve McIntyre <steve.mcintyre@linaro.org>
-
- 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.
-
- 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.
-
-2012-10-26 Namhyung Kim <namhyung.kim@lge.com>
-
- 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.
-
-2012-09-28 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-09-28 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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-27 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2012-09-13 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2012-08-24 Dmitry V. Levin <ldv@altlinux.org>
-
- Always check setreuid return code.
- * strace.c (startup_child): Check setreuid return code.
-
-2012-08-24 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-08-16 Dmitry V. Levin <ldv@altlinux.org>
-
- Decode file type returned by getdents system call.
- * file.c (sys_getdents): Decode d_type in unabbreviated mode.
-
-2012-07-12 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-10 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2012-06-05 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-05-18 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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().
-
-2012-05-16 Denys Vlasenko <vda.linux@googlemail.com>
-
- Use %d printf format instead of %i everywhere.
- * loop.c (loop_ioctl): Use %d instead of %i.
- * mtd.c (mtd_ioctl): Likewise.
-
- 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.
-
- 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.
-
-2012-05-15 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
-2012-05-15 Dmitry V. Levin <ldv@altlinux.org>
-
- Add configure --enable-gcc-Werror option.
- * configure.ac: New option --enable-gcc-Werror.
-
- Make x86-64 build free of artificial warnings.
- * signal.c (sys_sigreturn): Do not issue "no sys_sigreturn" warning
- on X86_64.
-
-2012-05-14 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2012-05-05 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-05-03 Dmitry V. Levin <ldv@altlinux.org>
-
- doc: describe documentation policy.
- * README-hacking: Describe documentation policy.
-
-2012-05-02 Dmitry V. Levin <ldv@altlinux.org>
-
- maint: post-release administrivia.
- * NEWS: Add header line for next release.
-
- Prepare for 4.7 release.
- * configure.ac: Version 4.7.
- * debian/changelog: 4.7-1.
- * strace.spec: 4.7-1.
-
- 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-01 Dmitry V. Levin <ldv@altlinux.org>
-
- * vsprintf.c: Check for USE_CUSTOM_PRINTF earlier.
-
- Remove duplicate names from CREDITS.
- * .mailmap: Merge email addresses.
- * CREDITS.in: Remove a duplicate name.
-
- 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>
-
- Update STA_* constants.
- * time.c (adjtimex_status): Add STA_NANO, STA_MODE, and STA_CLK.
- * NEWS (Improvements): Mention it.
-
- NEWS: update for release.
- * NEWS (Improvements): Mention recent recvmsg/recvmmsg decoders
- enhancements.
- (Portability): Add a recommendation for the minimum Linux kernel
- version to use.
-
- 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.
-
- 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.
-
- 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-04-28 Denys Vlasenko <vda.linux@googlemail.com>
-
- Enable printing of uts.domainname in uname syscall.
- * process.c (sys_uname): Enable printing of uts.domainname
-
- 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.
-
- 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.
-
-2012-04-27 Dmitry V. Levin <ldv@altlinux.org>
-
- Package strace-log-merge.
- * strace.spec (%files): Add strace-log-merge.
-
-2012-04-27 Mike Frysinger <vapier@gentoo.org>
-
- NEWS: clarify & fix typo.
-
- 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.
-
-2012-04-20 Dmitry V. Levin <ldv@altlinux.org>
-
- Update NEWS for upcoming 4.7 release.
- * NEWS: Update for 4.7 release.
-
- 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-18 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-04-18 H.J. Lu <hongjiu.lu@intel.com>
-
- 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-17 H.J. Lu <hongjiu.lu@intel.com>
-
- 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-16 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
- Trivial speed optimization.
- * strace.c (tprints): Use fputs_unlocked instead of fputs.
-
-2012-04-16 H.J. Lu <hongjiu.lu@intel.com>
-
- Fix a problem with sys_lseek on x32.
- * file.c (sys_lseek): Use MIPS-n32 variant also for x32
-
- 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.
-
- 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.
-
-2012-04-06 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-04-05 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-03-29 Denys Vlasenko <vda.linux@googlemail.com>
-
- Makefile.am: whitespace fix.
-
-2012-03-27 Anton Blanchard <anton@samba.org>
-
- powerpc: Add syscall entries for direct socket system calls.
- * linux/powerpc/syscallent.h: Add direct socket system calls.
-
-2012-03-26 Dmitry V. Levin <ldv@altlinux.org>
-
- qual_syscall: fix potential NULL dereference.
- Fix regression introduced by commit
- c1371ebc400fe9578908beca87f2bf407daf1506
-
- * syscall.c (qual_syscall): Handle null sys_name.
-
- Reported-by: Fr. Br. George <george@altlinux.org>
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- Remove unreachable code.
- * strace.c (process_opt_p_list): Remove unreachable code.
-
- manpage: remove false info about -p being limited to 32 processes.
-
- Tweak help text and manpage (added -In to manpage)
-
-2012-03-25 Dmitry V. Levin <ldv@altlinux.org>
-
- printstr: check for potential integer overflow.
- * util.c (printstr): Check for potential integer overflow during outstr
- buffer size calculation.
-
- 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.
-
- 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.
-
- 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-23 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- Reorder declarations in defs.h. No code changes.
- * defs.h: Reorder declarations (such as: keep all printing functions together).
-
-2012-03-22 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
-2012-03-21 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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).
-
- Show "+++ exited..." with -C.
- * strace.c (trace): Show "+++ exited..." with -C too.
- Save tcp->curcol after PTRACE_LISTEN failure too, just in case.
-
- Slight tweak to qemu_multiarch_testing scripts.
-
- 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.
-
- 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.
-
-2012-03-20 Denys Vlasenko <vda.linux@googlemail.com>
-
- Eliminate redundant checks of res variable.
- * syscall.c (trace_syscall_entering): Eliminate redundant checks of res variable.
- (trace_syscall_exiting): Likewise.
-
- Rename POWERPC-specific static variable result to ppc_result.
- * syscall.c: Rename POWERPC-specific static variable result to ppc_result.
-
- 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.
-
- Trivial tweaks. No logic changes.
- * process.c (sys_ptrace): Remove unneeded line wrapping.
- * syscall.c (trace_syscall_entering): Use tprints() instead of tprintf().
-
- 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.
-
-2012-03-20 Dmitry V. Levin <ldv@altlinux.org>
-
- Do not include limits.h unnecessarily.
- * ioctl.c: Remove limits.h inclusion left after the reverted change.
-
-2012-03-20 Denys Vlasenko <vda.linux@googlemail.com>
-
- Partially revert last change.
- Thank you Dmitry for spotting it.
-
- * ioctl.c (compare): Partially revert last change - the new
- comparison logic was buggy.
-
- 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.
-
-2012-03-19 Denys Vlasenko <vda.linux@googlemail.com>
-
- Update qemu build script: now tries to upload result back to host.
-
- 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'.
-
- 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.
-
-2012-03-18 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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/
-
- qemu_multiarch_testing/: a directory with scripts for build testing.
-
- 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.
-
- 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.
-
- 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.
-
-2012-03-17 Denys Vlasenko <vda.linux@googlemail.com>
-
- Revert "Remove underscores from a few syscall names which have them"
- This reverts commit 31972d52b1059d8faca1c5f417c2db1a90b868ae.
-
- 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.
-
- 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.
-
- Remove unused struct tcb::baddr field.
- * defs.h: Remove unused struct tcb::baddr field.
-
- Remove unused PTRACE_WRITE{TEXT,DATA} constants (they are from SunOS)
- * util.c: Remove unused PTRACE_WRITE{TEXT,DATA} constants.
-
- Reindent case labels. No code changes.
- * net.c (printsockopt): Reindent case labels.
- * signal.c (sys_signal): Likewise.
-
- Remove unused constants. No code changes.
- * syscall.c: Remove unused ENOIOCTLCMD constant. Fix indentation.
- * util.c: Remove unused CLONE_STOPPED constant.
-
- 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().
-
- 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.
-
- Indentation and whitespace fixes. No code changes.
-
- test/threaded_execve: make it also test a case when leader is not in syscall
-
-2012-03-16 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- Remove another "interrupt to quit" message.
- * strace.c (startup_attach): Remove another "interrupt to quit" message.
-
- 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.
-
- 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.
-
- 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.
-
-2012-03-16 Dmitry V. Levin <ldv@altlinux.org>
-
- scsi.c: add copyright header.
- * scsi.c: This file was added back in 2007 without a copyright header.
- Add it now.
-
-2012-03-15 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
- 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.
-
-2012-03-15 Denys Vlasenko <vda.linux@googlemail.com>
-
- Fix array size calculation in previous commit.
- * pathtrace.c (getfdpath): Fix array size calculation.
-
- 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.
-
- 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.
-
- Simplify SIGCHLD handler setting.
- * strace.c (init): Set SIGCHLD to SIG_DFL earlier.
- (startup_child): Do not bother restoring SIGCHLD handler.
-
- 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.
-
- Remove TODO file: it's eleven years old and completely outdated.
-
- Clean up defs.h order. No code changes.
- * defs.h: Group together related declarations. No code changes.
-
- 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.
-
- 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.
-
- 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.
-
- Remove an outdated comment.
- * defs.h: Remove an outdated comment.
-
- 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.
-
- 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.
-
-2012-03-15 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Mike Frysinger <vapier@gentoo.org>
-
- ppc64: drop unused pid variable.
- * syscall.c (get_scno) [POWERPC64]: Delete unused pid variable.
-
-2012-03-15 Dmitry V. Levin <ldv@altlinux.org>
-
- ia64: fix compilation warnings.
- * linux/ia64/syscallent.h: Remove improper defines and undefs.
-
- Reported-by: Mike Frysinger <vapier@gentoo.org>
-
- 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-14 Dmitry V. Levin <ldv@altlinux.org>
-
- Enhance *listxattr syscalls decoding.
- * file.c (print_xattr_list): New function.
- (sys_listxattr, sys_flistxattr): Use it.
-
-2012-03-13 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- Fix linkat flags decoding.
- * file.c (linkat_flags): New xlat structure.
- (sys_linkat): Decode flags using linkat_flags.
-
- 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.
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- Less ugly debug display of ptrace events.
- * strace.c (trace): Less ugly debug display of ptrace events.
-
- Make manpage mention that -p "`pidof PROG`" works.
-
- 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.
-
-2012-03-13 Dmitry V. Levin <ldv@altlinux.org>
-
- net.c: recognize MSG_WAITFORONE.
- * net.c (msg_flags): Add MSG_WAITFORONE.
-
-2012-03-12 Denys Vlasenko <vda.linux@googlemail.com>
-
- Treat -ff without -o FILE as single -f.
- * strace.c (init): Treat -ff without -o FILE as single -f.
-
- Style fix. No code changes.
- * strace.c (process_opt_p_list): Style fix.
-
- 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.
-
- 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.
-
-2012-03-11 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- Define sys_set_robust_list as an alias to sys_munmap.
- * linux/dummy.h (sys_set_robust_list): Redefine to sys_munmap.
-
- 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.
-
- Define sys_setns as an alias to sys_inotify_rm_watch.
- * linux/dummy.h (sys_setns): Redefine to sys_inotify_rm_watch.
-
- Sort definitions of dummy parsers. No code changes.
- * linux/dummy.h: Sort definitions of parsers implemented as aliases.
-
- Correct inotify_rm_watch decoder.
- * file.c (sys_inotify_rm_watch): Print second argument as int.
-
- 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-10 Dmitry V. Levin <ldv@altlinux.org>
-
- Update ioctl entries.
- * linux/ioctlent.h.in: Regenerate from v3.3 headers.
- * linux/i386/ioctlent.h.in: Likewise.
-
- strace-log-merge: cleanup.
- * strace-log-merge: Redirect usage to stderr, make the check
- for numeric suffix simpler.
-
- 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.
-
- Implement process_vm_writev decoder.
- * process.c (sys_process_vm_writev): New function.
- * linux/syscall.h (sys_process_vm_writev): New prototype.
-
- 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-09 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Denys Vlasenko <vda.linux@googlemail.com>
-
- Trivial simplification.
- * strace.c (detach): Use waitpid instead of wait4.
-
- 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.
-
- 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.
-
- Call PTRACE_CONT with addr=0.
- * strace.c (trace): Call PTRACE_CONT with addr=0.
-
- install strace-log-merge by "make install"
-
- strace_log_merge: new file. Helper to merge timestamped strace -ff logs.
-
- 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.
-
- 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.
-
-2012-03-08 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
-2012-02-28 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2012-02-27 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
-2012-02-25 Dmitry V. Levin <ldv@altlinux.org>
-
- 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".
-
- 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.
-
- 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.
-
-2012-02-25 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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
-
- 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.
-
- 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).
-
- 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).
-
- Reindent defs.h preprocessor directives.
- * defs.h: Fix indentation of preprocessor directives broken by
- automatic removal of non-Linux code.
-
- 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.
-
- 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.
-
- 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
-
-2012-02-24 Denys Vlasenko <vda.linux@googlemail.com>
-
- When accessing data blocks, truncate addr to wordsize.
- * util.c (umoven): Truncate addr to wordsize before use.
-
-2012-02-22 Dmitry V. Levin <ldv@altlinux.org>
-
- strace.1: fix a typo.
- * strace.1: Fix a typo in example description.
- This fixes Debian bug #653309.
-
- 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.
-
- 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-20 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- 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.
-
- 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-14 Mike Frysinger <vapier@gentoo.org>
-
- 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.
-
-2012-02-09 Denys Vlasenko <vda.linux@googlemail.com>
-
- README-linux-ptrace: correct the description of suppressed signals.
-
-2012-02-06 Dmitry V. Levin <ldv@altlinux.org>
-
- strace -P: fix handling of invalid syscalls.
- * pathtrace.c (pathtrace_match): Check the given syscall number using
- SCNO_IN_RANGE.
-
-2012-02-06 H.J. Lu <hongjiu.lu@intel.com>
-
- 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.
-
- Define RLIM64_INFINITY only if not defined.
- * resource.c (RLIM64_INFINITY): Define only if it isn't defined.
-
- 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.
-
- 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.
-
- 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.
-
- 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-04 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-03 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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).
-
-2012-01-29 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- Trivial optimization.
- * strace.c (cleanup): Read 'interrupted' volatile variable only once.
-
- 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.
-
- Suppress compiler warning.
- * strace.c (trace): Frame potentially unused label with ifdef/endif.
-
- 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.
-
- 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.
-
-2012-01-28 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- Revert last change. Add a comment to prevent further misunderstanding.
- * time.c (sys_nanosleep): Display remaining time only on interrupt.
-
- 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.
-
- 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.
-
- 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".
-
- 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.
-
-2012-01-27 Denys Vlasenko <vda.linux@googlemail.com>
-
- Fix readlink result display - was printing bogus "..." semi-randomly.
- * file.c (decode_readlink): Use printstr() instead of printpathn().
-
- Add new test program: test/threaded_execve.c.
-
- Make pid2tcb static.
- * defs.h: Remove pid2tcb declaration.
- * strace.c (pid2tcb): Make this function static.
-
-2012-01-24 Denys Vlasenko <vda.linux@googlemail.com>
-
- Per Dmitry's request, remove paranoid check in verror_msg()
- * strace.c (verror_msg): Remove redundant check for msg != NULL.
-
- More robust error check for vasprintf.
- * strace.c (verror_msg): More robust error check for vasprintf.
-
- 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[]
-
- Trivial optimization.
- * strace.c: Set default interactive = 1 statically instead
- of doing it in main().
-
- 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.
-
- 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.
-
-2012-01-21 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
-2012-01-20 Denys Vlasenko <vda.linux@googlemail.com>
-
- 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.
-
- 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.
-
- 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.
-
-2012-01-19 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
-2012-01-18 Andreas Schwab <schwab@linux-m68k.org>
-
- Add support for compat_statfs64.
- * file.c (struct compat_statfs64, printcompat_statfs64): Define.
- (sys_statfs64, sys_fstatfs64): Use it.
-
- Add support for statfs64.f_flags.
- * file.c (printstatfs64): Print f_flags if available.
-
- Fix missing parens.
- * signal.c (sys_sigreturn): Add missing parens.
-
-2012-01-18 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
- Fix old sigaction display.
- * signal.c (sys_sigaction): Fix display of sigaction with
- SIG_DFL/SIG_IGN handlers.
-
- 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.
-
-2012-01-17 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-12 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
-2012-01-10 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
-2012-01-04 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
-2011-12-26 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-23 Dmitry V. Levin <ldv@altlinux.org>
-
- 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-01 Dmitry V. Levin <ldv@altlinux.org>
-
- * net.c (socktcpoptions): Add more TCP_* constants from linux/tcp.h.
- Reported-by: Rick Jones <rick.jones2@hp.com>
-
-2011-12-01 Heiko Carstens <heiko.carstens@de.ibm.com>
-
- 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.
-
-2011-11-29 Dmitry V. Levin <ldv@altlinux.org>
-
- strace.c (trace): Fix compilation warning.
-
-2011-11-28 Dmitry V. Levin <ldv@altlinux.org>
-
- linux/syscall.h: Remove redundant function declarations.
- Remove 51 function declarations aliased to other declarations in
- linux/dummy.h file.
-
- linux/syscall.h: Sort function declarations.
-
- linux/syscall.h: Place one function declaration per line.
-
- 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.
-
- Reflect the fact that nfsservctl syscall was removed from linux kernels.
- linux/dummy.h: Move nfsservctl to "unimplemented" section.
-
-2011-11-27 Dmitry V. Levin <ldv@altlinux.org>
-
- x86_64: add getcpu syscall entry.
- * linux/x86_64/syscallent.h: Add syscall entry for getcpu.
-
-2011-11-26 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- Fix prctl syscall entries.
- * linux/mips/syscallent.h: Fix prctl handler.
- * linux/tile/syscallent.h: Likewise.
-
- arm: fix io_* syscall entries.
- * linux/arm/syscallent.h: Fix handlers for io_setup, io_destroy,
- io_getevents, io_submit and io_cancel.
-
- 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-25 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- 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.
-
- arm: fix epoll_create syscall entry.
- * linux/arm/syscallent.h: Fix epoll_create handler.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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-05 Dmitry V. Levin <ldv@altlinux.org>
-
- gitlog-to-changelog: update from gnulib.
- * gitlog-to-changelog: Update from gnulib.
- * Makefile.am: Add --append-dot to gitlog-to-changelog invocation.
-
-2011-10-22 Denys Vlasenko <dvlasenk@redhat.com>
-
- Decode TIOCSCTTY's third parameter.
- * term.c (term_ioctl): Decode TIOCSCTTY's third parameter.
-
-2011-10-14 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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.
-
- Sort definitions of dummy parsers. No code changes.
- * linux/dummy.h: Sort definitions of parsers implemented as aliases
- to printargs().
-
-2011-10-14 Mike Frysinger <vapier@gentoo.org>
-
- 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>
-
-2011-10-11 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- Fix epoll_wait and epoll_pwait decoding.
- * desc.c (epoll_wait_common): Print "maxevents" and "timeout" arguments
- as integers.
-
- Reported-by: Марк Коренберг <socketpair@gmail.com>
-
- Decode EPOLLRDHUP.
- * desc.c (epollevents): Add EPOLLRDHUP.
-
- Reported-by: Марк Коренберг <socketpair@gmail.com>
-
- Remove unreachable code in umoven() and umovestr().
- * util.c (umoven, umovestr): Remove unreachable code.
-
- Reported-by: Weichuan Yan <wchyan@marvell.com>
-
-2011-09-05 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
- 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.
-
-2011-09-02 Denys Vlasenko <dvlasenk@redhat.com>
-
- Simple optimizations in trace()
- * strace.c (trace): Calculate WSTOPSIG(status) once,
- unify code paths to ptrace(PTRACE_SYSCALL).
-
- 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().
-
-2011-09-01 Denys Vlasenko <dvlasenk@redhat.com>
-
- Fix compile failure introduced by last commit.
- * desc.c (decode_select): Fix double definition of nfds.
-
- 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.
-
- 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.
-
- Simplify sprinttv()
- * time.c (sprinttv): Trivial simplifications.
-
- * desc.c (decode_select): Set tcp->auxstr as late as possible.
-
- 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.
-
- 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().
-
- 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.
-
- 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.
-
-2011-08-31 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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().
-
-2011-08-30 Denys Vlasenko <dvlasenk@redhat.com>
-
- Small optimization on AVR32.
- * syscall.c (syscall_enter): Optimize tcp->u_arg[i] setting
- from regs.FOO for AVR32.
-
- 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.
-
-2011-08-30 Dmitry V. Levin <ldv@altlinux.org>
-
- Do not include <limits.h>
- * strace.c: Do not include <limits.h> explicitly, it is already included
- implicitly by <sys/param.h>.
-
- 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-26 Denys Vlasenko <dvlasenk@redhat.com>
-
- Indent a large set of nested ifdefs/endifs. No code changes.
- * defs.h: Indent a large set of nested ifdefs/endifs
-
- 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.
-
- 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.
-
-2011-08-25 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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).
-
- 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().
-
- Remove stray commas in struct initializers. No code changes.
- * process.c: Remove stray commas in struct initializers.
-
-2011-08-24 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- * syscall.c (sys_indir): Use %ld for printing long, not %u.
-
- 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.
-
- Remove scno_good logic in syscall exit.
- * syscall.c (trace_syscall_exiting): Remove scno_good logic,
- it can't trigger in syscall exit.
-
- Remove redundant assignments.
- * syscall.c (get_error): Remove redundant "u_error = 0" and redundant
- and unclear comments.
-
- Group int-sized fields together in struct tcb.
- * defs.h: Group int-sized fields together in struct tcb.
-
- 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.
-
- 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().
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
-2011-08-23 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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).
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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".
-
- 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.
-
- 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.
-
- Optimize out dummy PC printing on signal delivery.
- * strace.c (trace): Optimize out dummy PC printing on signal delivery.
- While at it, tweak comments.
-
- 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.
-
- Cosmetic improvement in ifdefs. No code changes.
- * strace.c (proc_open): Change ifdefs so that braces are properly paired.
-
- 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.
-
- 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.
-
- 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.
-
- Convert ioctl_next_match() to new-style C function definition.
- * ioctl.c (ioctl_next_match): Convert to new-style C function definition.
-
- 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.
-
- 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.
-
- Remove unused declaration.
- * defs.h: Remove unused declaration of handle_new_child().
-
- 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.
-
- 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.
-
- Optimize get_scno function.
- * syscall.c (get_scno): Make gpr_offset[] array static const.
-
- Optimize iocb_cmd_lookup.
- * desc.c (iocb_cmd_lookup): Make command table constant.
- Reduce size of static char buffer.
-
- 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
-
- Make addflags return void.
- * defs.h (addflags): Change return type from int to void.
- * util.c (addflags): Change return type from int to void.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- Use simpler rounding up to next multiple of 2.
- * util.c (printllval): simpler rounding up to next multiple of 2.
-
- 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.
-
-2011-08-23 Dmitry V. Levin <ldv@altlinux.org>
-
- 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().
-
- Fix compilation on linux 2.4.x.
- * configure.ac: Check for BLKGETSIZE64.
- * block.c (block_ioctl): Check for HAVE_BLKGETSIZE64.
-
-2011-08-17 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
- 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.
-
-2011-08-16 Sergei Trofimovich <slyfox@gentoo.org>
-
- Declare printrusage32() on Alpha.
- * defs.h [ALPHA] (printrusage32): New declaration.
-
-2011-08-15 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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
-
-2011-07-19 Dmitry V. Levin <ldv@altlinux.org>
-
- 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 Denys Vlasenko <dvlasenk@redhat.com>
-
- Remove superfluous backslash-continuation in configure.ac.
- * configure.ac: remove superfluous backslash continuation
- in AC_CHECK_DECLS
-
-2011-06-24 Denys Vlasenko <dvlasenk@redhat.com>
-
- Make IOCTL_WSTOP more readable.
- * defs.h: Make IOCTL_WSTOP more readable
-
- 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.
-
- Remove redundant include <stdarg.h>
- * strace.c: Remove redundant include <stdarg.h>
-
- Clean up two old comments.
- * strace.c (startup_attach): Remove misplaced comment.
- (trace) Remove incomplete part of a comment.
-
- Make a few variables static.
- * defs.h: Remove tcbtab declaration.
- * strace.c: Make run_uid, run_gid, outf, tcbtab, progname
- global variables static
-
- Add debug output in initial attachment code.
- * strace.c (startup_attach): If -d, report pid and success/failure
- of every attach attempt.
-
- 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.
-
-2011-06-23 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
- 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.
-
- Add a comment about setbpt. No code changes.
- * defs.h: Add a comment about setbpt().
-
- Untangle a particularly badly obfuscated bit of code. No logic changes.
- * util.c (setbpt): Calculate new arg0 in more readable way.
-
- 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.
-
-2011-06-23 Dmitry V. Levin <ldv@altlinux.org>
-
- * system.c (sys_capget, sys_capset): Fix pointer arithmetics.
-
-2011-06-23 Denys Vlasenko <dvlasenk@redhat.com>
-
- Make initial tcb allocation more readable. No logic changes.
- * strace.c (main): Make initial tcb allocation more readable.
-
- 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.
-
- 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.
-
-2011-06-22 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
-2011-06-21 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
-2011-06-21 Dmitry V. Levin <ldv@altlinux.org>
-
- 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>
-
- tests: finish ptrace_setoptions_* merge.
- * tests/Makefile.am (TESTS): Merge ptrace_setoptions_*.
- * tests/ptrace_setoptions: Check for Linux kernel > 2.6.
-
-2011-06-21 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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.
-
- Fix tests/ptrace_setoptions_* to match last fix in ptrace options code.
-
- 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".
-
- Fix regression introduced by "Properly handle real SIGTRAPs" change.
- Commit 3454e4b463e6c22c7ea8c5461ef5a077f4650a54
- 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.
-
-2011-06-18 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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().
-
-2011-06-13 Andi Kleen <ak@linux.intel.com>
-
- 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 Dmitry V. Levin <ldv@altlinux.org>
-
- 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.
-
- 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 Andi Kleen <ak@linux.intel.com>
-
- 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-09 Dmitry V. Levin <ldv@altlinux.org>
-
- Add test for PTRACE_O_TRACESYSGOOD.
- * tests/ptrace_setoptions_for_all: New file.
- * tests/Makefile.am (TESTS): Add ptrace_setoptions_for_all.
-
- tests: update test for linux kernel version.
- * tests/ptrace_setoptions_followfork: Check for Linux kernel > 2.6.
-
- 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.
-
- * strace.c (verror_msg): Rewrite without use of heap memory allocation.
-
- 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-08 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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).
-
- 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)
-
- 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.
-
- "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.
-
- 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
-
- 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>)"
-
- Add fflush after printf in test/sigkill_rain.c.
-
- 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.
-
-2011-06-07 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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
-
-2011-05-30 Dmitry V. Levin <ldv@altlinux.org>
-
- 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>
-
-2011-05-30 Damir Shayhutdinov <damir@altlinux.ru>
-
- 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.
-
-2011-05-30 Denys Vlasenko <dvlasenk@redhat.com>
-
- "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
-
-2011-05-27 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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-25 Denys Vlasenko <dvlasenk@redhat.com>
-
- Identifier "errno" may be a macro, it's unsafe to use it.
- * strace.c (strerror): Rename parameter errno to err_no
-
-2011-05-24 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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-23 Denys Vlasenko <dvlasenk@redhat.com>
-
- 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-04-24 Mike Frysinger <vapier@gentoo.org>
-
- Blackfin: update syscall list.
-
- * linux/bfin/syscallent.h: Add name_to_handle_at, open_by_handle_at,
- clock_adjtime, and syncfs syscalls.
-
- linux: add new EHWPOISON errno.
-
- * linux/errnoent.h: Change ERRNO_133 to EHWPOISON.
-
-2011-04-08 Grant Edwards <grant.b.edwards@gmail.com>
-
- 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-07 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix BLKTRACESTOP definition.
- * block.c: Fix typo in the check for BLKTRACESTOP.
- Reported by Gabor Z. Papp.
-
-2011-03-15 Dmitry V. Levin <ldv@altlinux.org>
-
- Ensure that PTRACE_GETSIGINFO et al are always defined on Linux.
- * configure.ac (AC_CHECK_DECLS): Add PTRACE_* constants.
- * defs.h [LINUX]: Define those PTRACE_* constants that are not provided
- by <sys/ptrace.h>.
-
- * CREDITS.in: Fix typo.
-
-2011-03-14 Dmitry V. Levin <ldv@altlinux.org>
-
- Update PTRACE_* constants.
- * process.c (ptrace_cmds): Add PTRACE_GETREGSET and PTRACE_SETREGSET.
-
- Prepare for 4.6 release.
- * NEWS: Update for 4.6 release.
- * configure.ac: Version 4.6.
- * debian/changelog: 4.6-1.
- * strace.spec: 4.6-1.
-
-2011-03-14 Mike Frysinger <vapier@gentoo.org>
-
- linux/ioctlent: unify them all.
- This unifies all the ioctlent.h's in the linux subdir while still
- allowing each arch to maintain its own minor list.
-
- The basic method is:
- - each arch has linux/<arch>/ioctlent.h.in which defines only the
- arch-specific ioctls;
- - linux/ioctlent.h.in which defines only the common ioctls;
- - at build time, these two headers are combined and sorted to produce
- the linux/ioctlent.h file.
-
- This also requires a little tweaking of the include files since the
- common ioctlent.h is a built file.
-
- * linux/ioctlent.h: Split into linux/ioctlent.h.in and
- linux/i386/ioctlent.h.in, remove asm entries from the former, remove
- non-asm entries from the latter.
- * linux/alpha/ioctlent.h: Rename to linux/alpha/ioctlent.h.in, remove
- non-asm entries.
- * linux/bfin/ioctlent.h: Rename to linux/bfin/ioctlent.h.in, remove
- non-asm entries.
- * linux/hppa/ioctlent.h: Rename to linux/hppa/ioctlent.h.in, remove
- non-asm entries.
- * linux/ia64/ioctlent.h: Rename to linux/ia64/ioctlent.h.in, remove
- non-asm entries.
- * linux/mips/ioctlent.h: Rename to linux/mips/ioctlent.h.in, remove
- non-asm entries.
- * linux/powerpc/ioctlent.h: Rename to linux/powerpc/ioctlent.h.in,
- remove non-asm entries.
- * linux/s390/ioctlent.h: Rename to linux/s390/ioctlent.h.in, remove
- non-asm entries.
- * linux/sh/ioctlent.h: Rename to linux/sh/ioctlent.h.in, remove
- non-asm entries.
- * linux/sparc/ioctlent.h: Rename to linux/sparc/ioctlent.h.in, remove
- non-asm entries.
- * linux/arm/ioctlent.h.in: New file.
- * linux/avr32/ioctlent.h.in: Likewise.
- * linux/i386/ioctlent.h.in: Likewise.
- * linux/m68k/ioctlent.h.in: Likewise.
- * linux/microblaze/ioctlent.h.in: Likewise.
- * linux/tile/ioctlent.h.in: Likewise.
- * linux/x86_64/ioctlent.h.in: Likewise.
- * linux/s390x/ioctlent.h.in: Include ioctlent.h.in instead of
- ioctlent.h.
- * linux/sh64/ioctlent.h.in: Likewise.
- * linux/sparc64/ioctlent.h.in: Likewise.
- * linux/arm/ioctlent1.h: Update ioctlent.h include.
- * linux/powerpc/ioctlent1.h: Likewise.
- * linux/sparc/ioctlent1.h: Likewise.
- * linux/sparc64/ioctlent1.h: Likewise.
- * linux/x86_64/ioctlent1.h: Likewise.
- * Makefile.am (AM_CPPFLAGS): Add -I$(builddir)/$(OS).
- (EXTRA_DIST): Update.
- [MAINTAINER_MODE && LINUX]: Convert from ioctlent_h to ioctlent_h_in.
- [LINUX]: Add $(builddir)/$(OS)/ioctlent.h generation rules.
- * .gitignore: Add linux/ioctlent.h.
-
-2011-03-10 Dmitry V. Levin <ldv@altlinux.org>
-
- Show more details about signals received by traced processess.
- * strace.c [!USE_PROCFS] (trace): Differentiate output format depending
- on PTRACE_GETSIGINFO success or failure. In the former case, use
- printsiginfo() to show more details about received signal.
-
- Get rid of PT_GETSIGINFO.
- * strace.c [!USE_PROCFS] (trace): Assume that PTRACE_GETSIGINFO is
- available. Replace PT_GETSIGINFO with PTRACE_GETSIGINFO. Use
- PTRACE_GETSIGINFO for all signals.
-
- Enhance decoding of kernel-generated signals.
- * signal.c (printsiginfo) [LINUX]: Do not print uninteresting
- zero-initialized fields.
-
- Fix decoding of user-generated signals.
- * signal.c [LINUX] (SI_FROMUSER): Define.
- [LINUX || SVR4] (printsiginfo) [SI_FROMUSER]: Enhance decoding.
-
- Recognize SI_KERNEL and SI_ASYNCNL.
- * signal.c [LINUX] (SI_KERNEL, SI_ASYNCNL): Define.
- [LINUX || SVR4] (siginfo_codes): Add entries for SI_KERNEL and
- SI_ASYNCNL, reorder entries.
-
-2011-03-05 Sebastian Pipping <sebastian@pipping.org>
-
- Take all git branches into account for generation of CREDITS file.
- * Makefile.am: Make CREDITS target depend on all git branches.
-
-2011-03-04 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix decoding of file descriptors.
- * defs.h (printfd): New function prototype.
- * util.c (printfd): New function.
- * file.c (print_dirfd): Update prototype to use printfd().
- (sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat,
- sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat,
- sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd().
- (sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64,
- sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64,
- sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync,
- sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr,
- sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64,
- sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch,
- sys_fallocate): Use printfd() for decoding of file descriptors.
- * desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2,
- decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for
- decoding of file descriptors.
- * io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread,
- sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64,
- sys_ioctl): Likewise.
- * mem.c (print_mmap, sys_mmap64): Likewise.
- * signal.c (do_signalfd): Likewise.
- * stream.c (decode_poll): Likewise.
- * time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise.
- Based on patch from Grant Edwards <grant.b.edwards@gmail.com>.
-
-2011-03-03 Sebastian Pipping <sebastian@pipping.org>
-
- Print shutdown(2) modes as SHUT_* constants.
- * net.c (shutdown_modes): New xlat structure.
- (sys_shutdown): Use shutdown_modes to decode 2nd syscall argument.
-
- Fix decoding of inotify_init1() flags.
- * file.c (inotify_init_flags): New xlat structure.
- (sys_inotify_init1): Use it instead of open_mode_flags.
-
-2011-03-03 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix struct xlat initialization bugs.
- * file.c (inotify_modes): Terminate with NULL entry.
- * net.c (sock_type_flags): Make this array static.
- (socketlayers): Add a comment that this array should remain not
- NULL-terminated.
-
- tests: avoid SIGPIPE.
- * tests/ptrace_setoptions: Replace "grep -q" with "grep > /dev/null".
- The former may result to strace being killed by SIGPIPE, which in
- certain configuratons may lead to generation of a core file.
- Suggested by Mike Frysinger.
-
-2011-03-01 Mike Frysinger <vapier@gentoo.org>
-
- tests: do not make missing /usr/bin/time a failure.
- * tests/init.sh (framework_skip_): New function.
- (check_prog): Use it instead of framework_failure_.
-
-2011-02-27 Dmitry V. Levin <ldv@altlinux.org>
-
- Generate an xz tar archive of the distribution.
- * configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with dist-xz.
- * Makefile.am: Update srpm target.
- * make-dist: Update for dist-xz.
- * strace.spec: Update Source tag.
- * debian/watch: Update regexp.
- * .gitignore: Add strace-*.tar.xz.
-
- Use "make check" in debian/rules and strace.spec.
- * debian/control: Update Build-Depends.
- * debian/rules: Run "make check".
- * strace.spec: Update BuildRequires. Run "make check" in %check section.
-
- Implement two basic "strace -f" tests.
- * Makefile.am (SUBDIRS): Add tests.
- * configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
- * tests/.gitignore: New file.
- * tests/Makefile.am: Likewise.
- * tests/init.sh: Likewise.
- * tests/ptrace_setoptions: Likewise.
- * tests/strace-f: Likewise.
-
-2011-02-26 Dmitry V. Levin <ldv@altlinux.org>
-
- ppc, s390, sparc: regenerate ioctlent.h files.
- * linux/powerpc/ioctlent.h: Regenerated using Fedora 15 kernel headers.
- * linux/s390/ioctlent.h: Likewise.
- * linux/sparc/ioctlent.h: Likewise.
-
- Remove redundant ioctlent.h files.
- * linux/s390x/ioctlent.h: Replace old contents with include of
- s390/ioctlent.h file.
- * linux/sparc64/ioctlent.h: Replace old contents with include of
- sparc/ioctlent.h file.
-
-2011-02-25 Dmitry V. Levin <ldv@altlinux.org>
-
- ioctlsort: sync with ioctl_lookup()
- * linux/ioctlsort.c (main): Use NR and TYPE bits only, to sync with
- ioctl_lookup() which looks at these bits only.
-
- Remove obsolete .cvsignore files.
- * test/.cvsignore: Rename to test/.gitignore.
- * */.cvsignore, */*/.cvsignore: Removed.
-
- Ignore generated intermediate header files.
- * .gitignore: Add ioctls.h and ioctldefs.h.
-
-2011-02-24 Dmitry V. Levin <ldv@altlinux.org>
-
- Generate much of the CREDITS file from git log.
- * CREDITS.in: New file, derived from CREDITS, without names of
- those who are listed as git log 'Author:'s.
- * CREDITS: Remove file.
- * Makefile.am [MAINTAINER_MODE] (CREDITS): New rule.
- * .gitignore: Add CREDITS.
- * .mailmap: New file, required to map git author names and email
- addresses to canonical/preferred form.
-
-2011-02-23 Dmitry V. Levin <ldv@altlinux.org>
-
- sparc: fix compilation warning.
- * file.c [!HAVE_LONG_LONG_OFF_T] (realprintstat): Cast st_size
- to unsigned long.
-
- Update the list of files that must be distributed.
- * Makefile.am (EXTRA_DIST): Add debian/source/format, debian/watch,
- linux/ia64/signalent.h, linux/powerpc/ioctlent1.h,
- linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h,
- linux/powerpc/signalent1.h.
-
- Fix compilation warning reported by gcc -Wunused-but-set-variable.
- * process.c (printwaitn) [!SUNOS4]: Do not define "exited" variable.
-
-2011-02-22 Mike Frysinger <vapier@gentoo.org>
-
- ioctlsort: zero pad ioctl codes to 4 places.
- Zero padding the ioctl number will allow simple sorting via shell scripts.
-
- * linux/ioctlsort.c (main): Output ioctl codes zero padded.
- * linux/ioctlent.h: Regenerated.
-
- Update mount flags to latest linux.
- * system.c (MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
- MS_STRICTATIME, MS_BORN): Define.
- (mount_flags): Add MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
- MS_STRICTATIME, MS_BORN.
-
-2011-02-22 Dmitry V. Levin <ldv@altlinux.org>
-
- Sync debian/changelog and strace.spec with packages.
- * debian/changelog: Sync with 4.5.20-2.
- * strace.spec: Likewise.
-
-2011-02-20 Dmitry V. Levin <ldv@altlinux.org>
-
- Add TRACE_DESC|TRACE_FILE flags to fanotify_* sysentries.
- * linux/*/syscallent.h: Add TD flag to fanotify_init. Add TD|TF flags
- to fanotify_mark.
-
- Fix flags of fallocate sysentries.
- * linux/*/syscallent.h: Fix sys_fallocate flags.
-
- Add TRACE_DESC flag to epoll_create* sysentries.
- * linux/*/syscallent.h: Add TD flag to sys_epoll_create and
- sys_epoll_create1.
-
- Add TRACE_DESC flag to fgetxattr, flistxattr, and fremovexattr sysentries
- * linux/*/syscallent.h: Add TD flag to sys_fgetxattr, sys_flistxattr,
- and fremovexattr.
-
- Add TRACE_FILE flag to swapoff sysentries.
- * linux/*/syscallent.h: Add TF flag to sys_swapoff.
-
- Add TRACE_DESC flag to fadvise64* sysentries.
- * linux/*/syscallent.h: Add TD flag to sys_fadvise64 and
- sys_fadvise64_64.
-
- Add TRACE_DESC flag to mmap, mmap2, and old_mmap sysentries.
- * linux/*/syscallent.h: Add TD flag to sys_mmap and sys_old_mmap.
-
- Do not initialize native_scno on platforms with only one personality.
- * linux/bfin/syscallent.h: Remove redundant native_scno initialization.
- * linux/m68k/syscallent.h: Likewise.
- * linux/microblaze/syscallent.h: Likewise.
-
- Add LOOP_* ioctls defined in linux/loop.h.
- * linux/ioctlent.sh: Add LOOP_* ioctls (0x4C..) defined in linux/loop.h
- header file.
- * linux/ioctlent.h: Regenerated.
- Reported by Mike Frysinger.
-
-2011-02-19 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix PTRACE_GETEVENTMSG usage and enhance test_ptrace_setoptions()
- * strace.c (handle_ptrace_event): Fix PTRACE_GETEVENTMSG usage.
- (test_ptrace_setoptions): Test that PTRACE_GETEVENTMSG works properly.
-
-2011-02-19 Mike Frysinger <vapier@gentoo.org>
-
- linux/sparc: move to common syscall.h.
- Rather than constantly deal with the sparc/syscall.h going stale, merge
- the few sparc-specific pieces into the linux/syscall.h header.
-
- * linux/syscall.h: Add sparc-specific pieces from sparc/syscall.h.
- * Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h and
- linux/sparc64/syscall.h.
- * linux/sparc/syscall.h, linux/sparc64/syscall.h: Deleted.
-
- sparc: add new funcs to syscall.h.
- Sync missing defs from the common syscall.h here.
-
- * linux/sparc/syscall.h: Add sys_setfsuid, sys_pread64, and
- sys_pwrite64 prototypes.
-
- sparc: punt unused syscall.h.2.
- I can't find any mention of this header actually being used.
- Seems to be a really old copy of the common syscall.h.
-
- * Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h.2.
- * linux/sparc/syscall.h.2: Deleted.
-
-2011-02-19 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix raw exit_group(2) decoding.
- * syscall.c (trace_syscall_entering): Check for sys_exit instead of
- SYS_exit to handle exit_group(2) as well as _exit(2).
-
-2011-02-18 Dmitry V. Levin <ldv@altlinux.org>
-
- Optimize known_scno()
- * syscall.c (known_scno): Do not check for native_scno field on
- platforms that support only one personality.
-
- * process.c (internal_exit) [IA64]: Remove redundant check.
-
-2011-02-09 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix biarch support in IO dumping.
- * syscall.c (dumpio): Switch on tcp->sys_func instead of tcp->scno
- for more reliable results.
-
- Simplify tprintf() declaration.
- * defs.h (tprintf): Simplify declaration.
-
-2011-02-05 Dmitry V. Levin <ldv@altlinux.org>
-
- * defs.h (SYSCALL_NEVER_FAILS): Fix typo.
-
-2011-01-19 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix decoding of get[ug]id, gete[ug]id and setfs[ug]id return values.
- * defs.h (SYSCALL_NEVER_FAILS): New syscall flag.
- * linux/dummy.h: Change redirection for sys_get[ug]id, sys_gete[ug]id
- and setfs[ug]id.
- * linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag for get[ug]id,
- gete[ug]id and setfs[ug]id syscalls.
- * process.c [LINUX] (sys_getuid, sys_setfsuid): New functions.
- * syscall.c (NF): New shorthand macro for use in syscallent.h files.
- (get_error): Check SYSCALL_NEVER_FAILS flag.
- Reported by Марк Коренберг <socketpair@gmail.com>.
-
- * linux/*/syscallent.h: Fix typo in sys_newfstatat syscall flags.
-
-2011-01-18 Mike Frysinger <vapier@gentoo.org>
-
- Blackfin: update ioctl list.
- * linux/bfin/ioctlent.h: Sync with latest kernel sources.
-
-2011-01-17 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix stat64 decoding on mips.
- * linux/mips/syscallent.h: Use sys_stat64() to decode stat64 syscall.
- This fixes Debian bug #599028.
-
- Update linux/*/syscallent.h files to match Linux kernel v2.6.37.
- * linux/alpha/syscallent.h: Add hooks for fanotify_init, fanotify_mark,
- and prlimit64.
- * 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/x86_64/syscallent.h: Likewise.
- * linux/arm/syscallent.h: Add hooks for accept4, fanotify_init,
- fanotify_mark, and prlimit64.
- * linux/hppa/syscallent.h: Add hook for prlimit64.
-
-2011-01-16 Dmitry V. Levin <ldv@altlinux.org>
-
- block.c: cleanup.
- * block.c: Include <inttypes.h>.
- (print_blkpg_req): Always decode struct blkpg_ioctl_arg.
- Robustify decoding of strings.
- (block_ioctl): Do not decode return values passed by pointers on exit
- from failed syscalls.
- Use format macros from inttypes.h to print values of type uint64_t.
-
-2011-01-15 Dmitry V. Levin <ldv@altlinux.org>
-
- Add block ioctl support.
- * block.c: New file.
- * Makefile.am (strace_SOURCES): Add it.
- * defs.h [LINUX] (block_ioctl): New function.
- * ioctl.c (ioctl_decode) [LINUX]: Use it to decode HDIO_* and BLK*
- ioctls.
- Patch by Jeff Mahoney <jeffm@suse.com>
-
-2011-01-14 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Parse SOL_SCTP socket options.
- * configure.ac (AC_CHECK_HEADERS): Add netinet/sctp.h.
- * net.c [HAVE_NETINET_SCTP_H]: Include <netinet/sctp.h>.
- [SOL_SCTP] (socksctpoptions): New xlat structure.
- (sys_getsockopt, printsockopt): Parse SOL_SCTP options.
-
- * net.c (socketlayers): Add more SOL_* constants from linux/socket.h.
-
-2011-01-14 Dmitry V. Levin <ldv@altlinux.org>
-
- strace.1: fix misleading italics.
- * strace.1: Use bold instead of italics for "-e trace=" keywords.
- This fixes Debian bug #589323.
-
- Update linux/ioctlent.h.
- * linux/ioctlent.h: Regenerate using linux v2.6.37 headers.
-
- Add HDIO_* ioctls defined in linux/hdreg.h.
- * linux/ioctlent.sh: Add HDIO_* ioctls (0x03..) defined in
- linux/hdreg.h header file.
- This fixes Debian bug #450953.
-
-2011-01-13 Dmitry V. Levin <ldv@altlinux.org>
-
- Test PTRACE_O_TRACECLONE and PTRACE_O_TRACEVFORK along with PTRACE_O_TRACEFORK
- * strace.c (test_ptrace_setoptions): Add PTRACE_O_TRACECLONE and
- PTRACE_O_TRACEVFORK to PTRACE_SETOPTIONS call, to test exactly
- the same set of options that is going to be used later in trace().
-
-2011-01-10 Dmitry V. Levin <ldv@altlinux.org>
-
- * net.c (protocols): Add more IPPROTO_* constants defined in netinet/in.h
-
-2011-01-10 Holger Hans Peter Freyther <holger@freyther.de>
-
- * net.c (protocols): Add IPPROTO_GRE, IPPROTO_SCTP and IPPROTO_UDPLITE.
-
-2011-01-10 Carmelo AMOROSO <carmelo.amoroso@st.com>
-
- sh: Add entry for not-multiplexed accept4.
- * linux/sh/syscallent.h: Add specific entry for not-multiplexed accept4
- available in kernel mainline since v2.6.37-rc6, see
- http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21b6e4c7106b2d68a6710506d8706608272fd78b
-
-2010-12-14 Carmelo AMOROSO <carmelo.amoroso@st.com>
-
- sh: Add entries for not-multiplexed socket calls.
- * linux/sh/syscallent.h: Add specific entries for not-multiplexed
- socket calls (available in kernel mainline since v2.6.37-rc1)
-
- sh: Fix compilation warning in do_pipe due to missing prototype.
- * defs.h [SH]: Make getrval2 prototype visible to do_pipe
- and fix the following compiler warning:
- .../net.c: In function 'do_pipe':
- .../net.c:1632: warning: implicit declaration of function 'getrval2'
- .../net.c:1632: warning: format '%lu' expects type 'long unsigned int',
- but argument 3 has type 'int'
-
-2010-12-14 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix build on uClibc.
- * defs.h [LINUX]: Define PTRACE_GETEVENTMSG macro.
- Patch by Douglas Mencken <dougmencken@gmail.com>.
-
-2010-12-07 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix strace -f -o '|command' hangup.
- * strace.c (main): Call test_ptrace_setoptions() before parsing
- -o option, otherwise a forked command will cause a hangup inside
- test_ptrace_setoptions().
-
-2010-12-03 Dmitry V. Levin <ldv@altlinux.org>
-
- Output diagnostics to stderr.
- * syscall.c (get_scno): Output information about changes in
- personality mode to stderr. Reported by Pádraig Brady.
-
- Recognize more clone flags.
- * process.c (CLONE_*): Define more flags from linux v2.6.25.
- (clone_flags): Add entries for them.
- Proposed by <zhangyanfei@cn.fujitsu.com>.
-
- Decode struct ucred for getsockopt SO_PEERCRED.
- * net.c (sys_getsockopt): Decode SO_PEERCRED.
- Proposed by Arkadiusz Miśkiewicz <arekm@maven.pl>.
-
-2010-12-03 Carmelo AMOROSO <carmelo.amoroso@st.com>
-
- sh: Add support for tracing sys_cacheflush system call.
- * linux/sh/syscallent.h: Update sys_cacheflush entry.
- * linux/syscall.h [SH] (sys_cacheflush): New function declaration.
- * system.c [SH] (cacheflush_flags): New xlat structure.
- [SH] (sys_cacheflush): New function.
-
- Reviewed-by: Angelo Castello <angelo.castello@st.com>
-
-2010-11-30 Dmitry V. Levin <ldv@altlinux.org>
-
- Cleanup test_ptrace_setoptions()
- * strace.c (test_ptrace_setoptions): Cleanup.
- (main): Fix test_ptrace_setoptions() error diagnostics message.
- Print ptrace_setoptions value in debug mode.
-
-2010-11-30 Wang Chao <wang.chao@cn.fujitsu.com>
-
- Handle followfork using ptrace_setoptions if available.
- If PTRACE_O_TRACECLONE et al options are supported by kernel,
- use them to do followfork rather than the original setbpt
- method that changes registers ourselves.
-
- * defs.h [LINUX] (handle_new_child): New function prototype.
- * process.c [LINUX] (handle_new_child): New function based on the
- code from internal_fork(), with a trivial change: do reparent only
- for sys_clone.
- [LINUX] (internal_fork): Use handle_new_child(). Do nothing if
- ptrace_setoptions is in effect.
- * strace.c [LINUX] (handle_ptrace_event): New function.
- [LINUX] (trace): If ptrace_setoptions is in effect, then
- call the new function to handle PTRACE_EVENT_* status, and
- set PTRACE_SETOPTIONS when we see the initial stop of tracee.
-
- Test how PTRACE_SETOPTIONS support works.
- Currently test fork related options only. Fork a child that uses
- PTRACE_TRACEME at startup and then does a fork so strace can test
- how the PTRACE_SETOPTIONS support works before it handles any real
- tracee. Since PTRACE_O_TRACECLONE/*FORK were introduced to kernel
- at the same time, this test seems to be enough for these 3 options.
-
- * defs.h [LINUX]: Define PTRACE_O_TRACECLONE et al macros here.
- (ptrace_setoptions): New variable declaration.
- * strace.c [LINUX] (test_ptrace_setoptions): New function, tests
- whether kernel supports PTRACE_O_CLONE/*FORK, the result is stored
- in the new variable ptrace_setoptions for later use.
- (main): Call test_ptrace_setoptions() if followfork option is set.
-
-2010-09-17 Dmitry V. Levin <ldv@altlinux.org>
-
- Enable support for less verbose build rules.
- * configure.ac (AM_INIT_AUTOMAKE): Add silent-rules.
-
-2010-09-17 Wang Chao <wang.chao@cn.fujitsu.com>
-
- Do not trace children cloned with CLONE_UNTRACED flag.
- If clone is called with flag CLONE_UNTRACED, to be consistent with
- option PTRACE_O_TRACECLONE, we should not set CLONE_PTRACE flag on
- its arguments.
-
- * process.c [LINUX] (internal_fork): Check the syscall and arguments.
-
-2010-09-17 Dmitry V. Levin <ldv@altlinux.org>
-
- Update the list of CLOCK_* constants to match Linux kernel v2.6.32+
- * time.c (struct xlat clocknames[]): Add more RT clock IDs.
- Reported by Tommi Rantala.
-
-2010-09-16 Dmitry V. Levin <ldv@altlinux.org>
-
- Update linux/hppa/syscallent.h to match Linux kernel v2.6.35.
- * linux/hppa/syscallent.h: Add hooks for recvmmsg and accept4.
-
-2010-09-15 Dmitry V. Levin <ldv@altlinux.org>
-
- Pass less information to qualify_one and qual_*
- * syscall.c (qualify_one, qual_syscall, qual_signal, qual_fault,
- qual_desc): Take just a bitflag argument instead of pointer to the whole
- qual_options structure.
- (struct qual_options): Update prototype of "qualify" field.
- (qualify): Update use of qualify_one and qual_options->qualify.
-
-2010-09-15 Wang Chao <wang.chao@cn.fujitsu.com>
-
- Fix -e option with only one value in qualifier statement.
- Fix regression introduced by commit v4.5.20-19-g30145dd:
- if -e option is used with only one value in qualifier statement,
- e.g. 'strace -e trace=open ls', syscall information would not be
- printed properly.
-
- * syscall.c (qualify): Remove faulty optimization.
-
-2010-09-15 Mike Frysinger <vapier@gentoo.org>
-
- Fix off_t/rlim_t size checks when cross-compiling.
- The current off_t/rlim_t size checks (wrt size of long long) use AC_RUN
- which obviously doesn't work when cross-compiling. While we don't hit
- any configure errors, the fall back code is pretty dumb (which is to say
- there isn't any). Considering the code in question though, we can use
- some fun compiler tricks with sizeof and array lengths to turn it into
- a pure build test and avoid the RUN issue completely.
-
- * m4/long_long.m4 (AC_OFF_T_IS_LONG_LONG, AC_RLIM_T_IS_LONG_LONG):
- Convert from AC_RUN_IFELSE to AC_COMPILE_IFELSE.
-
- Fix long long little endian detection when cross-compiling.
- The long long endian detection code does an AC_TRY_RUN() and since that
- doesn't work when cross-compiling, it sets a fallback value. However,
- rather than do any sort of default endian detection, the code simply
- sets it to "no". This probably breaks most little endian systems out
- there when cross-compiling for them. It certainly breaks Blackfin
- systems. So use the common endian detection code provided by autoconf
- and key off of that when cross-compiling.
-
- * configure.ac: Call AC_C_BIGENDIAN.
- * m4/long_long.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Set cross-compiling
- logic based on ac_cv_c_bigendian.
-
- Blackfin: decode new syscalls.
- * linux/bfin/syscallent.h: Add fanotify/prlimit/cacheflush syscalls.
- * linux/syscall.h: Add sys_cacheflush() decl.
- * system.c: Decode Blackfin's cacheflush syscall.
-
- * linux/ioctlent.sh: Search a few non-exported paths.
-
-2010-09-15 Roland McGrath <roland@redhat.com>
-
- Clean up pid2tcb usage.
- * strace.c (pid2tcb): Always match pid. Fail for argument <= 0.
- [USE_PROCFS] (first_used_tcb): New function.
- [USE_PROCFS] (trace): Use that instead of pid2tcb(0).
-
-2010-09-09 Dmitry V. Levin <ldv@altlinux.org>
-
- Turn on more compiler warnings.
- * configure.ac: Enable gcc -Wwrite-strings.
-
- Import warnings.m4 from gnulib.
- * m4/warnings.m4: Replace with warnings.m4 from gnulib.
- * configure.ac: Use gl_WARN_ADD from new warnings.m4.
- * Makefile.am (AM_CFLAGS): Update for new warnings.m4.
-
- Split acinclude.m4.
- * Makefile.am (ACLOCAL_AMFLAGS): Add "-I m4".
- * acinclude.m4: Remove.
- * m4/includedir.m4: New file, with definition of AC_INCLUDEDIR from
- acinclude.m4.
- * m4/long_long.m4: New file, with definitions of AC_OFF_T_IS_LONG_LONG,
- AC_RLIM_T_IS_LONG_LONG and AC_LITTLE_ENDIAN_LONG_LONG from acinclude.m4.
- * m4/procfs.m4: New file, with definitions of AC_MP_PROCFS,
- AC_POLLABLE_PROCFS and AC_STRUCT_PR_SYSCALL from acinclude.m4.
- * m4/stat.m4: New file, with definition of AC_STAT64 from acinclude.m4.
- * m4/statfs.m4: New file, with definition of AC_STATFS64 from
- acinclude.m4.
- * m4/warnings.m4: New file, with definition of AC_WARNFLAGS from
- acinclude.m4.
-
- * process.c (sys_waitid): Remove unused variable.
-
-2010-09-07 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix const-correctness issues uncovered by gcc -Wwrite-strings.
- * defs.h (struct xlat): Add const qualifier to the field of
- type "char *".
- (set_sortby, qualify, printnum, printnum_int): Add const qualifier to
- arguments of type "char *".
- * count.c (set_sortby): Add const qualifier to the argument and
- automatic variable of type "char *".
- * desc.c (decode_select): Add const qualifier to automatic variables of
- type "char *".
- * ioctlsort.c (struct ioctlent): Add const qualifier to fields of
- type "char *".
- (main): Add const qualifier to argv.
- * process.c (printargv): Add const qualifier to the argument and
- automatic variable of type "char *".
- (printargc) Add const qualifier to argument of type "char *".
- * signal.c (sprintsigmask, parse_sigset_t): Add const qualifier to
- arguments of type "char *".
- * strace.c (progname): Add const qualifier.
- (detach): Add const qualifier to automatic variable of type "char *".
- * stream.c (struct strbuf): Add const qualifier to the field of
- type "char *".
- * syscall.c (struct qual_options): Add const qualifier to fields of
- type "char *".
- (qual_syscall, qual_fault, qual_desc, lookup_class): Add const qualifier
- to arguments of type "char *".
- (qual_signal): Add const qualifier to the argument of type "char *",
- avoid modification of constant argument.
- (qualify): Likewise.
- * util.c (printflags): Add const qualifier to automatic variable of
- type "char *".
- (printnum, printnum_int): Add const qualifier to arguments of
- type "char *".
-
-2010-09-04 Wang Chao <wang.chao@cn.fujitsu.com>
-
- Fix printing clone flags.
- When we trace clone() syscall with only exit signal as clone
- flags, strace would print an unnecessary OR operator.
-
- * process.c (sys_clone): Fix this.
-
-2010-08-28 Wang Chao <wang.chao@cn.fujitsu.com>
-
- Drop nclone_detached and related flags.
- Remove nclone_detached since CLONE_DETACHED flag was no-op for a very
- long time in kernel.
-
- * defs.h (struct tcb): Remove nclone_detached field.
- Remove TCB_CLONE_DETACHED flag.
- * process.c: Remove CLONE_DETACHED flag.
- (clone_flags): Remove CLONE_DETACHED entry.
- (internal_fork, internal_wait): Remove code dealing with CLONE_DETACHED
- flag and nclone_detached.
- * strace.c (startup_attach, alloc_tcb, droptcb, handle_group_exit):
- Likewise.
-
-2010-08-09 Neil Campbell <lists@thebatcave.org.uk>
-
- Correct get/set_robust_list syscall numbers for powerpc.
- * linux/powerpc/syscallent.h: Swap positions of get_ and set_robust_list.
-
-2010-08-09 Wang Chao <wang.chao@cn.fujitsu.com>
-
- Handle CLONE_PARENT flag.
- * process.c (internal_fork): The parent of new cloned process is the
- same of the calling process when CLONE_PARENT is set.
-
- Fix error when judging if process has children.
- * process.c (internal_wait): Processes counted in tcp->nclone_threads
- are tcp's threads, rather than tcp's children.
-
- Forbid using mutually exclusive options -D and -p together.
- If we use -D and -p option together to trace a multi-thread program, in
- addition to the main thread, other threads could not be traced even if we
- present -f option. Moreover, when executing 'strace -D -p <non-exist pid>',
- strace could not terminate normally.
-
- * strace.c (main): Check it.
-
-2010-08-05 David Daney <ddaney@caviumnetworks.com>
-
- Update Linux MIPS syscalls to match 2.6.35-rc6+
- * linux/mips/syscallent.h: Add and update 405 hooks.
-
-2010-08-05 Edgar E. Iglesias <edgar.iglesias@gmail.com>
-
- Add support for the MicroBlaze architecture.
- * configure.ac: Recognize MicroBlaze.
- * linux/microblaze/syscallent.h: New file.
- * Makefile.am (EXTRA_DIST): Add linux/microblaze/syscallent.h
- * process.c (change_syscall, struct_user_offsets): Add MicroBlaze
- support.
- * signal.c (sys_sigreturn): Likewise.
- * syscall.c (internal_syscall, get_scno, syscall_fixup, get_error,
- syscall_enter): Likewise.
-
-2010-08-05 Frederik Schüler <fs@debian.org>
-
- linux/sparc: add missing syscall declarations.
- * linux/sparc/syscall.h: Sync with linux/syscall.h
-
-2010-07-17 Andreas Schwab <schwab@linux-m68k.org>
-
- Handle biarch get/setrlimit.
- * resource.c (print_rlimit32) [POWERPC64 || X86_64]: Define.
- (sys_getrlimit, sys_setrlimit) [POWERPC64 || X86_64]: Use it.
-
-2010-07-13 Andreas Schwab <schwab@linux-m68k.org>
-
- Add biarch support for powerpc64.
- * acinclude.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Use int instead of
- long.
- * configure.ac [$host_cpu = powerpc*]: Also define POWERPC64 if
- $host_cpu = powerpc64.
- * defs.h (SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE)
- (PERSONALITY1_WORDSIZE) [POWERPC64]: Define.
- * file.c: (struct stat_powerpc32, printstat_powerpc32) [POWERPC64]:
- Define.
- (printstat) [LINUX && POWERPC64]: Use printstat_powerpc32 in
- 32-bit personality.
- (sys_newfstatat) [POWERPC64]: Handle personalities.
- * signal.c (sys_sigreturn) [POWERPC64]: Likewise.
- * util.c (printllval) [POWERPC64]: Likewise.
- (printcall) [POWERPC64]: Use wider format for IP prefix.
- * syscall.c (get_scno) [POWERPC64]: Check for 64/32 bit mode.
- * linux/powerpc/errnoent1.h: New file.
- * linux/powerpc/ioctlent1.h: New file.
- * linux/powerpc/signalent1.h: New file.
- * linux/powerpc/syscallent1.h: New file.
-
-2010-07-09 Andreas Schwab <schwab@redhat.com>
-
- Balance braces.
- * strace.c (proc_open): Avoid unbalanced braces.
- (trace): Likewise.
-
-2010-07-06 Andreas Schwab <schwab@linux-m68k.org>
-
- Remove extern declaration at file scope.
- * defs.h (force_result): Declare.
- * process.c (internal_wait): Don't declare force_result.
-
-2010-06-24 Andreas Schwab <schwab@redhat.com>
-
- Document -C/-D.
- * strace.c (usage): Document -C.
- * strace.1: Document -D.
-
-2010-06-13 Roland McGrath <roland@redhat.com>
-
- Fix sourceforge download URL.
-
-2010-06-05 Andreas Schwab <schwab@linux-m68k.org>
-
- M68K: Fix fetching syscall arguments.
- * syscall.c (syscall_enter) [M68K]: Properly handle more than five
- syscall arguments.
-
-2010-05-28 Andreas Schwab <schwab@linux-m68k.org>
-
- Decode TLS syscalls on m68k.
- * linux/m68k/syscallent.h: Add entries for get_thread_area,
- set_thread_area, atomic_comxchg_32, atomic_barrier.
- * linux/dummy.h (sys_get_thread_area, sys_set_thread_area) [M68K]:
- Don't redefine.
- * mem.c (sys_get_thread_area, sys_set_thread_area) [LINUX && M68K]: New.
-
- Fix warning when compiling for m68k.
- * syscall.c (d0): Define as long.
-
-2010-04-13 Dmitry V. Levin <ldv@altlinux.org>
-
- Prepare for 4.5.20 release.
- * NEWS: Update for 4.5.20 release.
- * configure.ac: Version 4.5.20.
- * debian/changelog: 4.5.20-1.
- * strace.spec: 4.5.20-1.
-
-2010-04-13 Frederik Schüler <fs@debian.org>
-
- Update debian/* files for the upcoming release.
- * debian/control: update standards-version to 3.8.4.
- * debian/rules: allow parallel building.
- * debian/rules: comment out verbose build, only needed for debugging.
- * debian/rules: clean up clean: target, dh_clean does most of the work
- already.
- * debian/rules: use *-stamp instead of stamp-*, so dh_clean can tidy
- up for us.
-
-2010-04-13 Heiko Carstens <heiko.carstens@de.ibm.com>
-
- Fix s390 system call table list.
- * linux/s390/syscallent.h: Add the missing entries for preadv and
- pwritev to the system call table list.
- * linux/s390x/syscallent.h: Likewise.
-
-2010-04-07 Dmitry V. Levin <ldv@altlinux.org>
-
- Update linux/ioctlent.h.
- * linux/ioctlent.sh: Search in asm-generic directory as well.
- * linux/ioctlent.h: Regenerated.
-
- Update linux/*/syscallent.h files to match Linux kernel v2.6.33.
- * linux/alpha/syscallent.h: Add 47 hooks.
- * linux/arm/syscallent.h: Update hooks for pselect6, ppoll,
- epoll_pwait. Add 11 hooks.
- * linux/bfin/syscallent.h: Update hooks for prctl, fallocate,
- signalfd4, eventfd2, epoll_create1, dup3, pipe2, perf_event_open.
- Hook up recvmmsg.
- * linux/hppa/syscallent.h: Update hooks for signalfd4, eventfd2,
- epoll_create1, dup3, pipe2, perf_event_open.
- * linux/i386/syscallent.h: Fix syscall name for the kexec_load hook.
- Add 5 hooks.
- * linux/ia64/syscallent.h: Fix syscall name for the kexec_load hook.
- Add 4 hooks.
- * linux/m68k/syscallent.h: Add 50 hooks.
- * linux/powerpc/syscallent.h: Fix hook for timerfd_create. Fix
- 6 syscall names to match the kernel. Use sys_semop to parse semop.
- Add 14 hooks.
- * linux/s390/syscallent.h: Fix syscall name for the kexec_load hook.
- Add 14 hooks.
- * linux/s390x/syscallent.h: Likewise.
- * linux/sh/syscallent.h: Add 13 hooks.
- * linux/sh64/syscallent.h: Add 15 hooks.
- * linux/sparc/syscallent.h: Add 22 hooks.
- * linux/x86_64/syscallent.h: Add 5 hooks.
-
- Enhance recvmmsg parser.
- * net.c (sys_recvmmsg): Decode mmsghdr structure on exit from the
- syscall. Decode timespec structure both on entrance and on exit.
-
-2010-04-07 Andreas Schwab <schwab@linux-m68k.org>
-
- Decode recvmmsg syscall.
- * net.c (do_msghr): New function to print struct msghdr.
- (printmsghdr): Use it.
- (printmmsghdr, sys_recvmmsg): New.
- * linux/syscall.h: Declare sys_recvmmsg.
- (SYS_sub_recvmmsg): Define.
- (SYS_socket_nsubcalls): Bump.
- * linux/sparc/syscall.h: Likewise.
- * linux/arm/syscallent.h: Add sys_recvmmsg.
- * linux/bfin/syscallent.h: Likewise.
- * linux/i386/syscallent.h: Likewise.
- * linux/m68k/syscallent.h: Likewise.
- * linux/powerpc/syscallent.h: Likewise.
- * linux/s390/syscallent.h: Likewise.
- * linux/s390x/syscallent.h: Likewise.
- * linux/sh/syscallent.h: Likewise.
- * linux/sh64/syscallent.h: Likewise.
- * linux/sparc/syscallent.h: Likewise.
- * linux/ia64/syscallent.h: Adjust.
-
-2010-04-07 Dmitry V. Levin <ldv@altlinux.org>
-
- * strace.1: Fix quoting of hyphens and formatting of strace options.
-
- Split trace_syscall() for better readability.
- * syscall.c (trace_syscall): Split into trace_syscall_exiting() and
- trace_syscall_entering().
-
- Implement -C option to combine regular and -c output.
- * defs.h (cflag_t): New enum.
- * strace.1: Document -C option.
- * strace.c (cflag): Update type.
- (main): Handle -C option.
- (trace): Update use of cflag.
- * count.c (count_syscall): Move clearing of TCB_INSYSCALL to ...
- * syscall.c (trace_syscall): ... here. Update use of cflag.
- Based on patch by Adrien Kunysz.
-
- Fix "make dist" regression introduced by commit v4.5.19-12-g5078770.
- * Makefile.am (EXTRA_DIST): Rename linux/syscallent.h to linux/i386/syscallent.h
-
- * desc.c (sys_epoll_pwait): Fix output formatting bug.
-
- * desc.c (decode_select): Fix potential stack buffer overflow.
-
-2010-03-31 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix msgsnd indirect ipccall decoding.
- This regression was introduced by commit v4.5.18-136-g783f5bc.
- * ipc.c (tprint_msgsnd): Add and use "flags" argument.
- (sys_msgsnd): Pass "flags" argument to tprint_msgsnd().
- Patch by Anton Blanchard.
-
-2010-03-23 Mark Wielaard <mjw@redhat.com>
-
- Hook up inotify_init1 open mode flags printer.
- * file.c [LINUX] (sys_inotify_init1): New function.
- * linux/syscall.h: Declare new sys_inotify_init1 handler.
- * linux/bfin/syscallent.h: Hook up new handler.
- * linux/hppa/syscallent.h: Likewise.
- * linux/i386/syscallent.h: Likewise.
- * linux/x86_64/syscallent.h: Likewise.
-
-2010-03-09 Andreas Schwab <schwab@redhat.com>
-
- Avoid spurious error when checking for linux/netlink.h.
- * configure.ac: Include <asm/types.h> when checking for
- linux/netlink.h.
-
-2010-02-23 Andreas Schwab <schwab@linux-m68k.org>
-
- Fix reporting signal mask by sigreturn on powerpc.
- * signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when
- locating signal context.
-
-2010-02-09 David Daney <ddaney@caviumnetworks.com>
-
- Fix MIPS N32/N64 compile error.
- * syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass
- tcp->pid to ptrace().
-
-2010-02-05 Chris Metcalf <cmetcalf@tilera.com>
-
- Add support for the TILE architecture.
- * configure.ac: Add TILE to the list of supported architectures.
- * defs.h: Define TCB_WAITEXECVE for TILE.
- * linux/tile/syscallent.h: New file.
- * Makefile.am (EXTRA_DIST): Add linux/tile/syscallent.h
- * process.c (change_syscall, struct_user_offsets): Add TILE support.
- * syscall.c (get_scno, get_error, syscall_enter): Likewise.
- * mem.c (mmap_flags, print_mmap): Add MAP_CACHE_xxx TILE extensions
- support.
- * signal.c (sigact_flags): Add SA_NOPTRACE.
- (sys_sigreturn): Add TILE support.
-
-2010-02-04 Dmitry V. Levin <ldv@altlinux.org>
-
- Remove dead code.
- * defs.h (tv_tv): Remove.
- * net.c (sys_xsetsockaddr): Remove commented out dead code.
- * process.c (setarg, sys_execv, sys_execve, struct_user_offsets):
- Likewise.
- * signal.c (sys_sigsuspend): Likewise.
- * strace.c (reaper, trace): Likewise.
- * stream.c (internal_stream_ioctl): Likewise.
- * syscall.c (trace_syscall): Likewise.
- * term.c (term_ioctl): Likewise.
- * util.c (tv_tv, umoven, uload, getpc, fixvfork, setbpt, clearbpt):
- Likewise.
-
- Merge Linux internal_clone() into internal_fork()
- * defs.h (internal_clone): Remove.
- * process.c (internal_clone): Merge into internal_fork().
- (internal_fork) [!LINUX]: Remove dead code.
- * syscall.c (internal_syscall): Replace internal_clone() with
- internal_fork().
-
- * Makefile.am (INCLUDES): Remove redundant search directories.
-
-2010-02-04 Frederik Schüler <fs@debian.org>
-
- Update debian/* files.
- * debian/control: add sparc64 to the architectures list.
- This closes Debian bug #560062
- * Backport commit f0df31e71a58c6e79ba77c1a9d84b2f38d44bec7 to fix FTBFS.
- This closes Debian bug #560516
- * debian/control: Update standards-version to 3.8.3.
- * debian/control: Lower package priority to optional, matching
- the archive override.
- * debian/control: add ${misc:Depends} to Depends: lines where
- appropriate.
- * debian/watch: new file, allows automatic tracking of new
- upstream versions.
- * debian/source/format: new file, adapt to debian source format "quilt"
- * debian/rules: indentation cleanups; use dh_testroot and dh_prep
- in clean target.
-
-2010-01-25 Andreas Schwab <schwab@redhat.com>
-
- Fix spurious failure of AC_STAT64 test.
- * acinclude.m4 (AC_STAT64): Include <sys/types.h> first.
-
-2010-01-12 Andreas Schwab <schwab@redhat.com>
-
- Don't kill the process when detaching.
- * strace.c (detach): Call clearbpt when TCB_BPTSET is set.
-
-2009-12-25 Dmitry V. Levin <ldv@altlinux.org>
-
- Decode fifth argument of mremap syscall.
- * mem.c (sys_mremap): Decode fifth argument.
- * linux/*/syscallent.h: Update the number of mremap syscall arguments.
-
-2009-12-24 Chris Metcalf <cmetcalf@tilera.com>
-
- * mem.c (sys_mbind): Display first argument in hex.
-
- * mem.c (mremap_flags): Add MREMAP_FIXED.
-
-2009-11-16 Mike Frysinger <vapier@gentoo.org>
-
- Move i386-specific files out of common linux dir.
- * linux/syscallent.h: Moved to ...
- * linux/i386/syscallent.h: ... here.
- * linux/ia64/syscallent.h: Update i386 syscallent.h include.
- * linux/sparc/gen.pl: Likewise.
- * linux/x86_64/syscallent1.h: Likewise.
-
-2009-11-16 Andreas Schwab <schwab@redhat.com>
-
- Remove support for pre-C89.
- * defs.h: Remove references to __STDC__ and P macros.
- * strace.c: Likewise.
-
-2009-11-13 Dmitry V. Levin <ldv@altlinux.org>
-
- Decode more SOL_PACKET socket options.
- * net.c (sockpacketoptions): Add more PACKET_* entries.
- (sys_getsockopt): Decode PACKET_STATISTICS.
- (printsockopt): Decode PACKET_RX_RING and PACKET_TX_RING.
- Patch by Gabor Gombas.
-
-2009-11-11 Andreas Schwab <schwab@redhat.com>
-
- Ignore errors if a thread is killed.
- * util.c (clearbpt): Ignore ESRCH error.
-
-2009-11-06 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-
- Fix handling of Linux systems without struct statfs64.
- * acinclude.m4 (AC_STATFS64): New macro to check for struct statfs64.
- * configure.ac: Call AC_STATFS64.
- * file.c (printstatfs64, sys_statfs64, sys_fstatfs64): Compile only
- if struct statfs64 is available.
-
-2009-11-06 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix getsockopt decoding on architectures where sizeof(long) > sizeof(int)
- * net.c (sys_getsockopt): Optimize output a bit.
- Decode integer argument using printnum_int(), patch by Gabor Gombas.
-
- Check umove() return code.
- * bjm.c (sys_query_module): Print input parameters when entering
- syscall. Fix handling of syscall error. Handle unlikely umove()
- failures.
- * ipc.c (tprint_msgrcv): New function. Move part of msgrcv parser code
- here, add check umove() return code.
- (sys_msgsnd): Print msqid parameter as int instead of long.
- (sys_msgrcv): Likewise. Use tprint_msgrcv().
- * process.c (print_affinitylist): Check umove() return code.
- * sock.c (sock_ioctl): Handle unlikely umove() failure in the
- SIOCGIFCONF parser.
-
- Fix check for linux/netlink.h on Linux 2.6.32-rc5+
- * configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include
- sys/socket.h instead of linux/socket.h beforehand.
-
-2009-11-04 Andreas Schwab <schwab@redhat.com>
-
- Decode fallocate on PowerPC.
- * linux/powerpc/syscallent.h: Decode fallocate.
-
- Factor out printing of 64bit syscall argument.
- * defs.h (ALIGN64): Remove.
- (printllval): Declare.
- * util.c (printllval): Define.
- * file.c (sys_readahead): Use printllval.
- (sys_lseek64): Likewise.
- (sys_truncate64): Likewise.
- (sys_ftruncate64): Likewise.
- (sys_fadvise64): Likewise.
- (sys_fadvise64_64): Likewise.
- (sys_fallocate): Likewise.
- * io.c (sys_pread): Likewise.
- (sys_pwrite): Likewise.
- (sys_pread64): Likewise.
- (sys_pwrite64): Likewise.
- * mem.c (sys_mmap64): Likewise.
-
-2009-11-03 Andreas Schwab <schwab@redhat.com>
-
- Correct decoding of readahead and fadvice64(_64) on PowerPC.
- * file.c (sys_readahead): Align 64bit argument. Handle PowerPC64
- like other 64bit architectures.
- (sys_fadvise64): Likewise.
- (sys_fadvise64_64): Handle PowerPC like ARM.
- * linux/powerpc/syscallent.h (sys_readahead): Account for 64bit
- argument alignment on PowerPC32.
-
-2009-10-27 Andreas Schwab <schwab@redhat.com>
-
- Maintain separate print column for each process.
- * defs.h (struct tcp): Add curcol.
- * strace.c: (alloc_tcb): Initialize it.
- (trace): Use curcol from current process and save it before
- continuing.
- (tprintf): Don't modify curcol on output error.
-
-2009-10-21 Roland McGrath <roland@redhat.com>
-
- * strace.spec: 4.5.19-1 release.
-
-2009-10-21 Dmitry V. Levin <ldv@altlinux.org>
-
- * file.c (printstat64): Cleanup trailing whitespace.
-
-2009-10-16 Andreas Schwab <schwab@redhat.com>
-
- Fix decoding of newfstatat syscall on x86-64.
- * file.c (printstat64) [LINUX && X68_64]: If tracing a 64-bit
- process redirect to printstat.
- Fixes RH#529316 "Field values shown for "newfstatat" system
- call are incorrect"
-
-2009-10-12 Dmitry V. Levin <ldv@altlinux.org>
-
- * configure.ac (AC_CHECK_HEADERS): Remove asm/reg.h.
-
-2009-10-12 Mike Frysinger <vapier@gentoo.org>
-
- sparc/linux: Rewrite to use asm/ptrace.h.
- The current sparc/linux code uses asm/reg.h, but recent Linux kernels
- dropped that header completely. So switch over to the ptrace headers
- as those should stick around indefinitely as part of the ABI.
-
- * defs.h [LINUXSPARC] (U_REG_G1, U_REG_O0, U_REG_O1): Define.
- * process.c: Drop asm/regs.h include.
- [SPARC || SPARC64] (change_syscall): Change struct regs to struct pt_regs.
- * signal.c: Drop asm/regs.h include.
- (m_siginfo_t): Unify [SPARC || SPARC64] and [MIPS].
- [SPARC || SPARC64] (sys_sigreturn): Change struct regs to struct pt_regs.
- * syscall.c: Drop asm/regs.h include.
- [SPARC || SPARC64] (internal_syscall, get_scno, get_error, force_result,
- syscall_enter): Change struct regs to struct pt_regs.
- * util.c: Drop asm/regs.h include.
- (_hack_syscall5, _ptrace): Delete.
- [SPARC || SPARC64] (getpc, printcall, arg_setup_state): Change
- struct regs to struct pt_regs.
-
-2009-10-11 Roland McGrath <roland@redhat.com>
-
- * make-dist: Clean up.
-
- * configure.ac: Use AC_CONFIG_AUX_DIR([.]).
-
-2009-10-09 Dmitry V. Levin <ldv@altlinux.org>
-
- * make-dist: New script for preparing release tarballs.
-
- * git-set-file-times: Import from rsync.
-
- * Makefile.am [MAINTAINER_MODE]: Define and export TAR_OPTIONS.
-
-2009-10-08 Dmitry V. Levin <ldv@altlinux.org>
-
- Enhance msgsnd() parser.
- * ipc.c (tprint_msgsnd): New function. Move msgsnd parser code here,
- add check for umove() return code.
- (sys_msgsnd): Use tprint_msgsnd().
-
- * NEWS: Update for 4.5.19 release.
-
- Enhance semop()/semtimedop() sembuf parser.
- * ipc.c (tprint_sembuf): New function. Move sembuf parser code here,
- add abbrev() support.
- (sys_semop, sys_semtimedop): Use tprint_sembuf().
-
-2009-10-08 Jakub Bogusz <qboosh@pld-linux.org>
-
- Add pretty printing of sembuf argument to semop() and semtimedop()
- * ipc.c (semop_flags): New xlat structure.
- (sys_semop, sys_semtimedop): Add pretty printing of sembuf argument.
-
-2009-10-08 Mike Frysinger <vapier@gentoo.org>
-
- Add support for Linux/no-mmu with vfork.
- * configure.ac (AC_CHECK_FUNCS): Add fork.
- * strace.c (strace_vforked): Define.
- (startup_child): Do not raise SIGSTOP if vforked.
- (trace): Skip first exec when starting up after vforked.
- * syscall.c [BFIN] (get_scno): Drop waitexec checks.
-
- Avoid malloc(0) in getdents parsers.
- On end of directory, getdents returns 0. This return value is used to
- then try and do malloc(0), but on some systems this will always return
- NULL. Since the code won't read the pointer in question if len is 0,
- then don't bother calling malloc(0) and set the pointer to NULL ourself.
- * file.c (sys_getdents, sys_getdents64): Avoid malloc(0) call.
-
-2009-10-07 Mike Frysinger <vapier@gentoo.org>
-
- Add sys_nanosleep() prototype for sparc.
- * linux/sparc/syscall.h (sys_nanosleep): New prototype.
- Reported by Frederik Schüler.
-
- Silence compiler warnings about implicit cast from pointer to integer.
- * util.c (do_ptrace): Cast ptrace() 4th arg to long.
- (ptrace_restart): Drop void* cast on ptrace() 4th arg.
-
- Ignore .gdb files from FLAT toolchains.
- * .gitignore: Add /*.gdb.
-
- * configure.ac (AC_CHECK_FUNCS): Sort and expand.
-
- Blackfin: Update ioctl/syscall lists.
- * linux/bfin/ioctlent.h: Sync list with latest kernel sources.
- * linux/bfin/syscallent.h: Likewise.
-
- ioctlsort: Check ppc hosts too.
- * linux/ioctlsort.c: Check for __powerpc__.
-
-2009-10-07 Andreas Schwab <schwab@redhat.com>
-
- Fix build on ia64.
- * linux/ia64/syscallent.h: Update for addition of accept4 syscall
- in ../syscallent.h.
-
-2009-10-07 Roland McGrath <roland@redhat.com>
-
- * strace.spec (%doc): Add ChangeLog-CVS.
-
- * Makefile.am (srpm): New phony target.
-
- * Makefile.am (EXTRA_DIST): Add ChangeLog.
- ($(srcdir)/ChangeLog): New target, replaces gen-changelog phony target.
- Put it inside [MAINTAINER_MODE].
-
-2009-10-06 Dmitry V. Levin <ldv@altlinux.org>
-
- * NEWS: Update for 4.5.19 release.
-
-2009-10-05 Frederik Schüler <fs@debian.org>
-
- Prepare debian/* files for release.
- * debian/rules: Do not ship ChangeLog anymore.
- * debian/control: Update to Debian standards version 3.8.1, and remove
- Roland from the Maintainers list. This closes Debian bug #521458.
- * debian/changelog: Document changes and prepare for release.
-
-2009-10-05 Dmitry V. Levin <ldv@altlinux.org>
-
- * defs.h [HPPA]: Lower MAX_ARGS from 32 to 6.
-
- * ipc.c [LINUX] (sys_shmat): HPPA does not use an IPC multiplexer.
- Based on patch from Carlos O'Donell.
-
-2009-10-05 Carlos O'Donell <carlos@systemhalted.org>
-
- * linux/hppa/syscallent.h: Update syscalls.
- Based on work by Kyle McMartin and Helge Deller.
-
- Fix SA_HANDLER function pointer comparisons for hppa.
- * signal.c (sys_sigaction): Cast SA_HANDLER function pointers to long.
- (sys_rt_sigaction): Likewise.
-
-2009-10-05 Edgar E. Iglesias <edgar.iglesias@gmail.com>
-
- CRIS: Correct first argument to upeek()
- This complements commit ea0e6e80260d2b1b7ad40282012b0e47869bcddf.
- * syscall.c [CRISV10 || CRISV32] (syscall_fixup, syscall_enter): Pass
- tcp pointer instead of pid to upeek().
- * util.c [CRISV10 || CRISV32] (printcall): Likewise.
-
-2009-10-05 Dmitry V. Levin <ldv@altlinux.org>
-
- * signal.c (do_signalfd): Fix typo in output format.
-
-2009-09-21 Dmitry V. Levin <ldv@altlinux.org>
-
- * Makefile.am (gen_changelog_start_date): Fix date.
-
-2009-09-19 Dmitry V. Levin <ldv@altlinux.org>
-
- Prepare for 4.5.19 release.
- * NEWS: Update for 4.5.19 release.
- * configure.ac: Version 4.5.19.
- * debian/changelog: 4.5.19-1.
- * strace.spec: 4.5.19-1.
-
- Update debian/* to 4.5.18-1.
- * debian/changelog: Update to 4.5.18-1.
- * debian/compat: Set compatibility level to 7.
- * debian/control (Build-Depends): Update debhelper requirement.
- (strace, strace64): Add Section and Priority tags.
-
-2009-09-19 Kirill A. Shutemov <kirill@shutemov.name>
-
- Fix fadvise64 decoding on ARM.
- * file.c (sys_fadvise64_64) [ARM]: Fix argument ordering.
-
-2009-09-18 Dmitry V. Levin <ldv@altlinux.org>
-
- Fix follow fork/vfork on Linux ARM OABI.
- __NR_SYSCALL_BASE eis 0 for EABI and is 0x900000 for OABI.
- * process (change_syscall) [LINUX && ARM]: Mask off the high order bits
- when changing syscall.
-
- Reviewed-by: Kirill A. Shutemov <kirill@shutemov.name>
-
-2009-09-18 Mike Frysinger <vapier@gentoo.org>
-
- Mark shell scripts as executable.
-
- Ignore ioctlsort helper program.
- * .gitignore: Add ioctlsort.
-
- linux/errno: Add ERFKILL.
- * linux/errnoent.h: Change ERRNO_132 to ERFKILL according to errno 132
- definition introduced in Linux 2.6.31.
-
-2009-09-01 Paolo Bonzini <pbonzini@redhat.com>
-
- Add accept4 socketcall.
- This second patch in the series adds support for accept4 as a socketcall
- sub-call. Besides the need to renumber all system calls, this poses
- no problem.
- Tested on i686.
-
- * linux/arm/syscallent.h: Add accept4 socketcall.
- * linux/m68k/syscallent.h: Likewise.
- * linux/powerpc/syscallent.h: Likewise.
- * linux/s390/syscallent.h: Likewise.
- * linux/s390x/syscallent.h: Likewise.
- * linux/sh/syscallent.h: Likewise.
- * linux/sh64/syscallent.h: Likewise.
- * linux/sparc/syscallent.h: Likewise.
- * linux/syscallent.h: Likewise.
-
- * linux/sparc/syscall.h (SYS_sub_accept4): Declare.
- (SYS_socket_nsubcalls): Update.
- * linux/syscall.h: Likewise.
-
- Replace x86-64 paccept with accept4.
- This patch changes the paccept syscall to accept4 for x86-64, since
- the former was dropped in Linux kernel commit v2.6.27-rc7-14-g2d4c826.
- At the same time, it adds support for pretty printing its arguments.
-
- * linux/x86_64/syscallent.h: Replace paccept with accept4,
- hook in sys_accept4.
- * net.c (sys_accept): Leave a small stub calling the new...
- (do_accept): ... function, which also adds a flags_arg argument.
- (sys_accept4): New.
-
-2009-08-28 Andreas Schwab <schwab@redhat.com>
-
- Zero-extend 32-bit addresses when printing argv array.
- (printargv): Zero-extend 32-bit addresses.
- Fixes RH#519480 "64-bit strace is lazy on execve of 32-bit
- process".
-
-2009-08-12 Andreas Schwab <schwab@redhat.com>
-
- Add more futex decoding.
- * process.c (FUTEX_WAIT_REQUEUE_PI, FUTEX_CMP_REQUEUE_PI)
- (FUTEX_PRIVATE_FLAG, FUTEX_CLOCK_REALTIME): Define.
- (futexops): Add entries for them.
- (sys_futex): Decode FUTEX_CMP_REQUEUE_PI and
- FUTEX_WAIT_REQUEUE_PI.
-
-2009-07-08 Dmitry V. Levin <ldv@altlinux.org>
-
- Generate ChangeLog from git log.
- * .gitignore: Add ChangeLog
- * ChangeLog: Rename to ChangeLog-CVS.
- * Makefile.am (gen-changelog): New rule.
- (dist-hook): Depend on it.
- (EXTRA_DIST): Add ChangeLog-CVS.
- * README-hacking: Describe changes.
- * gitlog-to-changelog: Import from gnulib.
-
-
-See ChangeLog-CVS for older changes.
diff --git a/HACKING-scripts b/HACKING-scripts
new file mode 100644
index 0000000..ae4fabc
--- /dev/null
+++ b/HACKING-scripts
@@ -0,0 +1,58 @@
+Each strace port relies heavily on port-specific headers:
+ - errnoent.h - map error number to error name like strerror()
+ - ioctlent.h - map ioctl number to symbolic define
+ - signalent.h - map signal number to signal name like strsignal()
+ - syscallent.h - map syscall number to name and function signature
+
+Since generating these headers from scratch (or even just updating them) can be
+a big pain, there are a few scripts to help automate the process. Since each
+port organizes their kernel sources differently, there may be a specific script
+for your kernel.
+
+We will use the Linux kernel (2.6.20+) as an example below (the Blackfin
+architecture to be specific). Hopefully, it'll be obvious how to swap out a
+different system or architecture as your circumstances apply.
+
+ksrc=/usr/src/linux
+asrc=$ksrc/arch/blackfin/include/asm
+
+To use the errnoent.sh script, give it all the headers that might contain
+appropriate errno values. Excessive headers are not a problem. The resulting
+output should be directly usable without modification.
+ sh ./errnoent.sh \
+ $ksrc/include/linux/*errno*.h \
+ $ksrc/include/asm-generic/*errno*.h \
+ $asrc/*errno*.h \
+ > errnoent.h
+
+To use the ioctlent.sh script, give it all the base include directories. The
+script will crawl all the headers and try to discover appropriate ioctls.
+Unlike the other scripts, this one creates files for further processing. This
+is because ioctls tend to have a lot of define indirection, and the ioctlent.h
+header needs to be fully expanded into numeric form and sorted properly. So
+first we process all of the ioctls with the ioctlent.sh into ioctldefs.h and
+ioctls.h, and then we compile them into ioctlsort.c. The resulting output,
+while directly usable, only contains definitions that match exactly the current
+kernel version that the script ran against. That means older/newer ioctl
+defines that might be present in the existing ioctlent.h header will be lost if
+things are copied directly. A little creative use of `diff` and manual merging
+should be used to produce the final ioctlent.h header.
+ sh ./linux/ioctlent.sh $ksrc/include $asrc
+ gcc -Wall -I. linux/ioctlsort.c -o ioctlsort
+ ./ioctlsort > ioctlent.h
+
+To use the signalent.sh script, give it all the headers that might contain
+appropriate signal values. Excessive headers are not a problem. The resulting
+output should be directly usable without modification.
+ sh ./signalent.sh \
+ $asrc/signal.h \
+ > signalent.h
+
+To use the syscallent.sh script, give it the header with the list of your
+system call numbers. The resulting output is useful as a template for creating
+a proper header as it can really only detect the system call number and its
+name. It has no way of knowing the number of arguments or strace flags for
+decoding them (yet?).
+ sh ./syscallent.sh \
+ $asrc/unistd.h \
+ > syscallent.h
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..a9d2ff0
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,300 @@
+# Automake input for strace.
+
+SUBDIRS = tests
+
+bin_PROGRAMS = strace
+man_MANS = strace.1
+bin_SCRIPTS = strace-graph strace-log-merge
+
+OS = linux
+# ARCH is `i386', `m68k', `sparc', etc.
+ARCH = @arch@
+
+ACLOCAL_AMFLAGS = -I m4
+AM_CFLAGS = $(WARN_CFLAGS)
+AM_CPPFLAGS = -I$(srcdir)/$(OS)/$(ARCH) -I$(srcdir)/$(OS) -I$(builddir)/$(OS)
+
+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 \
+ 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
+
+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 \
+ ioctlsort.c \
+ 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 \
+ xlate.el
+
+.PHONY: srpm
+srpm: dist-xz
+ rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
+
+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: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \
+ $(srcdir)/.version
+ @rm -f $@.new
+ (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: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \
+ $(srcdir)/Makefile.in $(srcdir)/.version
+ $(AM_V_GEN) \
+ { \
+ 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 $@
+
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX
+
+IOCTLDIR = /usr/include
+IOCTLASM = asm
+IOCTLSORT_INCLUDEDIR = $(IOCTLDIR)
+
+ioctlent_h_in = linux/ioctlent.h.in
+
+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$(IOCTLSORT_INCLUDEDIR) \
+ $(filter -I%,$(LINK.c)) \
+ -o $@ $<
+ioctls.h: $(srcdir)/linux/ioctlent.sh
+ $(SHELL) $< $(IOCTLDIR) $(IOCTLASM)
+ioctldefs.h: ioctls.h ;
+
+endif
+
+ioctlent_h = $(builddir)/$(OS)/ioctlent.h
+BUILT_SOURCES += $(ioctlent_h)
+CLEANFILES = $(ioctlent_h)
+ioctlent_h_deps = $(srcdir)/$(OS)/ioctlent.h.in $(srcdir)/$(OS)/$(ARCH)/ioctlent.h.in
+$(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 | \
+ awk -f $(srcdir)/linux/ioctlent-filter.awk > $@
diff --git a/NEWS b/NEWS
index 1ec49f7..eed78c2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+Noteworthy changes in release ?.? (????-??-??)
+==============================================
+
Noteworthy changes in release 4.8 (2013-06-03)
==============================================
diff --git a/PORTING b/PORTING
deleted file mode 100644
index aef4ce4..0000000
--- a/PORTING
+++ /dev/null
@@ -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>
diff --git a/README-Android b/README-Android
deleted file mode 100644
index 3d594d6..0000000
--- a/README-Android
+++ /dev/null
@@ -1,14 +0,0 @@
-Strace on Android
-
-The Android port of Strace does not use the configure scripts or Makefiles
-from the original source distribution.
-
-Build Strace on Android using the Android build system, like the rest
-of the system.
-
-Android-specific customizations are immortalized in Android.patch to
-ease future upgrades.
-
-This file can be regenerated using:
-
-diff -r -u -d path-to-original-unmodified-strace . | grep -v "Only in" > Android.patch
diff --git a/README-hacking b/README-hacking
new file mode 100644
index 0000000..d2dfdd3
--- /dev/null
+++ b/README-hacking
@@ -0,0 +1,31 @@
+Requirements
+============
+If you use the GIT version of strace there will be some files missing
+that you need to build strace. These files are generated by tools from
+the GNU Autoconf and Automake packages. You need recent versions, which
+provide the `autoreconf -i' command that will do everything you need.
+
+
+No more ChangeLog file
+======================
+Do not create or modify the ChangeLog files. Starting at 2009-07-09, the
+policy changed. Before, we would insert the exact same text (or worse,
+sometimes slightly differing) into both the ChangeLog file and the commit
+log. Now we put that information only in the commit log, and generate
+the top-level ChangeLog file from logs at "make dist" time. As such,
+there are strict requirements on the form of the commit log messages.
+
+
+Commit log requirements
+=======================
+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.
diff --git a/TODO b/TODO
deleted file mode 100644
index 1d6a8e8..0000000
--- a/TODO
+++ /dev/null
@@ -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
diff --git a/aio.c b/aio.c
new file mode 100644
index 0000000..6bf8f82
--- /dev/null
+++ b/aio.c
@@ -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;
+}
diff --git a/bjm.c b/bjm.c
index cd7dc13..d7acff0 100644
--- a/bjm.c
+++ b/bjm.c
@@ -70,24 +70,24 @@
};
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 },
+ XLAT(0),
+ XLAT(QM_MODULES),
+ XLAT(QM_DEPS),
+ XLAT(QM_REFS),
+ XLAT(QM_SYMBOLS),
+ XLAT(QM_INFO),
+ XLAT_END
};
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 },
+ XLAT(MOD_UNINITIALIZED),
+ XLAT(MOD_RUNNING),
+ XLAT(MOD_DELETED),
+ XLAT(MOD_AUTOCLEAN),
+ XLAT(MOD_VISITED),
+ XLAT(MOD_USED_ONCE),
+ XLAT(MOD_JUST_FREED),
+ XLAT_END
};
int
@@ -200,3 +200,30 @@
}
return 0;
}
+
+#define MODULE_INIT_IGNORE_MODVERSIONS 1
+#define MODULE_INIT_IGNORE_VERMAGIC 2
+
+static const struct xlat module_init_flags[] = {
+ XLAT(MODULE_INIT_IGNORE_MODVERSIONS),
+ XLAT(MODULE_INIT_IGNORE_VERMAGIC),
+ XLAT_END
+};
+
+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;
+}
diff --git a/block.c b/block.c
index 374002e..58f4215 100644
--- a/block.c
+++ b/block.c
@@ -80,9 +80,9 @@
#endif
static const struct xlat blkpg_ops[] = {
- { BLKPG_ADD_PARTITION, "BLKPG_ADD_PARTITION", },
- { BLKPG_DEL_PARTITION, "BLKPG_DEL_PARTITION", },
- { 0, NULL },
+ XLAT(BLKPG_ADD_PARTITION),
+ XLAT(BLKPG_DEL_PARTITION),
+ XLAT_END
};
static void
diff --git a/build_static_example.sh b/build_static_example.sh
new file mode 100755
index 0000000..5c0e5fa
--- /dev/null
+++ b/build_static_example.sh
@@ -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\
+"
+
+autoreconf -i -f
+./configure $BUILDFLAG #--enable-maintainer-mode
+make CC="$CC" CFLAGS="$CFLAGS"
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..75eafc8
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,315 @@
+dnl Process this file with autoconf to create configure. Use autoreconf.
+AC_PREREQ(2.57)
+AC_INIT([strace],
+ m4_esyscmd([./git-version-gen .tarball-version]),
+ [strace-devel@lists.sourceforge.net])
+AC_CONFIG_SRCDIR([strace.c])
+AC_CONFIG_AUX_DIR([.])
+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_PROG_CC
+AC_USE_SYSTEM_EXTENSIONS
+
+AC_MSG_CHECKING([for supported architecture])
+case "$host_cpu" in
+bfin)
+ arch=bfin
+ AC_DEFINE([BFIN], 1, [Define for the Blackfin architecture.])
+ ;;
+i[[3456]]86|pentium)
+ arch=i386
+ AC_DEFINE([I386], 1, [Define for the i386 architecture.])
+ ;;
+ia64)
+ arch=ia64
+ AC_DEFINE([IA64], 1, [Define for the IA64 architecture.])
+ ;;
+m68k)
+ arch=m68k
+ AC_DEFINE([M68K], 1, [Define for the m68k architecture.])
+ ;;
+sparc64*)
+ arch=sparc64
+ AC_DEFINE([SPARC64], 1, [Define for the SPARC64 architecture.])
+ ;;
+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.])
+ ;;
+alpha*)
+ arch=alpha
+ AC_DEFINE([ALPHA], 1, [Define for the Alpha architecture.])
+ ;;
+powerpc*)
+ arch=powerpc
+ AC_DEFINE([POWERPC], 1, [Define for the PowerPC architecture.])
+ 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
+ ;;
+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.])
+ ;;
+s390x)
+ arch=s390x
+ AC_DEFINE([S390X], 1, [Define for the S390x architecture.])
+ ;;
+hppa*|parisc*)
+ arch=hppa
+ AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.])
+ ;;
+sh64*)
+ arch=sh64
+ AC_DEFINE([SH64], 1, [Define for the SH64 architecture.])
+ ;;
+sh*)
+ arch=sh
+ AC_DEFINE([SH], 1, [Define for the SH architecture.])
+ ;;
+x86?64*)
+ 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
+ AC_DEFINE([CRISV10], 1, [Define for the CRISv10 architecture.])
+ ;;
+crisv32)
+ arch=crisv32
+ AC_DEFINE([CRISV32], 1, [Define for the CRISv32 architecture.])
+ ;;
+tile*)
+ arch=tile
+ AC_DEFINE([TILE], 1, [Define for the Tile architecture])
+ ;;
+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])
+ ;;
+esac
+AC_MSG_RESULT($arch)
+
+AC_SUBST(arch)
+
+AM_CONDITIONAL([I386], [test x$arch = xi386])
+AM_CONDITIONAL([X86_64], [test x$arch = xx86_64])
+AM_CONDITIONAL([X32], [test x$arch = xx32])
+
+AC_INCLUDEDIR
+
+gl_WARN_ADD([-Wall])
+gl_WARN_ADD([-Wwrite-strings])
+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_INSTALL
+AC_C_CONST
+AC_C_BIGENDIAN
+AC_HEADER_STDC
+AC_HEADER_STDBOOL
+AC_HEADER_DIRENT
+AC_HEADER_STAT
+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
+
+AC_TYPE_SIGNAL
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_GETGROUPS
+AC_HEADER_MAJOR
+AC_CHECK_TYPES([sig_atomic_t, siginfo_t],,, [#include <signal.h>])
+AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
+[#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>])
+AC_LITTLE_ENDIAN_LONG_LONG
+
+AC_CHECK_FUNCS(m4_normalize([
+ fopen64
+ fork
+ fputs_unlocked
+ if_indextoname
+ inet_ntop
+ prctl
+ process_vm_readv
+ 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],,, [#include <signal.h>])
+AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
+
+AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>])
+
+AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>])
+
+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 sigevent._sigev_un._pad,
+ struct sigevent.__pad],,, [#include <signal.h>])
+
+AC_CHECK_TYPES([struct flock64],,, [#include <fcntl.h>])
+
+AC_CHECK_DECLS([sys_errlist])
+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([
+ LO_FLAGS_AUTOCLEAR,
+ LO_FLAGS_PARTSCAN
+]),,, [#include <linux/loop.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([rlim_t],,[#include <sys/resource.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_PATH_PROG([PERL], [perl])
+
+AC_CONFIG_FILES([Makefile tests/Makefile])
+AC_OUTPUT
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..39bb56f
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,800 @@
+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
+ + Fixed misleading italics in the manual page, closes: #589323
+
+ -- 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.
+
+ -- Frederik Schüler <fs@debian.org> Tue, 04 May 2010 14:31:46 +0200
+
+strace (4.5.20-1) unstable; urgency=low
+
+ [ Dmitry V. Levin ]
+ * New upstream version.
+ + Corrected decoding of 64bit syscalls, closes: #570603
+ + Corrected getsockopt decoding on architectures where
+ sizeof(long) > sizeof(int), closes: #494844
+ + Corrected decoding of epoll_pwait, closes: #513014
+ + Implemented -C option to combine regular and -c output, closes: #466196
+
+ [ Frederik Schüler ]
+ * Update standards-version to 3.8.4.
+ * debian/rules: allow parallel building.
+ * debian/rules: comment out verbose build, only needed for debugging.
+ * debian/rules: clean up clean: target, dh_clean does most of the work
+ already.
+ * debian/rules: use *-stamp instead of stamp-*, so dh_clean can tidy
+ up for us.
+
+ -- Frederik Schüler <fs@debian.org> Tue, 13 Apr 2010 13:02:57 +0200
+
+strace (4.5.19-2) unstable; urgency=low
+
+ * Add sparc64 to the architectures list, closes: #560062
+ * Fix FTBFS, thanks to Aurelien Jarno <aurelien@aurel32.net> for pointing
+ out the solution. Closes: #560516
+ * Rebuild as normal package, closes: #566968
+ * Update standards-version to 3.8.3.
+ * Lower package priority to optional, matching the archive override.
+ * Add watch file.
+
+ -- Frederik Schüler <fs@debian.org> Tue, 26 Jan 2010 12:20:51 +0100
+
+strace (4.5.19-1) unstable; urgency=low
+
+ [ Dmitry V. Levin ]
+ * New upstream release.
+ + Fixed FTBFS on armel, closes: #520084, #535564
+ + Marked sendfile(2) as a network syscall, closes: #509499
+ + Fixed syscall numbers for tee and sync_file_range, closes: #503124
+ + Corrected accept(2) decoding, closes: #507573
+ + Changed strace to exit/kill with traced process
+ exitcode/signal, closes: #37665
+
+ [ Frederik Schüler ]
+ * Move myself from uploaders to maintainers, and drop Roland from the list,
+ closes: #521458
+ * Apply hppa fixes, thanks to Carlos O'Donell <carlos@systemhalted.org>
+ and Helge Deller <deller@gmx.de> for the fixes, closes: #546619, #437928
+ * Update standards-version to 3.8.1.
+
+ -- Frederik Schüler <fs@debian.org> Mon, 05 Oct 2009 22:39:54 +0200
+
+strace (4.5.18-1) unstable; urgency=low
+
+ * New upstream release, closes: #515655
+ + Fix FTBFS, closes: #518852
+ * Backported patch from CVS: Fix support for NUL-terminated
+ string, closes: #508484
+ * Build-depend on debhelper (>= 7.0.0).
+
+ -- Frederik Schüler <fs@debian.org> Mon, 09 Mar 2009 14:39:42 +0100
+
+strace (4.5.17+cvs080723-2) unstable; urgency=low
+
+ * Pull Fix for sparc FTBFS from CVS, closes: #492774
+ * Make strace64 priority extra.
+
+ -- Frederik Schüler <fs@debian.org> Sat, 02 Aug 2008 10:36:59 +0200
+
+strace (4.5.17+cvs080723-1) unstable; urgency=low
+
+ * New upstream cvs snapshot.
+ - fixes arm and armel FTBFS.
+
+ -- Frederik Schüler <fs@debian.org> Wed, 23 Jul 2008 15:23:22 +0200
+
+strace (4.5.17-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Frederik Schüler <fs@debian.org> Sat, 19 Jul 2008 21:38:30 +0200
+
+strace (4.5.16+cvs20080708-2) unstable; urgency=low
+
+ * Rerun autotools in correct order.
+ * Add strace64 package on i386, powerpc, s390 and sparc,
+ closes: #491167, #491188
+
+ -- Frederik Schüler <fs@debian.org> Thu, 17 Jul 2008 17:21:27 +0200
+
+strace (4.5.16+cvs20080708-1) unstable; urgency=low
+
+ * New upstream snapshot.
+ + Fix chmod/chown typo in debian/rules, closes: #459255.
+ + Install strace-graph too, closes: 469068.
+ + Fix m68k build, closes: 456879.
+ + Arm updates, closes: #441000.
+ + fix build on mips/mipsel, closes: #448802.
+ + show poll() parameters before blocking, closes: #369651.
+ + use dh_strip instead of install -s, closes: #438055, #396682.
+ + fix sparc build, closes: #469379.
+ * Acknowledge NMU, closes: #469380.
+ * Remove Wichert Akkerman from uploaders list.
+ * Bump standards version to 3.8.0.
+ - Add Homepage field.
+ * Add dh_md5sums call, closes: #439428.
+ * Fix dpkg-gencontrol call.
+ * Update debian/copyright.
+
+ -- Frederik Schüler <fs@debian.org> Tue, 01 Jul 2008 23:05:51 +0200
+
+strace (4.5.16-1) unstable; urgency=low
+
+ * New upstream version.
+ + 64-bit builds, closes: #435303.
+ + LFS build fix, closes: #385310.
+ + Fix multithread issues
+ + Fix spurious SIGSTOP on early interrupt.
+ + Fix utime for biarch.
+ + Fix -u error message.
+ + Better futex syscall printing.
+ + Fix argv/envp printing with small -s settings, and for biarch.
+ + New syscalls: getcpu, eventfd, timerfd, signalfd, epoll_pwait,
+ move_pages, utimensat.
+
+ -- Roland McGrath <frob@debian.org> Fri, 03 Aug 2007 03:24:21 -0700
+
+strace (4.5.15-1) unstable; urgency=high
+
+ [ Roland McGrath ]
+ * New upstream version.
+ + Fix -ff -o behavior, closes: #353935.
+ + Fail when nonoption args follow -p switches, closes: #361302.
+ + Fix semtimedop, closes: #340239.
+ + ARM support fixes, closes: #360152, #360154.
+
+ [ Frederik Schüler ]
+ * Fix configure script, closes: #428997
+
+ -- Frederik Schüler <fs@debian.org> Fri, 22 Jun 2007 16:28:08 +0000
+
+strace (4.5.14-2) unstable; urgency=low
+
+ * New comaintainer.
+ * Fix build failure with linux-2.6.18, thanks to Andreas Henriksson for the
+ patch, closes: #392556.
+ * Fix build with libc6 2.5.
+ * Acknowledge NMUs, closes: #315500, #355733
+
+ -- Frederik Schüler <fs@debian.org> Thu, 26 Oct 2006 22:11:25 +0200
+
+strace (4.5.14-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fix crash in printing sysctl, closes: #339117.
+ + Respect DEB_BUILD_OPTIONS=nostrip, closes: #325132.
+ + Fix ipc syscall decoding, closes: #340239.
+ + Add missing source files to tarball, closes: #336197.
+ + Build on armeb, closes: #335681.
+
+ -- Roland McGrath <frob@debian.org> Mon, 16 Jan 2006 22:17:38 -0800
+
+strace (4.5.13-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fix m68k build, closes: #315500.
+ + Fix setsockopt decoding on 64-bit.
+ + Fix typos in socket option name strings.
+ + Display more IPV6 socket options by name.
+ + Don't display inappropriate syscalls for -e trace=file.
+ + New selector type -e trace=desc for file-descriptor using calls.
+ + Fix 32-bit old_mmap syscall decoding on x86-64.
+ + Fix errors detaching from multithreaded process on interrupt.
+ + Note 4.5.12 fix for crash handling bad signal numbers.
+
+ -- Roland McGrath <frob@debian.org> Wed, 3 Aug 2005 04:41:49 -0700
+
+strace (4.5.12-1) unstable; urgency=low
+
+ * New upstream version.
+ + Build on ppc64, closes: #301089.
+ + Refuse negative -s argument value, closes: #303256.
+ + Fix known syscall recognition for IA32 processes on x86-64.
+ + Fix bad output for ptrace on x86-64.
+ + Fix potential buffer overruns.
+ + Make some diagnostics more consistent.
+ + Update PowerPC system calls.
+ + Better printing for Linux aio system calls.
+ + Don't truncate statfs64 fields to 32 bits in output.
+ + Cosmetic code cleanups.
+
+ -- Roland McGrath <frob@debian.org> Wed, 8 Jun 2005 13:52:39 -0700
+
+strace (4.5.11-1) unstable; urgency=low
+
+ * New upstream version.
+ + Update MIPS system call table, closes: #256684.
+ + Fix build on s390 and sparc, closes: #294172, #293564.
+ + Fix select handling on nonstandard fd_set sizes, closes: #65654, #284290.
+ + Don't print errors for null file name pointers, closes: #63093.
+ + Fix initial execve output with -i.
+ + Fix build nits, closes: #300598.
+
+ -- Roland McGrath <frob@debian.org> Tue, 22 Mar 2005 15:12:22 -0800
+
+strace (4.5.9-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fix potential crash in getxattr printing, closes: #283704.
+ + Improve socket ioctl printing, closes: #192164.
+ + Fix sparc build, closes: #278449.
+ + Update ia64 syscall list.
+ + Fix x86_64 syscall argument extraction for 32-bit processes.
+ + Fix -e signal=NAME parsing.
+ + Fix x86_64 exit_group syscall handling.
+ + Improve mount flags printing.
+ + Support symbolic printing of x86_64 arch_prctl parameters.
+ + Add strace-udeb package for Debian installer debugging, closes: #268294.
+
+ -- Roland McGrath <frob@debian.org> Fri, 4 Feb 2005 01:53:01 -0800
+
+strace (4.5.8-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fix strace64 man page symlink, closes: #269220.
+ + Update syscall tables for Alpha, ARM, HPPA, closes: #273887.
+ + Build strace64 for s390, closes: #271500.
+ + Fix some endian issues in 64-bit argument output on 32-bit machines.
+ + Support new Linux syscalls mbind, set_mempolicy, get_mempolicy, waitid.
+ + Support Linux syscalls fadvise64, fadvise64_64, and epoll_*.
+ + Improve ioctl command name matching.
+ + Print RTC_* ioctl structure contents.
+ + Support newer RLIMIT_* values.
+ + Print struct cmsghdr details in sendmsg.
+
+ -- Roland McGrath <frob@debian.org> Tue, 19 Oct 2004 18:05:28 -0700
+
+strace (4.5.7-1) unstable; urgency=low
+
+ * New upstream version.
+ + Update man page about -c, closes: #254438.
+ + Include pread/pwrite calls in -e read/write tracing, closes: #239947.
+ + Update SO_* and IP_* value lists, closes: #171653.
+ + Print attribute values in *xattr system calls.
+ + Print clock_t values symbolically in Linux clock_* system calls.
+ + Show PER_* values correctly, closes: #40588.
+ + Fix `strace64' build on sparc, closes: #254728.
+
+ -- Roland McGrath <frob@debian.org> Tue, 31 Aug 2004 01:41:19 -0700
+
+strace (4.5.6-1) unstable; urgency=low
+
+ * New upstream version.
+ + Update Linux ioctl lists and decode some more network ioctls.
+ + Fix `quotactl' argument decoding on 64-bit.
+ + Linux/SPARC64 support, closes: #254728.
+
+ -- Roland McGrath <frob@debian.org> Mon, 12 Jul 2004 00:18:32 -0700
+
+strace (4.5.5-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fix support for 32-bit (i386) binaries on Linux/AMD64.
+
+ -- Roland McGrath <frob@debian.org> Sun, 27 Jun 2004 22:19:15 -0700
+
+strace (4.5.4-1) unstable; urgency=low
+
+ * Build package on amd64, closes: #246568.
+ * New upstream version.
+ + Recognize more PF_* and AF_* values, closes: #250506.
+ + Other fixes.
+
+ -- Roland McGrath <frob@debian.org> Thu, 3 Jun 2004 19:35:37 -0700
+
+strace (4.5.3-1) unstable; urgency=low
+
+ * New upstream version.
+ + Finish fix for -f on Linux/S390(x).
+ + Print extra wait status bits, closes: #240062.
+
+ -- Roland McGrath <frob@debian.org> Fri, 16 Apr 2004 15:27:43 -0700
+
+strace (4.5.2-1) unstable; urgency=low
+
+ * New upstream version.
+ + Check for errors writing to -o file, closes: #218762
+ + Print multiple ioctl code matches on Linux.
+ + Various other fixes.
+ + Update typos and obsolete bits in man page, closes: #217008, #223390
+ + Fix compilation problems with newer kernel headers, closes: #223207
+ + Update HPPA system calls, closes: #231632
+ + Fix PID in messages, closes: #229802
+ + Fix s390 brokenness in 4.5, closes: #226098
+
+ -- Roland McGrath <frob@debian.org> Mon, 1 Mar 2004 22:44:55 -0800
+
+strace (4.5-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fix mlock syscall printing.
+ + MIPS & S390 updates.
+ + Print names for SIGRT_* in sets.
+
+ -- Roland McGrath <frob@debian.org> Wed, 24 Sep 2003 15:20:18 -0700
+
+strace (4.4.99-1) unstable; urgency=low
+
+ * New upstream version.
+ + Alpha updates.
+ + Add a few more new Linux 2.5 system calls.
+ + Stephen Thomas contributed a port to Linux/SH64.
+ + Print protocol names for PF_INET6 sockets.
+
+ -- Roland McGrath <frob@debian.org> Thu, 17 Jul 2003 02:04:43 -0700
+
+strace (4.4.98-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fixes clone argument bugs.
+ + Fixes sem* printing bugs.
+ + Fixes -e argument parsing, closes: #188379.
+ + Fixes hanging parent in odd wait cases, closes: #47608, #109656.
+ + Fixes -q defaulting, closes: #47113, #153678.
+ + Fixes trying to execute directories, closes: #137103.
+ + Updates ARM support, thanks to Russell King.
+ + Updates S390/S390x support.
+ * Bump standards-version to 3.5.10
+
+ -- Roland McGrath <frob@debian.org> Mon, 2 Jun 2003 12:26:29 -0700
+
+strace (4.4.96-1) unstable; urgency=low
+
+ * New upstream version.
+ + Handles yet more new Linux 2.5 system calls.
+ + Fixes x86_64 and ia64 clone printing.
+ + Updates SH port.
+
+ -- Roland McGrath <frob@debian.org> Sun, 30 Mar 2003 17:14:34 -0800
+
+strace (4.4.95-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fixes printing of getresuid and getresgid values.
+
+ -- Roland McGrath <frob@debian.org> Mon, 24 Feb 2003 02:50:43 -0800
+
+strace (4.4.94-1) unstable; urgency=low
+
+ * New upstream version.
+ + New option -E to set environment variables.
+ + Build fixes for sparc, closes: #178636.
+
+ -- Roland McGrath <frob@debian.org> Wed, 19 Feb 2003 19:12:40 -0800
+
+strace (4.4.93-1) unstable; urgency=low
+
+ * New upstream version.
+ + Grok new quotactl arguments, closes: #154067.
+ + Fix m68k build problem, closes: #176528.
+ + Old bugs prior release actually closes: #154068.
+ + Fix S390 bugs with -f, and bugs with execve.
+ * Switched to non-native packaging (empty .diff), closes: #176388.
+
+ -- Roland McGrath <frob@debian.org> Tue, 21 Jan 2003 12:22:08 -0800
+
+strace (4.4.92-1) unstable; urgency=low
+
+ * New upstream version.
+ + Updated config.guess and config.sub, closes: #176241.
+ + Several fixes for PPC, closes: #144326.
+ + Fixed ptrace output for unknown requests, closes: #77728.
+ + Fixed output of getdents64, truncate64, ftruncate64, closes: #169528.
+ + Old bugs the last release actually closes: #153750, #38467, #109993,
+ #109815, #104594, #113087, #134803, #166622, #96356, #94725, #32147,
+ #32798, #36801, #41066, #81637, #138300, #143791.
+
+ -- Roland McGrath <frob@debian.org> Tue, 14 Jan 2003 02:02:44 -0800
+
+strace (4.4.91-1) unstable; urgency=low
+
+ * New upstream version.
+ + Fixes -f on x86-64.
+
+ -- Roland McGrath <frob@debian.org> Fri, 10 Jan 2003 12:55:34 -0800
+
+strace (4.4.90-1) unstable; urgency=low
+
+ * New maintainer.
+ * New upstream version.
+
+ -- Roland McGrath <frob@debian.org> Fri, 10 Jan 2003 01:58:40 -0800
+
+strace (4.4-1.2) unstable; urgency=low
+
+ * NMU
+ * Quick one-liner to allow building on the ARM. Closes: #109993.
+ * Re-ran autoconf, hopefully I didn't break other arches.
+
+ -- Anand Kumria <wildfire@progsoc.org> Mon, 1 Oct 2001 14:22:25 +1000
+
+strace (4.4-1.1) unstable; urgency=low
+
+ * NMU.
+ * Added patch from David Mosberger which fixes some ia64 issues.
+ Closes: #113087.
+ * Added ia64-specific Build-Depends on libc6.1-dev. Closes:
+ #109815.
+ * Ran autoheader, so the s390 patch applies. Closes: #104594.
+
+ -- Jeff Licquia <jlicquia@progeny.com> Tue, 25 Sep 2001 13:15:28 -0500
+
+strace (4.4-1) unstable; urgency=low
+
+ * New upstream version
+ + Added S390 support. Closes: Bug#104594
+ + New config.{guess,sub}. Closes: Bug#92532
+ + LFS support for Linux/sparc. Closes: Bug#99215
+ * Works on IA64 again. Closes: Bug#103854
+ * Don't override CFLAGS in debian/rules
+ * Remove rules to create configure & friends. Closes: Bug#92483
+
+ -- Wichert Akkerman <wakkerma@debian.org> Sun, 19 Aug 2001 14:10:58 +0200
+
+strace (4.3-3.1) unstable; urgency=low
+
+ * copy in new config.{guess,sub} to get support for new architectures.
+ Closes: #94725
+
+ -- LaMont Jones <lamont@debian.org> Mon, 9 Jul 2001 21:39:34 -0600
+
+strace (4.3-3) unstable; urgency=low
+
+ * Update architecture list
+
+ -- Wichert Akkerman <wakkerma@debian.org> Sat, 14 Apr 2001 10:42:19 +0200
+
+strace (4.3-2) unstable; urgency=low
+
+ * Run cvsbuild so we don't need to run autohead & friends
+ * Sync to current CVS
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 13 Apr 2001 19:08:53 +0200
+
+strace (4.3-1) unstable; urgency=low
+
+ * New upstream version
+ * Updated Build-Depends to use a recent glibc so we get the 2.4 kernel
+ headers
+ * Changed Architecture so we only build on Linux
+ * Include section and priority in control info
+
+ -- Wichert Akkerman <wakkerma@debian.org> Sun, 1 Apr 2001 16:35:32 +0200
+
+strace (4.2-4) frozen unstable; urgency=low
+
+ * Actually install postinst and prerm so we get the proper /usr/doc/strace
+ symlink
+
+ -- Wichert Akkerman <wakkerma@debian.org> Thu, 17 Feb 2000 21:49:17 +0100
+
+strace (4.2-3) frozen unstable; urgency=low
+
+ * Fix typo in aclocal.m4 that prevented compilation on architectures without
+ LFS
+
+ -- Wichert Akkerman <wakkerma@debian.org> Sun, 13 Feb 2000 01:19:11 +0100
+
+strace (4.2-2) frozen unstable; urgency=low
+
+ * only include linux/ptrace.h if sys/reg.h hasn't been found by configure,
+ Closes: Bug# 39556
+
+ -- Wichert Akkerman <wakkerma@debian.org> Thu, 27 Jan 2000 03:22:55 +0100
+
+strace (4.2-1) frozen unstable; urgency=low
+
+ * New upstream version:
+ + Builds correctly on glibc2.0 again, Closes: Bug# 51648
+ + Small y2k fix in printtimes, Closes: Bug# 54592
+ + semop is handled now, Closes: Bug# 52684
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 21 Jan 2000 21:45:41 +0100
+
+strace (4.1-1) unstable; urgency=low
+
+ * New upstream version
+ * Bump standards-version to 3.1.0
+ * FHS 2.1 compliant
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 26 Nov 1999 01:42:07 +0100
+
+strace (4.0-1) unstable; urgency=low
+
+ * New upstream version
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 9 Jul 1999 16:12:34 +0200
+
+strace (3.99.1-1) unstable; urgency=low
+
+ * New upstream version, second pre-release for 4.0
+
+ -- Wichert Akkerman <wakkerma@debian.org> Wed, 9 Jun 1999 15:20:42 +0200
+
+strace (3.99-1) unstable; urgency=low
+
+ * New upstream maintainer (me :)
+ * New upstream version, pre-release for strace 4.0
+ * See upstream changelog for changes
+ * Build with glibc2.1
+
+ -- Wichert Akkerman <wakkerma@debian.org> Tue, 27 Apr 1999 14:00:15 +0200
+
+strace (3.1.0.1-12) unstable; urgency=low
+
+ * Only i386 has a LDT, so check for architecture in mem.c (Bug# 32798)
+ * Check for nsignals properly, closes: #34445
+ * Fix check for overruns in umove*, patch by Nate Eldredge <nate@cartsys.com>
+
+ -- Wichert Akkerman <wakkerma@debian.org> Mon, 15 Mar 1999 00:43:14 +0100
+
+strace (3.1.0.1-11) unstable; urgency=low
+
+ * Merge some ARM stuff that got stuck in my mailbox
+
+ -- Wichert Akkerman <wakkerma@debian.org> Sun, 31 Jan 1999 13:04:13 +0100
+
+strace (3.1.0.1-10) unstable; urgency=low
+
+ * Move sys_poll to the DONE section in linux/dummy.h
+ * Support subarchitectures for alpha (Bug# 32147)
+ * Incorporate changes from Ulrich Drepper
+ + up number of supported personalities on Linux sparc to 3
+ + add O_DIRECT, O_LARGEFILE and O_DIRECTORY to openmodes
+ + change prefix for printxval to SEEK_ in sys_lseek
+ + add a support for a whole bunch of syscalls
+ + updated sys_pread and sys_pwrite for SVR4
+ + handle sys_delete_module properly
+ + change SYS_socket_subcall to 230 for non-powerpc architectures
+ + sys_chown is now lchown
+ + looks like a whole lot of syscalls is moved from 180 to 230
+ + Revamp a lot of the signal handling code
+ + handle sys_clone
+ + Lots more (it was a 6494-line patch and I'm too lazy to put all
+ changes in here..)
+ * Please note you need to have 2.1 or 2.2 kernel sources in /usr/src/linux
+ in order to compile this.
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 29 Jan 1999 02:04:12 +0100
+
+strace (3.1.0.1-9) unstable; urgency=low
+
+ * Add support for poll() systemcall
+
+ -- Wichert Akkerman <wakkerma@debian.org> Thu, 31 Dec 1998 16:03:44 +0100
+
+strace (3.1.0.1-8) frozen unstable; urgency=low
+
+ * Use new_stat from libc6 now, except for powerpc and sparc
+
+ -- Wichert Akkerman <wakkerma@debian.org> Thu, 24 Dec 1998 11:35:32 +0100
+
+strace (3.1.0.1-7) frozen unstable; urgency=low
+
+ * Fix sparc support
+ * Display nanosleep call correctly (Bug# 25904)
+ * Honour -v flag in printargs (Bug# 10426)
+ * Play with #define to get proper kernel struct stat
+ * Compile with 2.1.131 kernel source
+
+ -- Wichert Akkerman <wakkerma@debian.org> Sat, 19 Dec 1998 15:02:14 +0100
+
+strace (3.1.0.1-6) frozen unstable; urgency=low
+
+ * Set NSIG correctly for ARM
+ * Include strace-graph script from Richard Braakman <dark@debian.org>
+ as an example. Try it and be amazed!
+ * Fix sigaction problem, patch from Topi Miettinen
+ <Topi.Miettinen@medialab.sonera.net>
+
+ -- Wichert Akkerman <wakkerma@debian.org> Mon, 7 Dec 1998 02:10:30 +0100
+
+strace (3.1.0.1-5) unstable; urgency=low
+
+ * Patched from Richard Braakman <dark@debian.org>:
+ + use correct dirent.h on Linux
+ + remove debugging code left from the powerpc patch
+ + fix output for execve when -v is used
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 13 Nov 1998 15:59:17 +0100
+
+strace (3.1.0.1-5) unstable; urgency=low
+
+ * Add location of upstream sources to the copyright
+ * Merged ARM architecture support from Jim Studt <jim@federated.com>
+
+ -- Wichert Akkerman <wakkerma@debian.org> Mon, 9 Nov 1998 16:43:24 +0100
+
+strace (3.1.0.1-4) unstable; urgency=low
+
+ * More ppc patches from Daniel Jacobowitz <dan@debian.org>
+
+ -- Wichert Akkerman <wakkerma@debian.org> Mon, 12 Oct 1998 00:59:44 +0200
+
+strace (3.1.0.1-3) unstable; urgency=low
+
+ * Added support for sys_query_module, patch from Brian J. Murrell
+ <brian@interlinx.bc.ca>
+ * Preserve timestamps for documentation when installed
+ * Incorporate patches from Daniel Jacobowitz <dan@debian.org>:
+ + powerpc patches
+ + Patches include changing SYS_socket_subcall and SYS_ipc_subcall,
+ check for stray syscall exit after execv, and completely regenerated
+ syscall, errno, and ioctl lists.
+ + Decode capget and capset arguments.
+
+ -- Wichert Akkerman <wakkerma@debian.org> Sun, 11 Oct 1998 22:42:56 +0200
+
+strace (3.1.0.1-2) unstable; urgency=low
+
+ * Patch to support sparc, courtesy of RedHat
+ * Cleaned up some stuff the patch left broken
+ * Fix some more compilation-issues for IPX with current kernels
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 24 Jul 1998 22:53:43 +0200
+
+strace (3.1.0.1-1) unstable; urgency=low
+
+ * New (actually very old) upstream version. Fixes something we
+ already had fixed
+ * Compiled with current kernel-headers from libc6-dev
+ * Fixed spelling-error
+ * Compress changelog
+ * Bumped standard-version to 2.4.1.0
+
+ -- Wichert Akkerman <wakkerma@debian.org> Wed, 22 Jul 1998 15:53:23 +0200
+
+strace (3.1-14) unstable; urgency=low
+
+ * Don't let libc6 trick us anymore with {f,l,}stat() calls
+ * Fix configure.in to support PentiumII processors
+
+ -- Wichert Akkerman <wakkerma@debian.org> Mon, 22 Jun 1998 20:17:20 +0200
+
+strace (3.1-13) unstable; urgency=low
+
+ * Corrected error on PowerPC patch that broke other archictectures
+ (Bug# 13837)
+
+ -- Wichert Akkerman <wakkerma@debian.org> Tue, 14 Oct 1997 15:41:29 +0200
+
+strace (3.1-12) unstable; urgency=low
+
+ * PowerPC patches by Klee Dienes (Bug# 10788, 10790)
+ * Create correct md5sums (Bug# 13363)
+ * Put changelog in correct place (Bug# 13363)
+ * Pristine sources
+
+ -- Wichert Akkerman <wakkerma@debian.org> Mon, 6 Oct 1997 15:42:25 +0200
+
+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
+
+ * Install upstream changelog
+ * Added dependencies to control file for libc
+ * Added md5sums to .deb file
+
+ -- Wichert Akkerman <wakkerma@debian.org> Fri, 11 Jul 1997 12:26:12 +0200
+
+strace (3.1-9) stable; urgency=LOW
+
+ * Fixed bug with hanging children. Patch by Matthias Urlichs
+ * Added some more constants to net.c.
+ * glibc patches, courtesy of Klee Dienes (Bug# 7735)
+
+ -- Wichert Akkerman <wakkerma@debian.org> Mon, 21 Apr 1997 11:59:45 +0200
+
+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
+
+ * 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
+
+ * 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
+
+ * Moved to new packagingformat
+ * Fixed umoven bug (Bug# 4523)
+ * Corrected number of parameters for mmap systemcall (bug# 4508)
+
+ -- Wichert Akkerman <wakkerma@wi.leidenuniv.nl> Sat, 23 Sep 1996 23:33:58 +0200
+
+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
+
+ * 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
+ * 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
+ schemes
+ * added architecture-option to debian.rules and debian.control
+
+ -- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>
+
+
+strace (3.1-1) unstable; priority=LOW
+
+ * Moved to new upstream version
+ * added more protocol families to domains
+ * added IPIP-protocol to protocols
+ * added MSG_PROXY and MSG_CTRUNC to msg_flags
+ * added SO_BSDCOMPAT and SO_REUSEPORT to sockoptions
+ * added IP, IPX and TCP-options
+ * added IP, IPX and TCP support to get-/setsockopt()
+ * added IPX support
+
+ -- Wichert Akkerman <wakkerma@wi.leidenuniv.nl>
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..417a909
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,56 @@
+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)
+Standards-Version: 3.8.4
+Homepage: http://sourceforge.net/projects/strace/
+
+Package: strace
+Architecture: alpha amd64 arm armeb armel armhf hppa i386 ia64 m68k mips mipsel powerpc powerpcspe ppc64 s390 s390x sh4 sparc sparc64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: A system call tracer
+ strace is a system call tracer, i.e. a debugging tool which prints out
+ a trace of all the system calls made by a another process/program.
+ 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.
+ .
+ System calls and signals are events that happen at the user/kernel
+ interface. A close examination of this boundary is very useful for bug
+ isolation, sanity checking and attempting to capture race conditions.
+
+Package: strace64
+Architecture: i386 powerpc s390 sparc
+Priority: extra
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: A system call tracer for 64bit binaries
+ strace is a system call tracer, i.e. a debugging tool which prints out
+ a trace of all the system calls made by a another process/program.
+ 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
+ biarch systems with 32bit userland and 64bit kernel.
+ .
+ System calls and signals are events that happen at the user/kernel
+ interface. A close examination of this boundary is very useful for bug
+ isolation, sanity checking and attempting to capture race conditions.
+
+Package: strace-udeb
+Section: debian-installer
+XC-Package-Type: udeb
+Priority: extra
+Architecture: alpha amd64 arm armeb armel armhf hppa i386 ia64 m68k mips mipsel powerpc powerpcspe ppc64 s390 sh4 sparc sparc64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: A system call tracer
+ strace is a system call tracer, i.e. a debugging tool which prints out
+ a trace of all the system calls made by a another process/program.
+ 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.
+ .
+ System calls and signals are events that happen at the user/kernel
+ interface. A close examination of this boundary is very useful for bug
+ isolation, sanity checking and attempting to capture race conditions.
+ .
+ This is a stripped down package intended for debugging use in the Debian
+ installer.
diff --git a/NOTICE b/debian/copyright
similarity index 75%
rename from NOTICE
rename to debian/copyright
index f76bac7..fd35507 100644
--- a/NOTICE
+++ b/debian/copyright
@@ -1,9 +1,19 @@
+This is the Debian packaged version of strace. For a complete list of
+changes from the upstream version please see the changelog.
+
+The upstream sources can be found at http://sourceforge.net/projects/strace/
+
+This is the copyright as found in the upstream sources:
+
Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
-Copyright (C) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
+Copyright (C) 1998-2003 Wichert Akkerman <wakkerma@deephackmode.org>
+Copyright (c) 2002-2008 Roland McGrath <roland@redhat.com>
+Copyright (c) 2003-2008 Dmitry V. Levin <ldv@altlinux.org>
+Copyright (c) 2007-2008 Jan Kratochvil <jan.kratochvil@redhat.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -27,5 +37,3 @@
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: COPYRIGHT,v 1.3 2002/03/31 18:43:00 wichert Exp $
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b997182
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,86 @@
+#! /usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+arch64_map = i386=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x
+ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map)))
+ HOST64 = $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
+ $(filter $(DEB_HOST_ARCH)=%, $(arch64_map))))-linux-gnu
+ CC64 = gcc -m64
+ extra_build_targets += build64-stamp
+endif
+
+ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE)
+else
+ CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+
+all build: build-stamp $(extra_build_targets)
+
+%-stamp: %/Makefile
+ $(MAKE) -C $*
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C $* check
+endif
+ touch $@
+
+build/Makefile:
+ mkdir -p $(@D)
+ cd $(@D); sh ../configure --prefix=/usr $(CONFIG_OPTS)
+
+build64/Makefile:
+ mkdir -p $(@D)
+ cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -rf build build64 strace64.1
+ dh_clean
+
+binary: binary-indep binary-arch
+
+binary-indep:
+
+binary-arch: build
+ test -f build-stamp || make $(MFLAGS) -f debian/rules build
+
+ # prepare 64bit executable and manpage, if it has been built
+ test -f build64-stamp && ( mv build64/strace build64/strace64 ; \
+ cp strace.1 strace64.1 ) || true
+
+ dh_testdir -s
+ dh_testroot -s
+ dh_installdirs -s
+ dh_installdocs -s
+ dh_installman -s
+ dh_installexamples -s
+ dh_installchangelogs -s
+ dh_install -s
+ dh_link -s
+ dh_strip -s
+ dh_compress -s
+ dh_fixperms -s
+ dh_installdeb -s
+ dh_shlibdeps -s
+ dh_gencontrol -s
+ dh_md5sums -s
+ dh_builddeb -s
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/strace-udeb.install b/debian/strace-udeb.install
new file mode 100644
index 0000000..1f41928
--- /dev/null
+++ b/debian/strace-udeb.install
@@ -0,0 +1 @@
+build/strace usr/bin
diff --git a/debian/strace.docs b/debian/strace.docs
new file mode 100644
index 0000000..edc0071
--- /dev/null
+++ b/debian/strace.docs
@@ -0,0 +1 @@
+NEWS
diff --git a/debian/strace.examples b/debian/strace.examples
new file mode 100644
index 0000000..06b4d96
--- /dev/null
+++ b/debian/strace.examples
@@ -0,0 +1 @@
+strace-graph
diff --git a/debian/strace.install b/debian/strace.install
new file mode 100644
index 0000000..1f41928
--- /dev/null
+++ b/debian/strace.install
@@ -0,0 +1 @@
+build/strace usr/bin
diff --git a/debian/strace.manpages b/debian/strace.manpages
new file mode 100644
index 0000000..5e74dd7
--- /dev/null
+++ b/debian/strace.manpages
@@ -0,0 +1 @@
+strace.1
diff --git a/debian/strace64.install b/debian/strace64.install
new file mode 100644
index 0000000..2d3036d
--- /dev/null
+++ b/debian/strace64.install
@@ -0,0 +1 @@
+build64/strace64 usr/bin
diff --git a/debian/strace64.manpages b/debian/strace64.manpages
new file mode 100644
index 0000000..e3adc93
--- /dev/null
+++ b/debian/strace64.manpages
@@ -0,0 +1 @@
+strace64.1
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..5e4f652
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+opts="uversionmangle=s/-/./g" http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.xz
diff --git a/defs.h b/defs.h
index 85262f8..f457d30 100644
--- a/defs.h
+++ b/defs.h
@@ -30,12 +30,6 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-#ifdef _LARGEFILE64_SOURCE
-/* This is the macro everything checks before using foo64 names. */
-# ifndef _LFS64_LARGEFILE
-# define _LFS64_LARGEFILE 1
-# endif
-#endif
#ifdef MIPS
# include <sgidefs.h>
@@ -146,34 +140,46 @@
#define USE_SEIZE 1
/* To force NOMMU build, set to 1 */
#define NOMMU_SYSTEM 0
+/*
+ * Set to 1 to use speed-optimized vfprintf implementation.
+ * It results in strace using about 5% less CPU in user space
+ * (compared to glibc version).
+ * But strace spends a lot of time in kernel space,
+ * so overall it does not appear to be a significant win.
+ * Thus disabled by default.
+ */
+#define USE_CUSTOM_PRINTF 0
-#if (defined(SPARC) || defined(SPARC64) \
- || defined(I386) || defined(X32) || defined(X86_64) \
- || defined(ARM) || defined(AARCH64) \
- || defined(AVR32) \
- || defined(OR1K) \
- || defined(METAG) \
- || defined(TILE) \
- || defined(XTENSA) \
- ) && defined(__GLIBC__)
-# include <sys/ptrace.h>
-#else
-/* Work around awkward prototype in ptrace.h. */
+#ifdef NEED_PTRACE_PROTOTYPE_WORKAROUND
# define ptrace xptrace
# include <sys/ptrace.h>
# undef ptrace
-# ifdef POWERPC
-# define __KERNEL__
-# include <asm/ptrace.h>
-# undef __KERNEL__
-# endif
extern long ptrace(int, int, char *, long);
+#else
+# include <sys/ptrace.h>
+#endif
+
+#if defined(POWERPC)
+# include <asm/ptrace.h>
#endif
#if defined(TILE)
# include <asm/ptrace.h> /* struct pt_regs */
#endif
+#ifndef ERESTARTSYS
+# define ERESTARTSYS 512
+#endif
+#ifndef ERESTARTNOINTR
+# define ERESTARTNOINTR 513
+#endif
+#ifndef ERESTARTNOHAND
+# define ERESTARTNOHAND 514
+#endif
+#ifndef ERESTART_RESTARTBLOCK
+# define ERESTART_RESTARTBLOCK 516
+#endif
+
#if !HAVE_DECL_PTRACE_SETOPTIONS
# define PTRACE_SETOPTIONS 0x4200
#endif
@@ -222,21 +228,21 @@
# define PTRACE_EVENT_EXIT 6
#endif
-#if !defined(__GLIBC__) && !defined(__BIONIC__)
+#if !HAVE_DECL_PTRACE_PEEKUSER
# define PTRACE_PEEKUSER PTRACE_PEEKUSR
+#endif
+#if !HAVE_DECL_PTRACE_POKEUSER
# define PTRACE_POKEUSER PTRACE_POKEUSR
#endif
-#if USE_SEIZE
-# undef PTRACE_SEIZE
-# define PTRACE_SEIZE 0x4206
-# undef PTRACE_INTERRUPT
-# define PTRACE_INTERRUPT 0x4207
-# undef PTRACE_LISTEN
-# define PTRACE_LISTEN 0x4208
-# undef PTRACE_EVENT_STOP
-# define PTRACE_EVENT_STOP 128
-#endif
+#undef PTRACE_SEIZE
+#define PTRACE_SEIZE 0x4206
+#undef PTRACE_INTERRUPT
+#define PTRACE_INTERRUPT 0x4207
+#undef PTRACE_LISTEN
+#define PTRACE_LISTEN 0x4208
+#undef PTRACE_EVENT_STOP
+#define PTRACE_EVENT_STOP 128
#ifdef ALPHA
# define REG_R0 0
@@ -367,16 +373,18 @@
# define PERSONALITY0_WORDSIZE (int)(sizeof(long))
#endif
-#if defined(I386)
-extern struct user_regs_struct i386_regs;
+#if defined(I386) || defined(X86_64)
+extern uint32_t *const i386_esp_ptr;
#elif defined(IA64)
-extern long ia32;
+extern bool ia64_ia32mode;
#elif defined(SPARC) || defined(SPARC64)
extern struct pt_regs sparc_regs;
#elif defined(ARM)
extern struct pt_regs arm_regs;
#elif defined(TILE)
extern struct pt_regs tile_regs;
+#elif defined(POWERPC)
+extern struct pt_regs ppc_regs;
#endif
typedef struct sysent {
@@ -395,7 +403,7 @@
/* Trace Control Block */
struct tcb {
int flags; /* See below for TCB_ values */
- int pid; /* Process Id of this entry */
+ int pid; /* If 0, this tcb is free */
int qual_flg; /* qual_flags[scno] or DEFAULT_QUAL_FLAGS + RAW */
int u_error; /* Error code */
long scno; /* System call number */
@@ -420,10 +428,9 @@
};
/* TCB flags */
-#define TCB_INUSE 00001 /* This table entry is in use */
/* We have attached to this process, but did not see it stopping yet */
-#define TCB_STARTUP 00002
-#define TCB_IGNORE_ONE_SIGSTOP 00004 /* Next SIGSTOP is to be ignored */
+#define TCB_STARTUP 0x01
+#define TCB_IGNORE_ONE_SIGSTOP 0x02 /* Next SIGSTOP is to be ignored */
/*
* Are we in system call entry or in syscall exit?
*
@@ -442,14 +449,13 @@
*
* Use entering(tcp) / exiting(tcp) to check this bit to make code more readable.
*/
-#define TCB_INSYSCALL 00010
-#define TCB_ATTACHED 00020 /* It is attached already */
-/* Are we PROG from "strace PROG [ARGS]" invocation? */
-#define TCB_STRACE_CHILD 0040
-#define TCB_BPTSET 00100 /* "Breakpoint" set after fork(2) */
-#define TCB_REPRINT 00200 /* We should reprint this syscall on exit */
-#define TCB_FILTERED 00400 /* This system call has been filtered out */
-/* x86 does not need TCB_WAITEXECVE.
+#define TCB_INSYSCALL 0x04
+#define TCB_ATTACHED 0x08 /* We attached to it already */
+#define TCB_BPTSET 0x10 /* "Breakpoint" set after fork(2) */
+#define TCB_REPRINT 0x20 /* We should reprint this syscall on exit */
+#define TCB_FILTERED 0x40 /* This system call has been filtered out */
+/*
+ * x86 does not need TCB_WAITEXECVE.
* It can detect post-execve SIGTRAP by looking at eax/rax.
* See "not a syscall entry (eax = %ld)\n" message.
*
@@ -470,7 +476,7 @@
/* This tracee has entered into execve syscall. Expect post-execve SIGTRAP
* to happen. (When it is detected, tracee is continued and this bit is cleared.)
*/
-# define TCB_WAITEXECVE 01000
+# define TCB_WAITEXECVE 0x80
#endif
/* qualifier flags */
@@ -497,6 +503,8 @@
int val;
const char *str;
};
+#define XLAT(x) { x, #x }
+#define XLAT_END { 0, NULL }
extern const struct xlat open_mode_flags[];
extern const struct xlat addrfams[];
@@ -539,6 +547,7 @@
extern cflag_t cflag;
extern bool debug_flag;
extern bool Tflag;
+extern bool iflag;
extern unsigned int qflag;
extern bool not_failing_only;
extern bool show_fd_path;
@@ -563,17 +572,10 @@
void perror_msg_and_die(const char *fmt, ...) __attribute__ ((noreturn, format(printf, 1, 2)));
void die_out_of_memory(void) __attribute__ ((noreturn));
-#ifdef USE_CUSTOM_PRINTF
+#if USE_CUSTOM_PRINTF
/*
- * Speed-optimized vfprintf implementation.
* See comment in vsprintf.c for allowed formats.
* Short version: %h[h]u, %zu, %tu are not allowed, use %[l[l]]u.
- *
- * It results in strace using about 5% less CPU in user space
- * (compared to glibc version).
- * But strace spends a lot of time in kernel space,
- * so overall it does not appear to be a significant win.
- * Thus disabled by default.
*/
int strace_vfprintf(FILE *fp, const char *fmt, va_list args);
#else
@@ -583,6 +585,7 @@
extern void set_sortby(const char *);
extern void set_overhead(int);
extern void qualify(const char *);
+extern void print_pc(struct tcb *);
extern int trace_syscall(struct tcb *);
extern void count_syscall(struct tcb *, struct timeval *);
extern void call_summary(FILE *);
@@ -595,7 +598,9 @@
|| defined(SPARC) || defined(SPARC64) \
|| defined(TILE) \
|| defined(OR1K) \
- || defined(METAG)
+ || defined(METAG) \
+ || defined(ARC) \
+ || defined(POWERPC)
extern long get_regs_error;
# define clear_regs() (get_regs_error = -1)
extern void get_regs(pid_t pid);
@@ -608,7 +613,7 @@
#define umove(pid, addr, objp) \
umoven((pid), (addr), sizeof(*(objp)), (char *) (objp))
extern int umovestr(struct tcb *, long, int, char *);
-extern int upeek(struct tcb *, long, long *);
+extern int upeek(int pid, long, long *);
#if defined(SPARC) || defined(SPARC64) || defined(IA64) || defined(SH)
extern long getrval2(struct tcb *);
#endif
@@ -622,7 +627,6 @@
extern int clearbpt(struct tcb *);
extern const char *signame(int);
-extern int is_restart_error(struct tcb *);
extern void pathtrace_select(const char *);
extern int pathtrace_match(struct tcb *);
extern int getfdpath(struct tcb *, int, char *, unsigned);
@@ -631,6 +635,7 @@
extern int string_to_uint(const char *str);
extern int string_quote(const char *, char *, long, int);
+extern int next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits);
/* a refers to the lower numbered u_arg,
* b refers to the higher numbered u_arg
@@ -673,6 +678,7 @@
extern void printsiginfo_at(struct tcb *tcp, long addr);
#endif
extern void printfd(struct tcb *, int);
+extern void print_dirfd(struct tcb *, int);
extern void printsock(struct tcb *, long, int);
extern void print_sock_optmgmt(struct tcb *, long, int);
extern void printrusage(struct tcb *, long);
@@ -680,8 +686,7 @@
extern void printrusage32(struct tcb *, long);
#endif
extern void printuid(const char *, unsigned long);
-extern void printcall(struct tcb *);
-extern void print_sigset(struct tcb *, long, int);
+extern void print_sigset_addr_len(struct tcb *, long, long);
extern void printsignal(int);
extern void tprint_iov(struct tcb *, unsigned long, unsigned long, int decode_iov);
extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long, int decode_iov, unsigned long);
@@ -701,6 +706,7 @@
extern int mtd_ioctl(struct tcb *, long, long);
extern int ubi_ioctl(struct tcb *, long, long);
extern int loop_ioctl(struct tcb *, long, long);
+extern int ptp_ioctl(struct tcb *, long, long);
extern int tv_nz(struct timeval *);
extern int tv_cmp(struct timeval *, struct timeval *);
diff --git a/desc.c b/desc.c
index a420feb..b2eabc2 100644
--- a/desc.c
+++ b/desc.c
@@ -34,196 +34,221 @@
#ifdef HAVE_SYS_EPOLL_H
# include <sys/epoll.h>
#endif
-#ifdef HAVE_LIBAIO_H
-# include <libaio.h>
-#endif
#ifdef HAVE_LINUX_PERF_EVENT_H
# include <linux/perf_event.h>
#endif
static const struct xlat fcntlcmds[] = {
- { F_DUPFD, "F_DUPFD" },
- { F_GETFD, "F_GETFD" },
- { F_SETFD, "F_SETFD" },
- { F_GETFL, "F_GETFL" },
- { F_SETFL, "F_SETFL" },
- { F_GETLK, "F_GETLK" },
- { F_SETLK, "F_SETLK" },
- { F_SETLKW, "F_SETLKW" },
- { F_GETOWN, "F_GETOWN" },
- { F_SETOWN, "F_SETOWN" },
+ XLAT(F_DUPFD),
+ XLAT(F_GETFD),
+ XLAT(F_SETFD),
+ XLAT(F_GETFL),
+ XLAT(F_SETFL),
+ XLAT(F_GETLK),
+ XLAT(F_SETLK),
+ XLAT(F_SETLKW),
+ XLAT(F_GETOWN),
+ XLAT(F_SETOWN),
#ifdef F_RSETLK
- { F_RSETLK, "F_RSETLK" },
+ XLAT(F_RSETLK),
#endif
#ifdef F_RSETLKW
- { F_RSETLKW, "F_RSETLKW" },
+ XLAT(F_RSETLKW),
#endif
#ifdef F_RGETLK
- { F_RGETLK, "F_RGETLK" },
+ XLAT(F_RGETLK),
#endif
#ifdef F_CNVT
- { F_CNVT, "F_CNVT" },
+ XLAT(F_CNVT),
#endif
#ifdef F_SETSIG
- { F_SETSIG, "F_SETSIG" },
+ XLAT(F_SETSIG),
#endif
#ifdef F_GETSIG
- { F_GETSIG, "F_GETSIG" },
+ XLAT(F_GETSIG),
#endif
#ifdef F_CHKFL
- { F_CHKFL, "F_CHKFL" },
+ XLAT(F_CHKFL),
#endif
#ifdef F_DUP2FD
- { F_DUP2FD, "F_DUP2FD" },
+ XLAT(F_DUP2FD),
#endif
#ifdef F_ALLOCSP
- { F_ALLOCSP, "F_ALLOCSP" },
+ XLAT(F_ALLOCSP),
#endif
#ifdef F_ISSTREAM
- { F_ISSTREAM, "F_ISSTREAM" },
+ XLAT(F_ISSTREAM),
#endif
#ifdef F_PRIV
- { F_PRIV, "F_PRIV" },
+ XLAT(F_PRIV),
#endif
#ifdef F_NPRIV
- { F_NPRIV, "F_NPRIV" },
+ XLAT(F_NPRIV),
#endif
#ifdef F_QUOTACL
- { F_QUOTACL, "F_QUOTACL" },
+ XLAT(F_QUOTACL),
#endif
#ifdef F_BLOCKS
- { F_BLOCKS, "F_BLOCKS" },
+ XLAT(F_BLOCKS),
#endif
#ifdef F_BLKSIZE
- { F_BLKSIZE, "F_BLKSIZE" },
+ XLAT(F_BLKSIZE),
#endif
#ifdef F_GETOWN
- { F_GETOWN, "F_GETOWN" },
+ XLAT(F_GETOWN),
#endif
#ifdef F_SETOWN
- { F_SETOWN, "F_SETOWN" },
+ XLAT(F_SETOWN),
#endif
#ifdef F_REVOKE
- { F_REVOKE, "F_REVOKE" },
+ XLAT(F_REVOKE),
#endif
#ifdef F_SETLK
- { F_SETLK, "F_SETLK" },
+ XLAT(F_SETLK),
#endif
#ifdef F_SETLKW
- { F_SETLKW, "F_SETLKW" },
+ XLAT(F_SETLKW),
#endif
#ifdef F_FREESP
- { F_FREESP, "F_FREESP" },
+ XLAT(F_FREESP),
#endif
#ifdef F_GETLK
- { F_GETLK, "F_GETLK" },
+ XLAT(F_GETLK),
#endif
#ifdef F_SETLK64
- { F_SETLK64, "F_SETLK64" },
+ XLAT(F_SETLK64),
#endif
#ifdef F_SETLKW64
- { F_SETLKW64, "F_SETLKW64" },
+ XLAT(F_SETLKW64),
#endif
#ifdef F_FREESP64
- { F_FREESP64, "F_FREESP64" },
+ XLAT(F_FREESP64),
#endif
#ifdef F_GETLK64
- { F_GETLK64, "F_GETLK64" },
+ XLAT(F_GETLK64),
#endif
#ifdef F_SHARE
- { F_SHARE, "F_SHARE" },
+ XLAT(F_SHARE),
#endif
#ifdef F_UNSHARE
- { F_UNSHARE, "F_UNSHARE" },
+ XLAT(F_UNSHARE),
#endif
#ifdef F_SETLEASE
- { F_SETLEASE, "F_SETLEASE" },
+ XLAT(F_SETLEASE),
#endif
#ifdef F_GETLEASE
- { F_GETLEASE, "F_GETLEASE" },
+ XLAT(F_GETLEASE),
#endif
#ifdef F_NOTIFY
- { F_NOTIFY, "F_NOTIFY" },
+ XLAT(F_NOTIFY),
#endif
#ifdef F_DUPFD_CLOEXEC
- { F_DUPFD_CLOEXEC,"F_DUPFD_CLOEXEC"},
+ XLAT(F_DUPFD_CLOEXEC),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat fdflags[] = {
#ifdef FD_CLOEXEC
- { FD_CLOEXEC, "FD_CLOEXEC" },
+ XLAT(FD_CLOEXEC),
#endif
- { 0, NULL },
+ XLAT_END
};
#ifdef LOCK_SH
static const struct xlat flockcmds[] = {
- { LOCK_SH, "LOCK_SH" },
- { LOCK_EX, "LOCK_EX" },
- { LOCK_NB, "LOCK_NB" },
- { LOCK_UN, "LOCK_UN" },
- { 0, NULL },
+ XLAT(LOCK_SH),
+ XLAT(LOCK_EX),
+ XLAT(LOCK_NB),
+ XLAT(LOCK_UN),
+ XLAT_END
};
#endif /* LOCK_SH */
static const struct xlat lockfcmds[] = {
- { F_RDLCK, "F_RDLCK" },
- { F_WRLCK, "F_WRLCK" },
- { F_UNLCK, "F_UNLCK" },
+ XLAT(F_RDLCK),
+ XLAT(F_WRLCK),
+ XLAT(F_UNLCK),
#ifdef F_EXLCK
- { F_EXLCK, "F_EXLCK" },
+ XLAT(F_EXLCK),
#endif
#ifdef F_SHLCK
- { F_SHLCK, "F_SHLCK" },
+ XLAT(F_SHLCK),
#endif
- { 0, NULL },
+ XLAT_END
};
#ifdef F_NOTIFY
static const struct xlat notifyflags[] = {
#ifdef DN_ACCESS
- { DN_ACCESS, "DN_ACCESS" },
+ XLAT(DN_ACCESS),
#endif
#ifdef DN_MODIFY
- { DN_MODIFY, "DN_MODIFY" },
+ XLAT(DN_MODIFY),
#endif
#ifdef DN_CREATE
- { DN_CREATE, "DN_CREATE" },
+ XLAT(DN_CREATE),
#endif
#ifdef DN_DELETE
- { DN_DELETE, "DN_DELETE" },
+ XLAT(DN_DELETE),
#endif
#ifdef DN_RENAME
- { DN_RENAME, "DN_RENAME" },
+ XLAT(DN_RENAME),
#endif
#ifdef DN_ATTRIB
- { DN_ATTRIB, "DN_ATTRIB" },
+ XLAT(DN_ATTRIB),
#endif
#ifdef DN_MULTISHOT
- { DN_MULTISHOT, "DN_MULTISHOT" },
+ XLAT(DN_MULTISHOT),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif
static const struct xlat perf_event_open_flags[] = {
#ifdef PERF_FLAG_FD_NO_GROUP
- { PERF_FLAG_FD_NO_GROUP, "PERF_FLAG_FD_NO_GROUP" },
+ XLAT(PERF_FLAG_FD_NO_GROUP),
#endif
#ifdef PERF_FLAG_FD_OUTPUT
- { PERF_FLAG_FD_OUTPUT, "PERF_FLAG_FD_OUTPUT" },
+ XLAT(PERF_FLAG_FD_OUTPUT),
#endif
#ifdef PERF_FLAG_PID_CGROUP
- { PERF_FLAG_PID_CGROUP, "PERF_FLAG_PID_CGROUP" },
+ XLAT(PERF_FLAG_PID_CGROUP),
#endif
- { 0, NULL },
+ XLAT_END
};
-#if _LFS64_LARGEFILE
+#if defined(F_SETLK64) && F_SETLK64 + 0 != F_SETLK
+# define HAVE_F_SETLK64 1
+#else
+# define HAVE_F_SETLK64 0
+#endif
+
+#if defined(F_SETLKW64) && F_SETLKW64 + 0 != F_SETLKW
+# define HAVE_F_SETLKW64 1
+#else
+# define HAVE_F_SETLKW64 0
+#endif
+
+#if defined(F_GETLK64) && F_GETLK64+0 != F_GETLK
+# define HAVE_F_GETLK64 1
+#else
+# define HAVE_F_GETLK64 0
+#endif
+
+#if defined(X32) || defined(F_FREESP64) || \
+ HAVE_F_SETLK64 || HAVE_F_SETLKW64 || HAVE_F_GETLK64
+
+#ifndef HAVE_STRUCT_FLOCK64
+struct flock64 {
+ short int l_type, l_whence;
+ int64_t l_start, l_len;
+ int l_pid;
+};
+#endif
+
/* fcntl/lockf */
static void
printflock64(struct tcb *tcp, long addr, int getlk)
@@ -336,22 +361,22 @@
tprints(", ");
printflock(tcp, tcp->u_arg[2], 0);
break;
-#if _LFS64_LARGEFILE
+#if defined(F_FREESP64) || HAVE_F_SETLK64 || HAVE_F_SETLKW64
#ifdef F_FREESP64
case F_FREESP64:
#endif
/* Linux glibc defines SETLK64 as SETLK,
even though the kernel has different values - as does Solaris. */
-#if defined(F_SETLK64) && F_SETLK64 + 0 != F_SETLK
+#if HAVE_F_SETLK64
case F_SETLK64:
#endif
-#if defined(F_SETLKW64) && F_SETLKW64 + 0 != F_SETLKW
+#if HAVE_F_SETLKW64
case F_SETLKW64:
#endif
tprints(", ");
printflock64(tcp, tcp->u_arg[2], 0);
break;
-#endif
+#endif /* defined(F_FREESP64) || HAVE_F_SETLK64 || HAVE_F_SETLKW64 */
#ifdef F_NOTIFY
case F_NOTIFY:
tprints(", ");
@@ -396,10 +421,8 @@
tprints(", ");
printflock(tcp, tcp->u_arg[2], 1);
break;
-#if _LFS64_LARGEFILE
-#if defined(F_GETLK64) && F_GETLK64+0 != F_GETLK
+#if HAVE_F_GETLK64
case F_GETLK64:
-#endif
tprints(", ");
printflock64(tcp, tcp->u_arg[2], 1);
break;
@@ -481,32 +504,44 @@
decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
{
int i, j;
- unsigned nfds, fdsize;
+ int nfds, fdsize;
fd_set *fds;
const char *sep;
long arg;
- fdsize = args[0];
+ /* Kernel truncates arg[0] to int, we do the same. */
+ nfds = (int) args[0];
+
+ /* Kernel rejects negative nfds, so we don't parse it either. */
+ if (nfds < 0) {
+ nfds = 0;
+ fds = NULL;
+ }
/* Beware of select(2^31-1, NULL, NULL, NULL) and similar... */
- if (args[0] > 1024*1024)
- fdsize = 1024*1024;
- if (args[0] < 0)
- fdsize = 0;
- fdsize = (((fdsize + 7) / 8) + sizeof(long)-1) & -sizeof(long);
+ if (nfds > 1024*1024)
+ nfds = 1024*1024;
+
+ /*
+ * We had bugs a-la "while (j < args[0])" and "umoven(args[0])" below.
+ * Instead of args[0], use nfds for fd count, fdsize for array lengths.
+ */
+ fdsize = (((nfds + 7) / 8) + current_wordsize-1) & -current_wordsize;
if (entering(tcp)) {
- fds = malloc(fdsize);
- if (!fds)
- die_out_of_memory();
- nfds = args[0];
- tprintf("%d", nfds);
+ tprintf("%d", (int) args[0]);
+
+ if (fdsize > 0) {
+ fds = malloc(fdsize);
+ if (!fds)
+ die_out_of_memory();
+ }
for (i = 0; i < 3; i++) {
arg = args[i+1];
if (arg == 0) {
tprints(", NULL");
continue;
}
- if (!verbose(tcp)) {
+ if (!verbose(tcp) || !fds) {
tprintf(", %#lx", arg);
continue;
}
@@ -515,12 +550,13 @@
continue;
}
tprints(", [");
- for (j = 0, sep = ""; j < nfds; j++) {
- if (FD_ISSET(j, fds)) {
- tprints(sep);
- printfd(tcp, j);
- sep = " ";
- }
+ for (j = 0, sep = "";; j++) {
+ j = next_set_bit(fds, j, nfds);
+ if (j < 0)
+ break;
+ tprints(sep);
+ printfd(tcp, j);
+ sep = " ";
}
tprints("]");
}
@@ -532,13 +568,13 @@
static char outstr[1024];
char *outptr;
#define end_outstr (outstr + sizeof(outstr))
- const char *sep;
+ int ready_fds;
if (syserror(tcp))
return 0;
- nfds = tcp->u_rval;
- if (nfds == 0) {
+ ready_fds = tcp->u_rval;
+ if (ready_fds == 0) {
tcp->auxstr = "Timeout";
return RVAL_STR;
}
@@ -549,36 +585,36 @@
outptr = outstr;
sep = "";
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < 3 && ready_fds > 0; i++) {
int first = 1;
arg = args[i+1];
if (!arg || umoven(tcp, arg, fdsize, (char *) fds) < 0)
continue;
- for (j = 0; j < args[0]; j++) {
- if (FD_ISSET(j, fds)) {
- /* +2 chars needed at the end: ']',NUL */
- if (outptr < end_outstr - (sizeof(", except [") + sizeof(int)*3 + 2)) {
- if (first) {
- outptr += sprintf(outptr, "%s%s [%u",
- sep,
- i == 0 ? "in" : i == 1 ? "out" : "except",
- j
- );
- first = 0;
- sep = ", ";
- }
- else {
- outptr += sprintf(outptr, " %u", j);
- }
+ for (j = 0;; j++) {
+ j = next_set_bit(fds, j, nfds);
+ if (j < 0)
+ break;
+ /* +2 chars needed at the end: ']',NUL */
+ if (outptr < end_outstr - (sizeof(", except [") + sizeof(int)*3 + 2)) {
+ if (first) {
+ outptr += sprintf(outptr, "%s%s [%u",
+ sep,
+ i == 0 ? "in" : i == 1 ? "out" : "except",
+ j
+ );
+ first = 0;
+ sep = ", ";
}
- nfds--;
+ else {
+ outptr += sprintf(outptr, " %u", j);
+ }
}
+ if (--ready_fds == 0)
+ break;
}
if (outptr != outstr)
*outptr++ = ']';
- if (nfds == 0)
- break;
}
free(fds);
/* This contains no useful information on SunOS. */
@@ -619,58 +655,58 @@
static const struct xlat epollctls[] = {
#ifdef EPOLL_CTL_ADD
- { EPOLL_CTL_ADD, "EPOLL_CTL_ADD" },
+ XLAT(EPOLL_CTL_ADD),
#endif
#ifdef EPOLL_CTL_MOD
- { EPOLL_CTL_MOD, "EPOLL_CTL_MOD" },
+ XLAT(EPOLL_CTL_MOD),
#endif
#ifdef EPOLL_CTL_DEL
- { EPOLL_CTL_DEL, "EPOLL_CTL_DEL" },
+ XLAT(EPOLL_CTL_DEL),
#endif
- { 0, NULL }
+ XLAT_END
};
static const struct xlat epollevents[] = {
#ifdef EPOLLIN
- { EPOLLIN, "EPOLLIN" },
+ XLAT(EPOLLIN),
#endif
#ifdef EPOLLPRI
- { EPOLLPRI, "EPOLLPRI" },
+ XLAT(EPOLLPRI),
#endif
#ifdef EPOLLOUT
- { EPOLLOUT, "EPOLLOUT" },
+ XLAT(EPOLLOUT),
#endif
#ifdef EPOLLRDNORM
- { EPOLLRDNORM, "EPOLLRDNORM" },
+ XLAT(EPOLLRDNORM),
#endif
#ifdef EPOLLRDBAND
- { EPOLLRDBAND, "EPOLLRDBAND" },
+ XLAT(EPOLLRDBAND),
#endif
#ifdef EPOLLWRNORM
- { EPOLLWRNORM, "EPOLLWRNORM" },
+ XLAT(EPOLLWRNORM),
#endif
#ifdef EPOLLWRBAND
- { EPOLLWRBAND, "EPOLLWRBAND" },
+ XLAT(EPOLLWRBAND),
#endif
#ifdef EPOLLMSG
- { EPOLLMSG, "EPOLLMSG" },
+ XLAT(EPOLLMSG),
#endif
#ifdef EPOLLERR
- { EPOLLERR, "EPOLLERR" },
+ XLAT(EPOLLERR),
#endif
#ifdef EPOLLHUP
- { EPOLLHUP, "EPOLLHUP" },
+ XLAT(EPOLLHUP),
#endif
#ifdef EPOLLRDHUP
- { EPOLLRDHUP, "EPOLLRDHUP" },
+ XLAT(EPOLLRDHUP),
#endif
#ifdef EPOLLONESHOT
- { EPOLLONESHOT, "EPOLLONESHOT" },
+ XLAT(EPOLLONESHOT),
#endif
#ifdef EPOLLET
- { EPOLLET, "EPOLLET" },
+ XLAT(EPOLLET),
#endif
- { 0, NULL }
+ XLAT_END
};
/* Not aliased to printargs_ld: we want it to have a distinct address */
@@ -682,12 +718,12 @@
static const struct xlat epollflags[] = {
#ifdef EPOLL_CLOEXEC
- { EPOLL_CLOEXEC, "EPOLL_CLOEXEC" },
+ XLAT(EPOLL_CLOEXEC),
#endif
#ifdef EPOLL_NONBLOCK
- { EPOLL_NONBLOCK, "EPOLL_NONBLOCK" },
+ XLAT(EPOLL_NONBLOCK),
#endif
- { 0, NULL }
+ XLAT_END
};
int
@@ -790,247 +826,9 @@
epoll_wait_common(tcp);
if (exiting(tcp)) {
tprints(", ");
- print_sigset(tcp, tcp->u_arg[4], 0);
- }
- return 0;
-}
-
-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 const char *
-iocb_cmd_lookup(unsigned cmd, enum iocb_sub *sub)
-{
- static char buf[sizeof("%u /* SUB_??? */") + sizeof(int)*3];
- 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)) {
- *sub = cmds[cmd].sub;
- return cmds[cmd].name;
- }
- *sub = SUB_NONE;
- sprintf(buf, "%u /* SUB_??? */", cmd);
- return buf;
-}
-
-/* Not defined in libaio.h */
-#ifndef IOCB_RESFD
-# define IOCB_RESFD (1 << 0)
-#endif
-
-static void
-print_common_flags(struct iocb *iocb)
-{
-#if HAVE_STRUCT_IOCB_U_C_FLAGS
- 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);
-#else
-# warning "libaio.h is too old => limited io_submit decoding"
-#endif
-}
-
-#endif /* HAVE_LIBAIO_H */
-
-int
-sys_io_submit(struct tcb *tcp)
-{
- long nr;
- if (entering(tcp)) {
- tprintf("%lu, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
- nr = tcp->u_arg[1];
- /* and if nr is negative? */
- if (nr == 0)
- tprints("{}");
- else {
-#ifdef HAVE_LIBAIO_H
- long i;
- struct iocb *iocbp, **iocbs = (void *)tcp->u_arg[2];
-
- for (i = 0; i < nr; i++, iocbs++) {
- enum iocb_sub sub;
- struct iocb iocb;
- if (i == 0)
- tprints("{");
- else
- tprints(", ");
-
- if (umove(tcp, (unsigned long)iocbs, &iocbp) ||
- umove(tcp, (unsigned long)iocbp, &iocb)) {
- tprints("{...}");
- continue;
- }
- tprints("{");
- if (iocb.data)
- tprintf("data:%p, ", iocb.data);
- if (iocb.key)
- tprintf("key:%u, ", iocb.key);
- tprintf("%s, ", iocb_cmd_lookup(iocb.aio_lio_opcode, &sub));
- if (iocb.aio_reqprio)
- tprintf("reqprio:%d, ", iocb.aio_reqprio);
- tprintf("filedes:%d", iocb.aio_fildes);
- switch (sub) {
- case SUB_COMMON:
-#if HAVE_DECL_IO_CMD_PWRITE
- if (iocb.aio_lio_opcode == IO_CMD_PWRITE) {
- tprints(", str:");
- printstr(tcp, (unsigned long)iocb.u.c.buf,
- iocb.u.c.nbytes);
- } else
-#endif
- 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,
-#if HAVE_DECL_IO_CMD_PWRITEV
- iocb.aio_lio_opcode == IO_CMD_PWRITEV
-#else
- 0
-#endif
- );
- break;
- case SUB_POLL:
- tprintf(", %x", iocb.u.poll.events);
- break;
- case SUB_NONE:
- break;
- }
- tprints("}");
- }
- if (i)
- tprints("}");
-#else
-#warning "libaio.h is not available => no io_submit decoding"
- tprintf("%#lx", 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]);
+ /* NB: kernel requires arg[5] == NSIG / 8 */
+ print_sigset_addr_len(tcp, tcp->u_arg[4], tcp->u_arg[5]);
+ tprintf(", %lu", tcp->u_arg[5]);
}
return 0;
}
@@ -1046,18 +844,29 @@
{
int rc = decode_select(tcp, tcp->u_arg, BITNESS_CURRENT);
if (entering(tcp)) {
+ long r;
struct {
- void *ss;
+ unsigned long ptr;
unsigned long len;
} data;
- if (umove(tcp, tcp->u_arg[5], &data) < 0)
+#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
+ if (current_wordsize == 4) {
+ struct {
+ uint32_t ptr;
+ uint32_t len;
+ } data32;
+ r = umove(tcp, tcp->u_arg[5], &data32);
+ data.ptr = data32.ptr;
+ data.len = data32.len;
+ } else
+#endif
+ r = umove(tcp, tcp->u_arg[5], &data);
+ if (r < 0)
tprintf(", %#lx", tcp->u_arg[5]);
else {
tprints(", {");
- if (data.len < sizeof(long))
- tprintf("%#lx", (long)data.ss);
- else
- print_sigset(tcp, (long)data.ss, 0);
+ /* NB: kernel requires data.len == NSIG / 8 */
+ print_sigset_addr_len(tcp, data.ptr, data.len);
tprintf(", %lu}", data.len);
}
}
diff --git a/errnoent.sh b/errnoent.sh
new file mode 100755
index 0000000..a82fc04
--- /dev/null
+++ b/errnoent.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+# 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.
+
+awk '
+/^#define[ ]+E[A-Z0-9_]+[ ]+[0-9]+/ {
+ errno[$3] = $2
+ if ($3 > max)
+ max = $3
+}
+END {
+ for (i = 0; i <= max; i++) {
+ if (!errno[i])
+ errno[i] = "ERRNO_" i
+ printf "\t\"%s\", /* %d */\n", errno[i], i
+ }
+}
+' $*
diff --git a/fanotify.c b/fanotify.c
new file mode 100644
index 0000000..c8a7e37
--- /dev/null
+++ b/fanotify.c
@@ -0,0 +1,86 @@
+#include "defs.h"
+#include <linux/fanotify.h>
+
+static const struct xlat fan_classes[] = {
+ XLAT(FAN_CLASS_NOTIF),
+ XLAT(FAN_CLASS_CONTENT),
+ XLAT(FAN_CLASS_PRE_CONTENT),
+ XLAT_END
+};
+
+static const struct xlat fan_init_flags[] = {
+ XLAT(FAN_CLOEXEC),
+ XLAT(FAN_NONBLOCK),
+ XLAT(FAN_UNLIMITED_QUEUE),
+ XLAT(FAN_UNLIMITED_MARKS),
+ XLAT_END
+};
+
+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;
+}
+
+static const struct xlat fan_mark_flags[] = {
+ XLAT(FAN_MARK_ADD),
+ XLAT(FAN_MARK_REMOVE),
+ XLAT(FAN_MARK_DONT_FOLLOW),
+ XLAT(FAN_MARK_ONLYDIR),
+ XLAT(FAN_MARK_MOUNT),
+ XLAT(FAN_MARK_IGNORED_MASK),
+ XLAT(FAN_MARK_IGNORED_SURV_MODIFY),
+ XLAT(FAN_MARK_FLUSH),
+ XLAT_END
+};
+
+static const struct xlat fan_event_flags[] = {
+ XLAT(FAN_ACCESS),
+ XLAT(FAN_MODIFY),
+ XLAT(FAN_CLOSE),
+ XLAT(FAN_CLOSE_WRITE),
+ XLAT(FAN_CLOSE_NOWRITE),
+ XLAT(FAN_OPEN),
+ XLAT(FAN_Q_OVERFLOW),
+ XLAT(FAN_OPEN_PERM),
+ XLAT(FAN_ACCESS_PERM),
+ XLAT(FAN_ONDIR),
+ XLAT(FAN_EVENT_ON_CHILD),
+ XLAT_END
+};
+
+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;
+}
diff --git a/file.c b/file.c
index 9a83287..83ace8c 100644
--- a/file.c
+++ b/file.c
@@ -212,42 +212,42 @@
};
const struct xlat open_access_modes[] = {
- { O_RDONLY, "O_RDONLY" },
- { O_WRONLY, "O_WRONLY" },
- { O_RDWR, "O_RDWR" },
+ XLAT(O_RDONLY),
+ XLAT(O_WRONLY),
+ XLAT(O_RDWR),
#ifdef O_ACCMODE
- { O_ACCMODE, "O_ACCMODE" },
+ XLAT(O_ACCMODE),
#endif
- { 0, NULL },
+ XLAT_END
};
const struct xlat open_mode_flags[] = {
- { O_CREAT, "O_CREAT" },
- { O_EXCL, "O_EXCL" },
- { O_NOCTTY, "O_NOCTTY" },
- { O_TRUNC, "O_TRUNC" },
- { O_APPEND, "O_APPEND" },
- { O_NONBLOCK, "O_NONBLOCK" },
+ XLAT(O_CREAT),
+ XLAT(O_EXCL),
+ XLAT(O_NOCTTY),
+ XLAT(O_TRUNC),
+ XLAT(O_APPEND),
+ XLAT(O_NONBLOCK),
#ifdef O_SYNC
- { O_SYNC, "O_SYNC" },
+ XLAT(O_SYNC),
#endif
#ifdef O_ASYNC
- { O_ASYNC, "O_ASYNC" },
+ XLAT(O_ASYNC),
#endif
#ifdef O_DSYNC
- { O_DSYNC, "O_DSYNC" },
+ XLAT(O_DSYNC),
#endif
#ifdef O_RSYNC
- { O_RSYNC, "O_RSYNC" },
+ XLAT(O_RSYNC),
#endif
#if defined(O_NDELAY) && (O_NDELAY != O_NONBLOCK)
- { O_NDELAY, "O_NDELAY" },
+ XLAT(O_NDELAY),
#endif
#ifdef O_PRIV
- { O_PRIV, "O_PRIV" },
+ XLAT(O_PRIV),
#endif
#ifdef O_DIRECT
- { O_DIRECT, "O_DIRECT" },
+ XLAT(O_DIRECT),
#endif
#ifdef O_LARGEFILE
# if O_LARGEFILE == 0 /* biarch platforms in 64-bit mode */
@@ -259,67 +259,70 @@
# endif
# endif
# ifdef O_LARGEFILE
- { O_LARGEFILE, "O_LARGEFILE" },
+ XLAT(O_LARGEFILE),
# endif
#endif
#ifdef O_DIRECTORY
- { O_DIRECTORY, "O_DIRECTORY" },
+ XLAT(O_DIRECTORY),
#endif
#ifdef O_NOFOLLOW
- { O_NOFOLLOW, "O_NOFOLLOW" },
+ XLAT(O_NOFOLLOW),
#endif
#ifdef O_NOATIME
- { O_NOATIME, "O_NOATIME" },
+ XLAT(O_NOATIME),
#endif
#ifdef O_CLOEXEC
- { O_CLOEXEC, "O_CLOEXEC" },
+ XLAT(O_CLOEXEC),
+#endif
+#ifdef O_PATH
+ XLAT(O_PATH),
#endif
#ifdef FNDELAY
- { FNDELAY, "FNDELAY" },
+ XLAT(FNDELAY),
#endif
#ifdef FAPPEND
- { FAPPEND, "FAPPEND" },
+ XLAT(FAPPEND),
#endif
#ifdef FMARK
- { FMARK, "FMARK" },
+ XLAT(FMARK),
#endif
#ifdef FDEFER
- { FDEFER, "FDEFER" },
+ XLAT(FDEFER),
#endif
#ifdef FASYNC
- { FASYNC, "FASYNC" },
+ XLAT(FASYNC),
#endif
#ifdef FSHLOCK
- { FSHLOCK, "FSHLOCK" },
+ XLAT(FSHLOCK),
#endif
#ifdef FEXLOCK
- { FEXLOCK, "FEXLOCK" },
+ XLAT(FEXLOCK),
#endif
#ifdef FCREAT
- { FCREAT, "FCREAT" },
+ XLAT(FCREAT),
#endif
#ifdef FTRUNC
- { FTRUNC, "FTRUNC" },
+ XLAT(FTRUNC),
#endif
#ifdef FEXCL
- { FEXCL, "FEXCL" },
+ XLAT(FEXCL),
#endif
#ifdef FNBIO
- { FNBIO, "FNBIO" },
+ XLAT(FNBIO),
#endif
#ifdef FSYNC
- { FSYNC, "FSYNC" },
+ XLAT(FSYNC),
#endif
#ifdef FNOCTTY
- { FNOCTTY, "FNOCTTY" },
+ XLAT(FNOCTTY),
#endif
#ifdef O_SHLOCK
- { O_SHLOCK, "O_SHLOCK" },
+ XLAT(O_SHLOCK),
#endif
#ifdef O_EXLOCK
- { O_EXLOCK, "O_EXLOCK" },
+ XLAT(O_EXLOCK),
#endif
- { 0, NULL },
+ XLAT_END
};
#ifndef AT_FDCWD
@@ -329,7 +332,7 @@
/* The fd is an "int", so when decoding x86 on x86_64, we need to force sign
* extension to get the right value. We do this by declaring fd as int here.
*/
-static void
+void
print_dirfd(struct tcb *tcp, int fd)
{
if (fd == AT_FDCWD)
@@ -433,7 +436,7 @@
{ 0x8000, "O_RSYNC" },
{ 4, "O_NDELAY" },
{ 0x1000, "O_PRIV" },
- { 0, NULL },
+ XLAT_END
};
int
@@ -465,17 +468,17 @@
}
static const struct xlat access_flags[] = {
- { F_OK, "F_OK", },
- { R_OK, "R_OK" },
- { W_OK, "W_OK" },
- { X_OK, "X_OK" },
+ XLAT(F_OK),
+ XLAT(R_OK),
+ XLAT(W_OK),
+ XLAT(X_OK),
#ifdef EFF_ONLY_OK
- { EFF_ONLY_OK, "EFF_ONLY_OK" },
+ XLAT(EFF_ONLY_OK),
#endif
#ifdef EX_OK
- { EX_OK, "EX_OK" },
+ XLAT(EX_OK),
#endif
- { 0, NULL },
+ XLAT_END
};
static int
@@ -513,16 +516,16 @@
}
const struct xlat whence_codes[] = {
- { SEEK_SET, "SEEK_SET" },
- { SEEK_CUR, "SEEK_CUR" },
- { SEEK_END, "SEEK_END" },
+ XLAT(SEEK_SET),
+ XLAT(SEEK_CUR),
+ XLAT(SEEK_END),
#ifdef SEEK_DATA
- { SEEK_DATA, "SEEK_DATA" },
+ XLAT(SEEK_DATA),
#endif
#ifdef SEEK_HOLE
- { SEEK_HOLE, "SEEK_HOLE" },
+ XLAT(SEEK_HOLE),
#endif
- { 0, NULL },
+ XLAT_END
};
/* Linux kernel has exactly one version of lseek:
@@ -632,7 +635,6 @@
return 0;
}
-#if _LFS64_LARGEFILE
int
sys_truncate64(struct tcb *tcp)
{
@@ -642,7 +644,6 @@
}
return 0;
}
-#endif
int
sys_ftruncate(struct tcb *tcp)
@@ -654,7 +655,6 @@
return 0;
}
-#if _LFS64_LARGEFILE
int
sys_ftruncate64(struct tcb *tcp)
{
@@ -664,19 +664,18 @@
}
return 0;
}
-#endif
/* several stats */
static const struct xlat modetypes[] = {
- { S_IFREG, "S_IFREG" },
- { S_IFSOCK, "S_IFSOCK" },
- { S_IFIFO, "S_IFIFO" },
- { S_IFLNK, "S_IFLNK" },
- { S_IFDIR, "S_IFDIR" },
- { S_IFBLK, "S_IFBLK" },
- { S_IFCHR, "S_IFCHR" },
- { 0, NULL },
+ XLAT(S_IFREG),
+ XLAT(S_IFSOCK),
+ XLAT(S_IFIFO),
+ XLAT(S_IFLNK),
+ XLAT(S_IFDIR),
+ XLAT(S_IFBLK),
+ XLAT(S_IFCHR),
+ XLAT_END
};
static const char *
@@ -909,7 +908,7 @@
#endif /* POWERPC64 */
static const struct xlat fileflags[] = {
- { 0, NULL },
+ XLAT_END
};
static void
@@ -1104,18 +1103,10 @@
}
if (!abbrev(tcp)) {
-#ifdef HAVE_LONG_LONG
tprintf("{st_dev=makedev(%lu, %lu), st_ino=%llu, st_mode=%s, ",
-#else
- tprintf("{st_dev=makedev(%lu, %lu), st_ino=%lu, st_mode=%s, ",
-#endif
(unsigned long) major(statbuf.st_dev),
(unsigned long) minor(statbuf.st_dev),
-#ifdef HAVE_LONG_LONG
(unsigned long long) statbuf.st_ino,
-#else
- (unsigned long) statbuf.st_ino,
-#endif
sprintmode(statbuf.st_mode));
tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ",
(unsigned long) statbuf.st_nlink,
@@ -1144,11 +1135,7 @@
#endif /* !HAVE_STRUCT_STAT_ST_RDEV */
break;
default:
-#ifdef HAVE_LONG_LONG
tprintf("st_size=%llu, ", (unsigned long long) statbuf.st_size);
-#else
- tprintf("st_size=%lu, ", (unsigned long) statbuf.st_size);
-#endif
break;
}
if (!abbrev(tcp)) {
@@ -1336,12 +1323,12 @@
#endif
static const struct xlat at_flags[] = {
- { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" },
- { AT_REMOVEDIR, "AT_REMOVEDIR" },
- { AT_SYMLINK_FOLLOW, "AT_SYMLINK_FOLLOW" },
- { AT_NO_AUTOMOUNT, "AT_NO_AUTOMOUNT" },
- { AT_EMPTY_PATH, "AT_EMPTY_PATH" },
- { 0, NULL }
+ XLAT(AT_SYMLINK_NOFOLLOW),
+ XLAT(AT_REMOVEDIR),
+ XLAT(AT_SYMLINK_FOLLOW),
+ XLAT(AT_NO_AUTOMOUNT),
+ XLAT(AT_EMPTY_PATH),
+ XLAT_END
};
int
@@ -1510,24 +1497,24 @@
static const struct xlat aclcmds[] = {
# ifdef SETACL
- { SETACL, "SETACL" },
+ XLAT(SETACL),
# endif
# ifdef GETACL
- { GETACL, "GETACL" },
+ XLAT(GETACL),
# endif
# ifdef GETACLCNT
- { GETACLCNT, "GETACLCNT" },
+ XLAT(GETACLCNT),
# endif
# ifdef ACL_GET
- { ACL_GET, "ACL_GET" },
+ XLAT(ACL_GET),
# endif
# ifdef ACL_SET
- { ACL_SET, "ACL_SET" },
+ XLAT(ACL_SET),
# endif
# ifdef ACL_CNT
- { ACL_CNT, "ACL_CNT" },
+ XLAT(ACL_CNT),
# endif
- { 0, NULL },
+ XLAT_END
};
int
@@ -1571,15 +1558,15 @@
static const struct xlat aclipc[] = {
# ifdef IPC_SHM
- { IPC_SHM, "IPC_SHM" },
+ XLAT(IPC_SHM),
# endif
# ifdef IPC_SEM
- { IPC_SEM, "IPC_SEM" },
+ XLAT(IPC_SEM),
# endif
# ifdef IPC_MSG
- { IPC_MSG, "IPC_MSG" },
+ XLAT(IPC_MSG),
# endif
- { 0, NULL },
+ XLAT_END
};
int
@@ -1636,7 +1623,7 @@
{ 0x012ff7b4, "XENIX_SUPER_MAGIC" },
{ 0x012fd16d, "XIAFS_SUPER_MAGIC" },
{ 0x62656572, "SYSFS_MAGIC" },
- { 0, NULL },
+ XLAT_END
};
static const char *
@@ -2253,16 +2240,16 @@
}
static const struct xlat direnttypes[] = {
- { DT_UNKNOWN, "DT_UNKNOWN" },
- { DT_FIFO, "DT_FIFO" },
- { DT_CHR, "DT_CHR" },
- { DT_DIR, "DT_DIR" },
- { DT_BLK, "DT_BLK" },
- { DT_REG, "DT_REG" },
- { DT_LNK, "DT_LNK" },
- { DT_SOCK, "DT_SOCK" },
- { DT_WHT, "DT_WHT" },
- { 0, NULL },
+ XLAT(DT_UNKNOWN),
+ XLAT(DT_FIFO),
+ XLAT(DT_CHR),
+ XLAT(DT_DIR),
+ XLAT(DT_BLK),
+ XLAT(DT_REG),
+ XLAT(DT_LNK),
+ XLAT(DT_SOCK),
+ XLAT(DT_WHT),
+ XLAT_END
};
int
@@ -2322,7 +2309,6 @@
return 0;
}
-#if _LFS64_LARGEFILE
int
sys_getdents64(struct tcb *tcp)
{
@@ -2384,7 +2370,6 @@
free(buf);
return 0;
}
-#endif
int
sys_getcwd(struct tcb *tcp)
@@ -2479,10 +2464,10 @@
static const struct xlat xattrflags[] = {
#ifdef XATTR_CREATE
- { XATTR_CREATE, "XATTR_CREATE" },
- { XATTR_REPLACE, "XATTR_REPLACE" },
+ XLAT(XATTR_CREATE),
+ XLAT(XATTR_REPLACE),
#endif
- { 0, NULL }
+ XLAT_END
};
static void
@@ -2647,13 +2632,13 @@
}
static const struct xlat advise[] = {
- { POSIX_FADV_NORMAL, "POSIX_FADV_NORMAL" },
- { POSIX_FADV_RANDOM, "POSIX_FADV_RANDOM" },
- { POSIX_FADV_SEQUENTIAL, "POSIX_FADV_SEQUENTIAL" },
- { POSIX_FADV_WILLNEED, "POSIX_FADV_WILLNEED" },
- { POSIX_FADV_DONTNEED, "POSIX_FADV_DONTNEED" },
- { POSIX_FADV_NOREUSE, "POSIX_FADV_NOREUSE" },
- { 0, NULL }
+ XLAT(POSIX_FADV_NORMAL),
+ XLAT(POSIX_FADV_RANDOM),
+ XLAT(POSIX_FADV_SEQUENTIAL),
+ XLAT(POSIX_FADV_WILLNEED),
+ XLAT(POSIX_FADV_DONTNEED),
+ XLAT(POSIX_FADV_NOREUSE),
+ XLAT_END
};
int
@@ -2686,68 +2671,42 @@
return 0;
}
-static const struct xlat inotify_modes[] = {
- { 0x00000001, "IN_ACCESS" },
- { 0x00000002, "IN_MODIFY" },
- { 0x00000004, "IN_ATTRIB" },
- { 0x00000008, "IN_CLOSE_WRITE"},
- { 0x00000010, "IN_CLOSE_NOWRITE"},
- { 0x00000020, "IN_OPEN" },
- { 0x00000040, "IN_MOVED_FROM" },
- { 0x00000080, "IN_MOVED_TO" },
- { 0x00000100, "IN_CREATE" },
- { 0x00000200, "IN_DELETE" },
- { 0x00000400, "IN_DELETE_SELF"},
- { 0x00000800, "IN_MOVE_SELF" },
- { 0x00002000, "IN_UNMOUNT" },
- { 0x00004000, "IN_Q_OVERFLOW" },
- { 0x00008000, "IN_IGNORED" },
- { 0x01000000, "IN_ONLYDIR" },
- { 0x02000000, "IN_DONT_FOLLOW"},
- { 0x20000000, "IN_MASK_ADD" },
- { 0x40000000, "IN_ISDIR" },
- { 0x80000000, "IN_ONESHOT" },
- { 0, NULL }
-};
-
-static const struct xlat inotify_init_flags[] = {
- { 0x00000800, "IN_NONBLOCK" },
- { 0x00080000, "IN_CLOEXEC" },
- { 0, NULL }
+static const struct xlat sync_file_range_flags[] = {
+ XLAT(SYNC_FILE_RANGE_WAIT_BEFORE),
+ XLAT(SYNC_FILE_RANGE_WRITE),
+ XLAT(SYNC_FILE_RANGE_WAIT_AFTER),
+ XLAT_END
};
int
-sys_inotify_add_watch(struct tcb *tcp)
+sys_sync_file_range(struct tcb *tcp)
{
if (entering(tcp)) {
+ int argn;
printfd(tcp, tcp->u_arg[0]);
- tprints(", ");
- printpath(tcp, tcp->u_arg[1]);
- tprints(", ");
- printflags(inotify_modes, tcp->u_arg[2], "IN_???");
+ argn = printllval(tcp, ", %lld, ", 1);
+ argn = printllval(tcp, "%lld, ", argn);
+ printflags(sync_file_range_flags, tcp->u_arg[argn],
+ "SYNC_FILE_RANGE_???");
}
return 0;
}
int
-sys_inotify_rm_watch(struct tcb *tcp)
+sys_sync_file_range2(struct tcb *tcp)
{
if (entering(tcp)) {
+ int argn;
printfd(tcp, tcp->u_arg[0]);
- tprintf(", %d", (int) tcp->u_arg[1]);
+ printflags(sync_file_range_flags, 1,
+ "SYNC_FILE_RANGE_???");
+ argn = printllval(tcp, ", %lld, ", 2);
+ argn = printllval(tcp, "%lld, ", argn);
}
return 0;
}
int
-sys_inotify_init1(struct tcb *tcp)
-{
- if (entering(tcp))
- printflags(inotify_init_flags, tcp->u_arg[0], "IN_???");
- return 0;
-}
-
-int
sys_fallocate(struct tcb *tcp)
{
if (entering(tcp)) {
@@ -2767,9 +2726,9 @@
# define SWAP_FLAG_DISCARD 0x10000
#endif
static const struct xlat swap_flags[] = {
- { SWAP_FLAG_PREFER, "SWAP_FLAG_PREFER" },
- { SWAP_FLAG_DISCARD, "SWAP_FLAG_DISCARD" },
- { 0, NULL }
+ XLAT(SWAP_FLAG_PREFER),
+ XLAT(SWAP_FLAG_DISCARD),
+ XLAT_END
};
int
diff --git a/git-set-file-times b/git-set-file-times
new file mode 100755
index 0000000..85d854e
--- /dev/null
+++ b/git-set-file-times
@@ -0,0 +1,36 @@
+#!/usr/bin/perl -w
+use strict;
+
+# Sets mtime and atime of files to the latest commit time in git.
+#
+# This is useful after the first clone of the rsync repository BEFORE you
+# do any building. It is also safe if you have done a "make distclean".
+
+my %ls;
+my $commit_time;
+my $prefix = @ARGV && $ARGV[0] =~ s/^--prefix=// ? shift : '';
+
+$/ = "\0";
+open FH, 'git ls-files -z|' or die $!;
+while (<FH>) {
+ chomp;
+ $ls{$_} = $_;
+}
+close FH;
+
+$/ = "\n";
+open FH, "git log -r --name-only --no-color --pretty=raw -z @ARGV |" or die $!;
+while (<FH>) {
+ chomp;
+ if (/^committer .*? (\d+) (?:[\-\+]\d+)$/) {
+ $commit_time = $1;
+ } elsif (s/\0\0commit [a-f0-9]{40}$// or s/\0$//) {
+ my @files = delete @ls{split(/\0/, $_)};
+ @files = grep { defined $_ } @files;
+ next unless @files;
+ map { s/^/$prefix/ } @files;
+ utime $commit_time, $commit_time, @files;
+ }
+ last unless %ls;
+}
+close FH;
diff --git a/git-version-gen b/git-version-gen
new file mode 100755
index 0000000..8fee74e
--- /dev/null
+++ b/git-version-gen
@@ -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:
diff --git a/gitlog-to-changelog b/gitlog-to-changelog
new file mode 100755
index 0000000..4612d38
--- /dev/null
+++ b/gitlog-to-changelog
@@ -0,0 +1,213 @@
+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 = '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-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
+# 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/>.
+
+# Written by Jim Meyering
+
+use strict;
+use warnings;
+use Getopt::Long;
+use POSIX qw(strftime);
+
+(my $ME = $0) =~ s|.*/||;
+
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+ defined fileno STDOUT or return;
+ close STDOUT and return;
+ warn "$ME: failed to close standard output: $!\n";
+ $? ||= 1;
+}
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try `$ME --help' for more information.\n";
+ }
+ else
+ {
+ print $STREAM <<EOF;
+Usage: $ME [OPTIONS] [ARGS]
+
+Convert git log output to ChangeLog format. If present, any ARGS
+are passed to "git log". To avoid ARGS being parsed as options to
+$ME, they may be preceded by '--'.
+
+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
+
+EXAMPLE:
+
+ $ME --since=2008-01-01 > ChangeLog
+ $ME -- -n 5 foo > last-5-commits-to-branch-foo
+
+EOF
+ }
+ exit $exit_code;
+}
+
+# If the string $S is a well-behaved file name, simply return it.
+# If it contains white space, quotes, etc., quote it, and return the new string.
+sub shell_quote($)
+{
+ my ($s) = @_;
+ if ($s =~ m![^\w+/.,-]!)
+ {
+ # Convert each single quote to '\''
+ $s =~ s/\'/\'\\\'\'/g;
+ # Then single quote the string.
+ $s = "'$s'";
+ }
+ return $s;
+}
+
+sub quoted_cmd(@)
+{
+ return join (' ', map {shell_quote $_} @_);
+}
+
+{
+ 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;
+
+ 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");
+
+ my $prev_date_line = '';
+ while (1)
+ {
+ defined (my $in = <PIPE>)
+ or last;
+ $in =~ /^log size (\d+)$/
+ or die "$ME:$.: Invalid line (expected log size):\n$in";
+ my $log_nbytes = $1;
+
+ my $log;
+ my $n_read = read PIPE, $log, $log_nbytes;
+ $n_read == $log_nbytes
+ or die "$ME:$.: unexpected EOF\n";
+
+ my @line = split "\n", $log;
+ my $author_line = shift @line;
+ defined $author_line
+ or die "$ME:$.: unexpected EOF\n";
+ $author_line =~ /^(\d+) (.*>)$/
+ or die "$ME:$.: Invalid line "
+ . "(expected date/author/email):\n$author_line\n";
+
+ my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1));
+ # If this line would be the same as the previous date/name/email
+ # line, then arrange not to print it.
+ if ($date_line ne $prev_date_line)
+ {
+ $prev_date_line eq ''
+ or print "\n";
+ print $date_line;
+ }
+ $prev_date_line = $date_line;
+
+ # 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)
+ {
+ warn "$ME: warning: empty commit message:\n $date_line\n";
+ }
+ else
+ {
+ 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;
+
+ print "\n", join ("\n", @line), "\n";
+ }
+
+ defined ($in = <PIPE>)
+ or last;
+ $in ne "\n"
+ and die "$ME:$.: unexpected line:\n$in";
+ }
+
+ close PIPE
+ or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
+ # FIXME-someday: include $PROCESS_STATUS in the diagnostic
+}
+
+# Local Variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/import-Android.sh b/import-Android.sh
deleted file mode 100755
index d1e54d6..0000000
--- a/import-Android.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-#
-# Assists with importing a new version of Strace for Android.
-# Removes source files from the Strace original distribution that are not
-# needed on Android.
-#
-# Run this script after extracting an Strace distribution into external/strace.
-#
-
-UNNEEDED_SOURCES="\
- .tarball-version \
- .version \
- Makefile.am \
- Makefile.in \
- README-freebsd \
- README-sunos4 \
- README-svr4 \
- acinclude.m4 \
- aclocal.m4 \
- config.guess \
- config.h.in \
- config.log \
- config.status \
- config.sub \
- configure \
- configure.ac \
- debian \
- depcomp \
- errnoent.sh \
- freebsd \
- install-sh \
- linux/alpha \
- linux/avr32 \
- linux/bfin \
- linux/hppa \
- linux/ia64 \
- linux/m68k \
- linux/metag \
- linux/microblaze \
- linux/or1k \
- linux/powerpc \
- linux/s390 \
- linux/s390x \
- linux/sh \
- linux/sh64 \
- linux/sparc \
- linux/sparc64 \
- linux/tile \
- linux/xtensa \
- m4 \
- missing \
- mkinstalldirs \
- signalent.sh \
- sunos4 \
- svr4 \
- syscallent.sh \
- test \
- tests \
- xlate.el \
-"
-
-rm -rf $UNNEEDED_SOURCES
-find . -name ioctlent.h.in -print0 | xargs -0 rm -f
diff --git a/inotify.c b/inotify.c
new file mode 100644
index 0000000..03689b5
--- /dev/null
+++ b/inotify.c
@@ -0,0 +1,72 @@
+#include "defs.h"
+#include <fcntl.h>
+#include <linux/inotify.h>
+
+static const struct xlat inotify_flags[] = {
+ XLAT(IN_ACCESS),
+ XLAT(IN_MODIFY),
+ XLAT(IN_ATTRIB),
+ XLAT(IN_CLOSE),
+ XLAT(IN_CLOSE_WRITE),
+ XLAT(IN_CLOSE_NOWRITE),
+ XLAT(IN_OPEN),
+ XLAT(IN_MOVE),
+ XLAT(IN_MOVED_FROM),
+ XLAT(IN_MOVED_TO),
+ XLAT(IN_CREATE),
+ XLAT(IN_DELETE),
+ XLAT(IN_DELETE_SELF),
+ XLAT(IN_MOVE_SELF),
+ XLAT(IN_UNMOUNT),
+ XLAT(IN_Q_OVERFLOW),
+ XLAT(IN_IGNORED),
+ XLAT(IN_ONLYDIR),
+ XLAT(IN_DONT_FOLLOW),
+ XLAT(IN_EXCL_UNLINK),
+ XLAT(IN_MASK_ADD),
+ XLAT(IN_ISDIR),
+ XLAT(IN_ONESHOT),
+ XLAT_END
+};
+
+static const struct xlat inotify_init_flags[] = {
+ XLAT(O_NONBLOCK),
+ XLAT(O_CLOEXEC),
+ XLAT_END
+};
+
+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;
+}
diff --git a/io.c b/io.c
index b7bf832..fac5615 100644
--- a/io.c
+++ b/io.c
@@ -319,18 +319,18 @@
static const struct xlat splice_flags[] = {
#ifdef SPLICE_F_MOVE
- { SPLICE_F_MOVE, "SPLICE_F_MOVE" },
+ XLAT(SPLICE_F_MOVE),
#endif
#ifdef SPLICE_F_NONBLOCK
- { SPLICE_F_NONBLOCK, "SPLICE_F_NONBLOCK" },
+ XLAT(SPLICE_F_NONBLOCK),
#endif
#ifdef SPLICE_F_MORE
- { SPLICE_F_MORE, "SPLICE_F_MORE" },
+ XLAT(SPLICE_F_MORE),
#endif
#ifdef SPLICE_F_GIFT
- { SPLICE_F_GIFT, "SPLICE_F_GIFT" },
+ XLAT(SPLICE_F_GIFT),
#endif
- { 0, NULL },
+ XLAT_END
};
int
diff --git a/ioctl.c b/ioctl.c
index b504729..3f6c410 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -86,7 +86,7 @@
case 0x03:
case 0x12:
return block_ioctl(tcp, code, arg);
-#ifndef HAVE_ANDROID_OS
+#ifdef HAVE_SCSI_SG_H
case 0x22:
return scsi_ioctl(tcp, code, arg);
#endif
@@ -97,6 +97,8 @@
case 'o':
case 'O':
return ubi_ioctl(tcp, code, arg);
+ case '=':
+ return ptp_ioctl(tcp, code, arg);
default:
break;
}
diff --git a/ioprio.c b/ioprio.c
new file mode 100644
index 0000000..52c5a28
--- /dev/null
+++ b/ioprio.c
@@ -0,0 +1,86 @@
+#include "defs.h"
+
+enum {
+ IOPRIO_WHO_PROCESS = 1,
+ IOPRIO_WHO_PGRP,
+ IOPRIO_WHO_USER
+};
+
+static const struct xlat ioprio_who[] = {
+ XLAT(IOPRIO_WHO_PROCESS),
+ XLAT(IOPRIO_WHO_PGRP),
+ XLAT(IOPRIO_WHO_USER),
+ XLAT_END
+};
+
+enum {
+ IOPRIO_CLASS_NONE,
+ IOPRIO_CLASS_RT,
+ IOPRIO_CLASS_BE,
+ IOPRIO_CLASS_IDLE
+};
+
+static const struct xlat ioprio_class[] = {
+ XLAT(IOPRIO_CLASS_NONE),
+ XLAT(IOPRIO_CLASS_RT),
+ XLAT(IOPRIO_CLASS_BE),
+ XLAT(IOPRIO_CLASS_IDLE),
+ XLAT_END
+};
+
+#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;
+}
diff --git a/ipc.c b/ipc.c
index 0b91a52..144c52b 100644
--- a/ipc.c
+++ b/ipc.c
@@ -64,82 +64,82 @@
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" },
- { IPC_INFO, "IPC_INFO" },
- { MSG_STAT, "MSG_STAT" },
- { MSG_INFO, "MSG_INFO" },
- { 0, NULL },
+ XLAT(IPC_RMID),
+ XLAT(IPC_SET),
+ XLAT(IPC_STAT),
+ XLAT(IPC_INFO),
+ XLAT(MSG_STAT),
+ XLAT(MSG_INFO),
+ XLAT_END
};
static const struct xlat semctl_flags[] = {
- { IPC_RMID, "IPC_RMID" },
- { IPC_SET, "IPC_SET" },
- { IPC_STAT, "IPC_STAT" },
- { IPC_INFO, "IPC_INFO" },
- { SEM_STAT, "SEM_STAT" },
- { SEM_INFO, "SEM_INFO" },
- { GETPID, "GETPID" },
- { GETVAL, "GETVAL" },
- { GETALL, "GETALL" },
- { GETNCNT, "GETNCNT" },
- { GETZCNT, "GETZCNT" },
- { SETVAL, "SETVAL" },
- { SETALL, "SETALL" },
- { 0, NULL },
+ XLAT(IPC_RMID),
+ XLAT(IPC_SET),
+ XLAT(IPC_STAT),
+ XLAT(IPC_INFO),
+ XLAT(SEM_STAT),
+ XLAT(SEM_INFO),
+ XLAT(GETPID),
+ XLAT(GETVAL),
+ XLAT(GETALL),
+ XLAT(GETNCNT),
+ XLAT(GETZCNT),
+ XLAT(SETVAL),
+ XLAT(SETALL),
+ XLAT_END
};
static const struct xlat shmctl_flags[] = {
- { IPC_RMID, "IPC_RMID" },
- { IPC_SET, "IPC_SET" },
- { IPC_STAT, "IPC_STAT" },
- { IPC_INFO, "IPC_INFO" },
- { SHM_STAT, "SHM_STAT" },
- { SHM_INFO, "SHM_INFO" },
+ XLAT(IPC_RMID),
+ XLAT(IPC_SET),
+ XLAT(IPC_STAT),
+ XLAT(IPC_INFO),
+ XLAT(SHM_STAT),
+ XLAT(SHM_INFO),
#ifdef SHM_LOCK
- { SHM_LOCK, "SHM_LOCK" },
+ XLAT(SHM_LOCK),
#endif
#ifdef SHM_UNLOCK
- { SHM_UNLOCK, "SHM_UNLOCK" },
+ XLAT(SHM_UNLOCK),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat resource_flags[] = {
- { IPC_CREAT, "IPC_CREAT" },
- { IPC_EXCL, "IPC_EXCL" },
- { IPC_NOWAIT, "IPC_NOWAIT" },
- { 0, NULL },
+ XLAT(IPC_CREAT),
+ XLAT(IPC_EXCL),
+ XLAT(IPC_NOWAIT),
+ XLAT_END
};
static const struct xlat shm_resource_flags[] = {
- { IPC_CREAT, "IPC_CREAT" },
- { IPC_EXCL, "IPC_EXCL" },
+ XLAT(IPC_CREAT),
+ XLAT(IPC_EXCL),
#ifdef SHM_HUGETLB
- { SHM_HUGETLB, "SHM_HUGETLB" },
+ XLAT(SHM_HUGETLB),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat shm_flags[] = {
- { SHM_REMAP, "SHM_REMAP" },
- { SHM_RDONLY, "SHM_RDONLY" },
- { SHM_RND, "SHM_RND" },
- { 0, NULL },
+ XLAT(SHM_REMAP),
+ XLAT(SHM_RDONLY),
+ XLAT(SHM_RND),
+ XLAT_END
};
static const struct xlat msg_flags[] = {
- { MSG_NOERROR, "MSG_NOERROR" },
- { MSG_EXCEPT, "MSG_EXCEPT" },
- { IPC_NOWAIT, "IPC_NOWAIT" },
- { 0, NULL },
+ XLAT(MSG_NOERROR),
+ XLAT(MSG_EXCEPT),
+ XLAT(IPC_NOWAIT),
+ XLAT_END
};
static const struct xlat semop_flags[] = {
- { SEM_UNDO, "SEM_UNDO" },
- { IPC_NOWAIT, "IPC_NOWAIT" },
- { 0, NULL },
+ XLAT(SEM_UNDO),
+ XLAT(IPC_NOWAIT),
+ XLAT_END
};
int sys_msgget(struct tcb *tcp)
diff --git a/kexec.c b/kexec.c
new file mode 100644
index 0000000..e201937
--- /dev/null
+++ b/kexec.c
@@ -0,0 +1,108 @@
+#include "defs.h"
+#include <linux/kexec.h>
+
+static const struct xlat kexec_arch_values[] = {
+ XLAT(KEXEC_ARCH_DEFAULT),
+ XLAT(KEXEC_ARCH_386),
+ XLAT(KEXEC_ARCH_X86_64),
+ XLAT(KEXEC_ARCH_PPC),
+ XLAT(KEXEC_ARCH_PPC64),
+ XLAT(KEXEC_ARCH_IA_64),
+ XLAT(KEXEC_ARCH_ARM),
+ XLAT(KEXEC_ARCH_S390),
+ XLAT(KEXEC_ARCH_SH),
+ XLAT(KEXEC_ARCH_MIPS_LE),
+ XLAT(KEXEC_ARCH_MIPS),
+ XLAT_END
+};
+
+static const struct xlat kexec_flags[] = {
+ XLAT(KEXEC_ON_CRASH),
+ XLAT(KEXEC_PRESERVE_CONTEXT),
+ XLAT_END
+};
+
+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;
+}
diff --git a/keyctl.c b/keyctl.c
new file mode 100644
index 0000000..fa4b7f5
--- /dev/null
+++ b/keyctl.c
@@ -0,0 +1,455 @@
+#include "defs.h"
+#include <linux/keyctl.h>
+
+typedef int32_t key_serial_t;
+
+static const struct xlat key_spec[] = {
+ XLAT(KEY_SPEC_THREAD_KEYRING),
+ XLAT(KEY_SPEC_PROCESS_KEYRING),
+ XLAT(KEY_SPEC_SESSION_KEYRING),
+ XLAT(KEY_SPEC_USER_KEYRING),
+ XLAT(KEY_SPEC_USER_SESSION_KEYRING),
+ XLAT(KEY_SPEC_GROUP_KEYRING),
+ XLAT(KEY_SPEC_REQKEY_AUTH_KEY),
+ XLAT(KEY_SPEC_REQUESTOR_KEYRING),
+ XLAT_END
+};
+
+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
+
+static const struct xlat key_perms[] = {
+ XLAT(KEY_POS_VIEW),
+ XLAT(KEY_POS_READ),
+ XLAT(KEY_POS_WRITE),
+ XLAT(KEY_POS_SEARCH),
+ XLAT(KEY_POS_LINK),
+ XLAT(KEY_POS_SETATTR),
+ XLAT(KEY_POS_ALL),
+ XLAT(KEY_USR_VIEW),
+ XLAT(KEY_USR_READ),
+ XLAT(KEY_USR_WRITE),
+ XLAT(KEY_USR_SEARCH),
+ XLAT(KEY_USR_LINK),
+ XLAT(KEY_USR_SETATTR),
+ XLAT(KEY_USR_ALL),
+ XLAT(KEY_GRP_VIEW),
+ XLAT(KEY_GRP_READ),
+ XLAT(KEY_GRP_WRITE),
+ XLAT(KEY_GRP_SEARCH),
+ XLAT(KEY_GRP_LINK),
+ XLAT(KEY_GRP_SETATTR),
+ XLAT(KEY_GRP_ALL),
+ XLAT(KEY_OTH_VIEW),
+ XLAT(KEY_OTH_READ),
+ XLAT(KEY_OTH_WRITE),
+ XLAT(KEY_OTH_SEARCH),
+ XLAT(KEY_OTH_LINK),
+ XLAT(KEY_OTH_SETATTR),
+ XLAT(KEY_OTH_ALL),
+ XLAT_END
+};
+
+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;
+}
+
+static const struct xlat key_reqkeys[] = {
+ XLAT(KEY_REQKEY_DEFL_NO_CHANGE),
+ XLAT(KEY_REQKEY_DEFL_DEFAULT),
+ XLAT(KEY_REQKEY_DEFL_THREAD_KEYRING),
+ XLAT(KEY_REQKEY_DEFL_PROCESS_KEYRING),
+ XLAT(KEY_REQKEY_DEFL_SESSION_KEYRING),
+ XLAT(KEY_REQKEY_DEFL_USER_KEYRING),
+ XLAT(KEY_REQKEY_DEFL_USER_SESSION_KEYRING),
+ XLAT(KEY_REQKEY_DEFL_GROUP_KEYRING),
+ XLAT(KEY_REQKEY_DEFL_REQUESTOR_KEYRING),
+ XLAT_END
+};
+
+static int
+keyctl_set_reqkey_keyring(struct tcb *tcp, int reqkey)
+{
+ if (entering(tcp)) {
+ tprints(", ");
+ printxval(key_reqkeys, reqkey, "KEY_REQKEY_DEFL_???");
+ }
+ return 0;
+}
+
+static const struct xlat keyctl_commands[] = {
+ XLAT(KEYCTL_GET_KEYRING_ID),
+ XLAT(KEYCTL_JOIN_SESSION_KEYRING),
+ XLAT(KEYCTL_UPDATE),
+ XLAT(KEYCTL_REVOKE),
+ XLAT(KEYCTL_CHOWN),
+ XLAT(KEYCTL_SETPERM),
+ XLAT(KEYCTL_DESCRIBE),
+ XLAT(KEYCTL_CLEAR),
+ XLAT(KEYCTL_LINK),
+ XLAT(KEYCTL_UNLINK),
+ XLAT(KEYCTL_SEARCH),
+ XLAT(KEYCTL_READ),
+ XLAT(KEYCTL_INSTANTIATE),
+ XLAT(KEYCTL_NEGATE),
+ XLAT(KEYCTL_SET_REQKEY_KEYRING),
+ XLAT(KEYCTL_SET_TIMEOUT),
+ XLAT(KEYCTL_ASSUME_AUTHORITY),
+ XLAT(KEYCTL_GET_SECURITY),
+ XLAT(KEYCTL_SESSION_TO_PARENT),
+ XLAT(KEYCTL_REJECT),
+ XLAT(KEYCTL_INSTANTIATE_IOV),
+ XLAT(KEYCTL_INVALIDATE),
+ XLAT(KEYCTL_GET_PERSISTENT),
+ XLAT_END
+};
+
+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;
+}
diff --git a/linux/aarch64/ioctlent.h.in b/linux/aarch64/ioctlent.h.in
new file mode 100644
index 0000000..83e6eb2
--- /dev/null
+++ b/linux/aarch64/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../arm/ioctlent.h.in"
diff --git a/linux/alpha/errnoent.h b/linux/alpha/errnoent.h
new file mode 100644
index 0000000..4ffaff9
--- /dev/null
+++ b/linux/alpha/errnoent.h
@@ -0,0 +1,516 @@
+ "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 */
+ "ERRNO_67", /* 67 */
+ "EUSERS", /* 68 */
+ "EDQUOT", /* 69 */
+ "ESTALE", /* 70 */
+ "EREMOTE", /* 71 */
+ "ERRNO_72", /* 72 */
+ "ERRNO_73", /* 73 */
+ "ERRNO_74", /* 74 */
+ "ERRNO_75", /* 75 */
+ "ERRNO_76", /* 76 */
+ "ENOLCK", /* 77 */
+ "ENOSYS", /* 78 */
+ "ERRNO_79", /* 79 */
+ "ENOMSG", /* 80 */
+ "EIDRM", /* 81 */
+ "ENOSR", /* 82 */
+ "ETIME", /* 83 */
+ "EBADMSG", /* 84 */
+ "EPROTO", /* 85 */
+ "ENODATA", /* 86 */
+ "ENOSTR", /* 87 */
+ "ECHRNG", /* 88 */
+ "EL2NSYNC", /* 89 */
+ "EL3HLT", /* 90 */
+ "EL3RST", /* 91 */
+ "ENOPKG", /* 92 */
+ "ELNRNG", /* 93 */
+ "EUNATCH", /* 94 */
+ "ENOCSI", /* 95 */
+ "EL2HLT", /* 96 */
+ "EBADE", /* 97 */
+ "EBADR", /* 98 */
+ "EXFULL", /* 99 */
+ "ENOANO", /* 100 */
+ "EBADRQC", /* 101 */
+ "EBADSLT", /* 102 */
+ "EDEADLOCK", /* 103 */
+ "EBFONT", /* 104 */
+ "ENONET", /* 105 */
+ "ENOLINK", /* 106 */
+ "EADV", /* 107 */
+ "ESRMNT", /* 108 */
+ "ECOMM", /* 109 */
+ "EMULTIHOP", /* 110 */
+ "EDOTDOT", /* 111 */
+ "EOVERFLOW", /* 112 */
+ "ENOTUNIQ", /* 113 */
+ "EBADFD", /* 114 */
+ "EREMCHG", /* 115 */
+ "EILSEQ", /* 116 */
+ "EUCLEAN", /* 117 */
+ "ENOTNAM", /* 118 */
+ "ENAVAIL", /* 119 */
+ "EISNAM", /* 120 */
+ "EREMOTEIO", /* 121 */
+ "ELIBACC", /* 122 */
+ "ELIBBAD", /* 123 */
+ "ELIBSCN", /* 124 */
+ "ELIBMAX", /* 125 */
+ "ELIBEXEC", /* 126 */
+ "ERESTART", /* 127 */
+ "ESTRPIPE", /* 128 */
+ "ERRNO_129", /* 129 */
+ "ERRNO_130", /* 130 */
+ "ERRNO_131", /* 131 */
+ "ERRNO_132", /* 132 */
+ "ERRNO_133", /* 133 */
+ "ERRNO_134", /* 134 */
+ "ERRNO_135", /* 135 */
+ "ERRNO_136", /* 136 */
+ "ERRNO_137", /* 137 */
+ "ERRNO_138", /* 138 */
+ "ERRNO_139", /* 139 */
+ "ERRNO_140", /* 140 */
+ "ERRNO_141", /* 141 */
+ "ERRNO_142", /* 142 */
+ "ERRNO_143", /* 143 */
+ "ERRNO_144", /* 144 */
+ "ERRNO_145", /* 145 */
+ "ERRNO_146", /* 146 */
+ "ERRNO_147", /* 147 */
+ "ERRNO_148", /* 148 */
+ "ERRNO_149", /* 149 */
+ "ERRNO_150", /* 150 */
+ "ERRNO_151", /* 151 */
+ "ERRNO_152", /* 152 */
+ "ERRNO_153", /* 153 */
+ "ERRNO_154", /* 154 */
+ "ERRNO_155", /* 155 */
+ "ERRNO_156", /* 156 */
+ "ERRNO_157", /* 157 */
+ "ERRNO_158", /* 158 */
+ "ERRNO_159", /* 159 */
+ "ERRNO_160", /* 160 */
+ "ERRNO_161", /* 161 */
+ "ERRNO_162", /* 162 */
+ "ERRNO_163", /* 163 */
+ "ERRNO_164", /* 164 */
+ "ERRNO_165", /* 165 */
+ "ERRNO_166", /* 166 */
+ "ERRNO_167", /* 167 */
+ "ERRNO_168", /* 168 */
+ "ERRNO_169", /* 169 */
+ "ERRNO_170", /* 170 */
+ "ERRNO_171", /* 171 */
+ "ERRNO_172", /* 172 */
+ "ERRNO_173", /* 173 */
+ "ERRNO_174", /* 174 */
+ "ERRNO_175", /* 175 */
+ "ERRNO_176", /* 176 */
+ "ERRNO_177", /* 177 */
+ "ERRNO_178", /* 178 */
+ "ERRNO_179", /* 179 */
+ "ERRNO_180", /* 180 */
+ "ERRNO_181", /* 181 */
+ "ERRNO_182", /* 182 */
+ "ERRNO_183", /* 183 */
+ "ERRNO_184", /* 184 */
+ "ERRNO_185", /* 185 */
+ "ERRNO_186", /* 186 */
+ "ERRNO_187", /* 187 */
+ "ERRNO_188", /* 188 */
+ "ERRNO_189", /* 189 */
+ "ERRNO_190", /* 190 */
+ "ERRNO_191", /* 191 */
+ "ERRNO_192", /* 192 */
+ "ERRNO_193", /* 193 */
+ "ERRNO_194", /* 194 */
+ "ERRNO_195", /* 195 */
+ "ERRNO_196", /* 196 */
+ "ERRNO_197", /* 197 */
+ "ERRNO_198", /* 198 */
+ "ERRNO_199", /* 199 */
+ "ERRNO_200", /* 200 */
+ "ERRNO_201", /* 201 */
+ "ERRNO_202", /* 202 */
+ "ERRNO_203", /* 203 */
+ "ERRNO_204", /* 204 */
+ "ERRNO_205", /* 205 */
+ "ERRNO_206", /* 206 */
+ "ERRNO_207", /* 207 */
+ "ERRNO_208", /* 208 */
+ "ERRNO_209", /* 209 */
+ "ERRNO_210", /* 210 */
+ "ERRNO_211", /* 211 */
+ "ERRNO_212", /* 212 */
+ "ERRNO_213", /* 213 */
+ "ERRNO_214", /* 214 */
+ "ERRNO_215", /* 215 */
+ "ERRNO_216", /* 216 */
+ "ERRNO_217", /* 217 */
+ "ERRNO_218", /* 218 */
+ "ERRNO_219", /* 219 */
+ "ERRNO_220", /* 220 */
+ "ERRNO_221", /* 221 */
+ "ERRNO_222", /* 222 */
+ "ERRNO_223", /* 223 */
+ "ERRNO_224", /* 224 */
+ "ERRNO_225", /* 225 */
+ "ERRNO_226", /* 226 */
+ "ERRNO_227", /* 227 */
+ "ERRNO_228", /* 228 */
+ "ERRNO_229", /* 229 */
+ "ERRNO_230", /* 230 */
+ "ERRNO_231", /* 231 */
+ "ERRNO_232", /* 232 */
+ "ERRNO_233", /* 233 */
+ "ERRNO_234", /* 234 */
+ "ERRNO_235", /* 235 */
+ "ERRNO_236", /* 236 */
+ "ERRNO_237", /* 237 */
+ "ERRNO_238", /* 238 */
+ "ERRNO_239", /* 239 */
+ "ERRNO_240", /* 240 */
+ "ERRNO_241", /* 241 */
+ "ERRNO_242", /* 242 */
+ "ERRNO_243", /* 243 */
+ "ERRNO_244", /* 244 */
+ "ERRNO_245", /* 245 */
+ "ERRNO_246", /* 246 */
+ "ERRNO_247", /* 247 */
+ "ERRNO_248", /* 248 */
+ "ERRNO_249", /* 249 */
+ "ERRNO_250", /* 250 */
+ "ERRNO_251", /* 251 */
+ "ERRNO_252", /* 252 */
+ "ERRNO_253", /* 253 */
+ "ERRNO_254", /* 254 */
+ "ERRNO_255", /* 255 */
+ "ERRNO_256", /* 256 */
+ "ERRNO_257", /* 257 */
+ "ERRNO_258", /* 258 */
+ "ERRNO_259", /* 259 */
+ "ERRNO_260", /* 260 */
+ "ERRNO_261", /* 261 */
+ "ERRNO_262", /* 262 */
+ "ERRNO_263", /* 263 */
+ "ERRNO_264", /* 264 */
+ "ERRNO_265", /* 265 */
+ "ERRNO_266", /* 266 */
+ "ERRNO_267", /* 267 */
+ "ERRNO_268", /* 268 */
+ "ERRNO_269", /* 269 */
+ "ERRNO_270", /* 270 */
+ "ERRNO_271", /* 271 */
+ "ERRNO_272", /* 272 */
+ "ERRNO_273", /* 273 */
+ "ERRNO_274", /* 274 */
+ "ERRNO_275", /* 275 */
+ "ERRNO_276", /* 276 */
+ "ERRNO_277", /* 277 */
+ "ERRNO_278", /* 278 */
+ "ERRNO_279", /* 279 */
+ "ERRNO_280", /* 280 */
+ "ERRNO_281", /* 281 */
+ "ERRNO_282", /* 282 */
+ "ERRNO_283", /* 283 */
+ "ERRNO_284", /* 284 */
+ "ERRNO_285", /* 285 */
+ "ERRNO_286", /* 286 */
+ "ERRNO_287", /* 287 */
+ "ERRNO_288", /* 288 */
+ "ERRNO_289", /* 289 */
+ "ERRNO_290", /* 290 */
+ "ERRNO_291", /* 291 */
+ "ERRNO_292", /* 292 */
+ "ERRNO_293", /* 293 */
+ "ERRNO_294", /* 294 */
+ "ERRNO_295", /* 295 */
+ "ERRNO_296", /* 296 */
+ "ERRNO_297", /* 297 */
+ "ERRNO_298", /* 298 */
+ "ERRNO_299", /* 299 */
+ "ERRNO_300", /* 300 */
+ "ERRNO_301", /* 301 */
+ "ERRNO_302", /* 302 */
+ "ERRNO_303", /* 303 */
+ "ERRNO_304", /* 304 */
+ "ERRNO_305", /* 305 */
+ "ERRNO_306", /* 306 */
+ "ERRNO_307", /* 307 */
+ "ERRNO_308", /* 308 */
+ "ERRNO_309", /* 309 */
+ "ERRNO_310", /* 310 */
+ "ERRNO_311", /* 311 */
+ "ERRNO_312", /* 312 */
+ "ERRNO_313", /* 313 */
+ "ERRNO_314", /* 314 */
+ "ERRNO_315", /* 315 */
+ "ERRNO_316", /* 316 */
+ "ERRNO_317", /* 317 */
+ "ERRNO_318", /* 318 */
+ "ERRNO_319", /* 319 */
+ "ERRNO_320", /* 320 */
+ "ERRNO_321", /* 321 */
+ "ERRNO_322", /* 322 */
+ "ERRNO_323", /* 323 */
+ "ERRNO_324", /* 324 */
+ "ERRNO_325", /* 325 */
+ "ERRNO_326", /* 326 */
+ "ERRNO_327", /* 327 */
+ "ERRNO_328", /* 328 */
+ "ERRNO_329", /* 329 */
+ "ERRNO_330", /* 330 */
+ "ERRNO_331", /* 331 */
+ "ERRNO_332", /* 332 */
+ "ERRNO_333", /* 333 */
+ "ERRNO_334", /* 334 */
+ "ERRNO_335", /* 335 */
+ "ERRNO_336", /* 336 */
+ "ERRNO_337", /* 337 */
+ "ERRNO_338", /* 338 */
+ "ERRNO_339", /* 339 */
+ "ERRNO_340", /* 340 */
+ "ERRNO_341", /* 341 */
+ "ERRNO_342", /* 342 */
+ "ERRNO_343", /* 343 */
+ "ERRNO_344", /* 344 */
+ "ERRNO_345", /* 345 */
+ "ERRNO_346", /* 346 */
+ "ERRNO_347", /* 347 */
+ "ERRNO_348", /* 348 */
+ "ERRNO_349", /* 349 */
+ "ERRNO_350", /* 350 */
+ "ERRNO_351", /* 351 */
+ "ERRNO_352", /* 352 */
+ "ERRNO_353", /* 353 */
+ "ERRNO_354", /* 354 */
+ "ERRNO_355", /* 355 */
+ "ERRNO_356", /* 356 */
+ "ERRNO_357", /* 357 */
+ "ERRNO_358", /* 358 */
+ "ERRNO_359", /* 359 */
+ "ERRNO_360", /* 360 */
+ "ERRNO_361", /* 361 */
+ "ERRNO_362", /* 362 */
+ "ERRNO_363", /* 363 */
+ "ERRNO_364", /* 364 */
+ "ERRNO_365", /* 365 */
+ "ERRNO_366", /* 366 */
+ "ERRNO_367", /* 367 */
+ "ERRNO_368", /* 368 */
+ "ERRNO_369", /* 369 */
+ "ERRNO_370", /* 370 */
+ "ERRNO_371", /* 371 */
+ "ERRNO_372", /* 372 */
+ "ERRNO_373", /* 373 */
+ "ERRNO_374", /* 374 */
+ "ERRNO_375", /* 375 */
+ "ERRNO_376", /* 376 */
+ "ERRNO_377", /* 377 */
+ "ERRNO_378", /* 378 */
+ "ERRNO_379", /* 379 */
+ "ERRNO_380", /* 380 */
+ "ERRNO_381", /* 381 */
+ "ERRNO_382", /* 382 */
+ "ERRNO_383", /* 383 */
+ "ERRNO_384", /* 384 */
+ "ERRNO_385", /* 385 */
+ "ERRNO_386", /* 386 */
+ "ERRNO_387", /* 387 */
+ "ERRNO_388", /* 388 */
+ "ERRNO_389", /* 389 */
+ "ERRNO_390", /* 390 */
+ "ERRNO_391", /* 391 */
+ "ERRNO_392", /* 392 */
+ "ERRNO_393", /* 393 */
+ "ERRNO_394", /* 394 */
+ "ERRNO_395", /* 395 */
+ "ERRNO_396", /* 396 */
+ "ERRNO_397", /* 397 */
+ "ERRNO_398", /* 398 */
+ "ERRNO_399", /* 399 */
+ "ERRNO_400", /* 400 */
+ "ERRNO_401", /* 401 */
+ "ERRNO_402", /* 402 */
+ "ERRNO_403", /* 403 */
+ "ERRNO_404", /* 404 */
+ "ERRNO_405", /* 405 */
+ "ERRNO_406", /* 406 */
+ "ERRNO_407", /* 407 */
+ "ERRNO_408", /* 408 */
+ "ERRNO_409", /* 409 */
+ "ERRNO_410", /* 410 */
+ "ERRNO_411", /* 411 */
+ "ERRNO_412", /* 412 */
+ "ERRNO_413", /* 413 */
+ "ERRNO_414", /* 414 */
+ "ERRNO_415", /* 415 */
+ "ERRNO_416", /* 416 */
+ "ERRNO_417", /* 417 */
+ "ERRNO_418", /* 418 */
+ "ERRNO_419", /* 419 */
+ "ERRNO_420", /* 420 */
+ "ERRNO_421", /* 421 */
+ "ERRNO_422", /* 422 */
+ "ERRNO_423", /* 423 */
+ "ERRNO_424", /* 424 */
+ "ERRNO_425", /* 425 */
+ "ERRNO_426", /* 426 */
+ "ERRNO_427", /* 427 */
+ "ERRNO_428", /* 428 */
+ "ERRNO_429", /* 429 */
+ "ERRNO_430", /* 430 */
+ "ERRNO_431", /* 431 */
+ "ERRNO_432", /* 432 */
+ "ERRNO_433", /* 433 */
+ "ERRNO_434", /* 434 */
+ "ERRNO_435", /* 435 */
+ "ERRNO_436", /* 436 */
+ "ERRNO_437", /* 437 */
+ "ERRNO_438", /* 438 */
+ "ERRNO_439", /* 439 */
+ "ERRNO_440", /* 440 */
+ "ERRNO_441", /* 441 */
+ "ERRNO_442", /* 442 */
+ "ERRNO_443", /* 443 */
+ "ERRNO_444", /* 444 */
+ "ERRNO_445", /* 445 */
+ "ERRNO_446", /* 446 */
+ "ERRNO_447", /* 447 */
+ "ERRNO_448", /* 448 */
+ "ERRNO_449", /* 449 */
+ "ERRNO_450", /* 450 */
+ "ERRNO_451", /* 451 */
+ "ERRNO_452", /* 452 */
+ "ERRNO_453", /* 453 */
+ "ERRNO_454", /* 454 */
+ "ERRNO_455", /* 455 */
+ "ERRNO_456", /* 456 */
+ "ERRNO_457", /* 457 */
+ "ERRNO_458", /* 458 */
+ "ERRNO_459", /* 459 */
+ "ERRNO_460", /* 460 */
+ "ERRNO_461", /* 461 */
+ "ERRNO_462", /* 462 */
+ "ERRNO_463", /* 463 */
+ "ERRNO_464", /* 464 */
+ "ERRNO_465", /* 465 */
+ "ERRNO_466", /* 466 */
+ "ERRNO_467", /* 467 */
+ "ERRNO_468", /* 468 */
+ "ERRNO_469", /* 469 */
+ "ERRNO_470", /* 470 */
+ "ERRNO_471", /* 471 */
+ "ERRNO_472", /* 472 */
+ "ERRNO_473", /* 473 */
+ "ERRNO_474", /* 474 */
+ "ERRNO_475", /* 475 */
+ "ERRNO_476", /* 476 */
+ "ERRNO_477", /* 477 */
+ "ERRNO_478", /* 478 */
+ "ERRNO_479", /* 479 */
+ "ERRNO_480", /* 480 */
+ "ERRNO_481", /* 481 */
+ "ERRNO_482", /* 482 */
+ "ERRNO_483", /* 483 */
+ "ERRNO_484", /* 484 */
+ "ERRNO_485", /* 485 */
+ "ERRNO_486", /* 486 */
+ "ERRNO_487", /* 487 */
+ "ERRNO_488", /* 488 */
+ "ERRNO_489", /* 489 */
+ "ERRNO_490", /* 490 */
+ "ERRNO_491", /* 491 */
+ "ERRNO_492", /* 492 */
+ "ERRNO_493", /* 493 */
+ "ERRNO_494", /* 494 */
+ "ERRNO_495", /* 495 */
+ "ERRNO_496", /* 496 */
+ "ERRNO_497", /* 497 */
+ "ERRNO_498", /* 498 */
+ "ERRNO_499", /* 499 */
+ "ERRNO_500", /* 500 */
+ "ERRNO_501", /* 501 */
+ "ERRNO_502", /* 502 */
+ "ERRNO_503", /* 503 */
+ "ERRNO_504", /* 504 */
+ "ERRNO_505", /* 505 */
+ "ERRNO_506", /* 506 */
+ "ERRNO_507", /* 507 */
+ "ERRNO_508", /* 508 */
+ "ERRNO_509", /* 509 */
+ "ERRNO_510", /* 510 */
+ "ERRNO_511", /* 511 */
+ "ERESTARTSYS", /* 512 */
+ "ERESTARTNOINTR", /* 513 */
+ "ERESTARTNOHAND", /* 514 */
+ "ENOIOCTLCMD", /* 515 */
diff --git a/linux/alpha/ioctlent.h.in b/linux/alpha/ioctlent.h.in
new file mode 100644
index 0000000..db7d328
--- /dev/null
+++ b/linux/alpha/ioctlent.h.in
@@ -0,0 +1,73 @@
+ {"asm/ioctls.h", "TIOCEXCL", 0x540c},
+ {"asm/ioctls.h", "TIOCNXCL", 0x540d},
+ {"asm/ioctls.h", "TIOCSCTTY", 0x540e},
+ {"asm/ioctls.h", "TIOCSTI", 0x5412},
+ {"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/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/ioctls.h", "TIOCNOTTY", 0x5422},
+ {"asm/ioctls.h", "TIOCSETD", 0x5423},
+ {"asm/ioctls.h", "TIOCGETD", 0x5424},
+ {"asm/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
+ {"asm/ioctls.h", "TIOCSBRK", 0x5427},
+ {"asm/ioctls.h", "TIOCCBRK", 0x5428},
+ {"asm/ioctls.h", "TIOCGSID", 0x5429},
+ {"asm/ioctls.h", "TIOCGPTN", 0x5430},
+ {"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
+ {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e},
+ {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f},
+ {"asm/ioctls.h", "FIOCLEX", 0x6601},
+ {"asm/ioctls.h", "FIONCLEX", 0x6602},
+ {"asm/sockios.h", "FIOGETOWN", 0x667b},
+ {"asm/sockios.h", "FIOSETOWN", 0x667c},
+ {"asm/ioctls.h", "FIOASYNC", 0x667d},
+ {"asm/ioctls.h", "FIONBIO", 0x667e},
+ {"asm/ioctls.h", "FIONREAD", 0x667f},
+ {"asm/sockios.h", "SIOCATMARK", 0x7307},
+ {"asm/sockios.h", "SIOCSPGRP", 0x7308},
+ {"asm/sockios.h", "SIOCGPGRP", 0x7309},
+ {"asm/ioctls.h", "TIOCGETP", 0x7408},
+ {"asm/ioctls.h", "TIOCSETP", 0x7409},
+ {"asm/ioctls.h", "TIOCSETN", 0x740a},
+ {"asm/ioctls.h", "TIOCSETC", 0x7411},
+ {"asm/ioctls.h", "TIOCGETC", 0x7412},
+ {"asm/ioctls.h", "TCGETS", 0x7413},
+ {"asm/ioctls.h", "TCSETS", 0x7414},
+ {"asm/ioctls.h", "TCSETSW", 0x7415},
+ {"asm/ioctls.h", "TCSETSF", 0x7416},
+ {"asm/ioctls.h", "TCGETA", 0x7417},
+ {"asm/ioctls.h", "TCSETA", 0x7418},
+ {"asm/ioctls.h", "TCSETAW", 0x7419},
+ {"asm/ioctls.h", "TCSETAF", 0x741c},
+ {"asm/ioctls.h", "TCSBRK", 0x741d},
+ {"asm/ioctls.h", "TCXONC", 0x741e},
+ {"asm/ioctls.h", "TCFLSH", 0x741f},
+ {"asm/ioctls.h", "TIOCSWINSZ", 0x7467},
+ {"asm/ioctls.h", "TIOCGWINSZ", 0x7468},
+ {"asm/ioctls.h", "TIOCSTART", 0x746e},
+ {"asm/ioctls.h", "TIOCSTOP", 0x746f},
+ {"asm/ioctls.h", "TIOCOUTQ", 0x7473},
+ {"asm/ioctls.h", "TIOCGLTC", 0x7474},
+ {"asm/ioctls.h", "TIOCSLTC", 0x7475},
+ {"asm/ioctls.h", "TIOCSPGRP", 0x7476},
+ {"asm/ioctls.h", "TIOCGPGRP", 0x7477},
diff --git a/linux/alpha/signalent.h b/linux/alpha/signalent.h
new file mode 100644
index 0000000..2b507e3
--- /dev/null
+++ b/linux/alpha/signalent.h
@@ -0,0 +1,32 @@
+ "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 */
diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h
new file mode 100644
index 0000000..28e2eeb
--- /dev/null
+++ b/linux/alpha/syscallent.h
@@ -0,0 +1,534 @@
+/*
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.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.
+ */
+
+ { 6, 0, printargs, "osf_syscall" }, /* 0, not implemented */
+ { 1, TP, sys_exit, "exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 5, 0, printargs, "osf_old_open" }, /* 5, not implemented */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 4, TP, sys_osf_wait4, "osf_wait4" }, /* 7 */
+ { 5, 0, printargs, "osf_old_creat" }, /* 8, not implemented */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 5, 0, printargs, "osf_execve" }, /* 11, not implemented */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 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, TM, sys_brk, "brk" }, /* 17 */
+ { 5, 0, printargs, "osf_getfsstat" }, /* 18, not implemented */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getxpid" }, /* 20 */
+ { 4, 0, printargs, "osf_mount" }, /* 21 */
+ { 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 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 5, 0, printargs, "osf_nrecvmsg" }, /* 27, not implemented */
+ { 5, 0, printargs, "osf_nsendmsg" }, /* 28, not implemented */
+ { 5, 0, printargs, "osf_nrecvfrom" }, /* 29, not implemented */
+ { 5, 0, printargs, "osf_naccept" }, /* 30, not implemented */
+ { 5, 0, printargs, "osf_ngetpeername" }, /* 31, not implemented */
+ { 5, 0, printargs, "osf_ngetsockname" }, /* 32, not implemented */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 5, 0, printargs, "osf_chflags" }, /* 34, not implemented */
+ { 5, 0, printargs, "osf_fchflags" }, /* 35, not implemented */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 5, 0, printargs, "osf_old_stat" }, /* 38, not implemented */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 39 */
+ { 5, 0, printargs, "osf_old_lstat" }, /* 40, not implemented */
+ { 1, TD, sys_dup, "dup" }, /* 41 */
+ { 1, TD, sys_pipe, "pipe" }, /* 42 */
+ { 5, 0, printargs, "osf_set_program_attributes" }, /* 43 */
+ { 5, 0, printargs, "osf_profil" }, /* 44, not implemented */
+ { 3, TD|TF, sys_open, "open" }, /* 45 */
+ { 5, 0, printargs, "osf_old_sigaction" }, /* 46, not implemented */
+ { 1, NF, sys_getgid, "getxgid" }, /* 47 */
+ { 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, 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 */
+ { 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, TM, printargs, "osf_mremap" }, /* 65, not implemented */
+ { 0, TP, sys_fork, "vfork" }, /* 66 */
+ { 2, TF, sys_stat, "stat" }, /* 67 */
+ { 2, TF, sys_lstat, "lstat" }, /* 68 */
+ { 5, TM, printargs, "osf_sbrk" }, /* 69, not implemented */
+ { 5, 0, printargs, "osf_sstk" }, /* 70, not implemented */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 71 */
+ { 5, 0, printargs, "osf_old_vadvise" }, /* 72, not implemented */
+ { 2, TM, sys_munmap, "munmap" }, /* 73 */
+ { 3, TM, 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, 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 */
+ { 2, 0, sys_setpgrp, "setpgrp" }, /* 82 */
+ { 3, 0, sys_osf_setitimer, "osf_setitimer" }, /* 83 */
+ { 5, 0, printargs, "osf_old_wait" }, /* 84, not implemented */
+ { 5, 0, printargs, "osf_table" }, /* 85, not implemented */
+ { 2, 0, sys_osf_getitimer, "osf_getitimer" }, /* 86 */
+ { 2, 0, sys_gethostname, "gethostname" }, /* 87 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 88 */
+ { 0, 0, sys_getdtablesize, "getdtablesize" }, /* 89 */
+ { 2, TD, sys_dup2, "dup2" }, /* 90 */
+ { 2, TD, sys_fstat, "fstat" }, /* 91 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 92 */
+ { 5, 0, sys_osf_select, "osf_select" }, /* 93 */
+ { 3, TD, sys_poll, "poll" }, /* 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, "osf_getpriority" }, /* 100 */
+ { 4, TN, sys_send, "send" }, /* 101 */
+ { 4, TN, sys_recv, "recv" }, /* 102 */
+ { 0, TS, sys_sigreturn, "sigreturn" }, /* 103 */
+ { 3, TN, sys_bind, "bind" }, /* 104 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 105 */
+ { 2, TN, sys_listen, "listen" }, /* 106 */
+ { 5, 0, printargs, "osf_plock" }, /* 107, not implemented */
+ { 5, 0, printargs, "osf_old_sigvec" }, /* 108, not implemented */
+ { 5, 0, printargs, "osf_old_sigblock" }, /* 109, not implemented */
+ { 5, 0, printargs, "osf_old_sigsetmask" }, /* 110, not implemented */
+ { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 111 */
+ { 5, 0, printargs, "sigstack" }, /* 112 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 113 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 114 */
+ { 5, 0, printargs, "osf_old_vtrace" }, /* 115, not implemented */
+ { 2, 0, sys_osf_gettimeofday, "osf_gettimeofday" }, /* 116 */
+ { 2, 0, sys_osf_getrusage, "osf_getrusage" }, /* 117 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */
+ { 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 */
+ { 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 */
+ { 1, 0, sys_setgid, "setgid" }, /* 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, 0, sys_osf_utimes, "osf_utimes" }, /* 138 */
+ { 5, 0, printargs, "osf_old_sigreturn" }, /* 139 */
+ { 5, 0, printargs, "osf_adjtime" }, /* 140, not implemented */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 141 */
+ { 5, 0, printargs, "osf_gethostid" }, /* 142, not implemented */
+ { 5, 0, printargs, "osf_sethostid" }, /* 143, not implemented */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 144 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
+ { 5, 0, printargs, "osf_old_killpg" }, /* 146, not implemented */
+ { 0, 0, sys_setsid, "setsid" }, /* 147 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 148 */
+ { 5, 0, printargs, "osf_oldquota" }, /* 149, not implemented */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 150 */
+ { 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, 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, 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, NULL, NULL }, /* 167 */
+ { 5, 0, NULL, NULL }, /* 168 */
+ { 5, 0, printargs, "osf_exportfs" }, /* 169, not implemented */
+ { 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, NULL, NULL }, /* 182 */
+ { 5, 0, NULL, NULL }, /* 183 */
+ { 5, 0, printargs, "osf_getmnt" }, /* 184, not implemented */
+ { 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, 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 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 202 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 203 */
+ { 4, TI, sys_semctl, "semctl" }, /* 204 */
+ { 4, TI, sys_semget, "semget" }, /* 205 */
+ { 4, TI, printargs, "semop" }, /* 206 */
+ { 1, 0, printargs, "osf_utsname" }, /* 207 */
+ { 3, TF, sys_chown, "lchown" }, /* 208 */
+ { 3, TI, printargs, "osf_shmat" }, /* 209 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 210 */
+ { 4, TI, 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, 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, NULL, NULL }, /* 221 */
+ { 5, 0, printargs, "osf_security" }, /* 222, not implemented */
+ { 5, 0, printargs, "osf_kloadcall" }, /* 223, not implemented */
+ { 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, 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 */
+ { 5, 0, printargs, "osf_set_speculative" }, /* 239, not implemented */
+ { 5, 0, printargs, "osf_msfs_syscall" }, /* 240, not implemented */
+ { 5, 0, printargs, "osf_sysinfo" }, /* 241 */
+ { 5, 0, printargs, "osf_uadmin" }, /* 242, not implemented */
+ { 5, 0, printargs, "osf_fuser" }, /* 243, not implemented */
+ { 2, 0, printargs, "osf_proplist_syscall" }, /* 244 */
+ { 5, 0, printargs, "osf_ntp_adjtime" }, /* 245, not implemented */
+ { 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, 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 */
+ { 5, 0, printargs, "osf_audgen" }, /* 253, not implemented */
+ { 5, 0, sys_sysfs, "sysfs" }, /* 254 */
+ { 5, 0, printargs, "osf_subsysinfo" }, /* 255, not implemented */
+ { 5, 0, printargs, "osf_getsysinfo" }, /* 256 */
+ { 5, 0, printargs, "osf_setsysinfo" }, /* 257 */
+ { 5, 0, printargs, "osf_afs_syscall" }, /* 258, not implemented */
+ { 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, 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 */
+ { 1, 0, sys_adjtimex, "adjtimex32" }, /* 303 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 304 */
+ { 3, TD, sys_getdents, "getdents" }, /* 305 */
+ { 2, 0, sys_create_module, "create_module" }, /* 306 */
+ { 4, 0, sys_init_module, "init_module" }, /* 307 */
+ { 2, 0, sys_delete_module, "delete_module" }, /* 308 */
+ { 1, 0, sys_get_kernel_syms, "get_kernel_syms" }, /* 309 */
+ { 3, 0, sys_syslog, "syslog" }, /* 310 */
+ { 4, 0, sys_reboot, "reboot" }, /* 311 */
+ { 5, TP, sys_clone, "clone" }, /* 312 */
+ { 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, 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 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 326 */
+ { 2, 0, sys_ustat, "ustat" }, /* 327 */
+ { 2, TF, sys_statfs, "statfs" }, /* 328 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 329 */
+ { 2, 0, sys_sched_setparam, "sched_setparam" }, /* 330 */
+ { 2, 0, sys_sched_getparam, "sched_getparam" }, /* 331 */
+ { 3, 0, sys_sched_setscheduler, "sched_setscheduler" }, /* 332 */
+ { 2, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 333 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 334 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max" }, /* 335 */
+ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min" }, /* 336 */
+ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval" }, /* 337 */
+ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 338 */
+ { 1, 0, sys_uname, "uname" }, /* 339 */
+ { 2, 0, sys_nanosleep, "nanosleep" }, /* 340 */
+ { 5, TM, 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 */
+ { 4, TD, sys_pread, "pread" }, /* 349 */
+ { 4, TD, sys_pwrite, "pwrite" }, /* 350 */
+ { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 351 */
+ { 4, 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 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 356 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 357 */
+ { 5, TD, sys_select, "select" }, /* 358 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 359 */
+ { 3, 0, sys_settimeofday, "settimeofday" }, /* 360 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 361 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 362 */
+ { 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, TF, sys_getcwd, "getcwd" }, /* 367 */
+ { 2, 0, sys_capget, "capget" }, /* 368 */
+ { 2, 0, sys_capset, "capset" }, /* 369 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 370 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 371 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 372 */
+ { 4, 0, printargs, "dipc" }, /* 373, not implemented */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 374 */
+ { 3, TM, sys_mincore, "mincore" }, /* 375 */
+ { 3, 0, printargs, "pciconfig_iobase" }, /* 376 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 377 */
+ { 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 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 384 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 385 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 386 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 387 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 388 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 389 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 390 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 391 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 392 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 393 */
+ { 6, 0, sys_futex, "futex" }, /* 394 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 395 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 396 */
+ { 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 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 401 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 402 */
+ { 5, 0, NULL, NULL }, /* 403 */
+ { 5, 0, NULL, NULL }, /* 404 */
+ { 1, TP, 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, TM, 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, 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 417 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 418 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 419 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 420 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 421 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 422 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 423 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 424 */
+ { 2, TF, sys_stat64, "stat64" }, /* 425 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 426 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 427 */
+ { 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, 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 */
+ { 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 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 453 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 454 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 455 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 456 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 457 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 458 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 459 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 460 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 461 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 462 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 463 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 464 */
+ { 1, TP, sys_unshare, "unshare" }, /* 465 */
+ { 2, 0, 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 */
+ { 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 */
+ { 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 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 484 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 485 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 486 */
+ { 3, TD, sys_dup3, "dup3" }, /* 487 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 488 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 489 */
+ { 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 */
diff --git a/linux/arc/ioctlent.h.in b/linux/arc/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/arc/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h
new file mode 100644
index 0000000..fd3171a
--- /dev/null
+++ b/linux/arc/syscallent.h
@@ -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, sys_exit, "exit" }, /* 93 */
+ { 1, TP, 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, sys_shmat, "shmat" }, /* 196 */
+ { 1, TI, 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, sys_brk, "brk" }, /* 214 */
+ { 2, TM, sys_munmap, "munmap" }, /* 215 */
+ { 5, TM, 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, sys_execve, "execve" }, /* 221 */
+ { 6, TD|TM, 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, 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, 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 */
diff --git a/linux/arm/errnoent1.h b/linux/arm/errnoent1.h
deleted file mode 100644
index a894827..0000000
--- a/linux/arm/errnoent1.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Our second set comes from the i386 files. */
-#include "../errnoent.h"
diff --git a/linux/arm/ioctlent.h.in b/linux/arm/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/arm/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/arm/ioctlent1.h b/linux/arm/ioctlent1.h
deleted file mode 100644
index 1f92feb..0000000
--- a/linux/arm/ioctlent1.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Our second set comes from the i386 files. */
-#include "linux/ioctlent.h"
diff --git a/linux/arm/signalent1.h b/linux/arm/signalent1.h
deleted file mode 100644
index 5c18d98..0000000
--- a/linux/arm/signalent1.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Our second set comes from the i386 files. */
-#include "../signalent.h"
diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
index 132b22a..f9b2b9a 100644
--- a/linux/arm/syscallent.h
+++ b/linux/arm/syscallent.h
@@ -396,7 +396,7 @@
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 365 */
{ 4, TN, sys_accept4, "accept4" }, /* 366 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 367 */
- { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 368 */
+ { 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 */
diff --git a/linux/arm/syscallent1.h b/linux/arm/syscallent1.h
deleted file mode 100644
index 3b5397d..0000000
--- a/linux/arm/syscallent1.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* ARM specific syscalls */
- { 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 */
diff --git a/linux/avr32/ioctlent.h.in b/linux/avr32/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/avr32/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h
new file mode 100644
index 0000000..527d11a
--- /dev/null
+++ b/linux/avr32/syscallent.h
@@ -0,0 +1,311 @@
+/*
+ * Copyright (c) 2004-2009 Atmel Corporation
+ * 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.
+ */
+
+ { 0, 0, sys_setup, "setup" }, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 1, 0, sys_umask, "umask" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "chown" }, /* 16 */
+ { 3, TF, sys_chown, "lchown" }, /* 17 */
+ { 3, TD, sys_lseek, "lseek" }, /* 18 */
+ { 5, TD, sys_llseek, "_llseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 2, TF, sys_umount, "umount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 0, TS, sys_pause, "pause" }, /* 28 */
+ { 2, TF, sys_utime, "utime" }, /* 29 */
+ { 2, TF, sys_stat, "stat" }, /* 30 */
+ { 2, TD, sys_fstat, "fstat" }, /* 31 */
+ { 2, TF, sys_lstat, "lstat" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, TF, sys_chroot, "chroot" }, /* 34 */
+ { 0, 0, sys_sync, "sync" }, /* 35 */
+ { 1, TD, sys_fsync, "fsync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 1, TD, sys_dup, "dup" }, /* 41 */
+ { 1, TD, sys_pipe, "pipe" }, /* 42 */
+ { 1, 0, sys_times, "times" }, /* 43 */
+ { 5, TP, sys_clone, "clone" }, /* 44 */
+ { 1, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 52 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 53 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 54 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 55 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 56 */
+ { 5, TM, sys_mremap, "mremap" }, /* 57 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 58 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 59 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 60 */
+ { 2, 0, sys_setregid, "setregid" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 2, TD, sys_dup2, "dup2" }, /* 63 */
+ { 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 */
+ { 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 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 72 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 5, TD, sys_select, "select" }, /* 82 */
+ { 2, TF, sys_symlink, "symlink" }, /* 83 */
+ { 1, TD, sys_fchdir, "fchdir" }, /* 84 */
+ { 3, TF, sys_readlink, "readlink" }, /* 85 */
+ { 5, TD, sys_pread, "pread" }, /* 86 */
+ { 5, TD, sys_pwrite, "pwrite" }, /* 87 */
+ { 2, TF, sys_swapon, "swapon" }, /* 88 */
+ { 4, 0, sys_reboot, "reboot" }, /* 89 */
+ { 6, TD|TM, sys_mmap_pgoff, "mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TP, sys_wait4, "wait4" }, /* 98 */
+ { 2, TF, sys_statfs, "statfs" }, /* 99 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 101 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 102 */
+ { 3, 0, sys_syslog, "syslog" }, /* 103 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 106 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 107 */
+ { 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, TM, 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, TF, sys_quotactl, "quotactl" }, /* 117 */
+ { 1, 0, sys_getpgid, "getpgid" }, /* 118 */
+ { 0, 0, sys_bdflush, "bdflush" }, /* 119 */
+ { 3, 0, sys_sysfs, "sysfs" }, /* 120 */
+ { 1, 0, sys_personality, "personality" }, /* 121 */
+ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 122 */
+ { 3, TD, sys_getdents, "getdents" }, /* 123 */
+ { 2, TD, sys_flock, "flock" }, /* 124 */
+ { 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, 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 138 */
+ { 0, 0, sys_sched_yield, "sched_yield"}, /* 139 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 140 */
+ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 141 */
+ { 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, sys_nfsservctl, "nfsservctl" }, /* 145 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 146 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 147 */
+ { 5, 0, sys_prctl, "prctl" }, /* 148 */
+ { 3, TN, sys_socket, "socket" }, /* 149 */
+ { 3, TN, sys_bind, "bind" }, /* 150 */
+ { 3, TN, sys_connect, "connect" }, /* 151 */
+ { 2, TN, sys_listen, "listen" }, /* 152 */
+ { 3, TN, sys_accept, "accept" }, /* 153 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 154 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 155 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 156 */
+ { 4, TN, sys_send, "send" }, /* 157 */
+ { 4, TN, sys_recv, "recv" }, /* 158 */
+ { 6, TN, sys_sendto, "sendto" }, /* 159 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 160 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 161 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 162 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 163 */
+ { 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, 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, sys_gettid, "gettid" }, /* 176 */
+ { 4, TD, sys_readahead, "readahead" }, /* 177 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 178 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 179 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 180 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 181 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 182 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 183 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 184 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 185 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 186 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 187 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 188 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 189 */
+ { 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 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 194 */
+ { 2, 0, sys_capget, "capget" }, /* 195 */
+ { 2, 0, sys_capset, "capset" }, /* 196 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 197 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 198 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 199 */
+ { 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, 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, TM, 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 213 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 214 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 215 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 216 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 217 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 218 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 219 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 220 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 221 */
+ { 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, 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 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 233 */
+ { 5, TP, sys_waitid, "waitid" }, /* 234 */
+ { 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 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 244 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 245 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 246 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 247 */
+ { 4, TD|TF, printargs, "fstatat64" }, /* 248 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 249 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 250 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 251 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 252 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 253 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 254 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 255 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 256 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 257 */
+ { 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 */
+ { 3, TI, sys_msgctl, "msgctl" }, /* 269 */
+ { 4, TI, sys_semget, "semget" }, /* 270 */
+ { 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, sys_shmget, "shmget" }, /* 275 */
+ { 4, TI, 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 */
diff --git a/linux/bfin/ioctlent.h.in b/linux/bfin/ioctlent.h.in
new file mode 100644
index 0000000..791d8e3
--- /dev/null
+++ b/linux/bfin/ioctlent.h.in
@@ -0,0 +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/ioctls.h", "FIOQSIZE", 0x545e},
+ {"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},
diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h
new file mode 100644
index 0000000..64db1a9
--- /dev/null
+++ b/linux/bfin/syscallent.h
@@ -0,0 +1,411 @@
+/*
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.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.
+ */
+
+ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "chown" }, /* 16 */
+ { 0, TM, sys_break, "break" }, /* 17 */
+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { 2, 0, sys_stty, "stty" }, /* 31 */
+ { 2, 0, sys_gtty, "gtty" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 0, 0, sys_ftime, "ftime" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 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, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { 0, 0, sys_lock, "lock" }, /* 53 */
+ { 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 */
+ { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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, "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 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 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 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 3, TD, sys_readdir, "readdir" }, /* 89 */
+ { 6, TD|TM, printargs, "old_mmap" }, /* 90: not implemented in kernel */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { 1, 0, sys_olduname, "olduname" }, /* 109 */
+ { 1, 0, sys_iopl, "iopl" }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { 1, 0, sys_vm86old, "vm86old" }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 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, TM, 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, 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" }, /* 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, 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */
+ { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max" }, /* 159 */
+ { 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, TM, sys_mremap, "mremap" }, /* 163 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 164 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 165 */
+ { 5, 0, sys_vm86, "vm86" }, /* 166 */
+ { 5, 0, sys_query_module, "query_module" }, /* 167 */
+ { 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 */
+ { 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, "pread" }, /* 180 */
+ { 5, TD, sys_pwrite, "pwrite" }, /* 181 */
+ { 3, TF, sys_chown, "lchown" }, /* 182 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 183 */
+ { 2, 0, sys_capget, "capget" }, /* 184 */
+ { 2, 0, sys_capset, "capset" }, /* 185 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
+ { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */
+ { 3, TF, sys_truncate64, "truncate64" }, /* 193 */
+ { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+ { 3, TF, sys_chown, "chown32" }, /* 198 */
+ { 0, NF, sys_getuid, "getuid32" }, /* 199 */
+ { 0, NF, sys_getgid, "getgid32" }, /* 200 */
+ { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */
+ { 0, NF, sys_geteuid, "getegid32" }, /* 202 */
+ { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */
+ { 2, 0, sys_setregid, "setregid32" }, /* 204 */
+ { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
+ { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
+ { 3, TD, sys_fchown, "fchown32" }, /* 207 */
+ { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
+ { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
+ { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
+ { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */
+ { 3, TF, sys_chown, "lchown32" }, /* 212 */
+ { 1, 0, sys_setuid, "setuid32" }, /* 213 */
+ { 1, 0, sys_setgid, "setgid32" }, /* 214 */
+ { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
+ { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+ { 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, 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 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 229 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 232 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 235 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */
+ { 2, TS, sys_kill, "tkill" }, /* 238 */
+ { 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 */
+ { 1, 0, sys_set_thread_area, "set_thread_area" }, /* 243 */
+ { 1, 0, sys_get_thread_area, "get_thread_area" }, /* 244 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 245 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 248 */
+ { 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, 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, TM, 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 263 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 264 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 265 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 266 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 267 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 268 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 269 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 270 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 271 */
+ { 2, TF, sys_utimes, "utimes" }, /* 272 */
+ { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 273 */
+ { 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 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 284 */
+ { 5, TP, sys_waitid, "waitid" }, /* 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, 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 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */
+ { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 300 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */
+ { 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, sys_sram_alloc, "sram_alloc" }, /* 311 */
+ { 1, 0, printargs, "sram_free" }, /* 312 */
+ { 3, 0, printargs, "dma_memcpy" }, /* 313 */
+ { 3, TN, sys_accept, "accept" }, /* 314 */
+ { 3, TN, sys_bind, "bind" }, /* 315 */
+ { 3, TN, sys_connect, "connect" }, /* 316 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 317 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 318 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 319 */
+ { 2, TN, sys_listen, "listen" }, /* 320 */
+ { 4, TN, sys_recv, "recv" }, /* 321 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 322 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 323 */
+ { 4, TN, sys_send, "send" }, /* 324 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 325 */
+ { 6, TN, sys_sendto, "sendto" }, /* 326 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 327 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 328 */
+ { 3, TN, sys_socket, "socket" }, /* 329 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 330 */
+ { 4, TI, sys_semctl, "semctl" }, /* 331 */
+ { 4, TI, sys_semget, "semget" }, /* 332 */
+ { 4, TI, sys_semop, "semop" }, /* 333 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 334 */
+ { 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, sys_shmctl, "shmctl" }, /* 339 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 340 */
+ { 4, TI, sys_shmget, "shmget" }, /* 341 */
+ { 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, TD, sys_pread, "pread64" }, /* 351 */
+ { 5, TD, sys_pwrite, "pwrite64" }, /* 352 */
+ { 5, TD, sys_fadvise64, "fadvise64" }, /* 353 */
+ { 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 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 359 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 360 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 361 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 362 */
+ { 3, TD, sys_dup3, "dup3" }, /* 363 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 364 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 365 */
+ { 5, TD, 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, 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 */
diff --git a/linux/dummy.h b/linux/dummy.h
index 9d33fe1..eefe781 100644
--- a/linux/dummy.h
+++ b/linux/dummy.h
@@ -32,23 +32,12 @@
#endif
/* still unfinished */
-#define sys_add_key printargs
-#define sys_fanotify_init printargs
-#define sys_fanotify_mark printargs
-#define sys_finit_module printargs
#define sys_ioperm printargs
#define sys_iopl printargs
-#define sys_ioprio_get printargs
-#define sys_ioprio_set printargs
#define sys_kcmp printargs
-#define sys_kexec_load printargs
-#define sys_keyctl printargs
#define sys_lookup_dcookie printargs
#define sys_name_to_handle_at printargs
#define sys_open_by_handle_at printargs
-#define sys_request_key printargs
-#define sys_sync_file_range printargs
-#define sys_sync_file_range2 printargs
#define sys_sysfs printargs
#define sys_vm86old printargs
#define sys_vm86 printargs
diff --git a/linux/dummy_check.sh b/linux/dummy_check.sh
new file mode 100755
index 0000000..bcce34c
--- /dev/null
+++ b/linux/dummy_check.sh
@@ -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
diff --git a/linux/fanotify.h b/linux/fanotify.h
new file mode 100644
index 0000000..f780e5a
--- /dev/null
+++ b/linux/fanotify.h
@@ -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 */
diff --git a/linux/hppa/errnoent.h b/linux/hppa/errnoent.h
new file mode 100644
index 0000000..2c92633
--- /dev/null
+++ b/linux/hppa/errnoent.h
@@ -0,0 +1,254 @@
+ "ERRNO_0", /* 0 */
+ "EPERM", /* 1 */
+ "ENOENT", /* 2 */
+ "ESRCH", /* 3 */
+ "EINTR", /* 4 */
+ "EIO", /* 5 */
+ "ENXIO", /* 6 */
+ "E2BIG", /* 7 */
+ "ENOEXEC", /* 8 */
+ "EBADF", /* 9 */
+ "ECHILD", /* 10 */
+ "EAGAIN", /* 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 */
+ "ENOMSG", /* 35 */
+ "EIDRM", /* 36 */
+ "ECHRNG", /* 37 */
+ "EL2NSYNC", /* 38 */
+ "EL3HLT", /* 39 */
+ "EL3RST", /* 40 */
+ "ELNRNG", /* 41 */
+ "EUNATCH", /* 42 */
+ "ENOCSI", /* 43 */
+ "EL2HLT", /* 44 */
+ "EDEADLK", /* 45 */
+ "ENOLCK", /* 46 */
+ "EILSEQ", /* 47 */
+ "ERRNO_48", /* 48 */
+ "ERRNO_49", /* 49 */
+ "ENONET", /* 50 */
+ "ENODATA", /* 51 */
+ "ETIME", /* 52 */
+ "ENOSR", /* 53 */
+ "ENOSTR", /* 54 */
+ "ENOPKG", /* 55 */
+ "ERRNO_56", /* 56 */
+ "ENOLINK", /* 57 */
+ "EADV", /* 58 */
+ "ESRMNT", /* 59 */
+ "ECOMM", /* 60 */
+ "EPROTO", /* 61 */
+ "ERRNO_62", /* 62 */
+ "ERRNO_63", /* 63 */
+ "EMULTIHOP", /* 64 */
+ "ERRNO_65", /* 65 */
+ "EDOTDOT", /* 66 */
+ "EBADMSG", /* 67 */
+ "EUSERS", /* 68 */
+ "EDQUOT", /* 69 */
+ "ESTALE", /* 70 */
+ "EREMOTE", /* 71 */
+ "EOVERFLOW", /* 72 */
+ "ERRNO_73", /* 73 */
+ "ERRNO_74", /* 74 */
+ "ERRNO_75", /* 75 */
+ "ERRNO_76", /* 76 */
+ "ERRNO_77", /* 77 */
+ "ERRNO_78", /* 78 */
+ "ERRNO_79", /* 79 */
+ "ERRNO_80", /* 80 */
+ "ERRNO_81", /* 81 */
+ "ERRNO_82", /* 82 */
+ "ERRNO_83", /* 83 */
+ "ERRNO_84", /* 84 */
+ "ERRNO_85", /* 85 */
+ "ERRNO_86", /* 86 */
+ "ERRNO_87", /* 87 */
+ "ERRNO_88", /* 88 */
+ "ERRNO_89", /* 89 */
+ "ERRNO_90", /* 90 */
+ "ERRNO_91", /* 91 */
+ "ERRNO_92", /* 92 */
+ "ERRNO_93", /* 93 */
+ "ERRNO_94", /* 94 */
+ "ERRNO_95", /* 95 */
+ "ERRNO_96", /* 96 */
+ "ERRNO_97", /* 97 */
+ "ERRNO_98", /* 98 */
+ "ERRNO_99", /* 99 */
+ "ERRNO_100", /* 100 */
+ "ERRNO_101", /* 101 */
+ "ERRNO_102", /* 102 */
+ "ERRNO_103", /* 103 */
+ "ERRNO_104", /* 104 */
+ "ERRNO_105", /* 105 */
+ "ERRNO_106", /* 106 */
+ "ERRNO_107", /* 107 */
+ "ERRNO_108", /* 108 */
+ "ERRNO_109", /* 109 */
+ "ERRNO_110", /* 110 */
+ "ERRNO_111", /* 111 */
+ "ERRNO_112", /* 112 */
+ "ERRNO_113", /* 113 */
+ "ERRNO_114", /* 114 */
+ "ERRNO_115", /* 115 */
+ "ERRNO_116", /* 116 */
+ "ERRNO_117", /* 117 */
+ "ERRNO_118", /* 118 */
+ "ERRNO_119", /* 119 */
+ "ERRNO_120", /* 120 */
+ "ERRNO_121", /* 121 */
+ "ERRNO_122", /* 122 */
+ "ERRNO_123", /* 123 */
+ "ERRNO_124", /* 124 */
+ "ERRNO_125", /* 125 */
+ "ERRNO_126", /* 126 */
+ "ERRNO_127", /* 127 */
+ "ERRNO_128", /* 128 */
+ "ERRNO_129", /* 129 */
+ "ERRNO_130", /* 130 */
+ "ERRNO_131", /* 131 */
+ "ERRNO_132", /* 132 */
+ "ERRNO_133", /* 133 */
+ "ERRNO_134", /* 134 */
+ "ERRNO_135", /* 135 */
+ "ERRNO_136", /* 136 */
+ "ERRNO_137", /* 137 */
+ "ERRNO_138", /* 138 */
+ "ERRNO_139", /* 139 */
+ "ERRNO_140", /* 140 */
+ "ERRNO_141", /* 141 */
+ "ERRNO_142", /* 142 */
+ "ERRNO_143", /* 143 */
+ "ERRNO_144", /* 144 */
+ "ERRNO_145", /* 145 */
+ "ERRNO_146", /* 146 */
+ "ERRNO_147", /* 147 */
+ "ERRNO_148", /* 148 */
+ "ERRNO_149", /* 149 */
+ "ERRNO_150", /* 150 */
+ "ERRNO_151", /* 151 */
+ "ERRNO_152", /* 152 */
+ "ERRNO_153", /* 153 */
+ "ERRNO_154", /* 154 */
+ "ERRNO_155", /* 155 */
+ "ERRNO_156", /* 156 */
+ "ERRNO_157", /* 157 */
+ "ERRNO_158", /* 158 */
+ "ERRNO_159", /* 159 */
+ "EBADE", /* 160 */
+ "EBADR", /* 161 */
+ "EXFULL", /* 162 */
+ "ENOANO", /* 163 */
+ "EBADRQC", /* 164 */
+ "EBADSLT", /* 165 */
+ "EBFONT", /* 166 */
+ "ENOTUNIQ", /* 167 */
+ "EBADFD", /* 168 */
+ "EREMCHG", /* 169 */
+ "ELIBACC", /* 170 */
+ "ELIBBAD", /* 171 */
+ "ELIBSCN", /* 172 */
+ "ELIBMAX", /* 173 */
+ "ELIBEXEC", /* 174 */
+ "ERESTART", /* 175 */
+ "ESTRPIPE", /* 176 */
+ "EUCLEAN", /* 177 */
+ "ENOTNAM", /* 178 */
+ "ENAVAIL", /* 179 */
+ "EISNAM", /* 180 */
+ "EREMOTEIO", /* 181 */
+ "ENOMEDIUM", /* 182 */
+ "EMEDIUMTYPE", /* 183 */
+ "ERRNO_184", /* 184 */
+ "ERRNO_185", /* 185 */
+ "ERRNO_186", /* 186 */
+ "ERRNO_187", /* 187 */
+ "ERRNO_188", /* 188 */
+ "ERRNO_189", /* 189 */
+ "ERRNO_190", /* 190 */
+ "ERRNO_191", /* 191 */
+ "ERRNO_192", /* 192 */
+ "ERRNO_193", /* 193 */
+ "ERRNO_194", /* 194 */
+ "ERRNO_195", /* 195 */
+ "ERRNO_196", /* 196 */
+ "ERRNO_197", /* 197 */
+ "ERRNO_198", /* 198 */
+ "ERRNO_199", /* 199 */
+ "ERRNO_200", /* 200 */
+ "ERRNO_201", /* 201 */
+ "ERRNO_202", /* 202 */
+ "ERRNO_203", /* 203 */
+ "ERRNO_204", /* 204 */
+ "ERRNO_205", /* 205 */
+ "ERRNO_206", /* 206 */
+ "ERRNO_207", /* 207 */
+ "ERRNO_208", /* 208 */
+ "ERRNO_209", /* 209 */
+ "ERRNO_210", /* 210 */
+ "ERRNO_211", /* 211 */
+ "ERRNO_212", /* 212 */
+ "ERRNO_213", /* 213 */
+ "ERRNO_214", /* 214 */
+ "ENOSYM", /* 215 */
+ "ENOTSOCK", /* 216 */
+ "EDESTADDRREQ", /* 217 */
+ "EMSGSIZE", /* 218 */
+ "EPROTOTYPE", /* 219 */
+ "ENOPROTOOPT", /* 220 */
+ "EPROTONOSUPPORT", /* 221 */
+ "ESOCKTNOSUPPORT", /* 222 */
+ "EOPNOTSUPP", /* 223 */
+ "EPFNOSUPPORT", /* 224 */
+ "EAFNOSUPPORT", /* 225 */
+ "EADDRINUSE", /* 226 */
+ "EADDRNOTAVAIL", /* 227 */
+ "ENETDOWN", /* 228 */
+ "ENETUNREACH", /* 229 */
+ "ENETRESET", /* 230 */
+ "ECONNABORTED", /* 231 */
+ "ECONNRESET", /* 232 */
+ "ENOBUFS", /* 233 */
+ "EISCONN", /* 234 */
+ "ENOTCONN", /* 235 */
+ "ESHUTDOWN", /* 236 */
+ "ETOOMANYREFS", /* 237 */
+ "ETIMEDOUT", /* 238 */
+ "ECONNREFUSED", /* 239 */
+ "EREMOTERELEASE", /* 240 */
+ "EHOSTDOWN", /* 241 */
+ "EHOSTUNREACH", /* 242 */
+ "ERRNO_243", /* 243 */
+ "EALREADY", /* 244 */
+ "EINPROGRESS", /* 245 */
+ "EWOULDBLOCK", /* 246 */
+ "ENOTEMPTY", /* 247 */
+ "ENAMETOOLONG", /* 248 */
+ "ELOOP", /* 249 */
+ "ERRNO_250", /* 250 */
+ "ENOSYS", /* 251 */
+ "ENOTSUP", /* 252 */
+ "ECANCELLED", /* 253 */
diff --git a/linux/hppa/ioctlent.h.in b/linux/hppa/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/hppa/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/hppa/signalent.h b/linux/hppa/signalent.h
new file mode 100644
index 0000000..92e5565
--- /dev/null
+++ b/linux/hppa/signalent.h
@@ -0,0 +1,38 @@
+ "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 */
+ "SIGUSR1", /* 16 */
+ "SIGUSR2", /* 17 */
+ "SIGCHLD", /* 18 */
+ "SIGPWR", /* 19 */
+ "SIGVTALRM", /* 20 */
+ "SIGPROF", /* 21 */
+ "SIGIO", /* 22 */
+ "SIGWINCH", /* 23 */
+ "SIGSTOP", /* 24 */
+ "SIGTSTP", /* 25 */
+ "SIGCONT", /* 26 */
+ "SIGTTIN", /* 27 */
+ "SIGTTOU", /* 28 */
+ "SIGURG", /* 29 */
+ "SIGLOST", /* 30 */
+ "SIGUNUSED", /* 31 */
+ "SIG_32", /* 32 */
+ "SIGXCPU", /* 33 */
+ "SIGXFSZ", /* 34 */
+ "SIG_35", /* 35 */
+ "SIGSTKFLT", /* 36 */
+ "SIGRTMIN", /* 37 */
diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h
new file mode 100644
index 0000000..21e4ae7
--- /dev/null
+++ b/linux/hppa/syscallent.h
@@ -0,0 +1,338 @@
+/*
+ * Copyright (c) 2001 Hewlett-Packard, Matthew Wilcox
+ */
+
+ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
+ { 1, TP, sys_exit, "exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { 3, TN, sys_socket, "socket" }, /* 17 */
+ { 2, TF, sys_stat, "newstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 3, TN, sys_bind, "bind" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TD, sys_fstat, "newfstat" }, /* 28 */
+ { 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 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 3, TN, sys_accept, "accept" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 1, TD, sys_dup, "dup" }, /* 41 */
+ { 1, TD, sys_pipe, "pipe" }, /* 42 */
+ { 1, 0, sys_times, "times" }, /* 43 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 44 */
+ { 1, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 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, TF, sys_umount2, "umount2" }, /* 52 */
+ { 3, TN, sys_getpeername, "lock" }, /* 53 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 54 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 55 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 56 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 57 */
+ { 4, TN, sys_send, "send" }, /* 58 */
+ { 1, 0, sys_uname, "newuname" }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 2, TD, sys_dup2, "dup2" }, /* 63 */
+ { 0, 0, sys_getppid, "getppid" }, /* 64 */
+ { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
+ { 0, 0, sys_setsid, "setsid" }, /* 66 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 67 */
+ { 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, TM, sys_mincore, "mincore" }, /* 72 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 6, TN, sys_sendto, "sendto" }, /* 82 */
+ { 2, TF, sys_symlink, "symlink" }, /* 83 */
+ { 2, TF, sys_lstat, "newlstat" }, /* 84 */
+ { 3, TF, sys_readlink, "readlink" }, /* 85 */
+ { 1, TF, sys_uselib, "uselib" }, /* 86 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 89 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TN, sys_recv, "recv" }, /* 98 */
+ { 2, TF, sys_statfs, "statfs" }, /* 99 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 2, TF, sys_stat64, "stat64" }, /* 101 */
+ { 5, 0, NULL, NULL }, /* 102 */
+ { 3, 0, sys_syslog, "syslog" }, /* 103 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
+ { 2, 0, sys_capget, "capget" }, /* 106 */
+ { 2, 0, sys_capset, "capset" }, /* 107 */
+ { 5, TD, sys_pread, "pread" }, /* 108 */
+ { 5, TD, sys_pwrite, "pwrite" }, /* 109 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 112 */
+ { 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, 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, TM, 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, TF, sys_quotactl, "quotactl" }, /* 131 */
+ { 1, 0, sys_getpgid, "getpgid" }, /* 132 */
+ { 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, TD, sys_llseek, "_llseek" }, /* 140 */
+ { 3, TD, sys_getdents, "getdents" }, /* 141 */
+ { 5, TD, sys_select, "_newselect" }, /* 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 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 */
+ { 2, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, 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, sys_nfsservctl, "nfsservctl" }, /* 169 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 170 */
+ { 3, 0, sys_setresgid, "getresgid" }, /* 171 */
+ { 5, 0, sys_prctl, "prctl" }, /* 172 */
+ { 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 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 177 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 178 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
+ { 3, TF, sys_chown, "chown" }, /* 180 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 181 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 182 */
+ { 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 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 188 */
+ { 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, sys_shmget, "shmget" }, /* 194 */
+ { 3, TI, sys_shmctl, "shmctl" }, /* 195 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 196 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 197 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 198 */
+ { 3, TF, sys_truncate64, "truncate64" }, /* 199 */
+ { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 200 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 201 */
+ { 3, TD, sys_fcntl, "fcntl64" }, /* 202 */
+ { 5, 0, printargs, "attrctl" }, /* 203 */
+ { 5, 0, printargs, "acl_get" }, /* 204 */
+ { 5, 0, printargs, "acl_set" }, /* 205 */
+ { 0, 0, sys_gettid, "gettid" }, /* 206 */
+ { 4, TD, sys_readahead, "readahead" }, /* 207 */
+ { 2, TS, sys_kill, "tkill" }, /* 208 */
+ { 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 */
+ { 5, 0, printargs, "set_thread_area" }, /* 213 */
+ { 5, 0, printargs, "get_thread_area" }, /* 214 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 215 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 216 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 217 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 218 */
+ { 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, 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, TM, 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 */
+ { 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 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 241 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 242 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 243 */
+ { 5, TF, sys_listxattr, "listxattr" }, /* 244 */
+ { 5, TF, sys_listxattr, "llistxattr" }, /* 245 */
+ { 5, TD, sys_flistxattr, "flistxattr" }, /* 246 */
+ { 5, TF, sys_removexattr, "removexattr" }, /* 247 */
+ { 5, TF, sys_removexattr, "lremovexattr" }, /* 248 */
+ { 5, TD, sys_fremovexattr, "fremovexattr" }, /* 249 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 250 */
+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 251 */
+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 252 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 253 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 254 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 255 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 256 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 257 */
+ { 5, 0, printargs, "clock_nanosleep" }, /* 258 */
+ { 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, 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 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 276 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 277 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 278 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 279 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 280 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 281 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 282 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 283 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 284 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 285 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 286 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 287 */
+ { 1, TP, sys_unshare, "unshare" }, /* 288 */
+ { 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, sys_kexec_load, "kexec_load" }, /* 300 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 301 */
+ { 3, TD, printargs, "signalfd" }, /* 302 */
+ { 4, TD, printargs, "timerfd" }, /* 303 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 304 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 305 */
+ { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 306 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 307 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 308 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 309 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 310 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 311 */
+ { 3, TD, sys_dup3, "dup3" }, /* 312 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 313 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 314 */
+ { 5, TD, 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, 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 */
diff --git a/linux/i386/ioctlent.h.in b/linux/i386/ioctlent.h.in
new file mode 100644
index 0000000..449ad40
--- /dev/null
+++ b/linux/i386/ioctlent.h.in
@@ -0,0 +1,15 @@
+ {"asm/mtrr.h", "MTRRIOC_ADD_ENTRY", 0x4d00},
+ {"asm/mce.h", "MCE_GET_RECORD_LEN", 0x4d01},
+ {"asm/mtrr.h", "MTRRIOC_SET_ENTRY", 0x4d01},
+ {"asm/mce.h", "MCE_GET_LOG_LEN", 0x4d02},
+ {"asm/mtrr.h", "MTRRIOC_DEL_ENTRY", 0x4d02},
+ {"asm/mce.h", "MCE_GETCLEAR_FLAGS", 0x4d03},
+ {"asm/mtrr.h", "MTRRIOC_GET_ENTRY", 0x4d03},
+ {"asm/mtrr.h", "MTRRIOC_KILL_ENTRY", 0x4d04},
+ {"asm/mtrr.h", "MTRRIOC_ADD_PAGE_ENTRY", 0x4d05},
+ {"asm/mtrr.h", "MTRRIOC_SET_PAGE_ENTRY", 0x4d06},
+ {"asm/mtrr.h", "MTRRIOC_DEL_PAGE_ENTRY", 0x4d07},
+ {"asm/mtrr.h", "MTRRIOC_GET_PAGE_ENTRY", 0x4d08},
+ {"asm/mtrr.h", "MTRRIOC_KILL_PAGE_ENTRY", 0x4d09},
+ {"asm/msr.h", "X86_IOC_RDMSR_REGS", 0x63a0},
+ {"asm/msr.h", "X86_IOC_WRMSR_REGS", 0x63a1},
diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h
index 480a28e..1f759e4 100644
--- a/linux/i386/syscallent.h
+++ b/linux/i386/syscallent.h
@@ -367,7 +367,7 @@
{ 5, TD, sys_perf_event_open, "perf_event_open"}, /* 336 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 337 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 338 */
- { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 339 */
+ { 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 */
diff --git a/linux/ia64/ioctlent.h.in b/linux/ia64/ioctlent.h.in
new file mode 100644
index 0000000..970ba55
--- /dev/null
+++ b/linux/ia64/ioctlent.h.in
@@ -0,0 +1,66 @@
+ {"asm/ioctls.h", "TCGETS", 0x5401},
+ {"asm/ioctls.h", "TCSETS", 0x5402},
+ {"asm/ioctls.h", "TCSETSW", 0x5403},
+ {"asm/ioctls.h", "TCSETSF", 0x5404},
+ {"asm/ioctls.h", "TCGETA", 0x5405},
+ {"asm/ioctls.h", "TCSETA", 0x5406},
+ {"asm/ioctls.h", "TCSETAW", 0x5407},
+ {"asm/ioctls.h", "TCSETAF", 0x5408},
+ {"asm/ioctls.h", "TCSBRK", 0x5409},
+ {"asm/ioctls.h", "TCXONC", 0x540a},
+ {"asm/ioctls.h", "TCFLSH", 0x540b},
+ {"asm/ioctls.h", "TIOCEXCL", 0x540c},
+ {"asm/ioctls.h", "TIOCNXCL", 0x540d},
+ {"asm/ioctls.h", "TIOCSCTTY", 0x540e},
+ {"asm/ioctls.h", "TIOCGPGRP", 0x540f},
+ {"asm/ioctls.h", "TIOCSPGRP", 0x5410},
+ {"asm/ioctls.h", "TIOCOUTQ", 0x5411},
+ {"asm/ioctls.h", "TIOCSTI", 0x5412},
+ {"asm/ioctls.h", "TIOCGWINSZ", 0x5413},
+ {"asm/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/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/ioctls.h", "FIONBIO", 0x5421},
+ {"asm/ioctls.h", "TIOCNOTTY", 0x5422},
+ {"asm/ioctls.h", "TIOCSETD", 0x5423},
+ {"asm/ioctls.h", "TIOCGETD", 0x5424},
+ {"asm/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
+ {"asm/ioctls.h", "TIOCSBRK", 0x5427},
+ {"asm/ioctls.h", "TIOCCBRK", 0x5428},
+ {"asm/ioctls.h", "TIOCGSID", 0x5429},
+ {"asm/ioctls.h", "TIOCGPTN", 0x5430},
+ {"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
+ {"asm/ioctls.h", "FIONCLEX", 0x5450},
+ {"asm/ioctls.h", "FIOCLEX", 0x5451},
+ {"asm/ioctls.h", "FIOASYNC", 0x5452},
+ {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e},
+ {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f},
+ {"asm/ioctls.h", "FIOQSIZE", 0x5460},
+ {"asm/sockios.h", "FIOSETOWN", 0x8901},
+ {"asm/sockios.h", "SIOCSPGRP", 0x8902},
+ {"asm/sockios.h", "FIOGETOWN", 0x8903},
+ {"asm/sockios.h", "SIOCGPGRP", 0x8904},
+ {"asm/sockios.h", "SIOCATMARK", 0x8905},
+ {"asm/sockios.h", "SIOCGSTAMP", 0x8906},
diff --git a/linux/ia64/signalent.h b/linux/ia64/signalent.h
new file mode 100644
index 0000000..e791a64
--- /dev/null
+++ b/linux/ia64/signalent.h
@@ -0,0 +1,64 @@
+ "SIG_0", /* 0 */
+ "SIGHUP", /* 1 */
+ "SIGINT", /* 2 */
+ "SIGQUIT", /* 3 */
+ "SIGILL", /* 4 */
+ "SIGTRAP", /* 5 */
+ "SIGABRT", /* 6 */
+ "SIGBUS", /* 7 */
+ "SIGFPE", /* 8 */
+ "SIGKILL", /* 9 */
+ "SIGUSR1", /* 10 */
+ "SIGSEGV", /* 11 */
+ "SIGUSR2", /* 12 */
+ "SIGPIPE", /* 13 */
+ "SIGALRM", /* 14 */
+ "SIGTERM", /* 15 */
+ "SIGSTKFLT", /* 16 */
+ "SIGCHLD", /* 17 */
+ "SIGCONT", /* 18 */
+ "SIGSTOP", /* 19 */
+ "SIGTSTP", /* 20 */
+ "SIGTTIN", /* 21 */
+ "SIGTTOU", /* 22 */
+ "SIGURG", /* 23 */
+ "SIGXCPU", /* 24 */
+ "SIGXFSZ", /* 25 */
+ "SIGVTALRM", /* 26 */
+ "SIGPROF", /* 27 */
+ "SIGWINCH", /* 28 */
+ "SIGIO", /* 29 */
+ "SIGPWR", /* 30 */
+ "SIGSYS", /* 31 */
+ "SIGRT0", /* 32 */
+ "SIGRT1", /* 33 */
+ "SIGRT2", /* 34 */
+ "SIGRT3", /* 35 */
+ "SIGRT4", /* 36 */
+ "SIGRT5", /* 37 */
+ "SIGRT6", /* 38 */
+ "SIGRT7", /* 39 */
+ "SIGRT8", /* 40 */
+ "SIGRT9", /* 41 */
+ "SIGRT10", /* 42 */
+ "SIGRT11", /* 43 */
+ "SIGRT12", /* 44 */
+ "SIGRT13", /* 45 */
+ "SIGRT14", /* 46 */
+ "SIGRT15", /* 47 */
+ "SIGRT16", /* 48 */
+ "SIGRT17", /* 49 */
+ "SIGRT18", /* 50 */
+ "SIGRT19", /* 51 */
+ "SIGRT20", /* 52 */
+ "SIGRT21", /* 53 */
+ "SIGRT22", /* 54 */
+ "SIGRT23", /* 55 */
+ "SIGRT24", /* 56 */
+ "SIGRT25", /* 57 */
+ "SIGRT26", /* 58 */
+ "SIGRT27", /* 59 */
+ "SIGRT28", /* 60 */
+ "SIGRT29", /* 61 */
+ "SIGRT30", /* 62 */
+ "SIGRT31", /* 63 */
diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h
new file mode 100644
index 0000000..0242280
--- /dev/null
+++ b/linux/ia64/syscallent.h
@@ -0,0 +1,1120 @@
+/*
+ * Copyright (c) 1999, 2001 Hewlett-Packard Co
+ * David Mosberger-Tang <davidm@hpl.hp.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.
+ */
+
+/*
+ * IA-32 syscalls that have pointer arguments which are incompatible
+ * with 64-bit layout get redirected to printargs.
+ */
+#define sys_getrlimit printargs
+#define sys_afs_syscall printargs
+#define sys_getpmsg printargs
+#define sys_putpmsg printargs
+#define sys_ugetrlimit printargs
+#define sys_waitpid printargs
+#define sys_time printargs
+#define sys_break printargs
+#define sys_oldstat printargs
+#define sys_lseek printargs
+#define sys_stime printargs
+#define sys_ptrace printargs
+#define sys_oldfstat printargs
+#define sys_pause printargs
+#define sys_utime printargs
+#define sys_stty printargs
+#define sys_gtty printargs
+#define sys_ftime printargs
+#define sys_pipe printargs
+#define sys_times printargs
+#define sys_prof printargs
+#define sys_signal printargs
+#define sys_lock printargs
+#define sys_ioctl printargs
+#define sys_fcntl printargs
+#define sys_mpx printargs
+#define sys_ulimit printargs
+#define sys_oldolduname printargs
+#define sys_sigaction printargs
+#define sys_siggetmask printargs
+#define sys_sigsetmask printargs
+#define sys_sigsuspend printargs
+#define sys_sigpending printargs
+#define sys_setrlimit printargs
+#define sys_getrusage printargs
+#define sys_gettimeofday printargs
+#define sys_settimeofday printargs
+#define sys_getgroups printargs
+#define sys_setgroups printargs
+#define sys_select printargs
+#undef sys_oldlstat
+#define sys_oldlstat printargs
+#define sys_readdir printargs
+#define sys_profil printargs
+#define sys_statfs printargs
+#define sys_fstatfs printargs
+#define sys_ioperm printargs
+#define sys_setitimer printargs
+#define sys_getitimer printargs
+#define sys_stat printargs
+#undef sys_lstat
+#define sys_lstat printargs
+#define sys_fstat printargs
+#define sys_olduname printargs
+#define sys_iopl printargs
+#define sys_idle printargs
+#define sys_vm86old printargs
+#define sys_wait4 printargs
+#define sys_sysinfo printargs
+#define sys_sigreturn printargs
+#define sys_uname printargs
+#define sys_modify_ldt printargs
+#define sys_adjtimex printargs
+#define sys_sigprocmask printargs
+#define sys_create_module printargs
+#define sys_init_module printargs
+#define sys_get_kernel_syms printargs
+#define sys_quotactl printargs
+#define sys_bdflush printargs
+#define sys_personality printargs
+#define sys_getdents printargs
+#define sys__newselect printargs
+#define sys_msync printargs
+#define sys_readv printargs
+#define sys_writev printargs
+#define sys__sysctl printargs
+#define sys_sched_rr_get_interval printargs
+#define sys_getresuid printargs
+#define sys_vm86 printargs
+#define sys_query_module printargs
+#define sys_nfsservctl printargs
+#define sys_rt_sigreturn printargs
+#define sys_rt_sigaction printargs
+#define sys_rt_sigprocmask printargs
+#define sys_rt_sigtimedwait printargs
+#define sys_rt_sigqueueinfo printargs
+#define sys_rt_sigsuspend printargs
+#define sys_pread printargs
+#define sys_pwrite printargs
+#define sys_sigaltstack printargs
+#define sys_sendfile printargs
+#define sys_truncate64 printargs
+#define sys_ftruncate64 printargs
+#define sys_stat64 printargs
+#undef sys_lstat64
+#define sys_lstat64 printargs
+#define sys_fstat64 printargs
+#define sys_fcntl64 printargs
+
+#include "../i386/syscallent.h"
+
+#undef sys_getrlimit
+#undef sys_afs_syscall
+#undef sys_getpmsg
+#undef sys_putpmsg
+#undef sys_ugetrlimit
+#undef sys_waitpid
+#undef sys_time
+#undef sys_break
+#undef sys_oldstat
+#undef sys_lseek
+#undef sys_stime
+#undef sys_ptrace
+#undef sys_oldfstat
+#undef sys_pause
+#undef sys_utime
+#undef sys_stty
+#undef sys_gtty
+#undef sys_ftime
+#undef sys_pipe
+#undef sys_times
+#undef sys_prof
+#undef sys_signal
+#undef sys_lock
+#undef sys_ioctl
+#undef sys_fcntl
+#undef sys_mpx
+#undef sys_ulimit
+#undef sys_oldolduname
+#undef sys_sigaction
+#undef sys_siggetmask
+#undef sys_sigsetmask
+#undef sys_sigsuspend
+#undef sys_sigpending
+#undef sys_setrlimit
+#undef sys_getrusage
+#undef sys_gettimeofday
+#undef sys_settimeofday
+#undef sys_getgroups
+#undef sys_setgroups
+#undef sys_select
+#undef sys_oldlstat
+#undef sys_readdir
+#undef sys_profil
+#undef sys_statfs
+#undef sys_fstatfs
+#undef sys_ioperm
+#undef sys_setitimer
+#undef sys_getitimer
+#undef sys_stat
+#undef sys_lstat
+#undef sys_fstat
+#undef sys_olduname
+#undef sys_iopl
+#undef sys_idle
+#undef sys_vm86old
+#undef sys_wait4
+#undef sys_sysinfo
+#undef sys_sigreturn
+#undef sys_uname
+#undef sys_modify_ldt
+#undef sys_adjtimex
+#undef sys_sigprocmask
+#undef sys_create_module
+#undef sys_init_module
+#undef sys_get_kernel_syms
+#undef sys_quotactl
+#undef sys_bdflush
+#undef sys_personality
+#undef sys_getdents
+#undef sys__newselect
+#undef sys_msync
+#undef sys_readv
+#undef sys_writev
+#undef sys__sysctl
+#undef sys_sched_rr_get_interval
+#undef sys_getresuid
+#undef sys_vm86
+#undef sys_query_module
+#undef sys_nfsservctl
+#undef sys_rt_sigreturn
+#undef sys_rt_sigaction
+#undef sys_rt_sigprocmask
+#undef sys_rt_sigtimedwait
+#undef sys_rt_sigqueueinfo
+#undef sys_rt_sigsuspend
+#undef sys_pread
+#undef sys_pwrite
+#undef sys_sigaltstack
+#undef sys_sendfile
+#undef sys_truncate64
+#undef sys_ftruncate64
+#undef sys_stat64
+#undef sys_lstat64
+#undef sys_fstat64
+#undef sys_fcntl64
+
+#include "../dummy.h"
+
+/* You must be careful to check ../i386/syscallent.h so that this table
+ starts where that one leaves off.
+*/
+#if SYS_ipc_subcall + SYS_ipc_nsubcalls != 445
+# error fix me
+#endif
+
+ { MA, 0, NULL, NULL }, /* 445 */
+ { MA, 0, NULL, NULL }, /* 446 */
+ { MA, 0, NULL, NULL }, /* 447 */
+ { MA, 0, NULL, NULL }, /* 448 */
+ { MA, 0, NULL, NULL }, /* 449 */
+ { MA, 0, NULL, NULL }, /* 450 */
+ { MA, 0, NULL, NULL }, /* 451 */
+ { MA, 0, NULL, NULL }, /* 452 */
+ { MA, 0, NULL, NULL }, /* 453 */
+ { MA, 0, NULL, NULL }, /* 454 */
+ { MA, 0, NULL, NULL }, /* 455 */
+ { MA, 0, NULL, NULL }, /* 456 */
+ { MA, 0, NULL, NULL }, /* 457 */
+ { MA, 0, NULL, NULL }, /* 458 */
+ { MA, 0, NULL, NULL }, /* 459 */
+ { MA, 0, NULL, NULL }, /* 460 */
+ { MA, 0, NULL, NULL }, /* 461 */
+ { MA, 0, NULL, NULL }, /* 462 */
+ { MA, 0, NULL, NULL }, /* 463 */
+ { MA, 0, NULL, NULL }, /* 464 */
+ { MA, 0, NULL, NULL }, /* 465 */
+ { MA, 0, NULL, NULL }, /* 466 */
+ { MA, 0, NULL, NULL }, /* 467 */
+ { MA, 0, NULL, NULL }, /* 468 */
+ { MA, 0, NULL, NULL }, /* 469 */
+ { MA, 0, NULL, NULL }, /* 470 */
+ { MA, 0, NULL, NULL }, /* 471 */
+ { MA, 0, NULL, NULL }, /* 472 */
+ { MA, 0, NULL, NULL }, /* 473 */
+ { MA, 0, NULL, NULL }, /* 474 */
+ { MA, 0, NULL, NULL }, /* 475 */
+ { MA, 0, NULL, NULL }, /* 476 */
+ { MA, 0, NULL, NULL }, /* 477 */
+ { MA, 0, NULL, NULL }, /* 478 */
+ { MA, 0, NULL, NULL }, /* 479 */
+ { MA, 0, NULL, NULL }, /* 480 */
+ { MA, 0, NULL, NULL }, /* 481 */
+ { MA, 0, NULL, NULL }, /* 482 */
+ { MA, 0, NULL, NULL }, /* 483 */
+ { MA, 0, NULL, NULL }, /* 484 */
+ { MA, 0, NULL, NULL }, /* 485 */
+ { MA, 0, NULL, NULL }, /* 486 */
+ { MA, 0, NULL, NULL }, /* 487 */
+ { MA, 0, NULL, NULL }, /* 488 */
+ { MA, 0, NULL, NULL }, /* 489 */
+ { MA, 0, NULL, NULL }, /* 490 */
+ { MA, 0, NULL, NULL }, /* 491 */
+ { MA, 0, NULL, NULL }, /* 492 */
+ { MA, 0, NULL, NULL }, /* 493 */
+ { MA, 0, NULL, NULL }, /* 494 */
+ { MA, 0, NULL, NULL }, /* 495 */
+ { MA, 0, NULL, NULL }, /* 496 */
+ { MA, 0, NULL, NULL }, /* 497 */
+ { MA, 0, NULL, NULL }, /* 498 */
+ { MA, 0, NULL, NULL }, /* 499 */
+ { MA, 0, NULL, NULL }, /* 500 */
+ { MA, 0, NULL, NULL }, /* 501 */
+ { MA, 0, NULL, NULL }, /* 502 */
+ { MA, 0, NULL, NULL }, /* 503 */
+ { MA, 0, NULL, NULL }, /* 504 */
+ { MA, 0, NULL, NULL }, /* 505 */
+ { MA, 0, NULL, NULL }, /* 506 */
+ { MA, 0, NULL, NULL }, /* 507 */
+ { MA, 0, NULL, NULL }, /* 508 */
+ { MA, 0, NULL, NULL }, /* 509 */
+ { MA, 0, NULL, NULL }, /* 510 */
+ { MA, 0, NULL, NULL }, /* 511 */
+ { MA, 0, NULL, NULL }, /* 512 */
+ { MA, 0, NULL, NULL }, /* 513 */
+ { MA, 0, NULL, NULL }, /* 514 */
+ { MA, 0, NULL, NULL }, /* 515 */
+ { MA, 0, NULL, NULL }, /* 516 */
+ { MA, 0, NULL, NULL }, /* 517 */
+ { MA, 0, NULL, NULL }, /* 518 */
+ { MA, 0, NULL, NULL }, /* 519 */
+ { MA, 0, NULL, NULL }, /* 520 */
+ { MA, 0, NULL, NULL }, /* 521 */
+ { MA, 0, NULL, NULL }, /* 522 */
+ { MA, 0, NULL, NULL }, /* 523 */
+ { MA, 0, NULL, NULL }, /* 524 */
+ { MA, 0, NULL, NULL }, /* 525 */
+ { MA, 0, NULL, NULL }, /* 526 */
+ { MA, 0, NULL, NULL }, /* 527 */
+ { MA, 0, NULL, NULL }, /* 528 */
+ { MA, 0, NULL, NULL }, /* 529 */
+ { MA, 0, NULL, NULL }, /* 530 */
+ { MA, 0, NULL, NULL }, /* 531 */
+ { MA, 0, NULL, NULL }, /* 532 */
+ { MA, 0, NULL, NULL }, /* 533 */
+ { MA, 0, NULL, NULL }, /* 534 */
+ { MA, 0, NULL, NULL }, /* 535 */
+ { MA, 0, NULL, NULL }, /* 536 */
+ { MA, 0, NULL, NULL }, /* 537 */
+ { MA, 0, NULL, NULL }, /* 538 */
+ { MA, 0, NULL, NULL }, /* 539 */
+ { MA, 0, NULL, NULL }, /* 540 */
+ { MA, 0, NULL, NULL }, /* 541 */
+ { MA, 0, NULL, NULL }, /* 542 */
+ { MA, 0, NULL, NULL }, /* 543 */
+ { MA, 0, NULL, NULL }, /* 544 */
+ { MA, 0, NULL, NULL }, /* 545 */
+ { MA, 0, NULL, NULL }, /* 546 */
+ { MA, 0, NULL, NULL }, /* 547 */
+ { MA, 0, NULL, NULL }, /* 548 */
+ { MA, 0, NULL, NULL }, /* 549 */
+ { MA, 0, NULL, NULL }, /* 550 */
+ { MA, 0, NULL, NULL }, /* 551 */
+ { MA, 0, NULL, NULL }, /* 552 */
+ { MA, 0, NULL, NULL }, /* 553 */
+ { MA, 0, NULL, NULL }, /* 554 */
+ { MA, 0, NULL, NULL }, /* 555 */
+ { MA, 0, NULL, NULL }, /* 556 */
+ { MA, 0, NULL, NULL }, /* 557 */
+ { MA, 0, NULL, NULL }, /* 558 */
+ { MA, 0, NULL, NULL }, /* 559 */
+ { MA, 0, NULL, NULL }, /* 560 */
+ { MA, 0, NULL, NULL }, /* 561 */
+ { MA, 0, NULL, NULL }, /* 562 */
+ { MA, 0, NULL, NULL }, /* 563 */
+ { MA, 0, NULL, NULL }, /* 564 */
+ { MA, 0, NULL, NULL }, /* 565 */
+ { MA, 0, NULL, NULL }, /* 566 */
+ { MA, 0, NULL, NULL }, /* 567 */
+ { MA, 0, NULL, NULL }, /* 568 */
+ { MA, 0, NULL, NULL }, /* 569 */
+ { MA, 0, NULL, NULL }, /* 570 */
+ { MA, 0, NULL, NULL }, /* 571 */
+ { MA, 0, NULL, NULL }, /* 572 */
+ { MA, 0, NULL, NULL }, /* 573 */
+ { MA, 0, NULL, NULL }, /* 574 */
+ { MA, 0, NULL, NULL }, /* 575 */
+ { MA, 0, NULL, NULL }, /* 576 */
+ { MA, 0, NULL, NULL }, /* 577 */
+ { MA, 0, NULL, NULL }, /* 578 */
+ { MA, 0, NULL, NULL }, /* 579 */
+ { MA, 0, NULL, NULL }, /* 580 */
+ { MA, 0, NULL, NULL }, /* 581 */
+ { MA, 0, NULL, NULL }, /* 582 */
+ { MA, 0, NULL, NULL }, /* 583 */
+ { MA, 0, NULL, NULL }, /* 584 */
+ { MA, 0, NULL, NULL }, /* 585 */
+ { MA, 0, NULL, NULL }, /* 586 */
+ { MA, 0, NULL, NULL }, /* 587 */
+ { MA, 0, NULL, NULL }, /* 588 */
+ { MA, 0, NULL, NULL }, /* 589 */
+ { MA, 0, NULL, NULL }, /* 590 */
+ { MA, 0, NULL, NULL }, /* 591 */
+ { MA, 0, NULL, NULL }, /* 592 */
+ { MA, 0, NULL, NULL }, /* 593 */
+ { MA, 0, NULL, NULL }, /* 594 */
+ { MA, 0, NULL, NULL }, /* 595 */
+ { MA, 0, NULL, NULL }, /* 596 */
+ { MA, 0, NULL, NULL }, /* 597 */
+ { MA, 0, NULL, NULL }, /* 598 */
+ { MA, 0, NULL, NULL }, /* 599 */
+ { MA, 0, NULL, NULL }, /* 600 */
+ { MA, 0, NULL, NULL }, /* 601 */
+ { MA, 0, NULL, NULL }, /* 602 */
+ { MA, 0, NULL, NULL }, /* 603 */
+ { MA, 0, NULL, NULL }, /* 604 */
+ { MA, 0, NULL, NULL }, /* 605 */
+ { MA, 0, NULL, NULL }, /* 606 */
+ { MA, 0, NULL, NULL }, /* 607 */
+ { MA, 0, NULL, NULL }, /* 608 */
+ { MA, 0, NULL, NULL }, /* 609 */
+ { MA, 0, NULL, NULL }, /* 610 */
+ { MA, 0, NULL, NULL }, /* 611 */
+ { MA, 0, NULL, NULL }, /* 612 */
+ { MA, 0, NULL, NULL }, /* 613 */
+ { MA, 0, NULL, NULL }, /* 614 */
+ { MA, 0, NULL, NULL }, /* 615 */
+ { MA, 0, NULL, NULL }, /* 616 */
+ { MA, 0, NULL, NULL }, /* 617 */
+ { MA, 0, NULL, NULL }, /* 618 */
+ { MA, 0, NULL, NULL }, /* 619 */
+ { MA, 0, NULL, NULL }, /* 620 */
+ { MA, 0, NULL, NULL }, /* 621 */
+ { MA, 0, NULL, NULL }, /* 622 */
+ { MA, 0, NULL, NULL }, /* 623 */
+ { MA, 0, NULL, NULL }, /* 624 */
+ { MA, 0, NULL, NULL }, /* 625 */
+ { MA, 0, NULL, NULL }, /* 626 */
+ { MA, 0, NULL, NULL }, /* 627 */
+ { MA, 0, NULL, NULL }, /* 628 */
+ { MA, 0, NULL, NULL }, /* 629 */
+ { MA, 0, NULL, NULL }, /* 630 */
+ { MA, 0, NULL, NULL }, /* 631 */
+ { MA, 0, NULL, NULL }, /* 632 */
+ { MA, 0, NULL, NULL }, /* 633 */
+ { MA, 0, NULL, NULL }, /* 634 */
+ { MA, 0, NULL, NULL }, /* 635 */
+ { MA, 0, NULL, NULL }, /* 636 */
+ { MA, 0, NULL, NULL }, /* 637 */
+ { MA, 0, NULL, NULL }, /* 638 */
+ { MA, 0, NULL, NULL }, /* 639 */
+ { MA, 0, NULL, NULL }, /* 640 */
+ { MA, 0, NULL, NULL }, /* 641 */
+ { MA, 0, NULL, NULL }, /* 642 */
+ { MA, 0, NULL, NULL }, /* 643 */
+ { MA, 0, NULL, NULL }, /* 644 */
+ { MA, 0, NULL, NULL }, /* 645 */
+ { MA, 0, NULL, NULL }, /* 646 */
+ { MA, 0, NULL, NULL }, /* 647 */
+ { MA, 0, NULL, NULL }, /* 648 */
+ { MA, 0, NULL, NULL }, /* 649 */
+ { MA, 0, NULL, NULL }, /* 650 */
+ { MA, 0, NULL, NULL }, /* 651 */
+ { MA, 0, NULL, NULL }, /* 652 */
+ { MA, 0, NULL, NULL }, /* 653 */
+ { MA, 0, NULL, NULL }, /* 654 */
+ { MA, 0, NULL, NULL }, /* 655 */
+ { MA, 0, NULL, NULL }, /* 656 */
+ { MA, 0, NULL, NULL }, /* 657 */
+ { MA, 0, NULL, NULL }, /* 658 */
+ { MA, 0, NULL, NULL }, /* 659 */
+ { MA, 0, NULL, NULL }, /* 660 */
+ { MA, 0, NULL, NULL }, /* 661 */
+ { MA, 0, NULL, NULL }, /* 662 */
+ { MA, 0, NULL, NULL }, /* 663 */
+ { MA, 0, NULL, NULL }, /* 664 */
+ { MA, 0, NULL, NULL }, /* 665 */
+ { MA, 0, NULL, NULL }, /* 666 */
+ { MA, 0, NULL, NULL }, /* 667 */
+ { MA, 0, NULL, NULL }, /* 668 */
+ { MA, 0, NULL, NULL }, /* 669 */
+ { MA, 0, NULL, NULL }, /* 670 */
+ { MA, 0, NULL, NULL }, /* 671 */
+ { MA, 0, NULL, NULL }, /* 672 */
+ { MA, 0, NULL, NULL }, /* 673 */
+ { MA, 0, NULL, NULL }, /* 674 */
+ { MA, 0, NULL, NULL }, /* 675 */
+ { MA, 0, NULL, NULL }, /* 676 */
+ { MA, 0, NULL, NULL }, /* 677 */
+ { MA, 0, NULL, NULL }, /* 678 */
+ { MA, 0, NULL, NULL }, /* 679 */
+ { MA, 0, NULL, NULL }, /* 680 */
+ { MA, 0, NULL, NULL }, /* 681 */
+ { MA, 0, NULL, NULL }, /* 682 */
+ { MA, 0, NULL, NULL }, /* 683 */
+ { MA, 0, NULL, NULL }, /* 684 */
+ { MA, 0, NULL, NULL }, /* 685 */
+ { MA, 0, NULL, NULL }, /* 686 */
+ { MA, 0, NULL, NULL }, /* 687 */
+ { MA, 0, NULL, NULL }, /* 688 */
+ { MA, 0, NULL, NULL }, /* 689 */
+ { MA, 0, NULL, NULL }, /* 690 */
+ { MA, 0, NULL, NULL }, /* 691 */
+ { MA, 0, NULL, NULL }, /* 692 */
+ { MA, 0, NULL, NULL }, /* 693 */
+ { MA, 0, NULL, NULL }, /* 694 */
+ { MA, 0, NULL, NULL }, /* 695 */
+ { MA, 0, NULL, NULL }, /* 696 */
+ { MA, 0, NULL, NULL }, /* 697 */
+ { MA, 0, NULL, NULL }, /* 698 */
+ { MA, 0, NULL, NULL }, /* 699 */
+ { MA, 0, NULL, NULL }, /* 700 */
+ { MA, 0, NULL, NULL }, /* 701 */
+ { MA, 0, NULL, NULL }, /* 702 */
+ { MA, 0, NULL, NULL }, /* 703 */
+ { MA, 0, NULL, NULL }, /* 704 */
+ { MA, 0, NULL, NULL }, /* 705 */
+ { MA, 0, NULL, NULL }, /* 706 */
+ { MA, 0, NULL, NULL }, /* 707 */
+ { MA, 0, NULL, NULL }, /* 708 */
+ { MA, 0, NULL, NULL }, /* 709 */
+ { MA, 0, NULL, NULL }, /* 710 */
+ { MA, 0, NULL, NULL }, /* 711 */
+ { MA, 0, NULL, NULL }, /* 712 */
+ { MA, 0, NULL, NULL }, /* 713 */
+ { MA, 0, NULL, NULL }, /* 714 */
+ { MA, 0, NULL, NULL }, /* 715 */
+ { MA, 0, NULL, NULL }, /* 716 */
+ { MA, 0, NULL, NULL }, /* 717 */
+ { MA, 0, NULL, NULL }, /* 718 */
+ { MA, 0, NULL, NULL }, /* 719 */
+ { MA, 0, NULL, NULL }, /* 720 */
+ { MA, 0, NULL, NULL }, /* 721 */
+ { MA, 0, NULL, NULL }, /* 722 */
+ { MA, 0, NULL, NULL }, /* 723 */
+ { MA, 0, NULL, NULL }, /* 724 */
+ { MA, 0, NULL, NULL }, /* 725 */
+ { MA, 0, NULL, NULL }, /* 726 */
+ { MA, 0, NULL, NULL }, /* 727 */
+ { MA, 0, NULL, NULL }, /* 728 */
+ { MA, 0, NULL, NULL }, /* 729 */
+ { MA, 0, NULL, NULL }, /* 730 */
+ { MA, 0, NULL, NULL }, /* 731 */
+ { MA, 0, NULL, NULL }, /* 732 */
+ { MA, 0, NULL, NULL }, /* 733 */
+ { MA, 0, NULL, NULL }, /* 734 */
+ { MA, 0, NULL, NULL }, /* 735 */
+ { MA, 0, NULL, NULL }, /* 736 */
+ { MA, 0, NULL, NULL }, /* 737 */
+ { MA, 0, NULL, NULL }, /* 738 */
+ { MA, 0, NULL, NULL }, /* 739 */
+ { MA, 0, NULL, NULL }, /* 740 */
+ { MA, 0, NULL, NULL }, /* 741 */
+ { MA, 0, NULL, NULL }, /* 742 */
+ { MA, 0, NULL, NULL }, /* 743 */
+ { MA, 0, NULL, NULL }, /* 744 */
+ { MA, 0, NULL, NULL }, /* 745 */
+ { MA, 0, NULL, NULL }, /* 746 */
+ { MA, 0, NULL, NULL }, /* 747 */
+ { MA, 0, NULL, NULL }, /* 748 */
+ { MA, 0, NULL, NULL }, /* 749 */
+ { MA, 0, NULL, NULL }, /* 750 */
+ { MA, 0, NULL, NULL }, /* 751 */
+ { MA, 0, NULL, NULL }, /* 752 */
+ { MA, 0, NULL, NULL }, /* 753 */
+ { MA, 0, NULL, NULL }, /* 754 */
+ { MA, 0, NULL, NULL }, /* 755 */
+ { MA, 0, NULL, NULL }, /* 756 */
+ { MA, 0, NULL, NULL }, /* 757 */
+ { MA, 0, NULL, NULL }, /* 758 */
+ { MA, 0, NULL, NULL }, /* 759 */
+ { MA, 0, NULL, NULL }, /* 760 */
+ { MA, 0, NULL, NULL }, /* 761 */
+ { MA, 0, NULL, NULL }, /* 762 */
+ { MA, 0, NULL, NULL }, /* 763 */
+ { MA, 0, NULL, NULL }, /* 764 */
+ { MA, 0, NULL, NULL }, /* 765 */
+ { MA, 0, NULL, NULL }, /* 766 */
+ { MA, 0, NULL, NULL }, /* 767 */
+ { MA, 0, NULL, NULL }, /* 768 */
+ { MA, 0, NULL, NULL }, /* 769 */
+ { MA, 0, NULL, NULL }, /* 770 */
+ { MA, 0, NULL, NULL }, /* 771 */
+ { MA, 0, NULL, NULL }, /* 772 */
+ { MA, 0, NULL, NULL }, /* 773 */
+ { MA, 0, NULL, NULL }, /* 774 */
+ { MA, 0, NULL, NULL }, /* 775 */
+ { MA, 0, NULL, NULL }, /* 776 */
+ { MA, 0, NULL, NULL }, /* 777 */
+ { MA, 0, NULL, NULL }, /* 778 */
+ { MA, 0, NULL, NULL }, /* 779 */
+ { MA, 0, NULL, NULL }, /* 780 */
+ { MA, 0, NULL, NULL }, /* 781 */
+ { MA, 0, NULL, NULL }, /* 782 */
+ { MA, 0, NULL, NULL }, /* 783 */
+ { MA, 0, NULL, NULL }, /* 784 */
+ { MA, 0, NULL, NULL }, /* 785 */
+ { MA, 0, NULL, NULL }, /* 786 */
+ { MA, 0, NULL, NULL }, /* 787 */
+ { MA, 0, NULL, NULL }, /* 788 */
+ { MA, 0, NULL, NULL }, /* 789 */
+ { MA, 0, NULL, NULL }, /* 790 */
+ { MA, 0, NULL, NULL }, /* 791 */
+ { MA, 0, NULL, NULL }, /* 792 */
+ { MA, 0, NULL, NULL }, /* 793 */
+ { MA, 0, NULL, NULL }, /* 794 */
+ { MA, 0, NULL, NULL }, /* 795 */
+ { MA, 0, NULL, NULL }, /* 796 */
+ { MA, 0, NULL, NULL }, /* 797 */
+ { MA, 0, NULL, NULL }, /* 798 */
+ { MA, 0, NULL, NULL }, /* 799 */
+ { MA, 0, NULL, NULL }, /* 800 */
+ { MA, 0, NULL, NULL }, /* 801 */
+ { MA, 0, NULL, NULL }, /* 802 */
+ { MA, 0, NULL, NULL }, /* 803 */
+ { MA, 0, NULL, NULL }, /* 804 */
+ { MA, 0, NULL, NULL }, /* 805 */
+ { MA, 0, NULL, NULL }, /* 806 */
+ { MA, 0, NULL, NULL }, /* 807 */
+ { MA, 0, NULL, NULL }, /* 808 */
+ { MA, 0, NULL, NULL }, /* 809 */
+ { MA, 0, NULL, NULL }, /* 810 */
+ { MA, 0, NULL, NULL }, /* 811 */
+ { MA, 0, NULL, NULL }, /* 812 */
+ { MA, 0, NULL, NULL }, /* 813 */
+ { MA, 0, NULL, NULL }, /* 814 */
+ { MA, 0, NULL, NULL }, /* 815 */
+ { MA, 0, NULL, NULL }, /* 816 */
+ { MA, 0, NULL, NULL }, /* 817 */
+ { MA, 0, NULL, NULL }, /* 818 */
+ { MA, 0, NULL, NULL }, /* 819 */
+ { MA, 0, NULL, NULL }, /* 820 */
+ { MA, 0, NULL, NULL }, /* 821 */
+ { MA, 0, NULL, NULL }, /* 822 */
+ { MA, 0, NULL, NULL }, /* 823 */
+ { MA, 0, NULL, NULL }, /* 824 */
+ { MA, 0, NULL, NULL }, /* 825 */
+ { MA, 0, NULL, NULL }, /* 826 */
+ { MA, 0, NULL, NULL }, /* 827 */
+ { MA, 0, NULL, NULL }, /* 828 */
+ { MA, 0, NULL, NULL }, /* 829 */
+ { MA, 0, NULL, NULL }, /* 830 */
+ { MA, 0, NULL, NULL }, /* 831 */
+ { MA, 0, NULL, NULL }, /* 832 */
+ { MA, 0, NULL, NULL }, /* 833 */
+ { MA, 0, NULL, NULL }, /* 834 */
+ { MA, 0, NULL, NULL }, /* 835 */
+ { MA, 0, NULL, NULL }, /* 836 */
+ { MA, 0, NULL, NULL }, /* 837 */
+ { MA, 0, NULL, NULL }, /* 838 */
+ { MA, 0, NULL, NULL }, /* 839 */
+ { MA, 0, NULL, NULL }, /* 840 */
+ { MA, 0, NULL, NULL }, /* 841 */
+ { MA, 0, NULL, NULL }, /* 842 */
+ { MA, 0, NULL, NULL }, /* 843 */
+ { MA, 0, NULL, NULL }, /* 844 */
+ { MA, 0, NULL, NULL }, /* 845 */
+ { MA, 0, NULL, NULL }, /* 846 */
+ { MA, 0, NULL, NULL }, /* 847 */
+ { MA, 0, NULL, NULL }, /* 848 */
+ { MA, 0, NULL, NULL }, /* 849 */
+ { MA, 0, NULL, NULL }, /* 850 */
+ { MA, 0, NULL, NULL }, /* 851 */
+ { MA, 0, NULL, NULL }, /* 852 */
+ { MA, 0, NULL, NULL }, /* 853 */
+ { MA, 0, NULL, NULL }, /* 854 */
+ { MA, 0, NULL, NULL }, /* 855 */
+ { MA, 0, NULL, NULL }, /* 856 */
+ { MA, 0, NULL, NULL }, /* 857 */
+ { MA, 0, NULL, NULL }, /* 858 */
+ { MA, 0, NULL, NULL }, /* 859 */
+ { MA, 0, NULL, NULL }, /* 860 */
+ { MA, 0, NULL, NULL }, /* 861 */
+ { MA, 0, NULL, NULL }, /* 862 */
+ { MA, 0, NULL, NULL }, /* 863 */
+ { MA, 0, NULL, NULL }, /* 864 */
+ { MA, 0, NULL, NULL }, /* 865 */
+ { MA, 0, NULL, NULL }, /* 866 */
+ { MA, 0, NULL, NULL }, /* 867 */
+ { MA, 0, NULL, NULL }, /* 868 */
+ { MA, 0, NULL, NULL }, /* 869 */
+ { MA, 0, NULL, NULL }, /* 870 */
+ { MA, 0, NULL, NULL }, /* 871 */
+ { MA, 0, NULL, NULL }, /* 872 */
+ { MA, 0, NULL, NULL }, /* 873 */
+ { MA, 0, NULL, NULL }, /* 874 */
+ { MA, 0, NULL, NULL }, /* 875 */
+ { MA, 0, NULL, NULL }, /* 876 */
+ { MA, 0, NULL, NULL }, /* 877 */
+ { MA, 0, NULL, NULL }, /* 878 */
+ { MA, 0, NULL, NULL }, /* 879 */
+ { MA, 0, NULL, NULL }, /* 880 */
+ { MA, 0, NULL, NULL }, /* 881 */
+ { MA, 0, NULL, NULL }, /* 882 */
+ { MA, 0, NULL, NULL }, /* 883 */
+ { MA, 0, NULL, NULL }, /* 884 */
+ { MA, 0, NULL, NULL }, /* 885 */
+ { MA, 0, NULL, NULL }, /* 886 */
+ { MA, 0, NULL, NULL }, /* 887 */
+ { MA, 0, NULL, NULL }, /* 888 */
+ { MA, 0, NULL, NULL }, /* 889 */
+ { MA, 0, NULL, NULL }, /* 890 */
+ { MA, 0, NULL, NULL }, /* 891 */
+ { MA, 0, NULL, NULL }, /* 892 */
+ { MA, 0, NULL, NULL }, /* 893 */
+ { MA, 0, NULL, NULL }, /* 894 */
+ { MA, 0, NULL, NULL }, /* 895 */
+ { MA, 0, NULL, NULL }, /* 896 */
+ { MA, 0, NULL, NULL }, /* 897 */
+ { MA, 0, NULL, NULL }, /* 898 */
+ { MA, 0, NULL, NULL }, /* 899 */
+ { MA, 0, NULL, NULL }, /* 900 */
+ { MA, 0, NULL, NULL }, /* 901 */
+ { MA, 0, NULL, NULL }, /* 902 */
+ { MA, 0, NULL, NULL }, /* 903 */
+ { MA, 0, NULL, NULL }, /* 904 */
+ { MA, 0, NULL, NULL }, /* 905 */
+ { MA, 0, NULL, NULL }, /* 906 */
+ { MA, 0, NULL, NULL }, /* 907 */
+ { MA, 0, NULL, NULL }, /* 908 */
+ { MA, 0, NULL, NULL }, /* 909 */
+ { MA, 0, NULL, NULL }, /* 910 */
+ { MA, 0, NULL, NULL }, /* 911 */
+ { MA, 0, NULL, NULL }, /* 912 */
+ { MA, 0, NULL, NULL }, /* 913 */
+ { MA, 0, NULL, NULL }, /* 914 */
+ { MA, 0, NULL, NULL }, /* 915 */
+ { MA, 0, NULL, NULL }, /* 916 */
+ { MA, 0, NULL, NULL }, /* 917 */
+ { MA, 0, NULL, NULL }, /* 918 */
+ { MA, 0, NULL, NULL }, /* 919 */
+ { MA, 0, NULL, NULL }, /* 920 */
+ { MA, 0, NULL, NULL }, /* 921 */
+ { MA, 0, NULL, NULL }, /* 922 */
+ { MA, 0, NULL, NULL }, /* 923 */
+ { MA, 0, NULL, NULL }, /* 924 */
+ { MA, 0, NULL, NULL }, /* 925 */
+ { MA, 0, NULL, NULL }, /* 926 */
+ { MA, 0, NULL, NULL }, /* 927 */
+ { MA, 0, NULL, NULL }, /* 928 */
+ { MA, 0, NULL, NULL }, /* 929 */
+ { MA, 0, NULL, NULL }, /* 930 */
+ { MA, 0, NULL, NULL }, /* 931 */
+ { MA, 0, NULL, NULL }, /* 932 */
+ { MA, 0, NULL, NULL }, /* 933 */
+ { MA, 0, NULL, NULL }, /* 934 */
+ { MA, 0, NULL, NULL }, /* 935 */
+ { MA, 0, NULL, NULL }, /* 936 */
+ { MA, 0, NULL, NULL }, /* 937 */
+ { MA, 0, NULL, NULL }, /* 938 */
+ { MA, 0, NULL, NULL }, /* 939 */
+ { MA, 0, NULL, NULL }, /* 940 */
+ { MA, 0, NULL, NULL }, /* 941 */
+ { MA, 0, NULL, NULL }, /* 942 */
+ { MA, 0, NULL, NULL }, /* 943 */
+ { MA, 0, NULL, NULL }, /* 944 */
+ { MA, 0, NULL, NULL }, /* 945 */
+ { MA, 0, NULL, NULL }, /* 946 */
+ { MA, 0, NULL, NULL }, /* 947 */
+ { MA, 0, NULL, NULL }, /* 948 */
+ { MA, 0, NULL, NULL }, /* 949 */
+ { MA, 0, NULL, NULL }, /* 950 */
+ { MA, 0, NULL, NULL }, /* 951 */
+ { MA, 0, NULL, NULL }, /* 952 */
+ { MA, 0, NULL, NULL }, /* 953 */
+ { MA, 0, NULL, NULL }, /* 954 */
+ { MA, 0, NULL, NULL }, /* 955 */
+ { MA, 0, NULL, NULL }, /* 956 */
+ { MA, 0, NULL, NULL }, /* 957 */
+ { MA, 0, NULL, NULL }, /* 958 */
+ { MA, 0, NULL, NULL }, /* 959 */
+ { MA, 0, NULL, NULL }, /* 960 */
+ { MA, 0, NULL, NULL }, /* 961 */
+ { MA, 0, NULL, NULL }, /* 962 */
+ { MA, 0, NULL, NULL }, /* 963 */
+ { MA, 0, NULL, NULL }, /* 964 */
+ { MA, 0, NULL, NULL }, /* 965 */
+ { MA, 0, NULL, NULL }, /* 966 */
+ { MA, 0, NULL, NULL }, /* 967 */
+ { MA, 0, NULL, NULL }, /* 968 */
+ { MA, 0, NULL, NULL }, /* 969 */
+ { MA, 0, NULL, NULL }, /* 970 */
+ { MA, 0, NULL, NULL }, /* 971 */
+ { MA, 0, NULL, NULL }, /* 972 */
+ { MA, 0, NULL, NULL }, /* 973 */
+ { MA, 0, NULL, NULL }, /* 974 */
+ { MA, 0, NULL, NULL }, /* 975 */
+ { MA, 0, NULL, NULL }, /* 976 */
+ { MA, 0, NULL, NULL }, /* 977 */
+ { MA, 0, NULL, NULL }, /* 978 */
+ { MA, 0, NULL, NULL }, /* 979 */
+ { MA, 0, NULL, NULL }, /* 980 */
+ { MA, 0, NULL, NULL }, /* 981 */
+ { MA, 0, NULL, NULL }, /* 982 */
+ { MA, 0, NULL, NULL }, /* 983 */
+ { MA, 0, NULL, NULL }, /* 984 */
+ { MA, 0, NULL, NULL }, /* 985 */
+ { MA, 0, NULL, NULL }, /* 986 */
+ { MA, 0, NULL, NULL }, /* 987 */
+ { MA, 0, NULL, NULL }, /* 988 */
+ { MA, 0, NULL, NULL }, /* 989 */
+ { MA, 0, NULL, NULL }, /* 990 */
+ { MA, 0, NULL, NULL }, /* 991 */
+ { MA, 0, NULL, NULL }, /* 992 */
+ { MA, 0, NULL, NULL }, /* 993 */
+ { MA, 0, NULL, NULL }, /* 994 */
+ { MA, 0, NULL, NULL }, /* 995 */
+ { MA, 0, NULL, NULL }, /* 996 */
+ { MA, 0, NULL, NULL }, /* 997 */
+ { MA, 0, NULL, NULL }, /* 998 */
+ { MA, 0, NULL, NULL }, /* 999 */
+ { MA, 0, NULL, NULL }, /* 1000 */
+ { MA, 0, NULL, NULL }, /* 1001 */
+ { MA, 0, NULL, NULL }, /* 1002 */
+ { MA, 0, NULL, NULL }, /* 1003 */
+ { MA, 0, NULL, NULL }, /* 1004 */
+ { MA, 0, NULL, NULL }, /* 1005 */
+ { MA, 0, NULL, NULL }, /* 1006 */
+ { MA, 0, NULL, NULL }, /* 1007 */
+ { MA, 0, NULL, NULL }, /* 1008 */
+ { MA, 0, NULL, NULL }, /* 1009 */
+ { MA, 0, NULL, NULL }, /* 1010 */
+ { MA, 0, NULL, NULL }, /* 1011 */
+ { MA, 0, NULL, NULL }, /* 1012 */
+ { MA, 0, NULL, NULL }, /* 1013 */
+ { MA, 0, NULL, NULL }, /* 1014 */
+ { MA, 0, NULL, NULL }, /* 1015 */
+ { MA, 0, NULL, NULL }, /* 1016 */
+ { MA, 0, NULL, NULL }, /* 1017 */
+ { MA, 0, NULL, NULL }, /* 1018 */
+ { MA, 0, NULL, NULL }, /* 1019 */
+ { MA, 0, NULL, NULL }, /* 1020 */
+ { MA, 0, NULL, NULL }, /* 1021 */
+ { MA, 0, NULL, NULL }, /* 1022 */
+ { MA, 0, NULL, NULL }, /* 1023 */
+ { 0, 0, printargs, "ni_syscall" }, /* 1024 */
+ { 1, TP, sys_exit, "exit" }, /* 1025 */
+ { 3, TD, sys_read, "read" }, /* 1026 */
+ { 3, TD, sys_write, "write" }, /* 1027 */
+ { 3, TD|TF, sys_open, "open" }, /* 1028 */
+ { 1, TD, sys_close, "close" }, /* 1029 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 1030 */
+ { 2, TF, sys_link, "link" }, /* 1031 */
+ { 1, TF, sys_unlink, "unlink" }, /* 1032 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 1033 */
+ { 1, TF, sys_chdir, "chdir" }, /* 1034 */
+ { 1, TD, sys_fchdir, "fchdir" }, /* 1035 */
+ { 2, TF, sys_utimes, "utimes" }, /* 1036 */
+ { 3, TF, sys_mknod, "mknod" }, /* 1037 */
+ { 2, TF, sys_chmod, "chmod" }, /* 1038 */
+ { 3, TF, sys_chown, "chown" }, /* 1039 */
+ { 3, TD, sys_lseek, "lseek" }, /* 1040 */
+ { 0, 0, sys_getpid, "getpid" }, /* 1041 */
+ { 0, 0, sys_getppid, "getppid" }, /* 1042 */
+ { 5, TF, sys_mount, "mount" }, /* 1043 */
+ { 1, TF, sys_umount2, "umount" }, /* 1044 */
+ { 1, 0, sys_setuid, "setuid" }, /* 1045 */
+ { 0, NF, sys_getuid, "getuid" }, /* 1046 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 1047 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 1048 */
+ { 2, TF, sys_access, "access" }, /* 1049 */
+ { 0, 0, sys_sync, "sync" }, /* 1050 */
+ { 1, TD, sys_fsync, "fsync" }, /* 1051 */
+ { 1, TD, sys_fdatasync, "fdatasync" }, /* 1052 */
+ { 2, TS, sys_kill, "kill" }, /* 1053 */
+ { 2, TF, sys_rename, "rename" }, /* 1054 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 1055 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 1056 */
+ { 1, TD, sys_dup, "dup" }, /* 1057 */
+ { 1, TD, sys_pipe, "pipe" }, /* 1058 */
+ { 1, 0, sys_times, "times" }, /* 1059 */
+ { 1, TM, sys_brk, "brk" }, /* 1060 */
+ { 1, 0, sys_setgid, "setgid" }, /* 1061 */
+ { 0, NF, sys_getgid, "getgid" }, /* 1062 */
+ { 0, NF, sys_getegid, "getegid" }, /* 1063 */
+ { 1, TF, sys_acct, "acct" }, /* 1064 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 1065 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 1066 */
+ { 1, 0, sys_umask, "umask" }, /* 1067 */
+ { 1, TF, sys_chroot, "chroot" }, /* 1068 */
+ { 2, 0, sys_ustat, "ustat" }, /* 1069 */
+ { 2, TD, sys_dup2, "dup2" }, /* 1070 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 1071 */
+ { 2, 0, sys_setregid, "setregid" }, /* 1072 */
+ { 3, 0, printargs, "getresuid" }, /* 1073 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 1074 */
+ { 3, 0, sys_getresuid, "getresgid" }, /* 1075 */
+ { 3, 0, printargs, "setresgid" }, /* 1076 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 1077 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 1078 */
+ { 1, 0, sys_getpgid, "getpgid" }, /* 1079 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 1080 */
+ { 0, 0, sys_setsid, "setsid" }, /* 1081 */
+ { 1, 0, sys_getsid, "getsid" }, /* 1082 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 1083 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 1084 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 1085 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 1086 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 1087 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 1088 */
+ { 5, TD, sys_select, "select" }, /* 1089 */
+ { 3, TD, sys_poll, "poll" }, /* 1090 */
+ { 2, TF, sys_symlink, "symlink" }, /* 1091 */
+ { 3, TF, sys_readlink, "readlink" }, /* 1092 */
+ { 1, TF, sys_uselib, "uselib" }, /* 1093 */
+ { 2, TF, sys_swapon, "swapon" }, /* 1094 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 1095 */
+ { 4, 0, sys_reboot, "reboot" }, /* 1096 */
+ { 2, TF, sys_truncate, "truncate" }, /* 1097 */
+ { 2, TD, sys_ftruncate, "ftruncate" }, /* 1098 */
+ { 2, TD, sys_fchmod, "fchmod" }, /* 1099 */
+ { 3, TD, sys_fchown, "fchown" }, /* 1100 */
+ { 2, 0, sys_getpriority, "getpriority" }, /* 1101 */
+ { 3, 0, sys_setpriority, "setpriority" }, /* 1102 */
+ { 2, TF, sys_statfs, "statfs" }, /* 1103 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 1104 */
+ { 3, 0, sys_gettid, "gettid" }, /* 1105 */
+ { 3, TI, sys_semget, "semget" }, /* 1106 */
+ { 3, TI, printargs, "semop" }, /* 1107 */
+ { 4, TI, sys_semctl, "semctl" }, /* 1108 */
+ { 2, TI, sys_msgget, "msgget" }, /* 1109 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 1110 */
+ { 5, TI, sys_msgrcv, "msgrcv" }, /* 1111 */
+ { 3, TI, sys_msgctl, "msgctl" }, /* 1112 */
+ { 3, TI, sys_shmget, "shmget" }, /* 1113 */
+ { 3, TI, sys_shmat, "shmat" }, /* 1114 */
+ { 1, TI, sys_shmdt, "shmdt" }, /* 1115 */
+ { 3, TI, sys_shmctl, "shmctl" }, /* 1116 */
+ { 3, 0, sys_syslog, "syslog" }, /* 1117 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 1118 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 1119 */
+ { 2, TF, sys_stat, "stat" }, /* 1120 */
+ { 2, TF, sys_lstat, "lstat" }, /* 1121 */
+ { 2, TD, sys_fstat, "fstat" }, /* 1122 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 1123 */
+ { 3, TF, sys_chown, "lchown" }, /* 1124 */
+ { 5, 0, sys_vm86, "vm86" }, /* 1125 */
+ { 4, TP, sys_wait4, "wait4" }, /* 1126 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 1127 */
+ { 5, TP, sys_clone, "clone" }, /* 1128 */
+ { 2, 0, sys_setdomainname, "setdomainname" }, /* 1129 */
+ { 1, 0, sys_uname, "uname" }, /* 1130 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 1131 */
+ { 2, 0, sys_create_module, "create_module" }, /* 1132 */
+ { 4, 0, sys_init_module, "init_module" }, /* 1133 */
+ { 2, 0, sys_delete_module, "delete_module" }, /* 1134 */
+ { 1, 0, sys_get_kernel_syms, "get_kernel_syms"}, /* 1135 */
+ { 5, 0, sys_query_module, "query_module" }, /* 1136 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 1137 */
+ { 0, 0, sys_bdflush, "bdflush" }, /* 1138 */
+ { 3, 0, sys_sysfs, "sysfs" }, /* 1139 */
+ { 1, 0, sys_personality, "personality" }, /* 1140 */
+ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 1141 */
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 1142 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 1143 */
+ { 3, TD, sys_getdents, "getdents" }, /* 1144 */
+ { 2, TD, sys_flock, "flock" }, /* 1145 */
+ { 5, TD, sys_readv, "readv" }, /* 1146 */
+ { 5, TD, sys_writev, "writev" }, /* 1147 */
+ { 4, TD, sys_pread, "pread" }, /* 1148 */
+ { 4, TD, sys_pwrite, "pwrite" }, /* 1149 */
+ { 1, 0, printargs, "_sysctl" }, /* 1150 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 1151 */
+ { 2, TM, sys_munmap, "munmap" }, /* 1152 */
+ { 2, TM, sys_mlock, "mlock" }, /* 1153 */
+ { 1, TM, sys_mlockall, "mlockall" }, /* 1154 */
+ { 3, TM, sys_mprotect, "mprotect" }, /* 1155 */
+ { 5, TM, sys_mremap, "mremap" }, /* 1156 */
+ { 3, TM, sys_msync, "msync" }, /* 1157 */
+ { 2, TM, sys_munlock, "munlock" }, /* 1158 */
+ { 0, TM, sys_munlockall, "munlockall" }, /* 1159 */
+ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 1160 */
+ { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 1161 */
+ { 2, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 1162 */
+ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 1163 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 1164 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 1165 */
+ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 1166 */
+ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 1167 */
+ { 2, 0, sys_nanosleep, "nanosleep" }, /* 1168 */
+ { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 1169 */
+ { 5, 0, sys_prctl, "prctl" }, /* 1170 */
+ { 1, 0, sys_getpagesize, "getpagesize" }, /* 1171 */
+ { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 1172 */
+ { 5, 0, printargs, "pciconfig_read"}, /* 1173 */
+ { 5, 0, printargs, "pciconfig_write"}, /* 1174 */
+ { MA, 0, printargs, "perfmonctl" }, /* 1175 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 1176 */
+ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 1177 */
+ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 1178 */
+ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 1179 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 1180 */
+ { 0, TS, sys_sigreturn, "rt_sigreturn" }, /* 1181 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 1182 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 1183 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 1184 */
+ { 2, 0, sys_capget, "capget" }, /* 1185 */
+ { 2, 0, sys_capset, "capset" }, /* 1186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 1187 */
+ { 5, TN, printargs, "getpmsg" }, /* 1188 */
+ { 5, TN, printargs, "putpmsg" }, /* 1189 */
+ { 3, TN, sys_socket, "socket" }, /* 1190 */
+ { 3, TN, sys_bind, "bind" }, /* 1191 */
+ { 3, TN, sys_connect, "connect" }, /* 1192 */
+ { 2, TN, sys_listen, "listen" }, /* 1193 */
+ { 3, TN, sys_accept, "accept" }, /* 1194 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 1195 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 1196 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 1197 */
+ { 4, TN, sys_send, "send" }, /* 1198 */
+ { 6, TN, sys_sendto, "sendto" }, /* 1199 */
+ { 4, TN, sys_recv, "recv" }, /* 1200 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 1201 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 1202 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 1203 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 1204 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 1205 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 1206 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 1207 */
+ { 3, TM, sys_mincore, "mincore" }, /* 1208 */
+ { 3, TM, sys_madvise, "madvise" }, /* 1209 */
+ { 2, TF, sys_stat, "stat" }, /* 1210 */
+ { 2, TF, sys_lstat, "lstat" }, /* 1211 */
+ { 2, TD, sys_fstat, "fstat" }, /* 1212 */
+ { 6, TP, sys_clone, "clone2" }, /* 1213 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 1214 */
+ { 2, 0, printargs, "getunwind" }, /* 1215 */
+ { 3, TD, sys_readahead, "readahead" }, /* 1216 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 1217 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 1218 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 1219 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 1220 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 1221 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 1222 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 1223 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 1224 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 1225 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 1226 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 1227 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 1228 */
+ { 2, TS, sys_kill, "tkill" }, /* 1229 */
+ { 6, 0, sys_futex, "futex" }, /* 1230 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity"},/* 1231 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity"},/* 1232 */
+ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 1233 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 1234 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 1235 */
+ { 1, TP, sys_exit, "exit_group" }, /* 1236 */
+ { 3, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 1237 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 1238 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 1239 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 1240 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 1241 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 1242 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 1243 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 1244 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 1245 */
+ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 1246 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 1247 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 1248 */
+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 1249 */
+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 1250 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 1251 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 1252 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 1253 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 1254 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 1255 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 1256 */
+ { MA, 0, printargs, "fstatfs64" }, /* 1257 */
+ { MA, 0, printargs, "statfs64" }, /* 1258 */
+ { 6, TM, sys_mbind, "mbind" }, /* 1259 */
+ { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 1260 */
+ { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 1261 */
+ { 4, 0, sys_mq_open, "mq_open" }, /* 1262 */
+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 1263 */
+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 1264 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 1265 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 1266 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 1267 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 1268 */
+ { 5, 0, sys_vserver, "vserver" }, /* 1269 */
+ { 5, TP, sys_waitid, "waitid" }, /* 1270 */
+ { 5, 0, sys_add_key, "add_key" }, /* 1271 */
+ { 4, 0, sys_request_key, "request_key" }, /* 1272 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 1273 */
+ { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 1274 */
+ { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 1275 */
+ { 6, TM, sys_move_pages, "move_pages" }, /* 1276 */
+ { 0, TD, sys_inotify_init, "inotify_init" }, /* 1277 */
+ { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 1278 */
+ { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 1279 */
+ { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 1280 */
+ { 4, TD|TF, sys_openat, "openat" }, /* 1281 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 1282 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 1283 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 1284 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 1285 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 1286 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 1287 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 1288 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 1289 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 1290 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 1291 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 1292 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 1293 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 1294 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 1295 */
+ { 1, TP, sys_unshare, "unshare" }, /* 1296 */
+ { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 1297 */
+ { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 1298 */
+ { 6, TD, sys_splice, "splice" }, /* 1299 */
+ { 4, TD, sys_sync_file_range, "sync_file_range" }, /* 1300 */
+ { 4, TD, sys_tee, "tee" }, /* 1301 */
+ { 4, TD, sys_vmsplice, "vmsplice" }, /* 1302 */
+ { MA, 0, NULL, NULL }, /* 1303 */
+ { 3, 0, sys_getcpu, "getcpu" }, /* 1304 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 1305 */
+ { MA, 0, NULL, NULL }, /* 1306 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 1307 */
+ { 4, TD, sys_timerfd, "timerfd" }, /* 1308 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 1309 */
+ { 4, TD, sys_preadv, "preadv" }, /* 1319 */
+ { 4, TD, sys_pwritev, "pwritev" }, /* 1320 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 1321 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 1322 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 1323 */
+ { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 1324 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 1325 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 1326 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 1327 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 1328 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 1329 */
+ { 2, TD, sys_setns, "setns" }, /* 1330 */
+ { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 1331 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 1332 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 1333 */
+ { 4, TN, sys_accept4, "accept4" }, /* 1334 */
+ { 3, TD, sys_finit_module, "finit_module" }, /* 1335 */
diff --git a/linux/inotify.h b/linux/inotify.h
new file mode 100644
index 0000000..0af0307
--- /dev/null
+++ b/linux/inotify.h
@@ -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 */
diff --git a/linux/ioctlent.h.in b/linux/ioctlent.h.in
new file mode 100644
index 0000000..8182842
--- /dev/null
+++ b/linux/ioctlent.h.in
@@ -0,0 +1,2003 @@
+ /* Generated by ioctlsort */
+ {"linux/fs.h", "FIBMAP", 0x0001},
+ {"linux/fs.h", "FIGETBSZ", 0x0002},
+ {"linux/fd.h", "FDGETPRM", 0x0204},
+ {"linux/fd.h", "FDGETMAXERRS", 0x020e},
+ {"linux/fd.h", "FDGETDRVTYP", 0x020f},
+ {"linux/fd.h", "FDGETDRVPRM", 0x0211},
+ {"linux/fd.h", "FDGETDRVSTAT", 0x0212},
+ {"linux/fd.h", "FDPOLLDRVSTAT", 0x0213},
+ {"linux/fd.h", "FDGETFDCSTAT", 0x0215},
+ {"linux/fd.h", "FDWERRORGET", 0x0217},
+ {"linux/fd.h", "FDCLRPRM", 0x0241},
+ {"linux/fd.h", "FDSETPRM", 0x0242},
+ {"linux/fd.h", "FDDEFPRM", 0x0243},
+ {"linux/fd.h", "FDMSGON", 0x0245},
+ {"linux/fd.h", "FDMSGOFF", 0x0246},
+ {"linux/fd.h", "FDFMTBEG", 0x0247},
+ {"linux/fd.h", "FDFMTTRK", 0x0248},
+ {"linux/fd.h", "FDFMTEND", 0x0249},
+ {"linux/fd.h", "FDSETEMSGTRESH", 0x024a},
+ {"linux/fd.h", "FDFLUSH", 0x024b},
+ {"linux/fd.h", "FDSETMAXERRS", 0x024c},
+ {"linux/fd.h", "FDRESET", 0x0254},
+ {"linux/fd.h", "FDWERRORCLR", 0x0256},
+ {"linux/fd.h", "FDRAWCMD", 0x0258},
+ {"linux/fd.h", "FDTWADDLE", 0x0259},
+ {"linux/fd.h", "FDEJECT", 0x025a},
+ {"linux/fd.h", "FDSETDRVPRM", 0x0290},
+ {"linux/hdreg.h", "HDIO_GETGEO", 0x0301},
+ {"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x0302},
+ {"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x0304},
+ {"linux/hdreg.h", "HDIO_GET_QDMA", 0x0305},
+ {"linux/hdreg.h", "HDIO_SET_XFER", 0x0306},
+ {"linux/hdreg.h", "HDIO_OBSOLETE_IDENTITY", 0x0307},
+ {"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x0308},
+ {"linux/hdreg.h", "HDIO_GET_32BIT", 0x0309},
+ {"linux/hdreg.h", "HDIO_GET_NOWERR", 0x030a},
+ {"linux/hdreg.h", "HDIO_GET_DMA", 0x030b},
+ {"linux/hdreg.h", "HDIO_GET_NICE", 0x030c},
+ {"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x030d},
+ {"linux/hdreg.h", "HDIO_GET_WCACHE", 0x030e},
+ {"linux/hdreg.h", "HDIO_GET_ACOUSTIC", 0x030f},
+ {"linux/hdreg.h", "HDIO_GET_ADDRESS", 0x0310},
+ {"linux/hdreg.h", "HDIO_GET_BUSSTATE", 0x031a},
+ {"linux/hdreg.h", "HDIO_TRISTATE_HWIF", 0x031b},
+ {"linux/hdreg.h", "HDIO_DRIVE_RESET", 0x031c},
+ {"linux/hdreg.h", "HDIO_DRIVE_TASKFILE", 0x031d},
+ {"linux/hdreg.h", "HDIO_DRIVE_TASK", 0x031e},
+ {"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x031f},
+ {"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x0321},
+ {"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x0322},
+ {"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x0323},
+ {"linux/hdreg.h", "HDIO_SET_32BIT", 0x0324},
+ {"linux/hdreg.h", "HDIO_SET_NOWERR", 0x0325},
+ {"linux/hdreg.h", "HDIO_SET_DMA", 0x0326},
+ {"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x0327},
+ {"linux/hdreg.h", "HDIO_SCAN_HWIF", 0x0328},
+ {"linux/hdreg.h", "HDIO_SET_NICE", 0x0329},
+ {"linux/hdreg.h", "HDIO_UNREGISTER_HWIF", 0x032a},
+ {"linux/hdreg.h", "HDIO_SET_WCACHE", 0x032b},
+ {"linux/hdreg.h", "HDIO_SET_ACOUSTIC", 0x032c},
+ {"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},
+ {"linux/raid/md_u.h", "PRINT_RAID_DEBUG", 0x0913},
+ {"linux/raid/md_u.h", "RAID_AUTORUN", 0x0914},
+ {"linux/raid/md_u.h", "GET_BITMAP_FILE", 0x0915},
+ {"linux/raid/md_u.h", "CLEAR_ARRAY", 0x0920},
+ {"linux/raid/md_u.h", "ADD_NEW_DISK", 0x0921},
+ {"linux/raid/md_u.h", "HOT_REMOVE_DISK", 0x0922},
+ {"linux/raid/md_u.h", "SET_ARRAY_INFO", 0x0923},
+ {"linux/raid/md_u.h", "SET_DISK_INFO", 0x0924},
+ {"linux/raid/md_u.h", "WRITE_RAID_INFO", 0x0925},
+ {"linux/raid/md_u.h", "UNPROTECT_ARRAY", 0x0926},
+ {"linux/raid/md_u.h", "PROTECT_ARRAY", 0x0927},
+ {"linux/raid/md_u.h", "HOT_ADD_DISK", 0x0928},
+ {"linux/raid/md_u.h", "SET_DISK_FAULTY", 0x0929},
+ {"linux/raid/md_u.h", "HOT_GENERATE_ERROR", 0x092a},
+ {"linux/raid/md_u.h", "SET_BITMAP_FILE", 0x092b},
+ {"linux/raid/md_u.h", "RUN_ARRAY", 0x0930},
+ {"linux/raid/md_u.h", "STOP_ARRAY", 0x0932},
+ {"linux/raid/md_u.h", "STOP_ARRAY_RO", 0x0933},
+ {"linux/raid/md_u.h", "RESTART_ARRAY_RW", 0x0934},
+ {"linux/fs.h", "BLKROSET", 0x125d},
+ {"linux/fs.h", "BLKROGET", 0x125e},
+ {"linux/fs.h", "BLKRRPART", 0x125f},
+ {"linux/fs.h", "BLKGETSIZE", 0x1260},
+ {"linux/fs.h", "BLKFLSBUF", 0x1261},
+ {"linux/fs.h", "BLKRASET", 0x1262},
+ {"linux/fs.h", "BLKRAGET", 0x1263},
+ {"linux/fs.h", "BLKFRASET", 0x1264},
+ {"linux/fs.h", "BLKFRAGET", 0x1265},
+ {"linux/fs.h", "BLKSECTSET", 0x1266},
+ {"linux/fs.h", "BLKSECTGET", 0x1267},
+ {"linux/fs.h", "BLKSSZGET", 0x1268},
+ {"linux/blkpg.h", "BLKPG", 0x1269},
+ {"linux/fs.h", "BLKELVGET", 0x126a},
+ {"linux/fs.h", "BLKELVSET", 0x126b},
+ {"linux/fs.h", "BLKBSZGET", 0x1270},
+ {"linux/fs.h", "BLKBSZSET", 0x1271},
+ {"linux/fs.h", "BLKGETSIZE64", 0x1272},
+ {"linux/fs.h", "BLKTRACESETUP", 0x1273},
+ {"linux/fs.h", "BLKTRACESTART", 0x1274},
+ {"linux/fs.h", "BLKTRACESTOP", 0x1275},
+ {"linux/fs.h", "BLKTRACETEARDOWN", 0x1276},
+ {"linux/fs.h", "BLKDISCARD", 0x1277},
+ {"linux/fs.h", "BLKIOMIN", 0x1278},
+ {"linux/fs.h", "BLKIOOPT", 0x1279},
+ {"linux/fs.h", "BLKALIGNOFF", 0x127a},
+ {"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},
+ {"scsi/sg.h", "SG_SET_TIMEOUT", 0x2201},
+ {"scsi/sg.h", "SG_GET_TIMEOUT", 0x2202},
+ {"scsi/sg.h", "SG_EMULATED_HOST", 0x2203},
+ {"scsi/sg.h", "SG_SET_TRANSFORM", 0x2204},
+ {"scsi/sg.h", "SG_GET_TRANSFORM", 0x2205},
+ {"scsi/sg.h", "SG_GET_COMMAND_Q", 0x2270},
+ {"scsi/sg.h", "SG_SET_COMMAND_Q", 0x2271},
+ {"scsi/sg.h", "SG_GET_RESERVED_SIZE", 0x2272},
+ {"scsi/sg.h", "SG_SET_RESERVED_SIZE", 0x2275},
+ {"scsi/sg.h", "SG_GET_SCSI_ID", 0x2276},
+ {"scsi/sg.h", "SG_SET_FORCE_LOW_DMA", 0x2279},
+ {"scsi/sg.h", "SG_GET_LOW_DMA", 0x227a},
+ {"scsi/sg.h", "SG_SET_FORCE_PACK_ID", 0x227b},
+ {"scsi/sg.h", "SG_GET_PACK_ID", 0x227c},
+ {"scsi/sg.h", "SG_GET_NUM_WAITING", 0x227d},
+ {"scsi/sg.h", "SG_SET_DEBUG", 0x227e},
+ {"scsi/sg.h", "SG_GET_SG_TABLESIZE", 0x227f},
+ {"scsi/sg.h", "SG_GET_VERSION_NUM", 0x2282},
+ {"scsi/sg.h", "SG_NEXT_CMD_LEN", 0x2283},
+ {"scsi/sg.h", "SG_SCSI_RESET", 0x2284},
+ {"scsi/sg.h", "SG_IO", 0x2285},
+ {"scsi/sg.h", "SG_GET_REQUEST_TABLE", 0x2286},
+ {"scsi/sg.h", "SG_SET_KEEP_ORPHAN", 0x2287},
+ {"scsi/sg.h", "SG_GET_KEEP_ORPHAN", 0x2288},
+ {"scsi/sg.h", "SG_GET_ACCESS_COUNT", 0x2289},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_INFO", 0x2300},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_REQUEST", 0x2301},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE", 0x2302},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE", 0x2303},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_RESPONSE", 0x2304},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_INITIATE_BUS_RESET", 0x2305},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_ADD_DESCRIPTOR", 0x2306},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_REMOVE_DESCRIPTOR", 0x2307},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_CREATE_ISO_CONTEXT", 0x2308},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_QUEUE_ISO", 0x2309},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_START_ISO", 0x230a},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_STOP_ISO", 0x230b},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_CYCLE_TIMER", 0x230c},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE", 0x230d},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE", 0x230e},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE", 0x230f},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE", 0x2310},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_SPEED", 0x2311},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_BROADCAST_REQUEST", 0x2312},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_STREAM_PACKET", 0x2313},
+ {"linux/firewire-cdev.h", "FW_CDEV_IOC_GET_CYCLE_TIMER2", 0x2314},
+ {"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},
+ {"linux/perf_event.h", "PERF_EVENT_IOC_RESET", 0x2403},
+ {"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/suspend_ioctls.h", "SNAPSHOT_FREEZE", 0x3301},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", 0x3302},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", 0x3304},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_FREE", 0x3305},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_FREE_SWAP_PAGES", 0x3309},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", 0x330b},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", 0x330d},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_GET_IMAGE_SIZE", 0x330e},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_PLATFORM_SUPPORT", 0x330f},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_POWER_OFF", 0x3310},
+ {"linux/suspend_ioctls.h", "SNAPSHOT_CREATE_IMAGE", 0x3311},
+ {"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},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_PVERSION", 0x4100},
+ {"linux/agpgart.h", "AGPIOC_ACQUIRE", 0x4101},
+ {"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_INFO", 0x4101},
+ {"linux/agpgart.h", "AGPIOC_RELEASE", 0x4102},
+ {"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_TSTAMP", 0x4102},
+ {"linux/agpgart.h", "AGPIOC_SETUP", 0x4103},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_TTSTAMP", 0x4103},
+ {"linux/agpgart.h", "AGPIOC_RESERVE", 0x4104},
+ {"linux/agpgart.h", "AGPIOC_PROTECT", 0x4105},
+ {"linux/agpgart.h", "AGPIOC_ALLOCATE", 0x4106},
+ {"linux/agpgart.h", "AGPIOC_DEALLOCATE", 0x4107},
+ {"linux/agpgart.h", "AGPIOC_BIND", 0x4108},
+ {"linux/agpgart.h", "AGPIOC_UNBIND", 0x4109},
+ {"linux/agpgart.h", "AGPIOC_CHIPSET_FLUSH", 0x410a},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_HW_REFINE", 0x4110},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_HW_PARAMS", 0x4111},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_HW_FREE", 0x4112},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_SW_PARAMS", 0x4113},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_STATUS", 0x4120},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_DELAY", 0x4121},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_HWSYNC", 0x4122},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_SYNC_PTR", 0x4123},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_CHANNEL_INFO", 0x4132},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_PREPARE", 0x4140},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_RESET", 0x4141},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_START", 0x4142},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_DROP", 0x4143},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_DRAIN", 0x4144},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_PAUSE", 0x4145},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_REWIND", 0x4146},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_RESUME", 0x4147},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_XRUN", 0x4148},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_FORWARD", 0x4149},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_WRITEI_FRAMES", 0x4150},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_READI_FRAMES", 0x4151},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_WRITEN_FRAMES", 0x4152},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_READN_FRAMES", 0x4153},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_LINK", 0x4160},
+ {"sound/asound.h", "SNDRV_PCM_IOCTL_UNLINK", 0x4161},
+ {"linux/pmu.h", "PMU_IOC_SLEEP", 0x4200},
+ {"linux/cciss_ioctl.h", "CCISS_GETPCIINFO", 0x4201},
+ {"linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", 0x4201},
+ {"linux/cciss_ioctl.h", "CCISS_GETINTINFO", 0x4202},
+ {"linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", 0x4202},
+ {"linux/cciss_ioctl.h", "CCISS_SETINTINFO", 0x4203},
+ {"linux/pmu.h", "PMU_IOC_GET_MODEL", 0x4203},
+ {"linux/cciss_ioctl.h", "CCISS_GETNODENAME", 0x4204},
+ {"linux/pmu.h", "PMU_IOC_HAS_ADB", 0x4204},
+ {"linux/cciss_ioctl.h", "CCISS_SETNODENAME", 0x4205},
+ {"linux/pmu.h", "PMU_IOC_CAN_SLEEP", 0x4205},
+ {"linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", 0x4206},
+ {"linux/pmu.h", "PMU_IOC_GRAB_BACKLIGHT", 0x4206},
+ {"linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", 0x4207},
+ {"linux/cciss_ioctl.h", "CCISS_GETFIRMVER", 0x4208},
+ {"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_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/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},
+ {"linux/soundcard.h", "SNDCTL_COPR_RCODE", 0x4303},
+ {"linux/soundcard.h", "SNDCTL_COPR_WDATA", 0x4304},
+ {"linux/soundcard.h", "SNDCTL_COPR_WCODE", 0x4305},
+ {"linux/capi.h", "CAPI_GET_MANUFACTURER", 0x4306},
+ {"linux/soundcard.h", "SNDCTL_COPR_RUN", 0x4306},
+ {"linux/capi.h", "CAPI_GET_VERSION", 0x4307},
+ {"linux/soundcard.h", "SNDCTL_COPR_HALT", 0x4307},
+ {"linux/capi.h", "CAPI_GET_SERIAL", 0x4308},
+ {"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},
+ {"linux/input.h", "EVIOCSREP", 0x4503},
+ {"linux/input.h", "EVIOCGKEYCODE", 0x4504},
+ {"linux/input.h", "EVIOCGKEYCODE_V2", 0x4504},
+ {"linux/input.h", "EVIOCSKEYCODE", 0x4504},
+ {"linux/input.h", "EVIOCSKEYCODE_V2", 0x4504},
+ {"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},
+ {"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602},
+ {"video/da8xx-fb.h", "FBIOPUT_CONTRAST", 0x4602},
+ {"video/da8xx-fb.h", "FBIGET_BRIGHTNESS", 0x4603},
+ {"video/da8xx-fb.h", "FBIPUT_BRIGHTNESS", 0x4603},
+ {"linux/fb.h", "FBIOGETCMAP", 0x4604},
+ {"video/da8xx-fb.h", "FBIGET_COLOR", 0x4605},
+ {"linux/fb.h", "FBIOPUTCMAP", 0x4605},
+ {"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606},
+ {"video/da8xx-fb.h", "FBIPUT_COLOR", 0x4606},
+ {"linux/fb.h", "FBIO_CURSOR", 0x4608},
+ {"video/da8xx-fb.h", "FBIPUT_HSYNC", 0x4609},
+ {"video/da8xx-fb.h", "FBIPUT_VSYNC", 0x460a},
+ {"linux/fb.h", "FBIOGET_CON2FBMAP", 0x460f},
+ {"linux/fb.h", "FBIOPUT_CON2FBMAP", 0x4610},
+ {"linux/fb.h", "FBIOBLANK", 0x4611},
+ {"linux/fb.h", "FBIOGET_VBLANK", 0x4612},
+ {"linux/fb.h", "FBIO_ALLOC", 0x4613},
+ {"linux/fb.h", "FBIO_FREE", 0x4614},
+ {"linux/fb.h", "FBIOGET_GLYPH", 0x4615},
+ {"linux/fb.h", "FBIOGET_HWCINFO", 0x4616},
+ {"linux/fb.h", "FBIOPUT_MODEINFO", 0x4617},
+ {"linux/fb.h", "FBIOGET_DISPINFO", 0x4618},
+ {"linux/fb.h", "FBIO_WAITFORVSYNC", 0x4620},
+ {"linux/arcfb.h", "FBIO_WAITEVENT", 0x4688},
+ {"linux/arcfb.h", "FBIO_GETCONTROL2", 0x4689},
+ {"video/sstfb.h", "SSTFB_GET_VGAPASS", 0x46dd},
+ {"video/sstfb.h", "SSTFB_SET_VGAPASS", 0x46dd},
+ {"linux/gigaset_dev.h", "GIGASET_REDIR", 0x4700},
+ {"linux/gigaset_dev.h", "GIGASET_CONFIG", 0x4701},
+ {"linux/gigaset_dev.h", "GIGASET_BRKCHARS", 0x4702},
+ {"linux/gigaset_dev.h", "GIGASET_VERSION", 0x4703},
+ {"sound/asound.h", "SNDRV_HWDEP_IOCTL_PVERSION", 0x4800},
+ {"linux/hidraw.h", "HIDIOCGRDESCSIZE", 0x4801},
+ {"linux/hiddev.h", "HIDIOCGVERSION", 0x4801},
+ {"sound/asound.h", "SNDRV_HWDEP_IOCTL_INFO", 0x4801},
+ {"linux/hiddev.h", "HIDIOCAPPLICATION", 0x4802},
+ {"linux/hidraw.h", "HIDIOCGRDESC", 0x4802},
+ {"sound/asound.h", "SNDRV_HWDEP_IOCTL_DSP_STATUS", 0x4802},
+ {"linux/hiddev.h", "HIDIOCGDEVINFO", 0x4803},
+ {"linux/hidraw.h", "HIDIOCGRAWINFO", 0x4803},
+ {"sound/asound.h", "SNDRV_HWDEP_IOCTL_DSP_LOAD", 0x4803},
+ {"linux/hiddev.h", "HIDIOCGSTRING", 0x4804},
+ {"linux/hiddev.h", "HIDIOCINITREPORT", 0x4805},
+ {"linux/hiddev.h", "HIDIOCGREPORT", 0x4807},
+ {"linux/hiddev.h", "HIDIOCSREPORT", 0x4808},
+ {"linux/hiddev.h", "HIDIOCGREPORTINFO", 0x4809},
+ {"linux/hiddev.h", "HIDIOCGFIELDINFO", 0x480a},
+ {"linux/hiddev.h", "HIDIOCGUSAGE", 0x480b},
+ {"linux/hiddev.h", "HIDIOCSUSAGE", 0x480c},
+ {"linux/hiddev.h", "HIDIOCGUCODE", 0x480d},
+ {"linux/hiddev.h", "HIDIOCGFLAG", 0x480e},
+ {"linux/hiddev.h", "HIDIOCSFLAG", 0x480f},
+ {"linux/hiddev.h", "HIDIOCGCOLLECTIONINDEX", 0x4810},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_INFO", 0x4810},
+ {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_INFO", 0x4810},
+ {"linux/hiddev.h", "HIDIOCGCOLLECTIONINFO", 0x4811},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CODE_POKE", 0x4811},
+ {"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},
+ {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_START", 0x4813},
+ {"linux/hiddev.h", "HIDIOCSUSAGES", 0x4814},
+ {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_STOP", 0x4814},
+ {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_PAUSE", 0x4815},
+ {"sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_RESTART", 0x4816},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_INFO", 0x4820},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_SETUP", 0x4820},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_RESET", 0x4821},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_POKE", 0x4821},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_PLAY_NOTE", 0x4822},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_PEEK", 0x4822},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_VOICE", 0x4823},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_PARAMS", 0x4824},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_MODE", 0x4825},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_CONNECTION", 0x4826},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PCM_POKE", 0x4830},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PCM_PEEK", 0x4831},
+ {"sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_CLEAR_PATCHES", 0x4840},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PVERSION", 0x4840},
+ {"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/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},
+ {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_LOAD_PATCH", 0x4881},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER", 0x4882},
+ {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_RESET_SAMPLES", 0x4882},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_SINGLE_STEP", 0x4883},
+ {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES", 0x4883},
+ {"sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_DBG_READ", 0x4884},
+ {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_MEM_AVAIL", 0x4884},
+ {"sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_MISC_MODE", 0x4884},
+ {"net/bluetooth/hci.h", "HCIDEVUP", 0x48c9},
+ {"net/bluetooth/hci.h", "HCIDEVDOWN", 0x48ca},
+ {"net/bluetooth/hci.h", "HCIDEVRESET", 0x48cb},
+ {"net/bluetooth/hci.h", "HCIDEVRESTAT", 0x48cc},
+ {"net/bluetooth/hci.h", "HCIGETDEVLIST", 0x48d2},
+ {"net/bluetooth/hci.h", "HCIGETDEVINFO", 0x48d3},
+ {"net/bluetooth/hci.h", "HCIGETCONNLIST", 0x48d4},
+ {"net/bluetooth/hci.h", "HCIGETCONNINFO", 0x48d5},
+ {"net/bluetooth/hci.h", "HCIGETAUTHINFO", 0x48d7},
+ {"net/bluetooth/hci.h", "HCISETRAW", 0x48dc},
+ {"net/bluetooth/hci.h", "HCISETSCAN", 0x48dd},
+ {"net/bluetooth/hci.h", "HCISETAUTH", 0x48de},
+ {"net/bluetooth/hci.h", "HCISETENCRYPT", 0x48df},
+ {"net/bluetooth/hci.h", "HCISETPTYPE", 0x48e0},
+ {"net/bluetooth/hci.h", "HCISETLINKPOL", 0x48e1},
+ {"net/bluetooth/hci.h", "HCISETLINKMODE", 0x48e2},
+ {"net/bluetooth/hci.h", "HCISETACLMTU", 0x48e3},
+ {"net/bluetooth/hci.h", "HCISETSCOMTU", 0x48e4},
+ {"net/bluetooth/hci.h", "HCIBLOCKADDR", 0x48e6},
+ {"net/bluetooth/hci.h", "HCIUNBLOCKADDR", 0x48e7},
+ {"net/bluetooth/hci.h", "HCIINQUIRY", 0x48f0},
+ {"linux/isdn.h", "IIOCNETAIF", 0x4901},
+ {"linux/isdn.h", "IIOCNETDIF", 0x4902},
+ {"linux/isdn.h", "IIOCNETSCF", 0x4903},
+ {"linux/isdn.h", "IIOCNETGCF", 0x4904},
+ {"linux/isdn.h", "IIOCNETANM", 0x4905},
+ {"linux/isdn.h", "IIOCNETDNM", 0x4906},
+ {"linux/isdn.h", "IIOCNETGNM", 0x4907},
+ {"linux/isdn.h", "IIOCGETSET", 0x4908},
+ {"linux/isdn.h", "IIOCSETSET", 0x4909},
+ {"linux/isdn.h", "IIOCSETVER", 0x490a},
+ {"linux/isdn.h", "IIOCNETHUP", 0x490b},
+ {"linux/isdn.h", "IIOCSETGST", 0x490c},
+ {"linux/isdn.h", "IIOCSETBRJ", 0x490d},
+ {"linux/isdn.h", "IIOCSIGPRF", 0x490e},
+ {"linux/isdn.h", "IIOCGETPRF", 0x490f},
+ {"linux/isdn.h", "IIOCSETPRF", 0x4910},
+ {"linux/isdn.h", "IIOCGETMAP", 0x4911},
+ {"linux/isdn.h", "IIOCSETMAP", 0x4912},
+ {"linux/isdn.h", "IIOCNETASL", 0x4913},
+ {"linux/isdn.h", "IIOCNETDIL", 0x4914},
+ {"linux/isdn.h", "IIOCGETCPS", 0x4915},
+ {"linux/isdn.h", "IIOCGETDVR", 0x4916},
+ {"linux/isdn.h", "IIOCNETLCR", 0x4917},
+ {"linux/isdn.h", "IIOCNETDWRSET", 0x4918},
+ {"linux/isdn.h", "IIOCNETALN", 0x4920},
+ {"linux/isdn.h", "IIOCNETDLN", 0x4921},
+ {"linux/isdn.h", "IIOCNETGPN", 0x4922},
+ {"linux/isdn.h", "IIOCDBGVAR", 0x497f},
+ {"linux/isdn.h", "IIOCDRVCTL", 0x4980},
+ {"linux/kd.h", "KIOCSOUND", 0x4b2f},
+ {"linux/kd.h", "KDMKTONE", 0x4b30},
+ {"linux/kd.h", "KDGETLED", 0x4b31},
+ {"linux/kd.h", "KDSETLED", 0x4b32},
+ {"linux/kd.h", "KDGKBTYPE", 0x4b33},
+ {"linux/kd.h", "KDADDIO", 0x4b34},
+ {"linux/kd.h", "KDDELIO", 0x4b35},
+ {"linux/kd.h", "KDENABIO", 0x4b36},
+ {"linux/kd.h", "KDDISABIO", 0x4b37},
+ {"linux/kd.h", "KDSETMODE", 0x4b3a},
+ {"linux/kd.h", "KDGETMODE", 0x4b3b},
+ {"linux/kd.h", "KDMAPDISP", 0x4b3c},
+ {"linux/kd.h", "KDUNMAPDISP", 0x4b3d},
+ {"linux/kd.h", "GIO_SCRNMAP", 0x4b40},
+ {"linux/kd.h", "PIO_SCRNMAP", 0x4b41},
+ {"linux/kd.h", "KDGKBMODE", 0x4b44},
+ {"linux/kd.h", "KDSKBMODE", 0x4b45},
+ {"linux/kd.h", "KDGKBENT", 0x4b46},
+ {"linux/kd.h", "KDSKBENT", 0x4b47},
+ {"linux/kd.h", "KDGKBSENT", 0x4b48},
+ {"linux/kd.h", "KDSKBSENT", 0x4b49},
+ {"linux/kd.h", "KDGKBDIACR", 0x4b4a},
+ {"linux/kd.h", "KDSKBDIACR", 0x4b4b},
+ {"linux/kd.h", "KDGETKEYCODE", 0x4b4c},
+ {"linux/kd.h", "KDSETKEYCODE", 0x4b4d},
+ {"linux/kd.h", "KDSIGACCEPT", 0x4b4e},
+ {"linux/kd.h", "KDKBDREP", 0x4b52},
+ {"linux/kd.h", "GIO_FONT", 0x4b60},
+ {"linux/kd.h", "PIO_FONT", 0x4b61},
+ {"linux/kd.h", "KDGKBMETA", 0x4b62},
+ {"linux/kd.h", "KDSKBMETA", 0x4b63},
+ {"linux/kd.h", "KDGKBLED", 0x4b64},
+ {"linux/kd.h", "KDSKBLED", 0x4b65},
+ {"linux/kd.h", "GIO_UNIMAP", 0x4b66},
+ {"linux/kd.h", "PIO_UNIMAP", 0x4b67},
+ {"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68},
+ {"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69},
+ {"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a},
+ {"linux/kd.h", "GIO_FONTX", 0x4b6b},
+ {"linux/kd.h", "PIO_FONTX", 0x4b6c},
+ {"linux/kd.h", "PIO_FONTRESET", 0x4b6d},
+ {"linux/kd.h", "GIO_CMAP", 0x4b70},
+ {"linux/kd.h", "PIO_CMAP", 0x4b71},
+ {"linux/kd.h", "KDFONTOP", 0x4b72},
+ {"linux/kd.h", "KDGKBDIACRUC", 0x4bfa},
+ {"linux/kd.h", "KDSKBDIACRUC", 0x4bfb},
+ {"linux/loop.h", "LOOP_SET_FD", 0x4c00},
+ {"linux/loop.h", "LOOP_CLR_FD", 0x4c01},
+ {"linux/loop.h", "LOOP_SET_STATUS", 0x4c02},
+ {"linux/loop.h", "LOOP_GET_STATUS", 0x4c03},
+ {"linux/loop.h", "LOOP_SET_STATUS64", 0x4c04},
+ {"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},
+ {"mtd/mtd-abi.h", "MEMERASE", 0x4d02},
+ {"mtd/mtd-abi.h", "MEMWRITEOOB", 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", "MEMGETOOBSEL", 0x4d0a},
+ {"mtd/mtd-abi.h", "MEMGETBADBLOCK", 0x4d0b},
+ {"mtd/mtd-abi.h", "MEMSETBADBLOCK", 0x4d0c},
+ {"mtd/mtd-abi.h", "OTPSELECT", 0x4d0d},
+ {"mtd/mtd-abi.h", "OTPGETREGIONCOUNT", 0x4d0e},
+ {"mtd/mtd-abi.h", "OTPGETREGIONINFO", 0x4d0f},
+ {"mtd/mtd-abi.h", "OTPLOCK", 0x4d10},
+ {"mtd/mtd-abi.h", "ECCGETLAYOUT", 0x4d11},
+ {"mtd/mtd-abi.h", "ECCGETSTATS", 0x4d12},
+ {"mtd/mtd-abi.h", "MTDFILEMODE", 0x4d13},
+ {"mtd/mtd-abi.h", "MEMERASE64", 0x4d14},
+ {"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},
+ {"linux/soundcard.h", "SOUND_MIXER_AGC", 0x4d67},
+ {"linux/soundcard.h", "SOUND_MIXER_3DSE", 0x4d68},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE1", 0x4d6f},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE2", 0x4d70},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE3", 0x4d71},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE4", 0x4d72},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE5", 0x4d73},
+ {"linux/soundcard.h", "SOUND_MIXER_GETLEVELS", 0x4d74},
+ {"linux/soundcard.h", "SOUND_MIXER_SETLEVELS", 0x4d75},
+ {"linux/soundcard.h", "OSS_GETVERSION", 0x4d76},
+ {"mtd/ubi-user.h", "UBI_IOCVOLUP", 0x4f00},
+ {"mtd/ubi-user.h", "UBI_IOCEBER", 0x4f01},
+ {"mtd/ubi-user.h", "UBI_IOCEBCH", 0x4f02},
+ {"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_IOCSETVOLPROP", 0x4f06},
+ {"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x5000},
+ {"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x5001},
+ {"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0x5002},
+ {"linux/soundcard.h", "SOUND_PCM_READ_RATE", 0x5002},
+ {"linux/soundcard.h", "SNDCTL_DSP_STEREO", 0x5003},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", 0x5004},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETFMT", 0x5005},
+ {"linux/soundcard.h", "SOUND_PCM_READ_BITS", 0x5005},
+ {"linux/soundcard.h", "SNDCTL_DSP_CHANNELS", 0x5006},
+ {"linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", 0x5006},
+ {"linux/soundcard.h", "SOUND_PCM_READ_FILTER", 0x5007},
+ {"linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", 0x5007},
+ {"linux/soundcard.h", "SNDCTL_DSP_POST", 0x5008},
+ {"linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", 0x5009},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", 0x500a},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETFMTS", 0x500b},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", 0x500c},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETISPACE", 0x500d},
+ {"linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", 0x500e},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETCAPS", 0x500f},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", 0x5010},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", 0x5010},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETIPTR", 0x5011},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETOPTR", 0x5012},
+ {"linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", 0x5013},
+ {"linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", 0x5014},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", 0x5015},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", 0x5016},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETODELAY", 0x5017},
+ {"linux/soundcard.h", "SNDCTL_DSP_PROFILE", 0x5017},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETCHANNELMASK", 0x5040},
+ {"linux/soundcard.h", "SNDCTL_DSP_BIND_CHANNEL", 0x5041},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETSPDIF", 0x5042},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETSPDIF", 0x5043},
+ {"linux/soundcard.h", "SNDCTL_SEQ_RESET", 0x5100},
+ {"linux/soundcard.h", "SNDCTL_SEQ_SYNC", 0x5101},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_INFO", 0x5102},
+ {"linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", 0x5103},
+ {"linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", 0x5104},
+ {"linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", 0x5105},
+ {"linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", 0x5106},
+ {"linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", 0x5107},
+ {"linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", 0x5108},
+ {"linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", 0x5109},
+ {"linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", 0x510a},
+ {"linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", 0x510b},
+ {"linux/soundcard.h", "SNDCTL_MIDI_INFO", 0x510c},
+ {"linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", 0x510d},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", 0x510e},
+ {"linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", 0x510f},
+ {"linux/soundcard.h", "SNDCTL_SEQ_PANIC", 0x5111},
+ {"linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", 0x5112},
+ {"linux/soundcard.h", "SNDCTL_SEQ_GETTIME", 0x5113},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_ID", 0x5114},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_CONTROL", 0x5115},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_REMOVESAMPLE", 0x5116},
+ {"linux/random.h", "RNDGETENTCNT", 0x5200},
+ {"linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", 0x5201},
+ {"linux/random.h", "RNDADDTOENTCNT", 0x5201},
+ {"media/saa6588.h", "SAA6588_CMD_OPEN", 0x5201},
+ {"linux/random.h", "RNDGETPOOL", 0x5202},
+ {"media/saa6588.h", "SAA6588_CMD_CLOSE", 0x5202},
+ {"linux/random.h", "RNDADDENTROPY", 0x5203},
+ {"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},
+ {"net/bluetooth/rfcomm.h", "RFCOMMGETDEVLIST", 0x52d2},
+ {"net/bluetooth/rfcomm.h", "RFCOMMGETDEVINFO", 0x52d3},
+ {"net/bluetooth/rfcomm.h", "RFCOMMSTEALDLC", 0x52dc},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_PVERSION", 0x5300},
+ {"linux/cdrom.h", "CDROMPAUSE", 0x5301},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_CLIENT_ID", 0x5301},
+ {"linux/cdrom.h", "CDROMRESUME", 0x5302},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SYSTEM_INFO", 0x5302},
+ {"linux/cdrom.h", "CDROMPLAYMSF", 0x5303},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_RUNNING_MODE", 0x5303},
+ {"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304},
+ {"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305},
+ {"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306},
+ {"linux/cdrom.h", "CDROMSTOP", 0x5307},
+ {"linux/cdrom.h", "CDROMSTART", 0x5308},
+ {"linux/cdrom.h", "CDROMEJECT", 0x5309},
+ {"linux/cdrom.h", "CDROMVOLCTRL", 0x530a},
+ {"linux/cdrom.h", "CDROMSUBCHNL", 0x530b},
+ {"linux/cdrom.h", "CDROMREADMODE2", 0x530c},
+ {"linux/cdrom.h", "CDROMREADMODE1", 0x530d},
+ {"linux/cdrom.h", "CDROMREADAUDIO", 0x530e},
+ {"linux/cdrom.h", "CDROMEJECT_SW", 0x530f},
+ {"linux/cdrom.h", "CDROMMULTISESSION", 0x5310},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_CLIENT_INFO", 0x5310},
+ {"linux/cdrom.h", "CDROM_GET_MCN", 0x5311},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_CLIENT_INFO", 0x5311},
+ {"linux/cdrom.h", "CDROMRESET", 0x5312},
+ {"linux/cdrom.h", "CDROMVOLREAD", 0x5313},
+ {"linux/cdrom.h", "CDROMREADRAW", 0x5314},
+ {"linux/cdrom.h", "CDROMREADCOOKED", 0x5315},
+ {"linux/cdrom.h", "CDROMSEEK", 0x5316},
+ {"linux/cdrom.h", "CDROMPLAYBLK", 0x5317},
+ {"linux/cdrom.h", "CDROMREADALL", 0x5318},
+ {"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319},
+ {"linux/cdrom.h", "CDROMGETSPINDOWN", 0x531d},
+ {"linux/cdrom.h", "CDROMSETSPINDOWN", 0x531e},
+ {"linux/cdrom.h", "CDROM_SET_OPTIONS", 0x5320},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_CREATE_PORT", 0x5320},
+ {"linux/cdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_DELETE_PORT", 0x5321},
+ {"linux/cdrom.h", "CDROM_SELECT_SPEED", 0x5322},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_PORT_INFO", 0x5322},
+ {"linux/cdrom.h", "CDROM_SELECT_DISC", 0x5323},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_PORT_INFO", 0x5323},
+ {"linux/cdrom.h", "CDROM_MEDIA_CHANGED", 0x5325},
+ {"linux/cdrom.h", "CDROM_DRIVE_STATUS", 0x5326},
+ {"linux/cdrom.h", "CDROM_DISC_STATUS", 0x5327},
+ {"linux/cdrom.h", "CDROM_CHANGER_NSLOTS", 0x5328},
+ {"linux/cdrom.h", "CDROM_LOCKDOOR", 0x5329},
+ {"linux/cdrom.h", "CDROM_DEBUG", 0x5330},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT", 0x5330},
+ {"linux/cdrom.h", "CDROM_GET_CAPABILITY", 0x5331},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT", 0x5331},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_CREATE_QUEUE", 0x5332},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_DELETE_QUEUE", 0x5333},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_INFO", 0x5334},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_INFO", 0x5335},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE", 0x5336},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", 0x5340},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO", 0x5341},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO", 0x5342},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER", 0x5343},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER", 0x5344},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", 0x5345},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER", 0x5346},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", 0x5349},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT", 0x534a},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_CLIENT_POOL", 0x534b},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_CLIENT_POOL", 0x534c},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_REMOVE_EVENTS", 0x534e},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_SUBS", 0x534f},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION", 0x5350},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT", 0x5351},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT", 0x5352},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC", 0x5353},
+ {"sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC", 0x5354},
+ {"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORLOCK", 0x5380},
+ {"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORUNLOCK", 0x5381},
+ {"linux/cdrom.h", "CDROMAUDIOBUFSIZ", 0x5382},
+ {"scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0x5382},
+ {"scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST", 0x5385},
+ {"scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0x5386},
+ {"scsi/scsi.h", "SCSI_IOCTL_GET_PCI", 0x5387},
+ {"linux/cdrom.h", "DVD_READ_STRUCT", 0x5390},
+ {"linux/cdrom.h", "DVD_WRITE_STRUCT", 0x5391},
+ {"linux/cdrom.h", "DVD_AUTH", 0x5392},
+ {"linux/cdrom.h", "CDROM_SEND_PACKET", 0x5393},
+ {"linux/cdrom.h", "CDROM_NEXT_WRITABLE", 0x5394},
+ {"linux/cdrom.h", "CDROM_LAST_WRITTEN", 0x5395},
+ {"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},
+ {"sound/asound.h", "SNDRV_TIMER_IOCTL_PAUSE", 0x54a3},
+ {"linux/if_tun.h", "TUNSETNOCSUM", 0x54c8},
+ {"linux/if_tun.h", "TUNSETDEBUG", 0x54c9},
+ {"linux/if_tun.h", "TUNSETIFF", 0x54ca},
+ {"linux/if_tun.h", "TUNSETPERSIST", 0x54cb},
+ {"linux/if_tun.h", "TUNSETOWNER", 0x54cc},
+ {"linux/if_tun.h", "TUNSETLINK", 0x54cd},
+ {"linux/if_tun.h", "TUNSETGROUP", 0x54ce},
+ {"linux/if_tun.h", "TUNGETFEATURES", 0x54cf},
+ {"linux/if_tun.h", "TUNSETOFFLOAD", 0x54d0},
+ {"linux/if_tun.h", "TUNSETTXFILTER", 0x54d1},
+ {"linux/if_tun.h", "TUNGETIFF", 0x54d2},
+ {"linux/if_tun.h", "TUNGETSNDBUF", 0x54d3},
+ {"linux/if_tun.h", "TUNSETSNDBUF", 0x54d4},
+ {"linux/if_tun.h", "TUNATTACHFILTER", 0x54d5},
+ {"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},
+ {"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_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_DISCARDURB", 0x550b},
+ {"linux/usbdevice_fs.h", "USBDEVFS_REAPURB", 0x550c},
+ {"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY", 0x550d},
+ {"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", 0x550e},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CLAIMINTERFACE", 0x550f},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LIST", 0x5510},
+ {"linux/usbdevice_fs.h", "USBDEVFS_RELEASEINTERFACE", 0x5510},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_INFO", 0x5511},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CONNECTINFO", 0x5511},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_READ", 0x5512},
+ {"linux/usbdevice_fs.h", "USBDEVFS_IOCTL", 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},
+ {"linux/usbdevice_fs.h", "USBDEVFS_RESET", 0x5514},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_UNLOCK", 0x5515},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CLEAR_HALT", 0x5515},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS", 0x5516},
+ {"linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT", 0x5516},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_ADD", 0x5517},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CONNECT", 0x5517},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_REPLACE", 0x5518},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CLAIM_PORT", 0x5518},
+ {"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},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE", 0x5530},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_PCM_INFO", 0x5531},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE", 0x5532},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE", 0x5540},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_INFO", 0x5541},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE", 0x5542},
+ {"linux/uinput.h", "UI_SET_EVBIT", 0x5564},
+ {"linux/uinput.h", "UI_SET_KEYBIT", 0x5565},
+ {"linux/uinput.h", "UI_SET_RELBIT", 0x5566},
+ {"linux/uinput.h", "UI_SET_ABSBIT", 0x5567},
+ {"linux/uinput.h", "UI_SET_MSCBIT", 0x5568},
+ {"linux/uinput.h", "UI_SET_LEDBIT", 0x5569},
+ {"linux/uinput.h", "UI_SET_SNDBIT", 0x556a},
+ {"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},
+ {"linux/uinput.h", "UI_END_FF_ERASE", 0x55cb},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_POWER", 0x55d0},
+ {"sound/asound.h", "SNDRV_CTL_IOCTL_POWER_STATE", 0x55d1},
+ {"linux/videodev2.h", "VIDIOC_QUERYCAP", 0x5600},
+ {"linux/vt.h", "VT_OPENQRY", 0x5600},
+ {"linux/videodev2.h", "VIDIOC_RESERVED", 0x5601},
+ {"linux/vt.h", "VT_GETMODE", 0x5601},
+ {"linux/videodev2.h", "VIDIOC_ENUM_FMT", 0x5602},
+ {"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},
+ {"linux/vt.h", "VT_WAITACTIVE", 0x5607},
+ {"linux/videodev2.h", "VIDIOC_REQBUFS", 0x5608},
+ {"linux/vt.h", "VT_DISALLOCATE", 0x5608},
+ {"linux/videodev2.h", "VIDIOC_QUERYBUF", 0x5609},
+ {"linux/vt.h", "VT_RESIZE", 0x5609},
+ {"linux/videodev2.h", "VIDIOC_G_FBUF", 0x560a},
+ {"linux/vt.h", "VT_RESIZEX", 0x560a},
+ {"linux/videodev2.h", "VIDIOC_S_FBUF", 0x560b},
+ {"linux/vt.h", "VT_LOCKSWITCH", 0x560b},
+ {"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
+ {"linux/vt.h", "VT_GETHIFONTMASK", 0x560d},
+ {"linux/videodev2.h", "VIDIOC_OVERLAY", 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_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_G_TUNER", 0x561d},
+ {"linux/videodev2.h", "VIDIOC_S_TUNER", 0x561e},
+ {"linux/videodev2.h", "VIDIOC_G_AUDIO", 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_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_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},
+ {"linux/videodev2.h", "VIDIOC_QUERYSTD", 0x563f},
+ {"linux/videodev2.h", "VIDIOC_TRY_FMT", 0x5640},
+ {"linux/videodev2.h", "VIDIOC_ENUMAUDIO", 0x5641},
+ {"linux/videodev2.h", "VIDIOC_ENUMAUDOUT", 0x5642},
+ {"linux/videodev2.h", "VIDIOC_G_PRIORITY", 0x5643},
+ {"linux/videodev2.h", "VIDIOC_S_PRIORITY", 0x5644},
+ {"linux/videodev2.h", "VIDIOC_G_SLICED_VBI_CAP", 0x5645},
+ {"linux/videodev2.h", "VIDIOC_LOG_STATUS", 0x5646},
+ {"linux/videodev2.h", "VIDIOC_G_EXT_CTRLS", 0x5647},
+ {"linux/videodev2.h", "VIDIOC_S_EXT_CTRLS", 0x5648},
+ {"linux/videodev2.h", "VIDIOC_TRY_EXT_CTRLS", 0x5649},
+ {"linux/videodev2.h", "VIDIOC_ENUM_FRAMESIZES", 0x564a},
+ {"linux/videodev2.h", "VIDIOC_ENUM_FRAMEINTERVALS", 0x564b},
+ {"linux/videodev2.h", "VIDIOC_G_ENC_INDEX", 0x564c},
+ {"linux/videodev2.h", "VIDIOC_ENCODER_CMD", 0x564d},
+ {"linux/videodev2.h", "VIDIOC_TRY_ENCODER_CMD", 0x564e},
+ {"linux/videodev2.h", "VIDIOC_DBG_S_REGISTER", 0x564f},
+ {"linux/videodev2.h", "VIDIOC_DBG_G_REGISTER", 0x5650},
+ {"linux/videodev2.h", "VIDIOC_DBG_G_CHIP_IDENT", 0x5651},
+ {"linux/videodev2.h", "VIDIOC_S_HW_FREQ_SEEK", 0x5652},
+ {"linux/videodev2.h", "VIDIOC_ENUM_DV_PRESETS", 0x5653},
+ {"linux/videodev2.h", "VIDIOC_S_DV_PRESET", 0x5654},
+ {"linux/videodev2.h", "VIDIOC_G_DV_PRESET", 0x5655},
+ {"linux/videodev2.h", "VIDIOC_QUERY_DV_PRESET", 0x5656},
+ {"linux/videodev2.h", "VIDIOC_S_DV_TIMINGS", 0x5657},
+ {"linux/videodev2.h", "VIDIOC_G_DV_TIMINGS", 0x5658},
+ {"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},
+ {"linux/watchdog.h", "WDIOC_GETSTATUS", 0x5701},
+ {"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x5702},
+ {"linux/watchdog.h", "WDIOC_GETTEMP", 0x5703},
+ {"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x5704},
+ {"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x5705},
+ {"linux/watchdog.h", "WDIOC_SETTIMEOUT", 0x5706},
+ {"linux/watchdog.h", "WDIOC_GETTIMEOUT", 0x5707},
+ {"linux/watchdog.h", "WDIOC_SETPRETIMEOUT", 0x5708},
+ {"linux/watchdog.h", "WDIOC_GETPRETIMEOUT", 0x5709},
+ {"linux/watchdog.h", "WDIOC_GETTIMELEFT", 0x570a},
+ {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_PARAMS", 0x5710},
+ {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_STATUS", 0x5720},
+ {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DROP", 0x5730},
+ {"sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DRAIN", 0x5731},
+ {"linux/pktcdvd.h", "PACKET_CTRL_CMD", 0x5801},
+ {"linux/fs.h", "FIFREEZE", 0x5877},
+ {"linux/fs.h", "FITHAW", 0x5878},
+ {"linux/fs.h", "FITRIM", 0x5879},
+ {"linux/usb/tmc.h", "USBTMC_IOCTL_INDICATOR_PULSE", 0x5b01},
+ {"linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", 0x5b02},
+ {"linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", 0x5b03},
+ {"linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", 0x5b04},
+ {"linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_OUT_HALT", 0x5b06},
+ {"linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_IN_HALT", 0x5b07},
+ {"linux/sonet.h", "SONET_GETSTAT", 0x6110},
+ {"linux/sonet.h", "SONET_GETSTATZ", 0x6111},
+ {"linux/sonet.h", "SONET_SETDIAG", 0x6112},
+ {"linux/sonet.h", "SONET_CLRDIAG", 0x6113},
+ {"linux/sonet.h", "SONET_GETDIAG", 0x6114},
+ {"linux/sonet.h", "SONET_SETFRAMING", 0x6115},
+ {"linux/sonet.h", "SONET_GETFRAMING", 0x6116},
+ {"linux/sonet.h", "SONET_GETFRSENSE", 0x6117},
+ {"linux/atm_idt77105.h", "IDT77105_GETSTAT", 0x6132},
+ {"linux/atm_idt77105.h", "IDT77105_GETSTATZ", 0x6133},
+ {"linux/atmdev.h", "ATM_GETSTAT", 0x6150},
+ {"linux/atmdev.h", "ATM_GETSTATZ", 0x6151},
+ {"linux/atmdev.h", "ATM_GETLOOP", 0x6152},
+ {"linux/atmdev.h", "ATM_SETLOOP", 0x6153},
+ {"linux/atmdev.h", "ATM_QUERYLOOP", 0x6154},
+ {"linux/atm_eni.h", "ENI_MEMDUMP", 0x6160},
+ {"linux/atm_he.h", "HE_GET_REG", 0x6160},
+ {"linux/atm_nicstar.h", "NS_GETPSTAT", 0x6161},
+ {"linux/atm_zatm.h", "ZATM_GETPOOL", 0x6161},
+ {"linux/atm_nicstar.h", "NS_SETBUFLEV", 0x6162},
+ {"linux/atm_zatm.h", "ZATM_GETPOOLZ", 0x6162},
+ {"linux/atm_nicstar.h", "NS_ADJBUFLEV", 0x6163},
+ {"linux/atm_zatm.h", "ZATM_SETPOOL", 0x6163},
+ {"linux/atm_eni.h", "ENI_SETMULT", 0x6167},
+ {"linux/atm_tcp.h", "SIOCSIFATMTCP", 0x6180},
+ {"linux/atmdev.h", "ATM_GETLINKRATE", 0x6181},
+ {"linux/atmdev.h", "ATM_GETNAMES", 0x6183},
+ {"linux/atmdev.h", "ATM_GETTYPE", 0x6184},
+ {"linux/atmdev.h", "ATM_GETESI", 0x6185},
+ {"linux/atmdev.h", "ATM_GETADDR", 0x6186},
+ {"linux/atmdev.h", "ATM_RSTADDR", 0x6187},
+ {"linux/atmdev.h", "ATM_ADDADDR", 0x6188},
+ {"linux/atmdev.h", "ATM_DELADDR", 0x6189},
+ {"linux/atmdev.h", "ATM_GETCIRANGE", 0x618a},
+ {"linux/atmdev.h", "ATM_SETCIRANGE", 0x618b},
+ {"linux/atmdev.h", "ATM_SETESI", 0x618c},
+ {"linux/atmdev.h", "ATM_SETESIF", 0x618d},
+ {"linux/atm_tcp.h", "ATMTCP_CREATE", 0x618e},
+ {"linux/atmdev.h", "ATM_ADDLECSADDR", 0x618e},
+ {"linux/atm_tcp.h", "ATMTCP_REMOVE", 0x618f},
+ {"linux/atmdev.h", "ATM_DELLECSADDR", 0x618f},
+ {"linux/atmdev.h", "ATM_GETLECSADDR", 0x6190},
+ {"linux/atmbr2684.h", "BR2684_SETFILT", 0x6190},
+ {"linux/atmlec.h", "ATMLEC_CTRL", 0x61d0},
+ {"linux/atmlec.h", "ATMLEC_DATA", 0x61d1},
+ {"linux/atmlec.h", "ATMLEC_MCAST", 0x61d2},
+ {"linux/atmmpc.h", "ATMMPC_CTRL", 0x61d8},
+ {"linux/atmmpc.h", "ATMMPC_DATA", 0x61d9},
+ {"linux/atmclip.h", "SIOCMKCLIP", 0x61e0},
+ {"linux/atmarp.h", "ATMARPD_CTRL", 0x61e1},
+ {"linux/atmarp.h", "ATMARP_MKIP", 0x61e2},
+ {"linux/atmarp.h", "ATMARP_SETENTRY", 0x61e3},
+ {"linux/atmarp.h", "ATMARP_ENCAP", 0x61e5},
+ {"linux/atmsvc.h", "ATMSIGD_CTRL", 0x61f0},
+ {"linux/atmdev.h", "ATM_SETSC", 0x61f1},
+ {"linux/atmdev.h", "ATM_SETBACKEND", 0x61f2},
+ {"linux/atmdev.h", "ATM_NEWBACKENDIF", 0x61f3},
+ {"linux/atmdev.h", "ATM_ADDPARTY", 0x61f4},
+ {"linux/atmdev.h", "COMPAT_ATM_ADDPARTY", 0x61f4},
+ {"linux/atmdev.h", "ATM_DROPPARTY", 0x61f5},
+ {"media/bt819.h", "BT819_FIFO_RESET_LOW", 0x6200},
+ {"media/bt819.h", "BT819_FIFO_RESET_HIGH", 0x6201},
+ {"linux/cm4000_cs.h", "CM_IOCGSTATUS", 0x6300},
+ {"linux/chio.h", "CHIOMOVE", 0x6301},
+ {"linux/cm4000_cs.h", "CM_IOCGATR", 0x6301},
+ {"linux/chio.h", "CHIOEXCHANGE", 0x6302},
+ {"linux/cm4000_cs.h", "CM_IOCSPTS", 0x6302},
+ {"linux/chio.h", "CHIOPOSITION", 0x6303},
+ {"linux/cm4000_cs.h", "CM_IOCSRDR", 0x6303},
+ {"linux/chio.h", "CHIOGPICKER", 0x6304},
+ {"linux/cm4000_cs.h", "CM_IOCARDOFF", 0x6304},
+ {"linux/chio.h", "CHIOSPICKER", 0x6305},
+ {"linux/chio.h", "CHIOGPARAMS", 0x6306},
+ {"linux/chio.h", "CHIOGSTATUS", 0x6308},
+ {"linux/coda.h", "CIOC_KERNEL_VERSION", 0x630a},
+ {"linux/chio.h", "CHIOGELEM", 0x6310},
+ {"linux/chio.h", "CHIOINITELEM", 0x6311},
+ {"linux/chio.h", "CHIOSVOLTAG", 0x6312},
+ {"linux/chio.h", "CHIOGVPARAMS", 0x6313},
+ {"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/fs.h", "FS_IOC_FIEMAP", 0x660b},
+ {"linux/usb/functionfs.h", "FUNCTIONFS_FIFO_STATUS", 0x6701},
+ {"linux/usb/gadgetfs.h", "GADGETFS_FIFO_STATUS", 0x6701},
+ {"linux/usb/functionfs.h", "FUNCTIONFS_FIFO_FLUSH", 0x6702},
+ {"linux/usb/gadgetfs.h", "GADGETFS_FIFO_FLUSH", 0x6702},
+ {"linux/usb/functionfs.h", "FUNCTIONFS_CLEAR_HALT", 0x6703},
+ {"linux/usb/gadgetfs.h", "GADGETFS_CLEAR_HALT", 0x6703},
+ {"linux/usb/g_printer.h", "GADGET_GET_PRINTER_STATUS", 0x6721},
+ {"linux/usb/g_printer.h", "GADGET_SET_PRINTER_STATUS", 0x6722},
+ {"linux/usb/functionfs.h", "FUNCTIONFS_INTERFACE_REVMAP", 0x6780},
+ {"linux/usb/functionfs.h", "FUNCTIONFS_ENDPOINT_REVMAP", 0x6781},
+ {"linux/hpet.h", "HPET_IE_ON", 0x6801},
+ {"linux/hpet.h", "HPET_IE_OFF", 0x6802},
+ {"linux/hpet.h", "HPET_INFO", 0x6803},
+ {"linux/hpet.h", "HPET_EPI", 0x6804},
+ {"linux/hpet.h", "HPET_DPI", 0x6805},
+ {"linux/hpet.h", "HPET_IRQFREQ", 0x6806},
+ {"linux/i2o-dev.h", "I2OGETIOPS", 0x6900},
+ {"media/lirc.h", "LIRC_GET_FEATURES", 0x6900},
+ {"linux/i2o-dev.h", "I2OHRTGET", 0x6901},
+ {"media/lirc.h", "LIRC_GET_SEND_MODE", 0x6901},
+ {"linux/i2o-dev.h", "I2OLCTGET", 0x6902},
+ {"media/lirc.h", "LIRC_GET_REC_MODE", 0x6902},
+ {"linux/i2o-dev.h", "I2OPARMSET", 0x6903},
+ {"media/lirc.h", "LIRC_GET_SEND_CARRIER", 0x6903},
+ {"linux/i2o-dev.h", "I2OPARMGET", 0x6904},
+ {"media/lirc.h", "LIRC_GET_REC_CARRIER", 0x6904},
+ {"linux/i2o-dev.h", "I2OSWDL", 0x6905},
+ {"media/lirc.h", "LIRC_GET_SEND_DUTY_CYCLE", 0x6905},
+ {"linux/i2o-dev.h", "I2OSWUL", 0x6906},
+ {"media/lirc.h", "LIRC_GET_REC_DUTY_CYCLE", 0x6906},
+ {"linux/i2o-dev.h", "I2OSWDEL", 0x6907},
+ {"media/lirc.h", "LIRC_GET_REC_RESOLUTION", 0x6907},
+ {"linux/i2o-dev.h", "I2OVALIDATE", 0x6908},
+ {"media/lirc.h", "LIRC_GET_MIN_TIMEOUT", 0x6908},
+ {"linux/i2o-dev.h", "I2OHTML", 0x6909},
+ {"media/lirc.h", "LIRC_GET_MAX_TIMEOUT", 0x6909},
+ {"linux/i2o-dev.h", "I2OEVTREG", 0x690a},
+ {"media/lirc.h", "LIRC_GET_MIN_FILTER_PULSE", 0x690a},
+ {"linux/i2o-dev.h", "I2OEVTGET", 0x690b},
+ {"linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", 0x690b},
+ {"media/lirc.h", "LIRC_GET_MAX_FILTER_PULSE", 0x690b},
+ {"linux/i2o-dev.h", "I2OPASSTHRU", 0x690c},
+ {"linux/ipmi.h", "IPMICTL_RECEIVE_MSG", 0x690c},
+ {"media/lirc.h", "LIRC_GET_MIN_FILTER_SPACE", 0x690c},
+ {"linux/ipmi.h", "IPMICTL_SEND_COMMAND", 0x690d},
+ {"media/lirc.h", "LIRC_GET_MAX_FILTER_SPACE", 0x690d},
+ {"linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD", 0x690e},
+ {"linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", 0x690f},
+ {"media/lirc.h", "LIRC_GET_LENGTH", 0x690f},
+ {"linux/ipmi.h", "IPMICTL_SET_GETS_EVENTS_CMD", 0x6910},
+ {"linux/ipmi.h", "IPMICTL_SET_MY_ADDRESS_CMD", 0x6911},
+ {"media/lirc.h", "LIRC_SET_SEND_MODE", 0x6911},
+ {"linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", 0x6912},
+ {"media/lirc.h", "LIRC_SET_REC_MODE", 0x6912},
+ {"linux/ipmi.h", "IPMICTL_SET_MY_LUN_CMD", 0x6913},
+ {"media/lirc.h", "LIRC_SET_SEND_CARRIER", 0x6913},
+ {"linux/ipmi.h", "IPMICTL_GET_MY_LUN_CMD", 0x6914},
+ {"media/lirc.h", "LIRC_SET_REC_CARRIER", 0x6914},
+ {"linux/ipmi.h", "IPMICTL_SEND_COMMAND_SETTIME", 0x6915},
+ {"media/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", 0x6915},
+ {"linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", 0x6916},
+ {"media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE", 0x6916},
+ {"linux/ipmi.h", "IPMICTL_GET_TIMING_PARMS_CMD", 0x6917},
+ {"media/lirc.h", "LIRC_SET_TRANSMITTER_MASK", 0x6917},
+ {"media/lirc.h", "LIRC_SET_REC_TIMEOUT", 0x6918},
+ {"media/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", 0x6919},
+ {"media/lirc.h", "LIRC_SET_REC_FILTER_PULSE", 0x691a},
+ {"media/lirc.h", "LIRC_SET_REC_FILTER_SPACE", 0x691b},
+ {"linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD_CHANS", 0x691c},
+ {"media/lirc.h", "LIRC_SET_REC_FILTER", 0x691c},
+ {"linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD_CHANS", 0x691d},
+ {"media/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", 0x691d},
+ {"linux/ipmi.h", "IPMICTL_GET_MAINTENANCE_MODE_CMD", 0x691e},
+ {"media/lirc.h", "LIRC_SET_REC_DUTY_CYCLE_RANGE", 0x691e},
+ {"linux/ipmi.h", "IPMICTL_SET_MAINTENANCE_MODE_CMD", 0x691f},
+ {"media/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", 0x691f},
+ {"media/lirc.h", "LIRC_NOTIFY_DECODE", 0x6920},
+ {"media/lirc.h", "LIRC_SETUP_START", 0x6921},
+ {"media/lirc.h", "LIRC_SETUP_END", 0x6922},
+ {"media/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", 0x6923},
+ {"linux/i8k.h", "I8K_BIOS_VERSION", 0x6980},
+ {"linux/i8k.h", "I8K_MACHINE_ID", 0x6981},
+ {"linux/i8k.h", "I8K_POWER_STATUS", 0x6982},
+ {"linux/i8k.h", "I8K_FN_STATUS", 0x6983},
+ {"linux/i8k.h", "I8K_GET_TEMP", 0x6984},
+ {"linux/i8k.h", "I8K_GET_SPEED", 0x6985},
+ {"linux/i8k.h", "I8K_GET_FAN", 0x6986},
+ {"linux/i8k.h", "I8K_SET_FAN", 0x6987},
+ {"linux/joystick.h", "JSIOCGVERSION", 0x6a01},
+ {"linux/joystick.h", "JSIOCGAXES", 0x6a11},
+ {"linux/joystick.h", "JSIOCGBUTTONS", 0x6a12},
+ {"linux/joystick.h", "JSIOCSCORR", 0x6a21},
+ {"linux/joystick.h", "JSIOCGCORR", 0x6a22},
+ {"linux/joystick.h", "JSIOCSAXMAP", 0x6a31},
+ {"linux/joystick.h", "JSIOCGAXMAP", 0x6a32},
+ {"linux/joystick.h", "JSIOCSBTNMAP", 0x6a33},
+ {"linux/joystick.h", "JSIOCGBTNMAP", 0x6a34},
+ {"video/kyro.h", "KYRO_IOCTL_OVERLAY_CREATE", 0x6b00},
+ {"video/kyro.h", "KYRO_IOCTL_OVERLAY_VIEWPORT_SET", 0x6b01},
+ {"linux/spi/spidev.h", "SPI_IOC_RD_MODE", 0x6b01},
+ {"linux/spi/spidev.h", "SPI_IOC_WR_MODE", 0x6b01},
+ {"video/kyro.h", "KYRO_IOCTL_SET_VIDEO_MODE", 0x6b02},
+ {"linux/spi/spidev.h", "SPI_IOC_RD_LSB_FIRST", 0x6b02},
+ {"linux/spi/spidev.h", "SPI_IOC_WR_LSB_FIRST", 0x6b02},
+ {"video/kyro.h", "KYRO_IOCTL_UVSTRIDE", 0x6b03},
+ {"linux/spi/spidev.h", "SPI_IOC_RD_BITS_PER_WORD", 0x6b03},
+ {"linux/spi/spidev.h", "SPI_IOC_WR_BITS_PER_WORD", 0x6b03},
+ {"video/kyro.h", "KYRO_IOCTL_OVERLAY_OFFSET", 0x6b04},
+ {"linux/spi/spidev.h", "SPI_IOC_RD_MAX_SPEED_HZ", 0x6b04},
+ {"linux/spi/spidev.h", "SPI_IOC_WR_MAX_SPEED_HZ", 0x6b04},
+ {"video/kyro.h", "KYRO_IOCTL_STRIDE", 0x6b05},
+ {"linux/udf_fs_i.h", "UDF_GETEASIZE", 0x6c40},
+ {"linux/udf_fs_i.h", "UDF_GETEABLOCK", 0x6c41},
+ {"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x6c42},
+ {"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0x6c43},
+ {"linux/synclink.h", "MGSL_IOCSPARAMS", 0x6d00},
+ {"linux/mmtimer.h", "MMTIMER_GETOFFSET", 0x6d00},
+ {"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0x6d00},
+ {"linux/synclink.h", "MGSL_IOCGPARAMS", 0x6d01},
+ {"linux/mmtimer.h", "MMTIMER_GETRES", 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/mtio.h", "MTIOCGET", 0x6d02},
+ {"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0x6d02},
+ {"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03},
+ {"linux/mtio.h", "MTIOCPOS", 0x6d03},
+ {"linux/synclink.h", "MGSL_IOCTXENABLE", 0x6d04},
+ {"linux/mmtimer.h", "MMTIMER_GETBITS", 0x6d04},
+ {"linux/synclink.h", "MGSL_IOCRXENABLE", 0x6d05},
+ {"linux/synclink.h", "MGSL_IOCTXABORT", 0x6d06},
+ {"linux/mmtimer.h", "MMTIMER_MMAPAVAIL", 0x6d06},
+ {"linux/synclink.h", "MGSL_IOCGSTATS", 0x6d07},
+ {"linux/synclink.h", "MGSL_IOCWAITEVENT", 0x6d08},
+ {"linux/synclink.h", "MGSL_IOCLOOPTXDONE", 0x6d09},
+ {"linux/mmtimer.h", "MMTIMER_GETCOUNTER", 0x6d09},
+ {"linux/synclink.h", "MGSL_IOCSIF", 0x6d0a},
+ {"linux/synclink.h", "MGSL_IOCGIF", 0x6d0b},
+ {"linux/synclink.h", "MGSL_IOCCLRMODCOUNT", 0x6d0f},
+ {"linux/synclink.h", "MGSL_IOCSGPIO", 0x6d10},
+ {"linux/synclink.h", "MGSL_IOCGGPIO", 0x6d11},
+ {"linux/synclink.h", "MGSL_IOCWAITGPIO", 0x6d12},
+ {"linux/synclink.h", "MGSL_IOCSXSYNC", 0x6d13},
+ {"linux/synclink.h", "MGSL_IOCGXSYNC", 0x6d14},
+ {"linux/synclink.h", "MGSL_IOCSXCTRL", 0x6d15},
+ {"linux/synclink.h", "MGSL_IOCGXCTRL", 0x6d16},
+ {"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x6e01},
+ {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x6e02},
+ {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", 0x6e02},
+ {"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03},
+ {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0x6e04},
+ {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", 0x6e04},
+ {"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x6e05},
+ {"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x6e06},
+ {"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x6e06},
+ {"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x6e07},
+ {"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x6e08},
+ {"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x6e08},
+ {"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0x6e09},
+ {"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x6e09},
+ {"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0x6e0a},
+ {"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x6e0a},
+ {"linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", 0x6e0b},
+ {"linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", 0x6e0b},
+ {"linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", 0x6e0c},
+ {"linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", 0x6e0c},
+ {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", 0x6ef8},
+ {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", 0x6ef8},
+ {"video/sisfb.h", "SISFB_GET_INFO_OLD", 0x6ef8},
+ {"linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", 0x6ef9},
+ {"video/sisfb.h", "SISFB_GET_VBRSTATUS_OLD", 0x6ef9},
+ {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", 0x6efa},
+ {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", 0x6efa},
+ {"video/sisfb.h", "SISFB_GET_AUTOMAXIMIZE_OLD", 0x6efa},
+ {"video/sisfb.h", "SISFB_SET_AUTOMAXIMIZE_OLD", 0x6efa},
+ {"linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", 0x6efb},
+ {"mtd/ubi-user.h", "UBI_IOCMKVOL", 0x6f00},
+ {"linux/dvb/audio.h", "AUDIO_STOP", 0x6f01},
+ {"mtd/ubi-user.h", "UBI_IOCRMVOL", 0x6f01},
+ {"linux/dvb/audio.h", "AUDIO_PLAY", 0x6f02},
+ {"mtd/ubi-user.h", "UBI_IOCRSVOL", 0x6f02},
+ {"linux/dvb/audio.h", "AUDIO_PAUSE", 0x6f03},
+ {"mtd/ubi-user.h", "UBI_IOCRNVOL", 0x6f03},
+ {"linux/dvb/audio.h", "AUDIO_CONTINUE", 0x6f04},
+ {"linux/dvb/audio.h", "AUDIO_SELECT_SOURCE", 0x6f05},
+ {"linux/dvb/audio.h", "AUDIO_SET_MUTE", 0x6f06},
+ {"linux/dvb/audio.h", "AUDIO_SET_AV_SYNC", 0x6f07},
+ {"linux/dvb/audio.h", "AUDIO_SET_BYPASS_MODE", 0x6f08},
+ {"linux/dvb/audio.h", "AUDIO_CHANNEL_SELECT", 0x6f09},
+ {"linux/dvb/audio.h", "AUDIO_GET_STATUS", 0x6f0a},
+ {"linux/dvb/audio.h", "AUDIO_GET_CAPABILITIES", 0x6f0b},
+ {"linux/dvb/audio.h", "AUDIO_CLEAR_BUFFER", 0x6f0c},
+ {"linux/dvb/audio.h", "AUDIO_SET_ID", 0x6f0d},
+ {"linux/dvb/audio.h", "AUDIO_SET_MIXER", 0x6f0e},
+ {"linux/dvb/audio.h", "AUDIO_SET_STREAMTYPE", 0x6f0f},
+ {"linux/dvb/audio.h", "AUDIO_SET_EXT_ID", 0x6f10},
+ {"linux/dvb/audio.h", "AUDIO_SET_ATTRIBUTES", 0x6f11},
+ {"linux/dvb/audio.h", "AUDIO_SET_KARAOKE", 0x6f12},
+ {"linux/dvb/audio.h", "AUDIO_GET_PTS", 0x6f13},
+ {"linux/dvb/audio.h", "AUDIO_BILINGUAL_CHANNEL_SELECT", 0x6f14},
+ {"linux/dvb/video.h", "VIDEO_STOP", 0x6f15},
+ {"linux/dvb/video.h", "VIDEO_PLAY", 0x6f16},
+ {"linux/dvb/video.h", "VIDEO_FREEZE", 0x6f17},
+ {"linux/dvb/video.h", "VIDEO_CONTINUE", 0x6f18},
+ {"linux/dvb/video.h", "VIDEO_SELECT_SOURCE", 0x6f19},
+ {"linux/dvb/video.h", "VIDEO_SET_BLANK", 0x6f1a},
+ {"linux/dvb/video.h", "VIDEO_GET_STATUS", 0x6f1b},
+ {"linux/dvb/video.h", "VIDEO_GET_EVENT", 0x6f1c},
+ {"linux/dvb/video.h", "VIDEO_SET_DISPLAY_FORMAT", 0x6f1d},
+ {"linux/dvb/video.h", "VIDEO_STILLPICTURE", 0x6f1e},
+ {"linux/dvb/video.h", "VIDEO_FAST_FORWARD", 0x6f1f},
+ {"linux/dvb/video.h", "VIDEO_SLOWMOTION", 0x6f20},
+ {"linux/dvb/video.h", "VIDEO_GET_CAPABILITIES", 0x6f21},
+ {"linux/dvb/video.h", "VIDEO_CLEAR_BUFFER", 0x6f22},
+ {"linux/dvb/video.h", "VIDEO_SET_ID", 0x6f23},
+ {"linux/dvb/video.h", "VIDEO_SET_STREAMTYPE", 0x6f24},
+ {"linux/dvb/video.h", "VIDEO_SET_FORMAT", 0x6f25},
+ {"linux/dvb/video.h", "VIDEO_SET_SYSTEM", 0x6f26},
+ {"linux/dvb/video.h", "VIDEO_SET_HIGHLIGHT", 0x6f27},
+ {"linux/dvb/dmx.h", "DMX_START", 0x6f29},
+ {"linux/dvb/dmx.h", "DMX_STOP", 0x6f2a},
+ {"linux/dvb/dmx.h", "DMX_SET_FILTER", 0x6f2b},
+ {"linux/dvb/dmx.h", "DMX_SET_PES_FILTER", 0x6f2c},
+ {"linux/dvb/dmx.h", "DMX_SET_BUFFER_SIZE", 0x6f2d},
+ {"linux/dvb/dmx.h", "DMX_GET_PES_PIDS", 0x6f2f},
+ {"linux/dvb/dmx.h", "DMX_GET_CAPS", 0x6f30},
+ {"linux/dvb/dmx.h", "DMX_SET_SOURCE", 0x6f31},
+ {"linux/dvb/dmx.h", "DMX_GET_STC", 0x6f32},
+ {"linux/dvb/video.h", "VIDEO_SET_SPU", 0x6f32},
+ {"linux/dvb/dmx.h", "DMX_ADD_PID", 0x6f33},
+ {"linux/dvb/video.h", "VIDEO_SET_SPU_PALETTE", 0x6f33},
+ {"linux/dvb/dmx.h", "DMX_REMOVE_PID", 0x6f34},
+ {"linux/dvb/net.h", "NET_ADD_IF", 0x6f34},
+ {"linux/dvb/video.h", "VIDEO_GET_NAVI", 0x6f34},
+ {"linux/dvb/net.h", "NET_REMOVE_IF", 0x6f35},
+ {"linux/dvb/video.h", "VIDEO_SET_ATTRIBUTES", 0x6f35},
+ {"linux/dvb/net.h", "NET_GET_IF", 0x6f36},
+ {"linux/dvb/video.h", "VIDEO_GET_SIZE", 0x6f37},
+ {"linux/dvb/video.h", "VIDEO_GET_FRAME_RATE", 0x6f38},
+ {"linux/dvb/video.h", "VIDEO_GET_PTS", 0x6f39},
+ {"linux/dvb/video.h", "VIDEO_GET_FRAME_COUNT", 0x6f3a},
+ {"linux/dvb/video.h", "VIDEO_COMMAND", 0x6f3b},
+ {"linux/dvb/video.h", "VIDEO_TRY_COMMAND", 0x6f3c},
+ {"linux/dvb/frontend.h", "FE_GET_INFO", 0x6f3d},
+ {"linux/dvb/frontend.h", "FE_DISEQC_RESET_OVERLOAD", 0x6f3e},
+ {"linux/dvb/frontend.h", "FE_DISEQC_SEND_MASTER_CMD", 0x6f3f},
+ {"linux/dvb/frontend.h", "FE_DISEQC_RECV_SLAVE_REPLY", 0x6f40},
+ {"mtd/ubi-user.h", "UBI_IOCATT", 0x6f40},
+ {"linux/dvb/frontend.h", "FE_DISEQC_SEND_BURST", 0x6f41},
+ {"mtd/ubi-user.h", "UBI_IOCDET", 0x6f41},
+ {"linux/dvb/frontend.h", "FE_SET_TONE", 0x6f42},
+ {"linux/dvb/frontend.h", "FE_SET_VOLTAGE", 0x6f43},
+ {"linux/dvb/frontend.h", "FE_ENABLE_HIGH_LNB_VOLTAGE", 0x6f44},
+ {"linux/dvb/frontend.h", "FE_READ_STATUS", 0x6f45},
+ {"linux/dvb/frontend.h", "FE_READ_BER", 0x6f46},
+ {"linux/dvb/frontend.h", "FE_READ_SIGNAL_STRENGTH", 0x6f47},
+ {"linux/dvb/frontend.h", "FE_READ_SNR", 0x6f48},
+ {"linux/dvb/frontend.h", "FE_READ_UNCORRECTED_BLOCKS", 0x6f49},
+ {"linux/dvb/frontend.h", "FE_SET_FRONTEND", 0x6f4c},
+ {"linux/dvb/frontend.h", "FE_GET_FRONTEND", 0x6f4d},
+ {"linux/dvb/frontend.h", "FE_GET_EVENT", 0x6f4e},
+ {"linux/dvb/frontend.h", "FE_DISHNETWORK_SEND_LEGACY_CMD", 0x6f50},
+ {"linux/dvb/frontend.h", "FE_SET_FRONTEND_TUNE_MODE", 0x6f51},
+ {"linux/dvb/frontend.h", "FE_SET_PROPERTY", 0x6f52},
+ {"linux/dvb/frontend.h", "FE_GET_PROPERTY", 0x6f53},
+ {"linux/dvb/ca.h", "CA_RESET", 0x6f80},
+ {"linux/dvb/ca.h", "CA_GET_CAP", 0x6f81},
+ {"linux/dvb/ca.h", "CA_GET_SLOT_INFO", 0x6f82},
+ {"linux/dvb/ca.h", "CA_GET_DESCR_INFO", 0x6f83},
+ {"linux/dvb/ca.h", "CA_GET_MSG", 0x6f84},
+ {"linux/dvb/ca.h", "CA_SEND_MSG", 0x6f85},
+ {"linux/dvb/ca.h", "CA_SET_DESCR", 0x6f86},
+ {"linux/dvb/ca.h", "CA_SET_PID", 0x6f87},
+ {"linux/dvb/osd.h", "OSD_SEND_CMD", 0x6fa0},
+ {"linux/dvb/osd.h", "OSD_GET_CAPABILITY", 0x6fa1},
+ {"linux/phantom.h", "PHN_GET_REG", 0x7000},
+ {"linux/phantom.h", "PHN_SET_REG", 0x7001},
+ {"linux/rtc.h", "RTC_AIE_ON", 0x7001},
+ {"linux/phantom.h", "PHN_GET_REGS", 0x7002},
+ {"linux/rtc.h", "RTC_AIE_OFF", 0x7002},
+ {"linux/phantom.h", "PHN_SET_REGS", 0x7003},
+ {"linux/rtc.h", "RTC_UIE_ON", 0x7003},
+ {"linux/phantom.h", "PHN_NOT_OH", 0x7004},
+ {"linux/rtc.h", "RTC_UIE_OFF", 0x7004},
+ {"linux/phantom.h", "PHN_GETREG", 0x7005},
+ {"linux/rtc.h", "RTC_PIE_ON", 0x7005},
+ {"linux/phantom.h", "PHN_SETREG", 0x7006},
+ {"linux/rtc.h", "RTC_PIE_OFF", 0x7006},
+ {"linux/phantom.h", "PHN_GETREGS", 0x7007},
+ {"linux/rtc.h", "RTC_ALM_SET", 0x7007},
+ {"linux/phantom.h", "PHN_SETREGS", 0x7008},
+ {"linux/rtc.h", "RTC_ALM_READ", 0x7008},
+ {"linux/rtc.h", "RTC_RD_TIME", 0x7009},
+ {"linux/rtc.h", "RTC_SET_TIME", 0x700a},
+ {"linux/rtc.h", "RTC_IRQP_READ", 0x700b},
+ {"linux/rtc.h", "RTC_IRQP_SET", 0x700c},
+ {"linux/rtc.h", "RTC_EPOCH_READ", 0x700d},
+ {"linux/rtc.h", "RTC_EPOCH_SET", 0x700e},
+ {"linux/rtc.h", "RTC_WIE_ON", 0x700f},
+ {"linux/rtc.h", "RTC_WKALM_SET", 0x700f},
+ {"linux/rtc.h", "RTC_WIE_OFF", 0x7010},
+ {"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},
+ {"linux/ppdev.h", "PPRSTATUS", 0x7081},
+ {"linux/ppdev.h", "PPRCONTROL", 0x7083},
+ {"linux/ppdev.h", "PPWCONTROL", 0x7084},
+ {"linux/ppdev.h", "PPRDATA", 0x7085},
+ {"linux/ppdev.h", "PPWDATA", 0x7086},
+ {"linux/ppdev.h", "PPCLAIM", 0x708b},
+ {"linux/ppdev.h", "PPRELEASE", 0x708c},
+ {"linux/ppdev.h", "PPYIELD", 0x708d},
+ {"linux/ppdev.h", "PPFCONTROL", 0x708e},
+ {"linux/ppdev.h", "PPEXCL", 0x708f},
+ {"linux/ppdev.h", "PPDATADIR", 0x7090},
+ {"linux/ppdev.h", "PPNEGOT", 0x7091},
+ {"linux/ppdev.h", "PPWCTLONIRQ", 0x7092},
+ {"linux/ppdev.h", "PPCLRIRQ", 0x7093},
+ {"linux/ppdev.h", "PPSETPHASE", 0x7094},
+ {"linux/ppdev.h", "PPGETTIME", 0x7095},
+ {"linux/ppdev.h", "PPSETTIME", 0x7096},
+ {"linux/ppdev.h", "PPGETMODES", 0x7097},
+ {"linux/ppdev.h", "PPGETMODE", 0x7098},
+ {"linux/ppdev.h", "PPGETPHASE", 0x7099},
+ {"linux/ppdev.h", "PPGETFLAGS", 0x709a},
+ {"linux/ppdev.h", "PPSETFLAGS", 0x709b},
+ {"linux/pps.h", "PPS_GETPARAMS", 0x70a1},
+ {"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},
+ {"linux/telephony.h", "PHONE_CAPABILITIES_CHECK", 0x7182},
+ {"linux/telephony.h", "PHONE_RING", 0x7183},
+ {"linux/telephony.h", "PHONE_HOOKSTATE", 0x7184},
+ {"linux/telephony.h", "PHONE_MAXRINGS", 0x7185},
+ {"linux/telephony.h", "PHONE_RING_CADENCE", 0x7186},
+ {"linux/telephony.h", "OLD_PHONE_RING_START", 0x7187},
+ {"linux/telephony.h", "PHONE_RING_START", 0x7187},
+ {"linux/telephony.h", "PHONE_RING_STOP", 0x7188},
+ {"linux/telephony.h", "PHONE_REC_CODEC", 0x7189},
+ {"linux/telephony.h", "PHONE_REC_START", 0x718a},
+ {"linux/telephony.h", "PHONE_REC_STOP", 0x718b},
+ {"linux/telephony.h", "PHONE_REC_DEPTH", 0x718c},
+ {"linux/telephony.h", "PHONE_FRAME", 0x718d},
+ {"linux/telephony.h", "PHONE_REC_VOLUME", 0x718e},
+ {"linux/telephony.h", "PHONE_REC_LEVEL", 0x718f},
+ {"linux/telephony.h", "PHONE_PLAY_CODEC", 0x7190},
+ {"linux/telephony.h", "PHONE_PLAY_START", 0x7191},
+ {"linux/telephony.h", "PHONE_PLAY_STOP", 0x7192},
+ {"linux/telephony.h", "PHONE_PLAY_DEPTH", 0x7193},
+ {"linux/telephony.h", "PHONE_PLAY_VOLUME", 0x7194},
+ {"linux/telephony.h", "PHONE_PLAY_LEVEL", 0x7195},
+ {"linux/telephony.h", "PHONE_DTMF_READY", 0x7196},
+ {"linux/telephony.h", "PHONE_GET_DTMF", 0x7197},
+ {"linux/telephony.h", "PHONE_GET_DTMF_ASCII", 0x7198},
+ {"linux/telephony.h", "PHONE_DTMF_OOB", 0x7199},
+ {"linux/telephony.h", "PHONE_EXCEPTION", 0x719a},
+ {"linux/telephony.h", "PHONE_PLAY_TONE", 0x719b},
+ {"linux/telephony.h", "PHONE_SET_TONE_ON_TIME", 0x719c},
+ {"linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", 0x719d},
+ {"linux/telephony.h", "PHONE_GET_TONE_ON_TIME", 0x719e},
+ {"linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", 0x719f},
+ {"linux/telephony.h", "PHONE_GET_TONE_STATE", 0x71a0},
+ {"linux/telephony.h", "PHONE_BUSY", 0x71a1},
+ {"linux/telephony.h", "PHONE_RINGBACK", 0x71a2},
+ {"linux/telephony.h", "PHONE_DIALTONE", 0x71a3},
+ {"linux/telephony.h", "PHONE_CPT_STOP", 0x71a4},
+ {"linux/telephony.h", "PHONE_PSTN_SET_STATE", 0x71a4},
+ {"linux/telephony.h", "PHONE_PSTN_GET_STATE", 0x71a5},
+ {"linux/telephony.h", "PHONE_WINK_DURATION", 0x71a6},
+ {"linux/telephony.h", "PHONE_QUERY_CODEC", 0x71a7},
+ {"linux/telephony.h", "PHONE_PSTN_LINETEST", 0x71a8},
+ {"linux/telephony.h", "PHONE_VAD", 0x71a9},
+ {"linux/telephony.h", "PHONE_WINK", 0x71aa},
+ {"linux/ixjuser.h", "IXJCTL_DSP_RESET", 0x71c0},
+ {"linux/ixjuser.h", "IXJCTL_CARDTYPE", 0x71c1},
+ {"linux/ixjuser.h", "IXJCTL_SERIAL", 0x71c2},
+ {"linux/ixjuser.h", "IXJCTL_DSP_TYPE", 0x71c3},
+ {"linux/ixjuser.h", "IXJCTL_DSP_VERSION", 0x71c4},
+ {"linux/ixjuser.h", "IXJCTL_DSP_IDLE", 0x71c5},
+ {"linux/ixjuser.h", "IXJCTL_TESTRAM", 0x71c6},
+ {"linux/ixjuser.h", "IXJCTL_SET_FILTER", 0x71c7},
+ {"linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", 0x71c8},
+ {"linux/ixjuser.h", "IXJCTL_INIT_TONE", 0x71c9},
+ {"linux/ixjuser.h", "IXJCTL_TONE_CADENCE", 0x71ca},
+ {"linux/ixjuser.h", "IXJCTL_AEC_START", 0x71cb},
+ {"linux/ixjuser.h", "IXJCTL_AEC_STOP", 0x71cc},
+ {"linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", 0x71cd},
+ {"linux/ixjuser.h", "IXJCTL_SET_LED", 0x71ce},
+ {"linux/ixjuser.h", "IXJCTL_MIXER", 0x71cf},
+ {"linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", 0x71d0},
+ {"linux/ixjuser.h", "IXJCTL_PORT", 0x71d1},
+ {"linux/ixjuser.h", "IXJCTL_DAA_AGAIN", 0x71d2},
+ {"linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", 0x71d3},
+ {"linux/ixjuser.h", "IXJCTL_CID", 0x71d4},
+ {"linux/ixjuser.h", "IXJCTL_POTS_PSTN", 0x71d5},
+ {"linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", 0x71d6},
+ {"linux/ixjuser.h", "IXJCTL_PLAY_CID", 0x71d7},
+ {"linux/ixjuser.h", "IXJCTL_VMWI", 0x71d8},
+ {"linux/ixjuser.h", "IXJCTL_CIDCW", 0x71d9},
+ {"linux/ixjuser.h", "IXJCTL_VERSION", 0x71da},
+ {"linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", 0x71db},
+ {"linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", 0x71dc},
+ {"linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", 0x71dd},
+ {"linux/ixjuser.h", "IXJCTL_HZ", 0x71e0},
+ {"linux/ixjuser.h", "IXJCTL_RATE", 0x71e1},
+ {"linux/ixjuser.h", "IXJCTL_FRAMES_READ", 0x71e2},
+ {"linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", 0x71e3},
+ {"linux/ixjuser.h", "IXJCTL_READ_WAIT", 0x71e4},
+ {"linux/ixjuser.h", "IXJCTL_WRITE_WAIT", 0x71e5},
+ {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", 0x71e6},
+ {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", 0x71e7},
+ {"linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", 0x71e8},
+ {"linux/ixjuser.h", "IXJCTL_SIGCTL", 0x71e9},
+ {"linux/ixjuser.h", "IXJCTL_SC_RXG", 0x71ea},
+ {"linux/ixjuser.h", "IXJCTL_SC_TXG", 0x71eb},
+ {"linux/ixjuser.h", "IXJCTL_INTERCOM_START", 0x71fd},
+ {"linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", 0x71fe},
+ {"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x7201},
+ {"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/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},
+ {"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x7483},
+ {"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x7484},
+ {"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x7485},
+ {"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x7486},
+ {"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/fs.h", "FS_IOC32_SETVERSION", 0x7602},
+ {"linux/fs.h", "FS_IOC_SETVERSION", 0x7602},
+ {"linux/sonypi.h", "SONYPI_IOCGBAT1CAP", 0x7602},
+ {"linux/sonypi.h", "SONYPI_IOCGBAT1REM", 0x7603},
+ {"linux/sonypi.h", "SONYPI_IOCGBAT2CAP", 0x7604},
+ {"linux/sonypi.h", "SONYPI_IOCGBAT2REM", 0x7605},
+ {"linux/sonypi.h", "SONYPI_IOCGBATFLAGS", 0x7607},
+ {"linux/sonypi.h", "SONYPI_IOCGBLUE", 0x7608},
+ {"linux/sonypi.h", "SONYPI_IOCSBLUE", 0x7609},
+ {"linux/sonypi.h", "SONYPI_IOCGFAN", 0x760a},
+ {"linux/sonypi.h", "SONYPI_IOCSFAN", 0x760b},
+ {"linux/sonypi.h", "SONYPI_IOCGTEMP", 0x760c},
+ {"linux/meye.h", "MEYEIOC_G_PARAMS", 0x76c0},
+ {"linux/meye.h", "MEYEIOC_S_PARAMS", 0x76c1},
+ {"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x76c2},
+ {"linux/meye.h", "MEYEIOC_SYNC", 0x76c3},
+ {"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4},
+ {"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x76c5},
+ {"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},
+ {"linux/sockios.h", "SIOCGIFNAME", 0x8910},
+ {"linux/sockios.h", "SIOCSIFLINK", 0x8911},
+ {"linux/sockios.h", "SIOCGIFCONF", 0x8912},
+ {"linux/sockios.h", "SIOCGIFFLAGS", 0x8913},
+ {"linux/sockios.h", "SIOCSIFFLAGS", 0x8914},
+ {"linux/sockios.h", "SIOCGIFADDR", 0x8915},
+ {"linux/sockios.h", "SIOCSIFADDR", 0x8916},
+ {"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917},
+ {"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918},
+ {"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919},
+ {"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a},
+ {"linux/sockios.h", "SIOCGIFNETMASK", 0x891b},
+ {"linux/sockios.h", "SIOCSIFNETMASK", 0x891c},
+ {"linux/sockios.h", "SIOCGIFMETRIC", 0x891d},
+ {"linux/sockios.h", "SIOCSIFMETRIC", 0x891e},
+ {"linux/sockios.h", "SIOCGIFMEM", 0x891f},
+ {"linux/sockios.h", "SIOCSIFMEM", 0x8920},
+ {"linux/sockios.h", "SIOCGIFMTU", 0x8921},
+ {"linux/sockios.h", "SIOCSIFMTU", 0x8922},
+ {"linux/sockios.h", "SIOCSIFNAME", 0x8923},
+ {"linux/sockios.h", "SIOCSIFHWADDR", 0x8924},
+ {"linux/sockios.h", "SIOCGIFENCAP", 0x8925},
+ {"linux/sockios.h", "SIOCSIFENCAP", 0x8926},
+ {"linux/sockios.h", "SIOCGIFHWADDR", 0x8927},
+ {"linux/sockios.h", "SIOCGIFSLAVE", 0x8929},
+ {"linux/sockios.h", "SIOCSIFSLAVE", 0x8930},
+ {"linux/sockios.h", "SIOCADDMULTI", 0x8931},
+ {"linux/sockios.h", "SIOCDELMULTI", 0x8932},
+ {"linux/sockios.h", "SIOCGIFINDEX", 0x8933},
+ {"linux/sockios.h", "SIOCSIFPFLAGS", 0x8934},
+ {"linux/sockios.h", "SIOCGIFPFLAGS", 0x8935},
+ {"linux/sockios.h", "SIOCDIFADDR", 0x8936},
+ {"linux/sockios.h", "SIOCSIFHWBROADCAST", 0x8937},
+ {"linux/sockios.h", "SIOCGIFCOUNT", 0x8938},
+ {"linux/sockios.h", "SIOCGIFBR", 0x8940},
+ {"linux/sockios.h", "SIOCSIFBR", 0x8941},
+ {"linux/sockios.h", "SIOCGIFTXQLEN", 0x8942},
+ {"linux/sockios.h", "SIOCSIFTXQLEN", 0x8943},
+ {"linux/sockios.h", "SIOCETHTOOL", 0x8946},
+ {"linux/sockios.h", "SIOCGMIIPHY", 0x8947},
+ {"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},
+ {"linux/sockios.h", "SIOCDRARP", 0x8960},
+ {"linux/sockios.h", "SIOCGRARP", 0x8961},
+ {"linux/sockios.h", "SIOCSRARP", 0x8962},
+ {"linux/sockios.h", "SIOCGIFMAP", 0x8970},
+ {"linux/sockios.h", "SIOCSIFMAP", 0x8971},
+ {"linux/sockios.h", "SIOCADDDLCI", 0x8980},
+ {"linux/sockios.h", "SIOCDELDLCI", 0x8981},
+ {"linux/sockios.h", "SIOCGIFVLAN", 0x8982},
+ {"linux/sockios.h", "SIOCSIFVLAN", 0x8983},
+ {"linux/sockios.h", "SIOCBONDENSLAVE", 0x8990},
+ {"linux/sockios.h", "SIOCBONDRELEASE", 0x8991},
+ {"linux/sockios.h", "SIOCBONDSETHWADDR", 0x8992},
+ {"linux/sockios.h", "SIOCBONDSLAVEINFOQUERY", 0x8993},
+ {"linux/sockios.h", "SIOCBONDINFOQUERY", 0x8994},
+ {"linux/sockios.h", "SIOCBONDCHANGEACTIVE", 0x8995},
+ {"linux/sockios.h", "SIOCBRADDBR", 0x89a0},
+ {"linux/sockios.h", "SIOCBRDELBR", 0x89a1},
+ {"linux/sockios.h", "SIOCBRADDIF", 0x89a2},
+ {"linux/sockios.h", "SIOCBRDELIF", 0x89a3},
+ {"linux/sockios.h", "SIOCSHWTSTAMP", 0x89b0},
+ {"linux/dn.h", "OSIOCSNETADDR", 0x89e0},
+ {"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0},
+ {"linux/dn.h", "SIOCSNETADDR", 0x89e0},
+ {"linux/dn.h", "OSIOCGNETADDR", 0x89e1},
+ {"linux/dn.h", "SIOCGNETADDR", 0x89e1},
+ {"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0},
+ {"linux/wireless.h", "SIOCIWFIRST", 0x8b00},
+ {"linux/wireless.h", "SIOCSIWCOMMIT", 0x8b00},
+ {"linux/wireless.h", "SIOCGIWNAME", 0x8b01},
+ {"linux/wireless.h", "SIOCSIWNWID", 0x8b02},
+ {"linux/wireless.h", "SIOCGIWNWID", 0x8b03},
+ {"linux/wireless.h", "SIOCSIWFREQ", 0x8b04},
+ {"linux/wireless.h", "SIOCGIWFREQ", 0x8b05},
+ {"linux/wireless.h", "SIOCSIWMODE", 0x8b06},
+ {"linux/wireless.h", "SIOCGIWMODE", 0x8b07},
+ {"linux/wireless.h", "SIOCSIWSENS", 0x8b08},
+ {"linux/wireless.h", "SIOCGIWSENS", 0x8b09},
+ {"linux/wireless.h", "SIOCSIWRANGE", 0x8b0a},
+ {"linux/wireless.h", "SIOCGIWRANGE", 0x8b0b},
+ {"linux/wireless.h", "SIOCSIWPRIV", 0x8b0c},
+ {"linux/wireless.h", "SIOCGIWPRIV", 0x8b0d},
+ {"linux/wireless.h", "SIOCSIWSTATS", 0x8b0e},
+ {"linux/wireless.h", "SIOCGIWSTATS", 0x8b0f},
+ {"linux/wireless.h", "SIOCSIWSPY", 0x8b10},
+ {"linux/wireless.h", "SIOCGIWSPY", 0x8b11},
+ {"linux/wireless.h", "SIOCSIWTHRSPY", 0x8b12},
+ {"linux/wireless.h", "SIOCGIWTHRSPY", 0x8b13},
+ {"linux/wireless.h", "SIOCSIWAP", 0x8b14},
+ {"linux/wireless.h", "SIOCGIWAP", 0x8b15},
+ {"linux/wireless.h", "SIOCSIWMLME", 0x8b16},
+ {"linux/wireless.h", "SIOCGIWAPLIST", 0x8b17},
+ {"linux/wireless.h", "SIOCSIWSCAN", 0x8b18},
+ {"linux/wireless.h", "SIOCGIWSCAN", 0x8b19},
+ {"linux/wireless.h", "SIOCSIWESSID", 0x8b1a},
+ {"linux/wireless.h", "SIOCGIWESSID", 0x8b1b},
+ {"linux/wireless.h", "SIOCSIWNICKN", 0x8b1c},
+ {"linux/wireless.h", "SIOCGIWNICKN", 0x8b1d},
+ {"linux/wireless.h", "SIOCSIWRATE", 0x8b20},
+ {"linux/wireless.h", "SIOCGIWRATE", 0x8b21},
+ {"linux/wireless.h", "SIOCSIWRTS", 0x8b22},
+ {"linux/wireless.h", "SIOCGIWRTS", 0x8b23},
+ {"linux/wireless.h", "SIOCSIWFRAG", 0x8b24},
+ {"linux/wireless.h", "SIOCGIWFRAG", 0x8b25},
+ {"linux/wireless.h", "SIOCSIWTXPOW", 0x8b26},
+ {"linux/wireless.h", "SIOCGIWTXPOW", 0x8b27},
+ {"linux/wireless.h", "SIOCSIWRETRY", 0x8b28},
+ {"linux/wireless.h", "SIOCGIWRETRY", 0x8b29},
+ {"linux/wireless.h", "SIOCSIWENCODE", 0x8b2a},
+ {"linux/wireless.h", "SIOCGIWENCODE", 0x8b2b},
+ {"linux/wireless.h", "SIOCSIWPOWER", 0x8b2c},
+ {"linux/wireless.h", "SIOCGIWPOWER", 0x8b2d},
+ {"linux/wireless.h", "SIOCSIWGENIE", 0x8b30},
+ {"linux/wireless.h", "SIOCGIWGENIE", 0x8b31},
+ {"linux/wireless.h", "SIOCSIWAUTH", 0x8b32},
+ {"linux/wireless.h", "SIOCGIWAUTH", 0x8b33},
+ {"linux/wireless.h", "SIOCSIWENCODEEXT", 0x8b34},
+ {"linux/wireless.h", "SIOCGIWENCODEEXT", 0x8b35},
+ {"linux/wireless.h", "SIOCSIWPMKSA", 0x8b36},
+ {"linux/wireless.h", "SIOCIWFIRSTPRIV", 0x8be0},
+ {"linux/wireless.h", "SIOCIWLASTPRIV", 0x8bff},
+ {"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x9360},
+ {"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x9361},
+ {"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_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},
+ {"linux/nbd.h", "NBD_DO_IT", 0xab03},
+ {"linux/nbd.h", "NBD_CLEAR_SOCK", 0xab04},
+ {"linux/nbd.h", "NBD_CLEAR_QUE", 0xab05},
+ {"linux/nbd.h", "NBD_PRINT_DEBUG", 0xab06},
+ {"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},
+ {"linux/kvm.h", "KVM_CREATE_VM", 0xae01},
+ {"linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", 0xae02},
+ {"linux/kvm.h", "KVM_CHECK_EXTENSION", 0xae03},
+ {"linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", 0xae04},
+ {"linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", 0xae05},
+ {"linux/kvm.h", "KVM_S390_ENABLE_SIE", 0xae06},
+ {"linux/kvm.h", "KVM_SET_MEMORY_REGION", 0xae40},
+ {"linux/kvm.h", "KVM_CREATE_VCPU", 0xae41},
+ {"linux/kvm.h", "KVM_GET_DIRTY_LOG", 0xae42},
+ {"linux/kvm.h", "KVM_SET_MEMORY_ALIAS", 0xae43},
+ {"linux/kvm.h", "KVM_SET_NR_MMU_PAGES", 0xae44},
+ {"linux/kvm.h", "KVM_GET_NR_MMU_PAGES", 0xae45},
+ {"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},
+ {"linux/kvm.h", "KVM_SET_IRQCHIP", 0xae63},
+ {"linux/kvm.h", "KVM_CREATE_PIT", 0xae64},
+ {"linux/kvm.h", "KVM_GET_PIT", 0xae65},
+ {"linux/kvm.h", "KVM_SET_PIT", 0xae66},
+ {"linux/kvm.h", "KVM_IRQ_LINE_STATUS", 0xae67},
+ {"linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", 0xae69},
+ {"linux/kvm.h", "KVM_SET_GSI_ROUTING", 0xae6a},
+ {"linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", 0xae70},
+ {"linux/kvm.h", "KVM_REINJECT_CONTROL", 0xae71},
+ {"linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", 0xae72},
+ {"linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", 0xae73},
+ {"linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", 0xae74},
+ {"linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", 0xae75},
+ {"linux/kvm.h", "KVM_IRQFD", 0xae76},
+ {"linux/kvm.h", "KVM_CREATE_PIT2", 0xae77},
+ {"linux/kvm.h", "KVM_SET_BOOT_CPU_ID", 0xae78},
+ {"linux/kvm.h", "KVM_IOEVENTFD", 0xae79},
+ {"linux/kvm.h", "KVM_XEN_HVM_CONFIG", 0xae7a},
+ {"linux/kvm.h", "KVM_SET_CLOCK", 0xae7b},
+ {"linux/kvm.h", "KVM_GET_CLOCK", 0xae7c},
+ {"linux/kvm.h", "KVM_RUN", 0xae80},
+ {"linux/kvm.h", "KVM_GET_REGS", 0xae81},
+ {"linux/kvm.h", "KVM_SET_REGS", 0xae82},
+ {"linux/kvm.h", "KVM_GET_SREGS", 0xae83},
+ {"linux/kvm.h", "KVM_SET_SREGS", 0xae84},
+ {"linux/kvm.h", "KVM_TRANSLATE", 0xae85},
+ {"linux/kvm.h", "KVM_INTERRUPT", 0xae86},
+ {"linux/kvm.h", "KVM_GET_MSRS", 0xae88},
+ {"linux/kvm.h", "KVM_SET_MSRS", 0xae89},
+ {"linux/kvm.h", "KVM_SET_CPUID", 0xae8a},
+ {"linux/kvm.h", "KVM_SET_SIGNAL_MASK", 0xae8b},
+ {"linux/kvm.h", "KVM_GET_FPU", 0xae8c},
+ {"linux/kvm.h", "KVM_SET_FPU", 0xae8d},
+ {"linux/kvm.h", "KVM_GET_LAPIC", 0xae8e},
+ {"linux/kvm.h", "KVM_SET_LAPIC", 0xae8f},
+ {"linux/kvm.h", "KVM_SET_CPUID2", 0xae90},
+ {"linux/kvm.h", "KVM_GET_CPUID2", 0xae91},
+ {"linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", 0xae92},
+ {"linux/kvm.h", "KVM_SET_VAPIC_ADDR", 0xae93},
+ {"linux/kvm.h", "KVM_S390_INTERRUPT", 0xae94},
+ {"linux/kvm.h", "KVM_S390_STORE_STATUS", 0xae95},
+ {"linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", 0xae96},
+ {"linux/kvm.h", "KVM_S390_INITIAL_RESET", 0xae97},
+ {"linux/kvm.h", "KVM_GET_MP_STATE", 0xae98},
+ {"linux/kvm.h", "KVM_SET_MP_STATE", 0xae99},
+ {"linux/kvm.h", "KVM_IA64_VCPU_GET_STACK", 0xae9a},
+ {"linux/kvm.h", "KVM_NMI", 0xae9a},
+ {"linux/kvm.h", "KVM_IA64_VCPU_SET_STACK", 0xae9b},
+ {"linux/kvm.h", "KVM_SET_GUEST_DEBUG", 0xae9b},
+ {"linux/kvm.h", "KVM_X86_SETUP_MCE", 0xae9c},
+ {"linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", 0xae9d},
+ {"linux/kvm.h", "KVM_X86_SET_MCE", 0xae9e},
+ {"linux/kvm.h", "KVM_GET_PIT2", 0xae9f},
+ {"linux/kvm.h", "KVM_GET_VCPU_EVENTS", 0xae9f},
+ {"linux/kvm.h", "KVM_SET_PIT2", 0xaea0},
+ {"linux/kvm.h", "KVM_SET_VCPU_EVENTS", 0xaea0},
+ {"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},
+ {"linux/vhost.h", "VHOST_RESET_OWNER", 0xaf02},
+ {"linux/vhost.h", "VHOST_SET_MEM_TABLE", 0xaf03},
+ {"linux/vhost.h", "VHOST_SET_LOG_BASE", 0xaf04},
+ {"linux/vhost.h", "VHOST_SET_LOG_FD", 0xaf07},
+ {"linux/vhost.h", "VHOST_SET_VRING_NUM", 0xaf10},
+ {"linux/vhost.h", "VHOST_SET_VRING_ADDR", 0xaf11},
+ {"linux/vhost.h", "VHOST_GET_VRING_BASE", 0xaf12},
+ {"linux/vhost.h", "VHOST_SET_VRING_BASE", 0xaf12},
+ {"linux/vhost.h", "VHOST_SET_VRING_KICK", 0xaf20},
+ {"linux/vhost.h", "VHOST_SET_VRING_CALL", 0xaf21},
+ {"linux/vhost.h", "VHOST_SET_VRING_ERR", 0xaf22},
+ {"linux/vhost.h", "VHOST_NET_SET_BACKEND", 0xaf30},
+ {"linux/if_pppox.h", "PPPOEIOCSFWD", 0xb100},
+ {"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101},
+ {"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},
+ {"video/sisfb.h", "SISFB_GET_VBRSTATUS", 0xf302},
+ {"video/sisfb.h", "SISFB_GET_AUTOMAXIMIZE", 0xf303},
+ {"video/sisfb.h", "SISFB_SET_AUTOMAXIMIZE", 0xf303},
+ {"video/sisfb.h", "SISFB_GET_TVPOSOFFSET", 0xf304},
+ {"video/sisfb.h", "SISFB_SET_TVPOSOFFSET", 0xf304},
+ {"video/sisfb.h", "SISFB_COMMAND", 0xf305},
+ {"video/sisfb.h", "SISFB_SET_LOCK", 0xf306},
+ {"video/mbxfb.h", "MBXFB_IOCX_OVERLAY", 0xf400},
+ {"video/mbxfb.h", "MBXFB_IOCG_ALPHA", 0xf401},
+ {"video/mbxfb.h", "MBXFB_IOCS_ALPHA", 0xf402},
+ {"video/mbxfb.h", "MBXFB_IOCS_PLANEORDER", 0xf403},
+ {"video/mbxfb.h", "MBXFB_IOCS_REG", 0xf404},
+ {"video/mbxfb.h", "MBXFB_IOCX_REG", 0xf405},
+ {"linux/dm-ioctl.h", "DM_VERSION", 0xfd00},
+ {"linux/dm-ioctl.h", "DM_REMOVE_ALL", 0xfd01},
+ {"linux/dm-ioctl.h", "DM_LIST_DEVICES", 0xfd02},
+ {"linux/dm-ioctl.h", "DM_DEV_CREATE", 0xfd03},
+ {"linux/dm-ioctl.h", "DM_DEV_REMOVE", 0xfd04},
+ {"linux/dm-ioctl.h", "DM_DEV_RENAME", 0xfd05},
+ {"linux/dm-ioctl.h", "DM_DEV_SUSPEND", 0xfd06},
+ {"linux/dm-ioctl.h", "DM_DEV_STATUS", 0xfd07},
+ {"linux/dm-ioctl.h", "DM_DEV_WAIT", 0xfd08},
+ {"linux/dm-ioctl.h", "DM_TABLE_LOAD", 0xfd09},
+ {"linux/dm-ioctl.h", "DM_TABLE_CLEAR", 0xfd0a},
+ {"linux/dm-ioctl.h", "DM_TABLE_DEPS", 0xfd0b},
+ {"linux/dm-ioctl.h", "DM_TABLE_STATUS", 0xfd0c},
+ {"linux/dm-ioctl.h", "DM_LIST_VERSIONS", 0xfd0d},
+ {"linux/dm-ioctl.h", "DM_TARGET_MSG", 0xfd0e},
+ {"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY", 0xfd0f},
diff --git a/linux/kexec.h b/linux/kexec.h
new file mode 100644
index 0000000..767ccb5
--- /dev/null
+++ b/linux/kexec.h
@@ -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 */
diff --git a/linux/keyctl.h b/linux/keyctl.h
new file mode 100644
index 0000000..840cb99
--- /dev/null
+++ b/linux/keyctl.h
@@ -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 */
diff --git a/linux/m68k/ioctlent.h.in b/linux/m68k/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/m68k/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h
new file mode 100644
index 0000000..adf9f5b
--- /dev/null
+++ b/linux/m68k/syscallent.h
@@ -0,0 +1,479 @@
+/*
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.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.
+ */
+
+ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "chown" }, /* 16 */
+ { 0, TM, sys_break, "break" }, /* 17 */
+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { 2, 0, sys_stty, "stty" }, /* 31 */
+ { 2, 0, sys_gtty, "gtty" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 0, 0, sys_ftime, "ftime" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 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, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { 0, 0, sys_lock, "lock" }, /* 53 */
+ { 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 */
+ { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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, "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 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 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 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 3, TD, sys_readdir, "readdir" }, /* 89 */
+ { 1, TD|TM, sys_old_mmap, "old_mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { 1, 0, sys_olduname, "olduname" }, /* 109 */
+ { 1, 0, sys_iopl, "iopl" }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { 1, 0, sys_vm86old, "vm86old" }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 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, TM, 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, 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" }, /* 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, 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, 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, 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 */
+ { 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" }, /* 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 */
+ { 2, 0, sys_capset, "capset" }, /* 185 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
+ { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */
+ { 3, TF, sys_truncate64, "truncate64" }, /* 193 */
+ { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+ { 3, TF, sys_chown, "chown32" }, /* 198 */
+ { 0, NF, sys_getuid, "getuid32" }, /* 199 */
+ { 0, NF, sys_getgid, "getgid32" }, /* 200 */
+ { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */
+ { 0, NF, sys_geteuid, "getegid32" }, /* 202 */
+ { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */
+ { 2, 0, sys_setregid, "setregid32" }, /* 204 */
+ { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
+ { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
+ { 3, TD, sys_fchown, "fchown32" }, /* 207 */
+ { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
+ { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
+ { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
+ { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */
+ { 3, TF, sys_chown, "lchown32" }, /* 212 */
+ { 1, 0, sys_setuid, "setuid32" }, /* 213 */
+ { 1, 0, sys_setgid, "setgid32" }, /* 214 */
+ { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
+ { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+ { 5, 0, NULL, NULL }, /* 218 */
+ { 5, 0, NULL, NULL }, /* 219 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 220 */
+ { 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, TD, sys_fsetxattr, "fsetxattr" }, /* 225 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 226 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 227 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 228 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 229 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 230 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 231 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 232 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 233 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 234 */
+ { 6, 0, sys_futex, "futex" }, /* 235 */
+ { 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, sys_lookup_dcookie, "lookup_dcookie"}, /* 248 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 249 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */
+ { 5, TM, 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 257 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 258 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 259 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 260 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 263 */
+ { 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, 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 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */
+ { 5, TP, sys_waitid, "waitid" }, /* 277 */
+ { 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, 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 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 291 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 292 */
+ { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 293 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 294 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 295 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 296 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 297 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 298 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 299 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 300 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 301 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 302 */
+ { 1, TP, sys_unshare, "unshare" }, /* 303 */
+ { 2, 0, 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 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 313 */
+ { 3, 0, sys_getcpu, "getcpu" }, /* 314 */
+ { 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 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 319 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 320 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 321 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 322 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 323 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 324 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 325 */
+ { 3, TD, sys_dup3, "dup3" }, /* 326 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 327 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 328 */
+ { 5, TD, 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, 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 */
+ { 5, 0, NULL, NULL }, /* 349 */
+ { 5, 0, NULL, NULL }, /* 350 */
+ { 5, 0, NULL, NULL }, /* 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 */
+ { 2, TN, sys_listen, "listen" }, /* 404 */
+ { 3, TN, sys_accept, "accept" }, /* 405 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 406 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 407 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 408 */
+ { 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 */
+ { 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
+ { 4, 0, printargs, "ipc_subcall" }, /* 420 */
+ { 4, TI, sys_semop, "semop" }, /* 421 */
+ { 4, TI, sys_semget, "semget" }, /* 422 */
+ { 4, TI, sys_semctl, "semctl" }, /* 423 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 425 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 426 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 427 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 428 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 429 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 430 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
+ { 4, TI, sys_msgget, "msgget" }, /* 433 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 434 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 435 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 436 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 437 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 438 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 439 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 440 */
+ { 4, TI, sys_shmat, "shmat" }, /* 441 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 442 */
+ { 4, TI, sys_shmget, "shmget" }, /* 443 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 444 */
diff --git a/linux/metag/ioctlent.h.in b/linux/metag/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/metag/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/metag/syscallent.h b/linux/metag/syscallent.h
new file mode 100644
index 0000000..6216ac6
--- /dev/null
+++ b/linux/metag/syscallent.h
@@ -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, sys_exit, "exit" }, /* 93 */
+ { 1, TP, 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, sys_shmat, "shmat" }, /* 196 */
+ { 1, TI, 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, sys_brk, "brk" }, /* 214 */
+ { 2, TM, sys_munmap, "munmap" }, /* 215 */
+ { 5, TM, 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, sys_execve, "execve" }, /* 221 */
+ { 6, TD|TM, 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, 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, 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 */
diff --git a/linux/microblaze/ioctlent.h.in b/linux/microblaze/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/microblaze/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h
new file mode 100644
index 0000000..38f8bba
--- /dev/null
+++ b/linux/microblaze/syscallent.h
@@ -0,0 +1,409 @@
+/*
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.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.
+ */
+
+ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { 0, TM, sys_break, "break" }, /* 17 */
+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { 2, 0, sys_stty, "stty" }, /* 31 */
+ { 2, 0, sys_gtty, "gtty" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 0, 0, sys_ftime, "ftime" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 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, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { 0, 0, sys_lock, "lock" }, /* 53 */
+ { 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 */
+ { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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, "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 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 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 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 3, TD, sys_readdir, "readdir" }, /* 89 */
+ { 6, TD|TM, sys_mmap, "old_mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { 1, 0, sys_olduname, "olduname" }, /* 109 */
+ { 1, 0, sys_iopl, "iopl" }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { 1, 0, sys_vm86old, "vm86old" }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 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, TM, 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, 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" }, /* 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, 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, sys_mremap, "mremap" }, /* 163 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 164 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 165 */
+ { 5, 0, sys_vm86, "vm86" }, /* 166 */
+ { 5, 0, sys_query_module, "query_module" }, /* 167 */
+ { 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 */
+ { 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" }, /* 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 */
+ { 2, 0, sys_capset, "capset" }, /* 185 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
+ { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 192 */
+ { 3, TF, sys_truncate64, "truncate64" }, /* 193 */
+ { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+ { 3, TF, sys_chown, "lchown32" }, /* 198 */
+ { 0, NF, sys_getuid, "getuid32" }, /* 199 */
+ { 0, NF, sys_getgid, "getgid32" }, /* 200 */
+ { 0, NF, sys_geteuid, "geteuid32" }, /* 201 */
+ { 0, NF, sys_geteuid, "getegid32" }, /* 202 */
+ { 2, 0, sys_setreuid, "setreuid32" }, /* 203 */
+ { 2, 0, sys_setregid, "setregid32" }, /* 204 */
+ { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
+ { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
+ { 3, TD, sys_fchown, "fchown32" }, /* 207 */
+ { 3, 0, sys_setresuid, "setresuid32" }, /* 208 */
+ { 3, 0, sys_getresuid, "getresuid32" }, /* 209 */
+ { 3, 0, sys_setresgid, "setresgid32" }, /* 210 */
+ { 3, 0, sys_getresgid, "getresgid32" }, /* 211 */
+ { 3, TF, sys_chown, "chown32" }, /* 212 */
+ { 1, 0, sys_setuid, "setuid32" }, /* 213 */
+ { 1, 0, sys_setgid, "setgid32" }, /* 214 */
+ { 1, NF, sys_setfsuid, "setfsuid32" }, /* 215 */
+ { 1, NF, sys_setfsgid, "setfsgid32" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+ { 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, 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, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 229 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 232 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 235 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */
+ { 2, TS, sys_kill, "tkill" }, /* 238 */
+ { 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 */
+ { 1, 0, sys_set_thread_area, "set_thread_area"}, /* 243 */
+ { 1, 0, sys_get_thread_area, "get_thread_area"}, /* 244 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 245 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 248 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
+ { 5, TD, sys_fadvise64, "fadvise64" }, /* 250 */
+ { 0, 0, NULL, NULL }, /* 251 */
+ { 1, TP, 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, TM, 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 262 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 263 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 264 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 265 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 266 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 267 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 268 */
+ { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 269 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 270 */
+ { 2, TF, sys_utimes, "utimes" }, /* 271 */
+ { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 272 */
+ { 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 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 283 */
+ { 5, TP, sys_waitid, "waitid" }, /* 284 */
+ { 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, 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 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */
+ { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 300 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */
+ { 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, 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 */
+ { 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, 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 */
+ { 4, TI, sys_semctl, "semctl" }, /* 328 */
+ { 4, TI, sys_semget, "semget" }, /* 329 */
+ { 4, TI, sys_semop, "semop" }, /* 330 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 331 */
+ { 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, sys_shmctl, "shmctl" }, /* 336 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 337 */
+ { 4, TI, sys_shmget, "shmget" }, /* 338 */
+ { 4, TD|TS, printargs, "signalfd4" }, /* 339 */
+ { 2, TD, printargs, "eventfd2" }, /* 340 */
+ { 1, TD, printargs, "epoll_create1" }, /* 341 */
+ { 3, TD, printargs, "dup3" }, /* 342 */
+ { 2, TD, printargs, "pipe2" }, /* 343 */
+ { 1, TD, printargs, "inotify_init1" }, /* 344 */
+ { 3, TN, sys_socket, "socket" }, /* 345 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 346 */
+ { 3, TN, sys_bind, "bind" }, /* 347 */
+ { 2, TN, sys_listen, "listen" }, /* 348 */
+ { 3, TN, sys_accept, "accept" }, /* 349 */
+ { 3, TN, sys_connect, "connect" }, /* 350 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 351 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 352 */
+ { 6, TN, sys_sendto, "sendto" }, /* 353 */
+ { 4, TN, sys_send, "send" }, /* 354 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 355 */
+ { 4, TN, sys_recv, "recv" }, /* 356 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 357 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 358 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 359 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 360 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 361 */
+ { 4, TN, sys_accept4, "accept4" }, /* 362 */
+ { 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, 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 */
diff --git a/linux/mips/ioctlent.h.in b/linux/mips/ioctlent.h.in
new file mode 100644
index 0000000..15808a6
--- /dev/null
+++ b/linux/mips/ioctlent.h.in
@@ -0,0 +1,59 @@
+ {"asm/ioctls.h", "TCGETS", 0x5401},
+ {"asm/ioctls.h", "TCSETS", 0x5402},
+ {"asm/ioctls.h", "TCSETSW", 0x5403},
+ {"asm/ioctls.h", "TCSETSF", 0x5404},
+ {"asm/ioctls.h", "TCGETA", 0x5405},
+ {"asm/ioctls.h", "TCSETA", 0x5406},
+ {"asm/ioctls.h", "TCSETAW", 0x5407},
+ {"asm/ioctls.h", "TCSETAF", 0x5408},
+ {"asm/ioctls.h", "TCSBRK", 0x5409},
+ {"asm/ioctls.h", "TCXONC", 0x540a},
+ {"asm/ioctls.h", "TCFLSH", 0x540b},
+ {"asm/ioctls.h", "TIOCEXCL", 0x540c},
+ {"asm/ioctls.h", "TIOCNXCL", 0x540d},
+ {"asm/ioctls.h", "TIOCSCTTY", 0x540e},
+ {"asm/ioctls.h", "TIOCGPGRP", 0x540f},
+ {"asm/ioctls.h", "TIOCSPGRP", 0x5410},
+ {"asm/ioctls.h", "TIOCOUTQ", 0x5411},
+ {"asm/ioctls.h", "TIOCSTI", 0x5412},
+ {"asm/ioctls.h", "TIOCGWINSZ", 0x5413},
+ {"asm/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/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/ioctls.h", "FIONBIO", 0x5421},
+ {"asm/ioctls.h", "TIOCNOTTY", 0x5422},
+ {"asm/ioctls.h", "TIOCSETD", 0x5423},
+ {"asm/ioctls.h", "TIOCGETD", 0x5424},
+ {"asm/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
+ {"asm/ioctls.h", "TIOCSBRK", 0x5427},
+ {"asm/ioctls.h", "TIOCCBRK", 0x5428},
+ {"asm/ioctls.h", "TIOCGSID", 0x5429},
+ {"asm/ioctls.h", "TIOCGPTN", 0x5430},
+ {"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
+ {"asm/ioctls.h", "FIONCLEX", 0x5450},
+ {"asm/ioctls.h", "FIOCLEX", 0x5451},
+ {"asm/ioctls.h", "FIOASYNC", 0x5452},
+ {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e},
+ {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f},
diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h
index c23ac14..0608f9d 100644
--- a/linux/mips/syscallent-o32.h
+++ b/linux/mips/syscallent-o32.h
@@ -305,7 +305,7 @@
{ 5, TD, sys_ppoll, "ppoll" }, /* 4302 */
{ 1, TP, sys_unshare, "unshare" }, /* 4303 */
{ 6, TD, sys_splice, "splice" }, /* 4304 */
- { 6, TD, sys_sync_file_range, "sync_file_range" }, /* 4305 */
+ { 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 */
@@ -337,7 +337,7 @@
{ 4, TN, sys_accept4, "accept4" }, /* 4334 */
{ 5, TN, sys_recvmmsg, "recvmmsg" }, /* 4335 */
{ 2, TD, sys_fanotify_init, "fanotify_init" }, /* 4336 */
- { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 4337 */
+ { 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 */
@@ -687,7 +687,7 @@
{ 4, TN, printargs, "o32_accept4" }, /* 4334 */
{ 5, TN, printargs, "o32_recvmmsg" }, /* 4335 */
{ 2, TD, printargs, "o32_fanotify_init" }, /* 4336 */
- { 5, TD|TF, printargs, "o32_fanotify_mark" }, /* 4337 */
+ { 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 */
diff --git a/linux/or1k/ioctlent.h.in b/linux/or1k/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/or1k/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h
new file mode 100644
index 0000000..a45c52f
--- /dev/null
+++ b/linux/or1k/syscallent.h
@@ -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, sys_exit, "exit" }, /* 93 */
+ { 1, TP, 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, sys_shmat, "shmat" }, /* 196 */
+ { 4, TI, 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, sys_brk, "brk" }, /* 214 */
+ { 2, TM, sys_munmap, "munmap" }, /* 215 */
+ { 5, TM, 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, sys_execve, "execve" }, /* 221 */
+ { 6, TD|TM, 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, 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, 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 */
diff --git a/linux/personality.h b/linux/personality.h
new file mode 100644
index 0000000..9971703
--- /dev/null
+++ b/linux/personality.h
@@ -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 */
diff --git a/linux/powerpc/errnoent1.h b/linux/powerpc/errnoent1.h
new file mode 100644
index 0000000..441c66b
--- /dev/null
+++ b/linux/powerpc/errnoent1.h
@@ -0,0 +1 @@
+#include "../errnoent.h"
diff --git a/linux/powerpc/ioctlent.h.in b/linux/powerpc/ioctlent.h.in
new file mode 100644
index 0000000..510f5aa
--- /dev/null
+++ b/linux/powerpc/ioctlent.h.in
@@ -0,0 +1,84 @@
+ {"asm/ioctls.h", "TIOCEXCL", 0x540c},
+ {"asm/ioctls.h", "TIOCNXCL", 0x540d},
+ {"asm/ioctls.h", "TIOCSCTTY", 0x540e},
+ {"asm/ioctls.h", "TIOCSTI", 0x5412},
+ {"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/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/ioctls.h", "TIOCNOTTY", 0x5422},
+ {"asm/ioctls.h", "TIOCSETD", 0x5423},
+ {"asm/ioctls.h", "TIOCGETD", 0x5424},
+ {"asm/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm/ioctls.h", "TIOCSBRK", 0x5427},
+ {"asm/ioctls.h", "TIOCCBRK", 0x5428},
+ {"asm/ioctls.h", "TIOCGSID", 0x5429},
+ {"asm/ioctls.h", "TIOCGRS485", 0x542e},
+ {"asm/ioctls.h", "TIOCSRS485", 0x542f},
+ {"asm/ioctls.h", "TIOCGPTN", 0x5430},
+ {"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
+ {"asm/ioctls.h", "TIOCSIG", 0x5436},
+ {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm/ioctls.h", "FIOCLEX", 0x6601},
+ {"asm/ioctls.h", "FIONCLEX", 0x6602},
+ {"asm/ioctls.h", "FIOASYNC", 0x667d},
+ {"asm/ioctls.h", "FIONBIO", 0x667e},
+ {"asm/ioctls.h", "FIONREAD", 0x667f},
+ {"asm/ioctls.h", "FIOQSIZE", 0x6680},
+ {"asm/nvram.h", "IOC_NVRAM_GET_OFFSET", 0x7042},
+ {"asm/nvram.h", "IOC_NVRAM_SYNC", 0x7043},
+ {"asm/ps3fb.h", "PS3FB_IOCTL_SETMODE", 0x7201},
+ {"asm/ps3fb.h", "PS3FB_IOCTL_GETMODE", 0x7202},
+ {"asm/ps3fb.h", "PS3FB_IOCTL_SCREENINFO", 0x7203},
+ {"asm/ps3fb.h", "PS3FB_IOCTL_ON", 0x7204},
+ {"asm/ps3fb.h", "PS3FB_IOCTL_OFF", 0x7205},
+ {"asm/ps3fb.h", "PS3FB_IOCTL_FSEL", 0x7206},
+ {"asm/ioctls.h", "TIOCGETP", 0x7408},
+ {"asm/ioctls.h", "TIOCSETP", 0x7409},
+ {"asm/ioctls.h", "TIOCSETN", 0x740a},
+ {"asm/ioctls.h", "TIOCSETC", 0x7411},
+ {"asm/ioctls.h", "TIOCGETC", 0x7412},
+ {"asm/ioctls.h", "TCGETS", 0x7413},
+ {"asm/ioctls.h", "TCSETS", 0x7414},
+ {"asm/ioctls.h", "TCSETSW", 0x7415},
+ {"asm/ioctls.h", "TCSETSF", 0x7416},
+ {"asm/ioctls.h", "TCGETA", 0x7417},
+ {"asm/ioctls.h", "TCSETA", 0x7418},
+ {"asm/ioctls.h", "TCSETAW", 0x7419},
+ {"asm/ioctls.h", "TCSETAF", 0x741c},
+ {"asm/ioctls.h", "TCSBRK", 0x741d},
+ {"asm/ioctls.h", "TCXONC", 0x741e},
+ {"asm/ioctls.h", "TCFLSH", 0x741f},
+ {"asm/ioctls.h", "TIOCSWINSZ", 0x7467},
+ {"asm/ioctls.h", "TIOCGWINSZ", 0x7468},
+ {"asm/ioctls.h", "TIOCSTART", 0x746e},
+ {"asm/ioctls.h", "TIOCSTOP", 0x746f},
+ {"asm/ioctls.h", "TIOCOUTQ", 0x7473},
+ {"asm/ioctls.h", "TIOCGLTC", 0x7474},
+ {"asm/ioctls.h", "TIOCSLTC", 0x7475},
+ {"asm/ioctls.h", "TIOCSPGRP", 0x7476},
+ {"asm/ioctls.h", "TIOCGPGRP", 0x7477},
+ {"asm/sockios.h", "FIOSETOWN", 0x8901},
+ {"asm/sockios.h", "SIOCSPGRP", 0x8902},
+ {"asm/sockios.h", "FIOGETOWN", 0x8903},
+ {"asm/sockios.h", "SIOCGPGRP", 0x8904},
+ {"asm/sockios.h", "SIOCATMARK", 0x8905},
+ {"asm/sockios.h", "SIOCGSTAMP", 0x8906},
+ {"asm/sockios.h", "SIOCGSTAMPNS", 0x8907},
diff --git a/linux/powerpc/ioctlent1.h b/linux/powerpc/ioctlent1.h
new file mode 100644
index 0000000..72eeaf1
--- /dev/null
+++ b/linux/powerpc/ioctlent1.h
@@ -0,0 +1 @@
+#include "ioctlent.h"
diff --git a/linux/powerpc/signalent1.h b/linux/powerpc/signalent1.h
new file mode 100644
index 0000000..d31e6a4
--- /dev/null
+++ b/linux/powerpc/signalent1.h
@@ -0,0 +1 @@
+#include "../signalent.h"
diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h
new file mode 100644
index 0000000..6f0cb7c
--- /dev/null
+++ b/linux/powerpc/syscallent.h
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.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.
+ */
+
+ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */
+ { 1, TP, sys_exit, "exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { 0, TM, sys_break, "break" }, /* 17 */
+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { 2, 0, sys_stty, "stty" }, /* 31 */
+ { 2, 0, sys_gtty, "gtty" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 0, 0, sys_ftime, "ftime" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 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, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { 0, 0, sys_lock, "lock" }, /* 53 */
+ { 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 */
+ { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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, "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 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "oldgetrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 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 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 3, TD, sys_readdir, "readdir" }, /* 89 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { 1, 0, sys_olduname, "olduname" }, /* 109 */
+ { 5, 0, printargs, "iopl" }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { 5, 0, sys_vm86, "vm86" }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 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 */
+ { 5, 0, printargs, "modify_ldt" }, /* 123 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
+ { 3, TM, 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, 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" }, /* 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, 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 2, TM, sys_mlock, "mlock" }, /* 150 */
+ { 2, TM, sys_munlock, "munlock" }, /* 151 */
+ { 1, TM, sys_mlockall, "mlockall" }, /* 152 */
+ { 0, 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler" }, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, sys_mremap, "mremap" }, /* 163 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 164 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 165 */
+ { 5, 0, sys_query_module, "query_module" }, /* 166 */
+ { 3, TD, sys_poll, "poll" }, /* 167 */
+ { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 168 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 169 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 170 */
+ { 5, 0, sys_prctl, "prctl" }, /* 171 */
+ { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 172 */
+ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 173 */
+ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask" }, /* 174 */
+ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 175 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait" }, /* 176 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo" }, /* 177 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 178 */
+ { 6, TD, sys_pread, "pread64" }, /* 179 */
+ { 6, TD, sys_pwrite, "pwrite64" }, /* 180 */
+ { 3, TF, sys_chown, "chown" }, /* 181 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 182 */
+ { 2, 0, sys_capget, "capget" }, /* 183 */
+ { 2, 0, sys_capset, "capset" }, /* 184 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 185 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 186 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 187 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 188 */
+ { 0, TP, sys_vfork, "vfork" }, /* 189 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 190 */
+ { 5, TD, sys_readahead, "readahead" }, /* 190 */
+ { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 192 */
+ { 4, TF, sys_truncate64, "truncate64" }, /* 193 */
+ { 4, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+ { 5, 0, printargs, "pciconfig_read" }, /* 198 */
+ { 5, 0, printargs, "pciconfig_write" }, /* 199 */
+ { 3, 0, printargs, "pciconfig_iobase" }, /* 200 */
+ { 6, 0, printargs, "MOL" }, /* 201 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 202 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 203 */
+ { 3, TD, sys_fcntl, "fcntl64" }, /* 204 */
+ { 3, TM, sys_madvise, "madvise" }, /* 205 */
+ { 3, TM, sys_mincore, "mincore" }, /* 206 */
+ { 0, 0, sys_gettid, "gettid" }, /* 207 */
+ { 2, TS, sys_kill, "tkill" }, /* 208 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 209 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 210 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 211 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 212 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 213 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 214 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 215 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 216 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 217 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 218 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 219 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 220 */
+ { 6, 0, sys_futex, "futex" }, /* 221 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" }, /* 222 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" }, /* 223 */
+ { 5, 0, NULL, NULL }, /* 224 */
+ { 5, 0, printargs, "tux" }, /* 225 */
+ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 226 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 227 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 228 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 229 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 230 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 231 */
+ { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 232 */
+ { 6, TD, sys_fadvise64, "fadvise64" }, /* 233 */
+ { 1, TP, sys_exit, "exit_group" }, /* 234 */
+ { 4, 0, sys_lookup_dcookie, "lookup_dcookie" }, /* 235 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 236 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 237 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 238 */
+ { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 239 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 240 */
+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 241 */
+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 242 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun" }, /* 243 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 244 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 245 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 246 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 247 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep" }, /* 248 */
+ { 2, 0, printargs, "swapcontext" }, /* 249 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 250 */
+ { 2, TF, sys_utimes, "utimes" }, /* 251 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 252 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 253 */
+ { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 254 */
+ { 1, 0, printargs, "rtas" }, /* 255 */
+ { 5, 0, printargs, "debug_setcontext" }, /* 256 */
+ { 5, 0, sys_vserver, "vserver" }, /* 257 */
+ { 5, TM, sys_migrate_pages, "migrate_pages" }, /* 258 */
+ { 6, TM, sys_mbind, "mbind" }, /* 259 */
+ { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 260 */
+ { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 261 */
+ { 4, 0, sys_mq_open, "mq_open" }, /* 262 */
+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 263 */
+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 264 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 265 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 266 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 267 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 268 */
+ { 5, 0, sys_add_key, "add_key" }, /* 269 */
+ { 4, 0, sys_request_key, "request_key" }, /* 270 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 271 */
+ { 5, TP, sys_waitid, "waitid" }, /* 272 */
+ { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 273 */
+ { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 274 */
+ { 0, TD, sys_inotify_init, "inotify_init" }, /* 275 */
+ { 3, TD, sys_inotify_add_watch, "inotify_add_watch" }, /* 276 */
+ { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 277 */
+ { 5, 0, printargs, "spu_run" }, /* 278 */
+ { 5, 0, printargs, "spu_create" }, /* 279 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 280 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 281 */
+ { 1, TP, sys_unshare, "unshare" }, /* 282 */
+ { 6, TD, sys_splice, "splice" }, /* 283 */
+ { 4, TD, sys_tee, "tee" }, /* 284 */
+ { 4, TD, sys_vmsplice, "vmsplice" }, /* 285 */
+ { 4, TD|TF, sys_openat, "openat" }, /* 286 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 287 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 288 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 289 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 290 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 291 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 292 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 293 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 294 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 295 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 296 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 297 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 298 */
+ { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 299 */
+ { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 300 */
+ { 6, TM, sys_move_pages, "move_pages" }, /* 301 */
+ { 3, 0, sys_getcpu, "getcpu" }, /* 302 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 303 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 304 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 305 */
+ { 2, TD, sys_timerfd_create, "timerfd_create" }, /* 306 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 307 */
+ { 6, TD, sys_sync_file_range2, "sync_file_range2" }, /* 308 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 309 */
+ { 3, 0, sys_subpage_prot, "subpage_prot" }, /* 310 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime" }, /* 311 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime" }, /* 312 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 313 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 314 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 315 */
+ { 3, TD, sys_dup3, "dup3" }, /* 316 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 317 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 318 */
+ { 5, TD, sys_perf_event_open, "perf_event_open" }, /* 319 */
+ { 6, TD, sys_preadv, "preadv" }, /* 320 */
+ { 6, TD, sys_pwritev, "pwritev" }, /* 321 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" }, /* 322 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 323 */
+ { 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 324 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 325 */
+ { 3, TN, sys_socket, "socket" }, /* 326 */
+ { 3, TN, sys_bind, "bind" }, /* 327 */
+ { 3, TN, sys_connect, "connect" }, /* 328 */
+ { 2, TN, sys_listen, "listen" }, /* 329 */
+ { 3, TN, sys_accept, "accept" }, /* 330 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 331 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 332 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 333 */
+ { 4, TN, sys_send, "send" }, /* 334 */
+ { 6, TN, sys_sendto, "sendto" }, /* 335 */
+ { 4, TN, sys_recv, "recv" }, /* 336 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 337 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 338 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 339 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 340 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 341 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 342 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 343 */
+ { 4, TN, sys_accept4, "accept4" }, /* 344 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at" }, /* 345 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at" }, /* 346 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 347 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 348 */
+ { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 349 */
+ { 2, TD, sys_setns, "setns" }, /* 350 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 351 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 352 */
+ { 5, 0, sys_kcmp, "kcmp" }, /* 353 */
+ { 3, TD, sys_finit_module, "finit_module" }, /* 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 */
+ { 2, TN, sys_listen, "listen" }, /* 404 */
+ { 3, TN, sys_accept, "accept" }, /* 405 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 406 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 407 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 408 */
+ { 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 */
+ { 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
+ { 4, 0, printargs, "ipc_subcall" }, /* 420 */
+ { 4, TI, sys_semop, "semop" }, /* 421 */
+ { 4, TI, sys_semget, "semget" }, /* 422 */
+ { 4, TI, sys_semctl, "semctl" }, /* 423 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 425 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 426 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 427 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 428 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 429 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 430 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
+ { 4, TI, sys_msgget, "msgget" }, /* 433 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 434 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 435 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 436 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 437 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 438 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 439 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 440 */
+ { 4, TI, sys_shmat, "shmat" }, /* 441 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 442 */
+ { 4, TI, sys_shmget, "shmget" }, /* 443 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 444 */
+ { 5, 0, NULL, NULL }, /* 445 */
+ { 5, 0, NULL, NULL }, /* 446 */
+ { 5, 0, NULL, NULL }, /* 447 */
+ { 5, 0, NULL, NULL }, /* 448 */
+ { 5, 0, NULL, NULL }, /* 449 */
diff --git a/linux/powerpc/syscallent1.h b/linux/powerpc/syscallent1.h
new file mode 100644
index 0000000..49ccb8a
--- /dev/null
+++ b/linux/powerpc/syscallent1.h
@@ -0,0 +1 @@
+#include "syscallent.h"
diff --git a/linux/ptp_clock.h b/linux/ptp_clock.h
new file mode 100644
index 0000000..b65c834
--- /dev/null
+++ b/linux/ptp_clock.h
@@ -0,0 +1,98 @@
+/*
+ * PTP 1588 clock support - user space interface
+ *
+ * Copyright (C) 2010 OMICRON electronics GmbH
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _PTP_CLOCK_H_
+#define _PTP_CLOCK_H_
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+/* PTP_xxx bits, for the flags field within the request structures. */
+#define PTP_ENABLE_FEATURE (1<<0)
+#define PTP_RISING_EDGE (1<<1)
+#define PTP_FALLING_EDGE (1<<2)
+
+/*
+ * struct ptp_clock_time - represents a time value
+ *
+ * The sign of the seconds field applies to the whole value. The
+ * nanoseconds field is always unsigned. The reserved field is
+ * included for sub-nanosecond resolution, should the demand for
+ * this ever appear.
+ *
+ */
+struct ptp_clock_time {
+ __s64 sec; /* seconds */
+ __u32 nsec; /* nanoseconds */
+ __u32 reserved;
+};
+
+struct ptp_clock_caps {
+ int max_adj; /* Maximum frequency adjustment in parts per billon. */
+ int n_alarm; /* Number of programmable alarms. */
+ int n_ext_ts; /* Number of external time stamp channels. */
+ int n_per_out; /* Number of programmable periodic signals. */
+ int pps; /* Whether the clock supports a PPS callback. */
+ int rsv[15]; /* Reserved for future use. */
+};
+
+struct ptp_extts_request {
+ unsigned int index; /* Which channel to configure. */
+ unsigned int flags; /* Bit field for PTP_xxx flags. */
+ unsigned int rsv[2]; /* Reserved for future use. */
+};
+
+struct ptp_perout_request {
+ struct ptp_clock_time start; /* Absolute start time. */
+ struct ptp_clock_time period; /* Desired period, zero means disable. */
+ unsigned int index; /* Which channel to configure. */
+ unsigned int flags; /* Reserved for future use. */
+ unsigned int rsv[4]; /* Reserved for future use. */
+};
+
+#define PTP_MAX_SAMPLES 25 /* Maximum allowed offset measurement samples. */
+
+struct ptp_sys_offset {
+ unsigned int n_samples; /* Desired number of measurements. */
+ unsigned int rsv[3]; /* Reserved for future use. */
+ /*
+ * Array of interleaved system/phc time stamps. The kernel
+ * will provide 2*n_samples + 1 time stamps, with the last
+ * one as a system time stamp.
+ */
+ struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
+};
+
+#define PTP_CLK_MAGIC '='
+
+#define PTP_CLOCK_GETCAPS _IOR(PTP_CLK_MAGIC, 1, struct ptp_clock_caps)
+#define PTP_EXTTS_REQUEST _IOW(PTP_CLK_MAGIC, 2, struct ptp_extts_request)
+#define PTP_PEROUT_REQUEST _IOW(PTP_CLK_MAGIC, 3, struct ptp_perout_request)
+#define PTP_ENABLE_PPS _IOW(PTP_CLK_MAGIC, 4, int)
+#define PTP_SYS_OFFSET _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset)
+
+struct ptp_extts_event {
+ struct ptp_clock_time t; /* Time event occured. */
+ unsigned int index; /* Which channel produced the event. */
+ unsigned int flags; /* Reserved for future use. */
+ unsigned int rsv[2]; /* Reserved for future use. */
+};
+
+#endif
diff --git a/linux/reboot.h b/linux/reboot.h
new file mode 100644
index 0000000..aa33674
--- /dev/null
+++ b/linux/reboot.h
@@ -0,0 +1,39 @@
+#ifndef _LINUX_REBOOT_H
+#define _LINUX_REBOOT_H
+
+/*
+ * Magic values required to use _reboot() system call.
+ */
+
+#define LINUX_REBOOT_MAGIC1 0xfee1dead
+#define LINUX_REBOOT_MAGIC2 672274793
+#define LINUX_REBOOT_MAGIC2A 85072278
+#define LINUX_REBOOT_MAGIC2B 369367448
+#define LINUX_REBOOT_MAGIC2C 537993216
+
+
+/*
+ * Commands accepted by the _reboot() system call.
+ *
+ * RESTART Restart system using default command and mode.
+ * HALT Stop OS and give system control to ROM monitor, if any.
+ * CAD_ON Ctrl-Alt-Del sequence causes RESTART command.
+ * CAD_OFF Ctrl-Alt-Del sequence sends SIGINT to init task.
+ * POWER_OFF Stop OS and remove all power from system, if possible.
+ * RESTART2 Restart system using given command string.
+ * SW_SUSPEND Suspend system using software suspend if compiled in.
+ * KEXEC Restart system using a previously loaded Linux kernel
+ */
+
+#define LINUX_REBOOT_CMD_RESTART 0x01234567
+#define LINUX_REBOOT_CMD_HALT 0xCDEF0123
+#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF
+#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000
+#define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC
+#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4
+#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2
+#define LINUX_REBOOT_CMD_KEXEC 0x45584543
+
+
+
+#endif /* _LINUX_REBOOT_H */
diff --git a/linux/s390/ioctlent.h.in b/linux/s390/ioctlent.h.in
new file mode 100644
index 0000000..1e93a0b
--- /dev/null
+++ b/linux/s390/ioctlent.h.in
@@ -0,0 +1,49 @@
+ {"asm/dasd.h", "BIODASDDISABLE", 0x4400},
+ {"asm/dasd.h", "DASDAPIVER", 0x4400},
+ {"asm/dasd.h", "BIODASDENABLE", 0x4401},
+ {"asm/dasd.h", "BIODASDFMT", 0x4401},
+ {"asm/dasd.h", "BIODASDINFO", 0x4401},
+ {"asm/dasd.h", "BIODASDSNID", 0x4401},
+ {"asm/dasd.h", "BIODASDPRRD", 0x4402},
+ {"asm/dasd.h", "BIODASDRSRV", 0x4402},
+ {"asm/dasd.h", "BIODASDSATTR", 0x4402},
+ {"asm/dasd.h", "BIODASDINFO2", 0x4403},
+ {"asm/dasd.h", "BIODASDRLSE", 0x4403},
+ {"asm/dasd.h", "BIODASDPSRD", 0x4404},
+ {"asm/dasd.h", "BIODASDSLCK", 0x4404},
+ {"asm/dasd.h", "BIODASDGATTR", 0x4405},
+ {"asm/dasd.h", "BIODASDPRRST", 0x4405},
+ {"asm/dasd.h", "BIODASDQUIESCE", 0x4406},
+ {"asm/dasd.h", "BIODASDRESUME", 0x4407},
+ {"asm/cmb.h", "BIODASDCMFENABLE", 0x4420},
+ {"asm/cmb.h", "BIODASDCMFDISABLE", 0x4421},
+ {"asm/cmb.h", "BIODASDREADALLCMB", 0x4421},
+ {"asm/dasd.h", "BIODASDSYMMIO", 0x44f0},
+ {"asm/ioctls.h", "FIOQSIZE", 0x545e},
+ {"asm/chsc.h", "CHSC_START", 0x6381},
+ {"asm/chsc.h", "CHSC_INFO_CHANNEL_PATH", 0x6382},
+ {"asm/chsc.h", "CHSC_INFO_CU", 0x6383},
+ {"asm/chsc.h", "CHSC_INFO_SCH_CU", 0x6384},
+ {"asm/chsc.h", "CHSC_INFO_CI", 0x6385},
+ {"asm/chsc.h", "CHSC_INFO_CCL", 0x6386},
+ {"asm/chsc.h", "CHSC_INFO_CPD", 0x6387},
+ {"asm/chsc.h", "CHSC_INFO_DCAL", 0x6388},
+ {"asm/tape390.h", "TAPE390_DISPLAY", 0x6401},
+ {"asm/tape390.h", "TAPE390_CRYPT_SET", 0x6402},
+ {"asm/tape390.h", "TAPE390_CRYPT_QUERY", 0x6403},
+ {"asm/tape390.h", "TAPE390_KEKL_SET", 0x6404},
+ {"asm/tape390.h", "TAPE390_KEKL_QUERY", 0x6405},
+ {"asm/zcrypt.h", "Z90STAT_TOTALCOUNT", 0x7a40},
+ {"asm/zcrypt.h", "Z90STAT_PCICACOUNT", 0x7a41},
+ {"asm/zcrypt.h", "Z90STAT_PCICCCOUNT", 0x7a42},
+ {"asm/zcrypt.h", "Z90STAT_REQUESTQ_COUNT", 0x7a44},
+ {"asm/zcrypt.h", "Z90STAT_PENDINGQ_COUNT", 0x7a45},
+ {"asm/zcrypt.h", "Z90STAT_TOTALOPEN_COUNT", 0x7a46},
+ {"asm/zcrypt.h", "Z90STAT_DOMAIN_INDEX", 0x7a47},
+ {"asm/zcrypt.h", "Z90STAT_STATUS_MASK", 0x7a48},
+ {"asm/zcrypt.h", "Z90STAT_QDEPTH_MASK", 0x7a49},
+ {"asm/zcrypt.h", "Z90STAT_PERDEV_REQCNT", 0x7a4a},
+ {"asm/zcrypt.h", "Z90STAT_PCIXCCMCL2COUNT", 0x7a4b},
+ {"asm/zcrypt.h", "Z90STAT_PCIXCCMCL3COUNT", 0x7a4c},
+ {"asm/zcrypt.h", "Z90STAT_CEX2CCOUNT", 0x7a4d},
+ {"asm/zcrypt.h", "Z90STAT_CEX2ACOUNT", 0x7a4e},
diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h
new file mode 100644
index 0000000..2a0bc21
--- /dev/null
+++ b/linux/s390/syscallent.h
@@ -0,0 +1,481 @@
+/*
+ * Copyright (c) 2000 IBM Deutschland Entwicklung GmbH, IBM Coporation
+ * Authors: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+ * D.J. Barrow <barrow_dj@mail.yahoo.com,djbarrow@de.ibm.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.
+ *
+ */
+
+ { 0, 0, sys_setup, "setup" }, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { MA, 0, NULL, NULL }, /* 17 */
+ { MA, 0, NULL, NULL }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { MA, 0, NULL, NULL }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { MA, 0, NULL, NULL }, /* 31 */
+ { MA, 0, NULL, NULL }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { MA, 0, NULL, NULL }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 1, TD, sys_dup, "dup" }, /* 41 */
+ { 1, TD, sys_pipe, "pipe" }, /* 42 */
+ { 1, 0, sys_times, "times" }, /* 43 */
+ { MA, 0, NULL, NULL }, /* 44 */
+ { 1, TM, sys_brk, "brk" }, /* 45 */
+ { MA, 0, NULL, NULL }, /* 46 */
+ { MA, 0, NULL, NULL }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { MA, 0, NULL, NULL }, /* 53 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 54 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 55 */
+ { MA, 0, NULL, NULL }, /* 56 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 57 */
+ { MA, 0, NULL, NULL }, /* 58 */
+ { MA, 0, NULL, NULL }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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 */
+ { MA, 0, NULL, NULL }, /* 68 */
+ { MA, 0, NULL, NULL }, /* 69 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 70 */
+ { 2, 0, sys_setregid, "setregid" }, /* 71 */
+ { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { MA, 0, NULL, NULL }, /* 82 */
+ { 2, TF, sys_symlink, "symlink" }, /* 83 */
+ { MA, 0, NULL, NULL }, /* 84 */
+ { 3, TF, sys_readlink, "readlink" }, /* 85 */
+ { 1, TF, sys_uselib, "uselib" }, /* 86 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 3, TD, sys_readdir, "readdir" }, /* 89 */
+ { 6, TD|TM, sys_old_mmap, "mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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 */
+ { MA, 0, NULL, NULL }, /* 98 */
+ { 2, TF, sys_statfs, "statfs" }, /* 99 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { MA, 0, NULL, NULL }, /* 109 */
+ { MA, 0, NULL, NULL }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { MA, 0, NULL, NULL }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 5, 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 */
+ { MA, 0, NULL, NULL }, /* 123 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
+ { 3, TM, 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, 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" }, /* 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, 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, sys_mremap, "mremap" }, /* 163 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 164 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 165 */
+ { MA, 0, NULL, NULL }, /* 166 */
+ { 5, 0, sys_query_module, "query_module" }, /* 167 */
+ { 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 */
+ { 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 */
+ { 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, "pread" }, /* 180 */
+ { 5, TD, sys_pwrite, "pwrite" }, /* 181 */
+ { 3, TF, sys_chown, "lchown" }, /* 182 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 183 */
+ { 2, 0, sys_capget, "capget" }, /* 184 */
+ { 2, 0, sys_capset, "capset" }, /* 185 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
+ { 1, TD|TM, sys_old_mmap_pgoff, "mmap2" }, /* 192 */
+ { 3, TF, sys_truncate64, "truncate64" }, /* 193 */
+ { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+ { 3, TF, sys_chown, "lchown" }, /* 198 */
+ { 0, NF, sys_getuid, "getuid" }, /* 199 */
+ { 0, NF, sys_getgid, "getgid" }, /* 200 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 201 */
+ { 0, NF, sys_getegid, "getegid" }, /* 202 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 203 */
+ { 2, 0, sys_setregid, "setregid" }, /* 204 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 205 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 206 */
+ { 3, TD, sys_fchown, "fchown" }, /* 207 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 208 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 209 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 210 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 211 */
+ { 3, TF, sys_chown, "chown" }, /* 212 */
+ { 1, 0, sys_setuid, "setuid" }, /* 213 */
+ { 1, 0, sys_setgid, "setgid" }, /* 214 */
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 215 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+ { 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, TD, sys_readahead, "readahead" }, /* 222 */
+ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 223 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 224 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 225 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 226 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 227 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 228 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 229 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 230 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 231 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 232 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 233 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 234 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 235 */
+ { 0, 0, sys_gettid, "gettid" }, /* 236 */
+ { 2, TS, sys_kill, "tkill" }, /* 237 */
+ { 6, 0, sys_futex, "futex" }, /* 238 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 239 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 240 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 241 */
+ { MA, 0, NULL, NULL }, /* 242 */
+ { 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, sys_exit, "exit_group" }, /* 248 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 249 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */
+ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 252 */
+ { 5, TD, sys_fadvise64, "fadvise64" }, /* 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 257 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 258 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 259 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 260 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */
+ { 5, 0, sys_vserver, "vserver" }, /* 263 */
+ { 5, TD, printargs, "fadvise64_64" }, /* 264 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 265 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 266 */
+ { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 267 */
+ { 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 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 277 */
+ { 5, 0, sys_add_key, "add_key" }, /* 278 */
+ { 4, 0, sys_request_key, "request_key" }, /* 279 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 280 */
+ { 5, TP, sys_waitid, "waitid" }, /* 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, 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 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 291 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 292 */
+ { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 293 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 294 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 295 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 296 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 297 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 298 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 299 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 300 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 301 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 302 */
+ { 1, TP, sys_unshare, "unshare" }, /* 303 */
+ { 2, 0, 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_getcpu, "getcpu" }, /* 311 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 312 */
+ { 2, TF, sys_utimes, "utimes" }, /* 313 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 314 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 315 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 316 */
+ { 4, TD, sys_timerfd, "timerfd" }, /* 317 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 318 */
+ { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 319 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 320 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 321 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 322 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 323 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 324 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 325 */
+ { 3, TD, sys_dup3, "dup3" }, /* 326 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 327 */
+ { 5, TD, sys_preadv, "preadv" }, /* 328 */
+ { 5, TD, sys_pwritev, "pwritev" }, /* 329 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 330 */
+ { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 331 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 332 */
+ { 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 333 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 334 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 335 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 336 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 337 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 338 */
+ { 2, TD, sys_setns, "setns" }, /* 339 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 340 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 341 */
+ { 2, 0, printargs, "s390_runtime_instr" }, /* 342 */
+ { 5, 0, sys_kcmp, "kcmp" }, /* 343 */
+ { 3, TD, sys_finit_module, "finit_module" }, /* 344 */
+ { 5, 0, NULL, NULL }, /* 345 */
+ { 5, 0, NULL, NULL }, /* 346 */
+ { 5, 0, NULL, NULL }, /* 347 */
+ { 5, 0, NULL, NULL }, /* 348 */
+ { 5, 0, NULL, NULL }, /* 349 */
+ { 5, 0, NULL, NULL }, /* 350 */
+ { 5, 0, NULL, NULL }, /* 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 */
+ { 2, TN, sys_listen, "listen" }, /* 404 */
+ { 3, TN, sys_accept, "accept" }, /* 405 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 406 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 407 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 408 */
+ { 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 */
+ { 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
+ { 4, 0, printargs, "ipc_subcall" }, /* 420 */
+ { 4, TI, sys_semop, "semop" }, /* 421 */
+ { 4, TI, sys_semget, "semget" }, /* 422 */
+ { 4, TI, sys_semctl, "semctl" }, /* 423 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 425 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 426 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 427 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 428 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 429 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 430 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
+ { 4, TI, sys_msgget, "msgget" }, /* 433 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 434 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 435 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 436 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 437 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 438 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 439 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 440 */
+ { 4, TI, sys_shmat, "shmat" }, /* 441 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 442 */
+ { 4, TI, sys_shmget, "shmget" }, /* 443 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 444 */
diff --git a/linux/s390x/ioctlent.h.in b/linux/s390x/ioctlent.h.in
new file mode 100644
index 0000000..214b67f
--- /dev/null
+++ b/linux/s390x/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../s390/ioctlent.h.in"
diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h
new file mode 100644
index 0000000..66face5
--- /dev/null
+++ b/linux/s390x/syscallent.h
@@ -0,0 +1,480 @@
+/*
+ * Copyright (c) 2000 IBM Deutschland Entwicklung GmbH, IBM Coporation
+ * Author: Ulrich Weigand <Ulrich.Weigand@de.ibm.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.
+ *
+ */
+
+ { 0, 0, sys_setup, "setup" }, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { MA, 0, NULL, NULL }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { MA, 0, NULL, NULL }, /* 16 */
+ { MA, 0, NULL, NULL }, /* 17 */
+ { MA, 0, NULL, NULL }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { MA, 0, NULL, NULL }, /* 23 */
+ { MA, 0, NULL, NULL }, /* 24 */
+ { MA, 0, NULL, NULL }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { MA, 0, NULL, NULL }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { MA, 0, NULL, NULL }, /* 31 */
+ { MA, 0, NULL, NULL }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { MA, 0, NULL, NULL }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 1, TD, sys_dup, "dup" }, /* 41 */
+ { 1, TD, sys_pipe, "pipe" }, /* 42 */
+ { 1, 0, sys_times, "times" }, /* 43 */
+ { MA, 0, NULL, NULL }, /* 44 */
+ { 1, TM, sys_brk, "brk" }, /* 45 */
+ { MA, 0, NULL, NULL }, /* 46 */
+ { MA, 0, NULL, NULL }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { MA, 0, NULL, NULL }, /* 49 */
+ { MA, 0, NULL, NULL }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { MA, 0, NULL, NULL }, /* 53 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 54 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 55 */
+ { MA, 0, NULL, NULL }, /* 56 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 57 */
+ { MA, 0, NULL, NULL }, /* 58 */
+ { MA, 0, NULL, NULL }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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 */
+ { MA, 0, NULL, NULL }, /* 68 */
+ { MA, 0, NULL, NULL }, /* 69 */
+ { MA, 0, NULL, NULL }, /* 70 */
+ { MA, 0, NULL, NULL }, /* 71 */
+ { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 72 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { MA, 0, NULL, NULL }, /* 80 */
+ { MA, 0, NULL, NULL }, /* 81 */
+ { MA, 0, NULL, NULL }, /* 82 */
+ { 2, TF, sys_symlink, "symlink" }, /* 83 */
+ { MA, 0, NULL, NULL }, /* 84 */
+ { 3, TF, sys_readlink, "readlink" }, /* 85 */
+ { 1, TF, sys_uselib, "uselib" }, /* 86 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { MA, 0, NULL, NULL }, /* 89 */
+ { 1, TD|TM, sys_old_mmap, "mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 2, TD, sys_ftruncate, "ftruncate" }, /* 93 */
+ { 2, TD, sys_fchmod, "fchmod" }, /* 94 */
+ { MA, 0, NULL, NULL }, /* 95 */
+ { 2, 0, sys_getpriority, "getpriority" }, /* 96 */
+ { 3, 0, sys_setpriority, "setpriority" }, /* 97 */
+ { MA, 0, NULL, NULL }, /* 98 */
+ { 2, TF, sys_statfs, "statfs" }, /* 99 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { MA, 0, NULL, NULL }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { MA, 0, NULL, NULL }, /* 109 */
+ { MA, 0, NULL, NULL }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { MA, 0, NULL, NULL }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 5, 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 */
+ { MA, 0, NULL, NULL }, /* 123 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
+ { 3, TM, 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, 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" }, /* 135 */
+ { 1, 0, sys_personality, "personality" }, /* 136 */
+ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 137 */
+ { MA, 0, NULL, NULL }, /* 138 */
+ { MA, 0, NULL, NULL }, /* 139 */
+ { 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, sys_mremap, "mremap" }, /* 163 */
+ { MA, 0, NULL, NULL }, /* 164 */
+ { MA, 0, NULL, NULL }, /* 165 */
+ { MA, 0, NULL, NULL }, /* 166 */
+ { 5, 0, sys_query_module, "query_module" }, /* 167 */
+ { 3, TD, sys_poll, "poll" }, /* 168 */
+ { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 169 */
+ { MA, 0, NULL, NULL }, /* 170 */
+ { MA, 0, NULL, NULL }, /* 171 */
+ { 5, 0, sys_prctl, "prctl" }, /* 172 */
+ { 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 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 177 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 178 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 179 */
+ { 4, TD, sys_pread, "pread" }, /* 180 */
+ { 4, TD, sys_pwrite, "pwrite" }, /* 181 */
+ { MA, 0, NULL, NULL }, /* 182 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 183 */
+ { 2, 0, sys_capget, "capget" }, /* 184 */
+ { 2, 0, sys_capset, "capset" }, /* 185 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
+ { 5, 0, sys_getpmsg, "getpmsg" }, /* 188 */
+ { 5, 0, sys_putpmsg, "putpmsg" }, /* 189 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 191 */
+ { MA, 0, NULL, NULL }, /* 192 */
+ { MA, 0, NULL, NULL }, /* 193 */
+ { MA, 0, NULL, NULL }, /* 194 */
+ { MA, 0, NULL, NULL }, /* 195 */
+ { MA, 0, NULL, NULL }, /* 196 */
+ { MA, 0, NULL, NULL }, /* 197 */
+ { 3, TF, sys_chown, "lchown" }, /* 198 */
+ { 0, NF, sys_getuid, "getuid" }, /* 199 */
+ { 0, NF, sys_getgid, "getgid" }, /* 200 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 201 */
+ { 0, NF, sys_getegid, "getegid" }, /* 202 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 203 */
+ { 2, 0, sys_setregid, "setregid" }, /* 204 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 205 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 206 */
+ { 3, TD, sys_fchown, "fchown" }, /* 207 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 208 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 209 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 210 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 211 */
+ { 3, TF, sys_chown, "chown" }, /* 212 */
+ { 1, 0, sys_setuid, "setuid" }, /* 213 */
+ { 1, 0, sys_setgid, "setgid" }, /* 214 */
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 215 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+ { 3, TM, sys_mincore, "mincore" }, /* 218 */
+ { 3, TM, sys_madvise, "madvise" }, /* 219 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 220 */
+ { MA, 0, NULL, NULL }, /* 221 */
+ { 3, TD, sys_readahead, "readahead" }, /* 222 */
+ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 223 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 224 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 225 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 226 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 227 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 228 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 229 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 230 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 231 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 232 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 233 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 234 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 235 */
+ { 0, 0, sys_gettid, "gettid" }, /* 236 */
+ { 2, TS, sys_kill, "tkill" }, /* 237 */
+ { 6, 0, sys_futex, "futex" }, /* 238 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 239 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 240 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 241 */
+ { MA, 0, NULL, NULL }, /* 242 */
+ { 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, sys_exit, "exit_group" }, /* 248 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 249 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */
+ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 252 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 257 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 258 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 259 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 260 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */
+ { 5, 0, sys_vserver, "vserver" }, /* 263 */
+ { 4, TD, sys_fadvise64, "fadvise64_64" }, /* 264 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 265 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 266 */
+ { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 267 */
+ { 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 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 274 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 275 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 276 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 277 */
+ { 5, 0, sys_add_key, "add_key" }, /* 278 */
+ { 4, 0, sys_request_key, "request_key" }, /* 279 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 280 */
+ { 5, TP, sys_waitid, "waitid" }, /* 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, 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 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 291 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 292 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 293 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 294 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 295 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 296 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 297 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 298 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 299 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 300 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 301 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 302 */
+ { 1, TP, sys_unshare, "unshare" }, /* 303 */
+ { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 304 */
+ { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 305 */
+ { 6, TD, sys_splice, "splice" }, /* 306 */
+ { 4, 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_getcpu, "getcpu" }, /* 311 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 312 */
+ { 2, TF, sys_utimes, "utimes" }, /* 313 */
+ { 4, TD, sys_fallocate, "fallocate" }, /* 314 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 315 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 316 */
+ { 4, TD, sys_timerfd, "timerfd" }, /* 317 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 318 */
+ { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 319 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 320 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 321 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 322 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 323 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 324 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 325 */
+ { 3, TD, sys_dup3, "dup3" }, /* 326 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 327 */
+ { 4, TD, sys_preadv, "preadv" }, /* 328 */
+ { 4, TD, sys_pwritev, "pwritev" }, /* 329 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 330 */
+ { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 331 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 332 */
+ { 5, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 333 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 334 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 335 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 336 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 337 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 338 */
+ { 2, TD, sys_setns, "setns" }, /* 339 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 340 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 341 */
+ { 2, 0, printargs, "s390_runtime_instr" }, /* 342 */
+ { 5, 0, sys_kcmp, "kcmp" }, /* 343 */
+ { 3, TD, sys_finit_module, "finit_module" }, /* 344 */
+ { 5, 0, NULL, NULL }, /* 345 */
+ { 5, 0, NULL, NULL }, /* 346 */
+ { 5, 0, NULL, NULL }, /* 347 */
+ { 5, 0, NULL, NULL }, /* 348 */
+ { 5, 0, NULL, NULL }, /* 349 */
+ { 5, 0, NULL, NULL }, /* 350 */
+ { 5, 0, NULL, NULL }, /* 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 */
+ { 2, TN, sys_listen, "listen" }, /* 404 */
+ { 3, TN, sys_accept, "accept" }, /* 405 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 406 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 407 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 408 */
+ { 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 */
+ { 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
+ { 4, 0, printargs, "ipc_subcall" }, /* 420 */
+ { 4, TI, sys_semop, "semop" }, /* 421 */
+ { 4, TI, sys_semget, "semget" }, /* 422 */
+ { 4, TI, sys_semctl, "semctl" }, /* 423 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 425 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 426 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 427 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 428 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 429 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 430 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
+ { 4, TI, sys_msgget, "msgget" }, /* 433 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 434 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 435 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 436 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 437 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 438 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 439 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 440 */
+ { 4, TI, sys_shmat, "shmat" }, /* 441 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 442 */
+ { 4, TI, sys_shmget, "shmget" }, /* 443 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 444 */
diff --git a/linux/sh/ioctlent.h.in b/linux/sh/ioctlent.h.in
new file mode 100644
index 0000000..0627316
--- /dev/null
+++ b/linux/sh/ioctlent.h.in
@@ -0,0 +1,65 @@
+ {"asm/ioctls.h", "TCGETS", 0x5401},
+ {"asm/ioctls.h", "TCSETS", 0x5402},
+ {"asm/ioctls.h", "TCSETSW", 0x5403},
+ {"asm/ioctls.h", "TCSETSF", 0x5404},
+ {"asm/ioctls.h", "TIOCEXCL", 0x540c},
+ {"asm/ioctls.h", "TIOCNXCL", 0x540d},
+ {"asm/ioctls.h", "TIOCSCTTY", 0x540e},
+ {"asm/ioctls.h", "TIOCSTI", 0x5412},
+ {"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/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/ioctls.h", "TIOCNOTTY", 0x5422},
+ {"asm/ioctls.h", "TIOCSETD", 0x5423},
+ {"asm/ioctls.h", "TIOCGETD", 0x5424},
+ {"asm/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
+ {"asm/ioctls.h", "TIOCSBRK", 0x5427},
+ {"asm/ioctls.h", "TIOCCBRK", 0x5428},
+ {"asm/ioctls.h", "TIOCGSID", 0x5429},
+ {"asm/ioctls.h", "TIOCGPTN", 0x5430},
+ {"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
+ {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm/ioctls.h", "FIOCLEX", 0x6601},
+ {"asm/ioctls.h", "FIONCLEX", 0x6602},
+ {"asm/sockios.h", "FIOGETOWN", 0x667b},
+ {"asm/sockios.h", "FIOSETOWN", 0x667c},
+ {"asm/ioctls.h", "FIOASYNC", 0x667d},
+ {"asm/ioctls.h", "FIONBIO", 0x667e},
+ {"asm/ioctls.h", "FIONREAD", 0x667f},
+ {"asm/sockios.h", "SIOCATMARK", 0x7307},
+ {"asm/sockios.h", "SIOCSPGRP", 0x7308},
+ {"asm/sockios.h", "SIOCGPGRP", 0x7309},
+ {"asm/sockios.h", "SIOCGSTAMP", 0x7364},
+ {"asm/ioctls.h", "TCGETA", 0x7417},
+ {"asm/ioctls.h", "TCSETA", 0x7418},
+ {"asm/ioctls.h", "TCSETAW", 0x7419},
+ {"asm/ioctls.h", "TCSETAF", 0x741c},
+ {"asm/ioctls.h", "TCSBRK", 0x741d},
+ {"asm/ioctls.h", "TCXONC", 0x741e},
+ {"asm/ioctls.h", "TCFLSH", 0x741f},
+ {"asm/ioctls.h", "TIOCSWINSZ", 0x7467},
+ {"asm/ioctls.h", "TIOCGWINSZ", 0x7468},
+ {"asm/ioctls.h", "TIOCSTART", 0x746e},
+ {"asm/ioctls.h", "TIOCSTOP", 0x746f},
+ {"asm/ioctls.h", "TIOCOUTQ", 0x7473},
+ {"asm/ioctls.h", "TIOCSPGRP", 0x7476},
+ {"asm/ioctls.h", "TIOCGPGRP", 0x7477},
diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
new file mode 100644
index 0000000..bd337ae
--- /dev/null
+++ b/linux/sh/syscallent.h
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
+ * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
+ * Copyright (c) 2000 PocketPenguins Inc. Linux for Hitachi SuperH
+ * port by Greg Banks <gbanks@pocketpenguins.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.
+ */
+
+ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { 0, TM, sys_break, "break" }, /* 17 */
+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { 2, 0, sys_stty, "stty" }, /* 31 */
+ { 2, 0, sys_gtty, "gtty" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 0, 0, sys_ftime, "ftime" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 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, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { 0, 0, sys_lock, "lock" }, /* 53 */
+ { 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 */
+ { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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, "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 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 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 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 3, TD, sys_readdir, "readdir" }, /* 89 */
+ { 6, TD|TM, sys_mmap, "old_mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { 1, 0, sys_olduname, "olduname" }, /* 109 */
+ { 1, 0, sys_iopl, "iopl" }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { 1, 0, sys_vm86old, "vm86old" }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 5, 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_cacheflush, "cacheflush" }, /* 123 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
+ { 3, TM, 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, 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" }, /* 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, 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 1, TM, sys_mlock, "mlock" }, /* 150 */
+ { 2, TM, sys_munlock, "munlock" }, /* 151 */
+ { 1, TM, sys_mlockall, "mlockall" }, /* 152 */
+ { 1, 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, sys_mremap, "mremap" }, /* 163 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 164 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 165 */
+ { 5, 0, sys_vm86, "vm86" }, /* 166 */
+ { 5, 0, sys_query_module, "query_module" }, /* 167 */
+ { 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 */
+ { 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 */
+
+ { 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 */
+ { 2, 0, sys_capset, "capset" }, /* 185 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
+ { 5, 0, NULL, NULL }, /* 188 */
+ { 5, 0, NULL, NULL }, /* 189 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
+ { 5, 0, printargs, "getrlimit" }, /* 191 */
+ { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 192 */
+ { 3, TF, sys_truncate64, "truncate64" }, /* 193 */
+ { 3, TD, sys_ftruncate64, "ftruncate64" }, /* 194 */
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+/*TODO*/{ 3, TF, printargs, "lchown32" }, /* 198 */
+/*TODO*/{ 0, 0, printargs, "getuid32" }, /* 199 */
+
+ { 0, 0, printargs, "getgid32" }, /* 200 */
+ { 0, 0, printargs, "geteuid32" }, /* 201 */
+ { 0, 0, printargs, "getegid32" }, /* 202 */
+ { 2, 0, printargs, "setreuid32" }, /* 203 */
+ { 2, 0, printargs, "setregid32" }, /* 204 */
+ { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
+ { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
+ { 3, 0, printargs, "fchown32" }, /* 207 */
+ { 3, 0, printargs, "setresuid32" }, /* 208 */
+ { 3, 0, printargs, "getresuid32" }, /* 209 */
+ { 3, 0, printargs, "setresgid32" }, /* 210 */
+ { 3, 0, printargs, "getsetgid32" }, /* 211 */
+ { 3, TF, printargs, "chown32" }, /* 212 */
+ { 1, 0, printargs, "setuid32" }, /* 213 */
+ { 1, 0, printargs, "setgid32" }, /* 214 */
+ { 1, 0, printargs, "setfsuid32" }, /* 215 */
+ { 1, 0, printargs, "setfsgid32" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+ { 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, NULL, NULL }, /* 222 */
+ { 4, 0, NULL, NULL }, /* 223 */
+ { 4, 0, sys_gettid, "gettid" }, /* 224 */
+ { 4, TD, sys_readahead, "readahead" }, /* 225 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 226 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 227 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 228 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 229 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 230 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 231 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 232 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 233 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 234 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 235 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 236 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 237 */
+ { 2, TS, sys_kill, "tkill" }, /* 238 */
+ { 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 */
+ { 0, 0, NULL, NULL }, /* 243 */
+ { 0, 0, NULL, NULL }, /* 244 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 245 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 246 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 247 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 248 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
+ { 5, TD, sys_fadvise64, "fadvise64" }, /* 250 */
+ { 0, 0, NULL, NULL }, /* 251 */
+ { 1, TP, 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, TM, 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 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 262 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 263 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 264 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 265 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 266 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 267 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 268 */
+ { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 269 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 270 */
+ { 2, TF, sys_utimes, "utimes" }, /* 271 */
+ { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 272 */
+ { 0, 0, NULL, NULL }, /* 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 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 283 */
+ { 5, TP, sys_waitid, "waitid" }, /* 284 */
+ { 5, 0, sys_add_key, "add_key" }, /* 285 */
+ { 4, 0, sys_request_key, "request_key" }, /* 286 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 287 */
+ { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 288 */
+ { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 289 */
+ { 0, TD, sys_inotify_init, "inotify_init" }, /* 290 */
+ { 3, TD, sys_inotify_add_watch, "inotify_add_watch"}, /* 291 */
+ { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch"}, /* 292 */
+ { 5, 0, NULL, NULL }, /* 293 */
+ { 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 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 298 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 299 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 300 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 301 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 302 */
+ { 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, 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 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 319 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 320 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 321 */
+ { 4, TD, sys_timerfd, "timerfd" }, /* 322 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 323 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 324 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 325 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 326 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 327 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 328 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 329 */
+ { 3, TD, sys_dup3, "dup3" }, /* 330 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 331 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 332 */
+ { 6, TD, sys_preadv, "preadv" }, /* 333 */
+ { 6, TD, sys_pwritev, "pwritev" }, /* 334 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 335 */
+ { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 336 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 337 */
+ { 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 338 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 339 */
+ { 3, TN, sys_socket, "socket" }, /* 340 */
+ { 3, TN, sys_bind, "bind" }, /* 341 */
+ { 3, TN, sys_connect, "connect" }, /* 342 */
+ { 2, TN, sys_listen, "listen" }, /* 343 */
+ { 3, TN, sys_accept, "accept" }, /* 344 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 345 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 346 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 347 */
+ { 4, TN, sys_send, "send" }, /* 348 */
+ { 4, TN, sys_recv, "recv" }, /* 349 */
+ { 6, TN, sys_sendto, "sendto" }, /* 350 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 351 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 352 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 353 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 354 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 355 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 356 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 357 */
+ { 4, TN, sys_accept4, "accept4" }, /* 358 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 359 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 360 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 361 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 362 */
+ { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 363 */
+ { 2, TD, sys_setns, "setns" }, /* 364 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 365 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 366 */
+ { 5, 0, sys_kcmp, "kcmp" }, /* 367 */
+ { 3, TD, sys_finit_module, "finit_module" }, /* 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 */
+ { 2, TN, sys_listen, "listen" }, /* 404 */
+ { 3, TN, sys_accept, "accept" }, /* 405 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 406 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 407 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 408 */
+ { 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 */
+ { 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
+
+ { 4, 0, printargs, "ipc_subcall" }, /* 420 */
+ { 4, TI, sys_semop, "semop" }, /* 421 */
+ { 4, TI, sys_semget, "semget" }, /* 422 */
+ { 4, TI, sys_semctl, "semctl" }, /* 423 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 424 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 425 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 426 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 427 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 428 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 429 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 430 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 431 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 432 */
+ { 4, TI, sys_msgget, "msgget" }, /* 433 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 434 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 435 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 436 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 437 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 438 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 439 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 440 */
+ { 4, TI, sys_shmat, "shmat" }, /* 441 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 442 */
+ { 4, TI, sys_shmget, "shmget" }, /* 443 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 444 */
diff --git a/linux/sh64/ioctlent.h.in b/linux/sh64/ioctlent.h.in
new file mode 100644
index 0000000..0d5f9bd
--- /dev/null
+++ b/linux/sh64/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../sh/ioctlent.h.in"
diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h
new file mode 100644
index 0000000..e970147
--- /dev/null
+++ b/linux/sh64/syscallent.h
@@ -0,0 +1,455 @@
+/*
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.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.
+ */
+
+ { 0, 0, sys_setup, "setup" }, /* 0 */
+ { 1, TP, sys_exit, "_exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 7 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 8 */
+ { 2, TF, sys_link, "link" }, /* 9 */
+ { 1, TF, sys_unlink, "unlink" }, /* 10 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 1, 0, sys_time, "time" }, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { 0, TM, sys_break, "break" }, /* 17 */
+ { 2, TF, sys_oldstat, "oldstat" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 5, TF, sys_mount, "mount" }, /* 21 */
+ { 1, TF, sys_umount, "oldumount" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_stime, "stime" }, /* 25 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TD, sys_oldfstat, "oldfstat" }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { 2, 0, sys_stty, "stty" }, /* 31 */
+ { 2, 0, sys_gtty, "gtty" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 0, 0, sys_ftime, "ftime" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_rename, "rename" }, /* 38 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
+ { 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, TM, sys_brk, "brk" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 3, TS, sys_signal, "signal" }, /* 48 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 49 */
+ { 0, NF, sys_getegid, "getegid" }, /* 50 */
+ { 1, TF, sys_acct, "acct" }, /* 51 */
+ { 2, TF, sys_umount2, "umount" }, /* 52 */
+ { 0, 0, sys_lock, "lock" }, /* 53 */
+ { 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 */
+ { 1, 0, sys_oldolduname, "oldolduname" }, /* 59 */
+ { 1, 0, sys_umask, "umask" }, /* 60 */
+ { 1, TF, sys_chroot, "chroot" }, /* 61 */
+ { 2, 0, sys_ustat, "ustat" }, /* 62 */
+ { 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, "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 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 73 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 76 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
+ { 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 */
+ { 2, TF, sys_swapon, "swapon" }, /* 87 */
+ { 4, 0, sys_reboot, "reboot" }, /* 88 */
+ { 3, TD, sys_readdir, "readdir" }, /* 89 */
+ { 6, TD|TM, sys_mmap, "old_mmap" }, /* 90 */
+ { 2, TM, sys_munmap, "munmap" }, /* 91 */
+ { 2, TF, sys_truncate, "truncate" }, /* 92 */
+ { 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, TD, sys_fstatfs, "fstatfs" }, /* 100 */
+ { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
+ { 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, TD, sys_fstat, "fstat" }, /* 108 */
+ { 1, 0, sys_olduname, "olduname" }, /* 109 */
+ { 1, 0, sys_iopl, "iopl" }, /* 110 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 111 */
+ { 0, 0, sys_idle, "idle" }, /* 112 */
+ { 1, 0, NULL, NULL }, /* 113 */
+ { 4, TP, sys_wait4, "wait4" }, /* 114 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 115 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
+ { 5, 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, printargs, "cacheflush" }, /* 123 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 124 */
+ { 3, TM, 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, 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" }, /* 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, 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, TD, sys_fdatasync, "fdatasync" }, /* 148 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 149 */
+ { 1, 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 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 157 */
+ { 0, 0, sys_sched_yield, "sched_yield"}, /* 158 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
+ { 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, TM, sys_mremap, "mremap" }, /* 163 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 164 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 165 */
+ { 5, 0, NULL, NULL }, /* 166 */
+ { 5, 0, sys_query_module, "query_module" }, /* 167 */
+ { 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 */
+ { 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 */
+ { 4, TD, sys_pread, "pread" }, /* 180 */
+ { 4, TD, sys_pwrite, "pwrite" }, /* 181 */
+ { 3, TF, sys_chown, "chown" }, /* 182 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 183 */
+ { 2, 0, sys_capget, "capget" }, /* 184 */
+ { 2, 0, sys_capset, "capset" }, /* 185 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 186 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 187 */
+ { 5, 0, NULL, NULL }, /* 188 */
+ { 5, 0, NULL, NULL }, /* 189 */
+ { 0, TP, sys_vfork, "vfork" }, /* 190 */
+ { 2, 0, printargs, "getrlimit" }, /* 191 */
+ { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 192 */
+ { 2, TF, sys_truncate, "truncate64" }, /* 193 */
+ { 2, TD, sys_ftruncate, "ftruncate64" }, /* 194 */
+ { 2, TF, sys_stat64, "stat64" }, /* 195 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 196 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 197 */
+ { 3, TF, sys_chown, "lchown32" }, /* 198 */
+ { 0, NF, sys_getuid, "getuid32" }, /* 199 */
+ { 0, 0, printargs, "getgid32" }, /* 200 */
+ { 0, 0, printargs, "geteuid32" }, /* 201 */
+ { 0, 0, printargs, "getegid32" }, /* 202 */
+ { 2, 0, printargs, "setreuid32" }, /* 203 */
+ { 2, 0, printargs, "setregid32" }, /* 204 */
+ { 2, 0, sys_getgroups32, "getgroups32" }, /* 205 */
+ { 2, 0, sys_setgroups32, "setgroups32" }, /* 206 */
+ { 3, 0, printargs, "fchown32" }, /* 207 */
+ { 3, 0, printargs, "setresuid32" }, /* 208 */
+ { 3, 0, printargs, "getresuid32" }, /* 209 */
+ { 3, 0, printargs, "setresgid32" }, /* 210 */
+ { 3, 0, printargs, "getresgid32" }, /* 211 */
+ { 3, TF, printargs, "chown32" }, /* 212 */
+ { 1, 0, printargs, "setuid32" }, /* 213 */
+ { 1, 0, printargs, "setgid32" }, /* 214 */
+ { 1, 0, printargs, "setfsuid32" }, /* 215 */
+ { 1, 0, printargs, "setfsgid32" }, /* 216 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 217 */
+ { 3, TM, sys_mincore, "mincore" }, /* 218 */
+ { 3, TM, sys_madvise, "madvise" }, /* 219 */
+ { 3, TN, sys_socket, "socket" }, /* 220 */
+ { 3, TN, sys_bind, "bind" }, /* 221 */
+ { 3, TN, sys_connect, "connect" }, /* 222 */
+ { 2, TN, sys_listen, "listen" }, /* 223 */
+ { 3, TN, sys_accept, "accept" }, /* 224 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 225 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 226 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 227 */
+ { 4, TN, sys_send, "send" }, /* 228 */
+ { 6, TN, sys_sendto, "sendto" }, /* 229 */
+ { 4, TN, sys_recv, "recv" }, /* 230 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 231 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 232 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 233 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 234 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 235 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 236 */
+ { 4, TI, sys_semop, "semop" }, /* 237 */
+ { 4, TI, sys_semget, "semget" }, /* 238 */
+ { 4, TI, sys_semctl, "semctl" }, /* 239 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 240 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 241 */
+ { 4, TI, sys_msgget, "msgget" }, /* 242 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 243 */
+ { 4, TI, sys_shmat, "shmat" }, /* 244 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 245 */
+ { 4, TI, sys_shmget, "shmget" }, /* 246 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 247 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 248 */
+ { 3, TD, sys_fcntl, "fcntl64" }, /* 249 */
+ { 4, 0, NULL, NULL }, /* 250 */
+ { 4, 0, NULL, NULL }, /* 251 */
+ { 4, 0, sys_gettid, "gettid" }, /* 252 */
+ { 3, TD, sys_readahead, "readahead" }, /* 253 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 254 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 255 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 256 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 257 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 258 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 259 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 260 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 261 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 262 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 263 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 264 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 265 */
+ { 2, TS, sys_kill, "tkill" }, /* 266 */
+ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 267 */
+ { 6, 0, sys_futex, "futex" }, /* 268 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 269 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 270 */
+ { 5, 0, NULL, NULL }, /* 271 */
+ { 5, 0, NULL, NULL }, /* 272 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 273 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 274 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 275 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 276 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 277 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 278 */
+ { 5, 0, NULL, NULL }, /* 279 */
+ { 1, TP, sys_exit, "exit_group" }, /* 280 */
+ { 3, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 281 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 282 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 283 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 284 */
+ { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 285 */
+ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 286 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 287 */
+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 288 */
+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 289 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 290 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 291 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 292 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 293 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 294 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 295 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 296 */
+ { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 297 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 298 */
+ { 2, TF, sys_utimes, "utimes" }, /* 299 */
+ { 4, TD, sys_fadvise64, "fadvise64_64" }, /* 300 */
+ { 0, 0, NULL, NULL }, /* 301 */
+ { 4, TM, sys_mbind, "mbind" }, /* 302 */
+ { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 303 */
+ { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 304 */
+ { 4, 0, sys_mq_open, "mq_open" }, /* 305 */
+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 306 */
+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 307 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 308 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 309 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 310 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 311 */
+ { 5, TP, sys_waitid, "waitid" }, /* 312 */
+ { 5, 0, sys_add_key, "add_key" }, /* 313 */
+ { 4, 0, sys_request_key, "request_key" }, /* 314 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 315 */
+ { 3, 0, sys_ioprio_set, "ioprio_set" }, /* 316 */
+ { 2, 0, sys_ioprio_get, "ioprio_get" }, /* 317 */
+ { 0, TD, sys_inotify_init, "inotify_init" }, /* 318 */
+ { 3, TD, printargs, "inotify_add_watch"}, /* 319 */
+ { 2, TD, printargs, "inotify_rm_watch"}, /* 320 */
+ { 5, 0, NULL, NULL }, /* 321 */
+ { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 322 */
+ { 4, TD|TF, sys_openat, "openat" }, /* 323 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 324 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 325 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 326 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 327 */
+ { 4, TD|TF, sys_newfstatat, "newfstatat" }, /* 328 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 329 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 330 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 331 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 332 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 333 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 334 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 335 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 336 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 337 */
+ { 1, TP, sys_unshare, "unshare" }, /* 338 */
+ { 2, 0, sys_set_robust_list, "set_robust_list"}, /* 339 */
+ { 3, 0, sys_get_robust_list, "get_robust_list"}, /* 340 */
+ { 6, TD, sys_splice, "splice" }, /* 341 */
+ { 4, TD, sys_sync_file_range, "sync_file_range"}, /* 342 */
+ { 4, TD, sys_tee, "tee" }, /* 343 */
+ { 5, TD, sys_vmsplice, "vmsplice" }, /* 344 */
+ { 6, TM, sys_move_pages, "move_pages" }, /* 345 */
+ { 3, 0, sys_getcpu, "getcpu" }, /* 346 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 347 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 348 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 349 */
+ { 4, TD, sys_timerfd, "timerfd" }, /* 350 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 351 */
+ { 4, TD, sys_fallocate, "fallocate" }, /* 352 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 353 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 354 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 355 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 356 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 357 */
+ { 3, TD, sys_dup3, "dup3" }, /* 358 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 359 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 360 */
+ { 4, TD, sys_preadv, "preadv" }, /* 361 */
+ { 4, 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, sys_fanotify_init, "fanotify_init" }, /* 367 */
+ { 5, 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 */
+ { 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 */
+ { 2, TN, sys_listen, "listen" }, /* 404 */
+ { 3, TN, sys_accept, "accept" }, /* 405 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 406 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 407 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 408 */
+ { 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 */
+ { 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
+ { 4, 0, printargs, "ipc_subcall" }, /* 420 */
diff --git a/linux/sparc/dummy2.h b/linux/sparc/dummy2.h
new file mode 100644
index 0000000..39552a2
--- /dev/null
+++ b/linux/sparc/dummy2.h
@@ -0,0 +1,276 @@
+/*
+ * 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.
+ */
+
+/* still unfinished */
+
+#define solaris_sysmp printargs
+#define solaris_sginap printargs
+#define solaris_sgikopt printargs
+#define solaris_sysmips printargs
+#define solaris_sigreturn printargs
+#define solaris_recvmsg printargs
+#define solaris_sendmsg printargs
+#define solaris_nfssvc printargs
+#define solaris_getfh printargs
+#define solaris_async_daemon printargs
+#define solaris_exportfs printargs
+#define solaris_BSD_getime printargs
+#define solaris_sproc printargs
+#define solaris_procblk printargs
+#define solaris_sprocsp printargs
+#define solaris_msync printargs
+#define solaris_madvise printargs
+#define solaris_pagelock printargs
+#define solaris_quotactl printargs
+#define solaris_cacheflush printargs
+#define solaris_cachectl printargs
+#define solaris_nuname printargs
+#define solaris_sigpoll printargs
+#define solaris_swapctl printargs
+#define solaris_sigstack printargs
+#define solaris_sigsendset printargs
+#define solaris_priocntl printargs
+#define solaris_ksigqueue printargs
+#define solaris_lwp_sema_wait printargs
+#define solaris_memcntl printargs
+#define solaris_syscall printargs
+#define solaris_clocal printargs
+#define solaris_syssun printargs
+#define solaris_sysi86 printargs
+#define solaris_sysmachine printargs
+#define solaris_plock printargs
+#define solaris_pathconf printargs
+#define solaris_sigtimedwait printargs
+#define solaris_ulimit printargs
+#define solaris_ptrace printargs
+#define solaris_stty printargs
+#define solaris_lwp_info printargs
+#define solaris_priocntlsys printargs
+#define solaris_hrtsys printargs
+#define solaris_xenix printargs
+#define solaris_statfs printargs
+#define solaris_fstatfs printargs
+#define solaris_statvfs printargs
+#define solaris_fstatvfs printargs
+#define solaris_fork1 printargs
+#define solaris_sigsendsys printargs
+#define solaris_gtty printargs
+#define solaris_vtrace printargs
+#define solaris_fpathconf printargs
+#define solaris_evsys printargs
+#define solaris_acct printargs
+#define solaris_exec printargs
+#define solaris_lwp_sema_post printargs
+#define solaris_nfssys printargs
+#define solaris_sigaltstack printargs
+#define solaris_uadmin printargs
+#define solaris_umount printargs
+#define solaris_modctl printargs
+#define solaris_acancel printargs
+#define solaris_async printargs
+#define solaris_evtrapret printargs
+#define solaris_lwp_create printargs
+#define solaris_lwp_exit printargs
+#define solaris_lwp_suspend printargs
+#define solaris_lwp_continue printargs
+#define solaris_lwp_kill printargs
+#define solaris_lwp_self printargs
+#define solaris_lwp_setprivate printargs
+#define solaris_lwp_getprivate printargs
+#define solaris_lwp_wait printargs
+#define solaris_lwp_mutex_unlock printargs
+#define solaris_lwp_mutex_lock printargs
+#define solaris_lwp_cond_wait printargs
+#define solaris_lwp_cond_signal printargs
+#define solaris_lwp_cond_broadcast printargs
+#define solaris_llseek printargs
+#define solaris_inst_sync printargs
+#define solaris_auditsys printargs
+#define solaris_processor_bind printargs
+#define solaris_processor_info printargs
+#define solaris_p_online printargs
+#define solaris_sigqueue printargs
+#define solaris_clock_gettime printargs
+#define solaris_clock_settime printargs
+#define solaris_clock_getres printargs
+#define solaris_nanosleep printargs
+#define solaris_timer_create printargs
+#define solaris_timer_delete printargs
+#define solaris_timer_settime printargs
+#define solaris_timer_gettime printargs
+#define solaris_timer_getoverrun printargs
+#define solaris_signal printargs
+#define solaris_sigset printargs
+#define solaris_sighold printargs
+#define solaris_sigrelse printargs
+#define solaris_sigignore printargs
+#define solaris_sigpause printargs
+#define solaris_msgctl printargs
+#define solaris_msgget printargs
+#define solaris_msgrcv printargs
+#define solaris_msgsnd printargs
+#define solaris_shmat printargs
+#define solaris_shmctl printargs
+#define solaris_shmdt printargs
+#define solaris_shmget printargs
+#define solaris_semctl printargs
+#define solaris_semget printargs
+#define solaris_semop printargs
+#define solaris_olduname printargs
+#define solaris_ustat printargs
+#define solaris_fusers printargs
+#define solaris_sysfs1 printargs
+#define solaris_sysfs2 printargs
+#define solaris_sysfs3 printargs
+
+/* like another call */
+#define solaris_lchown solaris_chown
+#define solaris_setuid solaris_close
+#define solaris_seteuid solaris_close
+#define solaris_setgid solaris_close
+#define solaris_setegid solaris_close
+#define solaris_vhangup solaris_close
+#define solaris_fdsync solaris_close
+#define solaris_sigfillset solaris_sigpending
+#define solaris_vfork solaris_fork
+#define solaris_ksigaction solaris_sigaction
+#define solaris_BSDgetpgrp solaris_getpgrp
+#define solaris_BSDsetpgrp solaris_setpgrp
+#define solaris_waitsys solaris_waitid
+
+/* printargs does the right thing */
+#define solaris_sync printargs
+#define solaris_profil printargs
+#define solaris_yield printargs
+#define solaris_pause printargs
+#define solaris_sethostid printargs
+
+/* subfunction entry points */
+#define solaris_pgrpsys printargs
+#define solaris_sigcall printargs
+#define solaris_msgsys printargs
+#define solaris_shmsys printargs
+#define solaris_semsys printargs
+#define solaris_utssys printargs
+#define solaris_sysfs printargs
+#define solaris_spcall printargs
+#define solaris_context printargs
+
+/* same as linux */
+#define solaris_exit sys_exit
+#define solaris_fork sys_fork
+#define solaris_read sys_read
+#define solaris_write sys_write
+#define solaris_close sys_close
+#define solaris_creat sys_creat
+#define solaris_link sys_link
+#define solaris_unlink sys_unlink
+#define solaris_chdir sys_chdir
+#define solaris_time sys_time
+#define solaris_chmod sys_chmod
+#define solaris_lseek sys_lseek
+#define solaris_stime sys_stime
+#define solaris_alarm sys_alarm
+#define solaris_utime sys_utime
+#define solaris_access sys_access
+#define solaris_nice sys_nice
+#define solaris_dup sys_dup
+#define solaris_pipe sys_pipe
+#define solaris_times sys_times
+#define solaris_execve sys_execve
+#define solaris_umask sys_umask
+#define solaris_chroot sys_chroot
+#define solaris_rmdir sys_rmdir
+#define solaris_mkdir sys_mkdir
+#define solaris_getdents sys_getdents
+#define solaris_poll sys_poll
+#define solaris_symlink sys_symlink
+#define solaris_readlink sys_readlink
+#define solaris_setgroups sys_setgroups
+#define solaris_getgroups sys_getgroups
+#define solaris_fchmod sys_fchmod
+#define solaris_fchown sys_fchown
+#define solaris_mprotect sys_mprotect
+#define solaris_munmap sys_munmap
+#define solaris_readv sys_readv
+#define solaris_writev sys_writev
+#define solaris_chown sys_chown
+#define solaris_rename sys_rename
+#define solaris_gettimeofday sys_gettimeofday
+#define solaris_getitimer sys_getitimer
+#define solaris_setitimer sys_setitimer
+#define solaris_brk sys_brk
+#define solaris_mmap sys_mmap
+#define solaris_getsid sys_getsid
+#define solaris_setsid sys_setsid
+#define solaris_getpgid sys_getpgid
+#define solaris_setpgid sys_setpgid
+#define solaris_getpgrp sys_getpgrp
+
+/* These are handled according to current_personality */
+#define solaris_xstat sys_xstat
+#define solaris_fxstat sys_fxstat
+#define solaris_lxstat sys_lxstat
+#define solaris_xmknod sys_xmknod
+#define solaris_stat sys_stat
+#define solaris_fstat sys_fstat
+#define solaris_lstat sys_lstat
+#define solaris_pread sys_pread
+#define solaris_pwrite sys_pwrite
+#define solaris_ioctl sys_ioctl
+#define solaris_mknod sys_mknod
+
+/* To be done */
+#define solaris_mount printargs
+#define solaris_sysinfo printargs
+#define solaris_sysconfig printargs
+#define solaris_getpmsg printargs
+#define solaris_putpmsg printargs
+#define solaris_wait printargs
+#define solaris_waitid printargs
+#define solaris_sigsuspend printargs
+#define solaris_setpgrp printargs
+#define solaris_getcontext printargs
+#define solaris_setcontext printargs
+#define solaris_getpid printargs
+#define solaris_getuid printargs
+#define solaris_kill printargs
+#define solaris_getgid printargs
+#define solaris_fcntl printargs
+#define solaris_getmsg printargs
+#define solaris_putmsg printargs
+#define solaris_sigprocmask printargs
+#define solaris_sigaction printargs
+#define solaris_sigpending printargs
+#define solaris_mincore printargs
+#define solaris_fchdir printargs
+#define solaris_setrlimit printargs
+#define solaris_getrlimit printargs
+#define solaris_uname printargs
+#define solaris_adjtime printargs
+#define solaris_fchroot printargs
+#define solaris_utimes printargs
diff --git a/linux/sparc/errnoent.h b/linux/sparc/errnoent.h
new file mode 100644
index 0000000..d243699
--- /dev/null
+++ b/linux/sparc/errnoent.h
@@ -0,0 +1,127 @@
+ "ERRNO_0", /* 0 */
+ "EPERM", /* 1 */
+ "ENOENT", /* 2 */
+ "ESRCH", /* 3 */
+ "EINTR", /* 4 */
+ "EIO", /* 5 */
+ "ENXIO", /* 6 */
+ "E2BIG", /* 7 */
+ "ENOEXEC", /* 8 */
+ "EBADF", /* 9 */
+ "ECHILD", /* 10 */
+ "EAGAIN", /* 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 */
+ "EWOULDBLOCK", /* 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 */
+ "ENOSTR", /* 72 */
+ "ETIME", /* 73 */
+ "ENOSR", /* 74 */
+ "ENOMSG", /* 75 */
+ "EBADMSG", /* 76 */
+ "EIDRM", /* 77 */
+ "EDEADLK", /* 78 */
+ "ENOLCK", /* 79 */
+ "ENONET", /* 80 */
+ "ERREMOTE", /* 81 */
+ "ENOLINK", /* 82 */
+ "EADV", /* 83 */
+ "ESRMNT", /* 84 */
+ "ECOMM", /* 85 */
+ "EPROTO", /* 86 */
+ "EMULTIHOP", /* 87 */
+ "EDOTDOT", /* 88 */
+ "EREMCHG", /* 89 */
+ "ENOSYS", /* 90 */
+ "ESTRPIPE", /* 91 */
+ "EOVERFLOW", /* 92 */
+ "EBADFD", /* 93 */
+ "ECHRNG", /* 94 */
+ "EL2NSYNC", /* 95 */
+ "EL3HLT", /* 96 */
+ "EL3RST", /* 97 */
+ "ELNRNG", /* 98 */
+ "EUNATCH", /* 99 */
+ "ENOCSI", /* 100 */
+ "EL2HLT", /* 101 */
+ "EBADE", /* 102 */
+ "EBADR", /* 103 */
+ "EXFULL", /* 104 */
+ "ENOANO", /* 105 */
+ "EBADRQC", /* 106 */
+ "EBADSLT", /* 107 */
+ "EDEADLOCK", /* 108 */
+ "EBFONT", /* 109 */
+ "ELIBEXEC", /* 110 */
+ "ENODATA", /* 111 */
+ "ELIBBAD", /* 112 */
+ "ENOPKG", /* 113 */
+ "ELIBACC", /* 114 */
+ "ENOTUNIQ", /* 115 */
+ "ERESTART", /* 116 */
+ "EUCLEAN", /* 117 */
+ "ENOTNAM", /* 118 */
+ "ENAVAIL", /* 119 */
+ "EISNAM", /* 120 */
+ "EREMOTEIO", /* 121 */
+ "EILSEQ", /* 122 */
+ "ELIBMAX", /* 123 */
+ "ELIBSCN", /* 124 */
+ "ENOMEDIUM", /* 125 */
+ "EMEDIUMTYPE", /* 126 */
diff --git a/linux/sparc/errnoent1.h b/linux/sparc/errnoent1.h
new file mode 100644
index 0000000..418e2db
--- /dev/null
+++ b/linux/sparc/errnoent1.h
@@ -0,0 +1,152 @@
+ "ERRNO_0", /* 0 */
+ "EPERM", /* 1 */
+ "ENOENT", /* 2 */
+ "ESRCH", /* 3 */
+ "EINTR", /* 4 */
+ "EIO", /* 5 */
+ "ENXIO", /* 6 */
+ "E2BIG", /* 7 */
+ "ENOEXEC", /* 8 */
+ "EBADF", /* 9 */
+ "ECHILD", /* 10 */
+ "EAGAIN", /* 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 */
+ "ENOMSG", /* 35 */
+ "EIDRM", /* 36 */
+ "ECHRNG", /* 37 */
+ "EL2NSYNC", /* 38 */
+ "EL3HLT", /* 39 */
+ "EL3RST", /* 40 */
+ "ELNRNG", /* 41 */
+ "EUNATCH", /* 42 */
+ "ENOCSI", /* 43 */
+ "EL2HLT", /* 44 */
+ "EDEADLK", /* 45 */
+ "ENOLCK", /* 46 */
+ "ECANCELED", /* 47 */
+ "ENOTSUP", /* 48 */
+ "ERRNO_49", /* 49 */
+ "EBADE", /* 50 */
+ "EBADR", /* 51 */
+ "EXFULL", /* 52 */
+ "ENOANO", /* 53 */
+ "EBADRQC", /* 54 */
+ "EBADSLT", /* 55 */
+ "EDEADLOCK", /* 56 */
+ "EBFONT", /* 57 */
+ "ERRNO_58", /* 58 */
+ "ERRNO_59", /* 59 */
+ "ENOSTR", /* 60 */
+ "ENODATA", /* 61 */
+ "ETIME", /* 62 */
+ "ENOSR", /* 63 */
+ "ENONET", /* 64 */
+ "ENOPKG", /* 65 */
+ "EREMOTE", /* 66 */
+ "ENOLINK", /* 67 */
+ "EADV", /* 68 */
+ "ESRMNT", /* 69 */
+ "ECOMM", /* 70 */
+ "EPROTO", /* 71 */
+ "ERRNO_72", /* 72 */
+ "ERRNO_73", /* 73 */
+ "EMULTIHOP", /* 74 */
+ "ERRNO_75", /* 75 */
+ "ERRNO_76", /* 76 */
+ "EBADMSG", /* 77 */
+ "ENAMETOOLONG", /* 78 */
+ "EOVERFLOW", /* 79 */
+ "ENOTUNIQ", /* 80 */
+ "EBADFD", /* 81 */
+ "EREMCHG", /* 82 */
+ "ELIBACC", /* 83 */
+ "ELIBBAD", /* 84 */
+ "ELIBSCN", /* 85 */
+ "ELIBMAX", /* 86 */
+ "ELIBEXEC", /* 87 */
+ "EILSEQ", /* 88 */
+ "ENOSYS", /* 89 */
+ "ELOOP", /* 90 */
+ "ERESTART", /* 91 */
+ "ESTRPIPE", /* 92 */
+ "ENOTEMPTY", /* 93 */
+ "EUSERS", /* 94 */
+ "ENOTSOCK", /* 95 */
+ "EDESTADDRREQ", /* 96 */
+ "EMSGSIZE", /* 97 */
+ "EPROTOTYPE", /* 98 */
+ "ENOPROTOOPT", /* 99 */
+ "ERRNO_100", /* 100 */
+ "ERRNO_101", /* 101 */
+ "ERRNO_102", /* 102 */
+ "ERRNO_103", /* 103 */
+ "ERRNO_104", /* 104 */
+ "ERRNO_105", /* 105 */
+ "ERRNO_106", /* 106 */
+ "ERRNO_107", /* 107 */
+ "ERRNO_108", /* 108 */
+ "ERRNO_109", /* 109 */
+ "ERRNO_110", /* 110 */
+ "ERRNO_111", /* 111 */
+ "ERRNO_112", /* 112 */
+ "ERRNO_113", /* 113 */
+ "ERRNO_114", /* 114 */
+ "ERRNO_115", /* 115 */
+ "ERRNO_116", /* 116 */
+ "ERRNO_117", /* 117 */
+ "ERRNO_118", /* 118 */
+ "ERRNO_119", /* 119 */
+ "EPROTONOSUPPORT", /* 120 */
+ "ESOCKTNOSUPPORT", /* 121 */
+ "EOPNOTSUPP", /* 122 */
+ "EPFNOSUPPORT", /* 123 */
+ "EAFNOSUPPORT", /* 124 */
+ "EADDRINUSE", /* 125 */
+ "EADDRNOTAVAIL", /* 126 */
+ "ENETDOWN", /* 127 */
+ "ENETUNREACH", /* 128 */
+ "ENETRESET", /* 129 */
+ "ECONNABORTED", /* 130 */
+ "ECONNRESET", /* 131 */
+ "ENOBUFS", /* 132 */
+ "EISCONN", /* 133 */
+ "ENOTCONN", /* 134 */
+ "ERRNO_135", /* 135 */
+ "ERRNO_136", /* 136 */
+ "ERRNO_137", /* 137 */
+ "ERRNO_138", /* 138 */
+ "ERRNO_139", /* 139 */
+ "ERRNO_140", /* 140 */
+ "ERRNO_141", /* 141 */
+ "ERRNO_142", /* 142 */
+ "ESHUTDOWN", /* 143 */
+ "ETOOMANYREFS", /* 144 */
+ "ETIMEDOUT", /* 145 */
+ "ECONNREFUSED", /* 146 */
+ "EHOSTDOWN", /* 147 */
+ "EHOSTUNREACH", /* 148 */
+ "EALREADY", /* 149 */
+ "EINPROGRESS", /* 150 */
+ "ESTALE", /* 151 */
diff --git a/linux/sparc/gen.pl b/linux/sparc/gen.pl
new file mode 100644
index 0000000..8c2f75b
--- /dev/null
+++ b/linux/sparc/gen.pl
@@ -0,0 +1,37 @@
+open SPARC, "syscallent.h" || die "no puedo abrir el de la sparc";
+open ALPHA, "../alpha/syscallent.h" || die "no puedo abrir el de la alpha";
+open PC, "../i386/syscallent.h" || die "no puedo abrir PC\n";
+
+while (<SPARC>) {
+ chop;
+ ($i1, $i2, $i3, $syscall, $syscall_name) = split;
+ $strn[$index] = $syscall_name;
+ $name[$index++] = $syscall;
+}
+
+while (<ALPHA>){
+ if (/\{/) {
+ ($i1, $n, $pr, $syscall) = split;
+ $par{$syscall} = $n;
+ $prr{$syscall} = $pr;
+ }
+}
+
+while (<PC>){
+ if (/\{/) {
+ ($i1, $n, $pr, $syscall) = split;
+ $par{$syscall} = $n;
+ $prr{$syscall} = $pr;
+ }
+}
+
+print "missing \n";
+
+for ($i = 0; $i < $index; $i++){
+ $x = $name[$i];
+ $y = $strn[$i];
+ $n = $par{$x};
+ $p = $prr{$x};
+ $j++;
+ print "\t{ $n\t$p\t$x\t$y },\t /* $j */\n";
+}
diff --git a/linux/sparc/ioctlent.h.in b/linux/sparc/ioctlent.h.in
new file mode 100644
index 0000000..008aae0
--- /dev/null
+++ b/linux/sparc/ioctlent.h.in
@@ -0,0 +1,120 @@
+ {"asm/apc.h", "APCIOCGFANCTL", 0x4100},
+ {"asm/apc.h", "APCIOCSFANCTL", 0x4101},
+ {"asm/apc.h", "APCIOCGCPWR", 0x4102},
+ {"asm/apc.h", "APCIOCSCPWR", 0x4103},
+ {"asm/apc.h", "APCIOCGBPORT", 0x4104},
+ {"asm/apc.h", "APCIOCSBPORT", 0x4105},
+ {"asm/fbio.h", "FBIOGTYPE", 0x4600},
+ {"asm/fbio.h", "FBIOPUTCMAP", 0x4603},
+ {"asm/fbio.h", "FBIOSATTR", 0x4605},
+ {"asm/fbio.h", "FBIOGATTR", 0x4606},
+ {"asm/fbio.h", "FBIOSVIDEO", 0x4607},
+ {"asm/fbio.h", "FBIOGVIDEO", 0x4608},
+ {"asm/fbio.h", "FBIOSCURSOR", 0x4618},
+ {"asm/fbio.h", "FBIOGCURSOR", 0x4619},
+ {"asm/fbio.h", "FBIOSCURPOS", 0x461a},
+ {"asm/fbio.h", "FBIOGCURPOS", 0x461b},
+ {"asm/fbio.h", "FBIOGCURMAX", 0x461c},
+ {"asm/fbio.h", "FBIO_WID_ALLOC", 0x461e},
+ {"asm/fbio.h", "FBIO_WID_FREE", 0x461f},
+ {"asm/fbio.h", "FBIO_WID_PUT", 0x4620},
+ {"asm/fbio.h", "FBIO_WID_GET", 0x4621},
+ {"asm/fbio.h", "LEO_CLUTALLOC", 0x4c35},
+ {"asm/fbio.h", "LEO_CLUTFREE", 0x4c36},
+ {"asm/fbio.h", "LEO_CLUTREAD", 0x4c37},
+ {"asm/fbio.h", "LEO_CLUTPOST", 0x4c38},
+ {"asm/fbio.h", "LEO_SETGAMMA", 0x4c44},
+ {"asm/fbio.h", "LEO_GETGAMMA", 0x4c45},
+ {"asm/openpromio.h", "OPIOCGET", 0x4f01},
+ {"asm/openpromio.h", "OPIOCSET", 0x4f02},
+ {"asm/openpromio.h", "OPIOCNEXTPROP", 0x4f03},
+ {"asm/openpromio.h", "OPIOCGETOPTNODE", 0x4f04},
+ {"asm/openpromio.h", "OPIOCGETNEXT", 0x4f05},
+ {"asm/openpromio.h", "OPIOCGETCHILD", 0x4f06},
+ {"asm/ioctls.h", "TCGETA", 0x5401},
+ {"asm/ioctls.h", "TCSETA", 0x5402},
+ {"asm/ioctls.h", "TCSETAW", 0x5403},
+ {"asm/ioctls.h", "TCSETAF", 0x5404},
+ {"asm/ioctls.h", "TCSBRK", 0x5405},
+ {"asm/ioctls.h", "TCXONC", 0x5406},
+ {"asm/ioctls.h", "TCFLSH", 0x5407},
+ {"asm/ioctls.h", "TCGETS", 0x5408},
+ {"asm/ioctls.h", "TCSETS", 0x5409},
+ {"asm/ioctls.h", "TCSETSW", 0x540a},
+ {"asm/ioctls.h", "TCSETSF", 0x540b},
+ {"asm/ioctls.h", "TCGETS2", 0x540c},
+ {"asm/ioctls.h", "TCSETS2", 0x540d},
+ {"asm/ioctls.h", "TCSETSW2", 0x540e},
+ {"asm/ioctls.h", "TCSETSF2", 0x540f},
+ {"asm/ioctls.h", "TIOCLINUX", 0x541c},
+ {"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
+ {"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
+ {"asm/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm/watchdog.h", "WIOCSTART", 0x570a},
+ {"asm/watchdog.h", "WIOCSTOP", 0x570b},
+ {"asm/watchdog.h", "WIOCGSTAT", 0x570c},
+ {"asm/ioctls.h", "FIOCLEX", 0x6601},
+ {"asm/ioctls.h", "FIONCLEX", 0x6602},
+ {"asm/ioctls.h", "FIOASYNC", 0x667d},
+ {"asm/ioctls.h", "FIONBIO", 0x667e},
+ {"asm/ioctls.h", "FIONREAD", 0x667f},
+ {"asm/ioctls.h", "FIOQSIZE", 0x6680},
+ {"asm/envctrl.h", "ENVCTRL_RD_CPU_TEMPERATURE", 0x7040},
+ {"asm/envctrl.h", "ENVCTRL_RD_CPU_VOLTAGE", 0x7041},
+ {"asm/envctrl.h", "ENVCTRL_RD_FAN_STATUS", 0x7042},
+ {"asm/envctrl.h", "ENVCTRL_RD_WARNING_TEMPERATURE", 0x7043},
+ {"asm/envctrl.h", "ENVCTRL_RD_SHUTDOWN_TEMPERATURE", 0x7044},
+ {"asm/display7seg.h", "D7SIOCRD", 0x7045},
+ {"asm/envctrl.h", "ENVCTRL_RD_VOLTAGE_STATUS", 0x7045},
+ {"asm/display7seg.h", "D7SIOCWR", 0x7046},
+ {"asm/envctrl.h", "ENVCTRL_RD_SCSI_TEMPERATURE", 0x7046},
+ {"asm/display7seg.h", "D7SIOCTM", 0x7047},
+ {"asm/envctrl.h", "ENVCTRL_RD_ETHERNET_TEMPERATURE", 0x7047},
+ {"asm/envctrl.h", "ENVCTRL_RD_MTHRBD_TEMPERATURE", 0x7048},
+ {"asm/envctrl.h", "ENVCTRL_RD_GLOBALADDRESS", 0x7049},
+ {"asm/ioctls.h", "TIOCGETD", 0x7400},
+ {"asm/ioctls.h", "TIOCSETD", 0x7401},
+ {"asm/ioctls.h", "TIOCEXCL", 0x740d},
+ {"asm/ioctls.h", "TIOCNXCL", 0x740e},
+ {"asm/ioctls.h", "TIOCCONS", 0x7424},
+ {"asm/ioctls.h", "TIOCGSOFTCAR", 0x7464},
+ {"asm/ioctls.h", "TIOCSSOFTCAR", 0x7465},
+ {"asm/ioctls.h", "TIOCSWINSZ", 0x7467},
+ {"asm/ioctls.h", "TIOCGWINSZ", 0x7468},
+ {"asm/ioctls.h", "TIOCMGET", 0x746a},
+ {"asm/ioctls.h", "TIOCMBIC", 0x746b},
+ {"asm/ioctls.h", "TIOCMBIS", 0x746c},
+ {"asm/ioctls.h", "TIOCMSET", 0x746d},
+ {"asm/ioctls.h", "TIOCSTART", 0x746e},
+ {"asm/ioctls.h", "TIOCSTOP", 0x746f},
+ {"asm/ioctls.h", "TIOCPKT", 0x7470},
+ {"asm/ioctls.h", "TIOCNOTTY", 0x7471},
+ {"asm/ioctls.h", "TIOCSTI", 0x7472},
+ {"asm/ioctls.h", "TIOCOUTQ", 0x7473},
+ {"asm/ioctls.h", "TIOCCBRK", 0x747a},
+ {"asm/ioctls.h", "TIOCSBRK", 0x747b},
+ {"asm/ioctls.h", "TIOCSPGRP", 0x7482},
+ {"asm/ioctls.h", "TIOCGPGRP", 0x7483},
+ {"asm/ioctls.h", "TIOCSCTTY", 0x7484},
+ {"asm/ioctls.h", "TIOCGSID", 0x7485},
+ {"asm/ioctls.h", "TIOCGPTN", 0x7486},
+ {"asm/ioctls.h", "TIOCSPTLCK", 0x7487},
+ {"asm/ioctls.h", "TIOCSIG", 0x7488},
+ {"asm/sockios.h", "FIOSETOWN", 0x8901},
+ {"asm/sockios.h", "SIOCSPGRP", 0x8902},
+ {"asm/sockios.h", "FIOGETOWN", 0x8903},
+ {"asm/sockios.h", "SIOCGPGRP", 0x8904},
+ {"asm/sockios.h", "SIOCATMARK", 0x8905},
+ {"asm/sockios.h", "SIOCGSTAMP", 0x8906},
+ {"asm/sockios.h", "SIOCGSTAMPNS", 0x8907},
diff --git a/linux/sparc/ioctlent1.h b/linux/sparc/ioctlent1.h
new file mode 100644
index 0000000..7119c87
--- /dev/null
+++ b/linux/sparc/ioctlent1.h
@@ -0,0 +1,429 @@
+{"sys/dkio.h", "DKIOCGGEOM", 0x401},
+{"sys/dkio.h", "DKIOCSGEOM", 0x402},
+{"sys/dkio.h", "DKIOCINFO", 0x403},
+{"sys/dkio.h", "DKIOCSAPART", 0x404},
+{"sys/dkio.h", "DKIOCGAPART", 0x405},
+{"sys/dkio.h", "DKIOCEJECT", 0x406},
+{"sys/dkio.h", "DKIOCLOCK", 0x407},
+{"sys/dkio.h", "DKIOCUNLOCK", 0x408},
+{"sys/dkio.h", "DKIOCGVTOC", 0x40b},
+{"sys/dkio.h", "DKIOCSVTOC", 0x40c},
+{"sys/dkio.h", "DKIOCSTATE", 0x40d},
+{"sys/fdio.h", "FDIOGCHAR", 0x433},
+{"sys/fdio.h", "FDIOSCHAR", 0x434},
+{"sys/fdio.h", "FDEJECT", 0x435},
+{"sys/fdio.h", "FDGETCHANGE", 0x436},
+{"sys/fdio.h", "FDGETDRIVECHAR", 0x437},
+{"sys/fdio.h", "FDSETDRIVECHAR", 0x438},
+{"sys/fdio.h", "FDGETSEARCH", 0x439},
+{"sys/fdio.h", "FDSETSEARCH", 0x43a},
+{"sys/fdio.h", "FDIOCMD", 0x43b},
+{"sys/fdio.h", "FDRAW", 0x446},
+{"sys/fdio.h", "FDDEFGEOCHAR", 0x456},
+{"sys/hdio.h", "HDKIOCSTYPE", 0x465},
+{"sys/hdio.h", "HDKIOCGTYPE", 0x466},
+{"sys/hdio.h", "HDKIOCSBAD", 0x467},
+{"sys/hdio.h", "HDKIOCGBAD", 0x468},
+{"sys/hdio.h", "HDKIOCSCMD", 0x469},
+{"sys/hdio.h", "HDKIOCGDIAG", 0x46a},
+{"sys/cdio.h", "CDROMPAUSE", 0x497},
+{"sys/cdio.h", "CDROMRESUME", 0x498},
+{"sys/cdio.h", "CDROMPLAYMSF", 0x499},
+{"sys/cdio.h", "CDROMPLAYTRKIND", 0x49a},
+{"sys/cdio.h", "CDROMREADTOCHDR", 0x49b},
+{"sys/cdio.h", "CDROMREADTOCENTRY", 0x49c},
+{"sys/cdio.h", "CDROMSTOP", 0x49d},
+{"sys/cdio.h", "CDROMSTART", 0x49e},
+{"sys/cdio.h", "CDROMEJECT", 0x49f},
+{"sys/cdio.h", "CDROMVOLCTRL", 0x4a0},
+{"sys/cdio.h", "CDROMSUBCHNL", 0x4a1},
+{"sys/cdio.h", "CDROMREADMODE2", 0x4a2},
+{"sys/cdio.h", "CDROMREADMODE1", 0x4a3},
+{"sys/cdio.h", "CDROMREADOFFSET", 0x4a4},
+{"sys/cdio.h", "CDROMGBLKMODE", 0x4a5},
+{"sys/cdio.h", "CDROMSBLKMODE", 0x4a6},
+{"sys/cdio.h", "CDROMCDDA", 0x4a7},
+{"sys/cdio.h", "CDROMCDXA", 0x4a8},
+{"sys/cdio.h", "CDROMSUBCODE", 0x4a9},
+{"sys/cdio.h", "CDROMGDRVSPEED", 0x4aa},
+{"sys/cdio.h", "CDROMSDRVSPEED", 0x4ab},
+{"sys/scsi/impl/uscsi.h", "USCSICMD", 0x4c9},
+{"sys/bufmod.h", "SBIOCSTIME", 0x4201},
+{"sys/bufmod.h", "SBIOCGTIME", 0x4202},
+{"sys/bufmod.h", "SBIOCCTIME", 0x4203},
+{"sys/bufmod.h", "SBIOCSCHUNK", 0x4204},
+{"sys/bufmod.h", "SBIOCGCHUNK", 0x4205},
+{"sys/bufmod.h", "SBIOCSSNAP", 0x4206},
+{"sys/bufmod.h", "SBIOCGSNAP", 0x4207},
+{"sys/bufmod.h", "SBIOCSFLAGS", 0x4208},
+{"sys/bufmod.h", "SBIOCGFLAGS", 0x4209},
+{"sys/termios.h", "LDOPEN", 0x4400},
+{"sys/termios.h", "LDCLOSE", 0x4401},
+{"sys/dlpi.h", "DLIOCRAW", 0x4401},
+{"sys/sad.h", "SAD_SAP", 0x4401},
+{"sys/termios.h", "LDCHG", 0x4402},
+{"sys/sad.h", "SAD_GAP", 0x4402},
+{"sys/sad.h", "SAD_VML", 0x4403},
+{"sys/termios.h", "LDGETT", 0x4408},
+{"sys/termios.h", "LDSETT", 0x4409},
+{"sys/dlpi.h", "DL_IOC_HDR_INFO", 0x440a},
+{"sys/termios.h", "LDSMAP", 0x446e},
+{"sys/termios.h", "LDGMAP", 0x446f},
+{"sys/termios.h", "LDNMAP", 0x4470},
+{"sys/termios.h", "LDEMAP", 0x4471},
+{"sys/termios.h", "LDDMAP", 0x4472},
+{"sys/fbio.h", "FBIOGTYPE", 0x4600},
+{"sys/fbio.h", "FBIOGINFO", 0x4602},
+{"sys/fbio.h", "FBIOPUTCMAP", 0x4603},
+{"sys/fbio.h", "FBIOGETCMAP", 0x4604},
+{"sys/fbio.h", "FBIOSATTR", 0x4605},
+{"sys/fbio.h", "FBIOGATTR", 0x4606},
+{"sys/fbio.h", "FBIOSVIDEO", 0x4607},
+{"sys/fbio.h", "FBIOGVIDEO", 0x4608},
+{"sys/fbio.h", "FBIOVERTICAL", 0x4609},
+{"sys/fbio.h", "GRABPAGEALLOC", 0x460a},
+{"sys/fbio.h", "GRABPAGEFREE", 0x460b},
+{"sys/fbio.h", "GRABATTACH", 0x460c},
+{"sys/fbio.h", "FBIOGPLNGRP", 0x460d},
+{"sys/fbio.h", "FBIOGCMSIZE", 0x460e},
+{"sys/fbio.h", "FBIOSCMSIZE", 0x460f},
+{"sys/fbio.h", "FBIOSCMS", 0x4610},
+{"sys/fbio.h", "FBIOAVAILPLNGRP", 0x4611},
+{"sys/fbio.h", "FBIODBLGINFO", 0x4612},
+{"sys/fbio.h", "FBIODBLSINFO", 0x4613},
+{"sys/fbio.h", "FBIOSWINFD", 0x4614},
+{"sys/fbio.h", "FBIOSAVWINFD", 0x4615},
+{"sys/fbio.h", "FBIORESWINFD", 0x4616},
+{"sys/fbio.h", "FBIOSRWINFD", 0x4617},
+{"sys/visual_io.h", "VIS_SETCURSOR", 0x4618},
+{"sys/fbio.h", "FBIOSCURSOR", 0x4618},
+{"sys/fbio.h", "FBIOGCURSOR", 0x4619},
+{"sys/visual_io.h", "VIS_GETCURSOR", 0x4619},
+{"sys/fbio.h", "FBIOSCURPOS", 0x461a},
+{"sys/visual_io.h", "VIS_MOVECURSOR", 0x461a},
+{"sys/fbio.h", "FBIOGCURPOS", 0x461b},
+{"sys/visual_io.h", "VIS_GETCURSORPOS", 0x461b},
+{"sys/fbio.h", "FBIOGCURMAX", 0x461c},
+{"sys/fbio.h", "GRABLOCKINFO", 0x461d},
+{"sys/fbio.h", "FBIO_WID_ALLOC", 0x461e},
+{"sys/fbio.h", "FBIO_WID_FREE", 0x461f},
+{"sys/fbio.h", "FBIO_WID_PUT", 0x4620},
+{"sys/fbio.h", "FBIO_WID_GET", 0x4621},
+{"sys/fbio.h", "FBIO_DEVID", 0x4622},
+{"sys/fbio.h", "FBIO_U_RST", 0x4623},
+{"sys/fbio.h", "FBIO_FULLSCREEN_ELIMINATION_GROUPS", 0x4624},
+{"sys/fbio.h", "FBIO_WID_DBL_SET", 0x4625},
+{"sys/fbio.h", "FBIOVRTOFFSET", 0x4626},
+{"sys/fbio.h", "FBIOGXINFO", 0x4627},
+{"sys/fbio.h", "FBIOMONINFO", 0x4628},
+{"sys/fbio.h", "FBIOPUTCMAPI", 0x4629},
+{"sys/fbio.h", "FBIOGETCMAPI", 0x462a},
+{"sys/fbio.h", "FBIO_ASSIGNWID", 0x462b},
+{"sys/fbio.h", "FBIO_STEREO", 0x462c},
+{"sys/gpio.h", "GP1IO_PUT_INFO", 0x4700},
+{"sys/gpio.h", "GP1IO_GET_STATIC_BLOCK", 0x4701},
+{"sys/gpio.h", "GP1IO_FREE_STATIC_BLOCK", 0x4702},
+{"sys/gpio.h", "GP1IO_GET_GBUFFER_STATE", 0x4703},
+{"sys/gpio.h", "GP1IO_CHK_GP", 0x4704},
+{"sys/gpio.h", "GP1IO_GET_RESTART_COUNT", 0x4705},
+{"sys/gpio.h", "GP1IO_REDIRECT_DEVFB", 0x4706},
+{"sys/gpio.h", "GP1IO_GET_REQDEV", 0x4707},
+{"sys/gpio.h", "GP1IO_GET_TRUMINORDEV", 0x4708},
+{"sys/gpio.h", "GP1IO_CHK_FOR_GBUFFER", 0x4709},
+{"sys/gpio.h", "GP1IO_SET_USING_GBUFFER", 0x470a},
+{"sys/gpio.h", "GP1IO_INFO_STATIC_BLOCK", 0x470b},
+{"sys/sockmod.h", "O_SI_GETUDATA", 0x4965},
+{"sys/sockmod.h", "SI_SHUTDOWN", 0x4966},
+{"sys/sockmod.h", "SI_LISTEN", 0x4967},
+{"sys/sockmod.h", "SI_SETMYNAME", 0x4968},
+{"sys/sockmod.h", "SI_SETPEERNAME", 0x4969},
+{"sys/sockmod.h", "SI_GETINTRANSIT", 0x496a},
+{"sys/sockmod.h", "SI_SOCKPARAMS", 0x496d},
+{"sys/sockmod.h", "SI_GETUDATA", 0x496e},
+{"sys/strlog.h", "I_TRCLOG", 0x4c01},
+{"sys/strlog.h", "I_ERRLOG", 0x4c02},
+{"sys/strlog.h", "I_CONSLOG", 0x4c03},
+{"sys/cg14io.h", "MDI_RESET", 0x4d01},
+{"sys/cg14io.h", "MDI_GET_CFGINFO", 0x4d02},
+{"sys/cg14io.h", "MDI_SET_PIXELMODE", 0x4d03},
+{"sys/cg14io.h", "MDI_SET_COUNTERS", 0x4d04},
+{"sys/cg14io.h", "MDI_SET_PPR", 0x4d05},
+{"sys/cg14io.h", "MDI_VRT_CNTL", 0x4d06},
+{"sys/cg14io.h", "MDI_SET_CLUT", 0x4d07},
+{"sys/cg14io.h", "MDI_GET_CLUT", 0x4d08},
+{"sys/cg14io.h", "MDI_SET_XLUT", 0x4d09},
+{"sys/cg14io.h", "MDI_GET_XLUT", 0x4d0a},
+{"sys/cg14io.h", "MDI_GAMMA_CORRECT", 0x4d0b},
+{"sys/cg14io.h", "MDI_SET_GAMMALUT", 0x4d0c},
+{"sys/cg14io.h", "MDI_GET_GAMMALUT", 0x4d0d},
+{"sys/cg14io.h", "MDI_SET_DEGAMMALUT", 0x4d0e},
+{"sys/cg14io.h", "MDI_GET_DEGAMMALUT", 0x4d0f},
+{"sys/cg14io.h", "MDI_GET_BUFFER_INFO", 0x4d10},
+{"sys/cg14io.h", "MDI_SET_CURSOR", 0x4d11},
+{"sys/cg14io.h", "MDI_GET_DIAGINFO", 0x4d12},
+{"sys/cg14io.h", "MDI_SET_RESOLUTION", 0x4d13},
+{"sys/cg14io.h", "SET_MONITOR_POWER", 0x4d14},
+{"sys/openpromio.h", "OPROMGETBOOTARGS", 0x4f0c},
+{"sys/pfmod.h", "PFIOCSETF", 0x5001},
+{"sys/stropts.h", "I_NREAD", 0x5301},
+{"sys/stropts.h", "I_PUSH", 0x5302},
+{"sys/stropts.h", "I_POP", 0x5303},
+{"sys/stropts.h", "I_LOOK", 0x5304},
+{"sys/stropts.h", "I_FLUSH", 0x5305},
+{"sys/stropts.h", "I_SRDOPT", 0x5306},
+{"sys/stropts.h", "I_GRDOPT", 0x5307},
+{"sys/stropts.h", "I_STR", 0x5308},
+{"sys/stropts.h", "I_SETSIG", 0x5309},
+{"sys/stropts.h", "I_GETSIG", 0x530a},
+{"sys/stropts.h", "I_FIND", 0x530b},
+{"sys/stropts.h", "I_LINK", 0x530c},
+{"sys/stropts.h", "I_UNLINK", 0x530d},
+{"sys/stropts.h", "I_RECVFD", 0x530e},
+{"sys/stropts.h", "I_PEEK", 0x530f},
+{"sys/stropts.h", "I_FDINSERT", 0x5310},
+{"sys/stropts.h", "I_SENDFD", 0x5311},
+{"sys/stropts.h", "I_SWROPT", 0x5313},
+{"sys/stropts.h", "I_GWROPT", 0x5314},
+{"sys/stropts.h", "I_LIST", 0x5315},
+{"sys/stropts.h", "I_PLINK", 0x5316},
+{"sys/stropts.h", "I_PUNLINK", 0x5317},
+{"sys/stropts.h", "I_SETEV", 0x5318},
+{"sys/stropts.h", "I_GETEV", 0x5319},
+{"sys/stropts.h", "I_STREV", 0x531a},
+{"sys/stropts.h", "I_UNSTREV", 0x531b},
+{"sys/stropts.h", "I_FLUSHBAND", 0x531c},
+{"sys/stropts.h", "I_CKBAND", 0x531d},
+{"sys/stropts.h", "I_GETBAND", 0x531e},
+{"sys/stropts.h", "I_ATMARK", 0x531f},
+{"sys/stropts.h", "I_SETCLTIME", 0x5320},
+{"sys/stropts.h", "I_GETCLTIME", 0x5321},
+{"sys/stropts.h", "I_CANPUT", 0x5322},
+{"sys/termios.h", "TCGETA", 0x5401},
+{"sys/termios.h", "TCSETA", 0x5402},
+{"sys/termios.h", "TCSETAW", 0x5403},
+{"sys/termios.h", "TCSETAF", 0x5404},
+{"sys/termios.h", "TCSBRK", 0x5405},
+{"sys/termios.h", "TCXONC", 0x5406},
+{"sys/termios.h", "TCFLSH", 0x5407},
+{"sys/termios.h", "TIOCKBON", 0x5408},
+{"sys/termios.h", "TIOCKBOF", 0x5409},
+{"sys/termios.h", "KBENABLED", 0x540a},
+{"sys/termios.h", "TCGETS", 0x540d},
+{"sys/termios.h", "TCSETS", 0x540e},
+{"sys/termios.h", "TCSANOW", 0x540e},
+{"sys/termios.h", "TCSADRAIN", 0x540f},
+{"sys/termios.h", "TCSETSW", 0x540f},
+{"sys/termios.h", "TCSAFLUSH", 0x5410},
+{"sys/termios.h", "TCSETSF", 0x5410},
+{"sys/termio.h", "TCDSET", 0x5420},
+{"sys/termios.h", "TCDSET", 0x5420},
+{"sys/termios.h", "RTS_TOG", 0x5421},
+{"sys/ttold.h", "TIOCSWINSZ", 0x5467},
+{"sys/termios.h", "TIOCSWINSZ", 0x5467},
+{"sys/ttold.h", "TIOCGWINSZ", 0x5468},
+{"sys/termios.h", "TIOCGWINSZ", 0x5468},
+{"sys/termios.h", "TIOCGSOFTCAR", 0x5469},
+{"sys/termios.h", "TIOCSSOFTCAR", 0x546a},
+{"sys/timod.h", "TI_GETINFO", 0x548c},
+{"sys/timod.h", "TI_OPTMGMT", 0x548d},
+{"sys/timod.h", "TI_BIND", 0x548e},
+{"sys/timod.h", "TI_UNBIND", 0x548f},
+{"sys/timod.h", "TI_GETMYNAME", 0x5490},
+{"sys/timod.h", "TI_GETPEERNAME", 0x5491},
+{"sys/timod.h", "TI_SETMYNAME", 0x5492},
+{"sys/timod.h", "TI_SETPEERNAME", 0x5493},
+{"sys/termiox.h", "TCGETX", 0x5801},
+{"sys/termiox.h", "TCSETX", 0x5802},
+{"sys/termiox.h", "TCSETXW", 0x5803},
+{"sys/termiox.h", "TCSETXF", 0x5804},
+{"sys/ioctl.h", "DIOCGETC", 0x6401},
+{"sys/ioctl.h", "DIOCGETB", 0x6402},
+{"sys/ioctl.h", "DIOCSETE", 0x6403},
+{"sys/termios.h", "DIOCGETP", 0x6408},
+{"sys/termios.h", "DIOCSETP", 0x6409},
+{"sys/jioctl.h", "JBOOT", 0x6a01},
+{"sys/jioctl.h", "JTERM", 0x6a02},
+{"sys/jioctl.h", "JMPX", 0x6a03},
+{"sys/jioctl.h", "JWINSIZE", 0x6a05},
+{"sys/jioctl.h", "JZOMBOOT", 0x6a07},
+{"sys/jioctl.h", "JAGENT", 0x6a09},
+{"sys/jioctl.h", "JTRUN", 0x6a0a},
+{"sys/jioctl.h", "JXTPROTO", 0x6a0b},
+{"sys/kbio.h", "KIOCTRANS", 0x6b00},
+{"sys/kbio.h", "KIOCSETKEY", 0x6b01},
+{"sys/kbio.h", "KIOCGETKEY", 0x6b02},
+{"sys/kbio.h", "KIOCGTRANS", 0x6b05},
+{"sys/kbio.h", "KIOCTRANSABLE", 0x6b06},
+{"sys/kbio.h", "KIOCGTRANSABLE", 0x6b07},
+{"sys/kbio.h", "KIOCCMD", 0x6b08},
+{"sys/kbio.h", "KIOCTYPE", 0x6b09},
+{"sys/kbio.h", "KIOCSDIRECT", 0x6b0a},
+{"sys/kbio.h", "KIOCGDIRECT", 0x6b0b},
+{"sys/kbio.h", "KIOCSKEY", 0x6b0c},
+{"sys/kbio.h", "KIOCGKEY", 0x6b0d},
+{"sys/kbio.h", "KIOCSLED", 0x6b0e},
+{"sys/kbio.h", "KIOCGLED", 0x6b0f},
+{"sys/kbio.h", "KIOCSCOMPAT", 0x6b10},
+{"sys/kbio.h", "KIOCGCOMPAT", 0x6b11},
+{"sys/kbio.h", "KIOCLAYOUT", 0x6b14},
+{"sys/ioctl.h", "LIOCGETP", 0x6c01},
+{"sys/ioctl.h", "LIOCSETP", 0x6c02},
+{"sys/ioctl.h", "LIOCGETS", 0x6c05},
+{"sys/ioctl.h", "LIOCSETS", 0x6c06},
+{"sys/mtio.h", "MTIOCTOP", 0x6d01},
+{"sys/msio.h", "MSIOGETPARMS", 0x6d01},
+{"sys/msio.h", "MSIOSETPARMS", 0x6d02},
+{"sys/mtio.h", "MTIOCGET", 0x6d02},
+{"sys/mtio.h", "MTIOCGETDRIVETYPE", 0x6d03},
+{"sys/procfs.h", "PIOCSTATUS", 0x7101},
+{"sys/procfs.h", "PIOCSTOP", 0x7102},
+{"sys/procfs.h", "PIOCWSTOP", 0x7103},
+{"sys/procfs.h", "PIOCRUN", 0x7104},
+{"sys/procfs.h", "PIOCGTRACE", 0x7105},
+{"sys/procfs.h", "PIOCSTRACE", 0x7106},
+{"sys/procfs.h", "PIOCSSIG", 0x7107},
+{"sys/procfs.h", "PIOCKILL", 0x7108},
+{"sys/procfs.h", "PIOCUNKILL", 0x7109},
+{"sys/procfs.h", "PIOCGHOLD", 0x710a},
+{"sys/procfs.h", "PIOCSHOLD", 0x710b},
+{"sys/procfs.h", "PIOCMAXSIG", 0x710c},
+{"sys/procfs.h", "PIOCACTION", 0x710d},
+{"sys/procfs.h", "PIOCGFAULT", 0x710e},
+{"sys/procfs.h", "PIOCSFAULT", 0x710f},
+{"sys/procfs.h", "PIOCCFAULT", 0x7110},
+{"sys/procfs.h", "PIOCGENTRY", 0x7111},
+{"sys/procfs.h", "PIOCSENTRY", 0x7112},
+{"sys/procfs.h", "PIOCGEXIT", 0x7113},
+{"sys/procfs.h", "PIOCSEXIT", 0x7114},
+{"sys/procfs.h", "PIOCSFORK", 0x7115},
+{"sys/procfs.h", "PIOCRFORK", 0x7116},
+{"sys/procfs.h", "PIOCSRLC", 0x7117},
+{"sys/procfs.h", "PIOCRRLC", 0x7118},
+{"sys/procfs.h", "PIOCGREG", 0x7119},
+{"sys/procfs.h", "PIOCSREG", 0x711a},
+{"sys/procfs.h", "PIOCGFPREG", 0x711b},
+{"sys/procfs.h", "PIOCSFPREG", 0x711c},
+{"sys/procfs.h", "PIOCNICE", 0x711d},
+{"sys/procfs.h", "PIOCPSINFO", 0x711e},
+{"sys/procfs.h", "PIOCNMAP", 0x711f},
+{"sys/procfs.h", "PIOCMAP", 0x7120},
+{"sys/procfs.h", "PIOCOPENM", 0x7121},
+{"sys/procfs.h", "PIOCCRED", 0x7122},
+{"sys/procfs.h", "PIOCGROUPS", 0x7123},
+{"sys/procfs.h", "PIOCGETPR", 0x7124},
+{"sys/procfs.h", "PIOCGETU", 0x7125},
+{"sys/procfs.h", "PIOCSET", 0x7126},
+{"sys/procfs.h", "PIOCRESET", 0x7127},
+{"sys/procfs.h", "PIOCNWATCH", 0x7128},
+{"sys/procfs.h", "PIOCGWATCH", 0x7129},
+{"sys/procfs.h", "PIOCSWATCH", 0x712a},
+{"sys/procfs.h", "PIOCUSAGE", 0x712b},
+{"sys/procfs.h", "PIOCOPENPD", 0x712c},
+{"sys/procfs.h", "PIOCLWPIDS", 0x712d},
+{"sys/procfs.h", "PIOCOPENLWP", 0x712e},
+{"sys/procfs.h", "PIOCLSTATUS", 0x712f},
+{"sys/procfs.h", "PIOCLUSAGE", 0x7130},
+{"sys/procfs.h", "PIOCNAUXV", 0x7131},
+{"sys/procfs.h", "PIOCAUXV", 0x7132},
+{"sys/procfs.h", "PIOCGWIN", 0x7165},
+{"sys/ttold.h", "TIOCGETD", 0x7400},
+{"sys/termios.h", "TIOCGETD", 0x7400},
+{"sys/termios.h", "TIOCSETD", 0x7401},
+{"sys/ttold.h", "TIOCSETD", 0x7401},
+{"sys/termios.h", "TIOCHPCL", 0x7402},
+{"sys/ttold.h", "TIOCHPCL", 0x7402},
+{"sys/ttold.h", "TIOCGETP", 0x7408},
+{"sys/termios.h", "TIOCGETP", 0x7408},
+{"sys/termios.h", "TIOCSETP", 0x7409},
+{"sys/ttold.h", "TIOCSETP", 0x7409},
+{"sys/ttold.h", "TIOCSETN", 0x740a},
+{"sys/termios.h", "TIOCSETN", 0x740a},
+{"sys/ttold.h", "TIOCEXCL", 0x740d},
+{"sys/termios.h", "TIOCEXCL", 0x740d},
+{"sys/ttold.h", "TIOCNXCL", 0x740e},
+{"sys/termios.h", "TIOCNXCL", 0x740e},
+{"sys/termios.h", "TIOCFLUSH", 0x7410},
+{"sys/ttold.h", "TIOCFLUSH", 0x7410},
+{"sys/termios.h", "TIOCSETC", 0x7411},
+{"sys/ttold.h", "TIOCSETC", 0x7411},
+{"sys/termios.h", "TIOCGETC", 0x7412},
+{"sys/ttold.h", "TIOCGETC", 0x7412},
+{"sys/termios.h", "TIOCGPGRP", 0x7414},
+{"sys/termios.h", "TIOCSPGRP", 0x7415},
+{"sys/termios.h", "TIOCGSID", 0x7416},
+{"sys/termios.h", "TIOCSTI", 0x7417},
+{"sys/termios.h", "TIOCSSID", 0x7418},
+{"sys/termios.h", "TIOCMSET", 0x741a},
+{"sys/termios.h", "TIOCMBIS", 0x741b},
+{"sys/termios.h", "TIOCMBIC", 0x741c},
+{"sys/termios.h", "TIOCMGET", 0x741d},
+{"sys/termios.h", "TIOCREMOTE", 0x741e},
+{"sys/ttold.h", "TIOCREMOTE", 0x741e},
+{"sys/termios.h", "TIOCSIGNAL", 0x741f},
+{"sys/termios.h", "TIOCSTART", 0x746e},
+{"sys/ttold.h", "TIOCSTART", 0x746e},
+{"sys/termios.h", "TIOCSTOP", 0x746f},
+{"sys/ttold.h", "TIOCSTOP", 0x746f},
+{"sys/ttold.h", "TIOCNOTTY", 0x7471},
+{"sys/termios.h", "TIOCNOTTY", 0x7471},
+{"sys/termios.h", "TIOCOUTQ", 0x7473},
+{"sys/ttold.h", "TIOCOUTQ", 0x7473},
+{"sys/termios.h", "TIOCGLTC", 0x7474},
+{"sys/ttold.h", "TIOCGLTC", 0x7474},
+{"sys/termios.h", "TIOCSLTC", 0x7475},
+{"sys/ttold.h", "TIOCSLTC", 0x7475},
+{"sys/termios.h", "TIOCCDTR", 0x7478},
+{"sys/ttold.h", "TIOCCDTR", 0x7478},
+{"sys/ttold.h", "TIOCSDTR", 0x7479},
+{"sys/termios.h", "TIOCSDTR", 0x7479},
+{"sys/termios.h", "TIOCCBRK", 0x747a},
+{"sys/ttold.h", "TIOCCBRK", 0x747a},
+{"sys/termios.h", "TIOCSBRK", 0x747b},
+{"sys/ttold.h", "TIOCSBRK", 0x747b},
+{"sys/termios.h", "TIOCLGET", 0x747c},
+{"sys/ttold.h", "TIOCLGET", 0x747c},
+{"sys/termios.h", "TIOCLSET", 0x747d},
+{"sys/ttold.h", "TIOCLSET", 0x747d},
+{"sys/ttold.h", "TIOCLBIC", 0x747e},
+{"sys/termios.h", "TIOCLBIC", 0x747e},
+{"sys/ttold.h", "TIOCLBIS", 0x747f},
+{"sys/termios.h", "TIOCLBIS", 0x747f},
+{"sys/vol.h", "VOLIOCMAP", 0x7601},
+{"sys/vuid_event.h", "VUIDSFORMAT", 0x7601},
+{"sys/vuid_event.h", "VUIDSFORMAT", 0x7601},
+{"sys/vuid_event.h", "VUIDGFORMAT", 0x7602},
+{"sys/vuid_event.h", "VUIDGFORMAT", 0x7602},
+{"sys/vol.h", "VOLIOCUNMAP", 0x7602},
+{"sys/vol.h", "VOLIOCEVENT", 0x7603},
+{"sys/vuid_event.h", "VUIDSADDR", 0x7603},
+{"sys/vuid_event.h", "VUIDSADDR", 0x7603},
+{"sys/vuid_event.h", "VUIDGADDR", 0x7604},
+{"sys/vuid_event.h", "VUIDGADDR", 0x7604},
+{"sys/vol.h", "VOLIOCEJECT", 0x7604},
+{"sys/vol.h", "VOLIOCCHECK", 0x7605},
+{"sys/vol.h", "VOLIOCINUSE", 0x7606},
+{"sys/vol.h", "VOLIOCDGATTR", 0x7607},
+{"sys/vol.h", "VOLIOCDSATTR", 0x7608},
+{"sys/vol.h", "VOLIOCDCHECK", 0x7609},
+{"sys/vol.h", "VOLIOCCANCEL", 0x760a},
+{"sys/vol.h", "VOLIOCINFO", 0x760b},
+{"sys/vol.h", "VOLIOCSATTR", 0x760c},
+{"sys/vol.h", "VOLIOCGATTR", 0x760d},
+{"sys/vol.h", "VOLIOCDINUSE", 0x760e},
+{"sys/vol.h", "VOLIOCDAEMON", 0x760f},
+{"sys/vol.h", "VOLIOCFLAGS", 0x7610},
+{"sys/vol.h", "VOLIOCEXTRA4", 0x7611},
+{"sys/vol.h", "VOLIOCEXTRA5", 0x7612},
+{"sys/vol.h", "VOLIOCEXTRA6", 0x7613},
+{"sys/vol.h", "VOLIOCEXTRA7", 0x7614},
+{"sys/ser_sync.h", "S_IOCGETMODE", 0x7a01},
+{"sys/ser_sync.h", "S_IOCSETMODE", 0x7a02},
+{"sys/ser_sync.h", "S_IOCGETSTATS", 0x7a03},
+{"sys/ser_sync.h", "S_IOCCLRSTATS", 0x7a04},
+{"sys/ser_sync.h", "S_IOCGETSPEED", 0x7a05},
+{"sys/ser_sync.h", "S_IOCGETMRU", 0x7a06},
+{"sys/ser_sync.h", "S_IOCSETMRU", 0x7a07},
+{"sys/ser_sync.h", "S_IOCGETMTU", 0x7a08},
+{"sys/ser_sync.h", "S_IOCSETMTU", 0x7a09},
+{"sys/ser_sync.h", "S_IOCGETMCTL", 0x7a0a},
+{"sys/tl.h", "TL_IOC_CREDOPT", 0x544c01},
diff --git a/linux/sparc/signalent.h b/linux/sparc/signalent.h
new file mode 100644
index 0000000..e059b5d
--- /dev/null
+++ b/linux/sparc/signalent.h
@@ -0,0 +1,32 @@
+ "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 */
+ "SIGLOST", /* 29 */
+ "SIGUSR1", /* 30 */
+ "SIGUSR2", /* 31 */
diff --git a/linux/sparc/signalent1.h b/linux/sparc/signalent1.h
new file mode 100644
index 0000000..58869a5
--- /dev/null
+++ b/linux/sparc/signalent1.h
@@ -0,0 +1,36 @@
+ "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 */
+ "SIGUSR1", /* 16 */
+ "SIGUSR2", /* 17 */
+ "SIGCHLD", /* 18 */
+ "SIGPWR", /* 19 */
+ "SIGWINCH", /* 20 */
+ "SIGURG", /* 21 */
+ "SIGPOLL", /* 22 */
+ "SIGSTOP", /* 23 */
+ "SIGTSTP", /* 24 */
+ "SIGCONT", /* 25 */
+ "SIGTTIN", /* 26 */
+ "SIGTTOU", /* 27 */
+ "SIGVTALRM", /* 28 */
+ "SIGPROF", /* 29 */
+ "SIGXCPU", /* 30 */
+ "SIGXFSZ", /* 31 */
+ "SIGWAITING", /* 32 */
+ "SIGLWP", /* 33 */
+ "SIGFREEZE", /* 34 */
+ "SIGTHAW", /* 35 */
diff --git a/linux/sparc/syscall1.h b/linux/sparc/syscall1.h
new file mode 100644
index 0000000..6f30b74
--- /dev/null
+++ b/linux/sparc/syscall1.h
@@ -0,0 +1,498 @@
+/*
+ * 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.
+ */
+
+#define SOLARIS_syscall 0
+#define SOLARIS_exit 1
+#define SOLARIS_fork 2
+#define SOLARIS_read 3
+#define SOLARIS_write 4
+#define SOLARIS_open 5
+#define SOLARIS_close 6
+#define SOLARIS_wait 7
+#define SOLARIS_creat 8
+#define SOLARIS_link 9
+#define SOLARIS_unlink 10
+#define SOLARIS_exec 11
+#define SOLARIS_chdir 12
+#define SOLARIS_time 13
+#define SOLARIS_mknod 14
+#define SOLARIS_chmod 15
+#define SOLARIS_chown 16
+#define SOLARIS_brk 17
+#define SOLARIS_stat 18
+#define SOLARIS_lseek 19
+#define SOLARIS_getpid 20
+#define SOLARIS_mount 21
+#define SOLARIS_umount 22
+#define SOLARIS_setuid 23
+#define SOLARIS_getuid 24
+#define SOLARIS_stime 25
+#define SOLARIS_ptrace 26
+#define SOLARIS_alarm 27
+#define SOLARIS_fstat 28
+#define SOLARIS_pause 29
+#define SOLARIS_utime 30
+#define SOLARIS_stty 31
+#define SOLARIS_gtty 32
+#define SOLARIS_access 33
+#define SOLARIS_nice 34
+#define SOLARIS_statfs 35
+#define SOLARIS_sync 36
+#define SOLARIS_kill 37
+#define SOLARIS_fstatfs 38
+#define SOLARIS_pgrpsys 39
+#define SOLARIS_xenix 40
+#define SOLARIS_dup 41
+#define SOLARIS_pipe 42
+#define SOLARIS_times 43
+#define SOLARIS_profil 44
+#define SOLARIS_plock 45
+#define SOLARIS_setgid 46
+#define SOLARIS_getgid 47
+#define SOLARIS_signal 48
+#define SOLARIS_msgsys 49
+#define SOLARIS_syssun 50
+#define SOLARIS_acct 51
+#define SOLARIS_shmsys 52
+#define SOLARIS_semsys 53
+#define SOLARIS_ioctl 54
+#define SOLARIS_uadmin 55
+#define SOLARIS_utssys 57
+#define SOLARIS_fdsync 58
+#define SOLARIS_execve 59
+#define SOLARIS_umask 60
+#define SOLARIS_chroot 61
+#define SOLARIS_fcntl 62
+#define SOLARIS_ulimit 63
+#define SOLARIS_rmdir 79
+#define SOLARIS_mkdir 80
+#define SOLARIS_getdents 81
+#define SOLARIS_sysfs 84
+#define SOLARIS_getmsg 85
+#define SOLARIS_putmsg 86
+#define SOLARIS_poll 87
+#define SOLARIS_lstat 88
+#define SOLARIS_symlink 89
+#define SOLARIS_readlink 90
+#define SOLARIS_setgroups 91
+#define SOLARIS_getgroups 92
+#define SOLARIS_fchmod 93
+#define SOLARIS_fchown 94
+#define SOLARIS_sigprocmask 95
+#define SOLARIS_sigsuspend 96
+#define SOLARIS_sigaltstack 97
+#define SOLARIS_sigaction 98
+#define SOLARIS_sigpending 99
+#define SOLARIS_context 100
+#define SOLARIS_evsys 101
+#define SOLARIS_evtrapret 102
+#define SOLARIS_statvfs 103
+#define SOLARIS_fstatvfs 104
+#define SOLARIS_nfssys 106
+#define SOLARIS_waitsys 107
+#define SOLARIS_sigsendsys 108
+#define SOLARIS_hrtsys 109
+#define SOLARIS_acancel 110
+#define SOLARIS_async 111
+#define SOLARIS_priocntlsys 112
+#define SOLARIS_pathconf 113
+#define SOLARIS_mincore 114
+#define SOLARIS_mmap 115
+#define SOLARIS_mprotect 116
+#define SOLARIS_munmap 117
+#define SOLARIS_fpathconf 118
+#define SOLARIS_vfork 119
+#define SOLARIS_fchdir 120
+#define SOLARIS_readv 121
+#define SOLARIS_writev 122
+#define SOLARIS_xstat 123
+#define SOLARIS_lxstat 124
+#define SOLARIS_fxstat 125
+#define SOLARIS_xmknod 126
+#define SOLARIS_clocal 127
+#define SOLARIS_setrlimit 128
+#define SOLARIS_getrlimit 129
+#define SOLARIS_lchown 130
+#define SOLARIS_memcntl 131
+#define SOLARIS_getpmsg 132
+#define SOLARIS_putpmsg 133
+#define SOLARIS_rename 134
+#define SOLARIS_uname 135
+#define SOLARIS_setegid 136
+#define SOLARIS_sysconfig 137
+#define SOLARIS_adjtime 138
+#define SOLARIS_systeminfo 139
+#define SOLARIS_seteuid 141
+#define SOLARIS_vtrace 142
+#define SOLARIS_fork1 143
+#define SOLARIS_sigtimedwait 144
+#define SOLARIS_lwp_info 145
+#define SOLARIS_yield 146
+#define SOLARIS_lwp_sema_wait 147
+#define SOLARIS_lwp_sema_post 148
+#define SOLARIS_modctl 152
+#define SOLARIS_fchroot 153
+#define SOLARIS_utimes 154
+#define SOLARIS_vhangup 155
+#define SOLARIS_gettimeofday 156
+#define SOLARIS_getitimer 157
+#define SOLARIS_setitimer 158
+#define SOLARIS_lwp_create 159
+#define SOLARIS_lwp_exit 160
+#define SOLARIS_lwp_suspend 161
+#define SOLARIS_lwp_continue 162
+#define SOLARIS_lwp_kill 163
+#define SOLARIS_lwp_self 164
+#define SOLARIS_lwp_setprivate 165
+#define SOLARIS_lwp_getprivate 166
+#define SOLARIS_lwp_wait 167
+#define SOLARIS_lwp_mutex_unlock 168
+#define SOLARIS_lwp_mutex_lock 169
+#define SOLARIS_lwp_cond_wait 170
+#define SOLARIS_lwp_cond_signal 171
+#define SOLARIS_lwp_cond_broadcast 172
+#define SOLARIS_pread 173
+#define SOLARIS_pwrite 174
+#define SOLARIS_llseek 175
+#define SOLARIS_inst_sync 176
+#define SOLARIS_kaio 178
+#define SOLARIS_tsolsys 184
+#define SOLARIS_acl 185
+#define SOLARIS_auditsys 186
+#define SOLARIS_processor_bind 187
+#define SOLARIS_processor_info 188
+#define SOLARIS_p_online 189
+#define SOLARIS_sigqueue 190
+#define SOLARIS_clock_gettime 191
+#define SOLARIS_clock_settime 192
+#define SOLARIS_clock_getres 193
+#define SOLARIS_timer_create 194
+#define SOLARIS_timer_delete 195
+#define SOLARIS_timer_settime 196
+#define SOLARIS_timer_gettime 197
+#define SOLARIS_timer_getoverrun 198
+#define SOLARIS_nanosleep 199
+#define SOLARIS_facl 200
+#define SOLARIS_door 201
+#define SOLARIS_setreuid 202
+#define SOLARIS_setregid 203
+#define SOLARIS_signotifywait 210
+#define SOLARIS_lwp_sigredirect 211
+#define SOLARIS_lwp_alarm 212
+
+#include "dummy2.h"
+
+extern int solaris_syscall();
+extern int solaris_exit();
+extern int solaris_fork();
+extern int solaris_read();
+extern int solaris_write();
+extern int solaris_open();
+extern int solaris_close();
+extern int solaris_wait();
+extern int solaris_creat();
+extern int solaris_link();
+extern int solaris_unlink();
+extern int solaris_exec();
+extern int solaris_chdir();
+extern int solaris_time();
+extern int solaris_mknod();
+extern int solaris_chmod();
+extern int solaris_chown();
+extern int solaris_brk();
+extern int solaris_stat();
+extern int solaris_lseek();
+extern int solaris_getpid();
+extern int solaris_mount();
+extern int solaris_umount();
+extern int solaris_setuid();
+extern int solaris_getuid();
+extern int solaris_stime();
+extern int solaris_ptrace();
+extern int solaris_alarm();
+extern int solaris_fstat();
+extern int solaris_pause();
+extern int solaris_utime();
+extern int solaris_stty();
+extern int solaris_gtty();
+extern int solaris_access();
+extern int solaris_nice();
+extern int solaris_statfs();
+extern int solaris_sync();
+extern int solaris_kill();
+extern int solaris_fstatfs();
+extern int solaris_pgrpsys();
+extern int solaris_setpgrp();
+extern int solaris_xenix();
+extern int solaris_syssgi();
+extern int solaris_dup();
+extern int solaris_pipe();
+extern int solaris_times();
+extern int solaris_profil();
+extern int solaris_plock();
+extern int solaris_setgid();
+extern int solaris_getgid();
+extern int solaris_sigcall();
+extern int solaris_msgsys();
+extern int solaris_syssun();
+extern int solaris_sysi86();
+extern int solaris_sysmips();
+extern int solaris_sysmachine();
+extern int solaris_acct();
+extern int solaris_shmsys();
+extern int solaris_semsys();
+extern int solaris_ioctl();
+extern int solaris_uadmin();
+extern int solaris_utssys();
+extern int solaris_fdsync();
+extern int solaris_execve();
+extern int solaris_umask();
+extern int solaris_chroot();
+extern int solaris_fcntl();
+extern int solaris_ulimit();
+extern int solaris_rmdir();
+extern int solaris_mkdir();
+extern int solaris_getdents();
+extern int solaris_sysfs();
+extern int solaris_getmsg();
+extern int solaris_putmsg();
+extern int solaris_poll();
+extern int solaris_lstat();
+extern int solaris_symlink();
+extern int solaris_readlink();
+extern int solaris_setgroups();
+extern int solaris_getgroups();
+extern int solaris_fchmod();
+extern int solaris_fchown();
+extern int solaris_sigprocmask();
+extern int solaris_sigsuspend();
+extern int solaris_sigaltstack();
+extern int solaris_sigaction();
+extern int solaris_spcall();
+extern int solaris_context();
+extern int solaris_evsys();
+extern int solaris_evtrapret();
+extern int solaris_statvfs();
+extern int solaris_fstatvfs();
+extern int solaris_nfssys();
+extern int solaris_waitid();
+extern int solaris_sigsendsys();
+extern int solaris_hrtsys();
+extern int solaris_acancel();
+extern int solaris_async();
+extern int solaris_priocntlsys();
+extern int solaris_pathconf();
+extern int solaris_mincore();
+extern int solaris_mmap();
+extern int solaris_mprotect();
+extern int solaris_munmap();
+extern int solaris_fpathconf();
+extern int solaris_vfork();
+extern int solaris_fchdir();
+extern int solaris_readv();
+extern int solaris_writev();
+extern int solaris_xstat();
+extern int solaris_lxstat();
+extern int solaris_fxstat();
+extern int solaris_xmknod();
+extern int solaris_clocal();
+extern int solaris_setrlimit();
+extern int solaris_getrlimit();
+extern int solaris_lchown();
+extern int solaris_memcntl();
+extern int solaris_getpmsg();
+extern int solaris_putpmsg();
+extern int solaris_rename();
+extern int solaris_uname();
+extern int solaris_setegid();
+extern int solaris_sysconfig();
+extern int solaris_adjtime();
+extern int solaris_sysinfo();
+extern int solaris_seteuid();
+extern int solaris_vtrace();
+extern int solaris_fork1();
+extern int solaris_sigtimedwait();
+extern int solaris_lwp_info();
+extern int solaris_yield();
+extern int solaris_lwp_sema_wait();
+extern int solaris_lwp_sema_post();
+extern int solaris_modctl();
+extern int solaris_fchroot();
+extern int solaris_utimes();
+extern int solaris_vhangup();
+extern int solaris_gettimeofday();
+extern int solaris_getitimer();
+extern int solaris_setitimer();
+extern int solaris_lwp_create();
+extern int solaris_lwp_exit();
+extern int solaris_lwp_suspend();
+extern int solaris_lwp_continue();
+extern int solaris_lwp_kill();
+extern int solaris_lwp_self();
+extern int solaris_lwp_setprivate();
+extern int solaris_lwp_getprivate();
+extern int solaris_lwp_wait();
+extern int solaris_lwp_mutex_unlock();
+extern int solaris_lwp_mutex_lock();
+extern int solaris_lwp_cond_wait();
+extern int solaris_lwp_cond_signal();
+extern int solaris_lwp_cond_broadcast();
+extern int solaris_pread();
+extern int solaris_pwrite();
+extern int solaris_llseek();
+extern int solaris_inst_sync();
+extern int solaris_auditsys();
+extern int solaris_processor_bind();
+extern int solaris_processor_info();
+extern int solaris_p_online();
+extern int solaris_sigqueue();
+extern int solaris_clock_gettime();
+extern int solaris_clock_settime();
+extern int solaris_clock_getres();
+extern int solaris_timer_create();
+extern int solaris_timer_delete();
+extern int solaris_timer_settime();
+extern int solaris_timer_gettime();
+extern int solaris_timer_getoverrun();
+extern int solaris_nanosleep();
+
+/* solaris_pgrpsys subcalls */
+
+extern int solaris_getpgrp(), solaris_setpgrp(), solaris_getsid();
+extern int solaris_setsid(), solaris_getpgid(), solaris_setpgid();
+
+#define SOLARIS_pgrpsys_subcall 300
+#define SOLARIS_getpgrp (SOLARIS_pgrpsys_subcall + 0)
+#define SOLARIS_setpgrp (SOLARIS_pgrpsys_subcall + 1)
+#define SOLARIS_getsid (SOLARIS_pgrpsys_subcall + 2)
+#define SOLARIS_setsid (SOLARIS_pgrpsys_subcall + 3)
+#define SOLARIS_getpgid (SOLARIS_pgrpsys_subcall + 4)
+#define SOLARIS_setpgid (SOLARIS_pgrpsys_subcall + 5)
+
+#define SOLARIS_pgrpsys_nsubcalls 6
+
+/* solaris_sigcall subcalls */
+
+#undef SOLARIS_signal
+#define SOLARIS_sigcall 48
+
+extern int solaris_signal(), solaris_sigset(), solaris_sighold();
+extern int solaris_sigrelse(), solaris_sigignore(), solaris_sigpause();
+
+#define SOLARIS_sigcall_subcall 310
+#define SOLARIS_signal (SOLARIS_sigcall_subcall + 0)
+#define SOLARIS_sigset (SOLARIS_sigcall_subcall + 1)
+#define SOLARIS_sighold (SOLARIS_sigcall_subcall + 2)
+#define SOLARIS_sigrelse (SOLARIS_sigcall_subcall + 3)
+#define SOLARIS_sigignore (SOLARIS_sigcall_subcall + 4)
+#define SOLARIS_sigpause (SOLARIS_sigcall_subcall + 5)
+
+#define SOLARIS_sigcall_nsubcalls 6
+
+/* msgsys subcalls */
+
+extern int solaris_msgget(), solaris_msgctl(), solaris_msgrcv(), solaris_msgsnd();
+
+#define SOLARIS_msgsys_subcall 320
+#define SOLARIS_msgget (SOLARIS_msgsys_subcall + 0)
+#define SOLARIS_msgctl (SOLARIS_msgsys_subcall + 1)
+#define SOLARIS_msgrcv (SOLARIS_msgsys_subcall + 2)
+#define SOLARIS_msgsnd (SOLARIS_msgsys_subcall + 3)
+
+#define SOLARIS_msgsys_nsubcalls 4
+
+/* shmsys subcalls */
+
+extern int solaris_shmat(), solaris_shmctl(), solaris_shmdt(), solaris_shmget();
+
+#define SOLARIS_shmsys_subcall 330
+#define SOLARIS_shmat (SOLARIS_shmsys_subcall + 0)
+#define SOLARIS_shmctl (SOLARIS_shmsys_subcall + 1)
+#define SOLARIS_shmdt (SOLARIS_shmsys_subcall + 2)
+#define SOLARIS_shmget (SOLARIS_shmsys_subcall + 3)
+
+#define SOLARIS_shmsys_nsubcalls 4
+
+/* semsys subcalls */
+
+extern int solaris_semctl(), solaris_semget(), solaris_semop();
+
+#define SOLARIS_semsys_subcall 340
+#define SOLARIS_semctl (SOLARIS_semsys_subcall + 0)
+#define SOLARIS_semget (SOLARIS_semsys_subcall + 1)
+#define SOLARIS_semop (SOLARIS_semsys_subcall + 2)
+
+#define SOLARIS_semsys_nsubcalls 3
+
+/* utssys subcalls */
+
+extern int solaris_olduname(), solaris_ustat(), solaris_fusers();
+
+#define SOLARIS_utssys_subcall 350
+
+#define SOLARIS_olduname (SOLARIS_utssys_subcall + 0)
+ /* 1 is unused */
+#define SOLARIS_ustat (SOLARIS_utssys_subcall + 2)
+#define SOLARIS_fusers (SOLARIS_utssys_subcall + 3)
+
+#define SOLARIS_utssys_nsubcalls 4
+
+/* sysfs subcalls */
+
+extern int solaris_sysfs1(), solaris_sysfs2(), solaris_sysfs3();
+
+#define SOLARIS_sysfs_subcall 360
+ /* 0 is unused */
+#define SOLARIS_sysfs1 (SOLARIS_sysfs_subcall + 1)
+#define SOLARIS_sysfs2 (SOLARIS_sysfs_subcall + 2)
+#define SOLARIS_sysfs3 (SOLARIS_sysfs_subcall + 3)
+
+#define SOLARIS_sysfs_nsubcalls 4
+
+/* solaris_spcall subcalls */
+
+#undef SOLARIS_sigpending
+#define SOLARIS_spcall 99
+
+extern int solaris_sigpending(), solaris_sigfillset();
+
+#define SOLARIS_spcall_subcall 370
+ /* 0 is unused */
+#define SOLARIS_sigpending (SOLARIS_spcall_subcall + 1)
+#define SOLARIS_sigfillset (SOLARIS_spcall_subcall + 2)
+
+#define SOLARIS_spcall_nsubcalls 3
+
+/* solaris_context subcalls */
+
+extern int solaris_getcontext(), solaris_setcontext();
+
+#define SOLARIS_context_subcall 380
+#define SOLARIS_getcontext (SOLARIS_context_subcall + 0)
+#define SOLARIS_setcontext (SOLARIS_context_subcall + 1)
+
+#define SOLARIS_context_nsubcalls 2
diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h
new file mode 100644
index 0000000..d5df8e1
--- /dev/null
+++ b/linux/sparc/syscallent.h
@@ -0,0 +1,407 @@
+ { 0, 0, sys_restart_syscall, "restart_syscall" },/* 0 */
+ { 1, TP, sys_exit, "exit" }, /* 1 */
+ { 0, TP, sys_fork, "fork" }, /* 2 */
+ { 3, TD, sys_read, "read" }, /* 3 */
+ { 3, TD, sys_write, "write" }, /* 4 */
+ { 3, TD|TF, sys_open, "open" }, /* 5 */
+ { 1, TD, sys_close, "close" }, /* 6 */
+ { 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 */
+ { 2, TF|TP, sys_execv, "execv" }, /* 11 */
+ { 1, TF, sys_chdir, "chdir" }, /* 12 */
+ { 3, TF, sys_chown, "chown"}, /* 13 */
+ { 3, TF, sys_mknod, "mknod" }, /* 14 */
+ { 2, TF, sys_chmod, "chmod" }, /* 15 */
+ { 3, TF, sys_chown, "lchown" }, /* 16 */
+ { 1, TM, sys_brk, "brk" }, /* 17 */
+ { 4, 0, printargs, "perfctr" }, /* 18 */
+ { 3, TD, sys_lseek, "lseek" }, /* 19 */
+ { 0, 0, sys_getpid, "getpid" }, /* 20 */
+ { 2, 0, sys_capget, "capget" }, /* 21 */
+ { 2, 0, sys_capset, "capset" }, /* 22 */
+ { 1, 0, sys_setuid, "setuid" }, /* 23 */
+ { 0, NF, sys_getuid, "getuid" }, /* 24 */
+ { 1, 0, sys_time, "time" }, /* 25 */
+ { 5, 0, sys_ptrace, "ptrace" }, /* 26 */
+ { 1, 0, sys_alarm, "alarm" }, /* 27 */
+ { 2, TS, sys_sigaltstack,"sigaltstack" }, /* 28 */
+ { 0, TS, sys_pause, "pause" }, /* 29 */
+ { 2, TF, sys_utime, "utime" }, /* 30 */
+ { 3, TF, sys_chown, "lchown32" }, /* 31 */
+ { 3, TD, sys_fchown, "fchown32" }, /* 32 */
+ { 2, TF, sys_access, "access" }, /* 33 */
+ { 1, 0, sys_nice, "nice" }, /* 34 */
+ { 3, TF, sys_chown, "chown32" }, /* 35 */
+ { 0, 0, sys_sync, "sync" }, /* 36 */
+ { 2, TS, sys_kill, "kill" }, /* 37 */
+ { 2, TF, sys_stat, "stat" }, /* 38 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 39 */
+ { 2, TF, sys_lstat, "lstat" }, /* 40 */
+ { 2, TD, sys_dup, "dup" }, /* 41 */
+ { 0, TD, sys_pipe, "pipe" }, /* 42 */
+ { 1, 0, sys_times, "times" }, /* 43 */
+ { 0, NF, sys_getuid, "getuid32" }, /* 44 */
+ { 2, TF, sys_umount2, "umount" }, /* 45 */
+ { 1, 0, sys_setgid, "setgid" }, /* 46 */
+ { 0, NF, sys_getgid, "getgid" }, /* 47 */
+ { 3, 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, printargs, "memory_ordering" }, /* 52 */
+ { 0, NF, sys_getgid, "getgid32" }, /* 53 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 54 */
+ { 4, 0, sys_reboot, "reboot" }, /* 55 */
+ { 6, TD|TM, sys_mmap, "mmap2" }, /* 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 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 63 */
+ { 0, 0, sys_getpagesize,"getpagesize" }, /* 64 */
+ { 3, TM, sys_msync, "msync" }, /* 65 */
+ { 0, TP, sys_vfork, "vfork" }, /* 66 */
+ { 5, TD, sys_pread, "pread" }, /* 67 */
+ { 5, TD, sys_pwrite, "pwrite" }, /* 68 */
+ { 0, NF, sys_geteuid, "geteuid32" }, /* 69 */
+ { 0, NF, sys_getegid, "getegid32" }, /* 70 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 71 */
+ { 2, 0, sys_setreuid, "setreuid32" }, /* 72 */
+ { 2, TM, sys_munmap, "munmap" }, /* 73 */
+ { 3, TM, sys_mprotect, "mprotect" }, /* 74 */
+ { 3, TM, sys_madvise, "madvise" }, /* 75 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 76 */
+ { 3, TF, sys_truncate64, "truncate64" }, /* 77 */
+ { 3, TM, sys_mincore, "mincore" }, /* 78 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 79 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 80 */
+ { 0, 0, sys_getpgrp, "getpgrp" }, /* 81 */
+ { 2, 0, sys_setgroups32,"setgroups32" }, /* 82 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 83 */
+ { 3, TD, sys_ftruncate64,"ftruncate64" }, /* 84 */
+ { 2, TF, sys_swapon, "swapon" }, /* 85 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 86 */
+ { 1, 0, sys_setuid, "setuid32" }, /* 87 */
+ { 2, 0, sys_sethostname,"sethostname" }, /* 88 */
+ { 1, 0, sys_setgid, "setgid32" }, /* 89 */
+ { 2, TD, sys_dup2, "dup2" }, /* 90 */
+ { 1, NF, sys_setfsuid, "setfsuid32" }, /* 91 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 92 */
+ { 5, TD, sys_select, "select" }, /* 93 */
+ { 1, NF, sys_setfsgid, "setfsgid32" }, /* 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 */
+ { 0, TS, sys_rt_sigreturn,"rt_sigreturn" }, /* 101 */
+ { 4, TS, sys_rt_sigaction,"rt_sigaction" }, /* 102 */
+ { 4, TS, sys_rt_sigprocmask,"rt_sigprocmask" }, /* 103 */
+ { 2, TS, sys_rt_sigpending,"rt_sigpending" }, /* 104 */
+ { 4, TS, sys_rt_sigtimedwait,"rt_sigtimedwait" },/* 105 */
+ { 3, TS, sys_rt_sigqueueinfo,"rt_sigqueueinfo" },/* 106 */
+ { 2, TS, sys_rt_sigsuspend,"rt_sigsuspend" }, /* 107 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 108 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 109 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 110 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 111 */
+ { 2, 0, sys_setresgid, "setresgid32" }, /* 112 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 113 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 114 */
+ { 2, 0, sys_getgroups32,"getgroups32" }, /* 115 */
+ { 2, 0, sys_gettimeofday,"gettimeofday" }, /* 116 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 117 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 118 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 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, TF, sys_lstat64, "lstat64" }, /* 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 */
+ { 2, TF, sys_stat64, "stat64" }, /* 139 */
+ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 140 */
+ { 3, TN, sys_getpeername,"getpeername" }, /* 141 */
+ { 6, 0, sys_futex, "futex" }, /* 142 */
+ { 0, 0, sys_gettid, "gettid" }, /* 143 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 144 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 145 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 146 */
+ { 5, 0, sys_prctl, "prctl" }, /* 147 */
+ { 5, 0, printargs, "pciconfig_read" }, /* 148 */
+ { 5, 0, printargs, "pciconfig_write" }, /* 149 */
+ { 3, TN, sys_getsockname,"getsockname" }, /* 150 */
+ { 4, TN, sys_getmsg, "getmsg" }, /* 151 */
+ { 4, TN, sys_putmsg, "putmsg" }, /* 152 */
+ { 3, TD, sys_poll, "poll" }, /* 153 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 154 */
+ { 3, TD, sys_fcntl, "fcntl64" }, /* 155 */
+ { 4, 0, printargs, "getdirentries" }, /* 156 */
+ { 2, TF, sys_statfs, "statfs" }, /* 157 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 158 */
+ { 1, TF, sys_umount, "oldumount" }, /* 159 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 160 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 161 */
+ { 2, 0, printargs, "getdomainname" }, /* 162 */
+ { 2, 0, sys_setdomainname,"setdomainname" }, /* 163 */
+ { 5, 0, printargs, "utrap_install" }, /* 164 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 165 */
+ { 1, 0, sys_set_tid_address,"set_tid_address" }, /* 166 */
+ { 5, TF, sys_mount, "mount" }, /* 167 */
+ { 2, 0, sys_ustat, "ustat" }, /* 168 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 169 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 170 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 171 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 172 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 173 */
+ { 3, TD, sys_getdents, "getdents" }, /* 174 */
+ { 0, 0, sys_setsid, "setsid" }, /* 175 */
+ { 1, TD, sys_fchdir, "fchdir" }, /* 176 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 177 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 178 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 179 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 180 */
+ { 2, TF, sys_removexattr,"removexattr" }, /* 181 */
+ { 2, TF, sys_removexattr,"lremovexattr" }, /* 182 */
+ { 1, TS, sys_sigpending, "sigpending" }, /* 183 */
+ { 5, 0, sys_query_module,"query_module" }, /* 184 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 185 */
+ { 2, TD, sys_fremovexattr,"fremovexattr" }, /* 186 */
+ { 2, TS, sys_kill, "tkill" }, /* 187 */
+ { 1, TP, sys_exit, "exit_group" }, /* 188 */
+ { 1, 0, sys_uname, "uname" }, /* 189 */
+ { 3, 0, sys_init_module,"init_module" }, /* 190 */
+ { 1, 0, sys_personality,"personality" }, /* 191 */
+ { 5, TM, sys_remap_file_pages,"remap_file_pages" },/* 192 */
+ { 1, TD, sys_epoll_create,"epoll_create" }, /* 193 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 194 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 195 */
+ { 2, 0, sys_ulimit, "ulimit" }, /* 196 */
+ { 0, 0, sys_getppid, "getppid" }, /* 197 */
+ { 3, TS, sys_sigaction, "sigaction" }, /* 198 */
+ { 0, TS, sys_siggetmask, "sgetmask" }, /* 199 */
+ { 1, TS, sys_sigsetmask, "ssetmask" }, /* 200 */
+ { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 201 */
+ { 2, TF, sys_lstat, "lstat" }, /* 202 */
+ { 1, TF, sys_uselib, "uselib" }, /* 203 */
+ { 3, TD, sys_readdir, "readdir" }, /* 204 */
+ { 4, TD, sys_readahead, "readahead" }, /* 205 */
+ { 2, TD, sys_socketcall, "socketcall" }, /* 206 */
+ { 3, 0, sys_syslog, "syslog" }, /* 207 */
+ { 4, 0, sys_lookup_dcookie,"lookup_dcookie" }, /* 208 */
+ { 5, TD, sys_fadvise64, "fadvise64" }, /* 209 */
+ { 6, TD, sys_fadvise64_64,"fadvise64_64" }, /* 210 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 211 */
+ { 3, TP, sys_waitpid, "waitpid" }, /* 212 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 213 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 214 */
+ { 5, TI, sys_ipc, "ipc" }, /* 215 */
+ { 0, TS, sys_sigreturn, "sigreturn" }, /* 216 */
+ { 5, TP, sys_clone, "clone" }, /* 217 */
+ { 3, 0, sys_modify_ldt, "modify_ldt" }, /* 218 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 219 */
+ { 3, TS, sys_sigprocmask,"sigprocmask" }, /* 220 */
+ { 2, 0, sys_create_module,"create_module" }, /* 221 */
+ { 2, 0, sys_delete_module,"delete_module" },
+ { 1, 0, sys_get_kernel_syms,"get_kernel_syms"}, /* 223 */
+ { 1, 0, sys_getpgid, "getpgid" }, /* 224 */
+ { 0, 0, sys_bdflush, "bdflush" }, /* 225 */
+ { 3, 0, sys_sysfs, "sysfs" }, /* 226 */
+ { 5, 0, sys_afs_syscall,"afs_syscall" }, /* 227 */
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 228 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 229 */
+ { 5, TD, sys_select, "select" }, /* 230 */
+ { 1, 0, sys_time, "time" }, /* 231 */
+ { 2, TF, sys_stat, "stat" }, /* 232 */
+ { 1, 0, sys_stime, "stime" }, /* 233 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 234 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 235 */
+ { 5, TD, sys_llseek, "_llseek" }, /* 236 */
+ { 2, TM, sys_mlock, "mlock" }, /* 237 */
+ { 2, TM, sys_munlock, "munlock" }, /* 238 */
+ { 1, TM, sys_mlockall, "mlockall" }, /* 239 */
+ { 0, TM, sys_munlockall, "munlockall" }, /* 240 */
+ { 2, 0, sys_sched_setparam,"sched_setparam"}, /* 241 */
+ { 2, 0, sys_sched_getparam,"sched_getparam"}, /* 242 */
+ { 3, 0, sys_sched_setscheduler,"sched_setscheduler"},/* 243 */
+ { 1, 0, sys_sched_getscheduler,"sched_getscheduler"},/* 244 */
+ { 0, 0, sys_sched_yield,"sched_yield" }, /* 245 */
+ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"},/* 246 */
+ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"},/* 247 */
+ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"},/* 248 */
+ { 2, 0, sys_nanosleep, "nanosleep" }, /* 249 */
+ { 5, TM, sys_mremap, "mremap" }, /* 250 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 251 */
+ { 1, 0, sys_getsid, "getsid" }, /* 252 */
+ { 1, TD, sys_fdatasync, "fdatasync" }, /* 253 */
+ { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 254 */
+ { 5, 0, printargs, "aplib" }, /* 255 */
+ { 2, 0, sys_clock_settime,"clock_settime" }, /* 256 */
+ { 2, 0, sys_clock_gettime,"clock_gettime" }, /* 257 */
+ { 2, 0, sys_clock_getres,"clock_getres" }, /* 258 */
+ { 4, 0, sys_clock_nanosleep,"clock_nanosleep" },/* 259 */
+ { 3, 0, sys_sched_setaffinity,"sched_setaffinity" },/* 260 */
+ { 3, 0, sys_sched_getaffinity,"sched_getaffinity" },/* 261 */
+ { 4, 0, sys_timer_settime,"timer_settime" }, /* 262 */
+ { 2, 0, sys_timer_gettime,"timer_gettime" }, /* 263 */
+ { 1, 0, sys_timer_getoverrun,"timer_getoverrun" },/* 264 */
+ { 1, 0, sys_timer_delete,"timer_delete" }, /* 265 */
+ { 3, 0, sys_timer_create,"timer_create" }, /* 266 */
+ { 5, 0, NULL, NULL }, /* 267 */
+ { 2, 0, sys_io_setup, "io_setup" }, /* 268 */
+ { 1, 0, sys_io_destroy, "io_destroy" }, /* 269 */
+ { 3, 0, sys_io_submit, "io_submit" }, /* 270 */
+ { 3, 0, sys_io_cancel, "io_cancel" }, /* 271 */
+ { 5, 0, sys_io_getevents, "io_getevents" }, /* 272 */
+ { 4, 0, sys_mq_open, "mq_open" }, /* 273 */
+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 274 */
+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 275 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 276 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 277 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 278 */
+ { 5, TP, sys_waitid, "waitid" }, /* 279 */
+ { 4, TD, sys_tee, "tee" }, /* 280 */
+ { 5, 0, sys_add_key, "add_key" }, /* 281 */
+ { 4, 0, sys_request_key, "request_key" }, /* 282 */
+ { 5, 0, sys_keyctl, "keyctl" }, /* 283 */
+ { 4, TD|TF, sys_openat, "openat" }, /* 284 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 285 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 286 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 287 */
+ { 3, TD|TF, sys_futimesat, "futimesat" }, /* 288 */
+ { 4, TD|TF, sys_newfstatat, "fstatat64" }, /* 289 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 290 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 291 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 292 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 293 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 294 */
+ { 3, TD|TF, sys_fchmodat, "fchmodat" }, /* 295 */
+ { 3, TD|TF, sys_faccessat, "faccessat" }, /* 296 */
+ { 6, TD, sys_pselect6, "pselect6" }, /* 297 */
+ { 5, TD, sys_ppoll, "ppoll" }, /* 298 */
+ { 1, TP, sys_unshare, "unshare" }, /* 299 */
+ { 2, 0, sys_set_robust_list, "set_robust_list" }, /* 300 */
+ { 3, 0, sys_get_robust_list, "get_robust_list" }, /* 301 */
+ { 4, TM, sys_migrate_pages, "migrate_pages" }, /* 302 */
+ { 6, TM, sys_mbind, "mbind" }, /* 303 */
+ { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 304 */
+ { 3, TM, sys_set_mempolicy, "set_mempolicy" }, /* 305 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 306 */
+ { 6, TM, sys_move_pages, "move_pages" }, /* 307 */
+ { 3, 0, sys_getcpu, "getcpu" }, /* 308 */
+ { 6, TD, sys_epoll_pwait, "epoll_pwait" }, /* 309 */
+ { 4, TD|TF, sys_utimensat, "utimensat" }, /* 310 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 311 */
+ { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 312 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 313 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 314 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 315 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 316 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 317 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 318 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 319 */
+ { 3, TD, sys_dup3, "dup3" }, /* 320 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 321 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 322 */
+ { 4, TN, sys_accept4, "accept4" }, /* 323 */
+ { 5, TD, sys_preadv, "preadv" }, /* 324 */
+ { 5, TD, sys_pwritev, "pwritev" }, /* 325 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 326 */
+ { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 327 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 328 */
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 329 */
+ { 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 330 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 331 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 332 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 333 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 334 */
+ { 1, TD, sys_syncfs, "syncfs" }, /* 335 */
+ { 4, TN, sys_sendmmsg, "sendmmsg" }, /* 336 */
+ { 2, TD, sys_setns, "setns" }, /* 337 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv" }, /* 338 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev" }, /* 339 */
+ { 0, NF, printargs, "kern_features" }, /* 340 */
+ { 5, 0, sys_kcmp, "kcmp" }, /* 341 */
+ { 3, TD, sys_finit_module, "finit_module" }, /* 342 */
+ { 5, 0, NULL, NULL }, /* 343 */
+ { 5, 0, NULL, NULL }, /* 344 */
+ { 5, 0, NULL, NULL }, /* 345 */
+ { 5, 0, NULL, NULL }, /* 346 */
+ { 5, 0, NULL, NULL }, /* 347 */
+ { 5, 0, NULL, NULL }, /* 348 */
+ { 5, 0, NULL, NULL }, /* 349 */
+ { 5, 0, NULL, NULL }, /* 350 */
+ { 5, 0, NULL, NULL }, /* 351 */
+ { 5, 0, NULL, NULL }, /* 352 */
+#define SYS_socket_subcall 353
+#include "subcall.h"
+ { 6, 0, printargs, "socket_subcall"}, /* 353 */
+ { 3, TN, sys_socket, "socket" }, /* 354 */
+ { 3, TN, sys_bind, "bind" }, /* 355 */
+ { 3, TN, sys_connect, "connect" }, /* 356 */
+ { 2, TN, sys_listen, "listen" }, /* 357 */
+ { 3, TN, sys_accept, "accept" }, /* 358 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 359 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 360 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 361 */
+ { 4, TN, sys_send, "send" }, /* 362 */
+ { 4, TN, sys_recv, "recv" }, /* 363 */
+ { 6, TN, sys_sendto, "sendto" }, /* 364 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 365 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 366 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 367 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 368 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 369 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 370 */
+ { 4, TN, sys_accept4, "accept4" }, /* 371 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 372 */
+#if SYS_ipc_subcall != 373
+ #error fix me
+#endif
+ { 4, 0, printargs, "ipc_subcall" }, /* 373 */
+ { 4, TI, printargs, "semop" }, /* 374 */
+ { 4, TI, sys_semget, "semget" }, /* 375 */
+ { 4, TI, sys_semctl, "semctl" }, /* 376 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 377 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 378 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 379 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 380 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 381 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 382 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 383 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 384 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 385 */
+ { 4, TI, sys_msgget, "msgget" }, /* 386 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 387 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 388 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 389 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 390 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 391 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 392 */
+ { 4, 0, printargs, "ipc_subcall" }, /* 393 */
+ { 4, TI, sys_shmat, "shmat" }, /* 394 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 395 */
+ { 4, TI, sys_shmget, "shmget" }, /* 396 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 397 */
+ { 5, 0, NULL, NULL }, /* 398 */
+ { 5, 0, NULL, NULL }, /* 399 */
+ { 5, 0, NULL, NULL }, /* 400 */
+ { 5, 0, NULL, NULL }, /* 401 */
diff --git a/linux/sparc/syscallent1.h b/linux/sparc/syscallent1.h
new file mode 100644
index 0000000..9519e08
--- /dev/null
+++ b/linux/sparc/syscallent1.h
@@ -0,0 +1,437 @@
+/*
+ * Copyright (c) 1993, 1994, 1995, 1996 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.
+ */
+
+ { 6, 0, solaris_syscall, "syscall" }, /* 0 */
+ { 6, TP, solaris_exit, "_exit" }, /* 1 */
+ { 6, TP, solaris_fork, "fork" }, /* 2 */
+ { 6, 0, solaris_read, "read" }, /* 3 */
+ { 6, 0, solaris_write, "write" }, /* 4 */
+ { 6, TF, solaris_open, "open" }, /* 5 */
+ { 6, 0, solaris_close, "close" }, /* 6 */
+ { 6, TP, solaris_wait, "wait" }, /* 7 */
+ { 6, TF, solaris_creat, "creat" }, /* 8 */
+ { 6, TF, solaris_link, "link" }, /* 9 */
+ { 6, TF, solaris_unlink, "unlink" }, /* 10 */
+ { 6, TF|TP, solaris_exec, "exec" }, /* 11 */
+ { 6, TF, solaris_chdir, "chdir" }, /* 12 */
+ { 6, 0, solaris_time, "time" }, /* 13 */
+ { 6, TF, solaris_mknod, "mknod" }, /* 14 */
+ { 6, TF, solaris_chmod, "chmod" }, /* 15 */
+ { 6, TF, solaris_chown, "chown" }, /* 16 */
+ { 6, 0, solaris_brk, "brk" }, /* 17 */
+ { 6, TF, solaris_stat, "stat" }, /* 18 */
+ { 6, 0, solaris_lseek, "lseek" }, /* 19 */
+ { 6, 0, solaris_getpid, "getpid" }, /* 20 */
+ { 6, TF, solaris_mount, "mount" }, /* 21 */
+ { 6, TF, solaris_umount, "umount" }, /* 22 */
+ { 6, 0, solaris_setuid, "setuid" }, /* 23 */
+ { 6, 0, solaris_getuid, "getuid" }, /* 24 */
+ { 6, 0, solaris_stime, "stime" }, /* 25 */
+ { 6, 0, solaris_ptrace, "ptrace" }, /* 26 */
+ { 6, 0, solaris_alarm, "alarm" }, /* 27 */
+ { 6, 0, solaris_fstat, "fstat" }, /* 28 */
+ { 6, TS, solaris_pause, "pause" }, /* 29 */
+ { 6, TF, solaris_utime, "utime" }, /* 30 */
+ { 6, 0, solaris_stty, "stty" }, /* 31 */
+ { 6, 0, solaris_gtty, "gtty" }, /* 32 */
+ { 6, TF, solaris_access, "access" }, /* 33 */
+ { 6, 0, solaris_nice, "nice" }, /* 34 */
+ { 6, TF, solaris_statfs, "statfs" }, /* 35 */
+ { 6, 0, solaris_sync, "sync" }, /* 36 */
+ { 6, TS, solaris_kill, "kill" }, /* 37 */
+ { 6, 0, solaris_fstatfs, "fstatfs" }, /* 38 */
+ { 6, 0, solaris_pgrpsys, "pgrpsys" }, /* 39 */
+ { 6, 0, solaris_xenix, "xenix" }, /* 40 */
+ { 6, 0, solaris_dup, "dup" }, /* 41 */
+ { 6, 0, solaris_pipe, "pipe" }, /* 42 */
+ { 6, 0, solaris_times, "times" }, /* 43 */
+ { 6, 0, solaris_profil, "profil" }, /* 44 */
+ { 6, 0, solaris_plock, "plock" }, /* 45 */
+ { 6, 0, solaris_setgid, "setgid" }, /* 46 */
+ { 6, 0, solaris_getgid, "getgid" }, /* 47 */
+ { 6, 0, solaris_sigcall, "sigcall" }, /* 48 */
+ { 6, TI, solaris_msgsys, "msgsys" }, /* 49 */
+ { 6, 0, solaris_syssun, "syssun" }, /* 50 */
+ { 6, TF, solaris_acct, "acct" }, /* 51 */
+ { 6, TI, solaris_shmsys, "shmsys" }, /* 52 */
+ { 6, TI, solaris_semsys, "semsys" }, /* 53 */
+ { 6, 0, solaris_ioctl, "ioctl" }, /* 54 */
+ { 6, 0, solaris_uadmin, "uadmin" }, /* 55 */
+ { 6, 0, solaris_sysmp, "sysmp" }, /* 56 */
+ { 6, 0, solaris_utssys, "utssys" }, /* 57 */
+ { 6, 0, solaris_fdsync, "fdsync" }, /* 58 */
+ { 6, TF|TP, solaris_execve, "execve" }, /* 59 */
+ { 6, 0, solaris_umask, "umask" }, /* 60 */
+ { 6, TF, solaris_chroot, "chroot" }, /* 61 */
+ { 6, 0, solaris_fcntl, "fcntl" }, /* 62 */
+ { 6, 0, solaris_ulimit, "ulimit" }, /* 63 */
+ { 6, 0, NULL, NULL }, /* 64 */
+ { 6, 0, NULL, NULL }, /* 65 */
+ { 6, 0, NULL, NULL }, /* 66 */
+ { 6, 0, NULL, NULL }, /* 67 */
+ { 6, 0, NULL, NULL }, /* 68 */
+ { 6, 0, NULL, NULL }, /* 69 */
+ { 6, 0, NULL, NULL }, /* 70 */
+ { 6, 0, NULL, NULL }, /* 71 */
+ { 6, 0, NULL, NULL }, /* 72 */
+ { 6, 0, NULL, NULL }, /* 73 */
+ { 6, 0, NULL, NULL }, /* 74 */
+ { 6, 0, NULL, NULL }, /* 75 */
+ { 6, 0, NULL, NULL }, /* 76 */
+ { 6, 0, NULL, NULL }, /* 77 */
+ { 6, 0, NULL, NULL }, /* 78 */
+ { 6, TF, solaris_rmdir, "rmdir" }, /* 79 */
+ { 6, TF, solaris_mkdir, "mkdir" }, /* 80 */
+ { 6, 0, solaris_getdents, "getdents" }, /* 81 */
+ { 6, 0, solaris_sginap, "sginap" }, /* 82 */
+ { 6, 0, solaris_sgikopt, "sgikopt" }, /* 83 */
+ { 6, 0, solaris_sysfs, "sysfs" }, /* 84 */
+ { 6, TN, sys_getmsg, "getmsg" }, /* 85 */
+ { 6, TN, sys_putmsg, "putmsg" }, /* 86 */
+ { 6, TN, solaris_poll, "poll" }, /* 87 */
+ { 6, TF, solaris_lstat, "lstat" }, /* 88 */
+ { 6, TF, solaris_symlink, "symlink" }, /* 89 */
+ { 6, TF, solaris_readlink, "readlink" }, /* 90 */
+ { 6, 0, solaris_setgroups, "setgroups" }, /* 91 */
+ { 6, 0, solaris_getgroups, "getgroups" }, /* 92 */
+ { 6, 0, solaris_fchmod, "fchmod" }, /* 93 */
+ { 6, 0, solaris_fchown, "fchown" }, /* 94 */
+ { 6, TS, solaris_sigprocmask, "sigprocmask" }, /* 95 */
+ { 6, TS, solaris_sigsuspend, "sigsuspend" }, /* 96 */
+ { 6, TS, solaris_sigaltstack, "sigaltstack" }, /* 97 */
+ { 6, TS, solaris_sigaction, "sigaction" }, /* 98 */
+ { 6, 0, solaris_spcall, "spcall" }, /* 99 */
+ { 6, 0, solaris_context, "context" }, /* 100 */
+ { 6, 0, solaris_evsys, "evsys" }, /* 101 */
+ { 6, 0, solaris_evtrapret, "evtrapret" }, /* 102 */
+ { 6, TF, solaris_statvfs, "statvfs" }, /* 103 */
+ { 6, 0, solaris_fstatvfs, "fstatvfs" }, /* 104 */
+ { 6, 0, NULL, NULL }, /* 105 */
+ { 6, 0, solaris_nfssys, "nfssys" }, /* 106 */
+ { 6, TP, solaris_waitid, "waitid" }, /* 107 */
+ { 6, 0, solaris_sigsendsys, "sigsendsys" }, /* 108 */
+ { 6, 0, solaris_hrtsys, "hrtsys" }, /* 109 */
+ { 6, 0, solaris_acancel, "acancel" }, /* 110 */
+ { 6, 0, solaris_async, "async" }, /* 111 */
+ { 6, 0, solaris_priocntlsys, "priocntlsys" }, /* 112 */
+ { 6, TF, solaris_pathconf, "pathconf" }, /* 113 */
+ { 6, 0, solaris_mincore, "mincore" }, /* 114 */
+ { 6, TD|TM, solaris_mmap, "mmap" }, /* 115 */
+ { 6, 0, solaris_mprotect, "mprotect" }, /* 116 */
+ { 6, 0, solaris_munmap, "munmap" }, /* 117 */
+ { 6, 0, solaris_fpathconf, "fpathconf" }, /* 118 */
+ { 6, TP, solaris_vfork, "vfork" }, /* 119 */
+ { 6, 0, solaris_fchdir, "fchdir" }, /* 120 */
+ { 6, 0, solaris_readv, "readv" }, /* 121 */
+ { 6, 0, solaris_writev, "writev" }, /* 122 */
+ { 6, TF, solaris_xstat, "xstat" }, /* 123 */
+ { 6, TF, solaris_lxstat, "lxstat" }, /* 124 */
+ { 6, 0, solaris_fxstat, "fxstat" }, /* 125 */
+ { 6, TF, solaris_xmknod, "xmknod" }, /* 126 */
+ { 6, 0, solaris_clocal, "clocal" }, /* 127 */
+ { 6, 0, solaris_setrlimit, "setrlimit" }, /* 128 */
+ { 6, 0, solaris_getrlimit, "getrlimit" }, /* 129 */
+ { 6, TF, solaris_lchown, "lchown" }, /* 130 */
+ { 6, 0, solaris_memcntl, "memcntl" }, /* 131 */
+ { 6, TN, solaris_getpmsg, "getpmsg" }, /* 132 */
+ { 6, TN, solaris_putpmsg, "putpmsg" }, /* 133 */
+ { 6, TF, solaris_rename, "rename" }, /* 134 */
+ { 6, 0, solaris_uname, "uname" }, /* 135 */
+ { 6, 0, solaris_setegid, "setegid" }, /* 136 */
+ { 6, 0, solaris_sysconfig, "sysconfig" }, /* 137 */
+ { 6, 0, solaris_adjtime, "adjtime" }, /* 138 */
+ { 6, 0, solaris_sysinfo, "sysinfo" }, /* 139 */
+ { 6, 0, NULL, NULL }, /* 140 */
+ { 6, 0, solaris_seteuid, "seteuid" }, /* 141 */
+ { 6, 0, solaris_vtrace, "vtrace" }, /* 142 */
+ { 6, TP, solaris_fork1, "fork1" }, /* 143 */
+ { 6, TS, solaris_sigtimedwait, "sigtimedwait" }, /* 144 */
+ { 6, 0, solaris_lwp_info, "lwp_info" }, /* 145 */
+ { 6, 0, solaris_yield, "yield" }, /* 146 */
+ { 6, 0, solaris_lwp_sema_wait, "lwp_sema_wait" }, /* 147 */
+ { 6, 0, solaris_lwp_sema_post, "lwp_sema_post" }, /* 148 */
+ { 6, 0, NULL, NULL }, /* 149 */
+ { 6, 0, NULL, NULL }, /* 150 */
+ { 6, 0, NULL, NULL }, /* 151 */
+ { 6, 0, solaris_modctl, "modctl" }, /* 152 */
+ { 6, 0, solaris_fchroot, "fchroot" }, /* 153 */
+ { 6, TF, solaris_utimes, "utimes" }, /* 154 */
+ { 6, 0, solaris_vhangup, "vhangup" }, /* 155 */
+ { 6, 0, solaris_gettimeofday, "gettimeofday" }, /* 156 */
+ { 6, 0, solaris_getitimer, "getitimer" }, /* 157 */
+ { 6, 0, solaris_setitimer, "setitimer" }, /* 158 */
+ { 6, 0, solaris_lwp_create, "lwp_create" }, /* 159 */
+ { 6, 0, solaris_lwp_exit, "lwp_exit" }, /* 160 */
+ { 6, 0, solaris_lwp_suspend, "lwp_suspend" }, /* 161 */
+ { 6, 0, solaris_lwp_continue, "lwp_continue" }, /* 162 */
+ { 6, 0, solaris_lwp_kill, "lwp_kill" }, /* 163 */
+ { 6, 0, solaris_lwp_self, "lwp_self" }, /* 164 */
+ { 6, 0, solaris_lwp_setprivate, "lwp_setprivate"}, /* 165 */
+ { 6, 0, solaris_lwp_getprivate, "lwp_getprivate"}, /* 166 */
+ { 6, 0, solaris_lwp_wait, "lwp_wait" }, /* 167 */
+ { 6, 0, solaris_lwp_mutex_unlock,"lwp_mutex_unlock"}, /* 168 */
+ { 6, 0, solaris_lwp_mutex_lock, "lwp_mutex_lock"}, /* 169 */
+ { 6, 0, solaris_lwp_cond_wait, "lwp_cond_wait"}, /* 170 */
+ { 6, 0, solaris_lwp_cond_signal,"lwp_cond_signal"}, /* 171 */
+ { 6, 0, solaris_lwp_cond_broadcast,"lwp_cond_broadcast"}, /* 172 */
+ { 6, 0, solaris_pread, "pread" }, /* 173 */
+ { 6, 0, solaris_pwrite, "pwrite" }, /* 174 */
+ { 6, 0, solaris_llseek, "llseek" }, /* 175 */
+ { 6, 0, solaris_inst_sync, "inst_sync" }, /* 176 */
+ { 6, 0, NULL, NULL }, /* 177 */
+ { 6, 0, NULL, NULL }, /* 178 */
+ { 6, 0, NULL, NULL }, /* 179 */
+ { 6, 0, NULL, NULL }, /* 180 */
+ { 6, 0, NULL, NULL }, /* 181 */
+ { 6, 0, NULL, NULL }, /* 182 */
+ { 6, 0, NULL, NULL }, /* 183 */
+ { 6, 0, NULL, NULL }, /* 184 */
+ { 6, 0, NULL, NULL }, /* 185 */
+ { 6, 0, solaris_auditsys, "auditsys" }, /* 186 */
+ { 6, 0, solaris_processor_bind, "processor_bind"}, /* 187 */
+ { 6, 0, solaris_processor_info, "processor_info"}, /* 188 */
+ { 6, 0, solaris_p_online, "p_online" }, /* 189 */
+ { 6, 0, solaris_sigqueue, "sigqueue" }, /* 190 */
+ { 6, 0, solaris_clock_gettime, "clock_gettime" }, /* 191 */
+ { 6, 0, solaris_clock_settime, "clock_settime" }, /* 192 */
+ { 6, 0, solaris_clock_getres, "clock_getres" }, /* 193 */
+ { 6, 0, solaris_timer_create, "timer_create" }, /* 194 */
+ { 6, 0, solaris_timer_delete, "timer_delete" }, /* 195 */
+ { 6, 0, solaris_timer_settime, "timer_settime" }, /* 196 */
+ { 6, 0, solaris_timer_gettime, "timer_gettime" }, /* 197 */
+ { 6, 0, solaris_timer_getoverrun,"timer_getoverrun"}, /* 198 */
+ { 6, 0, solaris_nanosleep, "nanosleep" }, /* 199 */
+ { 6, 0, NULL, NULL }, /* 200 */
+ { 6, 0, NULL, NULL }, /* 201 */
+ { 6, 0, NULL, NULL }, /* 202 */
+ { 6, 0, NULL, NULL }, /* 203 */
+ { 6, 0, NULL, NULL }, /* 204 */
+ { 6, 0, NULL, NULL }, /* 205 */
+ { 6, 0, NULL, NULL }, /* 206 */
+ { 6, 0, NULL, NULL }, /* 207 */
+ { 6, 0, NULL, NULL }, /* 208 */
+ { 6, 0, NULL, NULL }, /* 209 */
+ { 6, 0, NULL, NULL }, /* 210 */
+ { 6, 0, NULL, NULL }, /* 211 */
+ { 6, 0, NULL, NULL }, /* 212 */
+ { 6, 0, NULL, NULL }, /* 213 */
+ { 6, 0, NULL, NULL }, /* 214 */
+ { 6, 0, NULL, NULL }, /* 215 */
+ { 6, 0, NULL, NULL }, /* 216 */
+ { 6, 0, NULL, NULL }, /* 217 */
+ { 6, 0, NULL, NULL }, /* 218 */
+ { 6, 0, NULL, NULL }, /* 219 */
+ { 6, 0, NULL, NULL }, /* 220 */
+ { 6, 0, NULL, NULL }, /* 221 */
+ { 6, 0, NULL, NULL }, /* 222 */
+ { 6, 0, NULL, NULL }, /* 223 */
+ { 6, 0, NULL, NULL }, /* 224 */
+ { 6, 0, NULL, NULL }, /* 225 */
+ { 6, 0, NULL, NULL }, /* 226 */
+ { 6, 0, NULL, NULL }, /* 227 */
+ { 6, 0, NULL, NULL }, /* 228 */
+ { 6, 0, NULL, NULL }, /* 229 */
+ { 6, 0, NULL, NULL }, /* 230 */
+ { 6, 0, NULL, NULL }, /* 231 */
+ { 6, 0, NULL, NULL }, /* 232 */
+ { 6, 0, NULL, NULL }, /* 233 */
+ { 6, 0, NULL, NULL }, /* 234 */
+ { 6, 0, NULL, NULL }, /* 235 */
+ { 6, 0, NULL, NULL }, /* 236 */
+ { 6, 0, NULL, NULL }, /* 237 */
+ { 6, 0, NULL, NULL }, /* 238 */
+ { 6, 0, NULL, NULL }, /* 239 */
+ { 6, 0, NULL, NULL }, /* 240 */
+ { 6, 0, NULL, NULL }, /* 241 */
+ { 6, 0, NULL, NULL }, /* 242 */
+ { 6, 0, NULL, NULL }, /* 243 */
+ { 6, 0, NULL, NULL }, /* 244 */
+ { 6, 0, NULL, NULL }, /* 245 */
+ { 6, 0, NULL, NULL }, /* 246 */
+ { 6, 0, NULL, NULL }, /* 247 */
+ { 6, 0, NULL, NULL }, /* 248 */
+ { 6, 0, NULL, NULL }, /* 249 */
+ { 6, 0, NULL, NULL }, /* 250 */
+ { 6, 0, NULL, NULL }, /* 251 */
+ { 6, 0, NULL, NULL }, /* 252 */
+ { 6, 0, NULL, NULL }, /* 253 */
+ { 6, 0, NULL, NULL }, /* 254 */
+ { 6, 0, NULL, NULL }, /* 255 */
+ { 6, 0, NULL, NULL }, /* 256 */
+ { 6, 0, NULL, NULL }, /* 257 */
+ { 6, 0, NULL, NULL }, /* 258 */
+ { 6, 0, NULL, NULL }, /* 259 */
+ { 6, 0, NULL, NULL }, /* 260 */
+ { 6, 0, NULL, NULL }, /* 261 */
+ { 6, 0, NULL, NULL }, /* 262 */
+ { 6, 0, NULL, NULL }, /* 263 */
+ { 6, 0, NULL, NULL }, /* 264 */
+ { 6, 0, NULL, NULL }, /* 265 */
+ { 6, 0, NULL, NULL }, /* 266 */
+ { 6, 0, NULL, NULL }, /* 267 */
+ { 6, 0, NULL, NULL }, /* 268 */
+ { 6, 0, NULL, NULL }, /* 269 */
+ { 6, 0, NULL, NULL }, /* 270 */
+ { 6, 0, NULL, NULL }, /* 271 */
+ { 6, 0, NULL, NULL }, /* 272 */
+ { 6, 0, NULL, NULL }, /* 273 */
+ { 6, 0, NULL, NULL }, /* 274 */
+ { 6, 0, NULL, NULL }, /* 275 */
+ { 6, 0, NULL, NULL }, /* 276 */
+ { 6, 0, NULL, NULL }, /* 277 */
+ { 6, 0, NULL, NULL }, /* 278 */
+ { 6, 0, NULL, NULL }, /* 279 */
+ { 6, 0, NULL, NULL }, /* 280 */
+ { 6, 0, NULL, NULL }, /* 281 */
+ { 6, 0, NULL, NULL }, /* 282 */
+ { 6, 0, NULL, NULL }, /* 283 */
+ { 6, 0, NULL, NULL }, /* 284 */
+ { 6, 0, NULL, NULL }, /* 285 */
+ { 6, 0, NULL, NULL }, /* 286 */
+ { 6, 0, NULL, NULL }, /* 287 */
+ { 6, 0, NULL, NULL }, /* 288 */
+ { 6, 0, NULL, NULL }, /* 289 */
+ { 6, 0, NULL, NULL }, /* 290 */
+ { 6, 0, NULL, NULL }, /* 291 */
+ { 6, 0, NULL, NULL }, /* 292 */
+ { 6, 0, NULL, NULL }, /* 293 */
+ { 6, 0, NULL, NULL }, /* 294 */
+ { 6, 0, NULL, NULL }, /* 295 */
+ { 6, 0, NULL, NULL }, /* 296 */
+ { 6, 0, NULL, NULL }, /* 297 */
+ { 6, 0, NULL, NULL }, /* 298 */
+ { 6, 0, NULL, NULL }, /* 299 */
+
+ { 6, 0, solaris_getpgrp, "getpgrp" }, /* 300 */
+ { 6, 0, solaris_setpgrp, "setpgrp" }, /* 301 */
+ { 6, 0, solaris_getsid, "getsid" }, /* 302 */
+ { 6, 0, solaris_setsid, "setsid" }, /* 303 */
+ { 6, 0, solaris_getpgid, "getpgid" }, /* 304 */
+ { 6, 0, solaris_setpgid, "setpgid" }, /* 305 */
+ { 6, 0, NULL, NULL }, /* 306 */
+ { 6, 0, NULL, NULL }, /* 307 */
+ { 6, 0, NULL, NULL }, /* 308 */
+ { 6, 0, NULL, NULL }, /* 309 */
+
+ { 6, TS, solaris_signal, "signal" }, /* 310 */
+ { 6, TS, solaris_sigset, "sigset" }, /* 311 */
+ { 6, TS, solaris_sighold, "sighold" }, /* 312 */
+ { 6, TS, solaris_sigrelse, "sigrelse" }, /* 313 */
+ { 6, TS, solaris_sigignore, "sigignore" }, /* 314 */
+ { 6, TS, solaris_sigpause, "sigpause" }, /* 315 */
+ { 6, 0, NULL, NULL }, /* 316 */
+ { 6, 0, NULL, NULL }, /* 317 */
+ { 6, 0, NULL, NULL }, /* 318 */
+ { 6, 0, NULL, NULL }, /* 319 */
+
+ { 6, TI, solaris_msgget, "msgget" }, /* 320 */
+ { 6, TI, solaris_msgctl, "msgctl" }, /* 321 */
+ { 6, TI, solaris_msgrcv, "msgrcv" }, /* 322 */
+ { 6, TI, solaris_msgsnd, "msgsnd" }, /* 323 */
+ { 6, 0, NULL, NULL }, /* 324 */
+ { 6, 0, NULL, NULL }, /* 325 */
+ { 6, 0, NULL, NULL }, /* 326 */
+ { 6, 0, NULL, NULL }, /* 327 */
+ { 6, 0, NULL, NULL }, /* 328 */
+ { 6, 0, NULL, NULL }, /* 329 */
+
+ { 6, TI, solaris_shmat, "shmat" }, /* 330 */
+ { 6, TI, solaris_shmctl, "shmctl" }, /* 331 */
+ { 6, TI, solaris_shmdt, "shmdt" }, /* 332 */
+ { 6, TI, solaris_shmget, "shmget" }, /* 333 */
+ { 6, 0, NULL, NULL }, /* 334 */
+ { 6, 0, NULL, NULL }, /* 335 */
+ { 6, 0, NULL, NULL }, /* 336 */
+ { 6, 0, NULL, NULL }, /* 337 */
+ { 6, 0, NULL, NULL }, /* 338 */
+ { 6, 0, NULL, NULL }, /* 339 */
+
+ { 6, TI, solaris_semctl, "semctl" }, /* 340 */
+ { 6, TI, solaris_semget, "semget" }, /* 341 */
+ { 6, TI, solaris_semop, "semop" }, /* 342 */
+ { 6, 0, NULL, NULL }, /* 343 */
+ { 6, 0, NULL, NULL }, /* 344 */
+ { 6, 0, NULL, NULL }, /* 345 */
+ { 6, 0, NULL, NULL }, /* 346 */
+ { 6, 0, NULL, NULL }, /* 347 */
+ { 6, 0, NULL, NULL }, /* 348 */
+ { 6, 0, NULL, NULL }, /* 349 */
+
+ { 6, 0, solaris_olduname, "olduname" }, /* 350 */
+ { 6, 0, printargs, "utssys1" }, /* 351 */
+ { 6, 0, solaris_ustat, "ustat" }, /* 352 */
+ { 6, 0, solaris_fusers, "fusers" }, /* 353 */
+ { 6, 0, NULL, NULL }, /* 354 */
+ { 6, 0, NULL, NULL }, /* 355 */
+ { 6, 0, NULL, NULL }, /* 356 */
+ { 6, 0, NULL, NULL }, /* 357 */
+ { 6, 0, NULL, NULL }, /* 358 */
+ { 6, 0, NULL, NULL }, /* 359 */
+
+ { 6, 0, printargs, "sysfs0" }, /* 360 */
+ { 6, 0, solaris_sysfs1, "sysfs1" }, /* 361 */
+ { 6, 0, solaris_sysfs2, "sysfs2" }, /* 362 */
+ { 6, 0, solaris_sysfs3, "sysfs3" }, /* 363 */
+ { 6, 0, NULL, NULL }, /* 364 */
+ { 6, 0, NULL, NULL }, /* 365 */
+ { 6, 0, NULL, NULL }, /* 366 */
+ { 6, 0, NULL, NULL }, /* 367 */
+ { 6, 0, NULL, NULL }, /* 368 */
+ { 6, 0, NULL, NULL }, /* 369 */
+
+ { 6, 0, printargs, "spcall0" }, /* 370 */
+ { 6, TS, solaris_sigpending, "sigpending" }, /* 371 */
+ { 6, TS, solaris_sigfillset, "sigfillset" }, /* 372 */
+ { 6, 0, NULL, NULL }, /* 373 */
+ { 6, 0, NULL, NULL }, /* 374 */
+ { 6, 0, NULL, NULL }, /* 375 */
+ { 6, 0, NULL, NULL }, /* 376 */
+ { 6, 0, NULL, NULL }, /* 377 */
+ { 6, 0, NULL, NULL }, /* 378 */
+ { 6, 0, NULL, NULL }, /* 379 */
+
+ { 6, 0, solaris_getcontext, "getcontext" }, /* 380 */
+ { 6, 0, solaris_setcontext, "setcontext" }, /* 381 */
+ { 6, 0, NULL, NULL }, /* 382 */
+ { 6, 0, NULL, NULL }, /* 383 */
+ { 6, 0, NULL, NULL }, /* 384 */
+ { 6, 0, NULL, NULL }, /* 385 */
+ { 6, 0, NULL, NULL }, /* 386 */
+ { 6, 0, NULL, NULL }, /* 387 */
+ { 6, 0, NULL, NULL }, /* 388 */
+ { 6, 0, NULL, NULL }, /* 389 */
+
+ { 6, 0, NULL, NULL }, /* 390 */
+ { 6, 0, NULL, NULL }, /* 391 */
+ { 6, 0, NULL, NULL }, /* 392 */
+ { 6, 0, NULL, NULL }, /* 393 */
+ { 6, 0, NULL, NULL }, /* 394 */
+ { 6, 0, NULL, NULL }, /* 395 */
+ { 6, 0, NULL, NULL }, /* 396 */
+ { 6, 0, NULL, NULL }, /* 397 */
+ { 6, 0, NULL, NULL }, /* 398 */
+ { 6, 0, NULL, NULL }, /* 399 */
diff --git a/linux/sparc64/dummy2.h b/linux/sparc64/dummy2.h
new file mode 100644
index 0000000..39552a2
--- /dev/null
+++ b/linux/sparc64/dummy2.h
@@ -0,0 +1,276 @@
+/*
+ * 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.
+ */
+
+/* still unfinished */
+
+#define solaris_sysmp printargs
+#define solaris_sginap printargs
+#define solaris_sgikopt printargs
+#define solaris_sysmips printargs
+#define solaris_sigreturn printargs
+#define solaris_recvmsg printargs
+#define solaris_sendmsg printargs
+#define solaris_nfssvc printargs
+#define solaris_getfh printargs
+#define solaris_async_daemon printargs
+#define solaris_exportfs printargs
+#define solaris_BSD_getime printargs
+#define solaris_sproc printargs
+#define solaris_procblk printargs
+#define solaris_sprocsp printargs
+#define solaris_msync printargs
+#define solaris_madvise printargs
+#define solaris_pagelock printargs
+#define solaris_quotactl printargs
+#define solaris_cacheflush printargs
+#define solaris_cachectl printargs
+#define solaris_nuname printargs
+#define solaris_sigpoll printargs
+#define solaris_swapctl printargs
+#define solaris_sigstack printargs
+#define solaris_sigsendset printargs
+#define solaris_priocntl printargs
+#define solaris_ksigqueue printargs
+#define solaris_lwp_sema_wait printargs
+#define solaris_memcntl printargs
+#define solaris_syscall printargs
+#define solaris_clocal printargs
+#define solaris_syssun printargs
+#define solaris_sysi86 printargs
+#define solaris_sysmachine printargs
+#define solaris_plock printargs
+#define solaris_pathconf printargs
+#define solaris_sigtimedwait printargs
+#define solaris_ulimit printargs
+#define solaris_ptrace printargs
+#define solaris_stty printargs
+#define solaris_lwp_info printargs
+#define solaris_priocntlsys printargs
+#define solaris_hrtsys printargs
+#define solaris_xenix printargs
+#define solaris_statfs printargs
+#define solaris_fstatfs printargs
+#define solaris_statvfs printargs
+#define solaris_fstatvfs printargs
+#define solaris_fork1 printargs
+#define solaris_sigsendsys printargs
+#define solaris_gtty printargs
+#define solaris_vtrace printargs
+#define solaris_fpathconf printargs
+#define solaris_evsys printargs
+#define solaris_acct printargs
+#define solaris_exec printargs
+#define solaris_lwp_sema_post printargs
+#define solaris_nfssys printargs
+#define solaris_sigaltstack printargs
+#define solaris_uadmin printargs
+#define solaris_umount printargs
+#define solaris_modctl printargs
+#define solaris_acancel printargs
+#define solaris_async printargs
+#define solaris_evtrapret printargs
+#define solaris_lwp_create printargs
+#define solaris_lwp_exit printargs
+#define solaris_lwp_suspend printargs
+#define solaris_lwp_continue printargs
+#define solaris_lwp_kill printargs
+#define solaris_lwp_self printargs
+#define solaris_lwp_setprivate printargs
+#define solaris_lwp_getprivate printargs
+#define solaris_lwp_wait printargs
+#define solaris_lwp_mutex_unlock printargs
+#define solaris_lwp_mutex_lock printargs
+#define solaris_lwp_cond_wait printargs
+#define solaris_lwp_cond_signal printargs
+#define solaris_lwp_cond_broadcast printargs
+#define solaris_llseek printargs
+#define solaris_inst_sync printargs
+#define solaris_auditsys printargs
+#define solaris_processor_bind printargs
+#define solaris_processor_info printargs
+#define solaris_p_online printargs
+#define solaris_sigqueue printargs
+#define solaris_clock_gettime printargs
+#define solaris_clock_settime printargs
+#define solaris_clock_getres printargs
+#define solaris_nanosleep printargs
+#define solaris_timer_create printargs
+#define solaris_timer_delete printargs
+#define solaris_timer_settime printargs
+#define solaris_timer_gettime printargs
+#define solaris_timer_getoverrun printargs
+#define solaris_signal printargs
+#define solaris_sigset printargs
+#define solaris_sighold printargs
+#define solaris_sigrelse printargs
+#define solaris_sigignore printargs
+#define solaris_sigpause printargs
+#define solaris_msgctl printargs
+#define solaris_msgget printargs
+#define solaris_msgrcv printargs
+#define solaris_msgsnd printargs
+#define solaris_shmat printargs
+#define solaris_shmctl printargs
+#define solaris_shmdt printargs
+#define solaris_shmget printargs
+#define solaris_semctl printargs
+#define solaris_semget printargs
+#define solaris_semop printargs
+#define solaris_olduname printargs
+#define solaris_ustat printargs
+#define solaris_fusers printargs
+#define solaris_sysfs1 printargs
+#define solaris_sysfs2 printargs
+#define solaris_sysfs3 printargs
+
+/* like another call */
+#define solaris_lchown solaris_chown
+#define solaris_setuid solaris_close
+#define solaris_seteuid solaris_close
+#define solaris_setgid solaris_close
+#define solaris_setegid solaris_close
+#define solaris_vhangup solaris_close
+#define solaris_fdsync solaris_close
+#define solaris_sigfillset solaris_sigpending
+#define solaris_vfork solaris_fork
+#define solaris_ksigaction solaris_sigaction
+#define solaris_BSDgetpgrp solaris_getpgrp
+#define solaris_BSDsetpgrp solaris_setpgrp
+#define solaris_waitsys solaris_waitid
+
+/* printargs does the right thing */
+#define solaris_sync printargs
+#define solaris_profil printargs
+#define solaris_yield printargs
+#define solaris_pause printargs
+#define solaris_sethostid printargs
+
+/* subfunction entry points */
+#define solaris_pgrpsys printargs
+#define solaris_sigcall printargs
+#define solaris_msgsys printargs
+#define solaris_shmsys printargs
+#define solaris_semsys printargs
+#define solaris_utssys printargs
+#define solaris_sysfs printargs
+#define solaris_spcall printargs
+#define solaris_context printargs
+
+/* same as linux */
+#define solaris_exit sys_exit
+#define solaris_fork sys_fork
+#define solaris_read sys_read
+#define solaris_write sys_write
+#define solaris_close sys_close
+#define solaris_creat sys_creat
+#define solaris_link sys_link
+#define solaris_unlink sys_unlink
+#define solaris_chdir sys_chdir
+#define solaris_time sys_time
+#define solaris_chmod sys_chmod
+#define solaris_lseek sys_lseek
+#define solaris_stime sys_stime
+#define solaris_alarm sys_alarm
+#define solaris_utime sys_utime
+#define solaris_access sys_access
+#define solaris_nice sys_nice
+#define solaris_dup sys_dup
+#define solaris_pipe sys_pipe
+#define solaris_times sys_times
+#define solaris_execve sys_execve
+#define solaris_umask sys_umask
+#define solaris_chroot sys_chroot
+#define solaris_rmdir sys_rmdir
+#define solaris_mkdir sys_mkdir
+#define solaris_getdents sys_getdents
+#define solaris_poll sys_poll
+#define solaris_symlink sys_symlink
+#define solaris_readlink sys_readlink
+#define solaris_setgroups sys_setgroups
+#define solaris_getgroups sys_getgroups
+#define solaris_fchmod sys_fchmod
+#define solaris_fchown sys_fchown
+#define solaris_mprotect sys_mprotect
+#define solaris_munmap sys_munmap
+#define solaris_readv sys_readv
+#define solaris_writev sys_writev
+#define solaris_chown sys_chown
+#define solaris_rename sys_rename
+#define solaris_gettimeofday sys_gettimeofday
+#define solaris_getitimer sys_getitimer
+#define solaris_setitimer sys_setitimer
+#define solaris_brk sys_brk
+#define solaris_mmap sys_mmap
+#define solaris_getsid sys_getsid
+#define solaris_setsid sys_setsid
+#define solaris_getpgid sys_getpgid
+#define solaris_setpgid sys_setpgid
+#define solaris_getpgrp sys_getpgrp
+
+/* These are handled according to current_personality */
+#define solaris_xstat sys_xstat
+#define solaris_fxstat sys_fxstat
+#define solaris_lxstat sys_lxstat
+#define solaris_xmknod sys_xmknod
+#define solaris_stat sys_stat
+#define solaris_fstat sys_fstat
+#define solaris_lstat sys_lstat
+#define solaris_pread sys_pread
+#define solaris_pwrite sys_pwrite
+#define solaris_ioctl sys_ioctl
+#define solaris_mknod sys_mknod
+
+/* To be done */
+#define solaris_mount printargs
+#define solaris_sysinfo printargs
+#define solaris_sysconfig printargs
+#define solaris_getpmsg printargs
+#define solaris_putpmsg printargs
+#define solaris_wait printargs
+#define solaris_waitid printargs
+#define solaris_sigsuspend printargs
+#define solaris_setpgrp printargs
+#define solaris_getcontext printargs
+#define solaris_setcontext printargs
+#define solaris_getpid printargs
+#define solaris_getuid printargs
+#define solaris_kill printargs
+#define solaris_getgid printargs
+#define solaris_fcntl printargs
+#define solaris_getmsg printargs
+#define solaris_putmsg printargs
+#define solaris_sigprocmask printargs
+#define solaris_sigaction printargs
+#define solaris_sigpending printargs
+#define solaris_mincore printargs
+#define solaris_fchdir printargs
+#define solaris_setrlimit printargs
+#define solaris_getrlimit printargs
+#define solaris_uname printargs
+#define solaris_adjtime printargs
+#define solaris_fchroot printargs
+#define solaris_utimes printargs
diff --git a/linux/sparc64/errnoent.h b/linux/sparc64/errnoent.h
new file mode 100644
index 0000000..d243699
--- /dev/null
+++ b/linux/sparc64/errnoent.h
@@ -0,0 +1,127 @@
+ "ERRNO_0", /* 0 */
+ "EPERM", /* 1 */
+ "ENOENT", /* 2 */
+ "ESRCH", /* 3 */
+ "EINTR", /* 4 */
+ "EIO", /* 5 */
+ "ENXIO", /* 6 */
+ "E2BIG", /* 7 */
+ "ENOEXEC", /* 8 */
+ "EBADF", /* 9 */
+ "ECHILD", /* 10 */
+ "EAGAIN", /* 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 */
+ "EWOULDBLOCK", /* 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 */
+ "ENOSTR", /* 72 */
+ "ETIME", /* 73 */
+ "ENOSR", /* 74 */
+ "ENOMSG", /* 75 */
+ "EBADMSG", /* 76 */
+ "EIDRM", /* 77 */
+ "EDEADLK", /* 78 */
+ "ENOLCK", /* 79 */
+ "ENONET", /* 80 */
+ "ERREMOTE", /* 81 */
+ "ENOLINK", /* 82 */
+ "EADV", /* 83 */
+ "ESRMNT", /* 84 */
+ "ECOMM", /* 85 */
+ "EPROTO", /* 86 */
+ "EMULTIHOP", /* 87 */
+ "EDOTDOT", /* 88 */
+ "EREMCHG", /* 89 */
+ "ENOSYS", /* 90 */
+ "ESTRPIPE", /* 91 */
+ "EOVERFLOW", /* 92 */
+ "EBADFD", /* 93 */
+ "ECHRNG", /* 94 */
+ "EL2NSYNC", /* 95 */
+ "EL3HLT", /* 96 */
+ "EL3RST", /* 97 */
+ "ELNRNG", /* 98 */
+ "EUNATCH", /* 99 */
+ "ENOCSI", /* 100 */
+ "EL2HLT", /* 101 */
+ "EBADE", /* 102 */
+ "EBADR", /* 103 */
+ "EXFULL", /* 104 */
+ "ENOANO", /* 105 */
+ "EBADRQC", /* 106 */
+ "EBADSLT", /* 107 */
+ "EDEADLOCK", /* 108 */
+ "EBFONT", /* 109 */
+ "ELIBEXEC", /* 110 */
+ "ENODATA", /* 111 */
+ "ELIBBAD", /* 112 */
+ "ENOPKG", /* 113 */
+ "ELIBACC", /* 114 */
+ "ENOTUNIQ", /* 115 */
+ "ERESTART", /* 116 */
+ "EUCLEAN", /* 117 */
+ "ENOTNAM", /* 118 */
+ "ENAVAIL", /* 119 */
+ "EISNAM", /* 120 */
+ "EREMOTEIO", /* 121 */
+ "EILSEQ", /* 122 */
+ "ELIBMAX", /* 123 */
+ "ELIBSCN", /* 124 */
+ "ENOMEDIUM", /* 125 */
+ "EMEDIUMTYPE", /* 126 */
diff --git a/linux/sparc64/errnoent1.h b/linux/sparc64/errnoent1.h
new file mode 100644
index 0000000..c1eaac6
--- /dev/null
+++ b/linux/sparc64/errnoent1.h
@@ -0,0 +1 @@
+#include "../sparc/errnoent1.h"
diff --git a/linux/sparc64/errnoent2.h b/linux/sparc64/errnoent2.h
new file mode 100644
index 0000000..d243699
--- /dev/null
+++ b/linux/sparc64/errnoent2.h
@@ -0,0 +1,127 @@
+ "ERRNO_0", /* 0 */
+ "EPERM", /* 1 */
+ "ENOENT", /* 2 */
+ "ESRCH", /* 3 */
+ "EINTR", /* 4 */
+ "EIO", /* 5 */
+ "ENXIO", /* 6 */
+ "E2BIG", /* 7 */
+ "ENOEXEC", /* 8 */
+ "EBADF", /* 9 */
+ "ECHILD", /* 10 */
+ "EAGAIN", /* 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 */
+ "EWOULDBLOCK", /* 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 */
+ "ENOSTR", /* 72 */
+ "ETIME", /* 73 */
+ "ENOSR", /* 74 */
+ "ENOMSG", /* 75 */
+ "EBADMSG", /* 76 */
+ "EIDRM", /* 77 */
+ "EDEADLK", /* 78 */
+ "ENOLCK", /* 79 */
+ "ENONET", /* 80 */
+ "ERREMOTE", /* 81 */
+ "ENOLINK", /* 82 */
+ "EADV", /* 83 */
+ "ESRMNT", /* 84 */
+ "ECOMM", /* 85 */
+ "EPROTO", /* 86 */
+ "EMULTIHOP", /* 87 */
+ "EDOTDOT", /* 88 */
+ "EREMCHG", /* 89 */
+ "ENOSYS", /* 90 */
+ "ESTRPIPE", /* 91 */
+ "EOVERFLOW", /* 92 */
+ "EBADFD", /* 93 */
+ "ECHRNG", /* 94 */
+ "EL2NSYNC", /* 95 */
+ "EL3HLT", /* 96 */
+ "EL3RST", /* 97 */
+ "ELNRNG", /* 98 */
+ "EUNATCH", /* 99 */
+ "ENOCSI", /* 100 */
+ "EL2HLT", /* 101 */
+ "EBADE", /* 102 */
+ "EBADR", /* 103 */
+ "EXFULL", /* 104 */
+ "ENOANO", /* 105 */
+ "EBADRQC", /* 106 */
+ "EBADSLT", /* 107 */
+ "EDEADLOCK", /* 108 */
+ "EBFONT", /* 109 */
+ "ELIBEXEC", /* 110 */
+ "ENODATA", /* 111 */
+ "ELIBBAD", /* 112 */
+ "ENOPKG", /* 113 */
+ "ELIBACC", /* 114 */
+ "ENOTUNIQ", /* 115 */
+ "ERESTART", /* 116 */
+ "EUCLEAN", /* 117 */
+ "ENOTNAM", /* 118 */
+ "ENAVAIL", /* 119 */
+ "EISNAM", /* 120 */
+ "EREMOTEIO", /* 121 */
+ "EILSEQ", /* 122 */
+ "ELIBMAX", /* 123 */
+ "ELIBSCN", /* 124 */
+ "ENOMEDIUM", /* 125 */
+ "EMEDIUMTYPE", /* 126 */
diff --git a/linux/sparc64/ioctlent.h.in b/linux/sparc64/ioctlent.h.in
new file mode 100644
index 0000000..4bc5cfd
--- /dev/null
+++ b/linux/sparc64/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../sparc/ioctlent.h.in"
diff --git a/linux/sparc64/ioctlent1.h b/linux/sparc64/ioctlent1.h
new file mode 100644
index 0000000..c572f6e
--- /dev/null
+++ b/linux/sparc64/ioctlent1.h
@@ -0,0 +1 @@
+#include "../sparc/ioctlent1.h"
diff --git a/linux/sparc64/ioctlent2.h b/linux/sparc64/ioctlent2.h
new file mode 100644
index 0000000..c1d6b8a
--- /dev/null
+++ b/linux/sparc64/ioctlent2.h
@@ -0,0 +1,838 @@
+ {"linux/fs.h", "FIBMAP", 0x1},
+ {"linux/fs.h", "FIGETBSZ", 0x2},
+ {"linux/fd.h", "FDGETPRM", 0x204},
+ {"linux/fd.h", "FDGETMAXERRS", 0x20e},
+ {"linux/fd.h", "FDGETDRVTYP", 0x20f},
+ {"linux/fd.h", "FDGETDRVPRM", 0x211},
+ {"linux/fd.h", "FDGETDRVSTAT", 0x212},
+ {"linux/fd.h", "FDPOLLDRVSTAT", 0x213},
+ {"linux/fd.h", "FDGETFDCSTAT", 0x215},
+ {"linux/fd.h", "FDWERRORGET", 0x217},
+ {"linux/fd.h", "FDCLRPRM", 0x241},
+ {"linux/fd.h", "FDSETPRM", 0x242},
+ {"linux/fd.h", "FDDEFPRM", 0x243},
+ {"linux/fd.h", "FDMSGON", 0x245},
+ {"linux/fd.h", "FDMSGOFF", 0x246},
+ {"linux/fd.h", "FDFMTBEG", 0x247},
+ {"linux/fd.h", "FDFMTTRK", 0x248},
+ {"linux/fd.h", "FDFMTEND", 0x249},
+ {"linux/fd.h", "FDSETEMSGTRESH", 0x24a},
+ {"linux/fd.h", "FDFLUSH", 0x24b},
+ {"linux/fd.h", "FDSETMAXERRS", 0x24c},
+ {"linux/fd.h", "FDRESET", 0x254},
+ {"linux/fd.h", "FDWERRORCLR", 0x256},
+ {"linux/fd.h", "FDRAWCMD", 0x258},
+ {"linux/fd.h", "FDTWADDLE", 0x259},
+ {"linux/fd.h", "FDEJECT", 0x25a},
+ {"linux/fd.h", "FDSETDRVPRM", 0x290},
+ {"linux/umsdos_fs.h", "UMSDOS_READDIR_DOS", 0x4d2},
+ {"linux/umsdos_fs.h", "UMSDOS_UNLINK_DOS", 0x4d3},
+ {"linux/umsdos_fs.h", "UMSDOS_RMDIR_DOS", 0x4d4},
+ {"linux/umsdos_fs.h", "UMSDOS_STAT_DOS", 0x4d5},
+ {"linux/umsdos_fs.h", "UMSDOS_CREAT_EMD", 0x4d6},
+ {"linux/umsdos_fs.h", "UMSDOS_UNLINK_EMD", 0x4d7},
+ {"linux/umsdos_fs.h", "UMSDOS_READDIR_EMD", 0x4d8},
+ {"linux/umsdos_fs.h", "UMSDOS_GETVERSION", 0x4d9},
+ {"linux/umsdos_fs.h", "UMSDOS_INIT_EMD", 0x4da},
+ {"linux/umsdos_fs.h", "UMSDOS_DOS_SETUP", 0x4db},
+ {"linux/umsdos_fs.h", "UMSDOS_RENAME_DOS", 0x4dc},
+ {"linux/fs.h", "BLKROSET", 0x125d},
+ {"linux/fs.h", "BLKROGET", 0x125e},
+ {"linux/fs.h", "BLKRRPART", 0x125f},
+ {"linux/fs.h", "BLKGETSIZE", 0x1260},
+ {"linux/fs.h", "BLKFLSBUF", 0x1261},
+ {"linux/fs.h", "BLKRASET", 0x1262},
+ {"linux/fs.h", "BLKRAGET", 0x1263},
+ {"linux/fs.h", "BLKFRASET", 0x1264},
+ {"linux/fs.h", "BLKFRAGET", 0x1265},
+ {"linux/fs.h", "BLKSECTSET", 0x1266},
+ {"linux/fs.h", "BLKSECTGET", 0x1267},
+ {"linux/fs.h", "BLKSSZGET", 0x1268},
+ {"linux/blkpg.h", "BLKPG", 0x1269},
+ {"linux/fs.h", "BLKPG", 0x1269},
+ {"linux/elevator.h", "BLKELVGET", 0x126a},
+ {"linux/fs.h", "BLKELVGET", 0x126a},
+ {"linux/elevator.h", "BLKELVSET", 0x126b},
+ {"linux/fs.h", "BLKELVSET", 0x126b},
+ {"linux/fs.h", "BLKBSZGET", 0x1270},
+ {"linux/fs.h", "BLKBSZSET", 0x1271},
+ {"linux/fs.h", "BLKGETSIZE64", 0x1272},
+ {"linux/agpgart.h", "AGPIOC_INFO", 0x4100},
+ {"linux/agpgart.h", "AGPIOC_ACQUIRE", 0x4101},
+ {"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101},
+ {"linux/agpgart.h", "AGPIOC_RELEASE", 0x4102},
+ {"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102},
+ {"linux/agpgart.h", "AGPIOC_SETUP", 0x4103},
+ {"linux/agpgart.h", "AGPIOC_RESERVE", 0x4104},
+ {"linux/agpgart.h", "AGPIOC_PROTECT", 0x4105},
+ {"linux/agpgart.h", "AGPIOC_ALLOCATE", 0x4106},
+ {"linux/agpgart.h", "AGPIOC_DEALLOCATE", 0x4107},
+ {"linux/agpgart.h", "AGPIOC_BIND", 0x4108},
+ {"linux/agpgart.h", "AGPIOC_UNBIND", 0x4109},
+ {"linux/pmu.h", "PMU_IOC_SLEEP", 0x4200},
+ {"linux/cciss_ioctl.h", "CCISS_GETPCIINFO", 0x4201},
+ {"linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", 0x4201},
+ {"linux/cciss_ioctl.h", "CCISS_GETINTINFO", 0x4202},
+ {"linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", 0x4202},
+ {"linux/cciss_ioctl.h", "CCISS_SETINTINFO", 0x4203},
+ {"linux/pmu.h", "PMU_IOC_GET_MODEL", 0x4203},
+ {"linux/cciss_ioctl.h", "CCISS_GETNODENAME", 0x4204},
+ {"linux/pmu.h", "PMU_IOC_HAS_ADB", 0x4204},
+ {"linux/cciss_ioctl.h", "CCISS_SETNODENAME", 0x4205},
+ {"linux/pmu.h", "PMU_IOC_CAN_SLEEP", 0x4205},
+ {"linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", 0x4206},
+ {"linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", 0x4207},
+ {"linux/cciss_ioctl.h", "CCISS_GETFIRMVER", 0x4208},
+ {"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x4209},
+ {"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a},
+ {"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0x420b},
+ {"linux/soundcard.h", "SNDCTL_COPR_RESET", 0x4300},
+ {"linux/capi.h", "CAPI_REGISTER", 0x4301},
+ {"linux/soundcard.h", "SNDCTL_COPR_LOAD", 0x4301},
+ {"linux/soundcard.h", "SNDCTL_COPR_RDATA", 0x4302},
+ {"linux/soundcard.h", "SNDCTL_COPR_RCODE", 0x4303},
+ {"linux/soundcard.h", "SNDCTL_COPR_WDATA", 0x4304},
+ {"linux/soundcard.h", "SNDCTL_COPR_WCODE", 0x4305},
+ {"linux/capi.h", "CAPI_GET_MANUFACTURER", 0x4306},
+ {"linux/soundcard.h", "SNDCTL_COPR_RUN", 0x4306},
+ {"linux/capi.h", "CAPI_GET_VERSION", 0x4307},
+ {"linux/soundcard.h", "SNDCTL_COPR_HALT", 0x4307},
+ {"linux/capi.h", "CAPI_GET_SERIAL", 0x4308},
+ {"linux/soundcard.h", "SNDCTL_COPR_SENDMSG", 0x4308},
+ {"linux/capi.h", "CAPI_GET_PROFILE", 0x4309},
+ {"linux/soundcard.h", "SNDCTL_COPR_RCVMSG", 0x4309},
+ {"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0x4320},
+ {"linux/capi.h", "CAPI_GET_ERRCODE", 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},
+ {"linux/input.h", "EVIOCGVERSION", 0x4501},
+ {"linux/input.h", "EVIOCGID", 0x4502},
+ {"linux/input.h", "EVIOCGREP", 0x4503},
+ {"linux/input.h", "EVIOCSREP", 0x4503},
+ {"linux/input.h", "EVIOCGKEYCODE", 0x4504},
+ {"linux/input.h", "EVIOCSKEYCODE", 0x4504},
+ {"linux/input.h", "EVIOCGKEY", 0x4505},
+ {"linux/input.h", "EVIOCGBUS", 0x4507},
+ {"linux/input.h", "EVIOCRMFF", 0x4581},
+ {"linux/input.h", "EVIOCSGAIN", 0x4582},
+ {"linux/input.h", "EVIOCSAUTOCENTER", 0x4583},
+ {"linux/input.h", "EVIOCGEFFECTS", 0x4584},
+ {"linux/fb.h", "FBIOGET_VBLANK", 0x4612},
+ {"linux/hiddev.h", "HIDIOCGVERSION", 0x4801},
+ {"linux/hiddev.h", "HIDIOCAPPLICATION", 0x4802},
+ {"linux/hiddev.h", "HIDIOCGDEVINFO", 0x4803},
+ {"linux/hiddev.h", "HIDIOCGSTRING", 0x4804},
+ {"linux/hiddev.h", "HIDIOCINITREPORT", 0x4805},
+ {"linux/hiddev.h", "HIDIOCGREPORT", 0x4807},
+ {"linux/hiddev.h", "HIDIOCSREPORT", 0x4808},
+ {"linux/hiddev.h", "HIDIOCGREPORTINFO", 0x4809},
+ {"linux/hiddev.h", "HIDIOCGFIELDINFO", 0x480a},
+ {"linux/hiddev.h", "HIDIOCGUSAGE", 0x480b},
+ {"linux/hiddev.h", "HIDIOCSUSAGE", 0x480c},
+ {"linux/hiddev.h", "HIDIOCGUCODE", 0x480d},
+ {"linux/isdn.h", "IIOCNETAIF", 0x4901},
+ {"linux/isdn.h", "IIOCNETDIF", 0x4902},
+ {"linux/isdn.h", "IIOCNETSCF", 0x4903},
+ {"linux/isdn.h", "IIOCNETGCF", 0x4904},
+ {"linux/isdn.h", "IIOCNETANM", 0x4905},
+ {"linux/isdn.h", "IIOCNETDNM", 0x4906},
+ {"linux/isdn.h", "IIOCNETGNM", 0x4907},
+ {"linux/isdn.h", "IIOCGETSET", 0x4908},
+ {"linux/isdn.h", "IIOCSETSET", 0x4909},
+ {"linux/isdn.h", "IIOCSETVER", 0x490a},
+ {"linux/isdn.h", "IIOCNETHUP", 0x490b},
+ {"linux/isdn.h", "IIOCSETGST", 0x490c},
+ {"linux/isdn.h", "IIOCSETBRJ", 0x490d},
+ {"linux/isdn.h", "IIOCSIGPRF", 0x490e},
+ {"linux/isdn.h", "IIOCGETPRF", 0x490f},
+ {"linux/isdn.h", "IIOCSETPRF", 0x4910},
+ {"linux/isdn.h", "IIOCGETMAP", 0x4911},
+ {"linux/isdn.h", "IIOCSETMAP", 0x4912},
+ {"linux/isdn.h", "IIOCNETASL", 0x4913},
+ {"linux/isdn.h", "IIOCNETDIL", 0x4914},
+ {"linux/isdn.h", "IIOCGETCPS", 0x4915},
+ {"linux/isdn.h", "IIOCGETDVR", 0x4916},
+ {"linux/isdn.h", "IIOCNETLCR", 0x4917},
+ {"linux/isdn.h", "IIOCNETDWRSET", 0x4918},
+ {"linux/isdn.h", "IIOCNETALN", 0x4920},
+ {"linux/isdn.h", "IIOCNETDLN", 0x4921},
+ {"linux/isdn.h", "IIOCNETGPN", 0x4922},
+ {"linux/isdn.h", "IIOCDBGVAR", 0x497f},
+ {"linux/isdn.h", "IIOCDRVCTL", 0x4980},
+ {"linux/soundcard.h", "SOUND_MIXER_INFO", 0x4d65},
+ {"linux/soundcard.h", "SOUND_OLD_MIXER_INFO", 0x4d65},
+ {"linux/soundcard.h", "SOUND_MIXER_ACCESS", 0x4d66},
+ {"linux/soundcard.h", "SOUND_MIXER_AGC", 0x4d67},
+ {"linux/soundcard.h", "SOUND_MIXER_3DSE", 0x4d68},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE1", 0x4d6f},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE2", 0x4d70},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE3", 0x4d71},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE4", 0x4d72},
+ {"linux/soundcard.h", "SOUND_MIXER_PRIVATE5", 0x4d73},
+ {"linux/soundcard.h", "SOUND_MIXER_GETLEVELS", 0x4d74},
+ {"linux/soundcard.h", "SOUND_MIXER_SETLEVELS", 0x4d75},
+ {"linux/soundcard.h", "OSS_GETVERSION", 0x4d76},
+ {"linux/soundcard.h", "SNDCTL_DSP_RESET", 0x5000},
+ {"linux/soundcard.h", "SNDCTL_DSP_SYNC", 0x5001},
+ {"linux/soundcard.h", "SNDCTL_DSP_SPEED", 0x5002},
+ {"linux/soundcard.h", "SOUND_PCM_READ_RATE", 0x5002},
+ {"linux/soundcard.h", "SNDCTL_DSP_STEREO", 0x5003},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", 0x5004},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETFMT", 0x5005},
+ {"linux/soundcard.h", "SOUND_PCM_READ_BITS", 0x5005},
+ {"linux/soundcard.h", "SNDCTL_DSP_CHANNELS", 0x5006},
+ {"linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", 0x5006},
+ {"linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", 0x5007},
+ {"linux/soundcard.h", "SOUND_PCM_READ_FILTER", 0x5007},
+ {"linux/soundcard.h", "SNDCTL_DSP_POST", 0x5008},
+ {"linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", 0x5009},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", 0x500a},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETFMTS", 0x500b},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", 0x500c},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETISPACE", 0x500d},
+ {"linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", 0x500e},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETCAPS", 0x500f},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", 0x5010},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", 0x5010},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETIPTR", 0x5011},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETOPTR", 0x5012},
+ {"linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", 0x5013},
+ {"linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", 0x5014},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", 0x5015},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", 0x5016},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETODELAY", 0x5017},
+ {"linux/soundcard.h", "SNDCTL_DSP_PROFILE", 0x5017},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETCHANNELMASK", 0x5040},
+ {"linux/soundcard.h", "SNDCTL_DSP_BIND_CHANNEL", 0x5041},
+ {"linux/soundcard.h", "SNDCTL_DSP_SETSPDIF", 0x5042},
+ {"linux/soundcard.h", "SNDCTL_DSP_GETSPDIF", 0x5043},
+ {"linux/soundcard.h", "SNDCTL_SEQ_RESET", 0x5100},
+ {"linux/soundcard.h", "SNDCTL_SEQ_SYNC", 0x5101},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_INFO", 0x5102},
+ {"linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", 0x5103},
+ {"linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", 0x5104},
+ {"linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", 0x5105},
+ {"linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", 0x5106},
+ {"linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", 0x5107},
+ {"linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", 0x5108},
+ {"linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", 0x5109},
+ {"linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", 0x510a},
+ {"linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", 0x510b},
+ {"linux/soundcard.h", "SNDCTL_MIDI_INFO", 0x510c},
+ {"linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", 0x510d},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", 0x510e},
+ {"linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", 0x510f},
+ {"linux/soundcard.h", "SNDCTL_SEQ_PANIC", 0x5111},
+ {"linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", 0x5112},
+ {"linux/soundcard.h", "SNDCTL_SEQ_GETTIME", 0x5113},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_ID", 0x5114},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_CONTROL", 0x5115},
+ {"linux/soundcard.h", "SNDCTL_SYNTH_REMOVESAMPLE", 0x5116},
+ {"linux/random.h", "RNDGETENTCNT", 0x5200},
+ {"linux/random.h", "RNDADDTOENTCNT", 0x5201},
+ {"linux/random.h", "RNDGETPOOL", 0x5202},
+ {"linux/random.h", "RNDADDENTROPY", 0x5203},
+ {"linux/random.h", "RNDZAPENTCNT", 0x5204},
+ {"linux/random.h", "RNDCLEARPOOL", 0x5206},
+ {"asm/ioctls.h", "TCGETS", 0x5401},
+ {"linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", 0x5401},
+ {"asm/ioctls.h", "TCSETS", 0x5402},
+ {"linux/soundcard.h", "SNDCTL_TMR_START", 0x5402},
+ {"asm/ioctls.h", "TCSETSW", 0x5403},
+ {"linux/soundcard.h", "SNDCTL_TMR_STOP", 0x5403},
+ {"asm/ioctls.h", "TCSETSF", 0x5404},
+ {"linux/soundcard.h", "SNDCTL_TMR_CONTINUE", 0x5404},
+ {"asm/ioctls.h", "TCGETA", 0x5405},
+ {"linux/soundcard.h", "SNDCTL_TMR_TEMPO", 0x5405},
+ {"asm/ioctls.h", "TCSETA", 0x5406},
+ {"linux/soundcard.h", "SNDCTL_TMR_SOURCE", 0x5406},
+ {"asm/ioctls.h", "TCSETAW", 0x5407},
+ {"linux/soundcard.h", "SNDCTL_TMR_METRONOME", 0x5407},
+ {"asm/ioctls.h", "TCSETAF", 0x5408},
+ {"linux/soundcard.h", "SNDCTL_TMR_SELECT", 0x5408},
+ {"asm/ioctls.h", "TCSBRK", 0x5409},
+ {"asm/ioctls.h", "TCXONC", 0x540a},
+ {"asm/ioctls.h", "TCFLSH", 0x540b},
+ {"asm/ioctls.h", "TIOCEXCL", 0x540c},
+ {"asm/ioctls.h", "TIOCNXCL", 0x540d},
+ {"asm/ioctls.h", "TIOCSCTTY", 0x540e},
+ {"asm/ioctls.h", "TIOCGPGRP", 0x540f},
+ {"asm/ioctls.h", "TIOCSPGRP", 0x5410},
+ {"asm/ioctls.h", "TIOCOUTQ", 0x5411},
+ {"asm/ioctls.h", "TIOCSTI", 0x5412},
+ {"asm/ioctls.h", "TIOCGWINSZ", 0x5413},
+ {"asm/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/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/ioctls.h", "FIONBIO", 0x5421},
+ {"asm/ioctls.h", "TIOCNOTTY", 0x5422},
+ {"asm/ioctls.h", "TIOCSETD", 0x5423},
+ {"asm/ioctls.h", "TIOCGETD", 0x5424},
+ {"asm/ioctls.h", "TCSBRKP", 0x5425},
+ {"asm/ioctls.h", "TIOCTTYGSTRUCT", 0x5426},
+ {"asm/ioctls.h", "TIOCSBRK", 0x5427},
+ {"asm/ioctls.h", "TIOCCBRK", 0x5428},
+ {"asm/ioctls.h", "TIOCGSID", 0x5429},
+ {"asm/ioctls.h", "TIOCGPTN", 0x5430},
+ {"asm/ioctls.h", "TIOCSPTLCK", 0x5431},
+ {"asm/ioctls.h", "FIONCLEX", 0x5450},
+ {"asm/ioctls.h", "FIOCLEX", 0x5451},
+ {"asm/ioctls.h", "FIOASYNC", 0x5452},
+ {"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
+ {"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
+ {"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
+ {"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
+ {"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
+ {"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
+ {"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
+ {"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
+ {"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
+ {"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
+ {"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
+ {"asm/ioctls.h", "TIOCGHAYESESP", 0x545e},
+ {"asm/ioctls.h", "TIOCSHAYESESP", 0x545f},
+ {"linux/if_tun.h", "TUNSETNOCSUM", 0x54c8},
+ {"linux/if_tun.h", "TUNSETDEBUG", 0x54c9},
+ {"linux/if_tun.h", "TUNSETIFF", 0x54ca},
+ {"linux/if_tun.h", "TUNSETPERSIST", 0x54cb},
+ {"linux/if_tun.h", "TUNSETOWNER", 0x54cc},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CONTROL", 0x5500},
+ {"linux/usbdevice_fs.h", "USBDEVFS_BULK", 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_DISCARDURB", 0x550b},
+ {"linux/usbdevice_fs.h", "USBDEVFS_REAPURB", 0x550c},
+ {"linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY", 0x550d},
+ {"linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", 0x550e},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CLAIMINTERFACE", 0x550f},
+ {"linux/usbdevice_fs.h", "USBDEVFS_RELEASEINTERFACE", 0x5510},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CONNECTINFO", 0x5511},
+ {"linux/usbdevice_fs.h", "USBDEVFS_IOCTL", 0x5512},
+ {"linux/usbdevice_fs.h", "USBDEVFS_HUB_PORTINFO", 0x5513},
+ {"linux/usbdevice_fs.h", "USBDEVFS_RESET", 0x5514},
+ {"linux/usbdevice_fs.h", "USBDEVFS_CLEAR_HALT", 0x5515},
+ {"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x5700},
+ {"linux/watchdog.h", "WDIOC_GETSTATUS", 0x5701},
+ {"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x5702},
+ {"linux/watchdog.h", "WDIOC_GETTEMP", 0x5703},
+ {"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x5704},
+ {"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x5705},
+ {"linux/watchdog.h", "WDIOC_SETTIMEOUT", 0x5706},
+ {"linux/watchdog.h", "WDIOC_GETTIMEOUT", 0x5707},
+ {"linux/ite_gpio.h", "ITE_GPIO_IN", 0x5a00},
+ {"linux/ite_gpio.h", "ITE_GPIO_OUT", 0x5a01},
+ {"linux/ite_gpio.h", "ITE_GPIO_INT_CTRL", 0x5a02},
+ {"linux/ite_gpio.h", "ITE_GPIO_IN_STATUS", 0x5a03},
+ {"linux/ite_gpio.h", "ITE_GPIO_OUT_STATUS", 0x5a04},
+ {"linux/ite_gpio.h", "ITE_GPIO_GEN_CTRL", 0x5a05},
+ {"linux/ite_gpio.h", "ITE_GPIO_INT_WAIT", 0x5a06},
+ {"linux/sonet.h", "SONET_GETSTAT", 0x6110},
+ {"linux/sonet.h", "SONET_GETSTATZ", 0x6111},
+ {"linux/sonet.h", "SONET_SETDIAG", 0x6112},
+ {"linux/sonet.h", "SONET_CLRDIAG", 0x6113},
+ {"linux/sonet.h", "SONET_GETDIAG", 0x6114},
+ {"linux/sonet.h", "SONET_SETFRAMING", 0x6115},
+ {"linux/sonet.h", "SONET_GETFRAMING", 0x6116},
+ {"linux/sonet.h", "SONET_GETFRSENSE", 0x6117},
+ {"linux/atm_idt77105.h", "IDT77105_GETSTAT", 0x6132},
+ {"linux/atm_idt77105.h", "IDT77105_GETSTATZ", 0x6133},
+ {"linux/atmdev.h", "ATM_GETSTAT", 0x6150},
+ {"linux/atmdev.h", "ATM_GETSTATZ", 0x6151},
+ {"linux/atmdev.h", "ATM_GETLOOP", 0x6152},
+ {"linux/atmdev.h", "ATM_SETLOOP", 0x6153},
+ {"linux/atmdev.h", "ATM_QUERYLOOP", 0x6154},
+ {"linux/atm_eni.h", "ENI_MEMDUMP", 0x6160},
+ {"linux/atm_nicstar.h", "NS_GETPSTAT", 0x6161},
+ {"linux/atm_zatm.h", "ZATM_GETPOOL", 0x6161},
+ {"linux/atm_nicstar.h", "NS_SETBUFLEV", 0x6162},
+ {"linux/atm_zatm.h", "ZATM_GETPOOLZ", 0x6162},
+ {"linux/atm_nicstar.h", "NS_ADJBUFLEV", 0x6163},
+ {"linux/atm_zatm.h", "ZATM_SETPOOL", 0x6163},
+ {"linux/atm_zatm.h", "ZATM_GETTHIST", 0x6164},
+ {"linux/atm_eni.h", "ENI_SETMULT", 0x6167},
+ {"linux/atm_tcp.h", "SIOCSIFATMTCP", 0x6180},
+ {"linux/atmdev.h", "ATM_GETLINKRATE", 0x6181},
+ {"linux/atmdev.h", "ATM_GETNAMES", 0x6183},
+ {"linux/atmdev.h", "ATM_GETTYPE", 0x6184},
+ {"linux/atmdev.h", "ATM_GETESI", 0x6185},
+ {"linux/atmdev.h", "ATM_GETADDR", 0x6186},
+ {"linux/atmdev.h", "ATM_RSTADDR", 0x6187},
+ {"linux/atmdev.h", "ATM_ADDADDR", 0x6188},
+ {"linux/atmdev.h", "ATM_DELADDR", 0x6189},
+ {"linux/atmdev.h", "ATM_GETCIRANGE", 0x618a},
+ {"linux/atmdev.h", "ATM_SETCIRANGE", 0x618b},
+ {"linux/atmdev.h", "ATM_SETESI", 0x618c},
+ {"linux/atmdev.h", "ATM_SETESIF", 0x618d},
+ {"linux/atm_tcp.h", "ATMTCP_CREATE", 0x618e},
+ {"linux/atm_tcp.h", "ATMTCP_REMOVE", 0x618f},
+ {"linux/atmlec.h", "ATMLEC_CTRL", 0x61d0},
+ {"linux/atmlec.h", "ATMLEC_DATA", 0x61d1},
+ {"linux/atmlec.h", "ATMLEC_MCAST", 0x61d2},
+ {"linux/atmmpc.h", "ATMMPC_CTRL", 0x61d8},
+ {"linux/atmmpc.h", "ATMMPC_DATA", 0x61d9},
+ {"linux/atmclip.h", "SIOCMKCLIP", 0x61e0},
+ {"linux/atmarp.h", "ATMARPD_CTRL", 0x61e1},
+ {"linux/atmarp.h", "ATMARP_MKIP", 0x61e2},
+ {"linux/atmarp.h", "ATMARP_SETENTRY", 0x61e3},
+ {"linux/atmarp.h", "ATMARP_ENCAP", 0x61e5},
+ {"linux/atmsvc.h", "ATMSIGD_CTRL", 0x61f0},
+ {"linux/atmdev.h", "ATM_SETSC", 0x61f1},
+ {"linux/atmdev.h", "ATM_SETBACKEND", 0x61f2},
+ {"linux/coda.h", "CIOC_KERNEL_VERSION", 0x630a},
+ {"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/devfs_fs.h", "DEVFSDIOC_GET_PROTO_REV", 0x6400},
+ {"linux/video_decoder.h", "DECODER_GET_CAPABILITIES", 0x6401},
+ {"linux/devfs_fs.h", "DEVFSDIOC_SET_EVENT_MASK", 0x6402},
+ {"linux/video_decoder.h", "DECODER_GET_STATUS", 0x6402},
+ {"linux/devfs_fs.h", "DEVFSDIOC_RELEASE_EVENT_QUEUE", 0x6403},
+ {"linux/video_decoder.h", "DECODER_SET_NORM", 0x6403},
+ {"linux/devfs_fs.h", "DEVFSDIOC_SET_DEBUG_MASK", 0x6404},
+ {"linux/video_decoder.h", "DECODER_SET_INPUT", 0x6404},
+ {"linux/video_decoder.h", "DECODER_SET_OUTPUT", 0x6405},
+ {"linux/video_decoder.h", "DECODER_ENABLE_OUTPUT", 0x6406},
+ {"linux/video_decoder.h", "DECODER_SET_PICTURE", 0x6407},
+ {"linux/video_decoder.h", "DECODER_DUMP", 0x64c0},
+ {"linux/video_encoder.h", "ENCODER_GET_CAPABILITIES", 0x6501},
+ {"linux/video_encoder.h", "ENCODER_SET_NORM", 0x6502},
+ {"linux/video_encoder.h", "ENCODER_SET_INPUT", 0x6503},
+ {"linux/video_encoder.h", "ENCODER_SET_OUTPUT", 0x6504},
+ {"linux/video_encoder.h", "ENCODER_ENABLE_OUTPUT", 0x6505},
+ {"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x6601},
+ {"linux/ext3_fs.h", "EXT3_IOC_GETFLAGS", 0x6601},
+ {"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x6602},
+ {"linux/ext3_fs.h", "EXT3_IOC_SETFLAGS", 0x6602},
+ {"linux/ext3_fs.h", "EXT3_IOC_GETVERSION", 0x6603},
+ {"linux/ext3_fs.h", "EXT3_IOC_SETVERSION", 0x6604},
+ {"linux/ext3_fs.h", "EXT3_IOC_WAIT_FOR_READONLY", 0x6663},
+ {"linux/i2o-dev.h", "I2OGETIOPS", 0x6900},
+ {"linux/i2o-dev.h", "I2OHRTGET", 0x6901},
+ {"linux/i2o-dev.h", "I2OLCTGET", 0x6902},
+ {"linux/i2o-dev.h", "I2OPARMSET", 0x6903},
+ {"linux/i2o-dev.h", "I2OPARMGET", 0x6904},
+ {"linux/i2o-dev.h", "I2OSWDL", 0x6905},
+ {"linux/i2o-dev.h", "I2OSWUL", 0x6906},
+ {"linux/i2o-dev.h", "I2OSWDEL", 0x6907},
+ {"linux/i2o-dev.h", "I2OVALIDATE", 0x6908},
+ {"linux/i2o-dev.h", "I2OHTML", 0x6909},
+ {"linux/i2o-dev.h", "I2OEVTREG", 0x690a},
+ {"linux/i2o-dev.h", "I2OEVTGET", 0x690b},
+ {"linux/i8k.h", "I8K_BIOS_VERSION", 0x6980},
+ {"linux/i8k.h", "I8K_MACHINE_ID", 0x6981},
+ {"linux/i8k.h", "I8K_POWER_STATUS", 0x6982},
+ {"linux/i8k.h", "I8K_FN_STATUS", 0x6983},
+ {"linux/i8k.h", "I8K_GET_TEMP", 0x6984},
+ {"linux/i8k.h", "I8K_GET_SPEED", 0x6985},
+ {"linux/i8k.h", "I8K_GET_FAN", 0x6986},
+ {"linux/i8k.h", "I8K_SET_FAN", 0x6987},
+ {"linux/joystick.h", "JSIOCGVERSION", 0x6a01},
+ {"linux/joystick.h", "JSIOCGAXES", 0x6a11},
+ {"linux/joystick.h", "JSIOCGBUTTONS", 0x6a12},
+ {"linux/joystick.h", "JSIOCSCORR", 0x6a21},
+ {"linux/joystick.h", "JSIOCGCORR", 0x6a22},
+ {"linux/joystick.h", "JSIOCSAXMAP", 0x6a31},
+ {"linux/joystick.h", "JSIOCGAXMAP", 0x6a32},
+ {"linux/joystick.h", "JSIOCSBTNMAP", 0x6a33},
+ {"linux/joystick.h", "JSIOCGBTNMAP", 0x6a34},
+ {"linux/udf_fs_i.h", "UDF_GETEASIZE", 0x6c40},
+ {"linux/udf_fs_i.h", "UDF_GETEABLOCK", 0x6c41},
+ {"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x6c42},
+ {"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0x6c43},
+ {"linux/soundcard.h", "SNDCTL_MIDI_PRETIME", 0x6d00},
+ {"linux/synclink.h", "MGSL_IOCSPARAMS", 0x6d00},
+ {"linux/mtio.h", "MTIOCTOP", 0x6d01},
+ {"linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", 0x6d01},
+ {"linux/synclink.h", "MGSL_IOCGPARAMS", 0x6d01},
+ {"linux/mtio.h", "MTIOCGET", 0x6d02},
+ {"linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", 0x6d02},
+ {"linux/synclink.h", "MGSL_IOCSTXIDLE", 0x6d02},
+ {"linux/mtio.h", "MTIOCPOS", 0x6d03},
+ {"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03},
+ {"linux/mtio.h", "MTIOCGETCONFIG", 0x6d04},
+ {"linux/synclink.h", "MGSL_IOCTXENABLE", 0x6d04},
+ {"linux/mtio.h", "MTIOCSETCONFIG", 0x6d05},
+ {"linux/synclink.h", "MGSL_IOCRXENABLE", 0x6d05},
+ {"linux/mtio.h", "MTIOCRDFTSEG", 0x6d06},
+ {"linux/synclink.h", "MGSL_IOCTXABORT", 0x6d06},
+ {"linux/mtio.h", "MTIOCWRFTSEG", 0x6d07},
+ {"linux/synclink.h", "MGSL_IOCGSTATS", 0x6d07},
+ {"linux/mtio.h", "MTIOCVOLINFO", 0x6d08},
+ {"linux/synclink.h", "MGSL_IOCWAITEVENT", 0x6d08},
+ {"linux/mtio.h", "MTIOCGETSIZE", 0x6d09},
+ {"linux/synclink.h", "MGSL_IOCLOOPTXDONE", 0x6d09},
+ {"linux/mtio.h", "MTIOCFTFORMAT", 0x6d0a},
+ {"linux/mtio.h", "MTIOCFTCMD", 0x6d0b},
+ {"linux/synclink.h", "MGSL_IOCCLRMODCOUNT", 0x6d0f},
+ {"linux/zftape.h", "MTIOC_ZFTAPE_GETBLKSZ", 0x6d68},
+ {"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x6e01},
+ {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x6e02},
+ {"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", 0x6e02},
+ {"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03},
+ {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0x6e04},
+ {"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", 0x6e04},
+ {"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x6e05},
+ {"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x6e06},
+ {"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x6e06},
+ {"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x6e07},
+ {"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x6e08},
+ {"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x6e08},
+ {"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0x6e09},
+ {"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x6e09},
+ {"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0x6e0a},
+ {"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x6e0a},
+ {"linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", 0x6e0b},
+ {"linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", 0x6e0b},
+ {"linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", 0x6e0c},
+ {"linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", 0x6e0c},
+ {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", 0x6ef8},
+ {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", 0x6ef8},
+ {"linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", 0x6ef9},
+ {"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", 0x6efa},
+ {"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", 0x6efa},
+ {"linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", 0x6efb},
+ {"linux/rtc.h", "RTC_AIE_ON", 0x7001},
+ {"linux/rtc.h", "RTC_AIE_OFF", 0x7002},
+ {"linux/intermezzo_fs.h", "PRESTO_GETMOUNT", 0x7003},
+ {"linux/rtc.h", "RTC_UIE_ON", 0x7003},
+ {"linux/intermezzo_fs.h", "PRESTO_SETPID", 0x7004},
+ {"linux/rtc.h", "RTC_UIE_OFF", 0x7004},
+ {"linux/rtc.h", "RTC_PIE_ON", 0x7005},
+ {"linux/intermezzo_fs.h", "PRESTO_CLOSE_JOURNALF", 0x7006},
+ {"linux/rtc.h", "RTC_PIE_OFF", 0x7006},
+ {"linux/intermezzo_fs.h", "PRESTO_SET_FSETROOT", 0x7007},
+ {"linux/rtc.h", "RTC_ALM_SET", 0x7007},
+ {"linux/intermezzo_fs.h", "PRESTO_CLEAR_FSETROOT", 0x7008},
+ {"linux/rtc.h", "RTC_ALM_READ", 0x7008},
+ {"linux/intermezzo_fs.h", "PRESTO_SETOPT", 0x7009},
+ {"linux/rtc.h", "RTC_RD_TIME", 0x7009},
+ {"linux/intermezzo_fs.h", "PRESTO_GETOPT", 0x700a},
+ {"linux/rtc.h", "RTC_SET_TIME", 0x700a},
+ {"linux/intermezzo_fs.h", "PRESTO_GET_KMLSIZE", 0x700b},
+ {"linux/rtc.h", "RTC_IRQP_READ", 0x700b},
+ {"linux/intermezzo_fs.h", "PRESTO_GET_RECNO", 0x700c},
+ {"linux/rtc.h", "RTC_IRQP_SET", 0x700c},
+ {"linux/rtc.h", "RTC_EPOCH_READ", 0x700d},
+ {"linux/rtc.h", "RTC_EPOCH_SET", 0x700e},
+ {"linux/rtc.h", "RTC_WIE_ON", 0x700f},
+ {"linux/rtc.h", "RTC_WKALM_SET", 0x700f},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_SETATTR", 0x7010},
+ {"linux/rtc.h", "RTC_WIE_OFF", 0x7010},
+ {"linux/rtc.h", "RTC_WKALM_RD", 0x7010},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_CREATE", 0x7011},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_LINK", 0x7012},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_UNLINK", 0x7013},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_SYMLINK", 0x7014},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_MKDIR", 0x7015},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_RMDIR", 0x7016},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_MKNOD", 0x7017},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_RENAME", 0x7018},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_CLOSE", 0x701a},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_IOPEN", 0x701b},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_SETEXTATTR", 0x701c},
+ {"linux/intermezzo_fs.h", "PRESTO_VFS_DELEXTATTR", 0x701d},
+ {"linux/intermezzo_fs.h", "PRESTO_MARK", 0x7020},
+ {"linux/intermezzo_fs.h", "PRESTO_RELEASE_PERMIT", 0x7021},
+ {"linux/intermezzo_fs.h", "PRESTO_CLEAR_ALL_FSETROOTS", 0x7022},
+ {"linux/intermezzo_fs.h", "PRESTO_BACKFETCH_LML", 0x7023},
+ {"linux/intermezzo_fs.h", "PRESTO_REINT", 0x7024},
+ {"linux/intermezzo_fs.h", "PRESTO_CANCEL_LML", 0x7025},
+ {"linux/intermezzo_fs.h", "PRESTO_RESET_FSET", 0x7026},
+ {"linux/intermezzo_fs.h", "PRESTO_COMPLETE_CLOSES", 0x7027},
+ {"linux/intermezzo_fs.h", "PRESTO_REINT_BEGIN", 0x7030},
+ {"linux/intermezzo_fs.h", "PRESTO_DO_REINT", 0x7031},
+ {"linux/intermezzo_fs.h", "PRESTO_REINT_END", 0x7032},
+ {"linux/nvram.h", "NVRAM_INIT", 0x7040},
+ {"linux/nvram.h", "NVRAM_SETCKS", 0x7041},
+ {"linux/ppdev.h", "PPSETMODE", 0x7080},
+ {"linux/ppdev.h", "PPRSTATUS", 0x7081},
+ {"linux/ppdev.h", "PPRCONTROL", 0x7083},
+ {"linux/ppdev.h", "PPWCONTROL", 0x7084},
+ {"linux/ppdev.h", "PPRDATA", 0x7085},
+ {"linux/ppdev.h", "PPWDATA", 0x7086},
+ {"linux/ppdev.h", "PPCLAIM", 0x708b},
+ {"linux/ppdev.h", "PPRELEASE", 0x708c},
+ {"linux/ppdev.h", "PPYIELD", 0x708d},
+ {"linux/ppdev.h", "PPFCONTROL", 0x708e},
+ {"linux/ppdev.h", "PPEXCL", 0x708f},
+ {"linux/ppdev.h", "PPDATADIR", 0x7090},
+ {"linux/ppdev.h", "PPNEGOT", 0x7091},
+ {"linux/ppdev.h", "PPWCTLONIRQ", 0x7092},
+ {"linux/ppdev.h", "PPCLRIRQ", 0x7093},
+ {"linux/ppdev.h", "PPSETPHASE", 0x7094},
+ {"linux/ppdev.h", "PPGETTIME", 0x7095},
+ {"linux/ppdev.h", "PPSETTIME", 0x7096},
+ {"linux/ppdev.h", "PPGETMODES", 0x7097},
+ {"linux/ppdev.h", "PPGETMODE", 0x7098},
+ {"linux/ppdev.h", "PPGETPHASE", 0x7099},
+ {"linux/ppdev.h", "PPGETFLAGS", 0x709a},
+ {"linux/ppdev.h", "PPSETFLAGS", 0x709b},
+ {"linux/serio.h", "SPIOCSTYPE", 0x7101},
+ {"linux/telephony.h", "PHONE_CAPABILITIES", 0x7180},
+ {"linux/telephony.h", "PHONE_CAPABILITIES_LIST", 0x7181},
+ {"linux/telephony.h", "PHONE_CAPABILITIES_CHECK", 0x7182},
+ {"linux/telephony.h", "PHONE_RING", 0x7183},
+ {"linux/telephony.h", "PHONE_HOOKSTATE", 0x7184},
+ {"linux/telephony.h", "PHONE_MAXRINGS", 0x7185},
+ {"linux/telephony.h", "PHONE_RING_CADENCE", 0x7186},
+ {"linux/telephony.h", "OLD_PHONE_RING_START", 0x7187},
+ {"linux/telephony.h", "PHONE_RING_START", 0x7187},
+ {"linux/telephony.h", "PHONE_RING_STOP", 0x7188},
+ {"linux/telephony.h", "PHONE_REC_CODEC", 0x7189},
+ {"linux/telephony.h", "PHONE_REC_START", 0x718a},
+ {"linux/telephony.h", "PHONE_REC_STOP", 0x718b},
+ {"linux/telephony.h", "PHONE_REC_DEPTH", 0x718c},
+ {"linux/telephony.h", "PHONE_FRAME", 0x718d},
+ {"linux/telephony.h", "PHONE_REC_VOLUME", 0x718e},
+ {"linux/telephony.h", "PHONE_REC_LEVEL", 0x718f},
+ {"linux/telephony.h", "PHONE_PLAY_CODEC", 0x7190},
+ {"linux/telephony.h", "PHONE_PLAY_START", 0x7191},
+ {"linux/telephony.h", "PHONE_PLAY_STOP", 0x7192},
+ {"linux/telephony.h", "PHONE_PLAY_DEPTH", 0x7193},
+ {"linux/telephony.h", "PHONE_PLAY_VOLUME", 0x7194},
+ {"linux/telephony.h", "PHONE_PLAY_LEVEL", 0x7195},
+ {"linux/telephony.h", "PHONE_DTMF_READY", 0x7196},
+ {"linux/telephony.h", "PHONE_GET_DTMF", 0x7197},
+ {"linux/telephony.h", "PHONE_GET_DTMF_ASCII", 0x7198},
+ {"linux/telephony.h", "PHONE_DTMF_OOB", 0x7199},
+ {"linux/telephony.h", "PHONE_EXCEPTION", 0x719a},
+ {"linux/telephony.h", "PHONE_PLAY_TONE", 0x719b},
+ {"linux/telephony.h", "PHONE_SET_TONE_ON_TIME", 0x719c},
+ {"linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", 0x719d},
+ {"linux/telephony.h", "PHONE_GET_TONE_ON_TIME", 0x719e},
+ {"linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", 0x719f},
+ {"linux/telephony.h", "PHONE_GET_TONE_STATE", 0x71a0},
+ {"linux/telephony.h", "PHONE_BUSY", 0x71a1},
+ {"linux/telephony.h", "PHONE_RINGBACK", 0x71a2},
+ {"linux/telephony.h", "PHONE_DIALTONE", 0x71a3},
+ {"linux/telephony.h", "PHONE_CPT_STOP", 0x71a4},
+ {"linux/telephony.h", "PHONE_PSTN_SET_STATE", 0x71a4},
+ {"linux/telephony.h", "PHONE_PSTN_GET_STATE", 0x71a5},
+ {"linux/telephony.h", "PHONE_WINK_DURATION", 0x71a6},
+ {"linux/telephony.h", "PHONE_QUERY_CODEC", 0x71a7},
+ {"linux/telephony.h", "PHONE_PSTN_LINETEST", 0x71a8},
+ {"linux/telephony.h", "PHONE_VAD", 0x71a9},
+ {"linux/telephony.h", "PHONE_WINK", 0x71aa},
+ {"linux/ixjuser.h", "IXJCTL_DSP_RESET", 0x71c0},
+ {"linux/ixjuser.h", "IXJCTL_CARDTYPE", 0x71c1},
+ {"linux/ixjuser.h", "IXJCTL_SERIAL", 0x71c2},
+ {"linux/ixjuser.h", "IXJCTL_DSP_TYPE", 0x71c3},
+ {"linux/ixjuser.h", "IXJCTL_DSP_VERSION", 0x71c4},
+ {"linux/ixjuser.h", "IXJCTL_DSP_IDLE", 0x71c5},
+ {"linux/ixjuser.h", "IXJCTL_TESTRAM", 0x71c6},
+ {"linux/ixjuser.h", "IXJCTL_SET_FILTER", 0x71c7},
+ {"linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", 0x71c8},
+ {"linux/ixjuser.h", "IXJCTL_INIT_TONE", 0x71c9},
+ {"linux/ixjuser.h", "IXJCTL_TONE_CADENCE", 0x71ca},
+ {"linux/ixjuser.h", "IXJCTL_AEC_START", 0x71cb},
+ {"linux/ixjuser.h", "IXJCTL_AEC_STOP", 0x71cc},
+ {"linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", 0x71cd},
+ {"linux/ixjuser.h", "IXJCTL_SET_LED", 0x71ce},
+ {"linux/ixjuser.h", "IXJCTL_MIXER", 0x71cf},
+ {"linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", 0x71d0},
+ {"linux/ixjuser.h", "IXJCTL_PORT", 0x71d1},
+ {"linux/ixjuser.h", "IXJCTL_DAA_AGAIN", 0x71d2},
+ {"linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", 0x71d3},
+ {"linux/ixjuser.h", "IXJCTL_CID", 0x71d4},
+ {"linux/ixjuser.h", "IXJCTL_POTS_PSTN", 0x71d5},
+ {"linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", 0x71d6},
+ {"linux/ixjuser.h", "IXJCTL_PLAY_CID", 0x71d7},
+ {"linux/ixjuser.h", "IXJCTL_VMWI", 0x71d8},
+ {"linux/ixjuser.h", "IXJCTL_CIDCW", 0x71d9},
+ {"linux/ixjuser.h", "IXJCTL_VERSION", 0x71da},
+ {"linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", 0x71db},
+ {"linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", 0x71dc},
+ {"linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", 0x71dd},
+ {"linux/ixjuser.h", "IXJCTL_HZ", 0x71e0},
+ {"linux/ixjuser.h", "IXJCTL_RATE", 0x71e1},
+ {"linux/ixjuser.h", "IXJCTL_FRAMES_READ", 0x71e2},
+ {"linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", 0x71e3},
+ {"linux/ixjuser.h", "IXJCTL_READ_WAIT", 0x71e4},
+ {"linux/ixjuser.h", "IXJCTL_WRITE_WAIT", 0x71e5},
+ {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", 0x71e6},
+ {"linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", 0x71e7},
+ {"linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", 0x71e8},
+ {"linux/ixjuser.h", "IXJCTL_SIGCTL", 0x71e9},
+ {"linux/ixjuser.h", "IXJCTL_SC_RXG", 0x71ea},
+ {"linux/ixjuser.h", "IXJCTL_SC_TXG", 0x71eb},
+ {"linux/ixjuser.h", "IXJCTL_INTERCOM_START", 0x71fd},
+ {"linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", 0x71fe},
+ {"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x7201},
+ {"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x7202},
+ {"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", "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/jffs.h", "JFFS_PRINT_HASH", 0x745a},
+ {"linux/jffs.h", "JFFS_PRINT_TREE", 0x745b},
+ {"linux/jffs.h", "JFFS_GET_STATUS", 0x745c},
+ {"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0x7480},
+ {"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x7481},
+ {"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x7482},
+ {"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x7483},
+ {"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x7484},
+ {"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x7485},
+ {"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x7486},
+ {"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x7487},
+ {"linux/isdn_ppp.h", "PPPIOCGIFNAME", 0x7488},
+ {"linux/toshiba.h", "TOSH_SMM", 0x7490},
+ {"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x7501},
+ {"linux/smb_fs.h", "SMB_IOC_NEWCONN", 0x7502},
+ {"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID32", 0x7503},
+ {"linux/sonypi.h", "SONYPI_IOCGBRT", 0x7600},
+ {"linux/sonypi.h", "SONYPI_IOCSBRT", 0x7600},
+ {"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x7601},
+ {"linux/ext3_fs.h", "EXT3_IOC_GETVERSION_OLD", 0x7601},
+ {"linux/videodev.h", "VIDIOCGCAP", 0x7601},
+ {"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x7602},
+ {"linux/ext3_fs.h", "EXT3_IOC_SETVERSION_OLD", 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/videodev.h", "VIDIOCSWIN", 0x760a},
+ {"linux/videodev.h", "VIDIOCGFBUF", 0x760b},
+ {"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},
+ {"linux/meye.h", "MEYEIOC_S_PARAMS", 0x76c1},
+ {"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x76c2},
+ {"linux/meye.h", "MEYEIOC_SYNC", 0x76c3},
+ {"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4},
+ {"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x76c5},
+ {"linux/dn.h", "SIOCSNETADDR", 0x89e0},
+ {"linux/dn.h", "OSIOCSNETADDR", 0x89e0},
+ {"linux/dn.h", "SIOCGNETADDR", 0x89e1},
+ {"linux/dn.h", "OSIOCGNETADDR", 0x89e1},
+ {"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x9360},
+ {"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x9361},
+ {"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_EXPIRE", 0x9365},
+ {"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x9366},
+ {"linux/nbd.h", "NBD_SET_SOCK", 0xab00},
+ {"linux/nbd.h", "NBD_SET_BLKSIZE", 0xab01},
+ {"linux/nbd.h", "NBD_SET_SIZE", 0xab02},
+ {"linux/nbd.h", "NBD_DO_IT", 0xab03},
+ {"linux/nbd.h", "NBD_CLEAR_SOCK", 0xab04},
+ {"linux/nbd.h", "NBD_CLEAR_QUE", 0xab05},
+ {"linux/nbd.h", "NBD_PRINT_DEBUG", 0xab06},
+ {"linux/nbd.h", "NBD_SET_SIZE_BLOCKS", 0xab07},
+ {"linux/nbd.h", "NBD_DISCONNECT", 0xab08},
+ {"linux/raw.h", "RAW_SETBIND", 0xac00},
+ {"linux/raw.h", "RAW_GETBIND", 0xac01},
+ {"linux/if_pppox.h", "PPPOEIOCSFWD", 0xb100},
+ {"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101},
+ {"linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", 0xcd01},
+ {"linux/lvm.h", "VG_CREATE_OLD", 0xfe00},
+ {"linux/lvm.h", "VG_REMOVE", 0xfe01},
+ {"linux/lvm.h", "VG_EXTEND", 0xfe03},
+ {"linux/lvm.h", "VG_REDUCE", 0xfe04},
+ {"linux/lvm.h", "VG_STATUS", 0xfe05},
+ {"linux/lvm.h", "VG_STATUS_GET_COUNT", 0xfe06},
+ {"linux/lvm.h", "VG_STATUS_GET_NAMELIST", 0xfe07},
+ {"linux/lvm.h", "VG_SET_EXTENDABLE", 0xfe08},
+ {"linux/lvm.h", "VG_RENAME", 0xfe09},
+ {"linux/lvm.h", "VG_CREATE", 0xfe0a},
+ {"linux/lvm.h", "LV_CREATE", 0xfe20},
+ {"linux/lvm.h", "LV_REMOVE", 0xfe21},
+ {"linux/lvm.h", "LV_ACTIVATE", 0xfe22},
+ {"linux/lvm.h", "LV_DEACTIVATE", 0xfe23},
+ {"linux/lvm.h", "LV_EXTEND", 0xfe24},
+ {"linux/lvm.h", "LV_REDUCE", 0xfe25},
+ {"linux/lvm.h", "LV_STATUS_BYNAME", 0xfe26},
+ {"linux/lvm.h", "LV_STATUS_BYINDEX", 0xfe27},
+ {"linux/lvm.h", "LV_SET_ACCESS", 0xfe28},
+ {"linux/lvm.h", "LV_SET_ALLOCATION", 0xfe29},
+ {"linux/lvm.h", "LV_SET_STATUS", 0xfe2a},
+ {"linux/lvm.h", "LE_REMAP", 0xfe2b},
+ {"linux/lvm.h", "LV_SNAPSHOT_USE_RATE", 0xfe2c},
+ {"linux/lvm.h", "LV_STATUS_BYDEV", 0xfe2e},
+ {"linux/lvm.h", "LV_RENAME", 0xfe2f},
+ {"linux/lvm.h", "LV_BMAP", 0xfe30},
+ {"linux/lvm.h", "PV_STATUS", 0xfe40},
+ {"linux/lvm.h", "PV_CHANGE", 0xfe41},
+ {"linux/lvm.h", "PV_FLUSH", 0xfe42},
+ {"linux/lvm.h", "PE_LOCK_UNLOCK", 0xfe50},
+ {"linux/lvm.h", "LVM_GET_IOP_VERSION", 0xfe98},
+ {"linux/lvm.h", "LVM_RESET", 0xfe99},
+ {"linux/lvm.h", "LVM_LOCK_LVM", 0xff00},
diff --git a/linux/sparc64/signalent.h b/linux/sparc64/signalent.h
new file mode 100644
index 0000000..e059b5d
--- /dev/null
+++ b/linux/sparc64/signalent.h
@@ -0,0 +1,32 @@
+ "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 */
+ "SIGLOST", /* 29 */
+ "SIGUSR1", /* 30 */
+ "SIGUSR2", /* 31 */
diff --git a/linux/sparc64/signalent1.h b/linux/sparc64/signalent1.h
new file mode 100644
index 0000000..0f6314f
--- /dev/null
+++ b/linux/sparc64/signalent1.h
@@ -0,0 +1 @@
+#include "../sparc/signalent1.h"
diff --git a/linux/sparc64/signalent2.h b/linux/sparc64/signalent2.h
new file mode 100644
index 0000000..e059b5d
--- /dev/null
+++ b/linux/sparc64/signalent2.h
@@ -0,0 +1,32 @@
+ "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 */
+ "SIGLOST", /* 29 */
+ "SIGUSR1", /* 30 */
+ "SIGUSR2", /* 31 */
diff --git a/linux/sparc64/syscall1.h b/linux/sparc64/syscall1.h
new file mode 100644
index 0000000..6f30b74
--- /dev/null
+++ b/linux/sparc64/syscall1.h
@@ -0,0 +1,498 @@
+/*
+ * 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.
+ */
+
+#define SOLARIS_syscall 0
+#define SOLARIS_exit 1
+#define SOLARIS_fork 2
+#define SOLARIS_read 3
+#define SOLARIS_write 4
+#define SOLARIS_open 5
+#define SOLARIS_close 6
+#define SOLARIS_wait 7
+#define SOLARIS_creat 8
+#define SOLARIS_link 9
+#define SOLARIS_unlink 10
+#define SOLARIS_exec 11
+#define SOLARIS_chdir 12
+#define SOLARIS_time 13
+#define SOLARIS_mknod 14
+#define SOLARIS_chmod 15
+#define SOLARIS_chown 16
+#define SOLARIS_brk 17
+#define SOLARIS_stat 18
+#define SOLARIS_lseek 19
+#define SOLARIS_getpid 20
+#define SOLARIS_mount 21
+#define SOLARIS_umount 22
+#define SOLARIS_setuid 23
+#define SOLARIS_getuid 24
+#define SOLARIS_stime 25
+#define SOLARIS_ptrace 26
+#define SOLARIS_alarm 27
+#define SOLARIS_fstat 28
+#define SOLARIS_pause 29
+#define SOLARIS_utime 30
+#define SOLARIS_stty 31
+#define SOLARIS_gtty 32
+#define SOLARIS_access 33
+#define SOLARIS_nice 34
+#define SOLARIS_statfs 35
+#define SOLARIS_sync 36
+#define SOLARIS_kill 37
+#define SOLARIS_fstatfs 38
+#define SOLARIS_pgrpsys 39
+#define SOLARIS_xenix 40
+#define SOLARIS_dup 41
+#define SOLARIS_pipe 42
+#define SOLARIS_times 43
+#define SOLARIS_profil 44
+#define SOLARIS_plock 45
+#define SOLARIS_setgid 46
+#define SOLARIS_getgid 47
+#define SOLARIS_signal 48
+#define SOLARIS_msgsys 49
+#define SOLARIS_syssun 50
+#define SOLARIS_acct 51
+#define SOLARIS_shmsys 52
+#define SOLARIS_semsys 53
+#define SOLARIS_ioctl 54
+#define SOLARIS_uadmin 55
+#define SOLARIS_utssys 57
+#define SOLARIS_fdsync 58
+#define SOLARIS_execve 59
+#define SOLARIS_umask 60
+#define SOLARIS_chroot 61
+#define SOLARIS_fcntl 62
+#define SOLARIS_ulimit 63
+#define SOLARIS_rmdir 79
+#define SOLARIS_mkdir 80
+#define SOLARIS_getdents 81
+#define SOLARIS_sysfs 84
+#define SOLARIS_getmsg 85
+#define SOLARIS_putmsg 86
+#define SOLARIS_poll 87
+#define SOLARIS_lstat 88
+#define SOLARIS_symlink 89
+#define SOLARIS_readlink 90
+#define SOLARIS_setgroups 91
+#define SOLARIS_getgroups 92
+#define SOLARIS_fchmod 93
+#define SOLARIS_fchown 94
+#define SOLARIS_sigprocmask 95
+#define SOLARIS_sigsuspend 96
+#define SOLARIS_sigaltstack 97
+#define SOLARIS_sigaction 98
+#define SOLARIS_sigpending 99
+#define SOLARIS_context 100
+#define SOLARIS_evsys 101
+#define SOLARIS_evtrapret 102
+#define SOLARIS_statvfs 103
+#define SOLARIS_fstatvfs 104
+#define SOLARIS_nfssys 106
+#define SOLARIS_waitsys 107
+#define SOLARIS_sigsendsys 108
+#define SOLARIS_hrtsys 109
+#define SOLARIS_acancel 110
+#define SOLARIS_async 111
+#define SOLARIS_priocntlsys 112
+#define SOLARIS_pathconf 113
+#define SOLARIS_mincore 114
+#define SOLARIS_mmap 115
+#define SOLARIS_mprotect 116
+#define SOLARIS_munmap 117
+#define SOLARIS_fpathconf 118
+#define SOLARIS_vfork 119
+#define SOLARIS_fchdir 120
+#define SOLARIS_readv 121
+#define SOLARIS_writev 122
+#define SOLARIS_xstat 123
+#define SOLARIS_lxstat 124
+#define SOLARIS_fxstat 125
+#define SOLARIS_xmknod 126
+#define SOLARIS_clocal 127
+#define SOLARIS_setrlimit 128
+#define SOLARIS_getrlimit 129
+#define SOLARIS_lchown 130
+#define SOLARIS_memcntl 131
+#define SOLARIS_getpmsg 132
+#define SOLARIS_putpmsg 133
+#define SOLARIS_rename 134
+#define SOLARIS_uname 135
+#define SOLARIS_setegid 136
+#define SOLARIS_sysconfig 137
+#define SOLARIS_adjtime 138
+#define SOLARIS_systeminfo 139
+#define SOLARIS_seteuid 141
+#define SOLARIS_vtrace 142
+#define SOLARIS_fork1 143
+#define SOLARIS_sigtimedwait 144
+#define SOLARIS_lwp_info 145
+#define SOLARIS_yield 146
+#define SOLARIS_lwp_sema_wait 147
+#define SOLARIS_lwp_sema_post 148
+#define SOLARIS_modctl 152
+#define SOLARIS_fchroot 153
+#define SOLARIS_utimes 154
+#define SOLARIS_vhangup 155
+#define SOLARIS_gettimeofday 156
+#define SOLARIS_getitimer 157
+#define SOLARIS_setitimer 158
+#define SOLARIS_lwp_create 159
+#define SOLARIS_lwp_exit 160
+#define SOLARIS_lwp_suspend 161
+#define SOLARIS_lwp_continue 162
+#define SOLARIS_lwp_kill 163
+#define SOLARIS_lwp_self 164
+#define SOLARIS_lwp_setprivate 165
+#define SOLARIS_lwp_getprivate 166
+#define SOLARIS_lwp_wait 167
+#define SOLARIS_lwp_mutex_unlock 168
+#define SOLARIS_lwp_mutex_lock 169
+#define SOLARIS_lwp_cond_wait 170
+#define SOLARIS_lwp_cond_signal 171
+#define SOLARIS_lwp_cond_broadcast 172
+#define SOLARIS_pread 173
+#define SOLARIS_pwrite 174
+#define SOLARIS_llseek 175
+#define SOLARIS_inst_sync 176
+#define SOLARIS_kaio 178
+#define SOLARIS_tsolsys 184
+#define SOLARIS_acl 185
+#define SOLARIS_auditsys 186
+#define SOLARIS_processor_bind 187
+#define SOLARIS_processor_info 188
+#define SOLARIS_p_online 189
+#define SOLARIS_sigqueue 190
+#define SOLARIS_clock_gettime 191
+#define SOLARIS_clock_settime 192
+#define SOLARIS_clock_getres 193
+#define SOLARIS_timer_create 194
+#define SOLARIS_timer_delete 195
+#define SOLARIS_timer_settime 196
+#define SOLARIS_timer_gettime 197
+#define SOLARIS_timer_getoverrun 198
+#define SOLARIS_nanosleep 199
+#define SOLARIS_facl 200
+#define SOLARIS_door 201
+#define SOLARIS_setreuid 202
+#define SOLARIS_setregid 203
+#define SOLARIS_signotifywait 210
+#define SOLARIS_lwp_sigredirect 211
+#define SOLARIS_lwp_alarm 212
+
+#include "dummy2.h"
+
+extern int solaris_syscall();
+extern int solaris_exit();
+extern int solaris_fork();
+extern int solaris_read();
+extern int solaris_write();
+extern int solaris_open();
+extern int solaris_close();
+extern int solaris_wait();
+extern int solaris_creat();
+extern int solaris_link();
+extern int solaris_unlink();
+extern int solaris_exec();
+extern int solaris_chdir();
+extern int solaris_time();
+extern int solaris_mknod();
+extern int solaris_chmod();
+extern int solaris_chown();
+extern int solaris_brk();
+extern int solaris_stat();
+extern int solaris_lseek();
+extern int solaris_getpid();
+extern int solaris_mount();
+extern int solaris_umount();
+extern int solaris_setuid();
+extern int solaris_getuid();
+extern int solaris_stime();
+extern int solaris_ptrace();
+extern int solaris_alarm();
+extern int solaris_fstat();
+extern int solaris_pause();
+extern int solaris_utime();
+extern int solaris_stty();
+extern int solaris_gtty();
+extern int solaris_access();
+extern int solaris_nice();
+extern int solaris_statfs();
+extern int solaris_sync();
+extern int solaris_kill();
+extern int solaris_fstatfs();
+extern int solaris_pgrpsys();
+extern int solaris_setpgrp();
+extern int solaris_xenix();
+extern int solaris_syssgi();
+extern int solaris_dup();
+extern int solaris_pipe();
+extern int solaris_times();
+extern int solaris_profil();
+extern int solaris_plock();
+extern int solaris_setgid();
+extern int solaris_getgid();
+extern int solaris_sigcall();
+extern int solaris_msgsys();
+extern int solaris_syssun();
+extern int solaris_sysi86();
+extern int solaris_sysmips();
+extern int solaris_sysmachine();
+extern int solaris_acct();
+extern int solaris_shmsys();
+extern int solaris_semsys();
+extern int solaris_ioctl();
+extern int solaris_uadmin();
+extern int solaris_utssys();
+extern int solaris_fdsync();
+extern int solaris_execve();
+extern int solaris_umask();
+extern int solaris_chroot();
+extern int solaris_fcntl();
+extern int solaris_ulimit();
+extern int solaris_rmdir();
+extern int solaris_mkdir();
+extern int solaris_getdents();
+extern int solaris_sysfs();
+extern int solaris_getmsg();
+extern int solaris_putmsg();
+extern int solaris_poll();
+extern int solaris_lstat();
+extern int solaris_symlink();
+extern int solaris_readlink();
+extern int solaris_setgroups();
+extern int solaris_getgroups();
+extern int solaris_fchmod();
+extern int solaris_fchown();
+extern int solaris_sigprocmask();
+extern int solaris_sigsuspend();
+extern int solaris_sigaltstack();
+extern int solaris_sigaction();
+extern int solaris_spcall();
+extern int solaris_context();
+extern int solaris_evsys();
+extern int solaris_evtrapret();
+extern int solaris_statvfs();
+extern int solaris_fstatvfs();
+extern int solaris_nfssys();
+extern int solaris_waitid();
+extern int solaris_sigsendsys();
+extern int solaris_hrtsys();
+extern int solaris_acancel();
+extern int solaris_async();
+extern int solaris_priocntlsys();
+extern int solaris_pathconf();
+extern int solaris_mincore();
+extern int solaris_mmap();
+extern int solaris_mprotect();
+extern int solaris_munmap();
+extern int solaris_fpathconf();
+extern int solaris_vfork();
+extern int solaris_fchdir();
+extern int solaris_readv();
+extern int solaris_writev();
+extern int solaris_xstat();
+extern int solaris_lxstat();
+extern int solaris_fxstat();
+extern int solaris_xmknod();
+extern int solaris_clocal();
+extern int solaris_setrlimit();
+extern int solaris_getrlimit();
+extern int solaris_lchown();
+extern int solaris_memcntl();
+extern int solaris_getpmsg();
+extern int solaris_putpmsg();
+extern int solaris_rename();
+extern int solaris_uname();
+extern int solaris_setegid();
+extern int solaris_sysconfig();
+extern int solaris_adjtime();
+extern int solaris_sysinfo();
+extern int solaris_seteuid();
+extern int solaris_vtrace();
+extern int solaris_fork1();
+extern int solaris_sigtimedwait();
+extern int solaris_lwp_info();
+extern int solaris_yield();
+extern int solaris_lwp_sema_wait();
+extern int solaris_lwp_sema_post();
+extern int solaris_modctl();
+extern int solaris_fchroot();
+extern int solaris_utimes();
+extern int solaris_vhangup();
+extern int solaris_gettimeofday();
+extern int solaris_getitimer();
+extern int solaris_setitimer();
+extern int solaris_lwp_create();
+extern int solaris_lwp_exit();
+extern int solaris_lwp_suspend();
+extern int solaris_lwp_continue();
+extern int solaris_lwp_kill();
+extern int solaris_lwp_self();
+extern int solaris_lwp_setprivate();
+extern int solaris_lwp_getprivate();
+extern int solaris_lwp_wait();
+extern int solaris_lwp_mutex_unlock();
+extern int solaris_lwp_mutex_lock();
+extern int solaris_lwp_cond_wait();
+extern int solaris_lwp_cond_signal();
+extern int solaris_lwp_cond_broadcast();
+extern int solaris_pread();
+extern int solaris_pwrite();
+extern int solaris_llseek();
+extern int solaris_inst_sync();
+extern int solaris_auditsys();
+extern int solaris_processor_bind();
+extern int solaris_processor_info();
+extern int solaris_p_online();
+extern int solaris_sigqueue();
+extern int solaris_clock_gettime();
+extern int solaris_clock_settime();
+extern int solaris_clock_getres();
+extern int solaris_timer_create();
+extern int solaris_timer_delete();
+extern int solaris_timer_settime();
+extern int solaris_timer_gettime();
+extern int solaris_timer_getoverrun();
+extern int solaris_nanosleep();
+
+/* solaris_pgrpsys subcalls */
+
+extern int solaris_getpgrp(), solaris_setpgrp(), solaris_getsid();
+extern int solaris_setsid(), solaris_getpgid(), solaris_setpgid();
+
+#define SOLARIS_pgrpsys_subcall 300
+#define SOLARIS_getpgrp (SOLARIS_pgrpsys_subcall + 0)
+#define SOLARIS_setpgrp (SOLARIS_pgrpsys_subcall + 1)
+#define SOLARIS_getsid (SOLARIS_pgrpsys_subcall + 2)
+#define SOLARIS_setsid (SOLARIS_pgrpsys_subcall + 3)
+#define SOLARIS_getpgid (SOLARIS_pgrpsys_subcall + 4)
+#define SOLARIS_setpgid (SOLARIS_pgrpsys_subcall + 5)
+
+#define SOLARIS_pgrpsys_nsubcalls 6
+
+/* solaris_sigcall subcalls */
+
+#undef SOLARIS_signal
+#define SOLARIS_sigcall 48
+
+extern int solaris_signal(), solaris_sigset(), solaris_sighold();
+extern int solaris_sigrelse(), solaris_sigignore(), solaris_sigpause();
+
+#define SOLARIS_sigcall_subcall 310
+#define SOLARIS_signal (SOLARIS_sigcall_subcall + 0)
+#define SOLARIS_sigset (SOLARIS_sigcall_subcall + 1)
+#define SOLARIS_sighold (SOLARIS_sigcall_subcall + 2)
+#define SOLARIS_sigrelse (SOLARIS_sigcall_subcall + 3)
+#define SOLARIS_sigignore (SOLARIS_sigcall_subcall + 4)
+#define SOLARIS_sigpause (SOLARIS_sigcall_subcall + 5)
+
+#define SOLARIS_sigcall_nsubcalls 6
+
+/* msgsys subcalls */
+
+extern int solaris_msgget(), solaris_msgctl(), solaris_msgrcv(), solaris_msgsnd();
+
+#define SOLARIS_msgsys_subcall 320
+#define SOLARIS_msgget (SOLARIS_msgsys_subcall + 0)
+#define SOLARIS_msgctl (SOLARIS_msgsys_subcall + 1)
+#define SOLARIS_msgrcv (SOLARIS_msgsys_subcall + 2)
+#define SOLARIS_msgsnd (SOLARIS_msgsys_subcall + 3)
+
+#define SOLARIS_msgsys_nsubcalls 4
+
+/* shmsys subcalls */
+
+extern int solaris_shmat(), solaris_shmctl(), solaris_shmdt(), solaris_shmget();
+
+#define SOLARIS_shmsys_subcall 330
+#define SOLARIS_shmat (SOLARIS_shmsys_subcall + 0)
+#define SOLARIS_shmctl (SOLARIS_shmsys_subcall + 1)
+#define SOLARIS_shmdt (SOLARIS_shmsys_subcall + 2)
+#define SOLARIS_shmget (SOLARIS_shmsys_subcall + 3)
+
+#define SOLARIS_shmsys_nsubcalls 4
+
+/* semsys subcalls */
+
+extern int solaris_semctl(), solaris_semget(), solaris_semop();
+
+#define SOLARIS_semsys_subcall 340
+#define SOLARIS_semctl (SOLARIS_semsys_subcall + 0)
+#define SOLARIS_semget (SOLARIS_semsys_subcall + 1)
+#define SOLARIS_semop (SOLARIS_semsys_subcall + 2)
+
+#define SOLARIS_semsys_nsubcalls 3
+
+/* utssys subcalls */
+
+extern int solaris_olduname(), solaris_ustat(), solaris_fusers();
+
+#define SOLARIS_utssys_subcall 350
+
+#define SOLARIS_olduname (SOLARIS_utssys_subcall + 0)
+ /* 1 is unused */
+#define SOLARIS_ustat (SOLARIS_utssys_subcall + 2)
+#define SOLARIS_fusers (SOLARIS_utssys_subcall + 3)
+
+#define SOLARIS_utssys_nsubcalls 4
+
+/* sysfs subcalls */
+
+extern int solaris_sysfs1(), solaris_sysfs2(), solaris_sysfs3();
+
+#define SOLARIS_sysfs_subcall 360
+ /* 0 is unused */
+#define SOLARIS_sysfs1 (SOLARIS_sysfs_subcall + 1)
+#define SOLARIS_sysfs2 (SOLARIS_sysfs_subcall + 2)
+#define SOLARIS_sysfs3 (SOLARIS_sysfs_subcall + 3)
+
+#define SOLARIS_sysfs_nsubcalls 4
+
+/* solaris_spcall subcalls */
+
+#undef SOLARIS_sigpending
+#define SOLARIS_spcall 99
+
+extern int solaris_sigpending(), solaris_sigfillset();
+
+#define SOLARIS_spcall_subcall 370
+ /* 0 is unused */
+#define SOLARIS_sigpending (SOLARIS_spcall_subcall + 1)
+#define SOLARIS_sigfillset (SOLARIS_spcall_subcall + 2)
+
+#define SOLARIS_spcall_nsubcalls 3
+
+/* solaris_context subcalls */
+
+extern int solaris_getcontext(), solaris_setcontext();
+
+#define SOLARIS_context_subcall 380
+#define SOLARIS_getcontext (SOLARIS_context_subcall + 0)
+#define SOLARIS_setcontext (SOLARIS_context_subcall + 1)
+
+#define SOLARIS_context_nsubcalls 2
diff --git a/linux/sparc64/syscallent.h b/linux/sparc64/syscallent.h
new file mode 100644
index 0000000..776b5f1
--- /dev/null
+++ b/linux/sparc64/syscallent.h
@@ -0,0 +1 @@
+#include "../sparc/syscallent.h"
diff --git a/linux/sparc64/syscallent1.h b/linux/sparc64/syscallent1.h
new file mode 100644
index 0000000..821d77c
--- /dev/null
+++ b/linux/sparc64/syscallent1.h
@@ -0,0 +1 @@
+#include "../sparc/syscallent1.h"
diff --git a/linux/sparc64/syscallent2.h b/linux/sparc64/syscallent2.h
new file mode 100644
index 0000000..776b5f1
--- /dev/null
+++ b/linux/sparc64/syscallent2.h
@@ -0,0 +1 @@
+#include "../sparc/syscallent.h"
diff --git a/linux/syscall.h b/linux/syscall.h
index f6afcac..8725040 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -33,6 +33,7 @@
int sys_accept();
int sys_accept4();
int sys_access();
+int sys_add_key();
int sys_adjtimex();
int sys_arch_prctl();
int sys_bind();
@@ -66,12 +67,15 @@
int sys_fadvise64();
int sys_fadvise64_64();
int sys_fallocate();
+int sys_fanotify_init();
+int sys_fanotify_mark();
int sys_fchmod();
int sys_fchmodat();
int sys_fchown();
int sys_fchownat();
int sys_fcntl();
int sys_fgetxattr();
+int sys_finit_module();
int sys_flistxattr();
int sys_flock();
int sys_fork();
@@ -118,7 +122,11 @@
int sys_io_setup();
int sys_io_submit();
int sys_ioctl();
+int sys_ioprio_get();
+int sys_ioprio_set();
int sys_ipc();
+int sys_keyctl();
+int sys_kexec_load();
int sys_kill();
int sys_link();
int sys_linkat();
@@ -197,6 +205,7 @@
int sys_remap_file_pages();
int sys_removexattr();
int sys_renameat();
+int sys_request_key();
int sys_restart_syscall();
int sys_rt_sigaction();
int sys_rt_sigpending();
@@ -267,6 +276,8 @@
int sys_stime();
int sys_swapon();
int sys_symlinkat();
+int sys_sync_file_range();
+int sys_sync_file_range2();
int sys_sysctl();
int sys_sysinfo();
int sys_syslog();
diff --git a/linux/tile/errnoent1.h b/linux/tile/errnoent1.h
new file mode 100644
index 0000000..439ec5c
--- /dev/null
+++ b/linux/tile/errnoent1.h
@@ -0,0 +1,2 @@
+/* tilegx32/tilepro */
+#include "../errnoent.h"
diff --git a/linux/tile/ioctlent.h.in b/linux/tile/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/tile/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/tile/ioctlent1.h b/linux/tile/ioctlent1.h
new file mode 100644
index 0000000..9057b32
--- /dev/null
+++ b/linux/tile/ioctlent1.h
@@ -0,0 +1,2 @@
+/* tilegx32/tilepro */
+#include "ioctlent.h"
diff --git a/linux/tile/signalent1.h b/linux/tile/signalent1.h
new file mode 100644
index 0000000..27a3e48
--- /dev/null
+++ b/linux/tile/signalent1.h
@@ -0,0 +1,2 @@
+/* tilegx32/tilepro */
+#include "../signalent.h"
diff --git a/linux/tile/syscallent.h b/linux/tile/syscallent.h
new file mode 100644
index 0000000..a069334
--- /dev/null
+++ b/linux/tile/syscallent.h
@@ -0,0 +1,274 @@
+ { 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, "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, "statfs" }, /* 43 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 44 */
+ { 2, TF, sys_truncate, "truncate" }, /* 45 */
+ { 2, TD, sys_ftruncate, "ftruncate" }, /* 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, "fstatat" }, /* 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_range2, "sync_file_range2" }, /* 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, sys_exit, "exit" }, /* 93 */
+ { 1, TP, 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, sys_shmat, "shmat" }, /* 196 */
+ { 4, TI, 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, sys_brk, "brk" }, /* 214 */
+ { 2, TM, sys_munmap, "munmap" }, /* 215 */
+ { 5, TM, 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, sys_execve, "execve" }, /* 221 */
+ { 6, TD|TM, sys_mmap, "mmap" }, /* 222 */
+ { 4, TD, sys_fadvise64, "fadvise64" }, /* 223 */
+ { 1, TF, sys_swapon, "swapon" }, /* 224 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 225 */
+ { 3, TM, 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, 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 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 244 */
+ { 3, 0, printargs, "cacheflush" }, /* 245 */
+ { 1, 0, printargs, "set_dataplane" }, /* 246 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 247 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 248 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 249 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 250 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 251 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 252 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 253 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 254 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 255 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 256 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 257 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 258 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 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 */
diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h
new file mode 100644
index 0000000..94b7737
--- /dev/null
+++ b/linux/tile/syscallent1.h
@@ -0,0 +1,278 @@
+ { 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 */
+ { 3, 0, sys_nfsservctl, "nfsservctl" }, /* 42 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 43 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 44 */
+ { 4, TF, sys_truncate64, "truncate64" }, /* 45 */
+ { 4, 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 */
+ { 6, TD, sys_pread, "pread64" }, /* 67 */
+ { 6, TD, sys_pwrite, "pwrite64" }, /* 68 */
+ { 5, TD, sys_preadv, "preadv" }, /* 69 */
+ { 5, TD, sys_pwritev, "pwritev" }, /* 70 */
+ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 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_range2, "sync_file_range2" }, /* 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, sys_exit, "exit" }, /* 93 */
+ { 1, TP, 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, sys_shmat, "shmat" }, /* 196 */
+ { 4, TI, 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, sys_brk, "brk" }, /* 214 */
+ { 2, TM, sys_munmap, "munmap" }, /* 215 */
+ { 5, TM, 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, sys_execve, "execve" }, /* 221 */
+ { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 222 */
+ { 5, TD, sys_fadvise64, "fadvise64" }, /* 223 */
+ { 1, TF, sys_swapon, "swapon" }, /* 224 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 225 */
+ { 3, TM, 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, 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 */
+#ifdef __tilegx__
+ { 0, 0, printargs, "arch_unimpl" }, /* 244 */
+#else
+ { 2, 0, printargs, "cmpxchg_badaddr" }, /* 244 */
+#endif
+ { 3, 0, printargs, "cacheflush" }, /* 245 */
+ { 1, 0, printargs, "set_dataplane" }, /* 246 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 247 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 248 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 249 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 250 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 251 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 252 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 253 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 254 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 255 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 256 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 257 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 258 */
+ { 0, 0, printargs, "arch_unimpl" }, /* 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 */
diff --git a/linux/x32/ioctlent.h.in b/linux/x32/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/x32/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/x86_64/ioctlent.h.in b/linux/x86_64/ioctlent.h.in
new file mode 100644
index 0000000..52ac99b
--- /dev/null
+++ b/linux/x86_64/ioctlent.h.in
@@ -0,0 +1 @@
+#include "../i386/ioctlent.h.in"
diff --git a/linux/xtensa/ioctlent.h.in b/linux/xtensa/ioctlent.h.in
new file mode 100644
index 0000000..a9eae81
--- /dev/null
+++ b/linux/xtensa/ioctlent.h.in
@@ -0,0 +1 @@
+/* intentionally empty */
diff --git a/linux/xtensa/syscallent.h b/linux/xtensa/syscallent.h
new file mode 100644
index 0000000..62cb40d
--- /dev/null
+++ b/linux/xtensa/syscallent.h
@@ -0,0 +1,326 @@
+ { 0, 0, printargs, "spill" }, /* 0 */
+ { 0, 0, printargs, "xtensa" }, /* 1 */
+ [2 ... 7] = { },
+ { 3, TD|TF, sys_open, "open" }, /* 8 */
+ { 1, TD, sys_close, "close" }, /* 9 */
+ { 1, TD, sys_dup, "dup" }, /* 10 */
+ { 2, TD, sys_dup2, "dup2" }, /* 11 */
+ { 3, TD, sys_read, "read" }, /* 12 */
+ { 3, TD, sys_write, "write" }, /* 13 */
+ { 5, TD, sys_select, "select" }, /* 14 */
+ { 3, TD, sys_lseek, "lseek" }, /* 15 */
+ { 3, TD, sys_poll, "poll" }, /* 16 */
+ { 5, TD, sys_llseek, "_llseek" }, /* 17 */
+ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 18 */
+ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 19 */
+ { 1, TD, sys_epoll_create, "epoll_create" }, /* 20 */
+ { 2, TD|TF, sys_creat, "creat" }, /* 21 */
+ { 2, TF, sys_truncate, "truncate" }, /* 22 */
+ { 2, TD, sys_ftruncate, "ftruncate" }, /* 23 */
+ { 3, TD, sys_readv, "readv" }, /* 24 */
+ { 3, TD, sys_writev, "writev" }, /* 25 */
+ { 1, TD, sys_fsync, "fsync" }, /* 26 */
+ { 1, TD, sys_fdatasync, "fdatasync" }, /* 27 */
+ { 4, TF, sys_truncate64, "truncate64" }, /* 28 */
+ { 4, TD, sys_ftruncate64, "ftruncate64" }, /* 29 */
+ { 6, TD, sys_pread, "pread64" }, /* 30 */
+ { 6, TD, sys_pwrite, "pwrite64" }, /* 31 */
+ { 2, TF, sys_link, "link" }, /* 32 */
+ { 2, TF, sys_rename, "rename" }, /* 33 */
+ { 2, TF, sys_symlink, "symlink" }, /* 34 */
+ { 3, TF, sys_readlink, "readlink" }, /* 35 */
+ { 3, TF, sys_mknod, "mknod" }, /* 36 */
+ { 1, TD, sys_pipe, "pipe" }, /* 37 */
+ { 1, TF, sys_unlink, "unlink" }, /* 38 */
+ { 1, TF, sys_rmdir, "rmdir" }, /* 39 */
+ { 2, TF, sys_mkdir, "mkdir" }, /* 40 */
+ { 1, TF, sys_chdir, "chdir" }, /* 41 */
+ { 1, TD, sys_fchdir, "fchdir" }, /* 42 */
+ { 2, TF, sys_getcwd, "getcwd" }, /* 43 */
+ { 2, TF, sys_chmod, "chmod" }, /* 44 */
+ { 3, TF, sys_chown, "chown" }, /* 45 */
+ { 2, TF, sys_stat, "stat" }, /* 46 */
+ { 2, TF, sys_stat64, "stat64" }, /* 47 */
+ { 3, TF, sys_chown, "lchown" }, /* 48 */
+ { 2, TF, sys_lstat, "lstat" }, /* 49 */
+ { 2, TF, sys_lstat64, "lstat64" }, /* 50 */
+ [51] = { },
+ { 2, TD, sys_fchmod, "fchmod" }, /* 52 */
+ { 3, TD, sys_fchown, "fchown" }, /* 53 */
+ { 2, TD, sys_fstat, "fstat" }, /* 54 */
+ { 2, TD, sys_fstat64, "fstat64" }, /* 55 */
+ { 2, TD, sys_flock, "flock" }, /* 56 */
+ { 2, TF, sys_access, "access" }, /* 57 */
+ { 1, 0, sys_umask, "umask" }, /* 58 */
+ { 3, TD, sys_getdents, "getdents" }, /* 59 */
+ { 3, TD, sys_getdents64, "getdents64" }, /* 60 */
+ { 3, TD, sys_fcntl, "fcntl64" }, /* 61 */
+ { 6, TD, sys_fallocate, "fallocate" }, /* 62 */
+ { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 63 */
+ { 2, TF, sys_utime, "utime" }, /* 64 */
+ { 2, TF, sys_utimes, "utimes" }, /* 65 */
+ { 3, TD, sys_ioctl, "ioctl" }, /* 66 */
+ { 3, TD, sys_fcntl, "fcntl" }, /* 67 */
+ { 5, TF, sys_setxattr, "setxattr" }, /* 68 */
+ { 4, TF, sys_getxattr, "getxattr" }, /* 69 */
+ { 3, TF, sys_listxattr, "listxattr" }, /* 70 */
+ { 2, TF, sys_removexattr, "removexattr" }, /* 71 */
+ { 5, TF, sys_setxattr, "lsetxattr" }, /* 72 */
+ { 4, TF, sys_getxattr, "lgetxattr" }, /* 73 */
+ { 3, TF, sys_listxattr, "llistxattr" }, /* 74 */
+ { 2, TF, sys_removexattr, "lremovexattr" }, /* 75 */
+ { 5, TD, sys_fsetxattr, "fsetxattr" }, /* 76 */
+ { 4, TD, sys_fgetxattr, "fgetxattr" }, /* 77 */
+ { 3, TD, sys_flistxattr, "flistxattr" }, /* 78 */
+ { 2, TD, sys_fremovexattr, "fremovexattr" }, /* 79 */
+ { 6, TD|TM, sys_mmap_pgoff, "mmap2" }, /* 80 */
+ { 2, TM, sys_munmap, "munmap" }, /* 81 */
+ { 3, TM, sys_mprotect, "mprotect" }, /* 82 */
+ { 1, TM, sys_brk, "brk" }, /* 83 */
+ { 2, TM, sys_mlock, "mlock" }, /* 84 */
+ { 2, TM, sys_munlock, "munlock" }, /* 85 */
+ { 1, TM, sys_mlockall, "mlockall" }, /* 86 */
+ { 0, TM, sys_munlockall, "munlockall" }, /* 87 */
+ { 4, TM, sys_mremap, "mremap" }, /* 88 */
+ { 3, TM, sys_msync, "msync" }, /* 89 */
+ { 3, TM, sys_mincore, "mincore" }, /* 90 */
+ { 3, TM, sys_madvise, "madvise" }, /* 91 */
+ { 4, TI, sys_shmget, "shmget" }, /* 92 */
+ { 4, TI, sys_shmat, "shmat" }, /* 93 */
+ { 4, TI, sys_shmctl, "shmctl" }, /* 94 */
+ { 4, TI, sys_shmdt, "shmdt" }, /* 95 */
+ { 3, TN, sys_socket, "socket" }, /* 96 */
+ { 5, TN, sys_setsockopt, "setsockopt" }, /* 97 */
+ { 5, TN, sys_getsockopt, "getsockopt" }, /* 98 */
+ { 2, TN, sys_shutdown, "shutdown" }, /* 99 */
+ { 3, TN, sys_bind, "bind" }, /* 100 */
+ { 3, TN, sys_connect, "connect" }, /* 101 */
+ { 2, TN, sys_listen, "listen" }, /* 102 */
+ { 3, TN, sys_accept, "accept" }, /* 103 */
+ { 3, TN, sys_getsockname, "getsockname" }, /* 104 */
+ { 3, TN, sys_getpeername, "getpeername" }, /* 105 */
+ { 3, TN, sys_sendmsg, "sendmsg" }, /* 106 */
+ { 3, TN, sys_recvmsg, "recvmsg" }, /* 107 */
+ { 4, TN, sys_send, "send" }, /* 108 */
+ { 4, TN, sys_recv, "recv" }, /* 109 */
+ { 6, TN, sys_sendto, "sendto" }, /* 110 */
+ { 6, TN, sys_recvfrom, "recvfrom" }, /* 111 */
+ { 4, TN, sys_socketpair, "socketpair" }, /* 112 */
+ { 4, TD|TN, sys_sendfile, "sendfile" }, /* 113 */
+ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 114 */
+ { 4, TN, sys_sendmsg, "sendmsg" }, /* 115 */
+ { 5, TP, sys_clone, "clone" }, /* 116 */
+ { 3, TF|TP, sys_execve, "execve" }, /* 117 */
+ { 1, TP, sys_exit, "exit" }, /* 118 */
+ { 1, TP, sys_exit, "exit_group" }, /* 119 */
+ { 0, 0, sys_getpid, "getpid" }, /* 120 */
+ { 4, TP, sys_wait4, "wait4" }, /* 121 */
+ { 5, TP, sys_waitid, "waitid" }, /* 122 */
+ { 2, TS, sys_kill, "kill" }, /* 123 */
+ { 2, TS, sys_kill, "tkill" }, /* 124 */
+ { 3, TS, sys_tgkill, "tgkill" }, /* 125 */
+ { 1, 0, printargs, "set_tid_address"}, /* 126 */
+ { 0, 0, printargs, "gettid" }, /* 127 */
+ { 0, 0, sys_setsid, "setsid" }, /* 128 */
+ { 1, 0, sys_getsid, "getsid" }, /* 129 */
+ { 5, 0, sys_prctl, "prctl" }, /* 130 */
+ { 1, 0, sys_personality, "personality" }, /* 131 */
+ { 2, 0, sys_getpriority, "getpriority" }, /* 132 */
+ { 3, 0, sys_setpriority, "setpriority" }, /* 133 */
+ { 3, 0, sys_setitimer, "setitimer" }, /* 134 */
+ { 2, 0, sys_getitimer, "getitimer" }, /* 135 */
+ { 1, 0, sys_setuid, "setuid" }, /* 136 */
+ { 0, NF, sys_getuid, "getuid" }, /* 137 */
+ { 1, 0, sys_setgid, "setgid" }, /* 138 */
+ { 0, NF, sys_getgid, "getgid" }, /* 139 */
+ { 0, NF, sys_geteuid, "geteuid" }, /* 140 */
+ { 0, NF, sys_getegid, "getegid" }, /* 141 */
+ { 2, 0, sys_setreuid, "setreuid" }, /* 142 */
+ { 2, 0, sys_setregid, "setregid" }, /* 143 */
+ { 3, 0, sys_setresuid, "setresuid" }, /* 144 */
+ { 3, 0, sys_getresuid, "getresuid" }, /* 145 */
+ { 3, 0, sys_setresgid, "setresgid" }, /* 146 */
+ { 3, 0, sys_getresgid, "getresgid" }, /* 147 */
+ { 2, 0, sys_setpgid, "setpgid" }, /* 148 */
+ { 1, 0, sys_getpgid, "getpgid" }, /* 149 */
+ { 0, 0, sys_getppid, "getppid" }, /* 150 */
+ { 0, 0, sys_getpgrp, "getpgrp" }, /* 151 */
+ [152 ... 153] = { },
+ { 1, 0, sys_times, "times" }, /* 154 */
+ { 1, TF, sys_acct, "acct" }, /* 155 */
+ { 3, 0, sys_sched_setaffinity, "sched_setaffinity"}, /* 156 */
+ { 3, 0, sys_sched_getaffinity, "sched_getaffinity"}, /* 157 */
+ { 2, 0, sys_capget, "capget" }, /* 158 */
+ { 2, 0, sys_capset, "capset" }, /* 159 */
+ { 4, 0, sys_ptrace, "ptrace" }, /* 160 */
+ { 5, TI, sys_semtimedop, "semtimedop" }, /* 161 */
+ { 4, TI, sys_semget, "semget" }, /* 162 */
+ { 4, TI, sys_semop, "semop" }, /* 163 */
+ { 4, TI, sys_semctl, "semctl" }, /* 164 */
+ [165] = { },
+ { 4, TI, sys_msgget, "msgget" }, /* 166 */
+ { 4, TI, sys_msgsnd, "msgsnd" }, /* 167 */
+ { 4, TI, sys_msgrcv, "msgrcv" }, /* 168 */
+ { 4, TI, sys_msgctl, "msgctl" }, /* 169 */
+ [170] = { },
+ { 2, TF, sys_umount2, "umount2" }, /* 171 */
+ { 5, TF, sys_mount, "mount" }, /* 172 */
+ { 2, TF, sys_swapon, "swapon" }, /* 173 */
+ { 1, TF, sys_chroot, "chroot" }, /* 174 */
+ { 2, TF, sys_pivotroot, "pivot_root" }, /* 175 */
+ { 2, TF, sys_umount, "umount" }, /* 176 */
+ { 1, TF, sys_swapoff, "swapoff" }, /* 177 */
+ { 0, 0, sys_sync, "sync" }, /* 178 */
+ [179] = { },
+ { 1, NF, sys_setfsuid, "setfsuid" }, /* 180 */
+ { 1, NF, sys_setfsgid, "setfsgid" }, /* 181 */
+ { 3, 0, sys_sysfs, "sysfs" }, /* 182 */
+ { 2, 0, sys_ustat, "ustat" }, /* 183 */
+ { 2, TF, sys_statfs, "statfs" }, /* 184 */
+ { 2, TD, sys_fstatfs, "fstatfs" }, /* 185 */
+ { 3, TF, sys_statfs64, "statfs64" }, /* 186 */
+ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 187 */
+ { 2, 0, sys_setrlimit, "setrlimit" }, /* 188 */
+ { 2, 0, sys_getrlimit, "getrlimit" }, /* 189 */
+ { 2, 0, sys_getrusage, "getrusage" }, /* 190 */
+ { 5, 0, sys_futex, "futex" }, /* 191 */
+ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 192 */
+ { 2, 0, sys_settimeofday, "settimeofday" }, /* 193 */
+ { 1, 0, sys_adjtimex, "adjtimex" }, /* 194 */
+ { 2, 0, sys_nanosleep, "nanosleep" }, /* 195 */
+ { 2, 0, sys_getgroups, "getgroups" }, /* 196 */
+ { 2, 0, sys_setgroups, "setgroups" }, /* 197 */
+ { 2, 0, sys_sethostname, "sethostname" }, /* 198 */
+ { 2, 0, sys_setdomainname, "setdomainname" }, /* 199 */
+ { 3, 0, sys_syslog, "syslog" }, /* 200 */
+ { 0, 0, sys_vhangup, "vhangup" }, /* 201 */
+ { 1, TF, sys_uselib, "uselib" }, /* 202 */
+ { 3, 0, sys_reboot, "reboot" }, /* 203 */
+ { 4, TF, sys_quotactl, "quotactl" }, /* 204 */
+ { 0, 0, printargs, "nfsservctl" }, /* 205 */
+ { 1, 0, sys_sysctl, "_sysctl" }, /* 206 */
+ { 2, 0, sys_bdflush, "bdflush" }, /* 207 */
+ { 1, 0, sys_uname, "uname" }, /* 208 */
+ { 1, 0, sys_sysinfo, "sysinfo" }, /* 209 */
+ { 2, 0, sys_init_module, "init_module" }, /* 210 */
+ { 1, 0, sys_delete_module, "delete_module" }, /* 211 */
+ { 2, 0, sys_sched_setparam, "sched_setparam"}, /* 212 */
+ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 213 */
+ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 214 */
+ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 215 */
+ { 1, 0, sys_sched_get_priority_max, "sched_get_priority_max"}, /* 216 */
+ { 1, 0, sys_sched_get_priority_min, "sched_get_priority_min"}, /* 217 */
+ { 2, 0, sys_sched_rr_get_interval, "sched_rr_get_interval"}, /* 218 */
+ { 0, 0, sys_sched_yield, "sched_yield" }, /* 219 */
+ [220 ... 222] = { },
+ { 0, 0, printargs, "restart_syscall"}, /* 223 */
+ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 224 */
+ { 0, TS, sys_rt_sigreturn, "rt_sigreturn" }, /* 225 */
+ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 226 */
+ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 227 */
+ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 228 */
+ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 229 */
+ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 230 */
+ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 231 */
+ { 4, 0, sys_mq_open, "mq_open" }, /* 232 */
+ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 233 */
+ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 234 */
+ { 5, 0, sys_mq_timedreceive, "mq_timedreceive"}, /* 235 */
+ { 2, 0, sys_mq_notify, "mq_notify" }, /* 236 */
+ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 237 */
+ [238] = { },
+ { 2, 0, printargs, "io_setup" }, /* 239 */
+ { 1, 0, printargs, "io_destroy" }, /* 240 */
+ { 3, 0, printargs, "io_submit" }, /* 241 */
+ { 5, 0, printargs, "io_getevents" }, /* 242 */
+ { 3, 0, printargs, "io_cancel" }, /* 243 */
+ { 2, 0, sys_clock_settime, "clock_settime" }, /* 244 */
+ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 245 */
+ { 2, 0, sys_clock_getres, "clock_getres" }, /* 246 */
+ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 247 */
+ { 3, 0, sys_timer_create, "timer_create" }, /* 248 */
+ { 1, 0, sys_timer_delete, "timer_delete" }, /* 249 */
+ { 4, 0, sys_timer_settime, "timer_settime" }, /* 250 */
+ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 251 */
+ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 252 */
+ [253] = { },
+ { 4, 0, printargs, "lookup_dcookie"}, /* 254 */
+ [255] = { },
+ { 5, 0, printargs, "add_key" }, /* 256 */
+ { 5, 0, printargs, "request_key" }, /* 257 */
+ { 5, 0, printargs, "keyctl" }, /* 258 */
+ [259] = { },
+ { 5, TD, sys_readahead, "readahead" }, /* 260 */
+ { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 261 */
+ { 5, TM, sys_migrate_pages, "migrate_pages" }, /* 262 */
+ { 0, TM, sys_mbind, "mbind" }, /* 263 */
+ { 6, TM, sys_get_mempolicy, "get_mempolicy" }, /* 264 */
+ { 5, TM, sys_set_mempolicy, "set_mempolicy" }, /* 265 */
+ { 3, TP, sys_unshare, "unshare" }, /* 266 */
+ { 1, TM, sys_move_pages, "move_pages" }, /* 267 */
+ { 0, TD, sys_splice, "splice" }, /* 268 */
+ { 0, TD, sys_tee, "tee" }, /* 269 */
+ { 0, TD, sys_vmsplice, "vmsplice" }, /* 270 */
+ { 0, 0, printargs, "SYS_271" }, /* 271 */
+ { 0, TD, sys_pselect6, "pselect6" }, /* 272 */
+ { 0, TD, sys_ppoll, "ppoll" }, /* 273 */
+ { 0, TD, sys_epoll_pwait, "epoll_pwait" }, /* 274 */
+ { 1, TD, sys_epoll_create1, "epoll_create1" }, /* 275 */
+ { 0, TD, sys_inotify_init, "inotify_init" }, /* 276 */
+ { 3, TD, sys_inotify_add_watch, "inotify_add_watch"}, /* 277 */
+ { 2, TD, sys_inotify_rm_watch, "inotify_rm_watch"}, /* 278 */
+ { 1, TD, sys_inotify_init1, "inotify_init1" }, /* 279 */
+ { 0, 0, sys_getcpu, "getcpu" }, /* 280 */
+ { 4, 0, sys_kexec_load, "kexec_load" }, /* 281 */
+ { 2, 0, sys_ioprio_set, "ioprio_set" }, /* 282 */
+ { 3, 0, sys_ioprio_get, "ioprio_get" }, /* 283 */
+ { 3, 0, sys_set_robust_list, "set_robust_list"}, /* 284 */
+ { 3, 0, sys_get_robust_list, "get_robust_list"}, /* 285 */
+ { 0, 0, printargs, "SYS_286" }, /* 286 */
+ { 0, 0, printargs, "SYS_287" }, /* 287 */
+ { 4, TD|TF, sys_openat, "openat" }, /* 288 */
+ { 3, TD|TF, sys_mkdirat, "mkdirat" }, /* 289 */
+ { 4, TD|TF, sys_mknodat, "mknodat" }, /* 290 */
+ { 3, TD|TF, sys_unlinkat, "unlinkat" }, /* 291 */
+ { 4, TD|TF, sys_renameat, "renameat" }, /* 292 */
+ { 5, TD|TF, sys_linkat, "linkat" }, /* 293 */
+ { 3, TD|TF, sys_symlinkat, "symlinkat" }, /* 294 */
+ { 4, TD|TF, sys_readlinkat, "readlinkat" }, /* 295 */
+ { 0, TD|TF, sys_utimensat, "utimensat" }, /* 296 */
+ { 5, TD|TF, sys_fchownat, "fchownat" }, /* 297 */
+ { 4, TD|TF, sys_futimesat, "futimesat" }, /* 298 */
+ { 0, TD|TF, sys_newfstatat, "fstatat64" }, /* 299 */
+ { 4, TD|TF, sys_fchmodat, "fchmodat" }, /* 300 */
+ { 4, TD|TF, sys_faccessat, "faccessat" }, /* 301 */
+ { 0, 0, printargs, "SYS_302" }, /* 302 */
+ { 0, 0, printargs, "SYS_303" }, /* 303 */
+ { 3, TD|TS, sys_signalfd, "signalfd" }, /* 304 */
+ { 0, 0, printargs, "SYS_305" }, /* 305 */
+ { 1, TD, sys_eventfd, "eventfd" }, /* 306 */
+ { 5, TN, sys_recvmmsg, "recvmmsg" }, /* 307 */
+ { 2, TD, sys_setns, "setns" }, /* 308 */
+ { 4, TD|TS, sys_signalfd4, "signalfd4" }, /* 309 */
+ { 3, TD, sys_dup3, "dup3" }, /* 310 */
+ { 2, TD, sys_pipe2, "pipe2" }, /* 311 */
+ { 2, TD, sys_timerfd_create, "timerfd_create"}, /* 312 */
+ { 4, TD, sys_timerfd_settime, "timerfd_settime"}, /* 313 */
+ { 2, TD, sys_timerfd_gettime, "timerfd_gettime"}, /* 314 */
+ { 0, 0, printargs, "SYS_315" }, /* 315 */
+ { 2, TD, sys_eventfd2, "eventfd2" }, /* 316 */
+ { 6, TD, sys_preadv, "preadv" }, /* 317 */
+ { 6, TD, sys_pwritev, "pwritev" }, /* 318 */
+ [319] = { },
+ { 2, TD, sys_fanotify_init, "fanotify_init" }, /* 320 */
+ { 6, TD|TF, sys_fanotify_mark, "fanotify_mark" }, /* 321 */
+ { 6, 0, sys_process_vm_readv, "process_vm_readv"}, /* 322 */
+ { 6, 0, sys_process_vm_writev, "process_vm_writev"}, /* 323 */
+ { 5, TD|TF, sys_name_to_handle_at, "name_to_handle_at"}, /* 324 */
+ { 3, TD, sys_open_by_handle_at, "open_by_handle_at"}, /* 325 */
+ { 6, TD, sys_sync_file_range2, "sync_file_range2"}, /* 326 */
+ { 5, TD, sys_perf_event_open, "perf_event_open"}, /* 327 */
+ { 4, TP|TS, sys_rt_tgsigqueueinfo, "rt_tgsigqueueinfo"}, /* 328 */
+ { 2, 0, sys_clock_adjtime, "clock_adjtime" }, /* 329 */
+ { 4, 0, sys_prlimit64, "prlimit64" }, /* 330 */
+ { 5, 0, sys_kcmp, "kcmp" }, /* 331 */
+ { 3, TD, sys_finit_module, "finit_module" }, /* 332 */
+ { 4, TN, sys_accept4, "accept4" }, /* 333 */
diff --git a/loop.c b/loop.c
index a3f89e0..495e3e2 100644
--- a/loop.c
+++ b/loop.c
@@ -32,28 +32,28 @@
#include <linux/loop.h>
static const struct xlat loop_flags_options[] = {
- { LO_FLAGS_READ_ONLY, "LO_FLAGS_READ_ONLY" },
+ XLAT(LO_FLAGS_READ_ONLY),
#if HAVE_DECL_LO_FLAGS_AUTOCLEAR
- { LO_FLAGS_AUTOCLEAR, "LO_FLAGS_AUTOCLEAR" },
+ XLAT(LO_FLAGS_AUTOCLEAR),
#endif
#if HAVE_DECL_LO_FLAGS_PARTSCAN
- { LO_FLAGS_PARTSCAN, "LO_FLAGS_PARTSCAN" },
+ XLAT(LO_FLAGS_PARTSCAN),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat loop_crypt_type_options[] = {
- { LO_CRYPT_NONE, "LO_CRYPT_NONE" },
- { LO_CRYPT_XOR, "LO_CRYPT_XOR" },
- { LO_CRYPT_DES, "LO_CRYPT_DES" },
- { LO_CRYPT_FISH2, "LO_CRYPT_FISH2" },
- { LO_CRYPT_BLOW, "LO_CRYPT_BLOW" },
- { LO_CRYPT_CAST128, "LO_CRYPT_CAST128" },
- { LO_CRYPT_IDEA, "LO_CRYPT_IDEA" },
- { LO_CRYPT_DUMMY, "LO_CRYPT_DUMMY" },
- { LO_CRYPT_SKIPJACK, "LO_CRYPT_SKIPJACK" },
- { LO_CRYPT_CRYPTOAPI, "LO_CRYPT_CRYPTOAPI" },
- { 0, NULL },
+ XLAT(LO_CRYPT_NONE),
+ XLAT(LO_CRYPT_XOR),
+ XLAT(LO_CRYPT_DES),
+ XLAT(LO_CRYPT_FISH2),
+ XLAT(LO_CRYPT_BLOW),
+ XLAT(LO_CRYPT_CAST128),
+ XLAT(LO_CRYPT_IDEA),
+ XLAT(LO_CRYPT_DUMMY),
+ XLAT(LO_CRYPT_SKIPJACK),
+ XLAT(LO_CRYPT_CRYPTOAPI),
+ XLAT_END
};
int loop_ioctl(struct tcb *tcp, long code, long arg)
diff --git a/m4/includedir.m4 b/m4/includedir.m4
new file mode 100644
index 0000000..dd859bb
--- /dev/null
+++ b/m4/includedir.m4
@@ -0,0 +1,23 @@
+dnl ### A macro to find the include directory, useful for cross-compiling.
+AC_DEFUN([AC_INCLUDEDIR],
+[AC_REQUIRE([AC_PROG_AWK])dnl
+AC_SUBST(includedir)
+AC_MSG_CHECKING(for primary include directory)
+includedir=/usr/include
+if test -n "$GCC"
+then
+ >conftest.c
+ new_includedir=`
+ $CC -v -E conftest.c 2>&1 | $AWK '
+ /^End of search list/ { print last; exit }
+ { last = [$]1 }
+ '
+ `
+ rm -f conftest.c
+ if test -n "$new_includedir" && test -d "$new_includedir"
+ then
+ includedir=$new_includedir
+ fi
+fi
+AC_MSG_RESULT($includedir)
+])
diff --git a/m4/long_long.m4 b/m4/long_long.m4
new file mode 100644
index 0000000..e6d22f0
--- /dev/null
+++ b/m4/long_long.m4
@@ -0,0 +1,29 @@
+dnl ### A macro to determine endianness of long long
+AC_DEFUN([AC_LITTLE_ENDIAN_LONG_LONG],
+[AC_MSG_CHECKING(for little endian long long)
+AC_CACHE_VAL(ac_cv_have_little_endian_long_long,
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+int main () {
+ union {
+ long long ll;
+ int l [2];
+ } u;
+ u.ll = 0x12345678;
+ if (u.l[0] == 0x12345678)
+ return 0;
+ return 1;
+}
+]])],[ac_cv_have_little_endian_long_long=yes],[ac_cv_have_little_endian_long_long=no],[
+if test "x$ac_cv_c_bigendian" = "xyes"; then
+ ac_cv_have_little_endian_long_long=no
+else
+ ac_cv_have_little_endian_long_long=yes
+fi
+])])
+AC_MSG_RESULT($ac_cv_have_little_endian_long_long)
+if test "$ac_cv_have_little_endian_long_long" = yes
+then
+ AC_DEFINE([HAVE_LITTLE_ENDIAN_LONG_LONG], 1,
+[Define if long long is little-endian.])
+fi
+])
diff --git a/m4/stat.m4 b/m4/stat.m4
new file mode 100644
index 0000000..bf0e480
--- /dev/null
+++ b/m4/stat.m4
@@ -0,0 +1,16 @@
+dnl ### A macro to determine whether stat64 is defined.
+AC_DEFUN([AC_STAT64],
+[AC_MSG_CHECKING(for stat64 in (asm|sys)/stat.h)
+AC_CACHE_VAL(ac_cv_type_stat64,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <linux/types.h>
+#include <asm/stat.h>
+]], [[struct stat64 st;]])],[ac_cv_type_stat64=yes],[ac_cv_type_stat64=no])])
+AC_MSG_RESULT($ac_cv_type_stat64)
+if test "$ac_cv_type_stat64" = yes
+then
+ AC_DEFINE([HAVE_STAT64], 1,
+[Define if stat64 is available in asm/stat.h.])
+fi
+])
diff --git a/m4/statfs.m4 b/m4/statfs.m4
new file mode 100644
index 0000000..1a2f971
--- /dev/null
+++ b/m4/statfs.m4
@@ -0,0 +1,15 @@
+dnl ### A macro to determine whether statfs64 is defined.
+AC_DEFUN([AC_STATFS64],
+[AC_MSG_CHECKING(for statfs64 in sys/vfs.h)
+AC_CACHE_VAL(ac_cv_type_statfs64,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <linux/types.h>
+#include <sys/vfs.h>
+]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
+AC_MSG_RESULT($ac_cv_type_statfs64)
+if test "$ac_cv_type_statfs64" = yes
+then
+ AC_DEFINE([HAVE_STATFS64], 1,
+[Define if statfs64 is available in sys/vfs.h.])
+fi
+])
diff --git a/m4/warnings.m4 b/m4/warnings.m4
new file mode 100644
index 0000000..dad5c1f
--- /dev/null
+++ b/m4/warnings.m4
@@ -0,0 +1,36 @@
+# warnings.m4 serial 2
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson
+
+# gl_AS_VAR_APPEND(VAR, VALUE)
+# ----------------------------
+# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
+m4_ifdef([AS_VAR_APPEND],
+[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
+[m4_define([gl_AS_VAR_APPEND],
+[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
+
+# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
+# ------------------------------------------------
+# Adds parameter to WARN_CFLAGS if the compiler supports it. For example,
+# gl_WARN_ADD([-Wparentheses]).
+AC_DEFUN([gl_WARN_ADD],
+[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
+AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="${CPPFLAGS} $1"
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
+ [AS_VAR_SET([gl_Warn], [yes])],
+ [AS_VAR_SET([gl_Warn], [no])])
+ CPPFLAGS="$save_CPPFLAGS"
+])
+AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl
+AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])])
+AS_VAR_POPDEF([gl_Flags])dnl
+AS_VAR_POPDEF([gl_Warn])dnl
+m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
+])
diff --git a/make-dist b/make-dist
new file mode 100755
index 0000000..fffedfb
--- /dev/null
+++ b/make-dist
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+
+tag="${1:-master}"
+
+j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j=
+
+distdir=strace-dist-$$
+abs_distdir="`pwd`/$distdir"
+trap 'chmod -Rf u+w $abs_distdir; rm -rf $abs_distdir' 1 2 15 0
+
+set -x
+git clone -q -n -s .git "$distdir"
+
+cd $distdir
+git checkout -f "$tag"
+
+./git-set-file-times
+
+autoreconf -i -f
+
+./configure --enable-maintainer-mode
+
+make -s $j distcheck
+make -s $j news-check
+
+mv -f strace-*.tar.xz ..
diff --git a/mem.c b/mem.c
index ef273c7..267773c 100644
--- a/mem.c
+++ b/mem.c
@@ -60,46 +60,46 @@
}
static const struct xlat mmap_prot[] = {
- { PROT_NONE, "PROT_NONE", },
- { PROT_READ, "PROT_READ" },
- { PROT_WRITE, "PROT_WRITE" },
- { PROT_EXEC, "PROT_EXEC" },
+ XLAT(PROT_NONE),
+ XLAT(PROT_READ),
+ XLAT(PROT_WRITE),
+ XLAT(PROT_EXEC),
#ifdef PROT_SEM
- { PROT_SEM, "PROT_SEM" },
+ XLAT(PROT_SEM),
#endif
#ifdef PROT_GROWSDOWN
- { PROT_GROWSDOWN,"PROT_GROWSDOWN"},
+ XLAT(PROT_GROWSDOWN),
#endif
#ifdef PROT_GROWSUP
- { PROT_GROWSUP, "PROT_GROWSUP" },
+ XLAT(PROT_GROWSUP),
#endif
#ifdef PROT_SAO
- { PROT_SAO, "PROT_SAO" },
+ XLAT(PROT_SAO),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat mmap_flags[] = {
- { MAP_SHARED, "MAP_SHARED" },
- { MAP_PRIVATE, "MAP_PRIVATE" },
- { MAP_FIXED, "MAP_FIXED" },
+ XLAT(MAP_SHARED),
+ XLAT(MAP_PRIVATE),
+ XLAT(MAP_FIXED),
#ifdef MAP_ANONYMOUS
- { MAP_ANONYMOUS,"MAP_ANONYMOUS" },
+ XLAT(MAP_ANONYMOUS),
#endif
#ifdef MAP_32BIT
- { MAP_32BIT, "MAP_32BIT" },
+ XLAT(MAP_32BIT),
#endif
#ifdef MAP_RENAME
- { MAP_RENAME, "MAP_RENAME" },
+ XLAT(MAP_RENAME),
#endif
#ifdef MAP_NORESERVE
- { MAP_NORESERVE,"MAP_NORESERVE" },
+ XLAT(MAP_NORESERVE),
#endif
#ifdef MAP_POPULATE
- { MAP_POPULATE, "MAP_POPULATE" },
+ XLAT(MAP_POPULATE),
#endif
#ifdef MAP_NONBLOCK
- { MAP_NONBLOCK, "MAP_NONBLOCK" },
+ XLAT(MAP_NONBLOCK),
#endif
/*
* XXX - this was introduced in SunOS 4.x to distinguish between
@@ -129,46 +129,49 @@
* and calls with it as "mmap()".
*/
#ifdef _MAP_NEW
- { _MAP_NEW, "_MAP_NEW" },
+ XLAT(_MAP_NEW),
#endif
#ifdef MAP_GROWSDOWN
- { MAP_GROWSDOWN,"MAP_GROWSDOWN" },
+ XLAT(MAP_GROWSDOWN),
#endif
#ifdef MAP_DENYWRITE
- { MAP_DENYWRITE,"MAP_DENYWRITE" },
+ XLAT(MAP_DENYWRITE),
#endif
#ifdef MAP_EXECUTABLE
- { MAP_EXECUTABLE,"MAP_EXECUTABLE"},
+ XLAT(MAP_EXECUTABLE),
#endif
#ifdef MAP_INHERIT
- { MAP_INHERIT, "MAP_INHERIT" },
+ XLAT(MAP_INHERIT),
#endif
#ifdef MAP_FILE
- { MAP_FILE, "MAP_FILE" },
+ XLAT(MAP_FILE),
#endif
#ifdef MAP_LOCKED
- { MAP_LOCKED, "MAP_LOCKED" },
+ XLAT(MAP_LOCKED),
#endif
/* FreeBSD ones */
#if defined(MAP_ANON) && (!defined(MAP_ANONYMOUS) || MAP_ANON != MAP_ANONYMOUS)
- { MAP_ANON, "MAP_ANON" },
+ XLAT(MAP_ANON),
#endif
#ifdef MAP_HASSEMAPHORE
- { MAP_HASSEMAPHORE,"MAP_HASSEMAPHORE"},
+ XLAT(MAP_HASSEMAPHORE),
#endif
#ifdef MAP_STACK
- { MAP_STACK, "MAP_STACK" },
+ XLAT(MAP_STACK),
+#endif
+#ifdef MAP_HUGETLB
+ XLAT(MAP_HUGETLB),
#endif
#if defined MAP_UNINITIALIZED && MAP_UNINITIALIZED > 0
- { MAP_UNINITIALIZED,"MAP_UNINITIALIZED"},
+ XLAT(MAP_UNINITIALIZED),
#endif
#ifdef MAP_NOSYNC
- { MAP_NOSYNC, "MAP_NOSYNC" },
+ XLAT(MAP_NOSYNC),
#endif
#ifdef MAP_NOCORE
- { MAP_NOCORE, "MAP_NOCORE" },
+ XLAT(MAP_NOCORE),
#endif
- { 0, NULL },
+ XLAT_END
};
static int
@@ -319,11 +322,11 @@
}
static const struct xlat mremap_flags[] = {
- { MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
+ XLAT(MREMAP_MAYMOVE),
#ifdef MREMAP_FIXED
- { MREMAP_FIXED, "MREMAP_FIXED" },
+ XLAT(MREMAP_FIXED),
#endif
- { 0, NULL }
+ XLAT_END
};
int
@@ -344,54 +347,54 @@
static const struct xlat madvise_cmds[] = {
#ifdef MADV_NORMAL
- { MADV_NORMAL, "MADV_NORMAL" },
+ XLAT(MADV_NORMAL),
#endif
#ifdef MADV_RANDOM
- { MADV_RANDOM, "MADV_RANDOM" },
+ XLAT(MADV_RANDOM),
#endif
#ifdef MADV_SEQUENTIAL
- { MADV_SEQUENTIAL, "MADV_SEQUENTIAL" },
+ XLAT(MADV_SEQUENTIAL),
#endif
#ifdef MADV_WILLNEED
- { MADV_WILLNEED, "MADV_WILLNEED" },
+ XLAT(MADV_WILLNEED),
#endif
#ifdef MADV_DONTNEED
- { MADV_DONTNEED, "MADV_DONTNEED" },
+ XLAT(MADV_DONTNEED),
#endif
#ifdef MADV_REMOVE
- { MADV_REMOVE, "MADV_REMOVE" },
+ XLAT(MADV_REMOVE),
#endif
#ifdef MADV_DONTFORK
- { MADV_DONTFORK, "MADV_DONTFORK" },
+ XLAT(MADV_DONTFORK),
#endif
#ifdef MADV_DOFORK
- { MADV_DOFORK, "MADV_DOFORK" },
+ XLAT(MADV_DOFORK),
#endif
#ifdef MADV_HWPOISON
- { MADV_HWPOISON, "MADV_HWPOISON" },
+ XLAT(MADV_HWPOISON),
#endif
#ifdef MADV_SOFT_OFFLINE
- { MADV_SOFT_OFFLINE, "MADV_SOFT_OFFLINE" },
+ XLAT(MADV_SOFT_OFFLINE),
#endif
#ifdef MADV_MERGEABLE
- { MADV_MERGEABLE, "MADV_MERGEABLE" },
+ XLAT(MADV_MERGEABLE),
#endif
#ifdef MADV_UNMERGEABLE
- { MADV_UNMERGEABLE, "MADV_UNMERGEABLE" },
+ XLAT(MADV_UNMERGEABLE),
#endif
#ifdef MADV_HUGEPAGE
- { MADV_HUGEPAGE, "MADV_HUGEPAGE" },
+ XLAT(MADV_HUGEPAGE),
#endif
#ifdef MADV_NOHUGEPAGE
- { MADV_NOHUGEPAGE, "MADV_NOHUGEPAGE" },
+ XLAT(MADV_NOHUGEPAGE),
#endif
#ifdef MADV_DONTDUMP
- { MADV_DONTDUMP, "MADV_DONTDUMP" },
+ XLAT(MADV_DONTDUMP),
#endif
#ifdef MADV_DODUMP
- { MADV_DODUMP, "MADV_DODUMP" },
+ XLAT(MADV_DODUMP),
#endif
- { 0, NULL },
+ XLAT_END
};
int
@@ -406,12 +409,12 @@
static const struct xlat mlockall_flags[] = {
#ifdef MCL_CURRENT
- { MCL_CURRENT, "MCL_CURRENT" },
+ XLAT(MCL_CURRENT),
#endif
#ifdef MCL_FUTURE
- { MCL_FUTURE, "MCL_FUTURE" },
+ XLAT(MCL_FUTURE),
#endif
- { 0, NULL}
+ XLAT_END
};
int
@@ -427,11 +430,11 @@
static const struct xlat mctl_sync[] = {
#ifdef MS_SYNC
- { MS_SYNC, "MS_SYNC" },
+ XLAT(MS_SYNC),
#endif
- { MS_ASYNC, "MS_ASYNC" },
- { MS_INVALIDATE,"MS_INVALIDATE" },
- { 0, NULL },
+ XLAT(MS_ASYNC),
+ XLAT(MS_INVALIDATE),
+ XLAT_END
};
int
@@ -453,18 +456,18 @@
#ifdef MC_SYNC
static const struct xlat mctl_funcs[] = {
- { MC_LOCK, "MC_LOCK" },
- { MC_LOCKAS, "MC_LOCKAS" },
- { MC_SYNC, "MC_SYNC" },
- { MC_UNLOCK, "MC_UNLOCK" },
- { MC_UNLOCKAS, "MC_UNLOCKAS" },
- { 0, NULL },
+ XLAT(MC_LOCK),
+ XLAT(MC_LOCKAS),
+ XLAT(MC_SYNC),
+ XLAT(MC_UNLOCK),
+ XLAT(MC_UNLOCKAS),
+ XLAT_END
};
static const struct xlat mctl_lockas[] = {
- { MCL_CURRENT, "MCL_CURRENT" },
- { MCL_FUTURE, "MCL_FUTURE" },
- { 0, NULL },
+ XLAT(MCL_CURRENT),
+ XLAT(MCL_FUTURE),
+ XLAT_END
};
int
@@ -681,30 +684,30 @@
#define MPOL_MF_MOVE_ALL (1<<2)
static const struct xlat policies[] = {
- { MPOL_DEFAULT, "MPOL_DEFAULT" },
- { MPOL_PREFERRED, "MPOL_PREFERRED" },
- { MPOL_BIND, "MPOL_BIND" },
- { MPOL_INTERLEAVE, "MPOL_INTERLEAVE" },
- { 0, NULL }
+ XLAT(MPOL_DEFAULT),
+ XLAT(MPOL_PREFERRED),
+ XLAT(MPOL_BIND),
+ XLAT(MPOL_INTERLEAVE),
+ XLAT_END
};
static const struct xlat mbindflags[] = {
- { MPOL_MF_STRICT, "MPOL_MF_STRICT" },
- { MPOL_MF_MOVE, "MPOL_MF_MOVE" },
- { MPOL_MF_MOVE_ALL, "MPOL_MF_MOVE_ALL" },
- { 0, NULL }
+ XLAT(MPOL_MF_STRICT),
+ XLAT(MPOL_MF_MOVE),
+ XLAT(MPOL_MF_MOVE_ALL),
+ XLAT_END
};
static const struct xlat mempolicyflags[] = {
- { MPOL_F_NODE, "MPOL_F_NODE" },
- { MPOL_F_ADDR, "MPOL_F_ADDR" },
- { 0, NULL }
+ XLAT(MPOL_F_NODE),
+ XLAT(MPOL_F_ADDR),
+ XLAT_END
};
static const struct xlat move_pages_flags[] = {
- { MPOL_MF_MOVE, "MPOL_MF_MOVE" },
- { MPOL_MF_MOVE_ALL, "MPOL_MF_MOVE_ALL" },
- { 0, NULL }
+ XLAT(MPOL_MF_MOVE),
+ XLAT(MPOL_MF_MOVE_ALL),
+ XLAT_END
};
static void
diff --git a/mtd.c b/mtd.c
index 5385147..9f8cae1 100644
--- a/mtd.c
+++ b/mtd.c
@@ -42,46 +42,46 @@
#endif
static const struct xlat mtd_mode_options[] = {
- { MTD_OPS_PLACE_OOB, "MTD_OPS_PLACE_OOB" },
- { MTD_OPS_AUTO_OOB, "MTD_OPS_AUTO_OOB" },
- { MTD_OPS_RAW, "MTD_OPS_RAW" },
- { 0, NULL },
+ XLAT(MTD_OPS_PLACE_OOB),
+ XLAT(MTD_OPS_AUTO_OOB),
+ XLAT(MTD_OPS_RAW),
+ XLAT_END
};
static const struct xlat mtd_type_options[] = {
- { MTD_ABSENT, "MTD_ABSENT" },
- { MTD_RAM, "MTD_RAM" },
- { MTD_ROM, "MTD_ROM" },
- { MTD_NORFLASH, "MTD_NORFLASH" },
- { MTD_NANDFLASH, "MTD_NANDFLASH" },
- { MTD_DATAFLASH, "MTD_DATAFLASH" },
- { MTD_UBIVOLUME, "MTD_UBIVOLUME" },
- { MTD_MLCNANDFLASH, "MTD_MLCNANDFLASH" },
- { 0, NULL },
+ XLAT(MTD_ABSENT),
+ XLAT(MTD_RAM),
+ XLAT(MTD_ROM),
+ XLAT(MTD_NORFLASH),
+ XLAT(MTD_NANDFLASH),
+ XLAT(MTD_DATAFLASH),
+ XLAT(MTD_UBIVOLUME),
+ XLAT(MTD_MLCNANDFLASH),
+ XLAT_END
};
static const struct xlat mtd_flags_options[] = {
- { MTD_WRITEABLE, "MTD_WRITEABLE" },
- { MTD_BIT_WRITEABLE, "MTD_BIT_WRITEABLE" },
- { MTD_NO_ERASE, "MTD_NO_ERASE" },
- { MTD_POWERUP_LOCK, "MTD_POWERUP_LOCK" },
- { 0, NULL },
+ XLAT(MTD_WRITEABLE),
+ XLAT(MTD_BIT_WRITEABLE),
+ XLAT(MTD_NO_ERASE),
+ XLAT(MTD_POWERUP_LOCK),
+ XLAT_END
};
static const struct xlat mtd_otp_options[] = {
- { MTD_OTP_OFF, "MTD_OTP_OFF" },
- { MTD_OTP_FACTORY, "MTD_OTP_FACTORY" },
- { MTD_OTP_USER, "MTD_OTP_USER" },
- { 0, NULL },
+ XLAT(MTD_OTP_OFF),
+ XLAT(MTD_OTP_FACTORY),
+ XLAT(MTD_OTP_USER),
+ XLAT_END
};
static const struct xlat mtd_nandecc_options[] = {
- { MTD_NANDECC_OFF, "MTD_NANDECC_OFF" },
- { MTD_NANDECC_PLACE, "MTD_NANDECC_PLACE" },
- { MTD_NANDECC_AUTOPLACE, "MTD_NANDECC_AUTOPLACE" },
- { MTD_NANDECC_PLACEONLY, "MTD_NANDECC_PLACEONLY" },
- { MTD_NANDECC_AUTOPL_USR, "MTD_NANDECC_AUTOPL_USR" },
- { 0, NULL },
+ XLAT(MTD_NANDECC_OFF),
+ XLAT(MTD_NANDECC_PLACE),
+ XLAT(MTD_NANDECC_AUTOPLACE),
+ XLAT(MTD_NANDECC_PLACEONLY),
+ XLAT(MTD_NANDECC_AUTOPL_USR),
+ XLAT_END
};
int mtd_ioctl(struct tcb *tcp, long code, long arg)
@@ -287,14 +287,14 @@
}
static const struct xlat ubi_volume_types[] = {
- { UBI_DYNAMIC_VOLUME, "UBI_DYNAMIC_VOLUME" },
- { UBI_STATIC_VOLUME, "UBI_STATIC_VOLUME" },
- { 0, NULL },
+ XLAT(UBI_DYNAMIC_VOLUME),
+ XLAT(UBI_STATIC_VOLUME),
+ XLAT_END
};
static const struct xlat ubi_volume_props[] = {
- { UBI_VOL_PROP_DIRECT_WRITE, "UBI_VOL_PROP_DIRECT_WRITE" },
- { 0, NULL },
+ XLAT(UBI_VOL_PROP_DIRECT_WRITE),
+ XLAT_END
};
int ubi_ioctl(struct tcb *tcp, long code, long arg)
diff --git a/net.c b/net.c
index 9ae783a..f09d1dd 100644
--- a/net.c
+++ b/net.c
@@ -94,681 +94,673 @@
# define PF_UNSPEC AF_UNSPEC
#endif
-/* Under Linux these are enums so we can't test for them with ifdef. */
-#define IPPROTO_EGP IPPROTO_EGP
-#define IPPROTO_PUP IPPROTO_PUP
-#define IPPROTO_IDP IPPROTO_IDP
-#define IPPROTO_IGMP IPPROTO_IGMP
-#define IPPROTO_RAW IPPROTO_RAW
-#define IPPROTO_MAX IPPROTO_MAX
-
static const struct xlat domains[] = {
#ifdef PF_UNSPEC
- { PF_UNSPEC, "PF_UNSPEC" },
+ XLAT(PF_UNSPEC),
#endif
#ifdef PF_LOCAL
- { PF_LOCAL, "PF_LOCAL" },
+ XLAT(PF_LOCAL),
#endif
#ifdef PF_UNIX
- { PF_UNIX, "PF_UNIX" },
+ XLAT(PF_UNIX),
#endif
#ifdef PF_INET
- { PF_INET, "PF_INET" },
+ XLAT(PF_INET),
#endif
#ifdef PF_AX25
- { PF_AX25, "PF_AX25" },
+ XLAT(PF_AX25),
#endif
#ifdef PF_IPX
- { PF_IPX, "PF_IPX" },
+ XLAT(PF_IPX),
#endif
#ifdef PF_APPLETALK
- { PF_APPLETALK, "PF_APPLETALK" },
+ XLAT(PF_APPLETALK),
#endif
#ifdef PF_NETROM
- { PF_NETROM, "PF_NETROM" },
+ XLAT(PF_NETROM),
#endif
#ifdef PF_BRIDGE
- { PF_BRIDGE, "PF_BRIDGE" },
+ XLAT(PF_BRIDGE),
#endif
#ifdef PF_ATMPVC
- { PF_ATMPVC, "PF_ATMPVC" },
+ XLAT(PF_ATMPVC),
#endif
#ifdef PF_X25
- { PF_X25, "PF_X25" },
+ XLAT(PF_X25),
#endif
#ifdef PF_INET6
- { PF_INET6, "PF_INET6" },
+ XLAT(PF_INET6),
#endif
#ifdef PF_ROSE
- { PF_ROSE, "PF_ROSE" },
+ XLAT(PF_ROSE),
#endif
#ifdef PF_DECnet
- { PF_DECnet, "PF_DECnet" },
+ XLAT(PF_DECnet),
#endif
#ifdef PF_NETBEUI
- { PF_NETBEUI, "PF_NETBEUI" },
+ XLAT(PF_NETBEUI),
#endif
#ifdef PF_SECURITY
- { PF_SECURITY, "PF_SECURITY" },
+ XLAT(PF_SECURITY),
#endif
#ifdef PF_KEY
- { PF_KEY, "PF_KEY" },
+ XLAT(PF_KEY),
#endif
#ifdef PF_NETLINK
- { PF_NETLINK, "PF_NETLINK" },
+ XLAT(PF_NETLINK),
#endif
#ifdef PF_ROUTE
- { PF_ROUTE, "PF_ROUTE" },
+ XLAT(PF_ROUTE),
#endif
#ifdef PF_PACKET
- { PF_PACKET, "PF_PACKET" },
+ XLAT(PF_PACKET),
#endif
#ifdef PF_ASH
- { PF_ASH, "PF_ASH" },
+ XLAT(PF_ASH),
#endif
#ifdef PF_ECONET
- { PF_ECONET, "PF_ECONET" },
+ XLAT(PF_ECONET),
#endif
#ifdef PF_ATMSVC
- { PF_ATMSVC, "PF_ATMSVC" },
+ XLAT(PF_ATMSVC),
#endif
#ifdef PF_RDS
- { PF_RDS, "PF_RDS" },
+ XLAT(PF_RDS),
#endif
#ifdef PF_SNA
- { PF_SNA, "PF_SNA" },
+ XLAT(PF_SNA),
#endif
#ifdef PF_IRDA
- { PF_IRDA, "PF_IRDA" },
+ XLAT(PF_IRDA),
#endif
#ifdef PF_PPPOX
- { PF_PPPOX, "PF_PPPOX" },
+ XLAT(PF_PPPOX),
#endif
#ifdef PF_WANPIPE
- { PF_WANPIPE, "PF_WANPIPE" },
+ XLAT(PF_WANPIPE),
#endif
#ifdef PF_LLC
- { PF_LLC, "PF_LLC" },
+ XLAT(PF_LLC),
#endif
#ifdef PF_CAN
- { PF_CAN, "PF_CAN" },
+ XLAT(PF_CAN),
#endif
#ifdef PF_TIPC
- { PF_TIPC, "PF_TIPC" },
+ XLAT(PF_TIPC),
#endif
#ifdef PF_BLUETOOTH
- { PF_BLUETOOTH, "PF_BLUETOOTH" },
+ XLAT(PF_BLUETOOTH),
#endif
#ifdef PF_IUCV
- { PF_IUCV, "PF_IUCV" },
+ XLAT(PF_IUCV),
#endif
#ifdef PF_RXRPC
- { PF_RXRPC, "PF_RXRPC" },
+ XLAT(PF_RXRPC),
#endif
#ifdef PF_ISDN
- { PF_ISDN, "PF_ISDN" },
+ XLAT(PF_ISDN),
#endif
#ifdef PF_PHONET
- { PF_PHONET, "PF_PHONET" },
+ XLAT(PF_PHONET),
#endif
#ifdef PF_IEEE802154
- { PF_IEEE802154,"PF_IEEE802154" },
+ XLAT(PF_IEEE802154),
#endif
#ifdef PF_CAIF
- { PF_CAIF, "PF_CAIF" },
+ XLAT(PF_CAIF),
#endif
#ifdef PF_ALG
- { PF_ALG, "PF_ALG" },
+ XLAT(PF_ALG),
#endif
#ifdef PF_NFC
- { PF_NFC, "PF_NFC" },
+ XLAT(PF_NFC),
#endif
#ifdef PF_VSOCK
- { PF_VSOCK, "PF_VSOCK" },
+ XLAT(PF_VSOCK),
#endif
- { 0, NULL },
+ XLAT_END
};
const struct xlat addrfams[] = {
#ifdef AF_UNSPEC
- { AF_UNSPEC, "AF_UNSPEC" },
+ XLAT(AF_UNSPEC),
#endif
#ifdef AF_LOCAL
- { AF_LOCAL, "AF_LOCAL" },
+ XLAT(AF_LOCAL),
#endif
#ifdef AF_UNIX
- { AF_UNIX, "AF_UNIX" },
+ XLAT(AF_UNIX),
#endif
#ifdef AF_INET
- { AF_INET, "AF_INET" },
+ XLAT(AF_INET),
#endif
#ifdef AF_AX25
- { AF_AX25, "AF_AX25" },
+ XLAT(AF_AX25),
#endif
#ifdef AF_IPX
- { AF_IPX, "AF_IPX" },
+ XLAT(AF_IPX),
#endif
#ifdef AF_APPLETALK
- { AF_APPLETALK, "AF_APPLETALK" },
+ XLAT(AF_APPLETALK),
#endif
#ifdef AF_NETROM
- { AF_NETROM, "AF_NETROM" },
+ XLAT(AF_NETROM),
#endif
#ifdef AF_BRIDGE
- { AF_BRIDGE, "AF_BRIDGE" },
+ XLAT(AF_BRIDGE),
#endif
#ifdef AF_ATMPVC
- { AF_ATMPVC, "AF_ATMPVC" },
+ XLAT(AF_ATMPVC),
#endif
#ifdef AF_X25
- { AF_X25, "AF_X25" },
+ XLAT(AF_X25),
#endif
#ifdef AF_INET6
- { AF_INET6, "AF_INET6" },
+ XLAT(AF_INET6),
#endif
#ifdef AF_ROSE
- { AF_ROSE, "AF_ROSE" },
+ XLAT(AF_ROSE),
#endif
#ifdef AF_DECnet
- { AF_DECnet, "AF_DECnet" },
+ XLAT(AF_DECnet),
#endif
#ifdef AF_NETBEUI
- { AF_NETBEUI, "AF_NETBEUI" },
+ XLAT(AF_NETBEUI),
#endif
#ifdef AF_SECURITY
- { AF_SECURITY, "AF_SECURITY" },
+ XLAT(AF_SECURITY),
#endif
#ifdef AF_KEY
- { AF_KEY, "AF_KEY" },
+ XLAT(AF_KEY),
#endif
#ifdef AF_NETLINK
- { AF_NETLINK, "AF_NETLINK" },
+ XLAT(AF_NETLINK),
#endif
#ifdef AF_ROUTE
- { AF_ROUTE, "AF_ROUTE" },
+ XLAT(AF_ROUTE),
#endif
#ifdef AF_PACKET
- { AF_PACKET, "AF_PACKET" },
+ XLAT(AF_PACKET),
#endif
#ifdef AF_ASH
- { AF_ASH, "AF_ASH" },
+ XLAT(AF_ASH),
#endif
#ifdef AF_ECONET
- { AF_ECONET, "AF_ECONET" },
+ XLAT(AF_ECONET),
#endif
#ifdef AF_ATMSVC
- { AF_ATMSVC, "AF_ATMSVC" },
+ XLAT(AF_ATMSVC),
#endif
#ifdef AF_RDS
- { AF_RDS, "AF_RDS" },
+ XLAT(AF_RDS),
#endif
#ifdef AF_SNA
- { AF_SNA, "AF_SNA" },
+ XLAT(AF_SNA),
#endif
#ifdef AF_IRDA
- { AF_IRDA, "AF_IRDA" },
+ XLAT(AF_IRDA),
#endif
#ifdef AF_PPPOX
- { AF_PPPOX, "AF_PPPOX" },
+ XLAT(AF_PPPOX),
#endif
#ifdef AF_WANPIPE
- { AF_WANPIPE, "AF_WANPIPE" },
+ XLAT(AF_WANPIPE),
#endif
#ifdef AF_LLC
- { AF_LLC, "AF_LLC" },
+ XLAT(AF_LLC),
#endif
#ifdef AF_CAN
- { AF_CAN, "AF_CAN" },
+ XLAT(AF_CAN),
#endif
#ifdef AF_TIPC
- { AF_TIPC, "AF_TIPC" },
+ XLAT(AF_TIPC),
#endif
#ifdef AF_BLUETOOTH
- { AF_BLUETOOTH, "AF_BLUETOOTH" },
+ XLAT(AF_BLUETOOTH),
#endif
#ifdef AF_IUCV
- { AF_IUCV, "AF_IUCV" },
+ XLAT(AF_IUCV),
#endif
#ifdef AF_RXRPC
- { AF_RXRPC, "AF_RXRPC" },
+ XLAT(AF_RXRPC),
#endif
#ifdef AF_ISDN
- { AF_ISDN, "AF_ISDN" },
+ XLAT(AF_ISDN),
#endif
#ifdef AF_PHONET
- { AF_PHONET, "AF_PHONET" },
+ XLAT(AF_PHONET),
#endif
#ifdef AF_IEEE802154
- { AF_IEEE802154,"AF_IEEE802154" },
+ XLAT(AF_IEEE802154),
#endif
#ifdef AF_CAIF
- { AF_CAIF, "AF_CAIF" },
+ XLAT(AF_CAIF),
#endif
#ifdef AF_ALG
- { AF_ALG, "AF_ALG" },
+ XLAT(AF_ALG),
#endif
#ifdef AF_NFC
- { AF_NFC, "AF_NFC" },
+ XLAT(AF_NFC),
#endif
#ifdef AF_VSOCK
- { AF_VSOCK, "AF_VSOCK" },
+ XLAT(AF_VSOCK),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat socktypes[] = {
- { SOCK_STREAM, "SOCK_STREAM" },
- { SOCK_DGRAM, "SOCK_DGRAM" },
+ XLAT(SOCK_STREAM),
+ XLAT(SOCK_DGRAM),
#ifdef SOCK_RAW
- { SOCK_RAW, "SOCK_RAW" },
+ XLAT(SOCK_RAW),
#endif
#ifdef SOCK_RDM
- { SOCK_RDM, "SOCK_RDM" },
+ XLAT(SOCK_RDM),
#endif
#ifdef SOCK_SEQPACKET
- { SOCK_SEQPACKET,"SOCK_SEQPACKET"},
+ XLAT(SOCK_SEQPACKET),
#endif
#ifdef SOCK_DCCP
- { SOCK_DCCP, "SOCK_DCCP" },
+ XLAT(SOCK_DCCP),
#endif
#ifdef SOCK_PACKET
- { SOCK_PACKET, "SOCK_PACKET" },
+ XLAT(SOCK_PACKET),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat sock_type_flags[] = {
#ifdef SOCK_CLOEXEC
- { SOCK_CLOEXEC, "SOCK_CLOEXEC" },
+ XLAT(SOCK_CLOEXEC),
#endif
#ifdef SOCK_NONBLOCK
- { SOCK_NONBLOCK,"SOCK_NONBLOCK" },
+ XLAT(SOCK_NONBLOCK),
#endif
- { 0, NULL },
+ XLAT_END
};
#ifndef SOCK_TYPE_MASK
# define SOCK_TYPE_MASK 0xf
#endif
static const struct xlat socketlayers[] = {
#if defined(SOL_IP)
- { SOL_IP, "SOL_IP" },
+ XLAT(SOL_IP),
#endif
#if defined(SOL_ICMP)
- { SOL_ICMP, "SOL_ICMP" },
+ XLAT(SOL_ICMP),
#endif
#if defined(SOL_TCP)
- { SOL_TCP, "SOL_TCP" },
+ XLAT(SOL_TCP),
#endif
#if defined(SOL_UDP)
- { SOL_UDP, "SOL_UDP" },
+ XLAT(SOL_UDP),
#endif
#if defined(SOL_IPV6)
- { SOL_IPV6, "SOL_IPV6" },
+ XLAT(SOL_IPV6),
#endif
#if defined(SOL_ICMPV6)
- { SOL_ICMPV6, "SOL_ICMPV6" },
+ XLAT(SOL_ICMPV6),
#endif
#if defined(SOL_SCTP)
- { SOL_SCTP, "SOL_SCTP" },
+ XLAT(SOL_SCTP),
#endif
#if defined(SOL_UDPLITE)
- { SOL_UDPLITE, "SOL_UDPLITE" },
+ XLAT(SOL_UDPLITE),
#endif
#if defined(SOL_RAW)
- { SOL_RAW, "SOL_RAW" },
+ XLAT(SOL_RAW),
#endif
#if defined(SOL_IPX)
- { SOL_IPX, "SOL_IPX" },
+ XLAT(SOL_IPX),
#endif
#if defined(SOL_AX25)
- { SOL_AX25, "SOL_AX25" },
+ XLAT(SOL_AX25),
#endif
#if defined(SOL_ATALK)
- { SOL_ATALK, "SOL_ATALK" },
+ XLAT(SOL_ATALK),
#endif
#if defined(SOL_NETROM)
- { SOL_NETROM, "SOL_NETROM" },
+ XLAT(SOL_NETROM),
#endif
#if defined(SOL_ROSE)
- { SOL_ROSE, "SOL_ROSE" },
+ XLAT(SOL_ROSE),
#endif
#if defined(SOL_DECNET)
- { SOL_DECNET, "SOL_DECNET" },
+ XLAT(SOL_DECNET),
#endif
#if defined(SOL_X25)
- { SOL_X25, "SOL_X25" },
+ XLAT(SOL_X25),
#endif
#if defined(SOL_PACKET)
- { SOL_PACKET, "SOL_PACKET" },
+ XLAT(SOL_PACKET),
#endif
#if defined(SOL_ATM)
- { SOL_ATM, "SOL_ATM" },
+ XLAT(SOL_ATM),
#endif
#if defined(SOL_AAL)
- { SOL_AAL, "SOL_AAL" },
+ XLAT(SOL_AAL),
#endif
#if defined(SOL_IRDA)
- { SOL_IRDA, "SOL_IRDA" },
+ XLAT(SOL_IRDA),
#endif
#if defined(SOL_NETBEUI)
- { SOL_NETBEUI, "SOL_NETBEUI" },
+ XLAT(SOL_NETBEUI),
#endif
#if defined(SOL_LLC)
- { SOL_LLC, "SOL_LLC" },
+ XLAT(SOL_LLC),
#endif
#if defined(SOL_DCCP)
- { SOL_DCCP, "SOL_DCCP" },
+ XLAT(SOL_DCCP),
#endif
#if defined(SOL_NETLINK)
- { SOL_NETLINK, "SOL_NETLINK" },
+ XLAT(SOL_NETLINK),
#endif
#if defined(SOL_TIPC)
- { SOL_TIPC, "SOL_TIPC" },
+ XLAT(SOL_TIPC),
#endif
#if defined(SOL_RXRPC)
- { SOL_RXRPC, "SOL_RXRPC" },
+ XLAT(SOL_RXRPC),
#endif
#if defined(SOL_PPPOL2TP)
- { SOL_PPPOL2TP, "SOL_PPPOL2TP" },
+ XLAT(SOL_PPPOL2TP),
#endif
#if defined(SOL_BLUETOOTH)
- { SOL_BLUETOOTH,"SOL_BLUETOOTH" },
+ XLAT(SOL_BLUETOOTH),
#endif
#if defined(SOL_PNPIPE)
- { SOL_PNPIPE, "SOL_PNPIPE" },
+ XLAT(SOL_PNPIPE),
#endif
#if defined(SOL_RDS)
- { SOL_RDS, "SOL_RDS" },
+ XLAT(SOL_RDS),
#endif
#if defined(SOL_IUVC)
- { SOL_IUCV, "SOL_IUCV" },
+ XLAT(SOL_IUCV),
#endif
#if defined(SOL_CAIF)
- { SOL_CAIF, "SOL_CAIF" },
+ XLAT(SOL_CAIF),
#endif
- { SOL_SOCKET, "SOL_SOCKET" }, /* Never used! */
+ XLAT(SOL_SOCKET), /* Never used! */
/* The SOL_* array should remain not NULL-terminated. */
};
/*** WARNING: DANGER WILL ROBINSON: NOTE "socketlayers" array above
falls into "protocols" array below!!!! This is intended!!! ***/
static const struct xlat protocols[] = {
- { IPPROTO_IP, "IPPROTO_IP" },
- { IPPROTO_ICMP, "IPPROTO_ICMP" },
- { IPPROTO_TCP, "IPPROTO_TCP" },
- { IPPROTO_UDP, "IPPROTO_UDP" },
+ XLAT(IPPROTO_IP),
+ XLAT(IPPROTO_ICMP),
+ XLAT(IPPROTO_TCP),
+ XLAT(IPPROTO_UDP),
#ifdef IPPROTO_IGMP
- { IPPROTO_IGMP, "IPPROTO_IGMP" },
+ XLAT(IPPROTO_IGMP),
#endif
#ifdef IPPROTO_GGP
- { IPPROTO_GGP, "IPPROTO_GGP" },
+ XLAT(IPPROTO_GGP),
#endif
#ifdef IPPROTO_IPIP
- { IPPROTO_IPIP, "IPPROTO_IPIP" },
+ XLAT(IPPROTO_IPIP),
#endif
#ifdef IPPROTO_EGP
- { IPPROTO_EGP, "IPPROTO_EGP" },
+ XLAT(IPPROTO_EGP),
#endif
#ifdef IPPROTO_PUP
- { IPPROTO_PUP, "IPPROTO_PUP" },
+ XLAT(IPPROTO_PUP),
#endif
#ifdef IPPROTO_IDP
- { IPPROTO_IDP, "IPPROTO_IDP" },
+ XLAT(IPPROTO_IDP),
#endif
#ifdef IPPROTO_TP
- { IPPROTO_TP, "IPPROTO_TP" },
+ XLAT(IPPROTO_TP),
#endif
#ifdef IPPROTO_DCCP
- { IPPROTO_DCCP, "IPPROTO_DCCP" },
+ XLAT(IPPROTO_DCCP),
#endif
#ifdef IPPROTO_IPV6
- { IPPROTO_IPV6, "IPPROTO_IPV6" },
+ XLAT(IPPROTO_IPV6),
#endif
#ifdef IPPROTO_ROUTING
- { IPPROTO_ROUTING, "IPPROTO_ROUTING" },
+ XLAT(IPPROTO_ROUTING),
#endif
#ifdef IPPROTO_FRAGMENT
- { IPPROTO_FRAGMENT, "IPPROTO_FRAGMENT" },
+ XLAT(IPPROTO_FRAGMENT),
#endif
#ifdef IPPROTO_RSVP
- { IPPROTO_RSVP, "IPPROTO_RSVP" },
+ XLAT(IPPROTO_RSVP),
#endif
#ifdef IPPROTO_GRE
- { IPPROTO_GRE, "IPPROTO_GRE" },
+ XLAT(IPPROTO_GRE),
#endif
#ifdef IPPROTO_ESP
- { IPPROTO_ESP, "IPPROTO_ESP" },
+ XLAT(IPPROTO_ESP),
#endif
#ifdef IPPROTO_AH
- { IPPROTO_AH, "IPPROTO_AH" },
+ XLAT(IPPROTO_AH),
#endif
#ifdef IPPROTO_ICMPV6
- { IPPROTO_ICMPV6, "IPPROTO_ICMPV6" },
+ XLAT(IPPROTO_ICMPV6),
#endif
#ifdef IPPROTO_NONE
- { IPPROTO_NONE, "IPPROTO_NONE" },
+ XLAT(IPPROTO_NONE),
#endif
#ifdef IPPROTO_DSTOPTS
- { IPPROTO_DSTOPTS, "IPPROTO_DSTOPTS" },
+ XLAT(IPPROTO_DSTOPTS),
#endif
#ifdef IPPROTO_HELLO
- { IPPROTO_HELLO, "IPPROTO_HELLO" },
+ XLAT(IPPROTO_HELLO),
#endif
#ifdef IPPROTO_ND
- { IPPROTO_ND, "IPPROTO_ND" },
+ XLAT(IPPROTO_ND),
#endif
#ifdef IPPROTO_MTP
- { IPPROTO_MTP, "IPPROTO_MTP" },
+ XLAT(IPPROTO_MTP),
#endif
#ifdef IPPROTO_ENCAP
- { IPPROTO_ENCAP, "IPPROTO_ENCAP" },
+ XLAT(IPPROTO_ENCAP),
#endif
#ifdef IPPROTO_PIM
- { IPPROTO_PIM, "IPPROTO_PIM" },
+ XLAT(IPPROTO_PIM),
#endif
#ifdef IPPROTO_COMP
- { IPPROTO_COMP, "IPPROTO_COMP" },
+ XLAT(IPPROTO_COMP),
#endif
#ifdef IPPROTO_SCTP
- { IPPROTO_SCTP, "IPPROTO_SCTP" },
+ XLAT(IPPROTO_SCTP),
#endif
#ifdef IPPROTO_UDPLITE
- { IPPROTO_UDPLITE, "IPPROTO_UDPLITE" },
+ XLAT(IPPROTO_UDPLITE),
#endif
#ifdef IPPROTO_RAW
- { IPPROTO_RAW, "IPPROTO_RAW" },
+ XLAT(IPPROTO_RAW),
#endif
#ifdef IPPROTO_MAX
- { IPPROTO_MAX, "IPPROTO_MAX" },
+ XLAT(IPPROTO_MAX),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat msg_flags[] = {
- { MSG_OOB, "MSG_OOB" },
+ XLAT(MSG_OOB),
#ifdef MSG_PEEK
- { MSG_PEEK, "MSG_PEEK" },
+ XLAT(MSG_PEEK),
#endif
#ifdef MSG_DONTROUTE
- { MSG_DONTROUTE, "MSG_DONTROUTE" },
+ XLAT(MSG_DONTROUTE),
#endif
#ifdef MSG_CTRUNC
- { MSG_CTRUNC, "MSG_CTRUNC" },
+ XLAT(MSG_CTRUNC),
#endif
#ifdef MSG_PROBE
- { MSG_PROBE, "MSG_PROBE" },
+ XLAT(MSG_PROBE),
#endif
#ifdef MSG_TRUNC
- { MSG_TRUNC, "MSG_TRUNC" },
+ XLAT(MSG_TRUNC),
#endif
#ifdef MSG_DONTWAIT
- { MSG_DONTWAIT, "MSG_DONTWAIT" },
+ XLAT(MSG_DONTWAIT),
#endif
#ifdef MSG_EOR
- { MSG_EOR, "MSG_EOR" },
+ XLAT(MSG_EOR),
#endif
#ifdef MSG_WAITALL
- { MSG_WAITALL, "MSG_WAITALL" },
+ XLAT(MSG_WAITALL),
#endif
#ifdef MSG_FIN
- { MSG_FIN, "MSG_FIN" },
+ XLAT(MSG_FIN),
#endif
#ifdef MSG_SYN
- { MSG_SYN, "MSG_SYN" },
+ XLAT(MSG_SYN),
#endif
#ifdef MSG_CONFIRM
- { MSG_CONFIRM, "MSG_CONFIRM" },
+ XLAT(MSG_CONFIRM),
#endif
#ifdef MSG_RST
- { MSG_RST, "MSG_RST" },
+ XLAT(MSG_RST),
#endif
#ifdef MSG_ERRQUEUE
- { MSG_ERRQUEUE, "MSG_ERRQUEUE" },
+ XLAT(MSG_ERRQUEUE),
#endif
#ifdef MSG_NOSIGNAL
- { MSG_NOSIGNAL, "MSG_NOSIGNAL" },
+ XLAT(MSG_NOSIGNAL),
#endif
#ifdef MSG_MORE
- { MSG_MORE, "MSG_MORE" },
+ XLAT(MSG_MORE),
#endif
#ifdef MSG_WAITFORONE
- { MSG_WAITFORONE, "MSG_WAITFORONE" },
+ XLAT(MSG_WAITFORONE),
#endif
#ifdef MSG_EOF
- { MSG_EOF, "MSG_EOF" },
+ XLAT(MSG_EOF),
#endif
#ifdef MSG_FASTOPEN
- { MSG_FASTOPEN, "MSG_FASTOPEN" },
+ XLAT(MSG_FASTOPEN),
#endif
#ifdef MSG_CMSG_CLOEXEC
- { MSG_CMSG_CLOEXEC, "MSG_CMSG_CLOEXEC" },
+ XLAT(MSG_CMSG_CLOEXEC),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat sockoptions[] = {
#ifdef SO_ACCEPTCONN
- { SO_ACCEPTCONN, "SO_ACCEPTCONN" },
+ XLAT(SO_ACCEPTCONN),
#endif
#ifdef SO_ALLRAW
- { SO_ALLRAW, "SO_ALLRAW" },
+ XLAT(SO_ALLRAW),
#endif
#ifdef SO_ATTACH_FILTER
- { SO_ATTACH_FILTER, "SO_ATTACH_FILTER" },
+ XLAT(SO_ATTACH_FILTER),
#endif
#ifdef SO_BINDTODEVICE
- { SO_BINDTODEVICE, "SO_BINDTODEVICE" },
+ XLAT(SO_BINDTODEVICE),
#endif
#ifdef SO_BROADCAST
- { SO_BROADCAST, "SO_BROADCAST" },
+ XLAT(SO_BROADCAST),
#endif
#ifdef SO_BSDCOMPAT
- { SO_BSDCOMPAT, "SO_BSDCOMPAT" },
+ XLAT(SO_BSDCOMPAT),
#endif
#ifdef SO_DEBUG
- { SO_DEBUG, "SO_DEBUG" },
+ XLAT(SO_DEBUG),
#endif
#ifdef SO_DETACH_FILTER
- { SO_DETACH_FILTER, "SO_DETACH_FILTER" },
+ XLAT(SO_DETACH_FILTER),
#endif
#ifdef SO_DONTROUTE
- { SO_DONTROUTE, "SO_DONTROUTE" },
+ XLAT(SO_DONTROUTE),
#endif
#ifdef SO_ERROR
- { SO_ERROR, "SO_ERROR" },
+ XLAT(SO_ERROR),
#endif
#ifdef SO_ICS
- { SO_ICS, "SO_ICS" },
+ XLAT(SO_ICS),
#endif
#ifdef SO_IMASOCKET
- { SO_IMASOCKET, "SO_IMASOCKET" },
+ XLAT(SO_IMASOCKET),
#endif
#ifdef SO_KEEPALIVE
- { SO_KEEPALIVE, "SO_KEEPALIVE" },
+ XLAT(SO_KEEPALIVE),
#endif
#ifdef SO_LINGER
- { SO_LINGER, "SO_LINGER" },
+ XLAT(SO_LINGER),
#endif
#ifdef SO_LISTENING
- { SO_LISTENING, "SO_LISTENING" },
+ XLAT(SO_LISTENING),
#endif
#ifdef SO_MGMT
- { SO_MGMT, "SO_MGMT" },
+ XLAT(SO_MGMT),
#endif
#ifdef SO_NO_CHECK
- { SO_NO_CHECK, "SO_NO_CHECK" },
+ XLAT(SO_NO_CHECK),
#endif
#ifdef SO_OOBINLINE
- { SO_OOBINLINE, "SO_OOBINLINE" },
+ XLAT(SO_OOBINLINE),
#endif
#ifdef SO_ORDREL
- { SO_ORDREL, "SO_ORDREL" },
+ XLAT(SO_ORDREL),
#endif
#ifdef SO_PARALLELSVR
- { SO_PARALLELSVR, "SO_PARALLELSVR" },
+ XLAT(SO_PARALLELSVR),
#endif
#ifdef SO_PASSCRED
- { SO_PASSCRED, "SO_PASSCRED" },
+ XLAT(SO_PASSCRED),
#endif
#ifdef SO_PEERCRED
- { SO_PEERCRED, "SO_PEERCRED" },
+ XLAT(SO_PEERCRED),
#endif
#ifdef SO_PEERNAME
- { SO_PEERNAME, "SO_PEERNAME" },
+ XLAT(SO_PEERNAME),
#endif
#ifdef SO_PEERSEC
- { SO_PEERSEC, "SO_PEERSEC" },
+ XLAT(SO_PEERSEC),
#endif
#ifdef SO_PRIORITY
- { SO_PRIORITY, "SO_PRIORITY" },
+ XLAT(SO_PRIORITY),
#endif
#ifdef SO_PROTOTYPE
- { SO_PROTOTYPE, "SO_PROTOTYPE" },
+ XLAT(SO_PROTOTYPE),
#endif
#ifdef SO_RCVBUF
- { SO_RCVBUF, "SO_RCVBUF" },
+ XLAT(SO_RCVBUF),
#endif
#ifdef SO_RCVLOWAT
- { SO_RCVLOWAT, "SO_RCVLOWAT" },
+ XLAT(SO_RCVLOWAT),
#endif
#ifdef SO_RCVTIMEO
- { SO_RCVTIMEO, "SO_RCVTIMEO" },
+ XLAT(SO_RCVTIMEO),
#endif
#ifdef SO_RDWR
- { SO_RDWR, "SO_RDWR" },
+ XLAT(SO_RDWR),
#endif
#ifdef SO_REUSEADDR
- { SO_REUSEADDR, "SO_REUSEADDR" },
+ XLAT(SO_REUSEADDR),
#endif
#ifdef SO_REUSEPORT
- { SO_REUSEPORT, "SO_REUSEPORT" },
+ XLAT(SO_REUSEPORT),
#endif
#ifdef SO_SECURITY_AUTHENTICATION
- { SO_SECURITY_AUTHENTICATION,"SO_SECURITY_AUTHENTICATION"},
+ XLAT(SO_SECURITY_AUTHENTICATION),
#endif
#ifdef SO_SECURITY_ENCRYPTION_NETWORK
- { SO_SECURITY_ENCRYPTION_NETWORK,"SO_SECURITY_ENCRYPTION_NETWORK"},
+ XLAT(SO_SECURITY_ENCRYPTION_NETWORK),
#endif
#ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
- { SO_SECURITY_ENCRYPTION_TRANSPORT,"SO_SECURITY_ENCRYPTION_TRANSPORT"},
+ XLAT(SO_SECURITY_ENCRYPTION_TRANSPORT),
#endif
#ifdef SO_SEMA
- { SO_SEMA, "SO_SEMA" },
+ XLAT(SO_SEMA),
#endif
#ifdef SO_SNDBUF
- { SO_SNDBUF, "SO_SNDBUF" },
+ XLAT(SO_SNDBUF),
#endif
#ifdef SO_SNDLOWAT
- { SO_SNDLOWAT, "SO_SNDLOWAT" },
+ XLAT(SO_SNDLOWAT),
#endif
#ifdef SO_SNDTIMEO
- { SO_SNDTIMEO, "SO_SNDTIMEO" },
+ XLAT(SO_SNDTIMEO),
#endif
#ifdef SO_TIMESTAMP
- { SO_TIMESTAMP, "SO_TIMESTAMP" },
+ XLAT(SO_TIMESTAMP),
#endif
#ifdef SO_TYPE
- { SO_TYPE, "SO_TYPE" },
+ XLAT(SO_TYPE),
#endif
#ifdef SO_USELOOPBACK
- { SO_USELOOPBACK, "SO_USELOOPBACK" },
+ XLAT(SO_USELOOPBACK),
#endif
- { 0, NULL },
+ XLAT_END
};
#if !defined(SOL_IP) && defined(IPPROTO_IP)
@@ -778,343 +770,403 @@
#ifdef SOL_IP
static const struct xlat sockipoptions[] = {
#ifdef IP_TOS
- { IP_TOS, "IP_TOS" },
+ XLAT(IP_TOS),
#endif
#ifdef IP_TTL
- { IP_TTL, "IP_TTL" },
+ XLAT(IP_TTL),
#endif
#ifdef IP_HDRINCL
- { IP_HDRINCL, "IP_HDRINCL" },
+ XLAT(IP_HDRINCL),
#endif
#ifdef IP_OPTIONS
- { IP_OPTIONS, "IP_OPTIONS" },
+ XLAT(IP_OPTIONS),
#endif
#ifdef IP_ROUTER_ALERT
- { IP_ROUTER_ALERT, "IP_ROUTER_ALERT" },
+ XLAT(IP_ROUTER_ALERT),
#endif
#ifdef IP_RECVOPTIONS
- { IP_RECVOPTIONS, "IP_RECVOPTIONS" },
+ XLAT(IP_RECVOPTIONS),
#endif
#ifdef IP_RECVOPTS
- { IP_RECVOPTS, "IP_RECVOPTS" },
+ XLAT(IP_RECVOPTS),
#endif
#ifdef IP_RECVRETOPTS
- { IP_RECVRETOPTS, "IP_RECVRETOPTS" },
+ XLAT(IP_RECVRETOPTS),
#endif
#ifdef IP_RECVDSTADDR
- { IP_RECVDSTADDR, "IP_RECVDSTADDR" },
+ XLAT(IP_RECVDSTADDR),
#endif
#ifdef IP_RETOPTS
- { IP_RETOPTS, "IP_RETOPTS" },
+ XLAT(IP_RETOPTS),
#endif
#ifdef IP_PKTINFO
- { IP_PKTINFO, "IP_PKTINFO" },
+ XLAT(IP_PKTINFO),
#endif
#ifdef IP_PKTOPTIONS
- { IP_PKTOPTIONS, "IP_PKTOPTIONS" },
+ XLAT(IP_PKTOPTIONS),
#endif
#ifdef IP_MTU_DISCOVER
- { IP_MTU_DISCOVER, "IP_MTU_DISCOVER" },
+ XLAT(IP_MTU_DISCOVER),
#endif
#ifdef IP_RECVERR
- { IP_RECVERR, "IP_RECVERR" },
+ XLAT(IP_RECVERR),
#endif
#ifdef IP_RECVTTL
- { IP_RECVTTL, "IP_RECVTTL" },
+ XLAT(IP_RECVTTL),
#endif
#ifdef IP_RECVTOS
- { IP_RECVTOS, "IP_RECVTOS" },
+ XLAT(IP_RECVTOS),
#endif
#ifdef IP_MTU
- { IP_MTU, "IP_MTU" },
+ XLAT(IP_MTU),
#endif
#ifdef IP_MULTICAST_IF
- { IP_MULTICAST_IF, "IP_MULTICAST_IF" },
+ XLAT(IP_MULTICAST_IF),
#endif
#ifdef IP_MULTICAST_TTL
- { IP_MULTICAST_TTL, "IP_MULTICAST_TTL" },
+ XLAT(IP_MULTICAST_TTL),
#endif
#ifdef IP_MULTICAST_LOOP
- { IP_MULTICAST_LOOP, "IP_MULTICAST_LOOP" },
+ XLAT(IP_MULTICAST_LOOP),
#endif
#ifdef IP_ADD_MEMBERSHIP
- { IP_ADD_MEMBERSHIP, "IP_ADD_MEMBERSHIP" },
+ XLAT(IP_ADD_MEMBERSHIP),
#endif
#ifdef IP_DROP_MEMBERSHIP
- { IP_DROP_MEMBERSHIP, "IP_DROP_MEMBERSHIP" },
+ XLAT(IP_DROP_MEMBERSHIP),
#endif
#ifdef IP_BROADCAST_IF
- { IP_BROADCAST_IF, "IP_BROADCAST_IF" },
+ XLAT(IP_BROADCAST_IF),
#endif
#ifdef IP_RECVIFINDEX
- { IP_RECVIFINDEX, "IP_RECVIFINDEX" },
+ XLAT(IP_RECVIFINDEX),
#endif
#ifdef IP_MSFILTER
- { IP_MSFILTER, "IP_MSFILTER" },
+ XLAT(IP_MSFILTER),
#endif
#ifdef MCAST_MSFILTER
- { MCAST_MSFILTER, "MCAST_MSFILTER" },
+ XLAT(MCAST_MSFILTER),
#endif
#ifdef IP_FREEBIND
- { IP_FREEBIND, "IP_FREEBIND" },
+ XLAT(IP_FREEBIND),
#endif
- { 0, NULL },
+#ifdef IP_IPSEC_POLICY
+ XLAT(IP_IPSEC_POLICY),
+#endif
+#ifdef IP_XFRM_POLICY
+ XLAT(IP_XFRM_POLICY),
+#endif
+#ifdef IP_PASSSEC
+ XLAT(IP_PASSSEC),
+#endif
+#ifdef IP_TRANSPARENT
+ XLAT(IP_TRANSPARENT),
+#endif
+#ifdef IP_ORIGDSTADDR
+ XLAT(IP_ORIGDSTADDR),
+#endif
+#ifdef IP_RECVORIGDSTADDR
+ XLAT(IP_RECVORIGDSTADDR),
+#endif
+#ifdef IP_MINTTL
+ XLAT(IP_MINTTL),
+#endif
+#ifdef IP_NODEFRAG
+ XLAT(IP_NODEFRAG),
+#endif
+#ifdef IP_UNBLOCK_SOURCE
+ XLAT(IP_UNBLOCK_SOURCE),
+#endif
+#ifdef IP_BLOCK_SOURCE
+ XLAT(IP_BLOCK_SOURCE),
+#endif
+#ifdef IP_ADD_SOURCE_MEMBERSHIP
+ XLAT(IP_ADD_SOURCE_MEMBERSHIP),
+#endif
+#ifdef IP_DROP_SOURCE_MEMBERSHIP
+ XLAT(IP_DROP_SOURCE_MEMBERSHIP),
+#endif
+#ifdef MCAST_JOIN_GROUP
+ XLAT(MCAST_JOIN_GROUP),
+#endif
+#ifdef MCAST_BLOCK_SOURCE
+ XLAT(MCAST_BLOCK_SOURCE),
+#endif
+#ifdef MCAST_UNBLOCK_SOURCE
+ XLAT(MCAST_UNBLOCK_SOURCE),
+#endif
+#ifdef MCAST_LEAVE_GROUP
+ XLAT(MCAST_LEAVE_GROUP),
+#endif
+#ifdef MCAST_JOIN_SOURCE_GROUP
+ XLAT(MCAST_JOIN_SOURCE_GROUP),
+#endif
+#ifdef MCAST_LEAVE_SOURCE_GROUP
+ XLAT(MCAST_LEAVE_SOURCE_GROUP),
+#endif
+#ifdef IP_MULTICAST_ALL
+ XLAT(IP_MULTICAST_ALL),
+#endif
+#ifdef IP_UNICAST_IF
+ XLAT(IP_UNICAST_IF),
+#endif
+ XLAT_END
};
#endif /* SOL_IP */
#ifdef SOL_IPV6
static const struct xlat sockipv6options[] = {
#ifdef IPV6_ADDRFORM
- { IPV6_ADDRFORM, "IPV6_ADDRFORM" },
+ XLAT(IPV6_ADDRFORM),
#endif
#ifdef MCAST_FILTER
- { MCAST_FILTER, "MCAST_FILTER" },
+ XLAT(MCAST_FILTER),
#endif
#ifdef IPV6_PKTOPTIONS
- { IPV6_PKTOPTIONS, "IPV6_PKTOPTIONS" },
+ XLAT(IPV6_PKTOPTIONS),
#endif
#ifdef IPV6_MTU
- { IPV6_MTU, "IPV6_MTU" },
+ XLAT(IPV6_MTU),
#endif
#ifdef IPV6_V6ONLY
- { IPV6_V6ONLY, "IPV6_V6ONLY" },
+ XLAT(IPV6_V6ONLY),
#endif
#ifdef IPV6_PKTINFO
- { IPV6_PKTINFO, "IPV6_PKTINFO" },
+ XLAT(IPV6_PKTINFO),
#endif
#ifdef IPV6_HOPLIMIT
- { IPV6_HOPLIMIT, "IPV6_HOPLIMIT" },
+ XLAT(IPV6_HOPLIMIT),
#endif
#ifdef IPV6_RTHDR
- { IPV6_RTHDR, "IPV6_RTHDR" },
+ XLAT(IPV6_RTHDR),
#endif
#ifdef IPV6_HOPOPTS
- { IPV6_HOPOPTS, "IPV6_HOPOPTS" },
+ XLAT(IPV6_HOPOPTS),
#endif
#ifdef IPV6_DSTOPTS
- { IPV6_DSTOPTS, "IPV6_DSTOPTS" },
+ XLAT(IPV6_DSTOPTS),
#endif
#ifdef IPV6_FLOWINFO
- { IPV6_FLOWINFO, "IPV6_FLOWINFO" },
+ XLAT(IPV6_FLOWINFO),
#endif
#ifdef IPV6_UNICAST_HOPS
- { IPV6_UNICAST_HOPS, "IPV6_UNICAST_HOPS" },
+ XLAT(IPV6_UNICAST_HOPS),
#endif
#ifdef IPV6_MULTICAST_HOPS
- { IPV6_MULTICAST_HOPS, "IPV6_MULTICAST_HOPS" },
+ XLAT(IPV6_MULTICAST_HOPS),
#endif
#ifdef IPV6_MULTICAST_LOOP
- { IPV6_MULTICAST_LOOP, "IPV6_MULTICAST_LOOP" },
+ XLAT(IPV6_MULTICAST_LOOP),
#endif
#ifdef IPV6_MULTICAST_IF
- { IPV6_MULTICAST_IF, "IPV6_MULTICAST_IF" },
+ XLAT(IPV6_MULTICAST_IF),
#endif
#ifdef IPV6_MTU_DISCOVER
- { IPV6_MTU_DISCOVER, "IPV6_MTU_DISCOVER" },
+ XLAT(IPV6_MTU_DISCOVER),
#endif
#ifdef IPV6_RECVERR
- { IPV6_RECVERR, "IPV6_RECVERR" },
+ XLAT(IPV6_RECVERR),
#endif
#ifdef IPV6_FLOWINFO_SEND
- { IPV6_FLOWINFO_SEND, "IPV6_FLOWINFO_SEND" },
+ XLAT(IPV6_FLOWINFO_SEND),
#endif
#ifdef IPV6_ADD_MEMBERSHIP
- { IPV6_ADD_MEMBERSHIP, "IPV6_ADD_MEMBERSHIP" },
+ XLAT(IPV6_ADD_MEMBERSHIP),
#endif
#ifdef IPV6_DROP_MEMBERSHIP
- { IPV6_DROP_MEMBERSHIP, "IPV6_DROP_MEMBERSHIP" },
+ XLAT(IPV6_DROP_MEMBERSHIP),
#endif
#ifdef IPV6_ROUTER_ALERT
- { IPV6_ROUTER_ALERT, "IPV6_ROUTER_ALERT" },
+ XLAT(IPV6_ROUTER_ALERT),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif /* SOL_IPV6 */
#ifdef SOL_IPX
static const struct xlat sockipxoptions[] = {
- { IPX_TYPE, "IPX_TYPE" },
- { 0, NULL },
+ XLAT(IPX_TYPE),
+ XLAT_END
};
#endif /* SOL_IPX */
#ifdef SOL_RAW
static const struct xlat sockrawoptions[] = {
#if defined(ICMP_FILTER)
- { ICMP_FILTER, "ICMP_FILTER" },
+ XLAT(ICMP_FILTER),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif /* SOL_RAW */
#ifdef SOL_PACKET
static const struct xlat sockpacketoptions[] = {
#ifdef PACKET_ADD_MEMBERSHIP
- { PACKET_ADD_MEMBERSHIP, "PACKET_ADD_MEMBERSHIP" },
+ XLAT(PACKET_ADD_MEMBERSHIP),
#endif
#ifdef PACKET_DROP_MEMBERSHIP
- { PACKET_DROP_MEMBERSHIP, "PACKET_DROP_MEMBERSHIP"},
+ XLAT(PACKET_DROP_MEMBERSHIP),
#endif
#if defined(PACKET_RECV_OUTPUT)
- { PACKET_RECV_OUTPUT, "PACKET_RECV_OUTPUT" },
+ XLAT(PACKET_RECV_OUTPUT),
#endif
#if defined(PACKET_RX_RING)
- { PACKET_RX_RING, "PACKET_RX_RING" },
+ XLAT(PACKET_RX_RING),
#endif
#if defined(PACKET_STATISTICS)
- { PACKET_STATISTICS, "PACKET_STATISTICS" },
+ XLAT(PACKET_STATISTICS),
#endif
#if defined(PACKET_COPY_THRESH)
- { PACKET_COPY_THRESH, "PACKET_COPY_THRESH" },
+ XLAT(PACKET_COPY_THRESH),
#endif
#if defined(PACKET_AUXDATA)
- { PACKET_AUXDATA, "PACKET_AUXDATA" },
+ XLAT(PACKET_AUXDATA),
#endif
#if defined(PACKET_ORIGDEV)
- { PACKET_ORIGDEV, "PACKET_ORIGDEV" },
+ XLAT(PACKET_ORIGDEV),
#endif
#if defined(PACKET_VERSION)
- { PACKET_VERSION, "PACKET_VERSION" },
+ XLAT(PACKET_VERSION),
#endif
#if defined(PACKET_HDRLEN)
- { PACKET_HDRLEN, "PACKET_HDRLEN" },
+ XLAT(PACKET_HDRLEN),
#endif
#if defined(PACKET_RESERVE)
- { PACKET_RESERVE, "PACKET_RESERVE" },
+ XLAT(PACKET_RESERVE),
#endif
#if defined(PACKET_TX_RING)
- { PACKET_TX_RING, "PACKET_TX_RING" },
+ XLAT(PACKET_TX_RING),
#endif
#if defined(PACKET_LOSS)
- { PACKET_LOSS, "PACKET_LOSS" },
+ XLAT(PACKET_LOSS),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif /* SOL_PACKET */
#ifdef SOL_SCTP
static const struct xlat socksctpoptions[] = {
#if defined(SCTP_RTOINFO)
- { SCTP_RTOINFO, "SCTP_RTOINFO" },
+ XLAT(SCTP_RTOINFO),
#endif
#if defined(SCTP_ASSOCINFO)
- { SCTP_ASSOCINFO, "SCTP_ASSOCINFO"},
+ XLAT(SCTP_ASSOCINFO),
#endif
#if defined(SCTP_INITMSG)
- { SCTP_INITMSG, "SCTP_INITMSG" },
+ XLAT(SCTP_INITMSG),
#endif
#if defined(SCTP_NODELAY)
- { SCTP_NODELAY, "SCTP_NODELAY" },
+ XLAT(SCTP_NODELAY),
#endif
#if defined(SCTP_AUTOCLOSE)
- { SCTP_AUTOCLOSE, "SCTP_AUTOCLOSE"},
+ XLAT(SCTP_AUTOCLOSE),
#endif
#if defined(SCTP_SET_PEER_PRIMARY_ADDR)
- { SCTP_SET_PEER_PRIMARY_ADDR, "SCTP_SET_PEER_PRIMARY_ADDR"},
+ XLAT(SCTP_SET_PEER_PRIMARY_ADDR),
#endif
#if defined(SCTP_PRIMARY_ADDR)
- { SCTP_PRIMARY_ADDR, "SCTP_PRIMARY_ADDR" },
+ XLAT(SCTP_PRIMARY_ADDR),
#endif
#if defined(SCTP_ADAPTATION_LAYER)
- { SCTP_ADAPTATION_LAYER, "SCTP_ADAPTATION_LAYER" },
+ XLAT(SCTP_ADAPTATION_LAYER),
#endif
#if defined(SCTP_DISABLE_FRAGMENTS)
- { SCTP_DISABLE_FRAGMENTS, "SCTP_DISABLE_FRAGMENTS"},
+ XLAT(SCTP_DISABLE_FRAGMENTS),
#endif
#if defined(SCTP_PEER_ADDR_PARAMS)
- { SCTP_PEER_ADDR_PARAMS, "SCTP_PEER_ADDR_PARAMS" },
+ XLAT(SCTP_PEER_ADDR_PARAMS),
#endif
#if defined(SCTP_DEFAULT_SEND_PARAM)
- { SCTP_DEFAULT_SEND_PARAM, "SCTP_DEFAULT_SEND_PARAM"},
+ XLAT(SCTP_DEFAULT_SEND_PARAM),
#endif
#if defined(SCTP_EVENTS)
- { SCTP_EVENTS, "SCTP_EVENTS" },
+ XLAT(SCTP_EVENTS),
#endif
#if defined(SCTP_I_WANT_MAPPED_V4_ADDR)
- { SCTP_I_WANT_MAPPED_V4_ADDR, "SCTP_I_WANT_MAPPED_V4_ADDR"},
+ XLAT(SCTP_I_WANT_MAPPED_V4_ADDR),
#endif
#if defined(SCTP_MAXSEG)
- { SCTP_MAXSEG, "SCTP_MAXSEG" },
+ XLAT(SCTP_MAXSEG),
#endif
#if defined(SCTP_STATUS)
- { SCTP_STATUS, "SCTP_STATUS" },
+ XLAT(SCTP_STATUS),
#endif
#if defined(SCTP_GET_PEER_ADDR_INFO)
- { SCTP_GET_PEER_ADDR_INFO, "SCTP_GET_PEER_ADDR_INFO"},
+ XLAT(SCTP_GET_PEER_ADDR_INFO),
#endif
#if defined(SCTP_DELAYED_ACK)
- { SCTP_DELAYED_ACK, "SCTP_DELAYED_ACK" },
+ XLAT(SCTP_DELAYED_ACK),
#endif
#if defined(SCTP_CONTEXT)
- { SCTP_CONTEXT, "SCTP_CONTEXT" },
+ XLAT(SCTP_CONTEXT),
#endif
#if defined(SCTP_FRAGMENT_INTERLEAVE)
- { SCTP_FRAGMENT_INTERLEAVE, "SCTP_FRAGMENT_INTERLEAVE"},
+ XLAT(SCTP_FRAGMENT_INTERLEAVE),
#endif
#if defined(SCTP_PARTIAL_DELIVERY_POINT)
- { SCTP_PARTIAL_DELIVERY_POINT, "SCTP_PARTIAL_DELIVERY_POINT"},
+ XLAT(SCTP_PARTIAL_DELIVERY_POINT),
#endif
#if defined(SCTP_MAX_BURST)
- { SCTP_MAX_BURST, "SCTP_MAX_BURST" },
+ XLAT(SCTP_MAX_BURST),
#endif
#if defined(SCTP_AUTH_CHUNK)
- { SCTP_AUTH_CHUNK, "SCTP_AUTH_CHUNK" },
+ XLAT(SCTP_AUTH_CHUNK),
#endif
#if defined(SCTP_HMAC_IDENT)
- { SCTP_HMAC_IDENT, "SCTP_HMAC_IDENT" },
+ XLAT(SCTP_HMAC_IDENT),
#endif
#if defined(SCTP_AUTH_KEY)
- { SCTP_AUTH_KEY, "SCTP_AUTH_KEY" },
+ XLAT(SCTP_AUTH_KEY),
#endif
#if defined(SCTP_AUTH_ACTIVE_KEY)
- { SCTP_AUTH_ACTIVE_KEY, "SCTP_AUTH_ACTIVE_KEY" },
+ XLAT(SCTP_AUTH_ACTIVE_KEY),
#endif
#if defined(SCTP_AUTH_DELETE_KEY)
- { SCTP_AUTH_DELETE_KEY, "SCTP_AUTH_DELETE_KEY" },
+ XLAT(SCTP_AUTH_DELETE_KEY),
#endif
#if defined(SCTP_PEER_AUTH_CHUNKS)
- { SCTP_PEER_AUTH_CHUNKS, "SCTP_PEER_AUTH_CHUNKS" },
+ XLAT(SCTP_PEER_AUTH_CHUNKS),
#endif
#if defined(SCTP_LOCAL_AUTH_CHUNKS)
- { SCTP_LOCAL_AUTH_CHUNKS, "SCTP_LOCAL_AUTH_CHUNKS"},
+ XLAT(SCTP_LOCAL_AUTH_CHUNKS),
#endif
#if defined(SCTP_GET_ASSOC_NUMBER)
- { SCTP_GET_ASSOC_NUMBER, "SCTP_GET_ASSOC_NUMBER" },
+ XLAT(SCTP_GET_ASSOC_NUMBER),
#endif
/* linux specific things */
#if defined(SCTP_SOCKOPT_BINDX_ADD)
- { SCTP_SOCKOPT_BINDX_ADD, "SCTP_SOCKOPT_BINDX_ADD" },
+ XLAT(SCTP_SOCKOPT_BINDX_ADD),
#endif
#if defined(SCTP_SOCKOPT_BINDX_REM)
- { SCTP_SOCKOPT_BINDX_REM, "SCTP_SOCKOPT_BINDX_REM" },
+ XLAT(SCTP_SOCKOPT_BINDX_REM),
#endif
#if defined(SCTP_SOCKOPT_PEELOFF)
- { SCTP_SOCKOPT_PEELOFF, "SCTP_SOCKOPT_PEELOFF" },
+ XLAT(SCTP_SOCKOPT_PEELOFF),
#endif
#if defined(SCTP_GET_PEER_ADDRS_NUM_OLD)
- { SCTP_GET_PEER_ADDRS_NUM_OLD, "SCTP_GET_PEER_ADDRS_NUM_OLD" },
+ XLAT(SCTP_GET_PEER_ADDRS_NUM_OLD),
#endif
#if defined(SCTP_GET_PEER_ADDRS_OLD)
- { SCTP_GET_PEER_ADDRS_OLD, "SCTP_GET_PEER_ADDRS_OLD" },
+ XLAT(SCTP_GET_PEER_ADDRS_OLD),
#endif
#if defined(SCTP_GET_LOCAL_ADDRS_NUM_OLD)
- { SCTP_GET_LOCAL_ADDRS_NUM_OLD, "SCTP_GET_LOCAL_ADDRS_NUM_OLD" },
+ XLAT(SCTP_GET_LOCAL_ADDRS_NUM_OLD),
#endif
#if defined(SCTP_GET_LOCAL_ADDRS_OLD)
- { SCTP_GET_LOCAL_ADDRS_OLD, "SCTP_GET_LOCAL_ADDRS_OLD" },
+ XLAT(SCTP_GET_LOCAL_ADDRS_OLD),
#endif
#if defined(SCTP_SOCKOPT_CONNECTX_OLD)
- { SCTP_SOCKOPT_CONNECTX_OLD, "SCTP_SOCKOPT_CONNECTX_OLD" },
+ XLAT(SCTP_SOCKOPT_CONNECTX_OLD),
#endif
#if defined(SCTP_GET_PEER_ADDRS)
- { SCTP_GET_PEER_ADDRS, "SCTP_GET_PEER_ADDRS" },
+ XLAT(SCTP_GET_PEER_ADDRS),
#endif
#if defined(SCTP_GET_LOCAL_ADDRS)
- { SCTP_GET_LOCAL_ADDRS, "SCTP_GET_LOCAL_ADDRS" },
+ XLAT(SCTP_GET_LOCAL_ADDRS),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif
@@ -1124,75 +1176,75 @@
#ifdef SOL_TCP
static const struct xlat socktcpoptions[] = {
- { TCP_NODELAY, "TCP_NODELAY" },
- { TCP_MAXSEG, "TCP_MAXSEG" },
+ XLAT(TCP_NODELAY),
+ XLAT(TCP_MAXSEG),
#ifdef TCP_CORK
- { TCP_CORK, "TCP_CORK" },
+ XLAT(TCP_CORK),
#endif
#ifdef TCP_KEEPIDLE
- { TCP_KEEPIDLE, "TCP_KEEPIDLE" },
+ XLAT(TCP_KEEPIDLE),
#endif
#ifdef TCP_KEEPINTVL
- { TCP_KEEPINTVL, "TCP_KEEPINTVL" },
+ XLAT(TCP_KEEPINTVL),
#endif
#ifdef TCP_KEEPCNT
- { TCP_KEEPCNT, "TCP_KEEPCNT" },
+ XLAT(TCP_KEEPCNT),
#endif
#ifdef TCP_SYNCNT
- { TCP_SYNCNT, "TCP_SYNCNT" },
+ XLAT(TCP_SYNCNT),
#endif
#ifdef TCP_LINGER2
- { TCP_LINGER2, "TCP_LINGER2" },
+ XLAT(TCP_LINGER2),
#endif
#ifdef TCP_DEFER_ACCEPT
- { TCP_DEFER_ACCEPT, "TCP_DEFER_ACCEPT" },
+ XLAT(TCP_DEFER_ACCEPT),
#endif
#ifdef TCP_WINDOW_CLAMP
- { TCP_WINDOW_CLAMP, "TCP_WINDOW_CLAMP" },
+ XLAT(TCP_WINDOW_CLAMP),
#endif
#ifdef TCP_INFO
- { TCP_INFO, "TCP_INFO" },
+ XLAT(TCP_INFO),
#endif
#ifdef TCP_QUICKACK
- { TCP_QUICKACK, "TCP_QUICKACK" },
+ XLAT(TCP_QUICKACK),
#endif
#ifdef TCP_CONGESTION
- { TCP_CONGESTION, "TCP_CONGESTION" },
+ XLAT(TCP_CONGESTION),
#endif
#ifdef TCP_MD5SIG
- { TCP_MD5SIG, "TCP_MD5SIG" },
+ XLAT(TCP_MD5SIG),
#endif
#ifdef TCP_COOKIE_TRANSACTIONS
- { TCP_COOKIE_TRANSACTIONS, "TCP_COOKIE_TRANSACTIONS" },
+ XLAT(TCP_COOKIE_TRANSACTIONS),
#endif
#ifdef TCP_THIN_LINEAR_TIMEOUTS
- { TCP_THIN_LINEAR_TIMEOUTS, "TCP_THIN_LINEAR_TIMEOUTS" },
+ XLAT(TCP_THIN_LINEAR_TIMEOUTS),
#endif
#ifdef TCP_THIN_DUPACK
- { TCP_THIN_DUPACK, "TCP_THIN_DUPACK" },
+ XLAT(TCP_THIN_DUPACK),
#endif
#ifdef TCP_USER_TIMEOUT
- { TCP_USER_TIMEOUT, "TCP_USER_TIMEOUT" },
+ XLAT(TCP_USER_TIMEOUT),
#endif
#ifdef TCP_REPAIR
- { TCP_REPAIR, "TCP_REPAIR" },
+ XLAT(TCP_REPAIR),
#endif
#ifdef TCP_REPAIR_QUEUE
- { TCP_REPAIR_QUEUE, "TCP_REPAIR_QUEUE" },
+ XLAT(TCP_REPAIR_QUEUE),
#endif
#ifdef TCP_QUEUE_SEQ
- { TCP_QUEUE_SEQ, "TCP_QUEUE_SEQ" },
+ XLAT(TCP_QUEUE_SEQ),
#endif
#ifdef TCP_REPAIR_OPTIONS
- { TCP_REPAIR_OPTIONS, "TCP_REPAIR_OPTIONS" },
+ XLAT(TCP_REPAIR_OPTIONS),
#endif
#ifdef TCP_FASTOPEN
- { TCP_FASTOPEN, "TCP_FASTOPEN" },
+ XLAT(TCP_FASTOPEN),
#endif
#ifdef TCP_TIMESTAMP
- { TCP_TIMESTAMP, "TCP_TIMESTAMP" },
+ XLAT(TCP_TIMESTAMP),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif /* SOL_TCP */
@@ -1237,34 +1289,34 @@
#if defined(ICMP_ADDRESSREPLY)
{ (1<<ICMP_ADDRESSREPLY), "ICMP_ADDRESSREPLY" },
#endif
- { 0, NULL },
+ XLAT_END
};
#endif /* SOL_RAW */
#if defined(AF_PACKET) /* from e.g. linux/if_packet.h */
static const struct xlat af_packet_types[] = {
#if defined(PACKET_HOST)
- { PACKET_HOST, "PACKET_HOST" },
+ XLAT(PACKET_HOST),
#endif
#if defined(PACKET_BROADCAST)
- { PACKET_BROADCAST, "PACKET_BROADCAST" },
+ XLAT(PACKET_BROADCAST),
#endif
#if defined(PACKET_MULTICAST)
- { PACKET_MULTICAST, "PACKET_MULTICAST" },
+ XLAT(PACKET_MULTICAST),
#endif
#if defined(PACKET_OTHERHOST)
- { PACKET_OTHERHOST, "PACKET_OTHERHOST" },
+ XLAT(PACKET_OTHERHOST),
#endif
#if defined(PACKET_OUTGOING)
- { PACKET_OUTGOING, "PACKET_OUTGOING" },
+ XLAT(PACKET_OUTGOING),
#endif
#if defined(PACKET_LOOPBACK)
- { PACKET_LOOPBACK, "PACKET_LOOPBACK" },
+ XLAT(PACKET_LOOPBACK),
#endif
#if defined(PACKET_FASTROUTE)
- { PACKET_FASTROUTE, "PACKET_FASTROUTE" },
+ XLAT(PACKET_FASTROUTE),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif /* defined(AF_PACKET) */
@@ -1414,12 +1466,12 @@
#if HAVE_SENDMSG
static const struct xlat scmvals[] = {
#ifdef SCM_RIGHTS
- { SCM_RIGHTS, "SCM_RIGHTS" },
+ XLAT(SCM_RIGHTS),
#endif
#ifdef SCM_CREDENTIALS
- { SCM_CREDENTIALS, "SCM_CREDENTIALS" },
+ XLAT(SCM_CREDENTIALS),
#endif
- { 0, NULL }
+ XLAT_END
};
static void
@@ -1659,7 +1711,8 @@
sys_bind(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
printsock(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[2]);
}
@@ -1676,7 +1729,9 @@
sys_listen(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ tprintf("%lu", tcp->u_arg[1]);
}
return 0;
}
@@ -1685,7 +1740,8 @@
do_accept(struct tcb *tcp, int flags_arg)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
return 0;
}
if (!tcp->u_arg[2])
@@ -1725,7 +1781,8 @@
sys_send(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
/* flags */
@@ -1738,7 +1795,8 @@
sys_sendto(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[2]);
/* flags */
@@ -1758,7 +1816,8 @@
sys_sendmsg(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
printmsghdr(tcp, tcp->u_arg[1], (unsigned long) -1L);
/* flags */
tprints(", ");
@@ -1772,7 +1831,8 @@
{
if (entering(tcp)) {
/* sockfd */
- tprintf("%d, ", (int) tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
if (!verbose(tcp)) {
tprintf("%#lx, %u, ",
tcp->u_arg[1], (unsigned int) tcp->u_arg[2]);
@@ -1791,7 +1851,8 @@
sys_recv(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
} else {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -1810,7 +1871,8 @@
int fromlen;
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
} else {
if (syserror(tcp)) {
tprintf("%#lx, %lu, %lu, %#lx, %#lx",
@@ -1854,7 +1916,8 @@
sys_recvmsg(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
} else {
if (syserror(tcp) || !verbose(tcp))
tprintf("%#lx", tcp->u_arg[1]);
@@ -1874,7 +1937,8 @@
static char str[5 + TIMESPEC_TEXT_BUFSIZE];
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
if (verbose(tcp)) {
sprint_timespec(str, tcp, tcp->u_arg[4]);
/* Abusing tcp->auxstr as temp storage.
@@ -1917,14 +1981,15 @@
{ 0, "SHUT_RD" },
{ 1, "SHUT_WR" },
{ 2, "SHUT_RDWR" },
- { 0, NULL }
+ XLAT_END
};
int
sys_shutdown(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
printxval(shutdown_modes, tcp->u_arg[1], "SHUT_???");
}
return 0;
@@ -2025,7 +2090,8 @@
sys_getsockopt(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
printxval(socketlayers, tcp->u_arg[1], "SOL_???");
tprints(", ");
switch (tcp->u_arg[1]) {
@@ -2287,46 +2353,12 @@
return 0;
}
-#ifdef HAVE_STRUCT_OPTHDR
-
-void
-print_sock_optmgmt(struct tcb *tcp, long addr, int len)
-{
- int c = 0;
- struct opthdr hdr;
-
- while (len >= (int) sizeof hdr) {
- if (umove(tcp, addr, &hdr) < 0) break;
- if (c++) {
- tprints(", ");
- }
- else if (len > hdr.len + sizeof hdr) {
- tprints("[");
- }
- tprints("{");
- addr += sizeof hdr;
- len -= sizeof hdr;
- printsockopt(tcp, hdr.level, hdr.name, addr, hdr.len);
- if (hdr.len > 0) {
- addr += hdr.len;
- len -= hdr.len;
- }
- tprints("}");
- }
- if (len > 0) {
- if (c++) tprints(", ");
- printstr(tcp, addr, len);
- }
- if (c > 1) tprints("]");
-}
-
-#endif
-
int
sys_setsockopt(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%ld, ", tcp->u_arg[0]);
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
printsockopt(tcp, tcp->u_arg[1], tcp->u_arg[2],
tcp->u_arg[3], tcp->u_arg[4]);
tprintf(", %lu", tcp->u_arg[4]);
diff --git a/pathtrace.c b/pathtrace.c
index d4c2dc4..9fb99c4 100644
--- a/pathtrace.c
+++ b/pathtrace.c
@@ -28,10 +28,9 @@
#include "defs.h"
#include <sys/param.h>
-#ifdef HAVE_POLL_H
+#if defined HAVE_POLL_H
# include <poll.h>
-#endif
-#ifdef HAVE_SYS_POLL_H
+#elif defined HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
@@ -81,7 +80,7 @@
/*
* Add a path to the set we're tracing.
- * Secifying NULL will delete all paths.
+ * Specifying NULL will delete all paths.
*/
static void
storepath(const char *path)
@@ -159,7 +158,7 @@
s = tcp->s_ent;
- if (!(s->sys_flags & (TRACE_FILE | TRACE_DESC)))
+ if (!(s->sys_flags & (TRACE_FILE | TRACE_DESC | TRACE_NETWORK)))
return 0;
/*
@@ -252,16 +251,23 @@
return fdmatch(tcp, tcp->u_arg[2]);
}
+ if (s->sys_func == sys_fanotify_mark) {
+ /* x, x, x, fd, path */
+ return fdmatch(tcp, tcp->u_arg[3]) ||
+ upathmatch(tcp, tcp->u_arg[4]);
+ }
+
if (s->sys_func == sys_select ||
s->sys_func == sys_oldselect ||
s->sys_func == sys_pselect6)
{
int i, j;
- unsigned nfds;
+ int nfds;
long *args, oldargs[5];
unsigned fdsize;
fd_set *fds;
+ args = tcp->u_arg;
if (s->sys_func == sys_oldselect) {
if (umoven(tcp, tcp->u_arg[0], sizeof oldargs,
(char*) oldargs) < 0)
@@ -270,17 +276,17 @@
return 0;
}
args = oldargs;
- } else
- args = tcp->u_arg;
+ }
- nfds = args[0];
+ /* Kernel truncates arg[0] to int, we do the same. */
+ nfds = (int) args[0];
+ /* Kernel rejects negative nfds, so we don't parse it either. */
+ if (nfds <= 0)
+ return 0;
/* Beware of select(2^31-1, NULL, NULL, NULL) and similar... */
- if (args[0] > 1024*1024)
+ if (nfds > 1024*1024)
nfds = 1024*1024;
- if (args[0] < 0)
- nfds = 0;
- fdsize = ((((nfds + 7) / 8) + sizeof(long) - 1)
- & -sizeof(long));
+ fdsize = (((nfds + 7) / 8) + current_wordsize-1) & -current_wordsize;
fds = malloc(fdsize);
if (!fds)
die_out_of_memory();
@@ -288,17 +294,19 @@
for (i = 1; i <= 3; ++i) {
if (args[i] == 0)
continue;
-
if (umoven(tcp, args[i], fdsize, (char *) fds) < 0) {
fprintf(stderr, "umoven() failed\n");
continue;
}
-
- for (j = 0; j < nfds; ++j)
- if (FD_ISSET(j, fds) && fdmatch(tcp, j)) {
+ for (j = 0;; j++) {
+ j = next_set_bit(fds, j, nfds);
+ if (j < 0)
+ break;
+ if (fdmatch(tcp, j)) {
free(fds);
return 1;
}
+ }
}
free(fds);
return 0;
@@ -337,11 +345,13 @@
s->sys_func == sys_timerfd_settime ||
s->sys_func == sys_timerfd_gettime ||
s->sys_func == sys_epoll_create ||
- strcmp(s->sys_name, "fanotify_init") == 0)
+ s->sys_func == sys_socket ||
+ s->sys_func == sys_socketpair ||
+ s->sys_func == sys_fanotify_init)
{
/*
- * These have TRACE_FILE or TRACE_DESCRIPTOR set, but they
- * don't have any file descriptor or path args to test.
+ * These have TRACE_FILE or TRACE_DESCRIPTOR or TRACE_NETWORK set,
+ * but they don't have any file descriptor or path args to test.
*/
return 0;
}
@@ -354,7 +364,7 @@
if (s->sys_flags & TRACE_FILE)
return upathmatch(tcp, tcp->u_arg[0]);
- if (s->sys_flags & TRACE_DESC)
+ if (s->sys_flags & (TRACE_DESC | TRACE_NETWORK))
return fdmatch(tcp, tcp->u_arg[0]);
return 0;
diff --git a/proc.c b/proc.c
deleted file mode 100644
index 04ef8fb..0000000
--- a/proc.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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 "defs.h"
-
-#ifdef SVR4
-#ifndef HAVE_MP_PROCFS
-
-static const struct xlat proc_status_flags[] = {
- { PR_STOPPED, "PR_STOPPED" },
- { PR_ISTOP, "PR_ISTOP" },
- { PR_DSTOP, "PR_DSTOP" },
- { PR_ASLEEP, "PR_ASLEEP" },
- { PR_FORK, "PR_FORK" },
- { PR_RLC, "PR_RLC" },
- { PR_PTRACE, "PR_PTRACE" },
- { PR_PCINVAL, "PR_PCINVAL" },
- { PR_ISSYS, "PR_ISSYS" },
-#ifdef PR_STEP
- { PR_STEP, "PR_STEP" },
-#endif
-#ifdef PR_KLC
- { PR_KLC, "PR_KLC" },
-#endif
-#ifdef PR_ASYNC
- { PR_ASYNC, "PR_ASYNC" },
-#endif
-#ifdef PR_PCOMPAT
- { PR_PCOMPAT, "PR_PCOMPAT" },
-#endif
- { 0, NULL },
-};
-
-static const struct xlat proc_status_why[] = {
- { PR_REQUESTED, "PR_REQUESTED" },
- { PR_SIGNALLED, "PR_SIGNALLED" },
- { PR_SYSENTRY, "PR_SYSENTRY" },
- { PR_SYSEXIT, "PR_SYSEXIT" },
- { PR_JOBCONTROL,"PR_JOBCONTROL" },
- { PR_FAULTED, "PR_FAULTED" },
-#ifdef PR_SUSPENDED
- { PR_SUSPENDED, "PR_SUSPENDED" },
-#endif
-#ifdef PR_CHECKPOINT
- { PR_CHECKPOINT,"PR_CHECKPOINT" },
-#endif
- { 0, NULL },
-};
-
-static const struct xlat proc_run_flags[] = {
- { PRCSIG, "PRCSIG" },
- { PRCFAULT, "PRCFAULT" },
- { PRSTRACE, "PRSTRACE" },
- { PRSHOLD, "PRSHOLD" },
- { PRSFAULT, "PRSFAULT" },
- { PRSVADDR, "PRSVADDR" },
- { PRSTEP, "PRSTEP" },
- { PRSABORT, "PRSABORT" },
- { PRSTOP, "PRSTOP" },
- { 0, NULL },
-};
-
-int
-proc_ioctl(tcp, code, arg)
-struct tcb *tcp;
-int code, arg;
-{
- int val;
- prstatus_t status;
- prrun_t run;
-
- if (entering(tcp))
- return 0;
-
- switch (code) {
- case PIOCSTATUS:
- case PIOCSTOP:
- case PIOCWSTOP:
- if (arg == 0)
- tprintf(", NULL");
- else if (syserror(tcp))
- tprintf(", %#x", arg);
- else if (umove(tcp, arg, &status) < 0)
- tprintf(", {...}");
- else {
- tprintf(", {pr_flags=");
- printflags(proc_status_flags, status.pr_flags, "PR_???");
- if (status.pr_why) {
- tprintf(", pr_why=");
- printxval(proc_status_why, status.pr_why,
- "PR_???");
- }
- switch (status.pr_why) {
- case PR_SIGNALLED:
- case PR_JOBCONTROL:
- tprintf(", pr_what=");
- printsignal(status.pr_what);
- break;
- case PR_FAULTED:
- tprintf(", pr_what=%d", status.pr_what);
- break;
- case PR_SYSENTRY:
- case PR_SYSEXIT:
- tprintf(", pr_what=SYS_%s",
- sysent[status.pr_what].sys_name);
- break;
- }
- tprintf(", ...}");
- }
- return 1;
- case PIOCRUN:
- if (arg == 0)
- tprintf(", NULL");
- else if (umove(tcp, arg, &run) < 0)
- tprintf(", {...}");
- else {
- tprintf(", {pr_flags=");
- printflags(proc_run_flags, run.pr_flags, "PR???");
- tprintf(", ...}");
- }
- return 1;
-#ifdef PIOCSET
- case PIOCSET:
- case PIOCRESET:
- if (umove(tcp, arg, &val) < 0)
- tprintf(", [?]");
- else {
- tprintf(", [");
- printflags(proc_status_flags, val, "PR_???");
- tprintf("]");
- }
- return 1;
-#endif /* PIOCSET */
- case PIOCKILL:
- case PIOCUNKILL:
- /* takes a pointer to a signal */
- if (umove(tcp, arg, &val) < 0)
- tprintf(", [?]");
- else {
- tprintf(", [");
- printsignal(val);
- tprintf("]");
- }
- return 1;
- case PIOCSFORK:
- case PIOCRFORK:
- case PIOCSRLC:
- case PIOCRRLC:
- /* doesn't take an arg */
- return 1;
- default:
- /* ad naseum */
- return 0;
- }
-}
-
-#endif /* HAVE_MP_PROCFS */
-#endif /* SVR4 */
-
-#ifdef FREEBSD
-#include <sys/pioctl.h>
-
-static const struct xlat proc_status_why[] = {
- { S_EXEC, "S_EXEC" },
- { S_SIG, "S_SIG" },
- { S_SCE, "S_SCE" },
- { S_SCX, "S_SCX" },
- { S_CORE, "S_CORE" },
- { S_EXIT, "S_EXIT" },
- { 0, NULL }
-};
-
-static const struct xlat proc_status_flags[] = {
- { PF_LINGER, "PF_LINGER" },
- { PF_ISUGID, "PF_ISUGID" },
- { 0, NULL }
-};
-
-int
-proc_ioctl(tcp, code, arg)
-struct tcb *tcp;
-int code, arg;
-{
- int val;
- struct procfs_status status;
-
- if (entering(tcp))
- return 0;
-
- switch (code) {
- case PIOCSTATUS:
- case PIOCWAIT:
- if (arg == 0)
- tprintf(", NULL");
- else if (syserror(tcp))
- tprintf(", %x", arg);
- else if (umove(tcp, arg, &status) < 0)
- tprintf(", {...}");
- else {
- tprintf(", {state=%d, flags=", status.state);
- printflags(proc_status_flags, status.flags, "PF_???");
- tprintf(", events=");
- printflags(proc_status_why, status.events, "S_???");
- tprintf(", why=");
- printxval(proc_status_why, status.why, "S_???");
- tprintf(", val=%lu}", status.val);
- }
- return 1;
- case PIOCBIS:
- tprintf(", ");
- printflags(proc_status_why, arg, "S_???");
- return 1;
- return 1;
- case PIOCSFL:
- tprintf(", ");
- printflags(proc_status_flags, arg, "PF_???");
- return 1;
- case PIOCGFL:
- if (syserror(tcp))
- tprintf(", %#x", arg);
- else if (umove(tcp, arg, &val) < 0)
- tprintf(", {...}");
- else {
- tprintf(", [");
- printflags(proc_status_flags, val, "PF_???");
- tprintf("]");
- }
- return 1;
- default:
- /* ad naseum */
- return 0;
- }
-}
-#endif
diff --git a/process.c b/process.c
index 799a314..e3837da 100644
--- a/process.c
+++ b/process.c
@@ -47,12 +47,6 @@
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
-# ifndef PTRACE_PEEKUSR
-# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-# endif
-# ifndef PTRACE_POKEUSR
-# define PTRACE_POKEUSR PTRACE_POKEUSER
-# endif
#endif
#ifdef HAVE_LINUX_PTRACE_H
@@ -63,7 +57,11 @@
# ifdef HAVE_STRUCT_PT_ALL_USER_REGS
# define pt_all_user_regs XXX_pt_all_user_regs
# endif
+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
+# endif
# include <linux/ptrace.h>
+# undef ptrace_peeksiginfo_args
# undef ia64_fpreg
# undef pt_all_user_regs
#endif
@@ -109,175 +107,175 @@
static const struct xlat prctl_options[] = {
#ifdef PR_MAXPROCS
- { PR_MAXPROCS, "PR_MAXPROCS" },
+ XLAT(PR_MAXPROCS),
#endif
#ifdef PR_ISBLOCKED
- { PR_ISBLOCKED, "PR_ISBLOCKED" },
+ XLAT(PR_ISBLOCKED),
#endif
#ifdef PR_SETSTACKSIZE
- { PR_SETSTACKSIZE, "PR_SETSTACKSIZE" },
+ XLAT(PR_SETSTACKSIZE),
#endif
#ifdef PR_GETSTACKSIZE
- { PR_GETSTACKSIZE, "PR_GETSTACKSIZE" },
+ XLAT(PR_GETSTACKSIZE),
#endif
#ifdef PR_MAXPPROCS
- { PR_MAXPPROCS, "PR_MAXPPROCS" },
+ XLAT(PR_MAXPPROCS),
#endif
#ifdef PR_UNBLKONEXEC
- { PR_UNBLKONEXEC, "PR_UNBLKONEXEC" },
+ XLAT(PR_UNBLKONEXEC),
#endif
#ifdef PR_ATOMICSIM
- { PR_ATOMICSIM, "PR_ATOMICSIM" },
+ XLAT(PR_ATOMICSIM),
#endif
#ifdef PR_SETEXITSIG
- { PR_SETEXITSIG, "PR_SETEXITSIG" },
+ XLAT(PR_SETEXITSIG),
#endif
#ifdef PR_RESIDENT
- { PR_RESIDENT, "PR_RESIDENT" },
+ XLAT(PR_RESIDENT),
#endif
#ifdef PR_ATTACHADDR
- { PR_ATTACHADDR, "PR_ATTACHADDR" },
+ XLAT(PR_ATTACHADDR),
#endif
#ifdef PR_DETACHADDR
- { PR_DETACHADDR, "PR_DETACHADDR" },
+ XLAT(PR_DETACHADDR),
#endif
#ifdef PR_TERMCHILD
- { PR_TERMCHILD, "PR_TERMCHILD" },
+ XLAT(PR_TERMCHILD),
#endif
#ifdef PR_GETSHMASK
- { PR_GETSHMASK, "PR_GETSHMASK" },
+ XLAT(PR_GETSHMASK),
#endif
#ifdef PR_GETNSHARE
- { PR_GETNSHARE, "PR_GETNSHARE" },
+ XLAT(PR_GETNSHARE),
#endif
#ifdef PR_COREPID
- { PR_COREPID, "PR_COREPID" },
+ XLAT(PR_COREPID),
#endif
#ifdef PR_ATTACHADDRPERM
- { PR_ATTACHADDRPERM, "PR_ATTACHADDRPERM" },
+ XLAT(PR_ATTACHADDRPERM),
#endif
#ifdef PR_PTHREADEXIT
- { PR_PTHREADEXIT, "PR_PTHREADEXIT" },
+ XLAT(PR_PTHREADEXIT),
#endif
#ifdef PR_SET_PDEATHSIG
- { PR_SET_PDEATHSIG, "PR_SET_PDEATHSIG" },
+ XLAT(PR_SET_PDEATHSIG),
#endif
#ifdef PR_GET_PDEATHSIG
- { PR_GET_PDEATHSIG, "PR_GET_PDEATHSIG" },
+ XLAT(PR_GET_PDEATHSIG),
#endif
#ifdef PR_GET_DUMPABLE
- { PR_GET_DUMPABLE, "PR_GET_DUMPABLE" },
+ XLAT(PR_GET_DUMPABLE),
#endif
#ifdef PR_SET_DUMPABLE
- { PR_SET_DUMPABLE, "PR_SET_DUMPABLE" },
+ XLAT(PR_SET_DUMPABLE),
#endif
#ifdef PR_GET_UNALIGN
- { PR_GET_UNALIGN, "PR_GET_UNALIGN" },
+ XLAT(PR_GET_UNALIGN),
#endif
#ifdef PR_SET_UNALIGN
- { PR_SET_UNALIGN, "PR_SET_UNALIGN" },
+ XLAT(PR_SET_UNALIGN),
#endif
#ifdef PR_GET_KEEPCAPS
- { PR_GET_KEEPCAPS, "PR_GET_KEEPCAPS" },
+ XLAT(PR_GET_KEEPCAPS),
#endif
#ifdef PR_SET_KEEPCAPS
- { PR_SET_KEEPCAPS, "PR_SET_KEEPCAPS" },
+ XLAT(PR_SET_KEEPCAPS),
#endif
#ifdef PR_GET_FPEMU
- { PR_GET_FPEMU, "PR_GET_FPEMU" },
+ XLAT(PR_GET_FPEMU),
#endif
#ifdef PR_SET_FPEMU
- { PR_SET_FPEMU, "PR_SET_FPEMU" },
+ XLAT(PR_SET_FPEMU),
#endif
#ifdef PR_GET_FPEXC
- { PR_GET_FPEXC, "PR_GET_FPEXC" },
+ XLAT(PR_GET_FPEXC),
#endif
#ifdef PR_SET_FPEXC
- { PR_SET_FPEXC, "PR_SET_FPEXC" },
+ XLAT(PR_SET_FPEXC),
#endif
#ifdef PR_GET_TIMING
- { PR_GET_TIMING, "PR_GET_TIMING" },
+ XLAT(PR_GET_TIMING),
#endif
#ifdef PR_SET_TIMING
- { PR_SET_TIMING, "PR_SET_TIMING" },
+ XLAT(PR_SET_TIMING),
#endif
#ifdef PR_SET_NAME
- { PR_SET_NAME, "PR_SET_NAME" },
+ XLAT(PR_SET_NAME),
#endif
#ifdef PR_GET_NAME
- { PR_GET_NAME, "PR_GET_NAME" },
+ XLAT(PR_GET_NAME),
#endif
#ifdef PR_GET_ENDIAN
- { PR_GET_ENDIAN, "PR_GET_ENDIAN" },
+ XLAT(PR_GET_ENDIAN),
#endif
#ifdef PR_SET_ENDIAN
- { PR_SET_ENDIAN, "PR_SET_ENDIAN" },
+ XLAT(PR_SET_ENDIAN),
#endif
#ifdef PR_GET_SECCOMP
- { PR_GET_SECCOMP, "PR_GET_SECCOMP" },
+ XLAT(PR_GET_SECCOMP),
#endif
#ifdef PR_SET_SECCOMP
- { PR_SET_SECCOMP, "PR_SET_SECCOMP" },
+ XLAT(PR_SET_SECCOMP),
#endif
#ifdef PR_CAPBSET_READ
- { PR_CAPBSET_READ, "PR_CAPBSET_READ" },
+ XLAT(PR_CAPBSET_READ),
#endif
#ifdef PR_CAPBSET_DROP
- { PR_CAPBSET_DROP, "PR_CAPBSET_DROP" },
+ XLAT(PR_CAPBSET_DROP),
#endif
#ifdef PR_GET_TSC
- { PR_GET_TSC, "PR_GET_TSC" },
+ XLAT(PR_GET_TSC),
#endif
#ifdef PR_SET_TSC
- { PR_SET_TSC, "PR_SET_TSC" },
+ XLAT(PR_SET_TSC),
#endif
#ifdef PR_GET_SECUREBITS
- { PR_GET_SECUREBITS, "PR_GET_SECUREBITS" },
+ XLAT(PR_GET_SECUREBITS),
#endif
#ifdef PR_SET_SECUREBITS
- { PR_SET_SECUREBITS, "PR_SET_SECUREBITS" },
+ XLAT(PR_SET_SECUREBITS),
#endif
#ifdef PR_SET_TIMERSLACK
- { PR_SET_TIMERSLACK, "PR_SET_TIMERSLACK" },
+ XLAT(PR_SET_TIMERSLACK),
#endif
#ifdef PR_GET_TIMERSLACK
- { PR_GET_TIMERSLACK, "PR_GET_TIMERSLACK" },
+ XLAT(PR_GET_TIMERSLACK),
#endif
#ifdef PR_TASK_PERF_EVENTS_DISABLE
- { PR_TASK_PERF_EVENTS_DISABLE, "PR_TASK_PERF_EVENTS_DISABLE" },
+ XLAT(PR_TASK_PERF_EVENTS_DISABLE),
#endif
#ifdef PR_TASK_PERF_EVENTS_ENABLE
- { PR_TASK_PERF_EVENTS_ENABLE, "PR_TASK_PERF_EVENTS_ENABLE" },
+ XLAT(PR_TASK_PERF_EVENTS_ENABLE),
#endif
#ifdef PR_MCE_KILL
- { PR_MCE_KILL, "PR_MCE_KILL" },
+ XLAT(PR_MCE_KILL),
#endif
#ifdef PR_MCE_KILL_GET
- { PR_MCE_KILL_GET, "PR_MCE_KILL_GET" },
+ XLAT(PR_MCE_KILL_GET),
#endif
#ifdef PR_SET_MM
- { PR_SET_MM, "PR_SET_MM" },
+ XLAT(PR_SET_MM),
#endif
#ifdef PR_SET_PTRACER
- { PR_SET_PTRACER, "PR_SET_PTRACER" },
+ XLAT(PR_SET_PTRACER),
#endif
#ifdef PR_SET_CHILD_SUBREAPER
- { PR_SET_CHILD_SUBREAPER, "PR_SET_CHILD_SUBREAPER" },
+ XLAT(PR_SET_CHILD_SUBREAPER),
#endif
#ifdef PR_GET_CHILD_SUBREAPER
- { PR_GET_CHILD_SUBREAPER, "PR_GET_CHILD_SUBREAPER" },
+ XLAT(PR_GET_CHILD_SUBREAPER),
#endif
#ifdef PR_SET_NO_NEW_PRIVS
- { PR_SET_NO_NEW_PRIVS, "PR_SET_NO_NEW_PRIVS" },
+ XLAT(PR_SET_NO_NEW_PRIVS),
#endif
#ifdef PR_GET_NO_NEW_PRIVS
- { PR_GET_NO_NEW_PRIVS, "PR_GET_NO_NEW_PRIVS" },
+ XLAT(PR_GET_NO_NEW_PRIVS),
#endif
#ifdef PR_GET_TID_ADDRESS
- { PR_GET_TID_ADDRESS, "PR_GET_TID_ADDRESS" },
+ XLAT(PR_GET_TID_ADDRESS),
#endif
- { 0, NULL },
+ XLAT_END
};
static const char *
@@ -467,30 +465,30 @@
#define CLONE_IO 0x80000000 /* Clone io context */
static const struct xlat clone_flags[] = {
- { CLONE_VM, "CLONE_VM" },
- { CLONE_FS, "CLONE_FS" },
- { CLONE_FILES, "CLONE_FILES" },
- { CLONE_SIGHAND, "CLONE_SIGHAND" },
- { CLONE_IDLETASK, "CLONE_IDLETASK" },
- { CLONE_PTRACE, "CLONE_PTRACE" },
- { CLONE_VFORK, "CLONE_VFORK" },
- { CLONE_PARENT, "CLONE_PARENT" },
- { CLONE_THREAD, "CLONE_THREAD" },
- { CLONE_NEWNS, "CLONE_NEWNS" },
- { CLONE_SYSVSEM, "CLONE_SYSVSEM" },
- { CLONE_SETTLS, "CLONE_SETTLS" },
- { CLONE_PARENT_SETTID, "CLONE_PARENT_SETTID" },
- { CLONE_CHILD_CLEARTID, "CLONE_CHILD_CLEARTID" },
- { CLONE_UNTRACED, "CLONE_UNTRACED" },
- { CLONE_CHILD_SETTID, "CLONE_CHILD_SETTID" },
- { CLONE_STOPPED, "CLONE_STOPPED" },
- { CLONE_NEWUTS, "CLONE_NEWUTS" },
- { CLONE_NEWIPC, "CLONE_NEWIPC" },
- { CLONE_NEWUSER, "CLONE_NEWUSER" },
- { CLONE_NEWPID, "CLONE_NEWPID" },
- { CLONE_NEWNET, "CLONE_NEWNET" },
- { CLONE_IO, "CLONE_IO" },
- { 0, NULL },
+ XLAT(CLONE_VM),
+ XLAT(CLONE_FS),
+ XLAT(CLONE_FILES),
+ XLAT(CLONE_SIGHAND),
+ XLAT(CLONE_IDLETASK),
+ XLAT(CLONE_PTRACE),
+ XLAT(CLONE_VFORK),
+ XLAT(CLONE_PARENT),
+ XLAT(CLONE_THREAD),
+ XLAT(CLONE_NEWNS),
+ XLAT(CLONE_SYSVSEM),
+ XLAT(CLONE_SETTLS),
+ XLAT(CLONE_PARENT_SETTID),
+ XLAT(CLONE_CHILD_CLEARTID),
+ XLAT(CLONE_UNTRACED),
+ XLAT(CLONE_CHILD_SETTID),
+ XLAT(CLONE_STOPPED),
+ XLAT(CLONE_NEWUTS),
+ XLAT(CLONE_NEWIPC),
+ XLAT(CLONE_NEWUSER),
+ XLAT(CLONE_NEWPID),
+ XLAT(CLONE_NEWNET),
+ XLAT(CLONE_IO),
+ XLAT_END
};
#ifdef I386
@@ -569,6 +567,18 @@
if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID))
tprintf(", child_tidptr=%#lx", tcp->u_arg[ARG_CTID]);
}
+ /* TODO on syscall entry:
+ * We can clear CLONE_PTRACE here since it is an ancient hack
+ * to allow us to catch children, and we use another hack for that.
+ * But CLONE_PTRACE can conceivably be used by malicious programs
+ * to subvert us. By clearing this bit, we can defend against it:
+ * in untraced execution, CLONE_PTRACE should have no effect.
+ *
+ * We can also clear CLONE_UNTRACED, since it allows to start
+ * children outside of our control. At the moment
+ * I'm trying to figure out whether there is a *legitimate*
+ * use of this flag which we should respect.
+ */
return 0;
}
@@ -994,35 +1004,35 @@
#endif
static const struct xlat wait4_options[] = {
- { WNOHANG, "WNOHANG" },
+ XLAT(WNOHANG),
#ifndef WSTOPPED
- { WUNTRACED, "WUNTRACED" },
+ XLAT(WUNTRACED),
#endif
#ifdef WEXITED
- { WEXITED, "WEXITED" },
+ XLAT(WEXITED),
#endif
#ifdef WTRAPPED
- { WTRAPPED, "WTRAPPED" },
+ XLAT(WTRAPPED),
#endif
#ifdef WSTOPPED
- { WSTOPPED, "WSTOPPED" },
+ XLAT(WSTOPPED),
#endif
#ifdef WCONTINUED
- { WCONTINUED, "WCONTINUED" },
+ XLAT(WCONTINUED),
#endif
#ifdef WNOWAIT
- { WNOWAIT, "WNOWAIT" },
+ XLAT(WNOWAIT),
#endif
#ifdef __WCLONE
- { __WCLONE, "__WCLONE" },
+ XLAT(__WCLONE),
#endif
#ifdef __WALL
- { __WALL, "__WALL" },
+ XLAT(__WALL),
#endif
#ifdef __WNOTHREAD
- { __WNOTHREAD, "__WNOTHREAD" },
+ XLAT(__WNOTHREAD),
#endif
- { 0, NULL },
+ XLAT_END
};
#if !defined WCOREFLAG && defined WCOREFLG
@@ -1149,28 +1159,28 @@
#endif
static const struct xlat waitid_types[] = {
- { P_PID, "P_PID" },
+ XLAT(P_PID),
#ifdef P_PPID
- { P_PPID, "P_PPID" },
+ XLAT(P_PPID),
#endif
- { P_PGID, "P_PGID" },
+ XLAT(P_PGID),
#ifdef P_SID
- { P_SID, "P_SID" },
+ XLAT(P_SID),
#endif
#ifdef P_CID
- { P_CID, "P_CID" },
+ XLAT(P_CID),
#endif
#ifdef P_UID
- { P_UID, "P_UID" },
+ XLAT(P_UID),
#endif
#ifdef P_GID
- { P_GID, "P_GID" },
+ XLAT(P_GID),
#endif
- { P_ALL, "P_ALL" },
+ XLAT(P_ALL),
#ifdef P_LWPID
- { P_LWPID, "P_LWPID" },
+ XLAT(P_LWPID),
#endif
- { 0, NULL },
+ XLAT_END
};
int
@@ -1229,181 +1239,181 @@
}
static const struct xlat ptrace_cmds[] = {
- { PTRACE_TRACEME, "PTRACE_TRACEME" },
- { PTRACE_PEEKTEXT, "PTRACE_PEEKTEXT" },
- { PTRACE_PEEKDATA, "PTRACE_PEEKDATA" },
- { PTRACE_PEEKUSER, "PTRACE_PEEKUSER" },
- { PTRACE_POKETEXT, "PTRACE_POKETEXT" },
- { PTRACE_POKEDATA, "PTRACE_POKEDATA" },
- { PTRACE_POKEUSER, "PTRACE_POKEUSER" },
- { PTRACE_CONT, "PTRACE_CONT" },
- { PTRACE_KILL, "PTRACE_KILL" },
- { PTRACE_SINGLESTEP, "PTRACE_SINGLESTEP" },
- { PTRACE_ATTACH, "PTRACE_ATTACH" },
- { PTRACE_DETACH, "PTRACE_DETACH" },
+ XLAT(PTRACE_TRACEME),
+ XLAT(PTRACE_PEEKTEXT),
+ XLAT(PTRACE_PEEKDATA),
+ XLAT(PTRACE_PEEKUSER),
+ XLAT(PTRACE_POKETEXT),
+ XLAT(PTRACE_POKEDATA),
+ XLAT(PTRACE_POKEUSER),
+ XLAT(PTRACE_CONT),
+ XLAT(PTRACE_KILL),
+ XLAT(PTRACE_SINGLESTEP),
+ XLAT(PTRACE_ATTACH),
+ XLAT(PTRACE_DETACH),
#ifdef PTRACE_GETREGS
- { PTRACE_GETREGS, "PTRACE_GETREGS" },
+ XLAT(PTRACE_GETREGS),
#endif
#ifdef PTRACE_SETREGS
- { PTRACE_SETREGS, "PTRACE_SETREGS" },
+ XLAT(PTRACE_SETREGS),
#endif
#ifdef PTRACE_GETFPREGS
- { PTRACE_GETFPREGS, "PTRACE_GETFPREGS" },
+ XLAT(PTRACE_GETFPREGS),
#endif
#ifdef PTRACE_SETFPREGS
- { PTRACE_SETFPREGS, "PTRACE_SETFPREGS" },
+ XLAT(PTRACE_SETFPREGS),
#endif
#ifdef PTRACE_GETFPXREGS
- { PTRACE_GETFPXREGS, "PTRACE_GETFPXREGS" },
+ XLAT(PTRACE_GETFPXREGS),
#endif
#ifdef PTRACE_SETFPXREGS
- { PTRACE_SETFPXREGS, "PTRACE_SETFPXREGS" },
+ XLAT(PTRACE_SETFPXREGS),
#endif
#ifdef PTRACE_GETVRREGS
- { PTRACE_GETVRREGS, "PTRACE_GETVRREGS" },
+ XLAT(PTRACE_GETVRREGS),
#endif
#ifdef PTRACE_SETVRREGS
- { PTRACE_SETVRREGS, "PTRACE_SETVRREGS" },
+ XLAT(PTRACE_SETVRREGS),
#endif
#ifdef PTRACE_SETOPTIONS
- { PTRACE_SETOPTIONS, "PTRACE_SETOPTIONS" },
+ XLAT(PTRACE_SETOPTIONS),
#endif
#ifdef PTRACE_GETEVENTMSG
- { PTRACE_GETEVENTMSG, "PTRACE_GETEVENTMSG" },
+ XLAT(PTRACE_GETEVENTMSG),
#endif
#ifdef PTRACE_GETSIGINFO
- { PTRACE_GETSIGINFO, "PTRACE_GETSIGINFO" },
+ XLAT(PTRACE_GETSIGINFO),
#endif
#ifdef PTRACE_SETSIGINFO
- { PTRACE_SETSIGINFO, "PTRACE_SETSIGINFO" },
+ XLAT(PTRACE_SETSIGINFO),
#endif
#ifdef PTRACE_GETREGSET
- { PTRACE_GETREGSET, "PTRACE_GETREGSET" },
+ XLAT(PTRACE_GETREGSET),
#endif
#ifdef PTRACE_SETREGSET
- { PTRACE_SETREGSET, "PTRACE_SETREGSET" },
+ XLAT(PTRACE_SETREGSET),
#endif
#ifdef PTRACE_SET_SYSCALL
- { PTRACE_SET_SYSCALL, "PTRACE_SET_SYSCALL" },
+ XLAT(PTRACE_SET_SYSCALL),
#endif
#ifdef PTRACE_SEIZE
- { PTRACE_SEIZE, "PTRACE_SEIZE" },
+ XLAT(PTRACE_SEIZE),
#endif
#ifdef PTRACE_INTERRUPT
- { PTRACE_INTERRUPT, "PTRACE_INTERRUPT" },
+ XLAT(PTRACE_INTERRUPT),
#endif
#ifdef PTRACE_LISTEN
- { PTRACE_LISTEN, "PTRACE_LISTEN" },
+ XLAT(PTRACE_LISTEN),
#endif
- { PTRACE_SYSCALL, "PTRACE_SYSCALL" },
+ XLAT(PTRACE_SYSCALL),
- { 0, NULL },
+ XLAT_END
};
#ifdef PTRACE_SETOPTIONS
static const struct xlat ptrace_setoptions_flags[] = {
# ifdef PTRACE_O_TRACESYSGOOD
- { PTRACE_O_TRACESYSGOOD,"PTRACE_O_TRACESYSGOOD" },
+ XLAT(PTRACE_O_TRACESYSGOOD),
# endif
# ifdef PTRACE_O_TRACEFORK
- { PTRACE_O_TRACEFORK, "PTRACE_O_TRACEFORK" },
+ XLAT(PTRACE_O_TRACEFORK),
# endif
# ifdef PTRACE_O_TRACEVFORK
- { PTRACE_O_TRACEVFORK, "PTRACE_O_TRACEVFORK" },
+ XLAT(PTRACE_O_TRACEVFORK),
# endif
# ifdef PTRACE_O_TRACECLONE
- { PTRACE_O_TRACECLONE, "PTRACE_O_TRACECLONE" },
+ XLAT(PTRACE_O_TRACECLONE),
# endif
# ifdef PTRACE_O_TRACEEXEC
- { PTRACE_O_TRACEEXEC, "PTRACE_O_TRACEEXEC" },
+ XLAT(PTRACE_O_TRACEEXEC),
# endif
# ifdef PTRACE_O_TRACEVFORKDONE
- { PTRACE_O_TRACEVFORKDONE,"PTRACE_O_TRACEVFORKDONE"},
+ XLAT(PTRACE_O_TRACEVFORKDONE),
# endif
# ifdef PTRACE_O_TRACEEXIT
- { PTRACE_O_TRACEEXIT, "PTRACE_O_TRACEEXIT" },
+ XLAT(PTRACE_O_TRACEEXIT),
# endif
# ifdef PTRACE_O_TRACESECCOMP
- { PTRACE_O_TRACESECCOMP,"PTRACE_O_TRACESECCOMP" },
+ XLAT(PTRACE_O_TRACESECCOMP),
# endif
# ifdef PTRACE_O_EXITKILL
- { PTRACE_O_EXITKILL, "PTRACE_O_EXITKILL" },
+ XLAT(PTRACE_O_EXITKILL),
# endif
- { 0, NULL },
+ XLAT_END
};
#endif /* PTRACE_SETOPTIONS */
static const struct xlat nt_descriptor_types[] = {
#ifdef NT_PRSTATUS
- { NT_PRSTATUS, "NT_PRSTATUS" },
+ XLAT(NT_PRSTATUS),
#endif
#ifdef NT_FPREGSET
- { NT_FPREGSET, "NT_FPREGSET" },
+ XLAT(NT_FPREGSET),
#endif
#ifdef NT_PRPSINFO
- { NT_PRPSINFO, "NT_PRPSINFO" },
+ XLAT(NT_PRPSINFO),
#endif
#ifdef NT_PRXREG
- { NT_PRXREG, "NT_PRXREG" },
+ XLAT(NT_PRXREG),
#endif
#ifdef NT_TASKSTRUCT
- { NT_TASKSTRUCT, "NT_TASKSTRUCT" },
+ XLAT(NT_TASKSTRUCT),
#endif
#ifdef NT_PLATFORM
- { NT_PLATFORM, "NT_PLATFORM" },
+ XLAT(NT_PLATFORM),
#endif
#ifdef NT_AUXV
- { NT_AUXV, "NT_AUXV" },
+ XLAT(NT_AUXV),
#endif
#ifdef NT_GWINDOWS
- { NT_GWINDOWS, "NT_GWINDOWS" },
+ XLAT(NT_GWINDOWS),
#endif
#ifdef NT_ASRS
- { NT_ASRS, "NT_ASRS" },
+ XLAT(NT_ASRS),
#endif
#ifdef NT_PSTATUS
- { NT_PSTATUS, "NT_PSTATUS" },
+ XLAT(NT_PSTATUS),
#endif
#ifdef NT_PSINFO
- { NT_PSINFO, "NT_PSINFO" },
+ XLAT(NT_PSINFO),
#endif
#ifdef NT_PRCRED
- { NT_PRCRED, "NT_PRCRED" },
+ XLAT(NT_PRCRED),
#endif
#ifdef NT_UTSNAME
- { NT_UTSNAME, "NT_UTSNAME" },
+ XLAT(NT_UTSNAME),
#endif
#ifdef NT_LWPSTATUS
- { NT_LWPSTATUS, "NT_LWPSTATUS" },
+ XLAT(NT_LWPSTATUS),
#endif
#ifdef NT_LWPSINFO
- { NT_LWPSINFO, "NT_LWPSINFO" },
+ XLAT(NT_LWPSINFO),
#endif
#ifdef NT_PRFPXREG
- { NT_PRFPXREG, "NT_PRFPXREG" },
+ XLAT(NT_PRFPXREG),
#endif
#ifdef NT_PRXFPREG
- { NT_PRXFPREG, "NT_PRXFPREG" },
+ XLAT(NT_PRXFPREG),
#endif
#ifdef NT_PPC_VMX
- { NT_PPC_VMX, "NT_PPC_VMX" },
+ XLAT(NT_PPC_VMX),
#endif
#ifdef NT_PPC_SPE
- { NT_PPC_SPE, "NT_PPC_SPE" },
+ XLAT(NT_PPC_SPE),
#endif
#ifdef NT_PPC_VSX
- { NT_PPC_VSX, "NT_PPC_VSX" },
+ XLAT(NT_PPC_VSX),
#endif
#ifdef NT_386_TLS
- { NT_386_TLS, "NT_386_TLS" },
+ XLAT(NT_386_TLS),
#endif
#ifdef NT_386_IOPERM
- { NT_386_IOPERM, "NT_386_IOPERM" },
+ XLAT(NT_386_IOPERM),
#endif
#ifdef NT_X86_XSTATE
- { NT_X86_XSTATE, "NT_X86_XSTATE" },
+ XLAT(NT_X86_XSTATE),
#endif
- { 0, NULL },
+ XLAT_END
};
#define uoff(member) offsetof(struct user, member)
@@ -1691,67 +1701,67 @@
# endif
{ PT_DBR, "dbr" }, { PT_IBR, "ibr" }, { PT_PMD, "pmd" },
#elif defined(I386)
- { 4*EBX, "4*EBX" },
- { 4*ECX, "4*ECX" },
- { 4*EDX, "4*EDX" },
- { 4*ESI, "4*ESI" },
- { 4*EDI, "4*EDI" },
- { 4*EBP, "4*EBP" },
- { 4*EAX, "4*EAX" },
- { 4*DS, "4*DS" },
- { 4*ES, "4*ES" },
- { 4*FS, "4*FS" },
- { 4*GS, "4*GS" },
- { 4*ORIG_EAX, "4*ORIG_EAX" },
- { 4*EIP, "4*EIP" },
- { 4*CS, "4*CS" },
- { 4*EFL, "4*EFL" },
- { 4*UESP, "4*UESP" },
- { 4*SS, "4*SS" },
+ XLAT(4*EBX),
+ XLAT(4*ECX),
+ XLAT(4*EDX),
+ XLAT(4*ESI),
+ XLAT(4*EDI),
+ XLAT(4*EBP),
+ XLAT(4*EAX),
+ XLAT(4*DS),
+ XLAT(4*ES),
+ XLAT(4*FS),
+ XLAT(4*GS),
+ XLAT(4*ORIG_EAX),
+ XLAT(4*EIP),
+ XLAT(4*CS),
+ XLAT(4*EFL),
+ XLAT(4*UESP),
+ XLAT(4*SS),
#elif defined(X86_64) || defined(X32)
- { 8*R15, "8*R15" },
- { 8*R14, "8*R14" },
- { 8*R13, "8*R13" },
- { 8*R12, "8*R12" },
- { 8*RBP, "8*RBP" },
- { 8*RBX, "8*RBX" },
- { 8*R11, "8*R11" },
- { 8*R10, "8*R10" },
- { 8*R9, "8*R9" },
- { 8*R8, "8*R8" },
- { 8*RAX, "8*RAX" },
- { 8*RCX, "8*RCX" },
- { 8*RDX, "8*RDX" },
- { 8*RSI, "8*RSI" },
- { 8*RDI, "8*RDI" },
- { 8*ORIG_RAX, "8*ORIG_RAX" },
- { 8*RIP, "8*RIP" },
- { 8*CS, "8*CS" },
+ XLAT(8*R15),
+ XLAT(8*R14),
+ XLAT(8*R13),
+ XLAT(8*R12),
+ XLAT(8*RBP),
+ XLAT(8*RBX),
+ XLAT(8*R11),
+ XLAT(8*R10),
+ XLAT(8*R9),
+ XLAT(8*R8),
+ XLAT(8*RAX),
+ XLAT(8*RCX),
+ XLAT(8*RDX),
+ XLAT(8*RSI),
+ XLAT(8*RDI),
+ XLAT(8*ORIG_RAX),
+ XLAT(8*RIP),
+ XLAT(8*CS),
{ 8*EFLAGS, "8*EFL" },
- { 8*RSP, "8*RSP" },
- { 8*SS, "8*SS" },
+ XLAT(8*RSP),
+ XLAT(8*SS),
#elif defined(M68K)
- { 4*PT_D1, "4*PT_D1" },
- { 4*PT_D2, "4*PT_D2" },
- { 4*PT_D3, "4*PT_D3" },
- { 4*PT_D4, "4*PT_D4" },
- { 4*PT_D5, "4*PT_D5" },
- { 4*PT_D6, "4*PT_D6" },
- { 4*PT_D7, "4*PT_D7" },
- { 4*PT_A0, "4*PT_A0" },
- { 4*PT_A1, "4*PT_A1" },
- { 4*PT_A2, "4*PT_A2" },
- { 4*PT_A3, "4*PT_A3" },
- { 4*PT_A4, "4*PT_A4" },
- { 4*PT_A5, "4*PT_A5" },
- { 4*PT_A6, "4*PT_A6" },
- { 4*PT_D0, "4*PT_D0" },
- { 4*PT_USP, "4*PT_USP" },
- { 4*PT_ORIG_D0, "4*PT_ORIG_D0" },
- { 4*PT_SR, "4*PT_SR" },
- { 4*PT_PC, "4*PT_PC" },
+ XLAT(4*PT_D1),
+ XLAT(4*PT_D2),
+ XLAT(4*PT_D3),
+ XLAT(4*PT_D4),
+ XLAT(4*PT_D5),
+ XLAT(4*PT_D6),
+ XLAT(4*PT_D7),
+ XLAT(4*PT_A0),
+ XLAT(4*PT_A1),
+ XLAT(4*PT_A2),
+ XLAT(4*PT_A3),
+ XLAT(4*PT_A4),
+ XLAT(4*PT_A5),
+ XLAT(4*PT_A6),
+ XLAT(4*PT_D0),
+ XLAT(4*PT_USP),
+ XLAT(4*PT_ORIG_D0),
+ XLAT(4*PT_SR),
+ XLAT(4*PT_PC),
#elif defined(SH)
- { 4*REG_REG0, "4*REG_REG0" },
+ XLAT(4*REG_REG0),
{ 4*(REG_REG0+1), "4*REG_REG1" },
{ 4*(REG_REG0+2), "4*REG_REG2" },
{ 4*(REG_REG0+3), "4*REG_REG3" },
@@ -1766,16 +1776,16 @@
{ 4*(REG_REG0+12), "4*REG_REG12" },
{ 4*(REG_REG0+13), "4*REG_REG13" },
{ 4*(REG_REG0+14), "4*REG_REG14" },
- { 4*REG_REG15, "4*REG_REG15" },
- { 4*REG_PC, "4*REG_PC" },
- { 4*REG_PR, "4*REG_PR" },
- { 4*REG_SR, "4*REG_SR" },
- { 4*REG_GBR, "4*REG_GBR" },
- { 4*REG_MACH, "4*REG_MACH" },
- { 4*REG_MACL, "4*REG_MACL" },
- { 4*REG_SYSCALL, "4*REG_SYSCALL" },
- { 4*REG_FPUL, "4*REG_FPUL" },
- { 4*REG_FPREG0, "4*REG_FPREG0" },
+ XLAT(4*REG_REG15),
+ XLAT(4*REG_PC),
+ XLAT(4*REG_PR),
+ XLAT(4*REG_SR),
+ XLAT(4*REG_GBR),
+ XLAT(4*REG_MACH),
+ XLAT(4*REG_MACL),
+ XLAT(4*REG_SYSCALL),
+ XLAT(4*REG_FPUL),
+ XLAT(4*REG_FPREG0),
{ 4*(REG_FPREG0+1), "4*REG_FPREG1" },
{ 4*(REG_FPREG0+2), "4*REG_FPREG2" },
{ 4*(REG_FPREG0+3), "4*REG_FPREG3" },
@@ -1790,18 +1800,18 @@
{ 4*(REG_FPREG0+12), "4*REG_FPREG12" },
{ 4*(REG_FPREG0+13), "4*REG_FPREG13" },
{ 4*(REG_FPREG0+14), "4*REG_FPREG14" },
- { 4*REG_FPREG15, "4*REG_FPREG15" },
+ XLAT(4*REG_FPREG15),
# ifdef REG_XDREG0
- { 4*REG_XDREG0, "4*REG_XDREG0" },
+ XLAT(4*REG_XDREG0),
{ 4*(REG_XDREG0+2), "4*REG_XDREG2" },
{ 4*(REG_XDREG0+4), "4*REG_XDREG4" },
{ 4*(REG_XDREG0+6), "4*REG_XDREG6" },
{ 4*(REG_XDREG0+8), "4*REG_XDREG8" },
{ 4*(REG_XDREG0+10), "4*REG_XDREG10" },
{ 4*(REG_XDREG0+12), "4*REG_XDREG12" },
- { 4*REG_XDREG14, "4*REG_XDREG14" },
+ XLAT(4*REG_XDREG14),
# endif
- { 4*REG_FPSCR, "4*REG_FPSCR" },
+ XLAT(4*REG_FPSCR),
#elif defined(SH64)
{ 0, "PC(L)" },
{ 4, "PC(U)" },
@@ -2128,73 +2138,73 @@
{ PTREGS_OFFSET_FLAGS, "flags" },
#endif
#ifdef CRISV10
- { 4*PT_FRAMETYPE, "4*PT_FRAMETYPE" },
- { 4*PT_ORIG_R10, "4*PT_ORIG_R10" },
- { 4*PT_R13, "4*PT_R13" },
- { 4*PT_R12, "4*PT_R12" },
- { 4*PT_R11, "4*PT_R11" },
- { 4*PT_R10, "4*PT_R10" },
- { 4*PT_R9, "4*PT_R9" },
- { 4*PT_R8, "4*PT_R8" },
- { 4*PT_R7, "4*PT_R7" },
- { 4*PT_R6, "4*PT_R6" },
- { 4*PT_R5, "4*PT_R5" },
- { 4*PT_R4, "4*PT_R4" },
- { 4*PT_R3, "4*PT_R3" },
- { 4*PT_R2, "4*PT_R2" },
- { 4*PT_R1, "4*PT_R1" },
- { 4*PT_R0, "4*PT_R0" },
- { 4*PT_MOF, "4*PT_MOF" },
- { 4*PT_DCCR, "4*PT_DCCR" },
- { 4*PT_SRP, "4*PT_SRP" },
- { 4*PT_IRP, "4*PT_IRP" },
- { 4*PT_CSRINSTR, "4*PT_CSRINSTR" },
- { 4*PT_CSRADDR, "4*PT_CSRADDR" },
- { 4*PT_CSRDATA, "4*PT_CSRDATA" },
- { 4*PT_USP, "4*PT_USP" },
+ XLAT(4*PT_FRAMETYPE),
+ XLAT(4*PT_ORIG_R10),
+ XLAT(4*PT_R13),
+ XLAT(4*PT_R12),
+ XLAT(4*PT_R11),
+ XLAT(4*PT_R10),
+ XLAT(4*PT_R9),
+ XLAT(4*PT_R8),
+ XLAT(4*PT_R7),
+ XLAT(4*PT_R6),
+ XLAT(4*PT_R5),
+ XLAT(4*PT_R4),
+ XLAT(4*PT_R3),
+ XLAT(4*PT_R2),
+ XLAT(4*PT_R1),
+ XLAT(4*PT_R0),
+ XLAT(4*PT_MOF),
+ XLAT(4*PT_DCCR),
+ XLAT(4*PT_SRP),
+ XLAT(4*PT_IRP),
+ XLAT(4*PT_CSRINSTR),
+ XLAT(4*PT_CSRADDR),
+ XLAT(4*PT_CSRDATA),
+ XLAT(4*PT_USP),
#endif
#ifdef CRISV32
- { 4*PT_ORIG_R10, "4*PT_ORIG_R10" },
- { 4*PT_R0, "4*PT_R0" },
- { 4*PT_R1, "4*PT_R1" },
- { 4*PT_R2, "4*PT_R2" },
- { 4*PT_R3, "4*PT_R3" },
- { 4*PT_R4, "4*PT_R4" },
- { 4*PT_R5, "4*PT_R5" },
- { 4*PT_R6, "4*PT_R6" },
- { 4*PT_R7, "4*PT_R7" },
- { 4*PT_R8, "4*PT_R8" },
- { 4*PT_R9, "4*PT_R9" },
- { 4*PT_R10, "4*PT_R10" },
- { 4*PT_R11, "4*PT_R11" },
- { 4*PT_R12, "4*PT_R12" },
- { 4*PT_R13, "4*PT_R13" },
- { 4*PT_ACR, "4*PT_ACR" },
- { 4*PT_SRS, "4*PT_SRS" },
- { 4*PT_MOF, "4*PT_MOF" },
- { 4*PT_SPC, "4*PT_SPC" },
- { 4*PT_CCS, "4*PT_CCS" },
- { 4*PT_SRP, "4*PT_SRP" },
- { 4*PT_ERP, "4*PT_ERP" },
- { 4*PT_EXS, "4*PT_EXS" },
- { 4*PT_EDA, "4*PT_EDA" },
- { 4*PT_USP, "4*PT_USP" },
- { 4*PT_PPC, "4*PT_PPC" },
- { 4*PT_BP_CTRL, "4*PT_BP_CTRL" },
- { 4*PT_BP+4, "4*PT_BP+4" },
- { 4*PT_BP+8, "4*PT_BP+8" },
- { 4*PT_BP+12, "4*PT_BP+12" },
- { 4*PT_BP+16, "4*PT_BP+16" },
- { 4*PT_BP+20, "4*PT_BP+20" },
- { 4*PT_BP+24, "4*PT_BP+24" },
- { 4*PT_BP+28, "4*PT_BP+28" },
- { 4*PT_BP+32, "4*PT_BP+32" },
- { 4*PT_BP+36, "4*PT_BP+36" },
- { 4*PT_BP+40, "4*PT_BP+40" },
- { 4*PT_BP+44, "4*PT_BP+44" },
- { 4*PT_BP+48, "4*PT_BP+48" },
- { 4*PT_BP+52, "4*PT_BP+52" },
- { 4*PT_BP+56, "4*PT_BP+56" },
+ XLAT(4*PT_ORIG_R10),
+ XLAT(4*PT_R0),
+ XLAT(4*PT_R1),
+ XLAT(4*PT_R2),
+ XLAT(4*PT_R3),
+ XLAT(4*PT_R4),
+ XLAT(4*PT_R5),
+ XLAT(4*PT_R6),
+ XLAT(4*PT_R7),
+ XLAT(4*PT_R8),
+ XLAT(4*PT_R9),
+ XLAT(4*PT_R10),
+ XLAT(4*PT_R11),
+ XLAT(4*PT_R12),
+ XLAT(4*PT_R13),
+ XLAT(4*PT_ACR),
+ XLAT(4*PT_SRS),
+ XLAT(4*PT_MOF),
+ XLAT(4*PT_SPC),
+ XLAT(4*PT_CCS),
+ XLAT(4*PT_SRP),
+ XLAT(4*PT_ERP),
+ XLAT(4*PT_EXS),
+ XLAT(4*PT_EDA),
+ XLAT(4*PT_USP),
+ XLAT(4*PT_PPC),
+ XLAT(4*PT_BP_CTRL),
+ XLAT(4*PT_BP+4),
+ XLAT(4*PT_BP+8),
+ XLAT(4*PT_BP+12),
+ XLAT(4*PT_BP+16),
+ XLAT(4*PT_BP+20),
+ XLAT(4*PT_BP+24),
+ XLAT(4*PT_BP+28),
+ XLAT(4*PT_BP+32),
+ XLAT(4*PT_BP+36),
+ XLAT(4*PT_BP+40),
+ XLAT(4*PT_BP+44),
+ XLAT(4*PT_BP+48),
+ XLAT(4*PT_BP+52),
+ XLAT(4*PT_BP+56),
#endif
#ifdef MICROBLAZE
{ PT_GPR(0), "r0" },
@@ -2501,8 +2511,10 @@
/* nothing */
#elif defined(XTENSA)
/* nothing */
+#elif defined(ARC)
+ /* nothing */
#endif
- { 0, NULL },
+ XLAT_END
};
int
@@ -2639,38 +2651,74 @@
#ifndef FUTEX_CLOCK_REALTIME
# define FUTEX_CLOCK_REALTIME 256
#endif
+#ifndef FUTEX_WAIT_PRIVATE
+# define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_WAKE_PRIVATE
+# define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_REQUEUE_PRIVATE
+# define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_CMP_REQUEUE_PRIVATE
+# define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_WAKE_OP_PRIVATE
+# define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_LOCK_PI_PRIVATE
+# define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_UNLOCK_PI_PRIVATE
+# define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_TRYLOCK_PI_PRIVATE
+# define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_WAIT_BITSET_PRIVATE
+# define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_WAKE_BITSET_PRIVATE
+# define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE
+# define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
+#endif
+#ifndef FUTEX_CMP_REQUEUE_PI_PRIVATE
+# define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
+#endif
static const struct xlat futexops[] = {
- { FUTEX_WAIT, "FUTEX_WAIT" },
- { FUTEX_WAKE, "FUTEX_WAKE" },
- { FUTEX_FD, "FUTEX_FD" },
- { FUTEX_REQUEUE, "FUTEX_REQUEUE" },
- { FUTEX_CMP_REQUEUE, "FUTEX_CMP_REQUEUE" },
- { FUTEX_WAKE_OP, "FUTEX_WAKE_OP" },
- { FUTEX_LOCK_PI, "FUTEX_LOCK_PI" },
- { FUTEX_UNLOCK_PI, "FUTEX_UNLOCK_PI" },
- { FUTEX_TRYLOCK_PI, "FUTEX_TRYLOCK_PI" },
- { FUTEX_WAIT_BITSET, "FUTEX_WAIT_BITSET" },
- { FUTEX_WAKE_BITSET, "FUTEX_WAKE_BITSET" },
- { FUTEX_WAIT_REQUEUE_PI, "FUTEX_WAIT_REQUEUE_PI" },
- { FUTEX_CMP_REQUEUE_PI, "FUTEX_CMP_REQUEUE_PI" },
- { FUTEX_WAIT|FUTEX_PRIVATE_FLAG, "FUTEX_WAIT_PRIVATE" },
- { FUTEX_WAKE|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_PRIVATE" },
- { FUTEX_FD|FUTEX_PRIVATE_FLAG, "FUTEX_FD_PRIVATE" },
- { FUTEX_REQUEUE|FUTEX_PRIVATE_FLAG, "FUTEX_REQUEUE_PRIVATE" },
- { FUTEX_CMP_REQUEUE|FUTEX_PRIVATE_FLAG, "FUTEX_CMP_REQUEUE_PRIVATE" },
- { FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_OP_PRIVATE" },
- { FUTEX_LOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_LOCK_PI_PRIVATE" },
- { FUTEX_UNLOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_UNLOCK_PI_PRIVATE" },
- { FUTEX_TRYLOCK_PI|FUTEX_PRIVATE_FLAG, "FUTEX_TRYLOCK_PI_PRIVATE" },
- { FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG, "FUTEX_WAIT_BITSET_PRIVATE" },
- { FUTEX_WAKE_BITSET|FUTEX_PRIVATE_FLAG, "FUTEX_WAKE_BITSET_PRIVATE" },
- { FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG, "FUTEX_WAIT_REQUEUE_PI_PRIVATE" },
- { FUTEX_CMP_REQUEUE_PI|FUTEX_PRIVATE_FLAG, "FUTEX_CMP_REQUEUE_PI_PRIVATE" },
- { FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME" },
- { FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME" },
- { FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME" },
- { FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME, "FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME" },
- { 0, NULL }
+ XLAT(FUTEX_WAIT),
+ XLAT(FUTEX_WAKE),
+ XLAT(FUTEX_FD),
+ XLAT(FUTEX_REQUEUE),
+ XLAT(FUTEX_CMP_REQUEUE),
+ XLAT(FUTEX_WAKE_OP),
+ XLAT(FUTEX_LOCK_PI),
+ XLAT(FUTEX_UNLOCK_PI),
+ XLAT(FUTEX_TRYLOCK_PI),
+ XLAT(FUTEX_WAIT_BITSET),
+ XLAT(FUTEX_WAKE_BITSET),
+ XLAT(FUTEX_WAIT_REQUEUE_PI),
+ XLAT(FUTEX_CMP_REQUEUE_PI),
+ XLAT(FUTEX_WAIT_PRIVATE),
+ XLAT(FUTEX_WAKE_PRIVATE),
+ XLAT(FUTEX_FD|FUTEX_PRIVATE_FLAG),
+ XLAT(FUTEX_REQUEUE_PRIVATE),
+ XLAT(FUTEX_CMP_REQUEUE_PRIVATE),
+ XLAT(FUTEX_WAKE_OP_PRIVATE),
+ XLAT(FUTEX_LOCK_PI_PRIVATE),
+ XLAT(FUTEX_UNLOCK_PI_PRIVATE),
+ XLAT(FUTEX_TRYLOCK_PI_PRIVATE),
+ XLAT(FUTEX_WAIT_BITSET_PRIVATE),
+ XLAT(FUTEX_WAKE_BITSET_PRIVATE),
+ XLAT(FUTEX_WAIT_REQUEUE_PI_PRIVATE),
+ XLAT(FUTEX_CMP_REQUEUE_PI_PRIVATE),
+ XLAT(FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME),
+ XLAT(FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME),
+ XLAT(FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME),
+ XLAT(FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME),
+ XLAT_END
};
#ifndef FUTEX_OP_SET
# define FUTEX_OP_SET 0
@@ -2686,21 +2734,21 @@
# define FUTEX_OP_CMP_GE 5
#endif
static const struct xlat futexwakeops[] = {
- { FUTEX_OP_SET, "FUTEX_OP_SET" },
- { FUTEX_OP_ADD, "FUTEX_OP_ADD" },
- { FUTEX_OP_OR, "FUTEX_OP_OR" },
- { FUTEX_OP_ANDN, "FUTEX_OP_ANDN" },
- { FUTEX_OP_XOR, "FUTEX_OP_XOR" },
- { 0, NULL }
+ XLAT(FUTEX_OP_SET),
+ XLAT(FUTEX_OP_ADD),
+ XLAT(FUTEX_OP_OR),
+ XLAT(FUTEX_OP_ANDN),
+ XLAT(FUTEX_OP_XOR),
+ XLAT_END
};
static const struct xlat futexwakecmps[] = {
- { FUTEX_OP_CMP_EQ, "FUTEX_OP_CMP_EQ" },
- { FUTEX_OP_CMP_NE, "FUTEX_OP_CMP_NE" },
- { FUTEX_OP_CMP_LT, "FUTEX_OP_CMP_LT" },
- { FUTEX_OP_CMP_LE, "FUTEX_OP_CMP_LE" },
- { FUTEX_OP_CMP_GT, "FUTEX_OP_CMP_GT" },
- { FUTEX_OP_CMP_GE, "FUTEX_OP_CMP_GE" },
- { 0, NULL }
+ XLAT(FUTEX_OP_CMP_EQ),
+ XLAT(FUTEX_OP_CMP_NE),
+ XLAT(FUTEX_OP_CMP_LT),
+ XLAT(FUTEX_OP_CMP_LE),
+ XLAT(FUTEX_OP_CMP_GT),
+ XLAT(FUTEX_OP_CMP_GE),
+ XLAT_END
};
int
@@ -2828,10 +2876,10 @@
}
static const struct xlat schedulers[] = {
- { SCHED_OTHER, "SCHED_OTHER" },
- { SCHED_RR, "SCHED_RR" },
- { SCHED_FIFO, "SCHED_FIFO" },
- { 0, NULL }
+ XLAT(SCHED_OTHER),
+ XLAT(SCHED_RR),
+ XLAT(SCHED_FIFO),
+ XLAT_END
};
int
@@ -2857,7 +2905,7 @@
if (umove(tcp, tcp->u_arg[2], &p) < 0)
tprintf(", %#lx", tcp->u_arg[2]);
else
- tprintf(", { %d }", p.__sched_priority);
+ tprintf(", { %d }", p.sched_priority);
}
return 0;
}
@@ -2872,7 +2920,7 @@
if (umove(tcp, tcp->u_arg[1], &p) < 0)
tprintf("%#lx", tcp->u_arg[1]);
else
- tprintf("{ %d }", p.__sched_priority);
+ tprintf("{ %d }", p.sched_priority);
}
return 0;
}
@@ -2885,7 +2933,7 @@
if (umove(tcp, tcp->u_arg[1], &p) < 0)
tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
else
- tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
+ tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority);
}
return 0;
}
@@ -2917,11 +2965,11 @@
# include <asm/prctl.h>
static const struct xlat archvals[] = {
- { ARCH_SET_GS, "ARCH_SET_GS" },
- { ARCH_SET_FS, "ARCH_SET_FS" },
- { ARCH_GET_FS, "ARCH_GET_FS" },
- { ARCH_GET_GS, "ARCH_GET_GS" },
- { 0, NULL },
+ XLAT(ARCH_SET_GS),
+ XLAT(ARCH_SET_FS),
+ XLAT(ARCH_GET_FS),
+ XLAT(ARCH_GET_GS),
+ XLAT_END
};
int
diff --git a/ptp.c b/ptp.c
new file mode 100644
index 0000000..773f3d5
--- /dev/null
+++ b/ptp.c
@@ -0,0 +1,103 @@
+#include "defs.h"
+#include <sys/ioctl.h>
+#include <linux/ptp_clock.h>
+
+static const struct xlat ptp_flags_options[] = {
+ XLAT(PTP_ENABLE_FEATURE),
+ XLAT(PTP_RISING_EDGE),
+ XLAT(PTP_FALLING_EDGE),
+ XLAT_END
+};
+
+
+int ptp_ioctl(struct tcb *tcp, long code, long arg)
+{
+ if (!verbose(tcp))
+ return 0;
+
+ switch (code) {
+ case PTP_CLOCK_GETCAPS: /* decode on exit */
+ {
+ struct ptp_clock_caps caps;
+
+ if (entering(tcp) || syserror(tcp) ||
+ umove(tcp, arg, &caps) < 0)
+ return 0;
+
+ tprintf(", {max_adj=%d, n_alarm=%d, n_ext_ts=%d, n_per_out=%d, pps=%d}",
+ caps.max_adj, caps.n_alarm, caps.n_ext_ts,
+ caps.n_per_out, caps.pps);
+ return 1;
+ }
+
+ case PTP_EXTTS_REQUEST: /* decode on enter */
+ {
+ struct ptp_extts_request extts;
+
+ if (exiting(tcp))
+ return 1;
+ if (umove(tcp, arg, &extts) < 0) {
+ tprintf(", %#lx", arg);
+ return 0;
+ }
+ tprintf(", {index=%d, flags=", extts.index);
+ printflags(ptp_flags_options, extts.flags, "PTP_???");
+ tprints("}");
+ return 1;
+ }
+
+ case PTP_PEROUT_REQUEST: /* decode on enter */
+ {
+ struct ptp_perout_request perout;
+
+ if (exiting(tcp))
+ return 1;
+ if (umove(tcp, arg, &perout) < 0) {
+ tprintf(", %#lx", arg);
+ return 0;
+ }
+
+ tprintf(", {start={%" PRId64 ", %" PRIu32 "}"
+ ", period={%" PRId64 ", %" PRIu32 "}"
+ ", index=%d, flags=",
+ (int64_t)perout.start.sec, perout.start.nsec,
+ (int64_t)perout.period.sec, perout.period.nsec,
+ perout.index);
+ printflags(ptp_flags_options, perout.flags, "PTP_???");
+ tprints("}");
+ return 1;
+ }
+
+ case PTP_ENABLE_PPS: /* decode on enter */
+ if (entering(tcp))
+ tprintf(", %ld", arg);
+ return 1;
+
+ case PTP_SYS_OFFSET: /* decode on exit */
+ {
+ struct ptp_sys_offset sysoff;
+ unsigned int i;
+
+ if (entering(tcp) || umove(tcp, arg, &sysoff) < 0)
+ return 0;
+
+ tprintf(", {n_samples=%u, ts={", sysoff.n_samples);
+ if (syserror(tcp)) {
+ tprints("...}}");
+ return 1;
+ }
+ if (sysoff.n_samples > PTP_MAX_SAMPLES)
+ sysoff.n_samples = PTP_MAX_SAMPLES;
+ tprintf("{%" PRId64 ", %" PRIu32 "}",
+ (int64_t)sysoff.ts[0].sec, sysoff.ts[0].nsec);
+ for (i = 1; i < 2*sysoff.n_samples+1; ++i)
+ tprintf(", {%" PRId64 ", %" PRIu32 "}",
+ (int64_t)sysoff.ts[i].sec, sysoff.ts[i].nsec);
+ tprints("}}");
+ return 1;
+ }
+
+ default: /* decode on exit */
+ return 0;
+ }
+}
diff --git a/qemu_multiarch_testing/README b/qemu_multiarch_testing/README
new file mode 100644
index 0000000..712b953
--- /dev/null
+++ b/qemu_multiarch_testing/README
@@ -0,0 +1,51 @@
+How to test strace build using Aboriginal Linux's system images.
+
+* Put a autoconf'ed strace source tree into hdc.dir/strace dir.
+For example, this should work:
+git clone git://strace.git.sourceforge.net/gitroot/strace/strace &&
+cd strace && autoreconf -i -f
+
+* Run ./make-hdc-img.sh: it will generate ext2 image file,
+hdc.img, from hdc.dir/* data. This requires root for loop mount.
+
+* Download and unpack, or build from source and unpack
+one or more system-image-ARCH directories into this directory
+(the one which contains this README).
+
+* Run: ./parallel-build-hdc-img.sh system-image-DIR1 system-image-DIR2...
+(background it if you don't want to see "Waiting to finish" thing).
+This runs a strace build in several qemu virtual machines in parallel.
+
+* Observe system-image-*.log file(s) with growing log of strace build.
+
+There is no automated detection of errors for now: you need to examine
+logs yourself.
+
+For me, the following system images worked:
+system-image-armv4l
+system-image-armv4tl
+system-image-armv5l
+system-image-armv6l
+system-image-i686 (had to s/qemu-system-i386/qemu/ in run-emulator.sh)
+system-image-mipsel
+system-image-mips
+system-image-x86_64
+system-image-sparc - needed small edit in native-build.sh:
+ # Getting this early:
+ # Unhandled Exception 0x00000007
+ # PC = 0xffd07cec NPC = 0xffd07cf0
+ # Stopping execution
+ # and it looks like it's triggered just by too long kernel cmdline,
+ # not by specific options.
+ #export KERNEL_EXTRA="FTP_SERVER=$FTP_SERVER FTP_PORT=$FTP_PORT NATIVE_BUILD=$NATIVE_BUILD $KERNEL_EXTRA"
+ # This works:
+ export KERNEL_EXTRA="NATIVE_BUILD=$NATIVE_BUILD $KERNEL_EXTRA"
+
+And these did not:
+system-image-armv4eb - VFS: Cannot open root device "sda" or unknown-block(0,0)
+system-image-m68k - run-emulator.sh has no call of qemu-system-* (not supported yet??)
+system-image-mips64 -
+ need to run ./native-build.sh ../hdc.img by hand;
+ copying in /mnt/init fails (segv?)
+system-image-powerpc - QEMU stuck very early
+system-image-sh4 - hdc does not mount (no support for 2 disks)
diff --git a/qemu_multiarch_testing/hdc.dir/init b/qemu_multiarch_testing/hdc.dir/init
new file mode 100755
index 0000000..ea905ab
--- /dev/null
+++ b/qemu_multiarch_testing/hdc.dir/init
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Emit a msg to let user know this place was reached
+echo "Copying to /home"
+# Had a case where cp SEGVs, let's have diagnostics for it
+cp -a /mnt /home || { echo "cp: $?"; exit 1; }
+cd /home/mnt || exit $?
+exec ./init2
+echo "Failed to exec ./init2"
diff --git a/qemu_multiarch_testing/hdc.dir/init2 b/qemu_multiarch_testing/hdc.dir/init2
new file mode 100755
index 0000000..f1a9dee
--- /dev/null
+++ b/qemu_multiarch_testing/hdc.dir/init2
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+umount /mnt # optional
+echo "Building"
+(
+ cd strace &&
+ ./configure &&
+ make &&
+ echo "Build: SUCCESS"
+ size strace
+ ./strace
+ # strace may segfault, let's see exit code
+ echo "Exit code: $?"
+ ./strace /bin/true
+ echo "Exit code: $?"
+ ftpput -P "$FTP_PORT" "$FTP_SERVER" strace
+) 2>&1 | tee strace_build.log
+mount -o remount,ro /home
+sync
+sleep 1
diff --git a/qemu_multiarch_testing/make-hdc-img.sh b/qemu_multiarch_testing/make-hdc-img.sh
new file mode 100755
index 0000000..93d2a77
--- /dev/null
+++ b/qemu_multiarch_testing/make-hdc-img.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+export HDCMEGS=128
+
+rm hdc.img 2>/dev/null
+umount -d hdc.img.dir 2>/dev/null
+rm -rf hdc.img.dir 2>/dev/null
+
+dd if=/dev/zero of=hdc.img bs=1024 seek=$((HDCMEGS*1024-1)) count=1 &&
+mke2fs -q -b 1024 -F -i 4096 hdc.img &&
+tune2fs -j -c 0 -i 0 hdc.img &&
+mkdir hdc.img.dir &&
+mount -o loop hdc.img hdc.img.dir &&
+cp -a hdc.dir/* hdc.img.dir &&
+umount -d hdc.img.dir &&
+rm -rf hdc.img.dir &&
+true
diff --git a/qemu_multiarch_testing/parallel-build-hdc-img.sh b/qemu_multiarch_testing/parallel-build-hdc-img.sh
new file mode 100755
index 0000000..cbfe42f
--- /dev/null
+++ b/qemu_multiarch_testing/parallel-build-hdc-img.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+export HDBMEGS=128
+
+build_in_dir()
+{
+ cd "$1" || exit 1
+ rm -f hdb.img 2>/dev/null
+ nice -n10 ./native-build.sh ../hdc.img
+ rm -f hdb.img 2>/dev/null
+}
+
+started=false
+for dir; do
+ test -d "$dir" || continue
+ test -e "$dir/native-build.sh" || continue
+ echo "Starting: $dir"
+ build_in_dir "$dir" </dev/null >"$dir.log" 2>&1 &
+ started=true
+done
+
+$started || {
+ echo "Give me system-image-ARCH directories on command line"
+ exit 1
+}
+
+echo "Waiting to finish"
+wait
+echo "Done, check the logs"
diff --git a/quota.c b/quota.c
index 780abf9..a13610f 100644
--- a/quota.c
+++ b/quota.c
@@ -77,52 +77,52 @@
#define Q_XQUOTASYNC XQM_CMD(0x7)
static const struct xlat quotacmds[] = {
- {Q_V1_QUOTAON, "Q_V1_QUOTAON"},
- {Q_V1_QUOTAOFF, "Q_V1_QUOTAOFF"},
- {Q_V1_GETQUOTA, "Q_V1_GETQUOTA"},
- {Q_V1_SETQUOTA, "Q_V1_SETQUOTA"},
- {Q_V1_SETUSE, "Q_V1_SETUSE"},
- {Q_V1_SYNC, "Q_V1_SYNC"},
- {Q_SETQLIM, "Q_SETQLIM"},
- {Q_V1_GETSTATS, "Q_V1_GETSTATS"},
- {Q_V1_RSQUASH, "Q_V1_RSQUASH"},
+ XLAT(Q_V1_QUOTAON),
+ XLAT(Q_V1_QUOTAOFF),
+ XLAT(Q_V1_GETQUOTA),
+ XLAT(Q_V1_SETQUOTA),
+ XLAT(Q_V1_SETUSE),
+ XLAT(Q_V1_SYNC),
+ XLAT(Q_SETQLIM),
+ XLAT(Q_V1_GETSTATS),
+ XLAT(Q_V1_RSQUASH),
- {Q_V2_GETQUOTA, "Q_V2_GETQUOTA"},
- {Q_V2_SETQUOTA, "Q_V2_SETQUOTA"},
- {Q_V2_SETUSE, "Q_V2_SETUSE"},
- {Q_V2_GETINFO, "Q_V2_GETINFO"},
- {Q_V2_SETINFO, "Q_V2_SETINFO"},
- {Q_V2_SETGRACE, "Q_V2_SETGRACE"},
- {Q_V2_SETFLAGS, "Q_V2_SETFLAGS"},
- {Q_V2_GETSTATS, "Q_V2_GETSTATS"},
+ XLAT(Q_V2_GETQUOTA),
+ XLAT(Q_V2_SETQUOTA),
+ XLAT(Q_V2_SETUSE),
+ XLAT(Q_V2_GETINFO),
+ XLAT(Q_V2_SETINFO),
+ XLAT(Q_V2_SETGRACE),
+ XLAT(Q_V2_SETFLAGS),
+ XLAT(Q_V2_GETSTATS),
- {Q_SYNC, "Q_SYNC"},
- {Q_QUOTAON, "Q_QUOTAON"},
- {Q_QUOTAOFF, "Q_QUOTAOFF"},
- {Q_GETFMT, "Q_GETFMT"},
- {Q_GETINFO, "Q_GETINFO"},
- {Q_SETINFO, "Q_SETINFO"},
- {Q_GETQUOTA, "Q_GETQUOTA"},
- {Q_SETQUOTA, "Q_SETQUOTA"},
+ XLAT(Q_SYNC),
+ XLAT(Q_QUOTAON),
+ XLAT(Q_QUOTAOFF),
+ XLAT(Q_GETFMT),
+ XLAT(Q_GETINFO),
+ XLAT(Q_SETINFO),
+ XLAT(Q_GETQUOTA),
+ XLAT(Q_SETQUOTA),
- {Q_XQUOTAON, "Q_XQUOTAON"},
- {Q_XQUOTAOFF, "Q_XQUOTAOFF"},
- {Q_XGETQUOTA, "Q_XGETQUOTA"},
- {Q_XSETQLIM, "Q_XSETQLIM"},
- {Q_XGETQSTAT, "Q_XGETQSTAT"},
- {Q_XQUOTARM, "Q_XQUOTARM"},
- {Q_XQUOTASYNC, "Q_XQUOTASYNC"},
+ XLAT(Q_XQUOTAON),
+ XLAT(Q_XQUOTAOFF),
+ XLAT(Q_XGETQUOTA),
+ XLAT(Q_XSETQLIM),
+ XLAT(Q_XGETQSTAT),
+ XLAT(Q_XQUOTARM),
+ XLAT(Q_XQUOTASYNC),
- {0, NULL},
+ XLAT_END
};
#define USRQUOTA 0
#define GRPQUOTA 1
static const struct xlat quotatypes[] = {
- {USRQUOTA, "USRQUOTA"},
- {GRPQUOTA, "GRPQUOTA"},
- {0, NULL},
+ XLAT(USRQUOTA),
+ XLAT(GRPQUOTA),
+ XLAT_END
};
/* Quota format identifiers */
@@ -130,9 +130,9 @@
#define QFMT_VFS_V0 2
static const struct xlat quota_formats[] = {
- {QFMT_VFS_OLD, "QFMT_VFS_OLD"},
- {QFMT_VFS_V0, "QFMT_VFS_V0"},
- {0, NULL},
+ XLAT(QFMT_VFS_OLD),
+ XLAT(QFMT_VFS_V0),
+ XLAT_END
};
#define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */
@@ -145,18 +145,18 @@
#define XFS_GROUP_QUOTA (1<<2) /* group quota type */
static const struct xlat xfs_quota_flags[] = {
- {XFS_QUOTA_UDQ_ACCT, "XFS_QUOTA_UDQ_ACCT"},
- {XFS_QUOTA_UDQ_ENFD, "XFS_QUOTA_UDQ_ENFD"},
- {XFS_QUOTA_GDQ_ACCT, "XFS_QUOTA_GDQ_ACCT"},
- {XFS_QUOTA_GDQ_ENFD, "XFS_QUOTA_GDQ_ENFD"},
- {0, NULL}
+ XLAT(XFS_QUOTA_UDQ_ACCT),
+ XLAT(XFS_QUOTA_UDQ_ENFD),
+ XLAT(XFS_QUOTA_GDQ_ACCT),
+ XLAT(XFS_QUOTA_GDQ_ENFD),
+ XLAT_END
};
static const struct xlat xfs_dqblk_flags[] = {
- {XFS_USER_QUOTA, "XFS_USER_QUOTA"},
- {XFS_PROJ_QUOTA, "XFS_PROJ_QUOTA"},
- {XFS_GROUP_QUOTA, "XFS_GROUP_QUOTA"},
- {0, NULL}
+ XLAT(XFS_USER_QUOTA),
+ XLAT(XFS_PROJ_QUOTA),
+ XLAT(XFS_GROUP_QUOTA),
+ XLAT_END
};
/*
@@ -170,13 +170,13 @@
#define QIF_ITIME 32
static const struct xlat if_dqblk_valid[] = {
- {QIF_BLIMITS, "QIF_BLIMITS"},
- {QIF_SPACE, "QIF_SPACE"},
- {QIF_ILIMITS, "QIF_ILIMITS"},
- {QIF_INODES, "QIF_INODES"},
- {QIF_BTIME, "QIF_BTIME"},
- {QIF_ITIME, "QIF_ITIME"},
- {0, NULL}
+ XLAT(QIF_BLIMITS),
+ XLAT(QIF_SPACE),
+ XLAT(QIF_ILIMITS),
+ XLAT(QIF_INODES),
+ XLAT(QIF_BTIME),
+ XLAT(QIF_ITIME),
+ XLAT_END
};
struct if_dqblk
@@ -250,10 +250,10 @@
#define IIF_FLAGS 4
static const struct xlat if_dqinfo_valid[] = {
- {IIF_BGRACE, "IIF_BGRACE"},
- {IIF_IGRACE, "IIF_IGRACE"},
- {IIF_FLAGS, "IIF_FLAGS"},
- {0, NULL}
+ XLAT(IIF_BGRACE),
+ XLAT(IIF_IGRACE),
+ XLAT(IIF_FLAGS),
+ XLAT_END
};
struct if_dqinfo
diff --git a/reboot.c b/reboot.c
new file mode 100644
index 0000000..f8c3de7
--- /dev/null
+++ b/reboot.c
@@ -0,0 +1,45 @@
+#include "defs.h"
+#include <linux/reboot.h>
+
+static const struct xlat bootflags1[] = {
+ XLAT(LINUX_REBOOT_MAGIC1),
+ XLAT_END
+};
+
+static const struct xlat bootflags2[] = {
+ XLAT(LINUX_REBOOT_MAGIC2),
+ XLAT(LINUX_REBOOT_MAGIC2A),
+ XLAT(LINUX_REBOOT_MAGIC2B),
+ XLAT(LINUX_REBOOT_MAGIC2C),
+ XLAT_END
+};
+
+static const struct xlat bootflags3[] = {
+ XLAT(LINUX_REBOOT_CMD_RESTART),
+ XLAT(LINUX_REBOOT_CMD_HALT),
+ XLAT(LINUX_REBOOT_CMD_CAD_ON),
+ XLAT(LINUX_REBOOT_CMD_CAD_OFF),
+ XLAT(LINUX_REBOOT_CMD_POWER_OFF),
+ XLAT(LINUX_REBOOT_CMD_RESTART2),
+ XLAT(LINUX_REBOOT_CMD_SW_SUSPEND),
+ XLAT(LINUX_REBOOT_CMD_KEXEC),
+ XLAT_END
+};
+
+int
+sys_reboot(struct tcb *tcp)
+{
+ if (exiting(tcp))
+ return 0;
+
+ printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
+ tprints(", ");
+ printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
+ tprints(", ");
+ printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
+ if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
+ tprints(", ");
+ printstr(tcp, tcp->u_arg[3], -1);
+ }
+ return 0;
+}
diff --git a/resource.c b/resource.c
index 657e63d..5f92b39 100644
--- a/resource.c
+++ b/resource.c
@@ -35,57 +35,57 @@
static const struct xlat resources[] = {
#ifdef RLIMIT_AS
- { RLIMIT_AS, "RLIMIT_AS" },
+ XLAT(RLIMIT_AS),
#endif
#ifdef RLIMIT_CORE
- { RLIMIT_CORE, "RLIMIT_CORE" },
+ XLAT(RLIMIT_CORE),
#endif
#ifdef RLIMIT_CPU
- { RLIMIT_CPU, "RLIMIT_CPU" },
+ XLAT(RLIMIT_CPU),
#endif
#ifdef RLIMIT_DATA
- { RLIMIT_DATA, "RLIMIT_DATA" },
+ XLAT(RLIMIT_DATA),
#endif
#ifdef RLIMIT_FSIZE
- { RLIMIT_FSIZE, "RLIMIT_FSIZE" },
+ XLAT(RLIMIT_FSIZE),
#endif
#ifdef RLIMIT_LOCKS
- { RLIMIT_LOCKS, "RLIMIT_LOCKS" },
+ XLAT(RLIMIT_LOCKS),
#endif
#ifdef RLIMIT_MEMLOCK
- { RLIMIT_MEMLOCK, "RLIMIT_MEMLOCK" },
+ XLAT(RLIMIT_MEMLOCK),
#endif
#ifdef RLIMIT_MSGQUEUE
- { RLIMIT_MSGQUEUE, "RLIMIT_MSGQUEUE" },
+ XLAT(RLIMIT_MSGQUEUE),
#endif
#ifdef RLIMIT_NICE
- { RLIMIT_NICE, "RLIMIT_NICE" },
+ XLAT(RLIMIT_NICE),
#endif
#ifdef RLIMIT_NOFILE
- { RLIMIT_NOFILE, "RLIMIT_NOFILE" },
+ XLAT(RLIMIT_NOFILE),
#endif
#ifdef RLIMIT_NPROC
- { RLIMIT_NPROC, "RLIMIT_NPROC" },
+ XLAT(RLIMIT_NPROC),
#endif
#ifdef RLIMIT_RSS
- { RLIMIT_RSS, "RLIMIT_RSS" },
+ XLAT(RLIMIT_RSS),
#endif
#ifdef RLIMIT_RTPRIO
- { RLIMIT_RTPRIO, "RLIMIT_RTPRIO" },
+ XLAT(RLIMIT_RTPRIO),
#endif
#ifdef RLIMIT_RTTIME
- { RLIMIT_RTTIME, "RLIMIT_RTTIME" },
+ XLAT(RLIMIT_RTTIME),
#endif
#ifdef RLIMIT_SIGPENDING
- { RLIMIT_SIGPENDING, "RLIMIT_SIGPENDING" },
+ XLAT(RLIMIT_SIGPENDING),
#endif
#ifdef RLIMIT_STACK
- { RLIMIT_STACK, "RLIMIT_STACK" },
+ XLAT(RLIMIT_STACK),
#endif
#ifdef RLIMIT_VMEM
- { RLIMIT_VMEM, "RLIMIT_VMEM" },
+ XLAT(RLIMIT_VMEM),
#endif
- { 0, NULL }
+ XLAT_END
};
#if !(SIZEOF_RLIM_T == 4 || SIZEOF_RLIM_T == 8)
@@ -233,12 +233,12 @@
}
static const struct xlat usagewho[] = {
- { RUSAGE_SELF, "RUSAGE_SELF" },
- { RUSAGE_CHILDREN, "RUSAGE_CHILDREN" },
+ XLAT(RUSAGE_SELF),
+ XLAT(RUSAGE_CHILDREN),
#ifdef RUSAGE_BOTH
- { RUSAGE_BOTH, "RUSAGE_BOTH" },
+ XLAT(RUSAGE_BOTH),
#endif
- { 0, NULL },
+ XLAT_END
};
#ifdef ALPHA
@@ -387,10 +387,10 @@
}
static const struct xlat priorities[] = {
- { PRIO_PROCESS, "PRIO_PROCESS" },
- { PRIO_PGRP, "PRIO_PGRP" },
- { PRIO_USER, "PRIO_USER" },
- { 0, NULL },
+ XLAT(PRIO_PROCESS),
+ XLAT(PRIO_PGRP),
+ XLAT(PRIO_USER),
+ XLAT_END
};
int
diff --git a/scsi.c b/scsi.c
index 682016e..c49f954 100644
--- a/scsi.c
+++ b/scsi.c
@@ -27,15 +27,18 @@
*/
#include "defs.h"
-#include <sys/ioctl.h>
-#include <scsi/sg.h>
+
+#ifdef HAVE_SCSI_SG_H
+
+# include <sys/ioctl.h>
+# include <scsi/sg.h>
static const struct xlat sg_io_dxfer_direction[] = {
- {SG_DXFER_NONE, "SG_DXFER_NONE"},
- {SG_DXFER_TO_DEV, "SG_DXFER_TO_DEV"},
- {SG_DXFER_FROM_DEV, "SG_DXFER_FROM_DEV"},
- {SG_DXFER_TO_FROM_DEV, "SG_DXFER_TO_FROM_DEV"},
- {0, NULL}
+ XLAT(SG_DXFER_NONE),
+ XLAT(SG_DXFER_TO_DEV),
+ XLAT(SG_DXFER_FROM_DEV),
+ XLAT(SG_DXFER_TO_FROM_DEV),
+ XLAT_END
};
static void
@@ -137,3 +140,5 @@
}
return 1;
}
+
+#endif /* HAVE_SCSI_SG_H */
diff --git a/signal.c b/signal.c
index 55815aa..ffba207 100644
--- a/signal.c
+++ b/signal.c
@@ -37,12 +37,6 @@
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
-# ifndef PTRACE_PEEKUSR
-# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-# endif
-# ifndef PTRACE_POKEUSR
-# define PTRACE_POKEUSR PTRACE_POKEUSER
-# endif
#elif defined(HAVE_LINUX_PTRACE_H)
# undef PTRACE_SYSCALL
# ifdef HAVE_STRUCT_IA64_FPREG
@@ -51,7 +45,11 @@
# ifdef HAVE_STRUCT_PT_ALL_USER_REGS
# define pt_all_user_regs XXX_pt_all_user_regs
# endif
+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
+# endif
# include <linux/ptrace.h>
+# undef ptrace_peeksiginfo_args
# undef ia64_fpreg
# undef pt_all_user_regs
#endif
@@ -70,35 +68,8 @@
# include <asm/sigcontext.h>
# endif
#else /* !HAVE_ASM_SIGCONTEXT_H */
-# if defined I386 && !defined HAVE_STRUCT_SIGCONTEXT_STRUCT
-struct sigcontext_struct {
- unsigned short gs, __gsh;
- unsigned short fs, __fsh;
- unsigned short es, __esh;
- unsigned short ds, __dsh;
- unsigned long edi;
- unsigned long esi;
- unsigned long ebp;
- unsigned long esp;
- unsigned long ebx;
- unsigned long edx;
- unsigned long ecx;
- unsigned long eax;
- unsigned long trapno;
- unsigned long err;
- unsigned long eip;
- unsigned short cs, __csh;
- unsigned long eflags;
- unsigned long esp_at_signal;
- unsigned short ss, __ssh;
- unsigned long i387;
- unsigned long oldmask;
- unsigned long cr2;
-};
-# else /* !I386 */
-# if defined M68K && !defined HAVE_STRUCT_SIGCONTEXT
-struct sigcontext
-{
+# if defined M68K && !defined HAVE_STRUCT_SIGCONTEXT
+struct sigcontext {
unsigned long sc_mask;
unsigned long sc_usp;
unsigned long sc_d0;
@@ -109,90 +80,84 @@
unsigned long sc_pc;
unsigned short sc_formatvec;
};
-# endif /* M68K */
-# endif /* !I386 */
+# endif /* M68K */
#endif /* !HAVE_ASM_SIGCONTEXT_H */
#ifndef NSIG
# warning: NSIG is not defined, using 32
# define NSIG 32
#endif
-#ifdef ARM
-/* Ugh. Is this really correct? ARM has no RT signals?! */
-# undef NSIG
-# define NSIG 32
-#endif
#ifdef HAVE_SIGACTION
-#if defined I386 || defined X86_64 || defined X32
/* The libc headers do not define this constant since it should only be
used by the implementation. So we define it here. */
-# ifndef SA_RESTORER
-# define SA_RESTORER 0x04000000
+#ifndef SA_RESTORER
+# ifdef ASM_SA_RESTORER
+# define SA_RESTORER ASM_SA_RESTORER
# endif
#endif
static const struct xlat sigact_flags[] = {
#ifdef SA_RESTORER
- { SA_RESTORER, "SA_RESTORER" },
+ XLAT(SA_RESTORER),
#endif
#ifdef SA_STACK
- { SA_STACK, "SA_STACK" },
+ XLAT(SA_STACK),
#endif
#ifdef SA_RESTART
- { SA_RESTART, "SA_RESTART" },
+ XLAT(SA_RESTART),
#endif
#ifdef SA_INTERRUPT
- { SA_INTERRUPT, "SA_INTERRUPT" },
+ XLAT(SA_INTERRUPT),
#endif
#ifdef SA_NODEFER
- { SA_NODEFER, "SA_NODEFER" },
+ XLAT(SA_NODEFER),
#endif
#if defined SA_NOMASK && SA_NODEFER != SA_NOMASK
- { SA_NOMASK, "SA_NOMASK" },
+ XLAT(SA_NOMASK),
#endif
#ifdef SA_RESETHAND
- { SA_RESETHAND, "SA_RESETHAND" },
+ XLAT(SA_RESETHAND),
#endif
#if defined SA_ONESHOT && SA_ONESHOT != SA_RESETHAND
- { SA_ONESHOT, "SA_ONESHOT" },
+ XLAT(SA_ONESHOT),
#endif
#ifdef SA_SIGINFO
- { SA_SIGINFO, "SA_SIGINFO" },
+ XLAT(SA_SIGINFO),
#endif
#ifdef SA_RESETHAND
- { SA_RESETHAND, "SA_RESETHAND" },
+ XLAT(SA_RESETHAND),
#endif
#ifdef SA_ONSTACK
- { SA_ONSTACK, "SA_ONSTACK" },
+ XLAT(SA_ONSTACK),
#endif
#ifdef SA_NODEFER
- { SA_NODEFER, "SA_NODEFER" },
+ XLAT(SA_NODEFER),
#endif
#ifdef SA_NOCLDSTOP
- { SA_NOCLDSTOP, "SA_NOCLDSTOP" },
+ XLAT(SA_NOCLDSTOP),
#endif
#ifdef SA_NOCLDWAIT
- { SA_NOCLDWAIT, "SA_NOCLDWAIT" },
+ XLAT(SA_NOCLDWAIT),
#endif
#ifdef _SA_BSDCALL
- { _SA_BSDCALL, "_SA_BSDCALL" },
+ XLAT(_SA_BSDCALL),
#endif
#ifdef SA_NOPTRACE
- { SA_NOPTRACE, "SA_NOPTRACE" },
+ XLAT(SA_NOPTRACE),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat sigprocmaskcmds[] = {
- { SIG_BLOCK, "SIG_BLOCK" },
- { SIG_UNBLOCK, "SIG_UNBLOCK" },
- { SIG_SETMASK, "SIG_SETMASK" },
+ XLAT(SIG_BLOCK),
+ XLAT(SIG_UNBLOCK),
+ XLAT(SIG_SETMASK),
#ifdef SIG_SETMASK32
- { SIG_SETMASK32,"SIG_SETMASK32" },
+ XLAT(SIG_SETMASK32),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif /* HAVE_SIGACTION */
@@ -246,29 +211,8 @@
return buf;
}
-static void
-long_to_sigset(long l, sigset_t *s)
-{
- sigemptyset(s);
- *(long *)s = l;
-}
-
-static int
-copy_sigset_len(struct tcb *tcp, long addr, sigset_t *s, int len)
-{
- if (len > sizeof(*s))
- len = sizeof(*s);
- sigemptyset(s);
- if (umoven(tcp, addr, len, (char *)s) < 0)
- return -1;
- return 0;
-}
-
-/* Original sigset is unsigned long */
-#define copy_sigset(tcp, addr, s) copy_sigset_len(tcp, addr, s, sizeof(long))
-
static const char *
-sprintsigmask(const char *str, sigset_t *mask, int rt)
+sprintsigmask(const char *str, sigset_t *mask)
/* set might include realtime sigs */
{
/* Was [8 * sizeof(sigset_t) * 8], but
@@ -288,10 +232,13 @@
char sep;
char *s;
- maxsigs = nsignals;
+ /* Note: nsignals = ARRAY_SIZE(signalent[]),
+ * and that array may not have SIGRTnn.
+ */
#ifdef __SIGRTMAX
- if (rt)
- maxsigs = __SIGRTMAX; /* instead */
+ maxsigs = __SIGRTMAX + 1; /* instead */
+#else
+ maxsigs = nsignals;
#endif
s = stpcpy(outstr, str);
nsigs = 0;
@@ -308,23 +255,17 @@
sep = '[';
for (i = 1; i < maxsigs; i++) {
if (sigismember(mask, i) == show_members) {
- /* real-time signals on solaris don't have
- * signalent entries
- */
- char tsig[40];
*s++ = sep;
if (i < nsignals) {
s = stpcpy(s, signalent[i] + 3);
}
#ifdef SIGRTMIN
else if (i >= __SIGRTMIN && i <= __SIGRTMAX) {
- sprintf(tsig, "RT_%u", i - __SIGRTMIN);
- s = stpcpy(s, tsig);
+ s += sprintf(s, "RT_%u", i - __SIGRTMIN);
}
-#endif /* SIGRTMIN */
+#endif
else {
- sprintf(tsig, "%u", i);
- s = stpcpy(s, tsig);
+ s += sprintf(s, "%u", i);
}
sep = ' ';
}
@@ -336,10 +277,19 @@
return outstr;
}
-static void
-printsigmask(sigset_t *mask, int rt)
+static const char *
+sprintsigmask_long(const char *str, long mask)
{
- tprints(sprintsigmask("", mask, rt));
+ sigset_t s;
+ sigemptyset(&s);
+ *(long *)&s = mask;
+ return sprintsigmask(str, &s);
+}
+
+static void
+printsigmask(sigset_t *mask)
+{
+ tprints(sprintsigmask("", mask));
}
void
@@ -349,16 +299,28 @@
}
void
-print_sigset(struct tcb *tcp, long addr, int rt)
+print_sigset_addr_len(struct tcb *tcp, long addr, long len)
{
sigset_t ss;
- if (!addr)
+ if (!addr) {
tprints("NULL");
- else if (copy_sigset(tcp, addr, &ss) < 0)
+ return;
+ }
+ /* Here len is usually equals NSIG / 8 or current_wordsize.
+ * But we code this defensively:
+ */
+ if (len < 0) {
+ bad:
tprintf("%#lx", addr);
- else
- printsigmask(&ss, rt);
+ return;
+ }
+ if (len > NSIG / 8)
+ len = NSIG / 8;
+ sigemptyset(&ss);
+ if (umoven(tcp, addr, len, (char *)&ss) < 0)
+ goto bad;
+ printsigmask(&ss);
}
#ifndef ILL_ILLOPC
@@ -414,118 +376,118 @@
static const struct xlat siginfo_codes[] = {
#ifdef SI_KERNEL
- { SI_KERNEL, "SI_KERNEL" },
+ XLAT(SI_KERNEL),
#endif
#ifdef SI_USER
- { SI_USER, "SI_USER" },
+ XLAT(SI_USER),
#endif
#ifdef SI_QUEUE
- { SI_QUEUE, "SI_QUEUE" },
+ XLAT(SI_QUEUE),
#endif
#ifdef SI_TIMER
- { SI_TIMER, "SI_TIMER" },
+ XLAT(SI_TIMER),
#endif
#ifdef SI_MESGQ
- { SI_MESGQ, "SI_MESGQ" },
+ XLAT(SI_MESGQ),
#endif
#ifdef SI_ASYNCIO
- { SI_ASYNCIO, "SI_ASYNCIO" },
+ XLAT(SI_ASYNCIO),
#endif
#ifdef SI_SIGIO
- { SI_SIGIO, "SI_SIGIO" },
+ XLAT(SI_SIGIO),
#endif
#ifdef SI_TKILL
- { SI_TKILL, "SI_TKILL" },
+ XLAT(SI_TKILL),
#endif
#ifdef SI_ASYNCNL
- { SI_ASYNCNL, "SI_ASYNCNL" },
+ XLAT(SI_ASYNCNL),
#endif
#ifdef SI_NOINFO
- { SI_NOINFO, "SI_NOINFO" },
+ XLAT(SI_NOINFO),
#endif
#ifdef SI_LWP
- { SI_LWP, "SI_LWP" },
+ XLAT(SI_LWP),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat sigill_codes[] = {
- { ILL_ILLOPC, "ILL_ILLOPC" },
- { ILL_ILLOPN, "ILL_ILLOPN" },
- { ILL_ILLADR, "ILL_ILLADR" },
- { ILL_ILLTRP, "ILL_ILLTRP" },
- { ILL_PRVOPC, "ILL_PRVOPC" },
- { ILL_PRVREG, "ILL_PRVREG" },
- { ILL_COPROC, "ILL_COPROC" },
- { ILL_BADSTK, "ILL_BADSTK" },
- { 0, NULL },
+ XLAT(ILL_ILLOPC),
+ XLAT(ILL_ILLOPN),
+ XLAT(ILL_ILLADR),
+ XLAT(ILL_ILLTRP),
+ XLAT(ILL_PRVOPC),
+ XLAT(ILL_PRVREG),
+ XLAT(ILL_COPROC),
+ XLAT(ILL_BADSTK),
+ XLAT_END
};
static const struct xlat sigfpe_codes[] = {
- { FPE_INTDIV, "FPE_INTDIV" },
- { FPE_INTOVF, "FPE_INTOVF" },
- { FPE_FLTDIV, "FPE_FLTDIV" },
- { FPE_FLTOVF, "FPE_FLTOVF" },
- { FPE_FLTUND, "FPE_FLTUND" },
- { FPE_FLTRES, "FPE_FLTRES" },
- { FPE_FLTINV, "FPE_FLTINV" },
- { FPE_FLTSUB, "FPE_FLTSUB" },
- { 0, NULL },
+ XLAT(FPE_INTDIV),
+ XLAT(FPE_INTOVF),
+ XLAT(FPE_FLTDIV),
+ XLAT(FPE_FLTOVF),
+ XLAT(FPE_FLTUND),
+ XLAT(FPE_FLTRES),
+ XLAT(FPE_FLTINV),
+ XLAT(FPE_FLTSUB),
+ XLAT_END
};
static const struct xlat sigtrap_codes[] = {
- { TRAP_BRKPT, "TRAP_BRKPT" },
- { TRAP_TRACE, "TRAP_TRACE" },
- { 0, NULL },
+ XLAT(TRAP_BRKPT),
+ XLAT(TRAP_TRACE),
+ XLAT_END
};
static const struct xlat sigchld_codes[] = {
- { CLD_EXITED, "CLD_EXITED" },
- { CLD_KILLED, "CLD_KILLED" },
- { CLD_DUMPED, "CLD_DUMPED" },
- { CLD_TRAPPED, "CLD_TRAPPED" },
- { CLD_STOPPED, "CLD_STOPPED" },
- { CLD_CONTINUED,"CLD_CONTINUED" },
- { 0, NULL },
+ XLAT(CLD_EXITED),
+ XLAT(CLD_KILLED),
+ XLAT(CLD_DUMPED),
+ XLAT(CLD_TRAPPED),
+ XLAT(CLD_STOPPED),
+ XLAT(CLD_CONTINUED),
+ XLAT_END
};
static const struct xlat sigpoll_codes[] = {
- { POLL_IN, "POLL_IN" },
- { POLL_OUT, "POLL_OUT" },
- { POLL_MSG, "POLL_MSG" },
- { POLL_ERR, "POLL_ERR" },
- { POLL_PRI, "POLL_PRI" },
- { POLL_HUP, "POLL_HUP" },
- { 0, NULL },
+ XLAT(POLL_IN),
+ XLAT(POLL_OUT),
+ XLAT(POLL_MSG),
+ XLAT(POLL_ERR),
+ XLAT(POLL_PRI),
+ XLAT(POLL_HUP),
+ XLAT_END
};
static const struct xlat sigprof_codes[] = {
#ifdef PROF_SIG
- { PROF_SIG, "PROF_SIG" },
+ XLAT(PROF_SIG),
#endif
- { 0, NULL },
+ XLAT_END
};
#ifdef SIGEMT
static const struct xlat sigemt_codes[] = {
#ifdef EMT_TAGOVF
- { EMT_TAGOVF, "EMT_TAGOVF" },
+ XLAT(EMT_TAGOVF),
#endif
- { 0, NULL },
+ XLAT_END
};
#endif
static const struct xlat sigsegv_codes[] = {
- { SEGV_MAPERR, "SEGV_MAPERR" },
- { SEGV_ACCERR, "SEGV_ACCERR" },
- { 0, NULL },
+ XLAT(SEGV_MAPERR),
+ XLAT(SEGV_ACCERR),
+ XLAT_END
};
static const struct xlat sigbus_codes[] = {
- { BUS_ADRALN, "BUS_ADRALN" },
- { BUS_ADRERR, "BUS_ADRERR" },
- { BUS_OBJERR, "BUS_OBJERR" },
- { 0, NULL },
+ XLAT(BUS_ADRALN),
+ XLAT(BUS_ADRERR),
+ XLAT(BUS_OBJERR),
+ XLAT_END
};
void
@@ -694,15 +656,10 @@
sys_sigsetmask(struct tcb *tcp)
{
if (entering(tcp)) {
- sigset_t sigm;
- long_to_sigset(tcp->u_arg[0], &sigm);
- printsigmask(&sigm, 0);
+ tprints(sprintsigmask_long("", tcp->u_arg[0]));
}
else if (!syserror(tcp)) {
- sigset_t sigm;
- long_to_sigset(tcp->u_rval, &sigm);
- tcp->auxstr = sprintsigmask("old mask ", &sigm, 0);
-
+ tcp->auxstr = sprintsigmask_long("old mask ", tcp->u_rval);
return RVAL_HEX | RVAL_STR;
}
return 0;
@@ -712,62 +669,77 @@
struct old_sigaction {
/* sa_handler may be a libc #define, need to use other name: */
+#ifdef MIPS
+ unsigned int sa_flags;
+ void (*__sa_handler)(int);
+ /* Kernel treats sa_mask as an array of longs. */
+ unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1];
+#else
void (*__sa_handler)(int);
unsigned long sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
+#endif /* !MIPS */
};
+static void
+decode_old_sigaction(struct tcb *tcp, long addr)
+{
+ struct old_sigaction sa;
+
+ if (!addr) {
+ tprints("NULL");
+ return;
+ }
+ if (!verbose(tcp) || (exiting(tcp) && syserror(tcp))) {
+ tprintf("%#lx", addr);
+ return;
+ }
+ if (umove(tcp, addr, &sa) < 0) {
+ tprints("{...}");
+ return;
+ }
+
+ /* Architectures using function pointers, like
+ * hppa, may need to manipulate the function pointer
+ * to compute the result of a comparison. However,
+ * the __sa_handler function pointer exists only in
+ * the address space of the traced process, and can't
+ * be manipulated by strace. In order to prevent the
+ * compiler from generating code to manipulate
+ * __sa_handler we cast the function pointers to long. */
+ if ((long)sa.__sa_handler == (long)SIG_ERR)
+ tprints("{SIG_ERR, ");
+ else if ((long)sa.__sa_handler == (long)SIG_DFL)
+ tprints("{SIG_DFL, ");
+ else if ((long)sa.__sa_handler == (long)SIG_IGN)
+ tprints("{SIG_IGN, ");
+ else
+ tprintf("{%#lx, ", (long) sa.__sa_handler);
+#ifdef MIPS
+ tprints(sprintsigmask("", (sigset_t *)sa.sa_mask));
+#else
+ tprints(sprintsigmask_long("", sa.sa_mask));
+#endif
+ tprints(", ");
+ printflags(sigact_flags, sa.sa_flags, "SA_???");
+#ifdef SA_RESTORER
+ if (sa.sa_flags & SA_RESTORER)
+ tprintf(", %p", sa.sa_restorer);
+#endif
+ tprints("}");
+}
+
int
sys_sigaction(struct tcb *tcp)
{
- long addr;
- sigset_t sigset;
- struct old_sigaction sa;
-
if (entering(tcp)) {
printsignal(tcp->u_arg[0]);
tprints(", ");
- addr = tcp->u_arg[1];
+ decode_old_sigaction(tcp, tcp->u_arg[1]);
+ tprints(", ");
} else
- addr = tcp->u_arg[2];
- if (addr == 0)
- tprints("NULL");
- else if (!verbose(tcp))
- tprintf("%#lx", addr);
- else if (umove(tcp, addr, &sa) < 0)
- tprints("{...}");
- else {
- /* Architectures using function pointers, like
- * hppa, may need to manipulate the function pointer
- * to compute the result of a comparison. However,
- * the __sa_handler function pointer exists only in
- * the address space of the traced process, and can't
- * be manipulated by strace. In order to prevent the
- * compiler from generating code to manipulate
- * __sa_handler we cast the function pointers to long. */
- if ((long)sa.__sa_handler == (long)SIG_ERR)
- tprints("{SIG_ERR, ");
- else if ((long)sa.__sa_handler == (long)SIG_DFL)
- tprints("{SIG_DFL, ");
- else if ((long)sa.__sa_handler == (long)SIG_IGN)
- tprints("{SIG_IGN, ");
- else
- tprintf("{%#lx, ", (long) sa.__sa_handler);
- long_to_sigset(sa.sa_mask, &sigset);
- printsigmask(&sigset, 0);
- tprints(", ");
- printflags(sigact_flags, sa.sa_flags, "SA_???");
-#ifdef SA_RESTORER
- if (sa.sa_flags & SA_RESTORER)
- tprintf(", %p", sa.sa_restorer);
-#endif
- tprints("}");
- }
- if (entering(tcp))
- tprints(", ");
- else
- tprintf(", %#lx", (unsigned long) sa.sa_restorer);
+ decode_old_sigaction(tcp, tcp->u_arg[2]);
return 0;
}
@@ -815,36 +787,131 @@
{
#if defined(ARM)
if (entering(tcp)) {
- struct sigcontext_struct sc;
+ struct arm_sigcontext {
+ unsigned long trap_no;
+ unsigned long error_code;
+ unsigned long oldmask;
+ unsigned long arm_r0;
+ unsigned long arm_r1;
+ unsigned long arm_r2;
+ unsigned long arm_r3;
+ unsigned long arm_r4;
+ unsigned long arm_r5;
+ unsigned long arm_r6;
+ unsigned long arm_r7;
+ unsigned long arm_r8;
+ unsigned long arm_r9;
+ unsigned long arm_r10;
+ unsigned long arm_fp;
+ unsigned long arm_ip;
+ unsigned long arm_sp;
+ unsigned long arm_lr;
+ unsigned long arm_pc;
+ unsigned long arm_cpsr;
+ unsigned long fault_address;
+ };
+ struct arm_ucontext {
+ unsigned long uc_flags;
+ unsigned long uc_link; /* struct ucontext* */
+ /* The next three members comprise stack_t struct: */
+ unsigned long ss_sp; /* void* */
+ unsigned long ss_flags; /* int */
+ unsigned long ss_size; /* size_t */
+ struct arm_sigcontext sc;
+ /* These two members are sigset_t: */
+ unsigned long uc_sigmask[2];
+ /* more fields follow, which we aren't interested in */
+ };
+ struct arm_ucontext uc;
sigset_t sigm;
- if (umove(tcp, arm_regs.ARM_sp, &sc) < 0)
+ if (umove(tcp, arm_regs.ARM_sp, &uc) < 0)
return 0;
- long_to_sigset(sc.oldmask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ /* Kernel fills out uc.sc.oldmask too when it sets up signal stack,
+ * but for sigmask restore, sigreturn syscall uses uc.uc_sigmask instead.
+ * tprints(sprintsigmask_long(") (mask ", uc.sc.oldmask));
+ */
+ sigemptyset(&sigm);
+ memcpy(&sigm, uc.uc_sigmask, sizeof(sigset_t)/*enh:8*/);
+ tprints(sprintsigmask(") (mask ", &sigm));
}
#elif defined(S390) || defined(S390X)
if (entering(tcp)) {
long usp;
- struct sigcontext_struct sc;
- if (upeek(tcp, PT_GPR15, &usp) < 0)
+ struct sigcontext sc;
+ if (upeek(tcp->pid, PT_GPR15, &usp) < 0)
return 0;
if (umove(tcp, usp + __SIGNAL_FRAMESIZE, &sc) < 0)
return 0;
- tprints(sprintsigmask(") (mask ", (sigset_t *)&sc.oldmask[0], 0));
+ tprints(sprintsigmask(") (mask ", (sigset_t *)&sc.oldmask[0]));
}
-#elif defined(I386)
+#elif defined(I386) || defined(X86_64)
+# if defined(X86_64)
+ if (current_personality == 0) /* 64-bit */
+ return 0;
+# endif
if (entering(tcp)) {
- struct sigcontext_struct sc;
- /* Note: on i386, sc is followed on stack by struct fpstate
+ struct i386_sigcontext_struct {
+ uint16_t gs, __gsh;
+ uint16_t fs, __fsh;
+ uint16_t es, __esh;
+ uint16_t ds, __dsh;
+ uint32_t edi;
+ uint32_t esi;
+ uint32_t ebp;
+ uint32_t esp;
+ uint32_t ebx;
+ uint32_t edx;
+ uint32_t ecx;
+ uint32_t eax;
+ uint32_t trapno;
+ uint32_t err;
+ uint32_t eip;
+ uint16_t cs, __csh;
+ uint32_t eflags;
+ uint32_t esp_at_signal;
+ uint16_t ss, __ssh;
+ uint32_t i387;
+ uint32_t oldmask;
+ uint32_t cr2;
+ };
+ struct i386_fpstate {
+ uint32_t cw;
+ uint32_t sw;
+ uint32_t tag;
+ uint32_t ipoff;
+ uint32_t cssel;
+ uint32_t dataoff;
+ uint32_t datasel;
+ uint8_t st[8][10]; /* 8*10 bytes: FP regs */
+ uint16_t status;
+ uint16_t magic;
+ uint32_t fxsr_env[6];
+ uint32_t mxcsr;
+ uint32_t reserved;
+ uint8_t stx[8][16]; /* 8*16 bytes: FP regs, each padded to 16 bytes */
+ uint8_t xmm[8][16]; /* 8 XMM regs */
+ uint32_t padding1[44];
+ uint32_t padding2[12]; /* union with struct _fpx_sw_bytes */
+ };
+ struct {
+ struct i386_sigcontext_struct sc;
+ struct i386_fpstate fp;
+ uint32_t extramask[1];
+ } signal_stack;
+ /* On i386, sc is followed on stack by struct fpstate
* and after it an additional u32 extramask[1] which holds
- * upper half of the mask. We can fetch it there
- * if/when we'd want to display the full mask...
+ * upper half of the mask.
*/
- sigset_t sigm;
- if (umove(tcp, i386_regs.esp, &sc) < 0)
+ union {
+ sigset_t sig;
+ uint32_t mask[2];
+ } sigmask;
+ if (umove(tcp, *i386_esp_ptr, &signal_stack) < 0)
return 0;
- long_to_sigset(sc.oldmask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ sigemptyset(&sigmask.sig);
+ sigmask.mask[0] = signal_stack.sc.oldmask;
+ sigmask.mask[1] = signal_stack.extramask[0];
+ tprints(sprintsigmask(") (mask ", &sigmask.sig));
}
#elif defined(IA64)
if (entering(tcp)) {
@@ -853,21 +920,21 @@
sigset_t sigm;
/* offset of sigcontext in the kernel's sigframe structure: */
# define SIGFRAME_SC_OFFSET 0x90
- if (upeek(tcp, PT_R12, &sp) < 0)
+ if (upeek(tcp->pid, PT_R12, &sp) < 0)
return 0;
if (umove(tcp, sp + 16 + SIGFRAME_SC_OFFSET, &sc) < 0)
return 0;
sigemptyset(&sigm);
memcpy(&sigm, &sc.sc_mask, NSIG / 8);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask(") (mask ", &sigm));
}
#elif defined(POWERPC)
if (entering(tcp)) {
long esp;
- struct sigcontext_struct sc;
- sigset_t sigm;
- if (upeek(tcp, sizeof(unsigned long) * PT_R1, &esp) < 0)
- return 0;
+ struct sigcontext sc;
+
+ esp = ppc_regs.gpr[1];
+
/* Skip dummy stack frame. */
#ifdef POWERPC64
if (current_personality == 0)
@@ -879,45 +946,38 @@
#endif
if (umove(tcp, esp, &sc) < 0)
return 0;
- long_to_sigset(sc.oldmask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", sc.oldmask));
}
#elif defined(M68K)
if (entering(tcp)) {
long usp;
struct sigcontext sc;
- sigset_t sigm;
- if (upeek(tcp, 4*PT_USP, &usp) < 0)
+ if (upeek(tcp->pid, 4*PT_USP, &usp) < 0)
return 0;
if (umove(tcp, usp, &sc) < 0)
return 0;
- long_to_sigset(sc.sc_mask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", sc.sc_mask));
}
#elif defined(ALPHA)
if (entering(tcp)) {
long fp;
- struct sigcontext_struct sc;
- sigset_t sigm;
- if (upeek(tcp, REG_FP, &fp) < 0)
+ struct sigcontext sc;
+ if (upeek(tcp->pid, REG_FP, &fp) < 0)
return 0;
if (umove(tcp, fp, &sc) < 0)
return 0;
- long_to_sigset(sc.sc_mask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", sc.sc_mask));
}
#elif defined(SPARC) || defined(SPARC64)
if (entering(tcp)) {
long i1;
m_siginfo_t si;
- sigset_t sigm;
i1 = sparc_regs.u_regs[U_REG_O1];
if (umove(tcp, i1, &si) < 0) {
perror_msg("sigreturn: umove");
return 0;
}
- long_to_sigset(si.si_mask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", si.si_mask));
}
#elif defined(LINUX_MIPSN32) || defined(LINUX_MIPSN64)
/* This decodes rt_sigreturn. The 64-bit ABIs do not have
@@ -926,21 +986,19 @@
long sp;
struct ucontext uc;
sigset_t sigm;
- if (upeek(tcp, REG_SP, &sp) < 0)
+ if (upeek(tcp->pid, REG_SP, &sp) < 0)
return 0;
/* There are six words followed by a 128-byte siginfo. */
sp = sp + 6 * 4 + 128;
if (umove(tcp, sp, &uc) < 0)
return 0;
- long_to_sigset(*(long *) &uc.uc_sigmask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", *(long *) &uc.uc_sigmask));
}
#elif defined(MIPS)
if (entering(tcp)) {
long sp;
struct pt_regs regs;
m_siginfo_t si;
- sigset_t sigm;
if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)®s, 0) < 0) {
perror_msg("sigreturn: PTRACE_GETREGS");
return 0;
@@ -948,22 +1006,19 @@
sp = regs.regs[29];
if (umove(tcp, sp, &si) < 0)
return 0;
- long_to_sigset(si.si_mask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", si.si_mask));
}
#elif defined(CRISV10) || defined(CRISV32)
if (entering(tcp)) {
struct sigcontext sc;
long regs[PT_MAX+1];
- sigset_t sigm;
if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) {
perror_msg("sigreturn: PTRACE_GETREGS");
return 0;
}
if (umove(tcp, regs[PT_USP], &sc) < 0)
return 0;
- long_to_sigset(sc.oldmask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", sc.oldmask));
}
#elif defined(TILE)
if (entering(tcp)) {
@@ -976,26 +1031,24 @@
return 0;
sigemptyset(&sigm);
memcpy(&sigm, &uc.uc_sigmask, NSIG / 8);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask(") (mask ", &sigm));
}
#elif defined(MICROBLAZE)
/* TODO: Verify that this is correct... */
if (entering(tcp)) {
struct sigcontext sc;
long sp;
- sigset_t sigm;
/* Read r1, the stack pointer. */
- if (upeek(tcp, 1 * 4, &sp) < 0)
+ if (upeek(tcp->pid, 1 * 4, &sp) < 0)
return 0;
if (umove(tcp, sp, &sc) < 0)
return 0;
- long_to_sigset(sc.oldmask, &sigm);
- tprints(sprintsigmask(") (mask ", &sigm, 0));
+ tprints(sprintsigmask_long(") (mask ", sc.oldmask));
}
-#elif defined(X86_64)
- /* no need to remind */
#elif defined(XTENSA)
/* Xtensa only has rt_sys_sigreturn */
+#elif defined(ARC)
+ /* ARC syscall ABI only supports rt_sys_sigreturn */
#else
# warning No sys_sigreturn() for this architecture
# warning (no problem, just a reminder :-)
@@ -1007,9 +1060,7 @@
sys_siggetmask(struct tcb *tcp)
{
if (exiting(tcp)) {
- sigset_t sigm;
- long_to_sigset(tcp->u_rval, &sigm);
- tcp->auxstr = sprintsigmask("mask ", &sigm, 0);
+ tcp->auxstr = sprintsigmask_long("mask ", tcp->u_rval);
}
return RVAL_HEX | RVAL_STR;
}
@@ -1018,9 +1069,7 @@
sys_sigsuspend(struct tcb *tcp)
{
if (entering(tcp)) {
- sigset_t sigm;
- long_to_sigset(tcp->u_arg[2], &sigm);
- printsigmask(&sigm, 0);
+ tprints(sprintsigmask_long("", tcp->u_arg[2]));
}
return 0;
}
@@ -1031,9 +1080,9 @@
#endif
static const struct xlat sigaltstack_flags[] = {
- { SS_ONSTACK, "SS_ONSTACK" },
- { SS_DISABLE, "SS_DISABLE" },
- { 0, NULL },
+ XLAT(SS_ONSTACK),
+ XLAT(SS_DISABLE),
+ XLAT_END
};
static void
@@ -1067,11 +1116,11 @@
#ifdef HAVE_SIGACTION
+/* "Old" sigprocmask, which operates with word-sized signal masks */
int
sys_sigprocmask(struct tcb *tcp)
{
-#ifdef ALPHA
- sigset_t ss;
+# ifdef ALPHA
if (entering(tcp)) {
/*
* Alpha/OSF is different: it doesn't pass in two pointers,
@@ -1084,32 +1133,27 @@
* Everyone else:
* ret = sigprocmask(how, &new, &old, ...);
*/
- memcpy(&ss, &tcp->u_arg[1], sizeof(long));
printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
- tprints(", ");
- printsigmask(&ss, 0);
+ tprints(sprintsigmask_long(", ", tcp->u_arg[1]));
}
else if (!syserror(tcp)) {
- memcpy(&ss, &tcp->u_rval, sizeof(long));
- tcp->auxstr = sprintsigmask("old mask ", &ss, 0);
+ tcp->auxstr = sprintsigmask_long("old mask ", tcp->u_rval);
return RVAL_HEX | RVAL_STR;
}
-#else /* !ALPHA */
+# else /* !ALPHA */
if (entering(tcp)) {
printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
tprints(", ");
- print_sigset(tcp, tcp->u_arg[1], 0);
+ print_sigset_addr_len(tcp, tcp->u_arg[1], current_wordsize);
tprints(", ");
}
else {
- if (!tcp->u_arg[2])
- tprints("NULL");
- else if (syserror(tcp))
+ if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[2]);
else
- print_sigset(tcp, tcp->u_arg[2], 0);
+ print_sigset_addr_len(tcp, tcp->u_arg[2], current_wordsize);
}
-#endif /* !ALPHA */
+# endif /* !ALPHA */
return 0;
}
@@ -1143,15 +1187,11 @@
int
sys_sigpending(struct tcb *tcp)
{
- sigset_t sigset;
-
if (exiting(tcp)) {
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[0]);
- else if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0)
- tprints("[?]");
else
- printsigmask(&sigset, 0);
+ print_sigset_addr_len(tcp, tcp->u_arg[0], current_wordsize);
}
return 0;
}
@@ -1159,30 +1199,18 @@
int
sys_rt_sigprocmask(struct tcb *tcp)
{
- sigset_t sigset;
-
- /* Note: arg[3] is the length of the sigset. */
+ /* Note: arg[3] is the length of the sigset. Kernel requires NSIG / 8 */
if (entering(tcp)) {
printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
tprints(", ");
- if (!tcp->u_arg[1])
- tprints("NULL, ");
- else if (copy_sigset_len(tcp, tcp->u_arg[1], &sigset, tcp->u_arg[3]) < 0)
- tprintf("%#lx, ", tcp->u_arg[1]);
- else {
- printsigmask(&sigset, 1);
- tprints(", ");
- }
+ print_sigset_addr_len(tcp, tcp->u_arg[1], tcp->u_arg[3]);
+ tprints(", ");
}
else {
- if (!tcp->u_arg[2])
- tprints("NULL");
- else if (syserror(tcp))
+ if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[2]);
- else if (copy_sigset_len(tcp, tcp->u_arg[2], &sigset, tcp->u_arg[3]) < 0)
- tprints("[?]");
else
- printsigmask(&sigset, 1);
+ print_sigset_addr_len(tcp, tcp->u_arg[2], tcp->u_arg[3]);
tprintf(", %lu", tcp->u_arg[3]);
}
return 0;
@@ -1192,9 +1220,14 @@
struct new_sigaction
{
/* sa_handler may be a libc #define, need to use other name: */
+#ifdef MIPS
+ unsigned int sa_flags;
+ void (*__sa_handler)(int);
+#else
void (*__sa_handler)(int);
unsigned long sa_flags;
void (*sa_restorer)(void);
+#endif /* !MIPS */
/* Kernel treats sa_mask as an array of longs. */
unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1];
};
@@ -1207,28 +1240,20 @@
uint32_t sa_mask[2 * (NSIG / sizeof(long) ? NSIG / sizeof(long) : 1)];
};
-int
-sys_rt_sigaction(struct tcb *tcp)
+static void
+decode_new_sigaction(struct tcb *tcp, long addr)
{
struct new_sigaction sa;
sigset_t sigset;
- long addr;
int r;
- if (entering(tcp)) {
- printsignal(tcp->u_arg[0]);
- tprints(", ");
- addr = tcp->u_arg[1];
- } else
- addr = tcp->u_arg[2];
-
- if (addr == 0) {
+ if (!addr) {
tprints("NULL");
- goto after_sa;
+ return;
}
- if (!verbose(tcp)) {
+ if (!verbose(tcp) || (exiting(tcp) && syserror(tcp))) {
tprintf("%#lx", addr);
- goto after_sa;
+ return;
}
#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4
if (current_wordsize != sizeof(sa.sa_flags) && current_wordsize == 4) {
@@ -1256,7 +1281,7 @@
}
if (r < 0) {
tprints("{...}");
- goto after_sa;
+ return;
}
/* Architectures using function pointers, like
* hppa, may need to manipulate the function pointer
@@ -1274,34 +1299,36 @@
tprints("{SIG_IGN, ");
else
tprintf("{%#lx, ", (long) sa.__sa_handler);
- /* Questionable code below.
- * Kernel won't handle sys_rt_sigaction
- * with wrong sigset size (just returns EINVAL)
- * therefore tcp->u_arg[3(4)] _must_ be NSIG / 8 here,
- * and we always use smaller memcpy. */
+ /*
+ * Sigset size is in tcp->u_arg[4] (SPARC)
+ * or in tcp->u_arg[3] (all other),
+ * but kernel won't handle sys_rt_sigaction
+ * with wrong sigset size (just returns EINVAL instead).
+ * We just fetch the right size, which is NSIG / 8.
+ */
sigemptyset(&sigset);
-#if defined(SPARC) || defined(SPARC64)
- if (tcp->u_arg[4] <= sizeof(sigset))
- memcpy(&sigset, &sa.sa_mask, tcp->u_arg[4]);
-#else
- if (tcp->u_arg[3] <= sizeof(sigset))
- memcpy(&sigset, &sa.sa_mask, tcp->u_arg[3]);
-#endif
- else
- memcpy(&sigset, &sa.sa_mask, sizeof(sigset));
- printsigmask(&sigset, 1);
+ memcpy(&sigset, &sa.sa_mask, sizeof(sigset_t)/*enh:NSIG / 8*/);
+ printsigmask(&sigset);
tprints(", ");
+
printflags(sigact_flags, sa.sa_flags, "SA_???");
#ifdef SA_RESTORER
if (sa.sa_flags & SA_RESTORER)
tprintf(", %p", sa.sa_restorer);
#endif
tprints("}");
+}
- after_sa:
- if (entering(tcp))
+int
+sys_rt_sigaction(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ printsignal(tcp->u_arg[0]);
tprints(", ");
- else
+ decode_new_sigaction(tcp, tcp->u_arg[1]);
+ tprints(", ");
+ } else {
+ decode_new_sigaction(tcp, tcp->u_arg[2]);
#if defined(SPARC) || defined(SPARC64)
tprintf(", %#lx, %lu", tcp->u_arg[3], tcp->u_arg[4]);
#elif defined(ALPHA)
@@ -1309,22 +1336,25 @@
#else
tprintf(", %lu", tcp->u_arg[3]);
#endif
+ }
return 0;
}
int
sys_rt_sigpending(struct tcb *tcp)
{
- sigset_t sigset;
-
if (exiting(tcp)) {
+ /*
+ * One of the few syscalls where sigset size (arg[1])
+ * is allowed to be <= NSIG / 8, not strictly ==.
+ * This allows non-rt sigpending() syscall
+ * to reuse rt_sigpending() code in kernel.
+ */
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[0]);
- else if (copy_sigset_len(tcp, tcp->u_arg[0],
- &sigset, tcp->u_arg[1]) < 0)
- tprints("[?]");
else
- printsigmask(&sigset, 1);
+ print_sigset_addr_len(tcp, tcp->u_arg[0], tcp->u_arg[1]);
+ tprintf(", %lu", tcp->u_arg[1]);
}
return 0;
}
@@ -1333,11 +1363,9 @@
sys_rt_sigsuspend(struct tcb *tcp)
{
if (entering(tcp)) {
- sigset_t sigm;
- if (copy_sigset_len(tcp, tcp->u_arg[0], &sigm, tcp->u_arg[1]) < 0)
- tprints("[?]");
- else
- printsigmask(&sigm, 1);
+ /* NB: kernel requires arg[1] == NSIG / 8 */
+ print_sigset_addr_len(tcp, tcp->u_arg[0], tcp->u_arg[1]);
+ tprintf(", %lu", tcp->u_arg[1]);
}
return 0;
}
@@ -1372,14 +1400,9 @@
int sys_rt_sigtimedwait(struct tcb *tcp)
{
+ /* NB: kernel requires arg[3] == NSIG / 8 */
if (entering(tcp)) {
- sigset_t sigset;
-
- if (copy_sigset_len(tcp, tcp->u_arg[0],
- &sigset, tcp->u_arg[3]) < 0)
- tprints("[?]");
- else
- printsigmask(&sigset, 1);
+ print_sigset_addr_len(tcp, tcp->u_arg[0], tcp->u_arg[3]);
tprints(", ");
/* This is the only "return" parameter, */
if (tcp->u_arg[1] != 0)
@@ -1397,7 +1420,7 @@
return 0;
}
print_timespec(tcp, tcp->u_arg[2]);
- tprintf(", %d", (int) tcp->u_arg[3]);
+ tprintf(", %lu", tcp->u_arg[3]);
return 0;
};
@@ -1412,10 +1435,11 @@
static int
do_signalfd(struct tcb *tcp, int flags_arg)
{
+ /* NB: kernel requires arg[2] == NSIG / 8 */
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
- print_sigset(tcp, tcp->u_arg[1], 1);
+ print_sigset_addr_len(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[2]);
if (flags_arg >= 0) {
tprints(", ");
diff --git a/signalent.sh b/signalent.sh
new file mode 100755
index 0000000..62ae786
--- /dev/null
+++ b/signalent.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+# Copyright (c) 1996 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.
+
+cat $* |
+ sed -n -e 's/\/\*.*\*\// /' -e 's/^#[ ]*define[ ][ ]*SIG\([^_ ]*\)[ ][ ]*\([0-9][0-9]*\)[ ]*$/\1 \2/p' |
+ sort -k2n | uniq |
+ awk '
+ BEGIN {
+ tabs = "\t\t\t\t\t\t\t\t"
+ signal = -1;
+ }
+ $2 <= 256 {
+ if (signal == $2)
+ next
+ while (++signal < $2) {
+ n = "\"SIG_" signal "\""
+ s = "\t" n ","
+ s = s substr(tabs, 1, 16/8 - int((length(n) + 1)/8))
+ s = s "/* " signal " */"
+ print s
+ }
+ if (signal == $2)
+ n = "\"SIG" $1 "\""
+ n = "\"SIG" $1 "\""
+ s = "\t" n ","
+ s = s substr(tabs, 1, 16/8 - int((length(n) + 1)/8))
+ s = s "/* " signal " */"
+ print s
+ }
+ '
diff --git a/sock.c b/sock.c
index 9c6fe96..3d4f0b6 100644
--- a/sock.c
+++ b/sock.c
@@ -39,22 +39,22 @@
#include <net/if.h>
static const struct xlat iffflags[] = {
- { IFF_UP, "IFF_UP" },
- { IFF_BROADCAST, "IFF_BROADCAST" },
- { IFF_DEBUG, "IFF_DEBUG" },
- { IFF_LOOPBACK, "IFF_LOOPBACK" },
- { IFF_POINTOPOINT, "IFF_POINTOPOINT" },
- { IFF_NOTRAILERS, "IFF_NOTRAILERS" },
- { IFF_RUNNING, "IFF_RUNNING" },
- { IFF_NOARP, "IFF_NOARP" },
- { IFF_PROMISC, "IFF_PROMISC" },
- { IFF_ALLMULTI, "IFF_ALLMULTI" },
- { IFF_MASTER, "IFF_MASTER" },
- { IFF_SLAVE, "IFF_SLAVE" },
- { IFF_MULTICAST, "IFF_MULTICAST" },
- { IFF_PORTSEL, "IFF_PORTSEL" },
- { IFF_AUTOMEDIA, "IFF_AUTOMEDIA" },
- { 0, NULL }
+ XLAT(IFF_UP),
+ XLAT(IFF_BROADCAST),
+ XLAT(IFF_DEBUG),
+ XLAT(IFF_LOOPBACK),
+ XLAT(IFF_POINTOPOINT),
+ XLAT(IFF_NOTRAILERS),
+ XLAT(IFF_RUNNING),
+ XLAT(IFF_NOARP),
+ XLAT(IFF_PROMISC),
+ XLAT(IFF_ALLMULTI),
+ XLAT(IFF_MASTER),
+ XLAT(IFF_SLAVE),
+ XLAT(IFF_MULTICAST),
+ XLAT(IFF_PORTSEL),
+ XLAT(IFF_AUTOMEDIA),
+ XLAT_END
};
static void
diff --git a/strace.1 b/strace.1
index 5f287d7..6ca4bda 100644
--- a/strace.1
+++ b/strace.1
@@ -92,7 +92,7 @@
.LP
Each line in the trace contains the system call name, followed
by its arguments in parentheses and its return value.
-An example from stracing the command ``cat /dev/null'' is:
+An example from stracing the command "cat /dev/null" is:
.CW
open("/dev/null", O_RDONLY) = 3
.CE
@@ -101,11 +101,11 @@
.CW
open("/foo/bar", O_RDONLY) = -1 ENOENT (No such file or directory)
.CE
-Signals are printed as a signal symbol and a signal string.
-An excerpt from stracing and interrupting the command ``sleep 666'' is:
+Signals are printed as signal symbol and decoded siginfo structure.
+An excerpt from stracing and interrupting the command "sleep 666" is:
.CW
sigsuspend([] <unfinished ...>
---- SIGINT (Interrupt) ---
+--- SIGINT {si_signo=SIGINT, si_code=SI_USER, si_pid=...} ---
+++ killed by SIGINT +++
.CE
If a system call is being executed and meanwhile another one is being called
@@ -126,12 +126,12 @@
immediate reexecution after the signal handler completes.
.CW
read(0, 0x7ffff72cf5cf, 1) = ? ERESTARTSYS (To be restarted)
---- SIGALRM (Alarm clock) @ 0 (0) ---
+--- SIGALRM ... ---
rt_sigreturn(0xe) = 0
-read(0, ""..., 1) = 0
+read(0, "", 1) = 0
.CE
Arguments are printed in symbolic form with a passion.
-This example shows the shell performing ``>>xyzzy'' output redirection:
+This example shows the shell performing ">>xyzzy" output redirection:
.CW
open("xyzzy", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
.CE
@@ -146,17 +146,17 @@
Structure pointers are dereferenced and the members are displayed
as appropriate. In all cases arguments are formatted in the most C-like
fashion possible.
-For example, the essence of the command ``ls \-l /dev/null'' is captured as:
+For example, the essence of the command "ls \-l /dev/null" is captured as:
.CW
lstat("/dev/null", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
.CE
-Notice how the `struct stat' argument is dereferenced and how each member is
+Notice how the 'struct stat' argument is dereferenced and how each member is
displayed symbolically. In particular, observe how the st_mode member
is carefully decoded into a bitwise-OR of symbolic and numeric values.
Also notice in this example that the first argument to lstat is an input
to the system call and the second argument is an output. Since output
arguments are not modified if the system call fails, arguments may not
-always be dereferenced. For example, retrying the ``ls \-l'' example
+always be dereferenced. For example, retrying the "ls \-l" example
with a non-existent file produces the following line:
.CW
lstat("/foo/bar", 0xb004) = -1 ENOENT (No such file or directory)
@@ -170,7 +170,7 @@
.I strsize
(32 by default) bytes of strings are printed;
longer strings have an ellipsis appended following the closing quote.
-Here is a line from ``ls \-l'' where the
+Here is a line from "ls \-l" where the
.B getpwuid
library routine is reading the password file:
.CW
@@ -178,7 +178,7 @@
.CE
While structures are annotated using curly braces, simple pointers
and arrays are printed using square brackets with commas separating
-elements. Here is an example from the command ``id'' on a system with
+elements. Here is an example from the command "id" on a system with
supplementary group ids:
.CW
getgroups(32, [100, 0]) = 2
@@ -479,7 +479,7 @@
if
.B \-ff
is used.
-If the argument begins with `|' or with `!' then the rest of the
+If the argument begins with '|' or with '!' then the rest of the
argument is treated as a command and all output is piped to it.
This is convenient for piping the debugging output to a program
without affecting the redirections of executed programs.
@@ -571,6 +571,11 @@
terminates itself with the same signal, so that
.B strace
can be used as a wrapper process transparent to the invoking parent process.
+Note that parent-child relationship (signal stop notifications,
+getppid() value, etc) between traced process and its parent are not preserved
+unless
+.B \-D
+is used.
.LP
When using
.BR \-p ,
@@ -592,7 +597,7 @@
to those users who have this trust.
For example, it makes sense to install a special version of
.B strace
-with mode `rwsr-xr--', user
+with mode 'rwsr-xr--', user
.B root
and group
.BR trace ,
@@ -631,12 +636,13 @@
system call interface and are accounted for by C library wrapper
functions.
.LP
-On some platforms a process that has a system call trace applied
-to it with the
+On some platforms a process that is attached to with the
.B \-p
-option will receive a
-.BR \s-1SIGSTOP\s0 .
-This signal may interrupt a system call that is not restartable.
+option may observe a spurious EINTR return from the current
+system call that is not restartable. (Ideally, all system calls
+should be restarted on strace attach, making the attach invisible
+to the traced process, but a few system calls aren't.
+Arguably, every instance of such behavior is a kernel bug.)
This may have an unpredictable effect on the process
if the process takes no action to restart the system call.
.SH BUGS
@@ -658,7 +664,6 @@
.B \-i
option is weakly supported.
.SH HISTORY
-.B strace
The original
.B strace
was written by Paul Kranenburg
diff --git a/strace.c b/strace.c
index 6eab600..063cb94 100644
--- a/strace.c
+++ b/strace.c
@@ -77,11 +77,11 @@
bool need_fork_exec_workarounds = 0;
bool debug_flag = 0;
bool Tflag = 0;
+bool iflag = 0;
unsigned int qflag = 0;
/* Which WSTOPSIG(status) value marks syscall traps? */
static unsigned int syscall_trap_sig = SIGTRAP;
static unsigned int tflag = 0;
-static bool iflag = 0;
static bool rflag = 0;
static bool print_pid_pfx = 0;
@@ -157,8 +157,7 @@
unsigned os_release; /* generated from uname()'s u.release */
-static int detach(struct tcb *tcp);
-static int trace(void);
+static void detach(struct tcb *tcp);
static void cleanup(void);
static void interrupt(int sig);
static sigset_t empty_set, blocked_set;
@@ -336,11 +335,11 @@
{
int r;
if (!use_seize)
- return ptrace(PTRACE_ATTACH, pid, 0, 0);
- r = ptrace(PTRACE_SEIZE, pid, 0, 0);
+ return ptrace(PTRACE_ATTACH, pid, 0L, 0L);
+ r = ptrace(PTRACE_SEIZE, pid, 0L, (unsigned long)ptrace_setoptions);
if (r)
return r;
- r = ptrace(PTRACE_INTERRUPT, pid, 0, 0);
+ r = ptrace(PTRACE_INTERRUPT, pid, 0L, 0L);
return r;
}
#else
@@ -439,8 +438,12 @@
}
}
-#if _LFS64_LARGEFILE
-# define fopen_for_output fopen64
+#ifdef _LARGEFILE64_SOURCE
+# ifdef HAVE_FOPEN64
+# define fopen_for_output fopen64
+# else
+# define fopen_for_output fopen
+# endif
# define struct_stat struct stat64
# define stat_file stat64
# define struct_dirent struct dirent64
@@ -486,6 +489,7 @@
strace_popen(const char *command)
{
FILE *fp;
+ int pid;
int fds[2];
swap_uid();
@@ -494,11 +498,11 @@
set_cloexec_flag(fds[1]); /* never fails */
- popen_pid = vfork();
- if (popen_pid == -1)
+ pid = vfork();
+ if (pid < 0)
perror_msg_and_die("vfork");
- if (popen_pid == 0) {
+ if (pid == 0) {
/* child */
close(fds[1]);
if (fds[0] != 0) {
@@ -511,6 +515,7 @@
}
/* parent */
+ popen_pid = pid;
close(fds[0]);
swap_uid();
fp = fdopen(fds[1], "w");
@@ -536,6 +541,10 @@
va_end(args);
}
+#ifndef HAVE_FPUTS_UNLOCKED
+# define fputs_unlocked fputs
+#endif
+
void
tprints(const char *str)
{
@@ -623,7 +632,7 @@
}
}
if (iflag)
- printcall(tcp);
+ print_pc(tcp);
}
void
@@ -678,10 +687,9 @@
for (i = 0; i < tcbtabsize; i++) {
tcp = tcbtab[i];
- if ((tcp->flags & TCB_INUSE) == 0) {
+ if (!tcp->pid) {
memset(tcp, 0, sizeof(*tcp));
tcp->pid = pid;
- tcp->flags = TCB_INUSE;
#if SUPPORTED_PERSONALITIES > 1
tcp->currpers = current_personality;
#endif
@@ -724,16 +732,16 @@
memset(tcp, 0, sizeof(*tcp));
}
-/* detach traced process; continue with sig
+/* Detach traced process.
* Never call DETACH twice on the same process as both unattached and
* attached-unstopped processes give the same ESRCH. For unattached process we
* would SIGSTOP it and wait for its SIGSTOP notification forever.
*/
-static int
+static void
detach(struct tcb *tcp)
{
int error;
- int status, sigstop_expected;
+ int status;
if (tcp->flags & TCB_BPTSET)
clearbpt(tcp);
@@ -748,86 +756,149 @@
# define PTRACE_DETACH PTRACE_SUNDETACH
#endif
- error = 0;
- sigstop_expected = 0;
- if (tcp->flags & TCB_ATTACHED) {
- /*
- * We attached but possibly didn't see the expected SIGSTOP.
- * We must catch exactly one as otherwise the detached process
- * would be left stopped (process state T).
- */
- sigstop_expected = (tcp->flags & TCB_IGNORE_ONE_SIGSTOP);
- error = ptrace(PTRACE_DETACH, tcp->pid, (char *) 1, 0);
- if (error == 0) {
- /* On a clear day, you can see forever. */
- }
- else if (errno != ESRCH) {
+ if (!(tcp->flags & TCB_ATTACHED))
+ goto drop;
+
+ /* We attached but possibly didn't see the expected SIGSTOP.
+ * We must catch exactly one as otherwise the detached process
+ * would be left stopped (process state T).
+ */
+ if (tcp->flags & TCB_IGNORE_ONE_SIGSTOP)
+ goto wait_loop;
+
+ error = ptrace(PTRACE_DETACH, tcp->pid, 0, 0);
+ if (!error) {
+ /* On a clear day, you can see forever. */
+ goto drop;
+ }
+ if (errno != ESRCH) {
+ /* Shouldn't happen. */
+ perror_msg("detach: ptrace(PTRACE_DETACH,%u)", tcp->pid);
+ goto drop;
+ }
+ /* ESRCH: process is either not stopped or doesn't exist. */
+ if (my_tkill(tcp->pid, 0) < 0) {
+ if (errno != ESRCH)
/* Shouldn't happen. */
- perror_msg("detach: ptrace(PTRACE_DETACH, ...)");
- }
- else if (my_tkill(tcp->pid, 0) < 0) {
- if (errno != ESRCH)
- perror_msg("detach: checking sanity");
- }
- else if (!sigstop_expected && my_tkill(tcp->pid, SIGSTOP) < 0) {
- if (errno != ESRCH)
- perror_msg("detach: stopping child");
- }
- else
- sigstop_expected = 1;
+ perror_msg("detach: tkill(%u,0)", tcp->pid);
+ /* else: process doesn't exist. */
+ goto drop;
}
+ /* Process is not stopped, need to stop it. */
+ if (use_seize) {
+ /*
+ * With SEIZE, tracee can be in group-stop already.
+ * In this state sending it another SIGSTOP does nothing.
+ * Need to use INTERRUPT.
+ * Testcase: trying to ^C a "strace -p <stopped_process>".
+ */
+ error = ptrace(PTRACE_INTERRUPT, tcp->pid, 0, 0);
+ if (!error)
+ goto wait_loop;
+ if (errno != ESRCH)
+ perror_msg("detach: ptrace(PTRACE_INTERRUPT,%u)", tcp->pid);
+ }
+ else {
+ error = my_tkill(tcp->pid, SIGSTOP);
+ if (!error)
+ goto wait_loop;
+ if (errno != ESRCH)
+ perror_msg("detach: tkill(%u,SIGSTOP)", tcp->pid);
+ }
+ /* Either process doesn't exist, or some weird error. */
+ goto drop;
- if (sigstop_expected) {
- for (;;) {
-#ifdef __WALL
- if (waitpid(tcp->pid, &status, __WALL) < 0) {
- if (errno == ECHILD) /* Already gone. */
- break;
- if (errno != EINVAL) {
- perror_msg("detach: waiting");
- break;
- }
-#endif /* __WALL */
- /* No __WALL here. */
- if (waitpid(tcp->pid, &status, 0) < 0) {
- if (errno != ECHILD) {
- perror_msg("detach: waiting");
- break;
- }
-#ifdef __WCLONE
- /* If no processes, try clones. */
- if (waitpid(tcp->pid, &status, __WCLONE) < 0) {
- if (errno != ECHILD)
- perror_msg("detach: waiting");
- break;
- }
-#endif /* __WCLONE */
- }
-#ifdef __WALL
+ wait_loop:
+ /* We end up here in three cases:
+ * 1. We sent PTRACE_INTERRUPT (use_seize case)
+ * 2. We sent SIGSTOP (!use_seize)
+ * 3. Attach SIGSTOP was already pending (TCB_IGNORE_ONE_SIGSTOP set)
+ */
+ for (;;) {
+ int sig;
+ if (waitpid(tcp->pid, &status, __WALL) < 0) {
+ if (errno == EINTR)
+ continue;
+ /*
+ * if (errno == ECHILD) break;
+ * ^^^ WRONG! We expect this PID to exist,
+ * and want to emit a message otherwise:
+ */
+ perror_msg("detach: waitpid(%u)", tcp->pid);
+ break;
+ }
+ if (!WIFSTOPPED(status)) {
+ /*
+ * Tracee exited or was killed by signal.
+ * We shouldn't normally reach this place:
+ * we don't want to consume exit status.
+ * Consider "strace -p PID" being ^C-ed:
+ * we want merely to detach from PID.
+ *
+ * However, we _can_ end up here if tracee
+ * was SIGKILLed.
+ */
+ break;
+ }
+ sig = WSTOPSIG(status);
+ if (debug_flag)
+ fprintf(stderr, "detach wait: event:%d sig:%d\n",
+ (unsigned)status >> 16, sig);
+ if (use_seize) {
+ unsigned event = (unsigned)status >> 16;
+ if (event == PTRACE_EVENT_STOP /*&& sig == SIGTRAP*/) {
+ /*
+ * sig == SIGTRAP: PTRACE_INTERRUPT stop.
+ * sig == other: process was already stopped
+ * with this stopping sig (see tests/detach-stopped).
+ * Looks like re-injecting this sig is not necessary
+ * in DETACH for the tracee to remain stopped.
+ */
+ sig = 0;
}
-#endif
- if (!WIFSTOPPED(status)) {
- /* Au revoir, mon ami. */
- break;
- }
- if (WSTOPSIG(status) == SIGSTOP) {
- ptrace_restart(PTRACE_DETACH, tcp, 0);
- break;
- }
- error = ptrace_restart(PTRACE_CONT, tcp,
- WSTOPSIG(status) == syscall_trap_sig ? 0
- : WSTOPSIG(status));
- if (error < 0)
- break;
+ /*
+ * PTRACE_INTERRUPT is not guaranteed to produce
+ * the above event if other ptrace-stop is pending.
+ * See tests/detach-sleeping testcase:
+ * strace got SIGINT while tracee is sleeping.
+ * We sent PTRACE_INTERRUPT.
+ * We see syscall exit, not PTRACE_INTERRUPT stop.
+ * We won't get PTRACE_INTERRUPT stop
+ * if we would CONT now. Need to DETACH.
+ */
+ if (sig == syscall_trap_sig)
+ sig = 0;
+ /* else: not sure in which case we can be here.
+ * Signal stop? Inject it while detaching.
+ */
+ ptrace_restart(PTRACE_DETACH, tcp, sig);
+ break;
+ }
+ /* Note: this check has to be after use_seize check */
+ /* (else, in use_seize case SIGSTOP will be mistreated) */
+ if (sig == SIGSTOP) {
+ /* Detach, suppressing SIGSTOP */
+ ptrace_restart(PTRACE_DETACH, tcp, 0);
+ break;
+ }
+ if (sig == syscall_trap_sig)
+ sig = 0;
+ /* Can't detach just yet, may need to wait for SIGSTOP */
+ error = ptrace_restart(PTRACE_CONT, tcp, sig);
+ if (error < 0) {
+ /* Should not happen.
+ * Note: ptrace_restart returns 0 on ESRCH, so it's not it.
+ * ptrace_restart already emitted error message.
+ */
+ break;
}
}
+ drop:
if (!qflag && (tcp->flags & TCB_ATTACHED))
fprintf(stderr, "Process %u detached\n", tcp->pid);
droptcb(tcp);
-
- return error;
}
static void
@@ -896,7 +967,7 @@
for (tcbi = 0; tcbi < tcbtabsize; tcbi++) {
tcp = tcbtab[tcbi];
- if (!(tcp->flags & TCB_INUSE))
+ if (!tcp->pid)
continue;
/* Is this a process we should attach to, but not yet attached? */
@@ -1142,7 +1213,7 @@
prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY);
#endif
- strace_child = pid = fork();
+ pid = fork();
if (pid < 0) {
perror_msg_and_die("fork");
}
@@ -1159,6 +1230,7 @@
/* We are the tracer */
if (!daemonized_tracer) {
+ strace_child = pid;
if (!use_seize) {
/* child did PTRACE_TRACEME, nothing to do in parent */
} else {
@@ -1189,9 +1261,9 @@
}
tcp = alloctcb(pid);
if (!NOMMU_SYSTEM)
- tcp->flags |= TCB_ATTACHED | TCB_STRACE_CHILD | TCB_STARTUP | post_attach_sigstop;
+ tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop;
else
- tcp->flags |= TCB_ATTACHED | TCB_STRACE_CHILD | TCB_STARTUP;
+ tcp->flags |= TCB_ATTACHED | TCB_STARTUP;
newoutf(tcp);
}
else {
@@ -1853,7 +1925,7 @@
for (i = 0; i < tcbtabsize; i++) {
struct tcb *tcp = tcbtab[i];
- if (tcp->pid == pid && (tcp->flags & TCB_INUSE))
+ if (tcp->pid == pid)
return tcp;
}
@@ -1874,12 +1946,12 @@
for (i = 0; i < tcbtabsize; i++) {
tcp = tcbtab[i];
- if (!(tcp->flags & TCB_INUSE))
+ if (!tcp->pid)
continue;
if (debug_flag)
fprintf(stderr,
"cleanup: looking at pid %u\n", tcp->pid);
- if (tcp->flags & TCB_STRACE_CHILD) {
+ if (tcp->pid == strace_child) {
kill(tcp->pid, SIGCONT);
kill(tcp->pid, fatal_sig);
}
@@ -1895,16 +1967,26 @@
interrupted = sig;
}
-static int
+static void
trace(void)
{
struct rusage ru;
- struct rusage *rup = cflag ? &ru : NULL;
-#ifdef __WALL
- static int wait4_options = __WALL;
-#endif
- while (nprocs != 0) {
+ /* Used to be "while (nprocs != 0)", but in this testcase:
+ * int main() { _exit(!!fork()); }
+ * under strace -f, parent sometimes (rarely) manages
+ * to exit before we see the first stop of the child,
+ * and we are losing track of it:
+ * 19923 clone(...) = 19924
+ * 19923 exit_group(1) = ?
+ * 19923 +++ exited with 1 +++
+ * Waiting for ECHILD works better.
+ * (However, if -o|logger is in use, we can't do that.
+ * Can work around that by double-forking the logger,
+ * but that loses the ability to wait for its completion on exit.
+ * Oh well...)
+ */
+ while (1) {
int pid;
int wait_errno;
int status, sig;
@@ -1913,50 +1995,32 @@
unsigned event;
if (interrupted)
- return 0;
+ return;
+
+ if (popen_pid != 0 && nprocs == 0)
+ return;
+
if (interactive)
sigprocmask(SIG_SETMASK, &empty_set, NULL);
-#ifdef __WALL
- pid = wait4(-1, &status, wait4_options, rup);
- if (pid < 0 && (wait4_options & __WALL) && errno == EINVAL) {
- /* this kernel does not support __WALL */
- wait4_options &= ~__WALL;
- pid = wait4(-1, &status, wait4_options, rup);
- }
- if (pid < 0 && !(wait4_options & __WALL) && errno == ECHILD) {
- /* most likely a "cloned" process */
- pid = wait4(-1, &status, __WCLONE, rup);
- if (pid < 0) {
- perror_msg("wait4(__WCLONE) failed");
- }
- }
-#else
- pid = wait4(-1, &status, 0, rup);
-#endif /* __WALL */
+ pid = wait4(-1, &status, __WALL, (cflag ? &ru : NULL));
wait_errno = errno;
if (interactive)
sigprocmask(SIG_BLOCK, &blocked_set, NULL);
if (pid < 0) {
- switch (wait_errno) {
- case EINTR:
+ if (wait_errno == EINTR)
continue;
- case ECHILD:
- /*
- * We would like to verify this case
- * but sometimes a race in Solbourne's
- * version of SunOS sometimes reports
- * ECHILD before sending us SIGCHILD.
- */
- return 0;
- default:
- errno = wait_errno;
- perror_msg("wait");
- return -1;
- }
+ if (nprocs == 0 && wait_errno == ECHILD)
+ return;
+ /* If nprocs > 0, ECHILD is not expected,
+ * treat it as any other error here:
+ */
+ errno = wait_errno;
+ perror_msg_and_die("wait4(__WALL)");
}
+
if (pid == popen_pid) {
- if (WIFEXITED(status) || WIFSIGNALED(status))
+ if (!WIFSTOPPED(status))
popen_pid = 0;
continue;
}
@@ -1964,7 +2028,7 @@
event = ((unsigned)status >> 16);
if (debug_flag) {
char buf[sizeof("WIFEXITED,exitcode=%u") + sizeof(int)*3 /*paranoia:*/ + 16];
- char evbuf[sizeof(",PTRACE_EVENT_?? (%u)") + sizeof(int)*3 /*paranoia:*/ + 16];
+ char evbuf[sizeof(",EVENT_VFORK_DONE (%u)") + sizeof(int)*3 /*paranoia:*/ + 16];
strcpy(buf, "???");
if (WIFSIGNALED(status))
#ifdef WCOREDUMP
@@ -1980,6 +2044,7 @@
if (WIFSTOPPED(status))
sprintf(buf, "WIFSTOPPED,sig=%s", signame(WSTOPSIG(status)));
#ifdef WIFCONTINUED
+ /* Should never be seen */
if (WIFCONTINUED(status))
strcpy(buf, "WIFCONTINUED");
#endif
@@ -1992,24 +2057,32 @@
[PTRACE_EVENT_VFORK_DONE] = "VFORK_DONE",
[PTRACE_EVENT_EXEC] = "EXEC",
[PTRACE_EVENT_EXIT] = "EXIT",
+ /* [PTRACE_EVENT_STOP (=128)] would make biggish array */
};
- const char *e;
+ const char *e = "??";
if (event < ARRAY_SIZE(event_names))
e = event_names[event];
- else {
- sprintf(buf, "?? (%u)", event);
- e = buf;
- }
- sprintf(evbuf, ",PTRACE_EVENT_%s", e);
+ else if (event == PTRACE_EVENT_STOP)
+ e = "STOP";
+ sprintf(evbuf, ",EVENT_%s (%u)", e, event);
}
- fprintf(stderr, " [wait(0x%04x) = %u] %s%s\n", status, pid, buf, evbuf);
+ fprintf(stderr, " [wait(0x%06x) = %u] %s%s\n", status, pid, buf, evbuf);
}
/* Look up 'pid' in our table. */
tcp = pid2tcb(pid);
if (!tcp) {
+ if (!WIFSTOPPED(status)) {
+ /* This can happen if we inherited
+ * an unknown child. Example:
+ * (sleep 1 & exec strace sleep 2)
+ */
+ error_msg("Exit of unknown pid %u seen", pid);
+ continue;
+ }
if (followfork) {
+ /* We assume it's a fork/vfork/clone child */
tcp = alloctcb(pid);
tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop;
newoutf(tcp);
@@ -2018,10 +2091,11 @@
pid);
} else {
/* This can happen if a clone call used
- CLONE_PTRACE itself. */
- if (WIFSTOPPED(status))
- ptrace(PTRACE_CONT, pid, (char *) 0, 0);
- error_msg_and_die("Unknown pid: %u", pid);
+ * CLONE_PTRACE itself.
+ */
+ ptrace(PTRACE_CONT, pid, (char *) 0, 0);
+ error_msg("Stop of unknown pid %u seen, PTRACE_CONTed it", pid);
+ continue;
}
}
@@ -2050,6 +2124,9 @@
if (ptrace(PTRACE_GETEVENTMSG, pid, NULL, (long) &old_pid) < 0)
goto dont_switch_tcbs;
+ /* Avoid truncation in pid2tcb() param passing */
+ if (old_pid > UINT_MAX)
+ goto dont_switch_tcbs;
if (old_pid <= 0 || old_pid == pid)
goto dont_switch_tcbs;
execve_thread = pid2tcb(old_pid);
@@ -2151,13 +2228,13 @@
if (clearbpt(tcp) < 0) {
/* Pretty fatal */
droptcb(tcp);
- cleanup();
- return -1;
+ exit_code = 1;
+ return;
}
}
- if (ptrace_setoptions) {
+ if (!use_seize && ptrace_setoptions) {
if (debug_flag)
- fprintf(stderr, "setting opts %x on pid %d\n", ptrace_setoptions, tcp->pid);
+ fprintf(stderr, "setting opts 0x%x on pid %d\n", ptrace_setoptions, tcp->pid);
if (ptrace(PTRACE_SETOPTIONS, tcp->pid, NULL, ptrace_setoptions) < 0) {
if (errno != ESRCH) {
/* Should never happen, really */
@@ -2219,31 +2296,14 @@
&& !hide_log_until_execve
&& (qual_flags[sig] & QUAL_SIGNAL)
) {
-#if defined(PT_CR_IPSR) && defined(PT_CR_IIP)
- long pc = 0;
- long psr = 0;
-
- upeek(tcp, PT_CR_IPSR, &psr);
- upeek(tcp, PT_CR_IIP, &pc);
-
-# define PSR_RI 41
- pc += (psr >> PSR_RI) & 0x3;
-# define PC_FORMAT_STR " @ %lx"
-# define PC_FORMAT_ARG , pc
-#else
-# define PC_FORMAT_STR ""
-# define PC_FORMAT_ARG /* nothing */
-#endif
printleader(tcp);
if (!stopped) {
tprintf("--- %s ", signame(sig));
printsiginfo(&si, verbose(tcp));
- tprintf(PC_FORMAT_STR " ---\n"
- PC_FORMAT_ARG);
+ tprints(" ---\n");
} else
- tprintf("--- stopped by %s" PC_FORMAT_STR " ---\n",
- signame(sig)
- PC_FORMAT_ARG);
+ tprintf("--- stopped by %s ---\n",
+ signame(sig));
line_ended();
}
@@ -2252,7 +2312,6 @@
goto restart_tracee;
/* It's group-stop */
-#if USE_SEIZE
if (use_seize) {
/*
* This ends ptrace-stop, but does *not* end group-stop.
@@ -2260,19 +2319,19 @@
* (that is, process really stops. It used to continue to run).
*/
if (ptrace_restart(PTRACE_LISTEN, tcp, 0) < 0) {
- cleanup();
- return -1;
+ /* Note: ptrace_restart emitted error message */
+ exit_code = 1;
+ return;
}
continue;
}
/* We don't have PTRACE_LISTEN support... */
-#endif
goto restart_tracee;
}
/* We handled quick cases, we are permitted to interrupt now. */
if (interrupted)
- return 0;
+ return;
/* This should be syscall entry or exit.
* (Or it still can be that pesky post-execve SIGTRAP!)
@@ -2295,11 +2354,11 @@
sig = 0;
restart_tracee:
if (ptrace_restart(PTRACE_SYSCALL, tcp, sig) < 0) {
- cleanup();
- return -1;
+ /* Note: ptrace_restart emitted error message */
+ exit_code = 1;
+ return;
}
- }
- return 0;
+ } /* while (1) */
}
int
@@ -2308,8 +2367,7 @@
init(argc, argv);
/* Run main tracing loop */
- if (trace() < 0)
- return 1;
+ trace();
cleanup();
fflush(NULL);
diff --git a/stream.c b/stream.c
index 8c90838..a47eca2 100644
--- a/stream.c
+++ b/stream.c
@@ -27,10 +27,9 @@
*/
#include "defs.h"
-#ifdef HAVE_POLL_H
+#if defined HAVE_POLL_H
# include <poll.h>
-#endif
-#ifdef HAVE_SYS_POLL_H
+#elif defined HAVE_SYS_POLL_H
# include <sys/poll.h>
#endif
#ifdef HAVE_SYS_CONF_H
@@ -57,8 +56,8 @@
# endif
static const struct xlat msgflags[] = {
- { RS_HIPRI, "RS_HIPRI" },
- { 0, NULL },
+ XLAT(RS_HIPRI),
+ XLAT_END
};
static void
@@ -156,15 +155,15 @@
# if defined SYS_putpmsg || defined SYS_getpmsg
static const struct xlat pmsgflags[] = {
# ifdef MSG_HIPRI
- { MSG_HIPRI, "MSG_HIPRI" },
+ XLAT(MSG_HIPRI),
# endif
# ifdef MSG_AND
- { MSG_ANY, "MSG_ANY" },
+ XLAT(MSG_ANY),
# endif
# ifdef MSG_BAND
- { MSG_BAND, "MSG_BAND" },
+ XLAT(MSG_BAND),
# endif
- { 0, NULL },
+ XLAT_END
};
# ifdef SYS_putpmsg
int
@@ -245,26 +244,26 @@
static const struct xlat pollflags[] = {
# ifdef POLLIN
- { POLLIN, "POLLIN" },
- { POLLPRI, "POLLPRI" },
- { POLLOUT, "POLLOUT" },
+ XLAT(POLLIN),
+ XLAT(POLLPRI),
+ XLAT(POLLOUT),
# ifdef POLLRDNORM
- { POLLRDNORM, "POLLRDNORM" },
+ XLAT(POLLRDNORM),
# endif
# ifdef POLLWRNORM
- { POLLWRNORM, "POLLWRNORM" },
+ XLAT(POLLWRNORM),
# endif
# ifdef POLLRDBAND
- { POLLRDBAND, "POLLRDBAND" },
+ XLAT(POLLRDBAND),
# endif
# ifdef POLLWRBAND
- { POLLWRBAND, "POLLWRBAND" },
+ XLAT(POLLWRBAND),
# endif
- { POLLERR, "POLLERR" },
- { POLLHUP, "POLLHUP" },
- { POLLNVAL, "POLLNVAL" },
+ XLAT(POLLERR),
+ XLAT(POLLHUP),
+ XLAT(POLLNVAL),
# endif
- { 0, NULL },
+ XLAT_END
};
static int
@@ -422,7 +421,8 @@
if (entering(tcp)) {
print_timespec(tcp, tcp->u_arg[2]);
tprints(", ");
- print_sigset(tcp, tcp->u_arg[3], 0);
+ /* NB: kernel requires arg[4] == NSIG / 8 */
+ print_sigset_addr_len(tcp, tcp->u_arg[3], tcp->u_arg[4]);
tprintf(", %lu", tcp->u_arg[4]);
}
return rc;
diff --git a/syscall.c b/syscall.c
index 7efee0e..a0cc312 100644
--- a/syscall.c
+++ b/syscall.c
@@ -37,9 +37,6 @@
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
-# ifndef PTRACE_PEEKUSR
-# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-# endif
#elif defined(HAVE_LINUX_PTRACE_H)
# undef PTRACE_SYSCALL
# ifdef HAVE_STRUCT_IA64_FPREG
@@ -48,7 +45,11 @@
# ifdef HAVE_STRUCT_PT_ALL_USER_REGS
# define pt_all_user_regs XXX_pt_all_user_regs
# endif
+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
+# endif
# include <linux/ptrace.h>
+# undef ptrace_peeksiginfo_args
# undef ia64_fpreg
# undef pt_all_user_regs
#endif
@@ -80,28 +81,10 @@
# include <asm/ptrace.h>
#endif
-#ifndef ERESTARTSYS
-# define ERESTARTSYS 512
-#endif
-#ifndef ERESTARTNOINTR
-# define ERESTARTNOINTR 513
-#endif
-#ifndef ERESTARTNOHAND
-# define ERESTARTNOHAND 514 /* restart if no handler */
-#endif
-#ifndef ERESTART_RESTARTBLOCK
-# define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */
-#endif
-
#ifndef NSIG
# warning: NSIG is not defined, using 32
# define NSIG 32
#endif
-#ifdef ARM
-/* Ugh. Is this really correct? ARM has no RT signals?! */
-# undef NSIG
-# define NSIG 32
-#endif
#include "syscall.h"
@@ -683,10 +666,10 @@
# if defined(SPARC) || defined(SPARC64)
val = sparc_regs.u_regs[U_REG_O1];
# elif defined(SH)
- if (upeek(tcp, 4*(REG_REG0+1), &val) < 0)
+ if (upeek(tcp->pid, 4*(REG_REG0+1), &val) < 0)
return -1;
# elif defined(IA64)
- if (upeek(tcp, PT_R9, &val) < 0)
+ if (upeek(tcp->pid, PT_R9, &val) < 0)
return -1;
# endif
@@ -694,23 +677,10 @@
}
#endif
-int
-is_restart_error(struct tcb *tcp)
-{
- switch (tcp->u_error) {
- case ERESTARTSYS:
- case ERESTARTNOINTR:
- case ERESTARTNOHAND:
- case ERESTART_RESTARTBLOCK:
- return 1;
- default:
- break;
- }
- return 0;
-}
-
#if defined(I386)
-struct user_regs_struct i386_regs;
+static struct user_regs_struct i386_regs;
+/* Cast suppresses signedness warning (.esp is long, not unsigned long) */
+uint32_t *const i386_esp_ptr = (uint32_t*)&i386_regs.esp;
# define ARCH_REGS_FOR_GETREGSET i386_regs
#elif defined(X86_64) || defined(X32)
/*
@@ -744,14 +714,15 @@
} x86_regs_union;
# define x86_64_regs x86_regs_union.x86_64_r
# define i386_regs x86_regs_union.i386_r
+uint32_t *const i386_esp_ptr = &i386_regs.esp;
static struct iovec x86_io = {
.iov_base = &x86_regs_union
};
#elif defined(IA64)
-long ia32 = 0; /* not static */
+bool ia64_ia32mode = 0; /* not static */
static long ia64_r8, ia64_r10;
#elif defined(POWERPC)
-static long ppc_result;
+struct pt_regs ppc_regs;
#elif defined(M68K)
static long m68k_d0;
#elif defined(BFIN)
@@ -783,8 +754,7 @@
static long mips_a3;
static long mips_r2;
#elif defined(S390) || defined(S390X)
-static long gpr2;
-static long syscall_mode;
+static long s390_gpr2;
#elif defined(HPPA)
static long hppa_r28;
#elif defined(SH)
@@ -805,10 +775,13 @@
# define ARCH_REGS_FOR_GETREGSET metag_regs
#elif defined(XTENSA)
static long xtensa_a2;
+# elif defined(ARC)
+static struct user_regs_struct arc_regs;
+# define ARCH_REGS_FOR_GETREGSET arc_regs
#endif
void
-printcall(struct tcb *tcp)
+print_pc(struct tcb *tcp)
{
#define PRINTBADPC tprintf(sizeof(long) == 4 ? "[????????] " : \
sizeof(long) == 8 ? "[????????????????] " : \
@@ -821,7 +794,7 @@
tprintf("[%08lx] ", i386_regs.eip);
#elif defined(S390) || defined(S390X)
long psw;
- if (upeek(tcp, PT_PSWADDR, &psw) < 0) {
+ if (upeek(tcp->pid, PT_PSWADDR, &psw) < 0) {
PRINTBADPC;
return;
}
@@ -843,17 +816,13 @@
}
#elif defined(IA64)
long ip;
- if (upeek(tcp, PT_B0, &ip) < 0) {
+ if (upeek(tcp->pid, PT_B0, &ip) < 0) {
PRINTBADPC;
return;
}
tprintf("[%08lx] ", ip);
#elif defined(POWERPC)
- long pc;
- if (upeek(tcp, sizeof(unsigned long)*PT_NIP, &pc) < 0) {
- PRINTBADPC;
- return;
- }
+ long pc = ppc_regs.nip;
# ifdef POWERPC64
tprintf("[%016lx] ", pc);
# else
@@ -861,14 +830,14 @@
# endif
#elif defined(M68K)
long pc;
- if (upeek(tcp, 4*PT_PC, &pc) < 0) {
+ if (upeek(tcp->pid, 4*PT_PC, &pc) < 0) {
tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
#elif defined(ALPHA)
long pc;
- if (upeek(tcp, REG_PC, &pc) < 0) {
+ if (upeek(tcp->pid, REG_PC, &pc) < 0) {
tprints("[????????????????] ");
return;
}
@@ -879,28 +848,28 @@
tprintf("[%08lx] ", sparc_regs.tpc);
#elif defined(HPPA)
long pc;
- if (upeek(tcp, PT_IAOQ0, &pc) < 0) {
+ if (upeek(tcp->pid, PT_IAOQ0, &pc) < 0) {
tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
#elif defined(MIPS)
long pc;
- if (upeek(tcp, REG_EPC, &pc) < 0) {
+ if (upeek(tcp->pid, REG_EPC, &pc) < 0) {
tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
#elif defined(SH)
long pc;
- if (upeek(tcp, 4*REG_PC, &pc) < 0) {
+ if (upeek(tcp->pid, 4*REG_PC, &pc) < 0) {
tprints("[????????] ");
return;
}
tprintf("[%08lx] ", pc);
#elif defined(SH64)
long pc;
- if (upeek(tcp, REG_PC, &pc) < 0) {
+ if (upeek(tcp->pid, REG_PC, &pc) < 0) {
tprints("[????????????????] ");
return;
}
@@ -913,21 +882,21 @@
tprintf("[%08lx] ", avr32_regs.pc);
#elif defined(BFIN)
long pc;
- if (upeek(tcp, PT_PC, &pc) < 0) {
+ if (upeek(tcp->pid, PT_PC, &pc) < 0) {
PRINTBADPC;
return;
}
tprintf("[%08lx] ", pc);
#elif defined(CRISV10)
long pc;
- if (upeek(tcp, 4*PT_IRP, &pc) < 0) {
+ if (upeek(tcp->pid, 4*PT_IRP, &pc) < 0) {
PRINTBADPC;
return;
}
tprintf("[%08lx] ", pc);
#elif defined(CRISV32)
long pc;
- if (upeek(tcp, 4*PT_ERP, &pc) < 0) {
+ if (upeek(tcp->pid, 4*PT_ERP, &pc) < 0) {
PRINTBADPC;
return;
}
@@ -944,11 +913,13 @@
tprintf("[%08lx] ", metag_regs.pc);
#elif defined(XTENSA)
long pc;
- if (upeek(tcp, REG_PC, &pc) < 0) {
+ if (upeek(tcp->pid, REG_PC, &pc) < 0) {
PRINTBADPC;
return;
}
tprintf("[%08lx] ", pc);
+#elif defined(ARC)
+ tprintf("[%08lx] ", arc_regs.efa);
#endif /* architecture */
}
@@ -997,6 +968,43 @@
return buf;
}
+#ifdef POWERPC
+/*
+ * PTRACE_GETREGS was added to the PowerPC kernel in v2.6.23,
+ * we provide a slow fallback for old kernels.
+ */
+static int powerpc_getregs_old(pid_t pid)
+{
+ int i;
+ long r;
+
+ if (iflag) {
+ r = upeek(pid, sizeof(long) * PT_NIP, (long *)&ppc_regs.nip);
+ if (r)
+ goto out;
+ }
+#ifdef POWERPC64 /* else we never use it */
+ r = upeek(pid, sizeof(long) * PT_MSR, (long *)&ppc_regs.msr);
+ if (r)
+ goto out;
+#endif
+ r = upeek(pid, sizeof(long) * PT_CCR, (long *)&ppc_regs.ccr);
+ if (r)
+ goto out;
+ r = upeek(pid, sizeof(long) * PT_ORIG_R3, (long *)&ppc_regs.orig_gpr3);
+ if (r)
+ goto out;
+ for (i = 0; i <= 8; i++) {
+ r = upeek(pid, sizeof(long) * (PT_R0 + i),
+ (long *)&ppc_regs.gpr[i]);
+ if (r)
+ goto out;
+ }
+ out:
+ return r;
+}
+#endif
+
#ifndef get_regs
long get_regs_error;
@@ -1007,7 +1015,8 @@
# if defined(ARM) \
|| defined(I386) \
|| defined(METAG) \
- || defined(OR1K)
+ || defined(OR1K) \
+ || defined(ARC)
static struct iovec io = {
.iov_base = &ARCH_REGS_FOR_GETREGSET,
.iov_len = sizeof(ARCH_REGS_FOR_GETREGSET)
@@ -1033,7 +1042,7 @@
get_regs(pid_t pid)
{
/* PTRACE_GETREGSET only */
-# if defined(METAG) || defined(OR1K) || defined(X32) || defined(AARCH64)
+# if defined(METAG) || defined(OR1K) || defined(X32) || defined(AARCH64) || defined(ARC)
get_regset(pid);
/* PTRACE_GETREGS only */
@@ -1043,6 +1052,16 @@
get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &tile_regs);
# elif defined(SPARC) || defined(SPARC64)
get_regs_error = ptrace(PTRACE_GETREGS, pid, (char *)&sparc_regs, 0);
+# elif defined(POWERPC)
+ static bool old_kernel = 0;
+ if (old_kernel)
+ goto old;
+ get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, (long) &ppc_regs);
+ if (get_regs_error && errno == EIO) {
+ old_kernel = 1;
+ old:
+ get_regs_error = powerpc_getregs_old(pid);
+ }
/* try PTRACE_GETREGSET first, fallback to PTRACE_GETREGS */
# else
@@ -1113,14 +1132,14 @@
long scno = 0;
#if defined(S390) || defined(S390X)
- if (upeek(tcp, PT_GPR2, &syscall_mode) < 0)
+ if (upeek(tcp->pid, PT_GPR2, &s390_gpr2) < 0)
return -1;
- if (syscall_mode != -ENOSYS) {
+ if (s390_gpr2 != -ENOSYS) {
/*
* Since kernel version 2.5.44 the scno gets passed in gpr2.
*/
- scno = syscall_mode;
+ scno = s390_gpr2;
} else {
/*
* Old style of "passing" the scno via the SVC instruction.
@@ -1135,7 +1154,7 @@
PT_GPR12, PT_GPR13, PT_GPR14, PT_GPR15
};
- if (upeek(tcp, PT_PSWADDR, &psw) < 0)
+ if (upeek(tcp->pid, PT_PSWADDR, &psw) < 0)
return -1;
errno = 0;
opcode = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)(psw - sizeof(long)), 0);
@@ -1168,13 +1187,13 @@
tmp = 0;
offset_reg = (opcode & 0x000f0000) >> 16;
- if (offset_reg && (upeek(tcp, gpr_offset[offset_reg], &tmp) < 0))
+ if (offset_reg && (upeek(tcp->pid, gpr_offset[offset_reg], &tmp) < 0))
return -1;
svc_addr += tmp;
tmp = 0;
offset_reg = (opcode & 0x0000f000) >> 12;
- if (offset_reg && (upeek(tcp, gpr_offset[offset_reg], &tmp) < 0))
+ if (offset_reg && (upeek(tcp->pid, gpr_offset[offset_reg], &tmp) < 0))
return -1;
svc_addr += tmp;
@@ -1188,36 +1207,30 @@
# endif
tmp = 0;
offset_reg = (opcode & 0x00f00000) >> 20;
- if (offset_reg && (upeek(tcp, gpr_offset[offset_reg], &tmp) < 0))
+ if (offset_reg && (upeek(tcp->pid, gpr_offset[offset_reg], &tmp) < 0))
return -1;
scno = (scno | tmp) & 0xff;
}
}
#elif defined(POWERPC)
- if (upeek(tcp, sizeof(unsigned long)*PT_R0, &scno) < 0)
- return -1;
+ scno = ppc_regs.gpr[0];
# ifdef POWERPC64
- /* TODO: speed up strace by not doing this at every syscall.
- * We only need to do it after execve.
- */
int currpers;
- long val;
- /* Check for 64/32 bit mode. */
- if (upeek(tcp, sizeof(unsigned long)*PT_MSR, &val) < 0)
- return -1;
- /* SF is bit 0 of MSR */
- if (val < 0)
- currpers = 0;
- else
- currpers = 1;
+ /*
+ * Check for 64/32 bit mode.
+ * Embedded implementations covered by Book E extension of PPC use
+ * bit 0 (CM) of 32-bit Machine state register (MSR).
+ * Other implementations use bit 0 (SF) of 64-bit MSR.
+ */
+ currpers = (ppc_regs.msr & 0x8000000080000000) ? 0 : 1;
update_personality(tcp, currpers);
# endif
#elif defined(AVR32)
scno = avr32_regs.r8;
#elif defined(BFIN)
- if (upeek(tcp, PT_ORIG_P0, &scno))
+ if (upeek(tcp->pid, PT_ORIG_P0, &scno))
return -1;
#elif defined(I386)
scno = i386_regs.orig_eax;
@@ -1314,13 +1327,13 @@
#elif defined(IA64)
# define IA64_PSR_IS ((long)1 << 34)
long psr;
- if (upeek(tcp, PT_CR_IPSR, &psr) >= 0)
- ia32 = (psr & IA64_PSR_IS) != 0;
- if (ia32) {
- if (upeek(tcp, PT_R1, &scno) < 0)
+ if (upeek(tcp->pid, PT_CR_IPSR, &psr) >= 0)
+ ia64_ia32mode = ((psr & IA64_PSR_IS) != 0);
+ if (ia64_ia32mode) {
+ if (upeek(tcp->pid, PT_R1, &scno) < 0)
return -1;
} else {
- if (upeek(tcp, PT_R15, &scno) < 0)
+ if (upeek(tcp->pid, PT_R15, &scno) < 0)
return -1;
}
#elif defined(AARCH64)
@@ -1332,6 +1345,7 @@
break;
case sizeof(arm_regs):
/* We are in 32-bit mode */
+ /* Note: we don't support OABI, unlike 32-bit ARM build */
scno = arm_regs.ARM_r7;
update_personality(tcp, 0);
break;
@@ -1345,33 +1359,37 @@
}
/* Note: we support only 32-bit CPUs, not 26-bit */
- if (arm_regs.ARM_cpsr & 0x20) {
+# ifndef STRACE_KNOWS_ONLY_EABI
+# warning STRACE_KNOWS_ONLY_EABI not set, will PTRACE_PEEKTEXT on every syscall (slower tracing)
+ if (arm_regs.ARM_cpsr & 0x20)
/* Thumb mode */
- scno = arm_regs.ARM_r7;
- } else {
- /* ARM mode */
- errno = 0;
- scno = ptrace(PTRACE_PEEKTEXT, tcp->pid, (void *)(arm_regs.ARM_pc - 4), NULL);
- if (errno)
+ goto scno_in_r7;
+ /* ARM mode */
+ /* Check EABI/OABI by examining SVC insn's low 24 bits */
+ errno = 0;
+ scno = ptrace(PTRACE_PEEKTEXT, tcp->pid, (void *)(arm_regs.ARM_pc - 4), NULL);
+ if (errno)
+ return -1;
+ /* EABI syscall convention? */
+ if (scno != 0xef000000) {
+ /* No, it's OABI */
+ if ((scno & 0x0ff00000) != 0x0f900000) {
+ fprintf(stderr, "pid %d unknown syscall trap 0x%08lx\n",
+ tcp->pid, scno);
return -1;
-
- /* EABI syscall convention? */
- if (scno == 0xef000000) {
- scno = arm_regs.ARM_r7; /* yes */
- } else {
- if ((scno & 0x0ff00000) != 0x0f900000) {
- fprintf(stderr, "pid %d unknown syscall trap 0x%08lx\n",
- tcp->pid, scno);
- return -1;
- }
- /* Fixup the syscall number */
- scno &= 0x000fffff;
}
+ /* Fixup the syscall number */
+ scno &= 0x000fffff;
+ } else {
+ scno_in_r7:
+ scno = arm_regs.ARM_r7;
}
-
+# else
+ scno = arm_regs.ARM_r7;
+# endif
scno = shuffle_scno(scno);
#elif defined(M68K)
- if (upeek(tcp, 4*PT_ORIG_D0, &scno) < 0)
+ if (upeek(tcp->pid, 4*PT_ORIG_D0, &scno) < 0)
return -1;
#elif defined(LINUX_MIPSN32)
unsigned long long regs[38];
@@ -1390,9 +1408,9 @@
}
}
#elif defined(MIPS)
- if (upeek(tcp, REG_A3, &mips_a3) < 0)
+ if (upeek(tcp->pid, REG_A3, &mips_a3) < 0)
return -1;
- if (upeek(tcp, REG_V0, &scno) < 0)
+ if (upeek(tcp->pid, REG_V0, &scno) < 0)
return -1;
if (!SCNO_IN_RANGE(scno)) {
@@ -1403,9 +1421,9 @@
}
}
#elif defined(ALPHA)
- if (upeek(tcp, REG_A3, &alpha_a3) < 0)
+ if (upeek(tcp->pid, REG_A3, &alpha_a3) < 0)
return -1;
- if (upeek(tcp, REG_R0, &scno) < 0)
+ if (upeek(tcp->pid, REG_R0, &scno) < 0)
return -1;
/*
@@ -1478,13 +1496,13 @@
memmove(&sparc_regs.u_regs[U_REG_O0], &sparc_regs.u_regs[U_REG_O1], 7*sizeof(sparc_regs.u_regs[0]));
}
#elif defined(HPPA)
- if (upeek(tcp, PT_GR20, &scno) < 0)
+ if (upeek(tcp->pid, PT_GR20, &scno) < 0)
return -1;
#elif defined(SH)
/*
* In the new syscall ABI, the system call number is in R3.
*/
- if (upeek(tcp, 4*(REG_REG0+3), &scno) < 0)
+ if (upeek(tcp->pid, 4*(REG_REG0+3), &scno) < 0)
return -1;
if (scno < 0) {
@@ -1501,11 +1519,11 @@
scno = correct_scno;
}
#elif defined(SH64)
- if (upeek(tcp, REG_SYSCALL, &scno) < 0)
+ if (upeek(tcp->pid, REG_SYSCALL, &scno) < 0)
return -1;
scno &= 0xFFFF;
#elif defined(CRISV10) || defined(CRISV32)
- if (upeek(tcp, 4*PT_R9, &scno) < 0)
+ if (upeek(tcp->pid, 4*PT_R9, &scno) < 0)
return -1;
#elif defined(TILE)
int currpers;
@@ -1523,15 +1541,17 @@
# endif
update_personality(tcp, currpers);
#elif defined(MICROBLAZE)
- if (upeek(tcp, 0, &scno) < 0)
+ if (upeek(tcp->pid, 0, &scno) < 0)
return -1;
#elif defined(OR1K)
scno = or1k_regs.gpr[11];
#elif defined(METAG)
scno = metag_regs.dx[0][1]; /* syscall number in D1Re0 (D1.0) */
#elif defined(XTENSA)
- if (upeek(tcp, SYSCALL_NR, &scno) < 0)
+ if (upeek(tcp->pid, SYSCALL_NR, &scno) < 0)
return -1;
+# elif defined(ARC)
+ scno = arc_regs.scratch.r8;
#endif
tcp->scno = scno;
@@ -1584,23 +1604,9 @@
return 0;
}
}
-#elif defined(S390) || defined(S390X)
- /* TODO: we already fetched PT_GPR2 in get_scno
- * and stored it in syscall_mode, reuse it here
- * instead of re-fetching?
- */
- if (upeek(tcp, PT_GPR2, &gpr2) < 0)
- return -1;
- if (syscall_mode != -ENOSYS)
- syscall_mode = tcp->scno;
- if (gpr2 != syscall_mode) {
- if (debug_flag)
- fprintf(stderr, "not a syscall entry (gpr2 = %ld)\n", gpr2);
- return 0;
- }
#elif defined(M68K)
/* TODO? Eliminate upeek's in arches below like we did in x86 */
- if (upeek(tcp, 4*PT_D0, &m68k_d0) < 0)
+ if (upeek(tcp->pid, 4*PT_D0, &m68k_d0) < 0)
return -1;
if (m68k_d0 != -ENOSYS) {
if (debug_flag)
@@ -1608,17 +1614,17 @@
return 0;
}
#elif defined(IA64)
- if (upeek(tcp, PT_R10, &ia64_r10) < 0)
+ if (upeek(tcp->pid, PT_R10, &ia64_r10) < 0)
return -1;
- if (upeek(tcp, PT_R8, &ia64_r8) < 0)
+ if (upeek(tcp->pid, PT_R8, &ia64_r8) < 0)
return -1;
- if (ia32 && ia64_r8 != -ENOSYS) {
+ if (ia64_ia32mode && ia64_r8 != -ENOSYS) {
if (debug_flag)
fprintf(stderr, "not a syscall entry (r8 = %ld)\n", ia64_r8);
return 0;
}
#elif defined(CRISV10) || defined(CRISV32)
- if (upeek(tcp, 4*PT_R10, &cris_r10) < 0)
+ if (upeek(tcp->pid, 4*PT_R10, &cris_r10) < 0)
return -1;
if (cris_r10 != -ENOSYS) {
if (debug_flag)
@@ -1626,7 +1632,7 @@
return 0;
}
#elif defined(MICROBLAZE)
- if (upeek(tcp, 3 * 4, µblaze_r3) < 0)
+ if (upeek(tcp->pid, 3 * 4, µblaze_r3) < 0)
return -1;
if (microblaze_r3 != -ENOSYS) {
if (debug_flag)
@@ -1731,14 +1737,14 @@
#if defined(S390) || defined(S390X)
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, i==0 ? PT_ORIGGPR2 : PT_GPR2 + i*sizeof(long), &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, i==0 ? PT_ORIGGPR2 : PT_GPR2 + i*sizeof(long), &tcp->u_arg[i]) < 0)
return -1;
#elif defined(ALPHA)
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, REG_A0+i, &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, REG_A0+i, &tcp->u_arg[i]) < 0)
return -1;
#elif defined(IA64)
- if (!ia32) {
+ if (!ia64_ia32mode) {
unsigned long *out0, cfm, sof, sol;
long rbs_end;
/* be backwards compatible with kernel < 2.4.4... */
@@ -1746,9 +1752,9 @@
# define PT_RBS_END PT_AR_BSP
# endif
- if (upeek(tcp, PT_RBS_END, &rbs_end) < 0)
+ if (upeek(tcp->pid, PT_RBS_END, &rbs_end) < 0)
return -1;
- if (upeek(tcp, PT_CFM, (long *) &cfm) < 0)
+ if (upeek(tcp->pid, PT_CFM, (long *) &cfm) < 0)
return -1;
sof = (cfm >> 0) & 0x7f;
@@ -1769,7 +1775,7 @@
PT_R13 /* EBP = out5 */};
for (i = 0; i < nargs; ++i) {
- if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, argreg[i], &tcp->u_arg[i]) < 0)
return -1;
/* truncate away IVE sign-extension */
tcp->u_arg[i] &= 0xffffffff;
@@ -1792,35 +1798,33 @@
if (nargs > 4) {
long sp;
- if (upeek(tcp, REG_SP, &sp) < 0)
+ if (upeek(tcp->pid, REG_SP, &sp) < 0)
return -1;
for (i = 0; i < 4; ++i)
- if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, REG_A0 + i, &tcp->u_arg[i]) < 0)
return -1;
umoven(tcp, sp + 16, (nargs - 4) * sizeof(tcp->u_arg[0]),
(char *)(tcp->u_arg + 4));
} else {
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, REG_A0 + i, &tcp->u_arg[i]) < 0)
return -1;
}
#elif defined(POWERPC)
-# ifndef PT_ORIG_R3
-# define PT_ORIG_R3 34
-# endif
- for (i = 0; i < nargs; ++i) {
- if (upeek(tcp, (i==0) ?
- (sizeof(unsigned long) * PT_ORIG_R3) :
- ((i+PT_R3) * sizeof(unsigned long)),
- &tcp->u_arg[i]) < 0)
- return -1;
- }
+ (void)i;
+ (void)nargs;
+ tcp->u_arg[0] = ppc_regs.orig_gpr3;
+ tcp->u_arg[1] = ppc_regs.gpr[4];
+ tcp->u_arg[2] = ppc_regs.gpr[5];
+ tcp->u_arg[3] = ppc_regs.gpr[6];
+ tcp->u_arg[4] = ppc_regs.gpr[7];
+ tcp->u_arg[5] = ppc_regs.gpr[8];
#elif defined(SPARC) || defined(SPARC64)
for (i = 0; i < nargs; ++i)
tcp->u_arg[i] = sparc_regs.u_regs[U_REG_O0 + i];
#elif defined(HPPA)
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
return -1;
#elif defined(ARM) || defined(AARCH64)
# if defined(AARCH64)
@@ -1844,7 +1848,7 @@
static const int argreg[MAX_ARGS] = { PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5 };
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, argreg[i], &tcp->u_arg[i]) < 0)
return -1;
#elif defined(SH)
static const int syscall_regs[MAX_ARGS] = {
@@ -1853,7 +1857,7 @@
};
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, syscall_regs[i], &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, syscall_regs[i], &tcp->u_arg[i]) < 0)
return -1;
#elif defined(SH64)
int i;
@@ -1861,7 +1865,7 @@
static const int syscall_regs[MAX_ARGS] = { 2, 3, 4, 5, 6, 7 };
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, REG_GENERAL(syscall_regs[i]), &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, REG_GENERAL(syscall_regs[i]), &tcp->u_arg[i]) < 0)
return -1;
#elif defined(I386)
(void)i;
@@ -1906,7 +1910,7 @@
}
#elif defined(MICROBLAZE)
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, (5 + i) * 4, &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, (5 + i) * 4, &tcp->u_arg[i]) < 0)
return -1;
#elif defined(CRISV10) || defined(CRISV32)
static const int crisregs[MAX_ARGS] = {
@@ -1915,14 +1919,14 @@
};
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, crisregs[i], &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, crisregs[i], &tcp->u_arg[i]) < 0)
return -1;
#elif defined(TILE)
for (i = 0; i < nargs; ++i)
tcp->u_arg[i] = tile_regs.regs[i];
#elif defined(M68K)
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0)
return -1;
#elif defined(OR1K)
(void)nargs;
@@ -1936,11 +1940,16 @@
/* arg0: a6, arg1: a3, arg2: a4, arg3: a5, arg4: a8, arg5: a9 */
static const int xtensaregs[MAX_ARGS] = { 6, 3, 4, 5, 8, 9 };
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, REG_A_BASE + xtensaregs[i], &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, REG_A_BASE + xtensaregs[i], &tcp->u_arg[i]) < 0)
return -1;
+# elif defined(ARC)
+ long *arc_args = &arc_regs.scratch.r0;
+ for (i = 0; i < nargs; ++i)
+ tcp->u_arg[i] = *arc_args--;
+
#else /* Other architecture (32bits specific) */
for (i = 0; i < nargs; ++i)
- if (upeek(tcp, i*4, &tcp->u_arg[i]) < 0)
+ if (upeek(tcp->pid, i*4, &tcp->u_arg[i]) < 0)
return -1;
#endif
return 1;
@@ -2056,23 +2065,14 @@
get_syscall_result(struct tcb *tcp)
{
#if defined(S390) || defined(S390X)
- if (upeek(tcp, PT_GPR2, &gpr2) < 0)
+ if (upeek(tcp->pid, PT_GPR2, &s390_gpr2) < 0)
return -1;
#elif defined(POWERPC)
-# define SO_MASK 0x10000000
- {
- long flags;
- if (upeek(tcp, sizeof(unsigned long)*PT_CCR, &flags) < 0)
- return -1;
- if (upeek(tcp, sizeof(unsigned long)*PT_R3, &ppc_result) < 0)
- return -1;
- if (flags & SO_MASK)
- ppc_result = -ppc_result;
- }
+ /* already done by get_regs */
#elif defined(AVR32)
/* already done by get_regs */
#elif defined(BFIN)
- if (upeek(tcp, PT_R0, &bfin_r0) < 0)
+ if (upeek(tcp->pid, PT_R0, &bfin_r0) < 0)
return -1;
#elif defined(I386)
/* already done by get_regs */
@@ -2081,11 +2081,11 @@
#elif defined(IA64)
# define IA64_PSR_IS ((long)1 << 34)
long psr;
- if (upeek(tcp, PT_CR_IPSR, &psr) >= 0)
- ia32 = (psr & IA64_PSR_IS) != 0;
- if (upeek(tcp, PT_R8, &ia64_r8) < 0)
+ if (upeek(tcp->pid, PT_CR_IPSR, &psr) >= 0)
+ ia64_ia32mode = ((psr & IA64_PSR_IS) != 0);
+ if (upeek(tcp->pid, PT_R8, &ia64_r8) < 0)
return -1;
- if (upeek(tcp, PT_R10, &ia64_r10) < 0)
+ if (upeek(tcp->pid, PT_R10, &ia64_r10) < 0)
return -1;
#elif defined(ARM)
/* already done by get_regs */
@@ -2098,7 +2098,7 @@
*/
/*update_personality(tcp, aarch64_io.iov_len == sizeof(aarch64_regs));*/
#elif defined(M68K)
- if (upeek(tcp, 4*PT_D0, &m68k_d0) < 0)
+ if (upeek(tcp->pid, 4*PT_D0, &m68k_d0) < 0)
return -1;
#elif defined(LINUX_MIPSN32)
unsigned long long regs[38];
@@ -2108,43 +2108,45 @@
mips_a3 = regs[REG_A3];
mips_r2 = regs[REG_V0];
#elif defined(MIPS)
- if (upeek(tcp, REG_A3, &mips_a3) < 0)
+ if (upeek(tcp->pid, REG_A3, &mips_a3) < 0)
return -1;
- if (upeek(tcp, REG_V0, &mips_r2) < 0)
+ if (upeek(tcp->pid, REG_V0, &mips_r2) < 0)
return -1;
#elif defined(ALPHA)
- if (upeek(tcp, REG_A3, &alpha_a3) < 0)
+ if (upeek(tcp->pid, REG_A3, &alpha_a3) < 0)
return -1;
- if (upeek(tcp, REG_R0, &alpha_r0) < 0)
+ if (upeek(tcp->pid, REG_R0, &alpha_r0) < 0)
return -1;
#elif defined(SPARC) || defined(SPARC64)
/* already done by get_regs */
#elif defined(HPPA)
- if (upeek(tcp, PT_GR28, &hppa_r28) < 0)
+ if (upeek(tcp->pid, PT_GR28, &hppa_r28) < 0)
return -1;
#elif defined(SH)
/* new syscall ABI returns result in R0 */
- if (upeek(tcp, 4*REG_REG0, (long *)&sh_r0) < 0)
+ if (upeek(tcp->pid, 4*REG_REG0, (long *)&sh_r0) < 0)
return -1;
#elif defined(SH64)
/* ABI defines result returned in r9 */
- if (upeek(tcp, REG_GENERAL(9), (long *)&sh64_r9) < 0)
+ if (upeek(tcp->pid, REG_GENERAL(9), (long *)&sh64_r9) < 0)
return -1;
#elif defined(CRISV10) || defined(CRISV32)
- if (upeek(tcp, 4*PT_R10, &cris_r10) < 0)
+ if (upeek(tcp->pid, 4*PT_R10, &cris_r10) < 0)
return -1;
#elif defined(TILE)
/* already done by get_regs */
#elif defined(MICROBLAZE)
- if (upeek(tcp, 3 * 4, µblaze_r3) < 0)
+ if (upeek(tcp->pid, 3 * 4, µblaze_r3) < 0)
return -1;
#elif defined(OR1K)
/* already done by get_regs */
#elif defined(METAG)
/* already done by get_regs */
#elif defined(XTENSA)
- if (upeek(tcp, REG_A_BASE + 2, &xtensa_a2) < 0)
+ if (upeek(tcp->pid, REG_A_BASE + 2, &xtensa_a2) < 0)
return -1;
+#elif defined(ARC)
+ /* already done by get_regs */
#endif
return 1;
}
@@ -2154,16 +2156,14 @@
syscall_fixup_on_sysexit(struct tcb *tcp)
{
#if defined(S390) || defined(S390X)
- if (syscall_mode != -ENOSYS)
- syscall_mode = tcp->scno;
if ((tcp->flags & TCB_WAITEXECVE)
- && (gpr2 == -ENOSYS || gpr2 == tcp->scno)) {
+ && (s390_gpr2 == -ENOSYS || s390_gpr2 == tcp->scno)) {
/*
* Return from execve.
* Fake a return value of zero. We leave the TCB_WAITEXECVE
* flag set for the post-execve SIGTRAP to see and reset.
*/
- gpr2 = 0;
+ s390_gpr2 = 0;
}
#endif
}
@@ -2217,12 +2217,12 @@
check_errno = 0;
}
#if defined(S390) || defined(S390X)
- if (check_errno && is_negated_errno(gpr2)) {
+ if (check_errno && is_negated_errno(s390_gpr2)) {
tcp->u_rval = -1;
- u_error = -gpr2;
+ u_error = -s390_gpr2;
}
else {
- tcp->u_rval = gpr2;
+ tcp->u_rval = s390_gpr2;
}
#elif defined(I386)
if (check_errno && is_negated_errno(i386_regs.eax)) {
@@ -2268,7 +2268,7 @@
tcp->u_lrval = rax;
}
#elif defined(IA64)
- if (ia32) {
+ if (ia64_ia32mode) {
int err;
err = (int)ia64_r8;
@@ -2298,12 +2298,12 @@
# endif
}
#elif defined(POWERPC)
- if (check_errno && is_negated_errno(ppc_result)) {
+ if (check_errno && (ppc_regs.ccr & 0x10000000)) {
tcp->u_rval = -1;
- u_error = -ppc_result;
+ u_error = ppc_regs.gpr[3];
}
else {
- tcp->u_rval = ppc_result;
+ tcp->u_rval = ppc_regs.gpr[3];
}
#elif defined(M68K)
if (check_errno && is_negated_errno(m68k_d0)) {
@@ -2452,6 +2452,14 @@
else {
tcp->u_rval = xtensa_a2;
}
+#elif defined(ARC)
+ if (check_errno && is_negated_errno(arc_regs.scratch.r0)) {
+ tcp->u_rval = -1;
+ u_error = -arc_regs.scratch.r0;
+ }
+ else {
+ tcp->u_rval = arc_regs.scratch.r0;
+ }
#endif
tcp->u_error = u_error;
}
diff --git a/syscallent.sh b/syscallent.sh
new file mode 100755
index 0000000..16dd77f
--- /dev/null
+++ b/syscallent.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+# Copyright (c) 1993, 1994, 1995, 1996 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.
+
+cat ${1+"$@"} |
+ sed -n 's/^#[ ]*define[ ][ ]*SYS_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p
+s/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p
+s/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[^0-9()]*(__NR_Linux + \([0-9]*\))$/\1 \2/p' |
+ sort -k2n | uniq |
+ awk '
+ BEGIN {
+ tabs = "\t\t\t\t\t\t\t\t"
+ call = -1;
+ }
+ {
+ while (++call < $2) {
+ f = "printargs"
+ n = "SYS_" call
+ s = "\t{ MA,\t0,\t"
+ s = s f ","
+ s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
+ s = s "\"" n "\""
+ s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
+ s = s "}, /* " call " */"
+ print s
+ }
+ f = "sys_" $1
+ n = $1
+ s = "\t{ MA,\t0,\t"
+ s = s f ","
+ s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
+ s = s "\"" n "\""
+ s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
+ s = s "}, /* " call " */"
+ print s
+ }
+ END {
+ limit = call + 100
+ while (++call < limit) {
+ f = "printargs"
+ n = "SYS_" call
+ s = "\t{ MA,\t0,\t"
+ s = s f ","
+ s = s substr(tabs, 1, 24/8 - int((length(f) + 1)/8))
+ s = s "\"" n "\""
+ s = s substr(tabs, 1, 16/8 - int((length(n) + 2)/8))
+ s = s "}, /* " call " */"
+ print s
+ }
+ }
+ '
diff --git a/system.c b/system.c
index 26d0d7f..604988b 100644
--- a/system.c
+++ b/system.c
@@ -79,36 +79,37 @@
# include <asm/sysmips.h>
#endif
#include <linux/sysctl.h>
+#include <linux/personality.h>
static const struct xlat mount_flags[] = {
- { MS_MGC_VAL, "MS_MGC_VAL" },
- { MS_RDONLY, "MS_RDONLY" },
- { MS_NOSUID, "MS_NOSUID" },
- { MS_NODEV, "MS_NODEV" },
- { MS_NOEXEC, "MS_NOEXEC" },
- { MS_SYNCHRONOUS,"MS_SYNCHRONOUS"},
- { MS_REMOUNT, "MS_REMOUNT" },
- { MS_RELATIME, "MS_RELATIME" },
- { MS_KERNMOUNT, "MS_KERNMOUNT" },
- { MS_I_VERSION, "MS_I_VERSION" },
- { MS_STRICTATIME,"MS_STRICTATIME"},
- { MS_NOSEC, "MS_NOSEC" },
- { MS_BORN, "MS_BORN" },
- { MS_MANDLOCK, "MS_MANDLOCK" },
- { MS_NOATIME, "MS_NOATIME" },
- { MS_NODIRATIME,"MS_NODIRATIME" },
- { MS_BIND, "MS_BIND" },
- { MS_MOVE, "MS_MOVE" },
- { MS_REC, "MS_REC" },
- { MS_SILENT, "MS_SILENT" },
- { MS_POSIXACL, "MS_POSIXACL" },
- { MS_UNBINDABLE,"MS_UNBINDABLE" },
- { MS_PRIVATE, "MS_PRIVATE" },
- { MS_SLAVE, "MS_SLAVE" },
- { MS_SHARED, "MS_SHARED" },
- { MS_ACTIVE, "MS_ACTIVE" },
- { MS_NOUSER, "MS_NOUSER" },
- { 0, NULL },
+ XLAT(MS_MGC_VAL),
+ XLAT(MS_RDONLY),
+ XLAT(MS_NOSUID),
+ XLAT(MS_NODEV),
+ XLAT(MS_NOEXEC),
+ XLAT(MS_SYNCHRONOUS),
+ XLAT(MS_REMOUNT),
+ XLAT(MS_RELATIME),
+ XLAT(MS_KERNMOUNT),
+ XLAT(MS_I_VERSION),
+ XLAT(MS_STRICTATIME),
+ XLAT(MS_NOSEC),
+ XLAT(MS_BORN),
+ XLAT(MS_MANDLOCK),
+ XLAT(MS_NOATIME),
+ XLAT(MS_NODIRATIME),
+ XLAT(MS_BIND),
+ XLAT(MS_MOVE),
+ XLAT(MS_REC),
+ XLAT(MS_SILENT),
+ XLAT(MS_POSIXACL),
+ XLAT(MS_UNBINDABLE),
+ XLAT(MS_PRIVATE),
+ XLAT(MS_SLAVE),
+ XLAT(MS_SHARED),
+ XLAT(MS_ACTIVE),
+ XLAT(MS_NOUSER),
+ XLAT_END
};
int
@@ -155,10 +156,10 @@
#define MNT_EXPIRE 0x00000004 /* Mark for expiry */
static const struct xlat umount_flags[] = {
- { MNT_FORCE, "MNT_FORCE" },
- { MNT_DETACH, "MNT_DETACH" },
- { MNT_EXPIRE, "MNT_EXPIRE" },
- { 0, NULL },
+ XLAT(MNT_FORCE),
+ XLAT(MNT_DETACH),
+ XLAT(MNT_EXPIRE),
+ XLAT_END
};
int
@@ -175,28 +176,29 @@
/* These are not macros, but enums. We just copy the values by hand
from Linux 2.6.9 here. */
static const struct xlat personality_options[] = {
- { 0, "PER_LINUX" },
- { 0x00800000, "PER_LINUX_32BIT"},
- { 0x04100001, "PER_SVR4" },
- { 0x05000002, "PER_SVR3" },
- { 0x07000003, "PER_SCOSVR3" },
- { 0x06000003, "PER_OSR5" },
- { 0x05000004, "PER_WYSEV386" },
- { 0x04000005, "PER_ISCR4" },
- { 0x00000006, "PER_BSD" },
- { 0x04000006, "PER_SUNOS" },
- { 0x05000007, "PER_XENIX" },
- { 0x00000008, "PER_LINUX32" },
- { 0x08000008, "PER_LINUX32_3GB"},
- { 0x04000009, "PER_IRIX32" },
- { 0x0400000a, "PER_IRIXN32" },
- { 0x0400000b, "PER_IRIX64" },
- { 0x0000000c, "PER_RISCOS" },
- { 0x0400000d, "PER_SOLARIS" },
- { 0x0410000e, "PER_UW7" },
- { 0x0000000f, "PER_OSF4" },
- { 0x00000010, "PER_HPUX" },
- { 0, NULL },
+ XLAT(PER_LINUX),
+ XLAT(PER_LINUX_32BIT),
+ XLAT(PER_LINUX_FDPIC),
+ XLAT(PER_SVR4),
+ XLAT(PER_SVR3),
+ XLAT(PER_SCOSVR3),
+ XLAT(PER_OSR5),
+ XLAT(PER_WYSEV386),
+ XLAT(PER_ISCR4),
+ XLAT(PER_BSD),
+ XLAT(PER_SUNOS),
+ XLAT(PER_XENIX),
+ XLAT(PER_LINUX32),
+ XLAT(PER_LINUX32_3GB),
+ XLAT(PER_IRIX32),
+ XLAT(PER_IRIXN32),
+ XLAT(PER_IRIX64),
+ XLAT(PER_RISCOS),
+ XLAT(PER_SOLARIS),
+ XLAT(PER_UW7),
+ XLAT(PER_OSF4),
+ XLAT(PER_HPUX),
+ XLAT_END
};
int
@@ -222,18 +224,18 @@
};
static const struct xlat syslog_action_type[] = {
- { SYSLOG_ACTION_CLOSE, "SYSLOG_ACTION_CLOSE" },
- { SYSLOG_ACTION_OPEN, "SYSLOG_ACTION_OPEN" },
- { SYSLOG_ACTION_READ, "SYSLOG_ACTION_READ" },
- { SYSLOG_ACTION_READ_ALL, "SYSLOG_ACTION_READ_ALL" },
- { SYSLOG_ACTION_READ_CLEAR, "SYSLOG_ACTION_READ_CLEAR" },
- { SYSLOG_ACTION_CLEAR, "SYSLOG_ACTION_CLEAR" },
- { SYSLOG_ACTION_CONSOLE_OFF, "SYSLOG_ACTION_CONSOLE_OFF" },
- { SYSLOG_ACTION_CONSOLE_ON, "SYSLOG_ACTION_CONSOLE_ON" },
- { SYSLOG_ACTION_CONSOLE_LEVEL, "SYSLOG_ACTION_CONSOLE_LEVEL" },
- { SYSLOG_ACTION_SIZE_UNREAD, "SYSLOG_ACTION_SIZE_UNREAD" },
- { SYSLOG_ACTION_SIZE_BUFFER, "SYSLOG_ACTION_SIZE_BUFFER" },
- { 0, NULL }
+ XLAT(SYSLOG_ACTION_CLOSE),
+ XLAT(SYSLOG_ACTION_OPEN),
+ XLAT(SYSLOG_ACTION_READ),
+ XLAT(SYSLOG_ACTION_READ_ALL),
+ XLAT(SYSLOG_ACTION_READ_CLEAR),
+ XLAT(SYSLOG_ACTION_CLEAR),
+ XLAT(SYSLOG_ACTION_CONSOLE_OFF),
+ XLAT(SYSLOG_ACTION_CONSOLE_ON),
+ XLAT(SYSLOG_ACTION_CONSOLE_LEVEL),
+ XLAT(SYSLOG_ACTION_SIZE_UNREAD),
+ XLAT(SYSLOG_ACTION_SIZE_BUFFER),
+ XLAT_END
};
int
@@ -273,71 +275,31 @@
return 0;
}
-#include <linux/reboot.h>
-static const struct xlat bootflags1[] = {
- { LINUX_REBOOT_MAGIC1, "LINUX_REBOOT_MAGIC1" },
- { 0, NULL },
-};
-
-static const struct xlat bootflags2[] = {
- { LINUX_REBOOT_MAGIC2, "LINUX_REBOOT_MAGIC2" },
- { LINUX_REBOOT_MAGIC2A, "LINUX_REBOOT_MAGIC2A" },
- { LINUX_REBOOT_MAGIC2B, "LINUX_REBOOT_MAGIC2B" },
- { 0, NULL },
-};
-
-static const struct xlat bootflags3[] = {
- { LINUX_REBOOT_CMD_CAD_OFF, "LINUX_REBOOT_CMD_CAD_OFF" },
- { LINUX_REBOOT_CMD_RESTART, "LINUX_REBOOT_CMD_RESTART" },
- { LINUX_REBOOT_CMD_HALT, "LINUX_REBOOT_CMD_HALT" },
- { LINUX_REBOOT_CMD_CAD_ON, "LINUX_REBOOT_CMD_CAD_ON" },
- { LINUX_REBOOT_CMD_POWER_OFF, "LINUX_REBOOT_CMD_POWER_OFF" },
- { LINUX_REBOOT_CMD_RESTART2, "LINUX_REBOOT_CMD_RESTART2" },
- { 0, NULL },
-};
-
-int
-sys_reboot(struct tcb *tcp)
-{
- if (entering(tcp)) {
- printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
- tprints(", ");
- printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
- tprints(", ");
- printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
- if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
- tprints(", ");
- printstr(tcp, tcp->u_arg[3], -1);
- }
- }
- return 0;
-}
-
#ifdef M68K
static const struct xlat cacheflush_scope[] = {
#ifdef FLUSH_SCOPE_LINE
- { FLUSH_SCOPE_LINE, "FLUSH_SCOPE_LINE" },
+ XLAT(FLUSH_SCOPE_LINE),
#endif
#ifdef FLUSH_SCOPE_PAGE
- { FLUSH_SCOPE_PAGE, "FLUSH_SCOPE_PAGE" },
+ XLAT(FLUSH_SCOPE_PAGE),
#endif
#ifdef FLUSH_SCOPE_ALL
- { FLUSH_SCOPE_ALL, "FLUSH_SCOPE_ALL" },
+ XLAT(FLUSH_SCOPE_ALL),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat cacheflush_flags[] = {
#ifdef FLUSH_CACHE_BOTH
- { FLUSH_CACHE_BOTH, "FLUSH_CACHE_BOTH" },
+ XLAT(FLUSH_CACHE_BOTH),
#endif
#ifdef FLUSH_CACHE_DATA
- { FLUSH_CACHE_DATA, "FLUSH_CACHE_DATA" },
+ XLAT(FLUSH_CACHE_DATA),
#endif
#ifdef FLUSH_CACHE_INSN
- { FLUSH_CACHE_INSN, "FLUSH_CACHE_INSN" },
+ XLAT(FLUSH_CACHE_INSN),
#endif
- { 0, NULL },
+ XLAT_END
};
int
@@ -363,12 +325,12 @@
#include <bfin_sram.h>
static const struct xlat sram_alloc_flags[] = {
- { L1_INST_SRAM, "L1_INST_SRAM" },
- { L1_DATA_A_SRAM, "L1_DATA_A_SRAM" },
- { L1_DATA_B_SRAM, "L1_DATA_B_SRAM" },
- { L1_DATA_SRAM, "L1_DATA_SRAM" },
- { L2_SRAM, "L2_SRAM" },
- { 0, NULL },
+ XLAT(L1_INST_SRAM),
+ XLAT(L1_DATA_A_SRAM),
+ XLAT(L1_DATA_B_SRAM),
+ XLAT(L1_DATA_SRAM),
+ XLAT(L2_SRAM),
+ XLAT_END
};
int
@@ -386,10 +348,10 @@
#include <asm/cachectl.h>
static const struct xlat cacheflush_flags[] = {
- { ICACHE, "ICACHE" },
- { DCACHE, "DCACHE" },
- { BCACHE, "BCACHE" },
- { 0, NULL },
+ XLAT(ICACHE),
+ XLAT(DCACHE),
+ XLAT(BCACHE),
+ XLAT_END
};
int
@@ -411,18 +373,18 @@
#ifdef SH
static const struct xlat cacheflush_flags[] = {
#ifdef CACHEFLUSH_D_INVAL
- { CACHEFLUSH_D_INVAL, "CACHEFLUSH_D_INVAL" },
+ XLAT(CACHEFLUSH_D_INVAL),
#endif
#ifdef CACHEFLUSH_D_WB
- { CACHEFLUSH_D_WB, "CACHEFLUSH_D_WB" },
+ XLAT(CACHEFLUSH_D_WB),
#endif
#ifdef CACHEFLUSH_D_PURGE
- { CACHEFLUSH_D_PURGE, "CACHEFLUSH_D_PURGE" },
+ XLAT(CACHEFLUSH_D_PURGE),
#endif
#ifdef CACHEFLUSH_I
- { CACHEFLUSH_I, "CACHEFLUSH_I" },
+ XLAT(CACHEFLUSH_I),
#endif
- { 0, NULL },
+ XLAT_END
};
int
@@ -485,7 +447,7 @@
#ifdef CAP_SETFCAP
{ 1<<CAP_SETFCAP, "CAP_SETFCAP" },
#endif
- { 0, NULL },
+ XLAT_END
};
#ifndef _LINUX_CAPABILITY_VERSION_1
@@ -499,10 +461,10 @@
#endif
static const struct xlat cap_version[] = {
- { _LINUX_CAPABILITY_VERSION_1, "_LINUX_CAPABILITY_VERSION_1" },
- { _LINUX_CAPABILITY_VERSION_2, "_LINUX_CAPABILITY_VERSION_3" },
- { _LINUX_CAPABILITY_VERSION_3, "_LINUX_CAPABILITY_VERSION_3" },
- { 0, NULL }
+ XLAT(_LINUX_CAPABILITY_VERSION_1),
+ XLAT(_LINUX_CAPABILITY_VERSION_2),
+ XLAT(_LINUX_CAPABILITY_VERSION_3),
+ XLAT_END
};
static void
@@ -590,245 +552,245 @@
# define CTL_PROC 4
# define CTL_CPU 10 /* older headers lack */
static const struct xlat sysctl_root[] = {
- { CTL_KERN, "CTL_KERN" },
- { CTL_VM, "CTL_VM" },
- { CTL_NET, "CTL_NET" },
- { CTL_PROC, "CTL_PROC" },
- { CTL_FS, "CTL_FS" },
- { CTL_DEBUG, "CTL_DEBUG" },
- { CTL_DEV, "CTL_DEV" },
- { CTL_BUS, "CTL_BUS" },
- { CTL_ABI, "CTL_ABI" },
- { CTL_CPU, "CTL_CPU" },
- { 0, NULL }
+ XLAT(CTL_KERN),
+ XLAT(CTL_VM),
+ XLAT(CTL_NET),
+ XLAT(CTL_PROC),
+ XLAT(CTL_FS),
+ XLAT(CTL_DEBUG),
+ XLAT(CTL_DEV),
+ XLAT(CTL_BUS),
+ XLAT(CTL_ABI),
+ XLAT(CTL_CPU),
+ XLAT_END
};
static const struct xlat sysctl_kern[] = {
- { KERN_OSTYPE, "KERN_OSTYPE" },
- { KERN_OSRELEASE, "KERN_OSRELEASE" },
- { KERN_OSREV, "KERN_OSREV" },
- { KERN_VERSION, "KERN_VERSION" },
- { KERN_SECUREMASK, "KERN_SECUREMASK" },
- { KERN_PROF, "KERN_PROF" },
- { KERN_NODENAME, "KERN_NODENAME" },
- { KERN_DOMAINNAME, "KERN_DOMAINNAME" },
+ XLAT(KERN_OSTYPE),
+ XLAT(KERN_OSRELEASE),
+ XLAT(KERN_OSREV),
+ XLAT(KERN_VERSION),
+ XLAT(KERN_SECUREMASK),
+ XLAT(KERN_PROF),
+ XLAT(KERN_NODENAME),
+ XLAT(KERN_DOMAINNAME),
#ifdef KERN_SECURELVL
- { KERN_SECURELVL, "KERN_SECURELVL" },
+ XLAT(KERN_SECURELVL),
#endif
- { KERN_PANIC, "KERN_PANIC" },
+ XLAT(KERN_PANIC),
#ifdef KERN_REALROOTDEV
- { KERN_REALROOTDEV, "KERN_REALROOTDEV" },
+ XLAT(KERN_REALROOTDEV),
#endif
#ifdef KERN_JAVA_INTERPRETER
- { KERN_JAVA_INTERPRETER, "KERN_JAVA_INTERPRETER" },
+ XLAT(KERN_JAVA_INTERPRETER),
#endif
#ifdef KERN_JAVA_APPLETVIEWER
- { KERN_JAVA_APPLETVIEWER, "KERN_JAVA_APPLETVIEWER" },
+ XLAT(KERN_JAVA_APPLETVIEWER),
#endif
- { KERN_SPARC_REBOOT, "KERN_SPARC_REBOOT" },
- { KERN_CTLALTDEL, "KERN_CTLALTDEL" },
- { KERN_PRINTK, "KERN_PRINTK" },
- { KERN_NAMETRANS, "KERN_NAMETRANS" },
- { KERN_PPC_HTABRECLAIM, "KERN_PPC_HTABRECLAIM" },
- { KERN_PPC_ZEROPAGED, "KERN_PPC_ZEROPAGED" },
- { KERN_PPC_POWERSAVE_NAP, "KERN_PPC_POWERSAVE_NAP" },
- { KERN_MODPROBE, "KERN_MODPROBE" },
- { KERN_SG_BIG_BUFF, "KERN_SG_BIG_BUFF" },
- { KERN_ACCT, "KERN_ACCT" },
- { KERN_PPC_L2CR, "KERN_PPC_L2CR" },
- { KERN_RTSIGNR, "KERN_RTSIGNR" },
- { KERN_RTSIGMAX, "KERN_RTSIGMAX" },
- { KERN_SHMMAX, "KERN_SHMMAX" },
- { KERN_MSGMAX, "KERN_MSGMAX" },
- { KERN_MSGMNB, "KERN_MSGMNB" },
- { KERN_MSGPOOL, "KERN_MSGPOOL" },
- { 0, NULL }
+ XLAT(KERN_SPARC_REBOOT),
+ XLAT(KERN_CTLALTDEL),
+ XLAT(KERN_PRINTK),
+ XLAT(KERN_NAMETRANS),
+ XLAT(KERN_PPC_HTABRECLAIM),
+ XLAT(KERN_PPC_ZEROPAGED),
+ XLAT(KERN_PPC_POWERSAVE_NAP),
+ XLAT(KERN_MODPROBE),
+ XLAT(KERN_SG_BIG_BUFF),
+ XLAT(KERN_ACCT),
+ XLAT(KERN_PPC_L2CR),
+ XLAT(KERN_RTSIGNR),
+ XLAT(KERN_RTSIGMAX),
+ XLAT(KERN_SHMMAX),
+ XLAT(KERN_MSGMAX),
+ XLAT(KERN_MSGMNB),
+ XLAT(KERN_MSGPOOL),
+ XLAT_END
};
static const struct xlat sysctl_vm[] = {
#ifdef VM_SWAPCTL
- { VM_SWAPCTL, "VM_SWAPCTL" },
+ XLAT(VM_SWAPCTL),
#endif
#ifdef VM_UNUSED1
- { VM_UNUSED1, "VM_UNUSED1" },
+ XLAT(VM_UNUSED1),
#endif
#ifdef VM_SWAPOUT
- { VM_SWAPOUT, "VM_SWAPOUT" },
+ XLAT(VM_SWAPOUT),
#endif
#ifdef VM_UNUSED2
- { VM_UNUSED2, "VM_UNUSED2" },
+ XLAT(VM_UNUSED2),
#endif
#ifdef VM_FREEPG
- { VM_FREEPG, "VM_FREEPG" },
+ XLAT(VM_FREEPG),
#endif
#ifdef VM_UNUSED3
- { VM_UNUSED3, "VM_UNUSED3" },
+ XLAT(VM_UNUSED3),
#endif
#ifdef VM_BDFLUSH
- { VM_BDFLUSH, "VM_BDFLUSH" },
+ XLAT(VM_BDFLUSH),
#endif
#ifdef VM_UNUSED4
- { VM_UNUSED4, "VM_UNUSED4" },
+ XLAT(VM_UNUSED4),
#endif
- { VM_OVERCOMMIT_MEMORY, "VM_OVERCOMMIT_MEMORY" },
+ XLAT(VM_OVERCOMMIT_MEMORY),
#ifdef VM_BUFFERMEM
- { VM_BUFFERMEM, "VM_BUFFERMEM" },
+ XLAT(VM_BUFFERMEM),
#endif
#ifdef VM_UNUSED5
- { VM_UNUSED5, "VM_UNUSED5" },
+ XLAT(VM_UNUSED5),
#endif
#ifdef VM_PAGECACHE
- { VM_PAGECACHE, "VM_PAGECACHE" },
+ XLAT(VM_PAGECACHE),
#endif
#ifdef VM_UNUSED7
- { VM_UNUSED7, "VM_UNUSED7" },
+ XLAT(VM_UNUSED7),
#endif
#ifdef VM_PAGERDAEMON
- { VM_PAGERDAEMON, "VM_PAGERDAEMON" },
+ XLAT(VM_PAGERDAEMON),
#endif
#ifdef VM_UNUSED8
- { VM_UNUSED8, "VM_UNUSED8" },
+ XLAT(VM_UNUSED8),
#endif
#ifdef VM_PGT_CACHE
- { VM_PGT_CACHE, "VM_PGT_CACHE" },
+ XLAT(VM_PGT_CACHE),
#endif
#ifdef VM_UNUSED9
- { VM_UNUSED9, "VM_UNUSED9" },
+ XLAT(VM_UNUSED9),
#endif
- { VM_PAGE_CLUSTER, "VM_PAGE_CLUSTER" },
- { 0, NULL },
+ XLAT(VM_PAGE_CLUSTER),
+ XLAT_END
};
static const struct xlat sysctl_net[] = {
- { NET_CORE, "NET_CORE" },
- { NET_ETHER, "NET_ETHER" },
- { NET_802, "NET_802" },
- { NET_UNIX, "NET_UNIX" },
- { NET_IPV4, "NET_IPV4" },
- { NET_IPX, "NET_IPX" },
- { NET_ATALK, "NET_ATALK" },
- { NET_NETROM, "NET_NETROM" },
- { NET_AX25, "NET_AX25" },
- { NET_BRIDGE, "NET_BRIDGE" },
- { NET_ROSE, "NET_ROSE" },
- { NET_IPV6, "NET_IPV6" },
- { NET_X25, "NET_X25" },
- { NET_TR, "NET_TR" },
- { NET_DECNET, "NET_DECNET" },
- { 0, NULL }
+ XLAT(NET_CORE),
+ XLAT(NET_ETHER),
+ XLAT(NET_802),
+ XLAT(NET_UNIX),
+ XLAT(NET_IPV4),
+ XLAT(NET_IPX),
+ XLAT(NET_ATALK),
+ XLAT(NET_NETROM),
+ XLAT(NET_AX25),
+ XLAT(NET_BRIDGE),
+ XLAT(NET_ROSE),
+ XLAT(NET_IPV6),
+ XLAT(NET_X25),
+ XLAT(NET_TR),
+ XLAT(NET_DECNET),
+ XLAT_END
};
static const struct xlat sysctl_net_core[] = {
- { NET_CORE_WMEM_MAX, "NET_CORE_WMEM_MAX" },
- { NET_CORE_RMEM_MAX, "NET_CORE_RMEM_MAX" },
- { NET_CORE_WMEM_DEFAULT, "NET_CORE_WMEM_DEFAULT" },
- { NET_CORE_RMEM_DEFAULT, "NET_CORE_RMEM_DEFAULT" },
- { NET_CORE_MAX_BACKLOG, "NET_CORE_MAX_BACKLOG" },
- { NET_CORE_FASTROUTE, "NET_CORE_FASTROUTE" },
- { NET_CORE_MSG_COST, "NET_CORE_MSG_COST" },
- { NET_CORE_MSG_BURST, "NET_CORE_MSG_BURST" },
- { NET_CORE_OPTMEM_MAX, "NET_CORE_OPTMEM_MAX" },
- { 0, NULL }
+ XLAT(NET_CORE_WMEM_MAX),
+ XLAT(NET_CORE_RMEM_MAX),
+ XLAT(NET_CORE_WMEM_DEFAULT),
+ XLAT(NET_CORE_RMEM_DEFAULT),
+ XLAT(NET_CORE_MAX_BACKLOG),
+ XLAT(NET_CORE_FASTROUTE),
+ XLAT(NET_CORE_MSG_COST),
+ XLAT(NET_CORE_MSG_BURST),
+ XLAT(NET_CORE_OPTMEM_MAX),
+ XLAT_END
};
static const struct xlat sysctl_net_unix[] = {
- { NET_UNIX_DESTROY_DELAY, "NET_UNIX_DESTROY_DELAY" },
- { NET_UNIX_DELETE_DELAY, "NET_UNIX_DELETE_DELAY" },
- { 0, NULL }
+ XLAT(NET_UNIX_DESTROY_DELAY),
+ XLAT(NET_UNIX_DELETE_DELAY),
+ XLAT_END
};
static const struct xlat sysctl_net_ipv4[] = {
- { NET_IPV4_FORWARD, "NET_IPV4_FORWARD" },
- { NET_IPV4_DYNADDR, "NET_IPV4_DYNADDR" },
- { NET_IPV4_CONF, "NET_IPV4_CONF" },
- { NET_IPV4_NEIGH, "NET_IPV4_NEIGH" },
- { NET_IPV4_ROUTE, "NET_IPV4_ROUTE" },
- { NET_IPV4_FIB_HASH, "NET_IPV4_FIB_HASH" },
- { NET_IPV4_TCP_TIMESTAMPS, "NET_IPV4_TCP_TIMESTAMPS" },
- { NET_IPV4_TCP_WINDOW_SCALING, "NET_IPV4_TCP_WINDOW_SCALING" },
- { NET_IPV4_TCP_SACK, "NET_IPV4_TCP_SACK" },
- { NET_IPV4_TCP_RETRANS_COLLAPSE, "NET_IPV4_TCP_RETRANS_COLLAPSE" },
- { NET_IPV4_DEFAULT_TTL, "NET_IPV4_DEFAULT_TTL" },
- { NET_IPV4_AUTOCONFIG, "NET_IPV4_AUTOCONFIG" },
- { NET_IPV4_NO_PMTU_DISC, "NET_IPV4_NO_PMTU_DISC" },
- { NET_IPV4_TCP_SYN_RETRIES, "NET_IPV4_TCP_SYN_RETRIES" },
- { NET_IPV4_IPFRAG_HIGH_THRESH, "NET_IPV4_IPFRAG_HIGH_THRESH" },
- { NET_IPV4_IPFRAG_LOW_THRESH, "NET_IPV4_IPFRAG_LOW_THRESH" },
- { NET_IPV4_IPFRAG_TIME, "NET_IPV4_IPFRAG_TIME" },
- { NET_IPV4_TCP_MAX_KA_PROBES, "NET_IPV4_TCP_MAX_KA_PROBES" },
- { NET_IPV4_TCP_KEEPALIVE_TIME, "NET_IPV4_TCP_KEEPALIVE_TIME" },
- { NET_IPV4_TCP_KEEPALIVE_PROBES, "NET_IPV4_TCP_KEEPALIVE_PROBES" },
- { NET_IPV4_TCP_RETRIES1, "NET_IPV4_TCP_RETRIES1" },
- { NET_IPV4_TCP_RETRIES2, "NET_IPV4_TCP_RETRIES2" },
- { NET_IPV4_TCP_FIN_TIMEOUT, "NET_IPV4_TCP_FIN_TIMEOUT" },
- { NET_IPV4_IP_MASQ_DEBUG, "NET_IPV4_IP_MASQ_DEBUG" },
- { NET_TCP_SYNCOOKIES, "NET_TCP_SYNCOOKIES" },
- { NET_TCP_STDURG, "NET_TCP_STDURG" },
- { NET_TCP_RFC1337, "NET_TCP_RFC1337" },
- { NET_TCP_SYN_TAILDROP, "NET_TCP_SYN_TAILDROP" },
- { NET_TCP_MAX_SYN_BACKLOG, "NET_TCP_MAX_SYN_BACKLOG" },
- { NET_IPV4_LOCAL_PORT_RANGE, "NET_IPV4_LOCAL_PORT_RANGE" },
- { NET_IPV4_ICMP_ECHO_IGNORE_ALL, "NET_IPV4_ICMP_ECHO_IGNORE_ALL" },
- { NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, "NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS" },
- { NET_IPV4_ICMP_SOURCEQUENCH_RATE, "NET_IPV4_ICMP_SOURCEQUENCH_RATE" },
- { NET_IPV4_ICMP_DESTUNREACH_RATE, "NET_IPV4_ICMP_DESTUNREACH_RATE" },
- { NET_IPV4_ICMP_TIMEEXCEED_RATE, "NET_IPV4_ICMP_TIMEEXCEED_RATE" },
- { NET_IPV4_ICMP_PARAMPROB_RATE, "NET_IPV4_ICMP_PARAMPROB_RATE" },
- { NET_IPV4_ICMP_ECHOREPLY_RATE, "NET_IPV4_ICMP_ECHOREPLY_RATE" },
- { NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES, "NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES" },
- { NET_IPV4_IGMP_MAX_MEMBERSHIPS, "NET_IPV4_IGMP_MAX_MEMBERSHIPS" },
- { 0, NULL }
+ XLAT(NET_IPV4_FORWARD),
+ XLAT(NET_IPV4_DYNADDR),
+ XLAT(NET_IPV4_CONF),
+ XLAT(NET_IPV4_NEIGH),
+ XLAT(NET_IPV4_ROUTE),
+ XLAT(NET_IPV4_FIB_HASH),
+ XLAT(NET_IPV4_TCP_TIMESTAMPS),
+ XLAT(NET_IPV4_TCP_WINDOW_SCALING),
+ XLAT(NET_IPV4_TCP_SACK),
+ XLAT(NET_IPV4_TCP_RETRANS_COLLAPSE),
+ XLAT(NET_IPV4_DEFAULT_TTL),
+ XLAT(NET_IPV4_AUTOCONFIG),
+ XLAT(NET_IPV4_NO_PMTU_DISC),
+ XLAT(NET_IPV4_TCP_SYN_RETRIES),
+ XLAT(NET_IPV4_IPFRAG_HIGH_THRESH),
+ XLAT(NET_IPV4_IPFRAG_LOW_THRESH),
+ XLAT(NET_IPV4_IPFRAG_TIME),
+ XLAT(NET_IPV4_TCP_MAX_KA_PROBES),
+ XLAT(NET_IPV4_TCP_KEEPALIVE_TIME),
+ XLAT(NET_IPV4_TCP_KEEPALIVE_PROBES),
+ XLAT(NET_IPV4_TCP_RETRIES1),
+ XLAT(NET_IPV4_TCP_RETRIES2),
+ XLAT(NET_IPV4_TCP_FIN_TIMEOUT),
+ XLAT(NET_IPV4_IP_MASQ_DEBUG),
+ XLAT(NET_TCP_SYNCOOKIES),
+ XLAT(NET_TCP_STDURG),
+ XLAT(NET_TCP_RFC1337),
+ XLAT(NET_TCP_SYN_TAILDROP),
+ XLAT(NET_TCP_MAX_SYN_BACKLOG),
+ XLAT(NET_IPV4_LOCAL_PORT_RANGE),
+ XLAT(NET_IPV4_ICMP_ECHO_IGNORE_ALL),
+ XLAT(NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS),
+ XLAT(NET_IPV4_ICMP_SOURCEQUENCH_RATE),
+ XLAT(NET_IPV4_ICMP_DESTUNREACH_RATE),
+ XLAT(NET_IPV4_ICMP_TIMEEXCEED_RATE),
+ XLAT(NET_IPV4_ICMP_PARAMPROB_RATE),
+ XLAT(NET_IPV4_ICMP_ECHOREPLY_RATE),
+ XLAT(NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES),
+ XLAT(NET_IPV4_IGMP_MAX_MEMBERSHIPS),
+ XLAT_END
};
static const struct xlat sysctl_net_ipv4_route[] = {
- { NET_IPV4_ROUTE_FLUSH, "NET_IPV4_ROUTE_FLUSH" },
- { NET_IPV4_ROUTE_MIN_DELAY, "NET_IPV4_ROUTE_MIN_DELAY" },
- { NET_IPV4_ROUTE_MAX_DELAY, "NET_IPV4_ROUTE_MAX_DELAY" },
- { NET_IPV4_ROUTE_GC_THRESH, "NET_IPV4_ROUTE_GC_THRESH" },
- { NET_IPV4_ROUTE_MAX_SIZE, "NET_IPV4_ROUTE_MAX_SIZE" },
- { NET_IPV4_ROUTE_GC_MIN_INTERVAL, "NET_IPV4_ROUTE_GC_MIN_INTERVAL" },
- { NET_IPV4_ROUTE_GC_TIMEOUT, "NET_IPV4_ROUTE_GC_TIMEOUT" },
- { NET_IPV4_ROUTE_GC_INTERVAL, "NET_IPV4_ROUTE_GC_INTERVAL" },
- { NET_IPV4_ROUTE_REDIRECT_LOAD, "NET_IPV4_ROUTE_REDIRECT_LOAD" },
- { NET_IPV4_ROUTE_REDIRECT_NUMBER, "NET_IPV4_ROUTE_REDIRECT_NUMBER" },
- { NET_IPV4_ROUTE_REDIRECT_SILENCE, "NET_IPV4_ROUTE_REDIRECT_SILENCE" },
- { NET_IPV4_ROUTE_ERROR_COST, "NET_IPV4_ROUTE_ERROR_COST" },
- { NET_IPV4_ROUTE_ERROR_BURST, "NET_IPV4_ROUTE_ERROR_BURST" },
- { NET_IPV4_ROUTE_GC_ELASTICITY, "NET_IPV4_ROUTE_GC_ELASTICITY" },
- { 0, NULL }
+ XLAT(NET_IPV4_ROUTE_FLUSH),
+ XLAT(NET_IPV4_ROUTE_MIN_DELAY),
+ XLAT(NET_IPV4_ROUTE_MAX_DELAY),
+ XLAT(NET_IPV4_ROUTE_GC_THRESH),
+ XLAT(NET_IPV4_ROUTE_MAX_SIZE),
+ XLAT(NET_IPV4_ROUTE_GC_MIN_INTERVAL),
+ XLAT(NET_IPV4_ROUTE_GC_TIMEOUT),
+ XLAT(NET_IPV4_ROUTE_GC_INTERVAL),
+ XLAT(NET_IPV4_ROUTE_REDIRECT_LOAD),
+ XLAT(NET_IPV4_ROUTE_REDIRECT_NUMBER),
+ XLAT(NET_IPV4_ROUTE_REDIRECT_SILENCE),
+ XLAT(NET_IPV4_ROUTE_ERROR_COST),
+ XLAT(NET_IPV4_ROUTE_ERROR_BURST),
+ XLAT(NET_IPV4_ROUTE_GC_ELASTICITY),
+ XLAT_END
};
static const struct xlat sysctl_net_ipv4_conf[] = {
- { NET_IPV4_CONF_FORWARDING, "NET_IPV4_CONF_FORWARDING" },
- { NET_IPV4_CONF_MC_FORWARDING, "NET_IPV4_CONF_MC_FORWARDING" },
- { NET_IPV4_CONF_PROXY_ARP, "NET_IPV4_CONF_PROXY_ARP" },
- { NET_IPV4_CONF_ACCEPT_REDIRECTS, "NET_IPV4_CONF_ACCEPT_REDIRECTS" },
- { NET_IPV4_CONF_SECURE_REDIRECTS, "NET_IPV4_CONF_SECURE_REDIRECTS" },
- { NET_IPV4_CONF_SEND_REDIRECTS, "NET_IPV4_CONF_SEND_REDIRECTS" },
- { NET_IPV4_CONF_SHARED_MEDIA, "NET_IPV4_CONF_SHARED_MEDIA" },
- { NET_IPV4_CONF_RP_FILTER, "NET_IPV4_CONF_RP_FILTER" },
- { NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, "NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE" },
- { NET_IPV4_CONF_BOOTP_RELAY, "NET_IPV4_CONF_BOOTP_RELAY" },
- { NET_IPV4_CONF_LOG_MARTIANS, "NET_IPV4_CONF_LOG_MARTIANS" },
- { 0, NULL }
+ XLAT(NET_IPV4_CONF_FORWARDING),
+ XLAT(NET_IPV4_CONF_MC_FORWARDING),
+ XLAT(NET_IPV4_CONF_PROXY_ARP),
+ XLAT(NET_IPV4_CONF_ACCEPT_REDIRECTS),
+ XLAT(NET_IPV4_CONF_SECURE_REDIRECTS),
+ XLAT(NET_IPV4_CONF_SEND_REDIRECTS),
+ XLAT(NET_IPV4_CONF_SHARED_MEDIA),
+ XLAT(NET_IPV4_CONF_RP_FILTER),
+ XLAT(NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE),
+ XLAT(NET_IPV4_CONF_BOOTP_RELAY),
+ XLAT(NET_IPV4_CONF_LOG_MARTIANS),
+ XLAT_END
};
static const struct xlat sysctl_net_ipv6[] = {
- { NET_IPV6_CONF, "NET_IPV6_CONF" },
- { NET_IPV6_NEIGH, "NET_IPV6_NEIGH" },
- { NET_IPV6_ROUTE, "NET_IPV6_ROUTE" },
- { 0, NULL }
+ XLAT(NET_IPV6_CONF),
+ XLAT(NET_IPV6_NEIGH),
+ XLAT(NET_IPV6_ROUTE),
+ XLAT_END
};
static const struct xlat sysctl_net_ipv6_route[] = {
- { NET_IPV6_ROUTE_FLUSH, "NET_IPV6_ROUTE_FLUSH" },
- { NET_IPV6_ROUTE_GC_THRESH, "NET_IPV6_ROUTE_GC_THRESH" },
- { NET_IPV6_ROUTE_MAX_SIZE, "NET_IPV6_ROUTE_MAX_SIZE" },
- { NET_IPV6_ROUTE_GC_MIN_INTERVAL, "NET_IPV6_ROUTE_GC_MIN_INTERVAL" },
- { NET_IPV6_ROUTE_GC_TIMEOUT, "NET_IPV6_ROUTE_GC_TIMEOUT" },
- { NET_IPV6_ROUTE_GC_INTERVAL, "NET_IPV6_ROUTE_GC_INTERVAL" },
- { NET_IPV6_ROUTE_GC_ELASTICITY, "NET_IPV6_ROUTE_GC_ELASTICITY" },
- { 0, NULL }
+ XLAT(NET_IPV6_ROUTE_FLUSH),
+ XLAT(NET_IPV6_ROUTE_GC_THRESH),
+ XLAT(NET_IPV6_ROUTE_MAX_SIZE),
+ XLAT(NET_IPV6_ROUTE_GC_MIN_INTERVAL),
+ XLAT(NET_IPV6_ROUTE_GC_TIMEOUT),
+ XLAT(NET_IPV6_ROUTE_GC_INTERVAL),
+ XLAT(NET_IPV6_ROUTE_GC_ELASTICITY),
+ XLAT_END
};
int
@@ -993,12 +955,12 @@
#endif
static const struct xlat sysmips_operations[] = {
- { SETNAME, "SETNAME" },
- { FLUSH_CACHE, "FLUSH_CACHE" },
- { MIPS_FIXADE, "MIPS_FIXADE" },
- { MIPS_RDNVRAM, "MIPS_RDNVRAM" },
- { MIPS_ATOMIC_SET, "MIPS_ATOMIC_SET" },
- { 0, NULL }
+ XLAT(SETNAME),
+ XLAT(FLUSH_CACHE),
+ XLAT(MIPS_FIXADE),
+ XLAT(MIPS_RDNVRAM),
+ XLAT(MIPS_ATOMIC_SET),
+ XLAT_END
};
int sys_sysmips(struct tcb *tcp)
@@ -1048,7 +1010,7 @@
{ OR1K_ATOMIC_OR, "OR" },
{ OR1K_ATOMIC_UMAX, "UMAX" },
{ OR1K_ATOMIC_UMIN, "UMIN" },
- { 0, NULL }
+ XLAT_END
};
int sys_or1k_atomic(struct tcb *tcp)
diff --git a/term.c b/term.c
index 7b7de74..43a15c3 100644
--- a/term.c
+++ b/term.c
@@ -36,132 +36,132 @@
#endif
static const struct xlat tcxonc_options[] = {
- { TCOOFF, "TCOOFF" },
- { TCOON, "TCOON" },
- { TCIOFF, "TCIOFF" },
- { TCION, "TCION" },
- { 0, NULL },
+ XLAT(TCOOFF),
+ XLAT(TCOON),
+ XLAT(TCIOFF),
+ XLAT(TCION),
+ XLAT_END
};
#ifdef TCLFLSH
static const struct xlat tcflsh_options[] = {
- { TCIFLUSH, "TCIFLUSH" },
- { TCOFLUSH, "TCOFLUSH" },
- { TCIOFLUSH, "TCIOFLUSH" },
- { 0, NULL },
+ XLAT(TCIFLUSH),
+ XLAT(TCOFLUSH),
+ XLAT(TCIOFLUSH),
+ XLAT_END
};
#endif
static const struct xlat baud_options[] = {
- { B0, "B0" },
- { B50, "B50" },
- { B75, "B75" },
- { B110, "B110" },
- { B134, "B134" },
- { B150, "B150" },
- { B200, "B200" },
- { B300, "B300" },
- { B600, "B600" },
- { B1200, "B1200" },
- { B1800, "B1800" },
- { B2400, "B2400" },
- { B4800, "B4800" },
- { B9600, "B9600" },
+ XLAT(B0),
+ XLAT(B50),
+ XLAT(B75),
+ XLAT(B110),
+ XLAT(B134),
+ XLAT(B150),
+ XLAT(B200),
+ XLAT(B300),
+ XLAT(B600),
+ XLAT(B1200),
+ XLAT(B1800),
+ XLAT(B2400),
+ XLAT(B4800),
+ XLAT(B9600),
#ifdef B19200
- { B19200, "B19200" },
+ XLAT(B19200),
#endif
#ifdef B38400
- { B38400, "B38400" },
+ XLAT(B38400),
#endif
#ifdef B57600
- { B57600, "B57600" },
+ XLAT(B57600),
#endif
#ifdef B115200
- { B115200, "B115200" },
+ XLAT(B115200),
#endif
#ifdef B230400
- { B230400, "B230400" },
+ XLAT(B230400),
#endif
#ifdef B460800
- { B460800, "B460800" },
+ XLAT(B460800),
#endif
#ifdef B500000
- { B500000, "B500000" },
+ XLAT(B500000),
#endif
#ifdef B576000
- { B576000, "B576000" },
+ XLAT(B576000),
#endif
#ifdef B921600
- { B921600, "B921600" },
+ XLAT(B921600),
#endif
#ifdef B1000000
- { B1000000, "B1000000" },
+ XLAT(B1000000),
#endif
#ifdef B1152000
- { B1152000, "B1152000" },
+ XLAT(B1152000),
#endif
#ifdef B1500000
- { B1500000, "B1500000" },
+ XLAT(B1500000),
#endif
#ifdef B2000000
- { B2000000, "B2000000" },
+ XLAT(B2000000),
#endif
#ifdef B2500000
- { B2500000, "B2500000" },
+ XLAT(B2500000),
#endif
#ifdef B3000000
- { B3000000, "B3000000" },
+ XLAT(B3000000),
#endif
#ifdef B3500000
- { B3500000, "B3500000" },
+ XLAT(B3500000),
#endif
#ifdef B4000000
- { B4000000, "B4000000" },
+ XLAT(B4000000),
#endif
#ifdef EXTA
- { EXTA, "EXTA" },
+ XLAT(EXTA),
#endif
#ifdef EXTB
- { EXTB, "EXTB" },
+ XLAT(EXTB),
#endif
- { 0, NULL },
+ XLAT_END
};
static const struct xlat modem_flags[] = {
#ifdef TIOCM_LE
- { TIOCM_LE, "TIOCM_LE", },
+ XLAT(TIOCM_LE),
#endif
#ifdef TIOCM_DTR
- { TIOCM_DTR, "TIOCM_DTR", },
+ XLAT(TIOCM_DTR),
#endif
#ifdef TIOCM_RTS
- { TIOCM_RTS, "TIOCM_RTS", },
+ XLAT(TIOCM_RTS),
#endif
#ifdef TIOCM_ST
- { TIOCM_ST, "TIOCM_ST", },
+ XLAT(TIOCM_ST),
#endif
#ifdef TIOCM_SR
- { TIOCM_SR, "TIOCM_SR", },
+ XLAT(TIOCM_SR),
#endif
#ifdef TIOCM_CTS
- { TIOCM_CTS, "TIOCM_CTS", },
+ XLAT(TIOCM_CTS),
#endif
#ifdef TIOCM_CAR
- { TIOCM_CAR, "TIOCM_CAR", },
+ XLAT(TIOCM_CAR),
#endif
#ifdef TIOCM_CD
- { TIOCM_CD, "TIOCM_CD", },
+ XLAT(TIOCM_CD),
#endif
#ifdef TIOCM_RNG
- { TIOCM_RNG, "TIOCM_RNG", },
+ XLAT(TIOCM_RNG),
#endif
#ifdef TIOCM_RI
- { TIOCM_RI, "TIOCM_RI", },
+ XLAT(TIOCM_RI),
#endif
#ifdef TIOCM_DSR
- { TIOCM_DSR, "TIOCM_DSR", },
+ XLAT(TIOCM_DSR),
#endif
- { 0, NULL, },
+ XLAT_END
};
int term_ioctl(struct tcb *tcp, long code, long arg)
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644
index 0000000..c73b64a
--- /dev/null
+++ b/test/.gitignore
@@ -0,0 +1,14 @@
+vfork
+fork
+sig
+skodic
+clone
+leaderkill
+childthread
+sigkill_rain
+wait_must_be_interruptible
+threaded_execve
+mtd
+ubi
+select
+sigreturn
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..cc7d47a
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,17 @@
+CFLAGS += -Wall
+
+PROGS = \
+ vfork fork sig skodic clone leaderkill childthread \
+ sigkill_rain wait_must_be_interruptible threaded_execve \
+ mtd ubi select sigreturn
+
+all: $(PROGS)
+
+leaderkill: LDFLAGS += -pthread
+
+childthread: LDFLAGS += -pthread
+
+clean distclean:
+ rm -f *.o core $(PROGS) *.gdb
+
+.PHONY: all clean distclean
diff --git a/test/README b/test/README
new file mode 100644
index 0000000..7fae09b
--- /dev/null
+++ b/test/README
@@ -0,0 +1,17 @@
+To run a test:
+* Run make
+* Run resulting executable(s) under strace
+* Check strace output and/or program's output and exitcode
+
+To add a new test:
+* Add its .c source to this dir
+* Add it to "all" and "clean" targets in Makefile
+* Add it to .gitignore file
+
+Please spend some time making your testcase understandable.
+For example, it may print an explanation how it should be used
+(which strace options to use, and what to look for in strace output).
+
+If possible, make it so that your testcase detects error/bug
+it is intended to test for, and prints error message and exits with 1
+if the bug is detected, instead of relying on user to peruse strace output.
diff --git a/test/childthread.c b/test/childthread.c
new file mode 100644
index 0000000..c86b9cf
--- /dev/null
+++ b/test/childthread.c
@@ -0,0 +1,60 @@
+/* Test exit of a child of a TCB_EXITING child where the toplevel process starts
+ * waiting on it. The middle one gets detached and strace must update the
+ * toplevel process'es number of attached children to 0.
+ *
+ * gcc -o test/childthread test/childthread.c -Wall -ggdb2 -pthread;./strace -f ./test/childthread
+ * It must print: write(1, "OK\n", ...
+ */
+
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/wait.h>
+
+static void *start0(void *arg)
+{
+ pause();
+ /* NOTREACHED */
+ assert(0);
+}
+
+int main(int argc, char *argv[])
+{
+ pthread_t thread0;
+ pid_t child, got_pid;
+ int status;
+ int i;
+
+ child = fork();
+
+ switch (child) {
+ case -1:
+ assert(0);
+ case 0:
+ i = pthread_create(&thread0, NULL, start0, NULL);
+ assert(i == 0);
+ /* The thread must be initialized, it becomes thread-child of this
+ process-child (child of a child of the toplevel process). */
+ sleep(1);
+ /* Here the child TCB cannot be deallocated as there still exist
+ * children (the thread child in START0). */
+ exit(42);
+ /* NOTREACHED */
+ assert(0);
+ default:
+ /* We must not be waiting in WAITPID when the child double-exits. */
+ sleep(2);
+ /* PID must be -1. */
+ got_pid = waitpid(-1, &status, 0);
+ assert(got_pid == child);
+ assert(WIFEXITED(status));
+ assert(WEXITSTATUS(status) == 42);
+ puts("OK");
+ exit(0);
+ }
+
+ /* NOTREACHED */
+ assert(0);
+}
diff --git a/test/clone.c b/test/clone.c
new file mode 100644
index 0000000..bdce8b1
--- /dev/null
+++ b/test/clone.c
@@ -0,0 +1,21 @@
+/* for CLONE_foo: */
+#define _GNU_SOURCE 1
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sched.h>
+#include <unistd.h>
+
+int child(void* arg)
+{
+ write(1, "clone\n", 6);
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ char stack[4096];
+ clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL);
+ write(1, "original\n", 9);
+ exit(0);
+}
diff --git a/test/fork.c b/test/fork.c
new file mode 100644
index 0000000..1425e2d
--- /dev/null
+++ b/test/fork.c
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+int main(int argc, char *argv[])
+{
+ if (fork() == 0) {
+ write(1, "child\n", 6);
+ } else {
+ wait(0);
+ write(1, "parent\n", 7);
+ }
+
+ exit(0);
+}
diff --git a/test/leaderkill.c b/test/leaderkill.c
new file mode 100644
index 0000000..c24a9f0
--- /dev/null
+++ b/test/leaderkill.c
@@ -0,0 +1,64 @@
+/* Test handle_group_exit() handling of a thread leader still alive with its
+ * thread child calling exit_group() and proper passing of the process exit
+ * code to the process parent of this whole thread group.
+ *
+ * gcc -o test/leaderkill test/leaderkill.c -Wall -ggdb2 -pthread;./test/leaderkill & pid=$!;sleep 1;strace -o x -q ./strace -f -p $pid
+ * It must print: write(1, "OK\n", ...
+ */
+
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/wait.h>
+
+static void *start0(void *arg)
+{
+ sleep(1);
+ exit(42);
+}
+
+static void *start1(void *arg)
+{
+ pause();
+ /* NOTREACHED */
+ assert(0);
+}
+
+int main(int argc, char *argv[])
+{
+ pthread_t thread0;
+ pthread_t thread1;
+ pid_t child, got_pid;
+ int status;
+ int i;
+
+ sleep(2);
+
+ child = fork();
+
+ switch (child) {
+ case -1:
+ abort();
+ case 0:
+ i = pthread_create(&thread0, NULL, start0, NULL);
+ assert(i == 0);
+ i = pthread_create(&thread1, NULL, start1, NULL);
+ assert(i == 0);
+ pause();
+ /* NOTREACHED */
+ assert(0);
+ break;
+ default:
+ got_pid = waitpid(child, &status, 0);
+ assert(got_pid == child);
+ assert(WIFEXITED(status));
+ assert(WEXITSTATUS(status) == 42);
+ puts("OK");
+ exit(0);
+ }
+
+ /* NOTREACHED */
+ abort();
+}
diff --git a/test/mmap_offset_decode.c b/test/mmap_offset_decode.c
new file mode 100644
index 0000000..34a708e
--- /dev/null
+++ b/test/mmap_offset_decode.c
@@ -0,0 +1,31 @@
+/* Should strace show byte or page offsets in mmap syscalls
+ * which take page offset parameters?
+ *
+ * At the time of writing, sys_mmap() converts page to byte offsets,
+ * but only for SH64! But this routine is used on i386 too - by mmap2 syscall,
+ * which uses page offsets too. As it stands now, SH64 and i386 are inconsistent.
+ *
+ * sys_old_mmap() is used for old mmap syscall, which uses byte offset -
+ * should be ok.
+ * sys_mmap64() is currently buggy (should print bogus offset, but I can't
+ * test it right now. What arch/bitness invokes sys_mmap64?)
+ *
+ * This program is intended for testing what strace actually shows. Usage:
+ * $ gcc test/mmap_offset_decode.c -o mmap_offset_decode -static
+ * $ strace ./mmap_offset_decode
+ *
+ * As of today (2011-08), on i386 strace prints page offset.
+ * Fixed 2013-02-19. Now all mmaps on all arches should show byte offsets.
+ */
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <sys/mman.h>
+#include <errno.h>
+int main()
+{
+ /* 0x1000 is meant to be page size multiplier */
+ mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
+ 0x7fff0000LL * 0x1000);
+ return errno != 0;
+}
diff --git a/test/mtd.c b/test/mtd.c
new file mode 100644
index 0000000..b9fc695
--- /dev/null
+++ b/test/mtd.c
@@ -0,0 +1,49 @@
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <mtd/mtd-user.h>
+
+int main() {
+ int fd = open("/dev/null", 0);
+ struct mtd_info_user minfo;
+ struct erase_info_user einfo;
+ struct erase_info_user64 einfo64;
+ struct mtd_oob_buf mbuf;
+ struct mtd_oob_buf64 mbuf64;
+ struct region_info_user rinfo;
+ /* struct otp_info oinfo; */
+ struct mtd_ecc_stats estat;
+ struct mtd_write_req mreq;
+ struct nand_oobinfo ninfo;
+ struct nand_ecclayout_user nlay;
+ off_t f = 333;
+
+ memset(&einfo, 0, sizeof(einfo));
+ memset(&einfo64, 0xff, sizeof(einfo64));
+
+ ioctl(fd, MEMGETINFO, &minfo);
+
+ ioctl(fd, MEMERASE, &einfo);
+ ioctl(fd, MEMERASE64, &einfo64);
+
+ ioctl(fd, MEMGETBADBLOCK, &f);
+ int i = 0;
+ ioctl(fd, OTPSELECT, &i);
+ ioctl(fd, MEMSETBADBLOCK, &f);
+
+ ioctl(fd, MEMREADOOB, &mbuf);
+ ioctl(fd, MEMREADOOB64, &mbuf64);
+
+ ioctl(fd, MEMGETREGIONINFO, &rinfo);
+
+ ioctl(fd, ECCGETSTATS, &estat);
+ ioctl(fd, MEMWRITE, &mreq);
+
+ ioctl(fd, MEMGETOOBSEL, &ninfo);
+ ioctl(fd, ECCGETLAYOUT, &nlay);
+
+ return 0;
+}
diff --git a/test/procpollable.c b/test/procpollable.c
new file mode 100644
index 0000000..7bc5efa
--- /dev/null
+++ b/test/procpollable.c
@@ -0,0 +1,44 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <sys/procfs.h>
+#include <sys/stropts.h>
+#include <poll.h>
+
+int main(int argc, char *argv[])
+{
+ int pid;
+ char proc[32];
+ FILE *pfp;
+ struct pollfd pfd;
+
+ pid = fork();
+ if (pid == 0) {
+ pause();
+ exit(0);
+ }
+
+ sprintf(proc, "/proc/%d", pid);
+
+ pfp = fopen(proc, "r+");
+ if (pfp == NULL)
+ goto fail;
+
+ if (ioctl(fileno(pfp), PIOCSTOP, NULL) < 0)
+ goto fail;
+
+ pfd.fd = fileno(pfp);
+ pfd.events = POLLPRI;
+
+ if (poll(&pfd, 1, 0) < 0)
+ goto fail;
+
+ if (!(pfd.revents & POLLPRI))
+ goto fail;
+
+ kill(pid, SIGKILL);
+ exit(0);
+fail:
+ kill(pid, SIGKILL);
+ exit(1);
+}
diff --git a/test/select.c b/test/select.c
new file mode 100644
index 0000000..0810fff
--- /dev/null
+++ b/test/select.c
@@ -0,0 +1,34 @@
+/* dave@treblig.org */
+#include <sys/select.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+char buffer[1024*1024*2];
+
+int main()
+{
+ fd_set rds;
+ struct timeval timeout;
+
+ FD_ZERO(&rds);
+ FD_SET(2, &rds);
+ /* Start with a nice simple select */
+ select(3, &rds, &rds, &rds, NULL);
+
+ /* Now the crash case that trinity found, negative nfds
+ * but with a pointer to a large chunk of valid memory.
+ */
+ FD_ZERO((fd_set*)buffer);
+ FD_SET(2,(fd_set*)buffer);
+ select(-1, (fd_set *)buffer, NULL, NULL, NULL);
+
+ /* Another variant, with nfds exceeding allowed limit. */
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 100;
+ select(FD_SETSIZE + 1, (fd_set *)buffer, NULL, NULL, &timeout);
+
+ return 0;
+}
diff --git a/test/sfd.c b/test/sfd.c
new file mode 100644
index 0000000..815da80
--- /dev/null
+++ b/test/sfd.c
@@ -0,0 +1,40 @@
+#include <fcntl.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ int pid = atoi(argv[1]);
+ int sfd;
+ char sname[32];
+ char buf[1024];
+ char *s;
+ int i;
+ int signal, blocked, ignore, caught;
+
+ sprintf(sname, "/proc/%d/stat", pid);
+
+ sfd = open(sname, O_RDONLY);
+ if (sfd == -1) {
+ perror(sname);
+ return 1;
+ }
+
+ i = read(sfd, buf, 1024);
+ buf[i] = '\0';
+
+ for (i = 0, s = buf; i < 30; i++) {
+ while (*++s != ' ') {
+ if (!*s)
+ break;
+ }
+ }
+
+ if (sscanf(s, "%d%d%d%d", &signal, &blocked, &ignore, &caught) != 4) {
+ fprintf(stderr, "/proc/pid/stat format error\n");
+ return 1;
+ }
+
+ printf("%8x %8x %8x %8x\n", signal, blocked, ignore, caught);
+
+ return 0;
+}
diff --git a/test/sig.c b/test/sig.c
new file mode 100644
index 0000000..1678b02
--- /dev/null
+++ b/test/sig.c
@@ -0,0 +1,19 @@
+#include <stdlib.h>
+#include <signal.h>
+#include <unistd.h>
+
+void interrupt()
+{
+ write(2, "xyzzy\n", 6);
+}
+
+int main(int argc, char *argv[])
+{
+ char buf[1024];
+
+ signal(SIGINT, interrupt);
+ read(0, buf, 1024);
+ write(2, "qwerty\n", 7);
+
+ return 0;
+}
diff --git a/test/sigkill_rain.c b/test/sigkill_rain.c
new file mode 100644
index 0000000..59af55b
--- /dev/null
+++ b/test/sigkill_rain.c
@@ -0,0 +1,84 @@
+#include <stdlib.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <stdio.h>
+#include <sys/wait.h>
+
+static const struct sockaddr sa;
+
+int main(int argc, char *argv[])
+{
+ int loops;
+ int pid;
+ sigset_t set;
+
+ printf(
+"Please run me under 'strace -f -oLOG', and examine LOG file for incorrect\n"
+"decoding of interrupted syscalls: grep for 'sendto', '??" /* anti-trigraph gap */ "?', 'unavailable'.\n"
+"Pass number of iterations in argv[1] (default: 999).\n"
+ );
+ fflush(NULL);
+
+ sigemptyset(&set);
+ sigaddset(&set, SIGCHLD);
+ sigprocmask(SIG_BLOCK, &set, NULL);
+
+ loops = 999;
+ if (argv[1])
+ loops = atoi(argv[1]);
+
+ while (--loops >= 0) {
+ pid = fork();
+
+ if (pid < 0)
+ exit(1);
+
+ if (!pid) {
+ /* child */
+ int child = getpid();
+
+ loops = 99;
+ while (--loops) {
+ pid = fork();
+
+ if (pid < 0)
+ exit(1);
+
+ if (!pid) {
+ /* grandchild: kill child */
+ kill(child, SIGKILL);
+ exit(0);
+ }
+
+ /* Add various syscalls you want to test here.
+ * strace will decode them and suddenly find
+ * process disappearing.
+ * But leave at least one case "empty", so that
+ * "kill grandchild" happens quicker.
+ * This produces cases when strace can't even
+ * decode syscall number before process dies.
+ */
+ switch (loops & 1) {
+ case 0:
+ break; /* intentionally empty */
+ case 1:
+ sendto(-1, "Hello cruel world", 17, 0, &sa, sizeof(sa));
+ break;
+ }
+
+ /* kill grandchild */
+ kill(pid, SIGKILL);
+ }
+
+ exit(0);
+ }
+
+ /* parent */
+ wait(NULL);
+ }
+
+ return 0;
+}
diff --git a/test/sigreturn.c b/test/sigreturn.c
new file mode 100644
index 0000000..246a3ce
--- /dev/null
+++ b/test/sigreturn.c
@@ -0,0 +1,30 @@
+/*
+ * Check that strace output contains RT_1 RT_3 RT_31 RT_32 here:
+ * rt_sigprocmask(SIG_BLOCK, [CHLD RT_1 RT_3 RT_31 RT_32], NULL, 8) = 0
+ * and here:
+ * sigreturn() (mask [CHLD RT_1 RT_3 RT_31 RT_32]) = 0
+ *
+ * On x86, both 32-bit and 64-bit strace needs to be checked.
+ */
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+
+void null_handler(int sig)
+{
+}
+
+int main(int argc, char *argv[])
+{
+ sigset_t set;
+ sigemptyset(&set);
+ sigaddset(&set, SIGCHLD);
+ sigaddset(&set, 33);
+ sigaddset(&set, 35);
+ sigaddset(&set, 63);
+ sigaddset(&set, 64);
+ sigprocmask(SIG_BLOCK, &set, NULL);
+ signal(SIGWINCH, null_handler);
+ raise(SIGWINCH);
+ return 0;
+}
diff --git a/test/skodic.c b/test/skodic.c
new file mode 100644
index 0000000..4dcd955
--- /dev/null
+++ b/test/skodic.c
@@ -0,0 +1,37 @@
+/* This demonstrates races: kernel may actually open other file then
+ * you read at strace output. Create /tmp/delme with 10K of zeros and
+ * 666 mode, then run this under strace. If you see open successfull
+ * open of /etc/shadow, you know you've seen a race.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+int main(int argc, char *argv[])
+{
+ char *c;
+ int fd;
+
+ fd = open("/tmp/delme", O_RDWR);
+ c = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ *c = 0;
+
+ if (fork()) {
+ while (1) {
+ strcpy(c, "/etc/passwd");
+ strcpy(c, "/etc/shadow");
+ }
+ } else {
+ while (1)
+ if ((fd = open(c, 0)) != -1)
+ close(fd);
+ }
+
+ return 0;
+}
diff --git a/test/threaded_execve.c b/test/threaded_execve.c
new file mode 100644
index 0000000..4c21688
--- /dev/null
+++ b/test/threaded_execve.c
@@ -0,0 +1,147 @@
+/*
+ * Create NUM_THREADS threads which print "1" and sleep in pause().
+ * Then create another thread which prints "2", and re-execs the program.
+ * The leader then either sleeps in pause(), or exits if $LEADER_EXIT is set.
+ * This triggers "execve'ed thread replaces thread leader" case.
+ *
+ * gcc -Wall -Os -o threaded_execve threaded_execve.c
+ *
+ * Try running it under strace like this:
+ *
+ * # Should not be confused by traced execve-ing thread
+ * # replacing traced leader:
+ * strace -oLOG -f ./threaded_execve
+ *
+ * # Same, but different output mode. Output after execve
+ * # should go into leader's LOG.<pid> file, not into execve'ed
+ * # thread's log file:
+ * strace -oLOG -ff ./threaded_execve
+ *
+ * # Should not be confused by non-traced execve-ing thread
+ * # replacing traced leader:
+ * strace -oLOG ./threaded_execve
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ * In Linux 3.2, non-traced execve-ing thread does not
+ * become traced after execve, even though it has pid == leader's pid
+ * after execve. And yet, strace's waitpid doesn't return ECHILD.
+ *
+ * # Run for NUM seconds, not just one second.
+ * # Watch top to check for memory leaks in strace:
+ * strace -oLOG -f ./threaded_execve <NUM>
+ *
+ */
+#define NUM_THREADS 1
+
+#define _GNU_SOURCE 1
+#include <assert.h>
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <sched.h>
+#include <signal.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/syscall.h>
+
+/* Define clone2 for all arches */
+#ifdef __ia64__
+extern int __clone2(int (*fn) (void *), void *child_stack_base,
+ size_t stack_size, int flags, void *arg, ...);
+#define clone2 __clone2
+#elif defined(__metag__)
+#define clone2(func, stack_base, size, flags, arg...) \
+ clone(func, stack_base, flags, arg)
+#else
+#define clone2(func, stack_base, size, flags, arg...) \
+ clone(func, (stack_base) + (size), flags, arg)
+#endif
+/* Direct calls to syscalls, avoiding libc wrappers */
+#define syscall_tgkill(pid, tid, sig) syscall(__NR_tgkill, (pid), (tid), (sig))
+#define syscall_getpid() syscall(__NR_getpid)
+#define syscall_gettid() syscall(__NR_gettid)
+#define syscall_exit(v) syscall(__NR_exit, (v));
+
+static char my_name[PATH_MAX];
+static int leader_final_action;
+
+static int
+thread1(void *unused)
+{
+ write(1, "1", 1);
+ for(;;) pause();
+ return 0;
+}
+
+static int
+thread2(void *unused)
+{
+ char buf[64];
+ sprintf(buf, "%d", leader_final_action);
+ write(1, "2", 1);
+ usleep(20*1000);
+ /* This fails with ENOENT if leader has exited by now! :) */
+ execl("/proc/self/exe", "exe", "exe", buf, NULL);
+ /* So fall back to resolved name */
+ execl(my_name, "exe", "exe", buf, NULL);
+ for(;;) pause();
+ return 0;
+}
+
+static void
+thread_leader(void)
+{
+ /* malloc gives sufficiently aligned buffer.
+ * long buf[] does not! (on ia64).
+ */
+ int cnt = NUM_THREADS;
+ while (--cnt >= 0) {
+ /* As seen in pthread_create(): */
+ clone2(thread1, malloc(16 * 1024), 16 * 1024, 0
+ | CLONE_VM
+ | CLONE_FS
+ | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM
+ | 0 /* no signal to send on death */
+ , NULL);
+ usleep(20*1000);
+ }
+ clone2(thread2, malloc(16 * 1024), 16 * 1024, 0
+ | CLONE_VM
+ | CLONE_FS
+ | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM
+ | 0 /* no signal to send on death */
+ , NULL);
+
+ /* Various states leader can be while other thread execve's: */
+ switch (leader_final_action % 3) {
+ case 0: syscall_exit(42); /* leader is dead */
+ case 1: for(;;) pause(); /* leader is in syscall */
+ default: for(;;) continue; /* leader is in userspace */
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ if (readlink("/proc/self/exe", my_name, sizeof(my_name)-1) <= 0)
+ return 1;
+
+ setbuf(stdout, NULL);
+
+ if (argv[1] && strcmp(argv[1], "exe") == 0) {
+ leader_final_action = atoi(argv[2]) + 1;
+ thread_leader();
+ }
+
+ printf("%d: thread leader\n", getpid());
+
+ alarm(argv[1] ? atoi(argv[1]) : 1);
+ thread_leader();
+
+ return 0;
+}
diff --git a/test/ubi.c b/test/ubi.c
new file mode 100644
index 0000000..5062c83
--- /dev/null
+++ b/test/ubi.c
@@ -0,0 +1,54 @@
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <mtd/ubi-user.h>
+
+#define zero(x) memset(&x, 0, sizeof(x))
+
+int main() {
+ int fd = open("/dev/null", 0);
+ struct ubi_mkvol_req mkvol = {
+ .vol_id = 3,
+ .alignment = 124,
+ .bytes = 1125899906842624ULL,
+ .vol_type = 3,
+ .name_len = 7,
+ .name = "foobar",
+ };
+ struct ubi_rsvol_req rsvol = {
+ .bytes = 1125899906842624ULL,
+ .vol_id = -3,
+ };
+ struct ubi_rnvol_req rnvol = {
+ .count = 300,
+ };
+ struct ubi_attach_req attach;
+ struct ubi_map_req map;
+ struct ubi_set_vol_prop_req prop = {
+ .property = 1,
+ .value = 1125899906842624ULL,
+ };
+ uint64_t bytes = ((uint64_t)1 << 50) | 0x123;
+
+ ioctl(fd, UBI_IOCMKVOL, &mkvol);
+ ioctl(fd, UBI_IOCRSVOL, &rsvol);
+ ioctl(fd, UBI_IOCRNVOL, &rnvol);
+ ioctl(fd, UBI_IOCATT, &attach);
+ ioctl(fd, UBI_IOCVOLUP, &bytes);
+ ioctl(fd, UBI_IOCEBMAP, &map);
+ ioctl(fd, UBI_IOCSETVOLPROP, &prop);
+ zero(prop);
+ ioctl(fd, UBI_IOCSETVOLPROP, &prop);
+ ioctl(fd, UBI_IOCRMVOL, 1);
+ ioctl(fd, UBI_IOCDET, 2);
+ ioctl(fd, UBI_IOCEBER, 3);
+ ioctl(fd, UBI_IOCEBCH, 4);
+ ioctl(fd, UBI_IOCEBUNMAP, 5);
+ ioctl(fd, UBI_IOCEBISMAP, 6);
+
+ return 0;
+}
diff --git a/test/vfork.c b/test/vfork.c
new file mode 100644
index 0000000..f49a473
--- /dev/null
+++ b/test/vfork.c
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+int main(int argc, char *argv[])
+{
+ if (vfork() == 0) {
+ write(1, "child\n", 6);
+ } else {
+ wait(0);
+ write(1, "parent\n", 7);
+ }
+
+ exit(0);
+}
diff --git a/test/wait_must_be_interruptible.c b/test/wait_must_be_interruptible.c
new file mode 100644
index 0000000..3fb3449
--- /dev/null
+++ b/test/wait_must_be_interruptible.c
@@ -0,0 +1,84 @@
+#include <unistd.h>
+#include <sys/types.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <stdio.h>
+#include <string.h>
+
+/* Expected order is:
+ * Child signals parent
+ * Parent got signal
+ * Child will exit now
+ *
+ * The bug we test for: under strace -f, last two lines are swapped
+ * because wait syscall is suspended by strace and thus can't be interrupted.
+ */
+
+static const char msg1[] = "Child signals parent\n";
+static const char msg2[] = "Parent got signal\n";
+static const char msg3[] = "Child will exit now\n";
+
+static void handler(int s)
+{
+ write(1, msg2, sizeof(msg2)-1);
+}
+
+static void test()
+{
+ /* Note: in Linux, signal() installs handler with SA_RESTART flag,
+ * therefore wait will be restarted.
+ */
+ signal(SIGALRM, handler);
+
+ if (fork() == 0) {
+ /* child */
+ sleep(1);
+ write(1, msg1, sizeof(msg1)-1);
+ kill(getppid(), SIGALRM);
+ sleep(1);
+ write(1, msg3, sizeof(msg3)-1);
+ _exit(0);
+ }
+
+ /* parent */
+ wait(NULL);
+ _exit(0);
+}
+
+int main()
+{
+ char buf1[80];
+ char buf2[80];
+ char buf3[80];
+ int pipefd[2];
+
+ printf("Please run me under 'strace -f'\n");
+
+ pipe(pipefd);
+
+ if (fork() == 0) {
+ if (pipefd[1] != 1) {
+ dup2(pipefd[1], 1);
+ close(pipefd[1]);
+ }
+ test();
+ }
+
+ if (pipefd[0] != 0) {
+ dup2(pipefd[0], 0);
+ close(pipefd[0]);
+ }
+ fgets(buf1, 80, stdin); printf("%s", buf1);
+ fgets(buf2, 80, stdin); printf("%s", buf2);
+ fgets(buf3, 80, stdin); printf("%s", buf3);
+
+ if (strcmp(buf1, msg1) != 0
+ || strcmp(buf2, msg2) != 0
+ || strcmp(buf3, msg3) != 0
+ ) {
+ printf("ERROR! Expected order:\n%s%s%s", msg1, msg2, msg3);
+ return 1;
+ }
+ printf("Good: wait seems to be correctly interrupted by signals\n");
+ return 0;
+}
diff --git a/test/x32_lseek.c b/test/x32_lseek.c
new file mode 100644
index 0000000..6faa2fa
--- /dev/null
+++ b/test/x32_lseek.c
@@ -0,0 +1,38 @@
+// Test program which explores whether lseek syscall (not llseek!)
+// on x32 uses 64-bit offset argument.
+// IOW: does _kernel_ truncate it on entry?
+// The answer appears to be "no, full 64-bit offset is used".
+// strace must show it correctly too - tricky if strace itself is x32 one!
+//
+// Build: x86_64-gcc -static -Wall -ox32_lseek x32_lseek.c
+// Run: $ strace ./x32_lseek 2>&1 | grep lseek | grep 1250999896321
+// lseek(0, 1250999896321, SEEK_SET) = 1250999896321
+#define _GNU_SOURCE
+#include <sys/types.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <sys/syscall.h>
+// Ensure we are compiling to 64 bits
+struct bug { int t[sizeof(long) > 4 ? 1 : -1]; };
+int main(int argc, char **argv)
+{
+ long ofs = 0x12345678901;
+ errno = 0;
+ close(0);
+ if (open("/etc/passwd", O_RDONLY))
+ return 1;
+ long r = syscall(
+ (long) (__NR_lseek | 0x40000000), // make x32 call
+ (long) (0),
+ (long) (ofs),
+ (long) (SEEK_SET)
+ );
+ printf("pos:%ld(0x%lx) errno:%m\n", r, r);
+ if (!errno)
+ printf((r == ofs) ? "64-bit offset used\n" : "Kernel truncated offset\n");
+ return 0;
+}
diff --git a/test/x32_mmap.c b/test/x32_mmap.c
new file mode 100644
index 0000000..cbef36d
--- /dev/null
+++ b/test/x32_mmap.c
@@ -0,0 +1,49 @@
+// Test program which explores whether mmap's ofs parameter
+// is 64-bit, and whether it needs to be shifted << PAGE_SHIFT.
+// Apparently it is 64-bit and isn't shifted.
+//
+// Build: x86_64-gcc -static -Wall -ox32_mmap x32_mmap.c
+// Typical output:
+// 7f9390696000-7f93906a6000 r--s 12345670000 08:06 2224545 /etc/passwd
+// ^^^^^^^^^^^
+#define _GNU_SOURCE
+#include <sys/types.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <sys/syscall.h>
+// Ensure we are compiling to 64 bits
+struct bug { int t[sizeof(long) > 4 ? 1 : -1]; };
+int main(int argc, char **argv)
+{
+ long ofs = 0x12345670000; // fails if not page-aligned
+ errno = 0;
+ close(0);
+ if (open("/etc/passwd", O_RDONLY))
+ return 1;
+ long r = syscall(
+ (long) (__NR_mmap | 0x40000000), // make x32 call
+ (long) (0), // start
+ (long) (0x10000), // len
+ (long) (PROT_READ), // prot
+ (long) (MAP_SHARED), // flags
+ (long) (0), // fd
+ (long) (ofs) // ofs
+ );
+ printf("ret:0x%lx errno:%m\n", r);
+
+ char buf[16*1024];
+ sprintf(buf, "/proc/%d/maps", getpid());
+ int fd = open(buf, O_RDONLY);
+ if (fd > 0) {
+ int sz = read(fd, buf, sizeof(buf));
+ if (sz > 0)
+ write(1, buf, sz);
+ }
+
+ return 0;
+}
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..c400a79
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,7 @@
+net-accept-connect
+set_ptracer_any
+sigaction
+*.log
+*.log.*
+*.o
+*.trs
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..82226df
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,25 @@
+# Automake input for strace tests.
+
+AM_CFLAGS = $(WARN_CFLAGS)
+
+check_PROGRAMS = net-accept-connect set_ptracer_any sigaction
+
+TESTS = \
+ ptrace_setoptions.test \
+ strace-f.test \
+ qual_syscall.test \
+ sigaction.test \
+ stat.test \
+ net.test \
+ net-fd.test \
+ detach-sleeping.test \
+ detach-stopped.test \
+ detach-running.test
+
+net-fd.log: net.log
+
+TEST_LOG_COMPILER = $(srcdir)/run.sh
+
+EXTRA_DIST = init.sh run.sh sigaction.awk $(TESTS)
+
+CLEANFILES = $(TESTS:=.tmp)
diff --git a/tests/detach-running.test b/tests/detach-running.test
new file mode 100755
index 0000000..16f552b
--- /dev/null
+++ b/tests/detach-running.test
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+# Ensure that strace can detach from running processes.
+
+. "${srcdir=.}/init.sh"
+
+check_prog sleep
+check_prog grep
+
+set -e
+
+./set_ptracer_any sh -c "echo > $LOG; while :; do :; done" > /dev/null &
+
+while ! [ -s $LOG ]; do
+ kill -0 $! 2> /dev/null ||
+ fail_ 'set_ptracer_any sh failed'
+ $SLEEP_A_BIT
+done
+
+tracee_pid=$!
+
+cleanup()
+{
+ set +e
+ kill $tracee_pid
+ wait $tracee_pid 2> /dev/null
+}
+
+rm -f $LOG
+$STRACE -p $tracee_pid 2> $LOG &
+
+while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
+ kill -0 $! 2> /dev/null ||
+ { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+ $SLEEP_A_BIT
+done
+
+kill -INT $!
+wait $!
+
+grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
+ { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
+
+if [ -f /proc/self/status ]; then
+ $SLEEP_A_BIT
+ test -d /proc/$tracee_pid ||
+ { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
+ grep '^State:.*R (running)' < /proc/$tracee_pid/status > /dev/null || {
+ cat $LOG
+ grep '^State:' < /proc/$tracee_pid/status
+ cleanup
+ fail_ 'tracee is not running after detach'
+ }
+fi
+
+cleanup
+exit 0
diff --git a/tests/detach-sleeping.test b/tests/detach-sleeping.test
new file mode 100755
index 0000000..92138b5
--- /dev/null
+++ b/tests/detach-sleeping.test
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Ensure that strace can detach from sleeping processes.
+
+. "${srcdir=.}/init.sh"
+
+check_prog sleep
+check_prog grep
+
+set -e
+
+rm -f $LOG
+./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
+
+while ! [ -s $LOG ]; do
+ kill -0 $! 2> /dev/null ||
+ fail_ 'set_ptracer_any sleep failed'
+ $SLEEP_A_BIT
+done
+
+tracee_pid=$!
+
+cleanup()
+{
+ set +e
+ kill $tracee_pid
+ wait $tracee_pid 2> /dev/null
+}
+
+rm -f $LOG
+$STRACE -p $tracee_pid 2> $LOG &
+
+while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
+ kill -0 $! 2> /dev/null ||
+ { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+ $SLEEP_A_BIT
+done
+
+kill -INT $!
+wait $!
+
+grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
+ { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
+
+if [ -f /proc/self/status ]; then
+ $SLEEP_A_BIT
+ test -d /proc/$tracee_pid ||
+ { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
+ grep '^State:.*S (sleeping)' < /proc/$tracee_pid/status > /dev/null || {
+ cat $LOG
+ grep '^State:' < /proc/$tracee_pid/status
+ cleanup
+ fail_ 'tracee is not sleeping after detach'
+ }
+fi
+
+cleanup
+exit 0
diff --git a/tests/detach-stopped.test b/tests/detach-stopped.test
new file mode 100755
index 0000000..81fd303
--- /dev/null
+++ b/tests/detach-stopped.test
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# Ensure that strace can detach from stopped processes.
+
+. "${srcdir=.}/init.sh"
+
+check_prog sleep
+check_prog grep
+
+set -e
+
+rm -f $LOG
+./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > $LOG &
+
+while ! [ -s $LOG ]; do
+ kill -0 $! 2> /dev/null ||
+ fail_ 'set_ptracer_any sleep failed'
+ $SLEEP_A_BIT
+done
+
+tracee_pid=$!
+kill -STOP $tracee_pid
+
+cleanup()
+{
+ set +e
+ kill $tracee_pid
+ kill -CONT $tracee_pid
+ wait $tracee_pid 2> /dev/null
+}
+
+rm -f $LOG
+$STRACE -p $tracee_pid 2> $LOG &
+
+while ! grep -F "Process $tracee_pid attached" $LOG > /dev/null; do
+ kill -0 $! 2> /dev/null ||
+ { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+ $SLEEP_A_BIT
+done
+
+while ! grep -F -e '--- stopped by ' $LOG > /dev/null; do
+ kill -0 $! 2> /dev/null ||
+ { cat $LOG; cleanup; fail_ 'strace -p does not work'; }
+ $SLEEP_A_BIT
+done
+
+kill -INT $!
+wait $!
+
+grep -F "Process $tracee_pid detached" $LOG > /dev/null ||
+ { cat $LOG; cleanup; fail_ 'strace -p failed to detach'; }
+
+if [ -f /proc/self/status ]; then
+ $SLEEP_A_BIT
+ test -d /proc/$tracee_pid ||
+ { cat $LOG; cleanup; fail_ 'tracee died after detach'; }
+ grep '^State:.*T (stopped)' < /proc/$tracee_pid/status > /dev/null || {
+ cat $LOG
+ grep '^State:' < /proc/$tracee_pid/status
+ cleanup
+ fail_ 'tracee is not group-stopped after detach'
+ }
+fi
+
+cleanup
+exit 0
diff --git a/tests/init.sh b/tests/init.sh
new file mode 100644
index 0000000..3976a1e
--- /dev/null
+++ b/tests/init.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+ME_="${0##*/}"
+
+LOG="$ME_.tmp"
+rm -f "$LOG"
+
+warn_() { printf >&2 '%s\n' "$*"; }
+fail_() { warn_ "$ME_: failed test: $*"; exit 1; }
+skip_() { warn_ "$ME_: skipped test: $*"; exit 77; }
+framework_failure_() { warn_ "$ME_: framework failure: $*"; exit 99; }
+framework_skip_() { warn_ "$ME_: framework skip: $*"; exit 77; }
+
+check_prog()
+{
+ type "$@" > /dev/null 2>&1 ||
+ framework_skip_ "$* is not available"
+}
+
+: "${STRACE:=../strace}"
+: "${TIMEOUT_DURATION:=60}"
+: "${SLEEP_A_BIT:=sleep 1}"
diff --git a/tests/net-accept-connect.c b/tests/net-accept-connect.c
new file mode 100644
index 0000000..5af7d81
--- /dev/null
+++ b/tests/net-accept-connect.c
@@ -0,0 +1,49 @@
+#include <assert.h>
+#include <stddef.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+#define SUN_PATH "local-stream"
+int main(void)
+{
+ struct sockaddr_un addr = {
+ .sun_family = AF_UNIX,
+ .sun_path = SUN_PATH
+ };
+ socklen_t len = offsetof(struct sockaddr_un, sun_path) + sizeof SUN_PATH;
+
+ unlink(SUN_PATH);
+ close(0);
+ close(1);
+
+ assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 0);
+ assert(bind(0, (struct sockaddr *) &addr, len) == 0);
+ assert(listen(0, 5) == 0);
+
+ memset(&addr, 0, sizeof addr);
+ assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0);
+
+ pid_t pid = fork();
+ assert(pid >= 0);
+
+ if (pid) {
+ assert(accept(0, (struct sockaddr *) &addr, &len) == 1);
+ assert(close(0) == 0);
+ int status;
+ assert(waitpid(pid, &status, 0) == pid);
+ assert(status == 0);
+ assert(close(1) == 0);
+ } else {
+ assert(socket(PF_LOCAL, SOCK_STREAM, 0) == 1);
+ assert(close(0) == 0);
+ assert(connect(1, (struct sockaddr *) &addr, len) == 0);
+ assert(close(1) == 0);
+ return 0;
+ }
+
+ unlink(SUN_PATH);
+ return 0;
+}
diff --git a/tests/net-fd.test b/tests/net-fd.test
new file mode 100755
index 0000000..0f6b4e2
--- /dev/null
+++ b/tests/net-fd.test
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Check how network syscalls are traced when decoding socket descriptors
+
+. "${srcdir=.}/init.sh"
+
+# strace -y is implemented using /proc/self/fd
+[ -d /proc/self/fd/ ] ||
+ framework_skip_ '/proc/self/fd/ is not available'
+
+check_prog grep
+check_prog rm
+
+rm -f $LOG.*
+
+./net-accept-connect ||
+ fail_ 'net-accept-connect failed'
+
+# using -y to test socket descriptors 'paths' decoding
+args="-tt -ff -y -o $LOG -enetwork ./net-accept-connect"
+$STRACE $args ||
+ fail_ "strace $args failed"
+
+"$srcdir"/../strace-log-merge $LOG > $LOG || {
+ cat $LOG
+ fail_ 'strace-log-merge failed'
+}
+
+rm -f $LOG.*
+
+grep_log()
+{
+ local syscall="$1"; shift
+ local prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +'
+
+ LC_ALL=C grep -E -x "$prefix$syscall$@" $LOG > /dev/null || {
+ cat $LOG
+ fail_ "strace -enetwork failed to trace \"$syscall\" properly"
+ }
+}
+grep_log bind '\(0<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
+grep_log listen '\(0<socket:\[[0-9]+\]>, 5\) += 0'
+grep_log getsockname '\(0<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, \[15\]\) += 0'
+grep_log accept '\(0<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1'
+grep_log connect '\(1<socket:\[[0-9]+\]>, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
+
+exit 0
diff --git a/tests/net.test b/tests/net.test
new file mode 100755
index 0000000..de1dae1
--- /dev/null
+++ b/tests/net.test
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# Check how network syscalls are traced.
+
+. "${srcdir=.}/init.sh"
+
+check_prog grep
+check_prog rm
+
+rm -f $LOG.*
+
+./net-accept-connect ||
+ fail_ 'net-accept-connect failed'
+
+args="-tt -ff -o $LOG -enetwork ./net-accept-connect"
+$STRACE $args ||
+ fail_ "strace $args failed"
+
+"$srcdir"/../strace-log-merge $LOG > $LOG || {
+ cat $LOG
+ fail_ 'strace-log-merge failed'
+}
+
+rm -f $LOG.*
+
+grep_log()
+{
+ local syscall="$1"; shift
+ local prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +'
+
+ LC_ALL=C grep -E -x "$prefix$syscall$@" $LOG > /dev/null || {
+ cat $LOG
+ fail_ "strace -enetwork failed to trace \"$syscall\" properly"
+ }
+}
+
+grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0'
+grep_log socket '\(PF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1'
+grep_log bind '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
+grep_log listen '\(0, 5\) += 0'
+grep_log getsockname '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, \[15\]\) += 0'
+grep_log accept '\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), NULL\}, \[2\]\) += 1'
+grep_log connect '\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="local-stream"\}, 15\) += 0'
+
+exit 0
diff --git a/tests/ptrace_setoptions.test b/tests/ptrace_setoptions.test
new file mode 100755
index 0000000..e574e24
--- /dev/null
+++ b/tests/ptrace_setoptions.test
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# Ensure that strace tests kernel PTRACE_O_TRACECLONE
+# and PTRACE_O_TRACESYSGOOD support properly.
+
+. "${srcdir=.}/init.sh"
+
+[ "$(uname -s)" = Linux ] ||
+ skip_ 'The kernel is not a Linux kernel'
+case "$(uname -r)" in
+ 2.[6-9]*|2.[1-5][0-9]*|[3-9].*|[12][0-9]*) ;;
+ *) skip_ 'The kernel is not Linux 2.6.* or newer' ;;
+esac
+
+$STRACE -df -enone / > /dev/null 2> $LOG
+grep -F -x 'ptrace_setoptions = 0xe' $LOG > /dev/null || {
+ cat $LOG
+ fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACECLONE support'
+}
+
+grep -F -x 'ptrace_setoptions = 0x1f' $LOG > /dev/null || {
+ cat $LOG
+ fail_ 'strace -f failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
+}
+
+$STRACE -d -enone / > /dev/null 2> $LOG
+grep -F -x 'ptrace_setoptions = 0x11' $LOG > /dev/null || {
+ cat $LOG
+ fail_ 'strace failed to recognize proper kernel PTRACE_O_TRACESYSGOOD support'
+}
diff --git a/tests/qual_syscall.test b/tests/qual_syscall.test
new file mode 100755
index 0000000..652fcdb
--- /dev/null
+++ b/tests/qual_syscall.test
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Ensure that strace -e trace=set works.
+
+. "${srcdir=.}/init.sh"
+
+check_prog ls
+check_prog grep
+
+$STRACE -e execve ls > /dev/null 2> $LOG &&
+grep '^execve(' $LOG > /dev/null ||
+ { cat $LOG; fail_ 'strace -e execve does not work'; }
+
+grep -v '^execve(' $LOG |
+LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null &&
+ { cat $LOG; fail_ 'strace -e execve does not work properly'; }
+
+$STRACE -e trace=process ls > /dev/null 2> $LOG &&
+grep '^execve(' $LOG > /dev/null ||
+ { cat $LOG; fail_ 'strace -e trace=process does not work'; }
+
+grep '^open' $LOG > /dev/null &&
+ { cat $LOG; fail_ 'strace -e trace=process does not work properly'; }
+
+exit 0
diff --git a/tests/run.sh b/tests/run.sh
new file mode 100755
index 0000000..02d9912
--- /dev/null
+++ b/tests/run.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+. "${srcdir=.}/init.sh"
+
+$STRACE -V > /dev/null ||
+ framework_failure_ "$STRACE is not available"
+
+TIMEOUT="timeout -s 9 $TIMEOUT_DURATION"
+$TIMEOUT true > /dev/null 2>&1 ||
+ TIMEOUT=
+
+exec $TIMEOUT "$@"
diff --git a/tests/set_ptracer_any.c b/tests/set_ptracer_any.c
new file mode 100644
index 0000000..7254a07
--- /dev/null
+++ b/tests/set_ptracer_any.c
@@ -0,0 +1,24 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <stdio.h>
+#include <unistd.h>
+#ifdef HAVE_PRCTL
+# include <sys/prctl.h>
+#endif
+
+int main(int argc, char **argv)
+{
+ if (argc < 2)
+ return 99;
+#if defined HAVE_PRCTL && defined PR_SET_PTRACER && defined PR_SET_PTRACER_ANY
+ (void) prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY);
+#endif
+ if (write(1, "\n", 1) != 1) {
+ perror("write");
+ return 99;
+ }
+ (void) execvp(argv[1], argv + 1);
+ perror(argv[1]);
+ return 99;
+}
diff --git a/tests/sigaction.awk b/tests/sigaction.awk
new file mode 100644
index 0000000..2c4eab6
--- /dev/null
+++ b/tests/sigaction.awk
@@ -0,0 +1,36 @@
+# rt_sigaction on ALPHA has 5 args: sig, act, oact, sigsetsize, restorer.
+# rt_sigaction on SPARC has 5 args: sig, act, oact, restorer, sigsetsize.
+# rt_sigaction on other architectures has 4 args: sig, act, oact, sigsetsize.
+# Some architectures have SA_RESTORER, some don't;
+# in particular, SPARC has and ALPHA hasn't.
+#
+# There are two regexps for each test:
+# the 1st is for any architecture with SA_RESTORER, including SPARC;
+# the 2nd is for any architecture without SA_RESTORER, including ALPHA.
+
+# Test 1.
+NR == 1 && /^rt_sigaction\(SIGUSR2, {SIG_IGN, \[HUP INT\], SA_RESTORER\|SA_RESTART, 0x[0-9a-f]+}, {SIG_DFL, \[\], 0}, (0x[0-9a-f]+, )?(4|8|16)\) = 0$/ {next}
+NR == 1 && /^rt_sigaction\(SIGUSR2, {SIG_IGN, \[HUP INT\], SA_RESTART}, {SIG_DFL, \[\], 0}, (4|8|16)(, 0x[0-9a-f]+)?\) = 0$/ {next}
+
+# Test 2.
+NR == 2 && /^rt_sigaction\(SIGUSR2, {0x[0-9a-f]+, \[QUIT TERM\], SA_RESTORER\|SA_SIGINFO, 0x[0-9a-f]+}, {SIG_IGN, \[HUP INT\], SA_RESTORER\|SA_RESTART, 0x[0-9a-f]+}, (0x[0-9a-f]+, )?(4|8|16)\) = 0$/ {next}
+NR == 2 && /^rt_sigaction\(SIGUSR2, {0x[0-9a-f]+, \[QUIT TERM\], SA_SIGINFO}, {SIG_IGN, \[HUP INT\], SA_RESTART}, (4|8|16)(, 0x[0-9a-f]+)?\) = 0$/ {next}
+
+# Test 3.
+NR == 3 && /^rt_sigaction\(SIGUSR2, {SIG_DFL, \[\], SA_RESTORER, 0x[0-9a-f]+}, {0x[0-9a-f]+, \[QUIT TERM\], SA_RESTORER\|SA_SIGINFO, 0x[0-9a-f]+}, (0x[0-9a-f]+, )?(4|8|16)\) = 0$/ {next}
+NR == 3 && /^rt_sigaction\(SIGUSR2, {SIG_DFL, \[\], 0}, {0x[0-9a-f]+, \[QUIT TERM\], SA_SIGINFO}, (4|8|16)(, 0x[0-9a-f]+)?\) = 0$/ {next}
+
+# The last line.
+NR == 4 && /^\+\+\+ exited with 0 \+\+\+$/ {next}
+
+{
+ print "Line " NR " does not match: " $0
+ exit 1
+}
+
+END {
+ if (NR != 4) {
+ print "Expected 4 lines, found " NR " line(s)."
+ exit 1
+ }
+}
diff --git a/tests/sigaction.c b/tests/sigaction.c
new file mode 100644
index 0000000..82666f9
--- /dev/null
+++ b/tests/sigaction.c
@@ -0,0 +1,36 @@
+#include <assert.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+
+static void handle_signal(int no)
+{
+ _exit(128 + no);
+}
+
+int
+main(void)
+{
+ struct sigaction sa, sa1, sa2, sa3;
+
+ sa.sa_handler = SIG_IGN;
+ sigemptyset(&sa.sa_mask);
+ sigaddset(&sa.sa_mask, SIGHUP);
+ sigaddset(&sa.sa_mask, SIGINT);
+ sa.sa_flags = SA_RESTART;
+ assert(!sigaction(SIGUSR2, &sa, &sa1));
+
+ sa.sa_handler = handle_signal;
+ sigemptyset(&sa.sa_mask);
+ sigaddset(&sa.sa_mask, SIGQUIT);
+ sigaddset(&sa.sa_mask, SIGTERM);
+ sa.sa_flags = SA_SIGINFO;
+ assert(!sigaction(SIGUSR2, &sa, &sa2));
+
+ sa.sa_handler = SIG_DFL;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ assert(!sigaction(SIGUSR2, &sa, &sa3));
+
+ return 0;
+}
diff --git a/tests/sigaction.test b/tests/sigaction.test
new file mode 100755
index 0000000..33732e0
--- /dev/null
+++ b/tests/sigaction.test
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Check rt_sigaction decoding.
+
+. "${srcdir=.}/init.sh"
+
+check_prog awk
+
+./sigaction ||
+ fail_ 'sigaction failed'
+
+args="-o $LOG -ert_sigaction ./sigaction"
+$STRACE $args ||
+ fail_ "strace $args failed"
+
+awk -f "$srcdir"/sigaction.awk $LOG ||
+ { cat $LOG; fail_ 'unexpected output'; }
+
+exit 0
diff --git a/tests/stat.test b/tests/stat.test
new file mode 100755
index 0000000..4176df0
--- /dev/null
+++ b/tests/stat.test
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Check how ftruncate, lseek and stat family syscalls are traced.
+
+. "${srcdir=.}/init.sh"
+
+check_prog dd
+check_prog find
+check_prog grep
+check_prog rm
+
+umask 022
+truncate_cmd='dd seek=46118400000 obs=1 count=0 if=/dev/null of=sample'
+$truncate_cmd > $LOG 2>&1 ||
+ { cat $LOG; framework_skip_ 'failed to create a large sparse file'; }
+rm -f sample
+
+$STRACE -edesc $truncate_cmd 2>&1 > /dev/null 2> $LOG &&
+LC_ALL=C grep -E -x 'ftruncate(64)?\(1, 46118400000\) += 0' $LOG > /dev/null ||
+ { cat $LOG; fail_ 'strace -edesc failed to trace ftruncate/ftruncate64 properly'; }
+
+LC_ALL=C grep -E -x 'lseek\(1, 46118400000, SEEK_CUR\) += 46118400000|_llseek\(1, 46118400000, \[46118400000\], SEEK_CUR\) += 0' $LOG > /dev/null ||
+ { cat $LOG; fail_ 'strace -edesc failed to trace lseek/_llseek properly'; }
+
+$STRACE -efile find -L sample > /dev/null 2> $LOG &&
+LC_ALL=C grep -E -x 'stat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, 0\) += 0' $LOG > /dev/null ||
+ { cat $LOG; fail_ 'strace -efile failed to trace stat/stat64 properly'; }
+
+$STRACE -efile find sample > /dev/null 2> $LOG &&
+LC_ALL=C grep -E -x 'lstat(64)?\("sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}\) += 0|(new)?fstatat(64)?\(AT_FDCWD, "sample", \{st_mode=S_IFREG\|0644, st_size=46118400000, \.\.\.\}, AT_SYMLINK_NOFOLLOW\) += 0' $LOG > /dev/null ||
+ { cat $LOG; fail_ 'strace -efile failed to trace fstatat/fstatat64 properly'; }
+
+rm -f sample
+
+exit 0
diff --git a/tests/strace-f.test b/tests/strace-f.test
new file mode 100755
index 0000000..0c4622c
--- /dev/null
+++ b/tests/strace-f.test
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Ensure that strace -f works.
+
+. "${srcdir=.}/init.sh"
+
+time=/usr/bin/time
+check_prog $time
+
+$STRACE -f $time /bin/ls > $LOG 2>&1 ||
+ { cat $LOG; fail_ 'strace -f does not work'; }
diff --git a/time.c b/time.c
index e457a5f..9f47a71 100644
--- a/time.c
+++ b/time.c
@@ -256,24 +256,34 @@
tprints(", ");
} else {
/* Second (returned) timespec is only significant
- * if syscall was interrupted. We print only its address
- * on _success_, since kernel doesn't modify its value.
+ * if syscall was interrupted. On success, we print
+ * only its address, since kernel doesn't modify it,
+ * and printing the value may show uninitialized data.
*/
- if (is_restart_error(tcp) || !tcp->u_arg[1])
- /* Interrupted (or NULL) */
+ switch (tcp->u_error) {
+ default:
+ /* Not interrupted (slept entire interval) */
+ if (tcp->u_arg[1]) {
+ tprintf("%#lx", tcp->u_arg[1]);
+ break;
+ }
+ /* Fall through: print_timespec(NULL) prints "NULL" */
+ case ERESTARTSYS:
+ case ERESTARTNOINTR:
+ case ERESTARTNOHAND:
+ case ERESTART_RESTARTBLOCK:
+ /* Interrupted */
print_timespec(tcp, tcp->u_arg[1]);
- else
- /* Success */
- tprintf("%#lx", tcp->u_arg[1]);
+ }
}
return 0;
}
static const struct xlat which[] = {
- { ITIMER_REAL, "ITIMER_REAL" },
- { ITIMER_VIRTUAL,"ITIMER_VIRTUAL"},
- { ITIMER_PROF, "ITIMER_PROF" },
- { 0, NULL },
+ XLAT(ITIMER_REAL),
+ XLAT(ITIMER_VIRTUAL),
+ XLAT(ITIMER_PROF),
+ XLAT_END
};
static void
@@ -393,106 +403,121 @@
#endif
static const struct xlat adjtimex_modes[] = {
- { 0, "0" },
+ XLAT(0),
#ifdef ADJ_OFFSET
- { ADJ_OFFSET, "ADJ_OFFSET" },
+ XLAT(ADJ_OFFSET),
#endif
#ifdef ADJ_FREQUENCY
- { ADJ_FREQUENCY, "ADJ_FREQUENCY" },
+ XLAT(ADJ_FREQUENCY),
#endif
#ifdef ADJ_MAXERROR
- { ADJ_MAXERROR, "ADJ_MAXERROR" },
+ XLAT(ADJ_MAXERROR),
#endif
#ifdef ADJ_ESTERROR
- { ADJ_ESTERROR, "ADJ_ESTERROR" },
+ XLAT(ADJ_ESTERROR),
#endif
#ifdef ADJ_STATUS
- { ADJ_STATUS, "ADJ_STATUS" },
+ XLAT(ADJ_STATUS),
#endif
#ifdef ADJ_TIMECONST
- { ADJ_TIMECONST, "ADJ_TIMECONST" },
+ XLAT(ADJ_TIMECONST),
+#endif
+#ifdef ADJ_TAI
+ XLAT(ADJ_TAI),
+#endif
+#ifdef ADJ_SETOFFSET
+ XLAT(ADJ_SETOFFSET),
+#endif
+#ifdef ADJ_MICRO
+ XLAT(ADJ_MICRO),
+#endif
+#ifdef ADJ_NANO
+ XLAT(ADJ_NANO),
#endif
#ifdef ADJ_TICK
- { ADJ_TICK, "ADJ_TICK" },
+ XLAT(ADJ_TICK),
#endif
#ifdef ADJ_OFFSET_SINGLESHOT
- { ADJ_OFFSET_SINGLESHOT, "ADJ_OFFSET_SINGLESHOT" },
+ XLAT(ADJ_OFFSET_SINGLESHOT),
#endif
- { 0, NULL }
+#ifdef ADJ_OFFSET_SS_READ
+ XLAT(ADJ_OFFSET_SS_READ),
+#endif
+ XLAT_END
};
static const struct xlat adjtimex_status[] = {
#ifdef STA_PLL
- { STA_PLL, "STA_PLL" },
+ XLAT(STA_PLL),
#endif
#ifdef STA_PPSFREQ
- { STA_PPSFREQ, "STA_PPSFREQ" },
+ XLAT(STA_PPSFREQ),
#endif
#ifdef STA_PPSTIME
- { STA_PPSTIME, "STA_PPSTIME" },
+ XLAT(STA_PPSTIME),
#endif
#ifdef STA_FLL
- { STA_FLL, "STA_FLL" },
+ XLAT(STA_FLL),
#endif
#ifdef STA_INS
- { STA_INS, "STA_INS" },
+ XLAT(STA_INS),
#endif
#ifdef STA_DEL
- { STA_DEL, "STA_DEL" },
+ XLAT(STA_DEL),
#endif
#ifdef STA_UNSYNC
- { STA_UNSYNC, "STA_UNSYNC" },
+ XLAT(STA_UNSYNC),
#endif
#ifdef STA_FREQHOLD
- { STA_FREQHOLD, "STA_FREQHOLD" },
+ XLAT(STA_FREQHOLD),
#endif
#ifdef STA_PPSSIGNAL
- { STA_PPSSIGNAL, "STA_PPSSIGNAL" },
+ XLAT(STA_PPSSIGNAL),
#endif
#ifdef STA_PPSJITTER
- { STA_PPSJITTER, "STA_PPSJITTER" },
+ XLAT(STA_PPSJITTER),
#endif
#ifdef STA_PPSWANDER
- { STA_PPSWANDER, "STA_PPSWANDER" },
+ XLAT(STA_PPSWANDER),
#endif
#ifdef STA_PPSERROR
- { STA_PPSERROR, "STA_PPSERROR" },
+ XLAT(STA_PPSERROR),
#endif
#ifdef STA_CLOCKERR
- { STA_CLOCKERR, "STA_CLOCKERR" },
+ XLAT(STA_CLOCKERR),
#endif
#ifdef STA_NANO
- { STA_NANO, "STA_NANO" },
+ XLAT(STA_NANO),
#endif
#ifdef STA_MODE
- { STA_MODE, "STA_MODE" },
+ XLAT(STA_MODE),
#endif
#ifdef STA_CLK
- { STA_CLK, "STA_CLK" },
+ XLAT(STA_CLK),
#endif
- { 0, NULL }
+ XLAT_END
};
static const struct xlat adjtimex_state[] = {
#ifdef TIME_OK
- { TIME_OK, "TIME_OK" },
+ XLAT(TIME_OK),
#endif
#ifdef TIME_INS
- { TIME_INS, "TIME_INS" },
+ XLAT(TIME_INS),
#endif
#ifdef TIME_DEL
- { TIME_DEL, "TIME_DEL" },
+ XLAT(TIME_DEL),
#endif
#ifdef TIME_OOP
- { TIME_OOP, "TIME_OOP" },
+ XLAT(TIME_OOP),
#endif
#ifdef TIME_WAIT
- { TIME_WAIT, "TIME_WAIT" },
+ XLAT(TIME_WAIT),
#endif
#ifdef TIME_ERROR
- { TIME_ERROR, "TIME_ERROR" },
+ XLAT(TIME_ERROR),
#endif
- { 0, NULL }
+ XLAT_END
};
#if SUPPORTED_PERSONALITIES > 1
@@ -614,40 +639,70 @@
}
static const struct xlat clockflags[] = {
- { TIMER_ABSTIME, "TIMER_ABSTIME" },
- { 0, NULL }
+ XLAT(TIMER_ABSTIME),
+ XLAT_END
};
static const struct xlat clocknames[] = {
#ifdef CLOCK_REALTIME
- { CLOCK_REALTIME, "CLOCK_REALTIME" },
+ XLAT(CLOCK_REALTIME),
#endif
#ifdef CLOCK_MONOTONIC
- { CLOCK_MONOTONIC, "CLOCK_MONOTONIC" },
+ XLAT(CLOCK_MONOTONIC),
#endif
#ifdef CLOCK_PROCESS_CPUTIME_ID
- { CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID" },
+ XLAT(CLOCK_PROCESS_CPUTIME_ID),
#endif
#ifdef CLOCK_THREAD_CPUTIME_ID
- { CLOCK_THREAD_CPUTIME_ID, "CLOCK_THREAD_CPUTIME_ID" },
+ XLAT(CLOCK_THREAD_CPUTIME_ID),
#endif
#ifdef CLOCK_MONOTONIC_RAW
- { CLOCK_MONOTONIC_RAW, "CLOCK_MONOTONIC_RAW" },
+ XLAT(CLOCK_MONOTONIC_RAW),
#endif
#ifdef CLOCK_REALTIME_COARSE
- { CLOCK_REALTIME_COARSE, "CLOCK_REALTIME_COARSE" },
+ XLAT(CLOCK_REALTIME_COARSE),
#endif
#ifdef CLOCK_MONOTONIC_COARSE
- { CLOCK_MONOTONIC_COARSE, "CLOCK_MONOTONIC_COARSE" },
+ XLAT(CLOCK_MONOTONIC_COARSE),
#endif
- { 0, NULL }
+ XLAT_END
};
+#ifdef CLOCKID_TO_FD
+static const struct xlat cpuclocknames[] = {
+ XLAT(CPUCLOCK_PROF),
+ XLAT(CPUCLOCK_VIRT),
+ XLAT(CPUCLOCK_SCHED),
+ XLAT_END
+};
+#endif
+
+static void
+printclockname(int clockid)
+{
+#ifdef CLOCKID_TO_FD
+ if (clockid < 0) {
+ if ((clockid & CLOCKFD_MASK) == CLOCKFD)
+ tprintf("FD_TO_CLOCKID(%d)", CLOCKID_TO_FD(clockid));
+ else {
+ if(CPUCLOCK_PERTHREAD(clockid))
+ tprintf("MAKE_THREAD_CPUCLOCK(%d,", CPUCLOCK_PID(clockid));
+ else
+ tprintf("MAKE_PROCESS_CPUCLOCK(%d,", CPUCLOCK_PID(clockid));
+ printxval(cpuclocknames, clockid & CLOCKFD_MASK, "CPUCLOCK_???");
+ tprints(")");
+ }
+ }
+ else
+#endif
+ printxval(clocknames, clockid, "CLOCK_???");
+}
+
int
sys_clock_settime(struct tcb *tcp)
{
if (entering(tcp)) {
- printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
+ printclockname(tcp->u_arg[0]);
tprints(", ");
printtv(tcp, tcp->u_arg[1]);
}
@@ -658,7 +713,7 @@
sys_clock_gettime(struct tcb *tcp)
{
if (entering(tcp)) {
- printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
+ printclockname(tcp->u_arg[0]);
tprints(", ");
} else {
if (syserror(tcp))
@@ -673,7 +728,7 @@
sys_clock_nanosleep(struct tcb *tcp)
{
if (entering(tcp)) {
- printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
+ printclockname(tcp->u_arg[0]);
tprints(", ");
printflags(clockflags, tcp->u_arg[1], "TIMER_???");
tprints(", ");
@@ -693,7 +748,7 @@
{
if (exiting(tcp))
return do_adjtimex(tcp, tcp->u_arg[1]);
- printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
+ printclockname(tcp->u_arg[0]);
tprints(", ");
return 0;
}
@@ -702,11 +757,11 @@
# define SIGEV_THREAD_ID 4
#endif
static const struct xlat sigev_value[] = {
- { SIGEV_SIGNAL+1, "SIGEV_SIGNAL" },
- { SIGEV_NONE+1, "SIGEV_NONE" },
- { SIGEV_THREAD+1, "SIGEV_THREAD" },
- { SIGEV_THREAD_ID+1, "SIGEV_THREAD_ID" },
- { 0, NULL }
+ XLAT(SIGEV_SIGNAL),
+ XLAT(SIGEV_NONE),
+ XLAT(SIGEV_THREAD),
+ XLAT(SIGEV_THREAD_ID),
+ XLAT_END
};
#if SUPPORTED_PERSONALITIES > 1
@@ -734,7 +789,7 @@
tprintf("%s, ", signame(sev.sigev_signo));
else
tprintf("%u, ", sev.sigev_signo);
- printxval(sigev_value, sev.sigev_notify + 1, "SIGEV_???");
+ printxval(sigev_value, sev.sigev_notify, "SIGEV_???");
tprints(", ");
if (sev.sigev_notify == SIGEV_THREAD_ID)
tprintf("{%d}", sev.un.tid);
@@ -768,13 +823,20 @@
tprintf("%s, ", signame(sev.sigev_signo));
else
tprintf("%u, ", sev.sigev_signo);
- printxval(sigev_value, sev.sigev_notify+1, "SIGEV_???");
+ printxval(sigev_value, sev.sigev_notify, "SIGEV_???");
tprints(", ");
if (sev.sigev_notify == SIGEV_THREAD_ID)
+#if defined(HAVE_STRUCT_SIGEVENT__SIGEV_UN__PAD)
/* _pad[0] is the _tid field which might not be
present in the userlevel definition of the
struct. */
tprintf("{%d}", sev._sigev_un._pad[0]);
+#elif defined(HAVE_STRUCT_SIGEVENT___PAD)
+ tprintf("{%d}", sev.__pad[0]);
+#else
+# warning unfamiliar struct sigevent => incomplete SIGEV_THREAD_ID decoding
+ tprints("{...}");
+#endif
else if (sev.sigev_notify == SIGEV_THREAD)
tprintf("{%p, %p}", sev.sigev_notify_function,
sev.sigev_notify_attributes);
@@ -788,7 +850,7 @@
sys_timer_create(struct tcb *tcp)
{
if (entering(tcp)) {
- printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
+ printclockname(tcp->u_arg[0]);
tprints(", ");
printsigevent(tcp, tcp->u_arg[1]);
tprints(", ");
@@ -926,8 +988,8 @@
#endif
static const struct xlat timerfdflags[] = {
- { TFD_TIMER_ABSTIME, "TFD_TIMER_ABSTIME" },
- { 0, NULL }
+ XLAT(TFD_TIMER_ABSTIME),
+ XLAT_END
};
int
@@ -936,7 +998,7 @@
if (entering(tcp)) {
/* It does not matter that the kernel uses itimerspec. */
tprintf("%ld, ", tcp->u_arg[0]);
- printxval(clocknames, tcp->u_arg[1], "CLOCK_???");
+ printclockname(tcp->u_arg[0]);
tprints(", ");
printflags(timerfdflags, tcp->u_arg[2], "TFD_???");
tprints(", ");
@@ -949,7 +1011,7 @@
sys_timerfd_create(struct tcb *tcp)
{
if (entering(tcp)) {
- printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
+ printclockname(tcp->u_arg[0]);
tprints(", ");
printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
}
diff --git a/util.c b/util.c
index 919b348..85bb94c 100644
--- a/util.c
+++ b/util.c
@@ -46,9 +46,6 @@
#ifdef HAVE_SYS_REG_H
# include <sys/reg.h>
-# ifndef PTRACE_PEEKUSR
-# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-# endif
#elif defined(HAVE_LINUX_PTRACE_H)
# undef PTRACE_SYSCALL
# ifdef HAVE_STRUCT_IA64_FPREG
@@ -57,7 +54,11 @@
# ifdef HAVE_STRUCT_PT_ALL_USER_REGS
# define pt_all_user_regs XXX_pt_all_user_regs
# endif
+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
+# endif
# include <linux/ptrace.h>
+# undef ptrace_peeksiginfo_args
# undef ia64_fpreg
# undef pt_all_user_regs
#endif
@@ -158,6 +159,53 @@
}
#endif
+/* Find a next bit which is set.
+ * Starts testing at cur_bit.
+ * Returns -1 if no more bits are set.
+ *
+ * We never touch bytes we don't need to.
+ * On big-endian, array is assumed to consist of
+ * current_wordsize wide words: for example, is current_wordsize is 4,
+ * the bytes are walked in 3,2,1,0, 7,6,5,4, 11,10,9,8 ... sequence.
+ * On little-endian machines, word size is immaterial.
+ */
+int
+next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits)
+{
+ const unsigned endian = 1;
+ int little_endian = *(char*)&endian;
+
+ const uint8_t *array = bit_array;
+ unsigned pos = cur_bit / 8;
+ unsigned pos_xor_mask = little_endian ? 0 : current_wordsize-1;
+
+ for (;;) {
+ uint8_t bitmask;
+ uint8_t cur_byte;
+
+ if (cur_bit >= size_bits)
+ return -1;
+ cur_byte = array[pos ^ pos_xor_mask];
+ if (cur_byte == 0) {
+ cur_bit = (cur_bit + 8) & (-8);
+ pos++;
+ continue;
+ }
+ bitmask = 1 << (cur_bit & 7);
+ for (;;) {
+ if (cur_byte & bitmask)
+ return cur_bit;
+ cur_bit++;
+ if (cur_bit >= size_bits)
+ return -1;
+ bitmask <<= 1;
+ /* This check *can't be* optimized out: */
+ if (bitmask == 0)
+ break;
+ }
+ pos++;
+ }
+}
/*
* Print entry in struct xlat table, if there.
*/
@@ -1058,15 +1106,15 @@
}
int
-upeek(struct tcb *tcp, long off, long *res)
+upeek(int pid, long off, long *res)
{
long val;
errno = 0;
- val = ptrace(PTRACE_PEEKUSER, tcp->pid, (char *) off, 0);
+ val = ptrace(PTRACE_PEEKUSER, (pid_t)pid, (char *) off, 0);
if (val == -1 && errno) {
if (errno != ESRCH) {
- perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)", tcp->pid, off);
+ perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)", pid, off);
}
return -1;
}
@@ -1108,15 +1156,15 @@
unsigned long cfm, sof, sol;
long bsp;
- if (ia32) {
+ if (ia64_ia32mode) {
/* Satisfy a false GCC warning. */
*state = NULL;
return 0;
}
- if (upeek(tcp, PT_AR_BSP, &bsp) < 0)
+ if (upeek(tcp->pid, PT_AR_BSP, &bsp) < 0)
return -1;
- if (upeek(tcp, PT_CFM, (long *) &cfm) < 0)
+ if (upeek(tcp->pid, PT_CFM, (long *) &cfm) < 0)
return -1;
sof = (cfm >> 0) & 0x7f;
@@ -1134,8 +1182,8 @@
{
int ret;
- if (ia32)
- ret = upeek(tcp, PT_R11, valp);
+ if (ia64_ia32mode)
+ ret = upeek(tcp->pid, PT_R11, valp);
else
ret = umoven(tcp,
(unsigned long) ia64_rse_skip_regs(*state, 0),
@@ -1148,8 +1196,8 @@
{
int ret;
- if (ia32)
- ret = upeek(tcp, PT_R9, valp);
+ if (ia64_ia32mode)
+ ret = upeek(tcp->pid, PT_R9, valp);
else
ret = umoven(tcp,
(unsigned long) ia64_rse_skip_regs(*state, 1),
@@ -1163,7 +1211,7 @@
int req = PTRACE_POKEDATA;
void *ap;
- if (ia32) {
+ if (ia64_ia32mode) {
ap = (void *) (intptr_t) PT_R11; /* r11 == EBX */
req = PTRACE_POKEUSER;
} else
@@ -1179,7 +1227,7 @@
int req = PTRACE_POKEDATA;
void *ap;
- if (ia32) {
+ if (ia64_ia32mode) {
ap = (void *) (intptr_t) PT_R9; /* r9 == ECX */
req = PTRACE_POKEUSER;
} else
@@ -1270,8 +1318,8 @@
# define arg_setup(tcp, state) (0)
# define arg_finish_change(tcp, state) 0
-# define get_arg0(tcp, cookie, valp) (upeek((tcp), arg0_offset, (valp)))
-# define get_arg1(tcp, cookie, valp) (upeek((tcp), arg1_offset, (valp)))
+# define get_arg0(tcp, cookie, valp) (upeek((tcp)->pid, arg0_offset, (valp)))
+# define get_arg1(tcp, cookie, valp) (upeek((tcp)->pid, arg1_offset, (valp)))
static int
set_arg0(struct tcb *tcp, void *cookie, long val)
@@ -1345,7 +1393,7 @@
/* setbpt/clearbpt never used: */
/* Blackfin is only supported since about linux-2.6.23 */
#elif defined(IA64)
- if (ia32) {
+ if (ia64_ia32mode) {
switch (new) {
case 2:
break; /* x86 SYS_fork */
@@ -1406,6 +1454,9 @@
#elif defined(XTENSA)
/* setbpt/clearbpt never used: */
/* Xtensa is only supported since linux 2.6.13 */
+#elif defined(ARC)
+ /* setbpt/clearbpt never used: */
+ /* ARC only supported since 3.9 */
#else
#warning Do not know how to handle change_syscall for this architecture
#endif /* architecture */
diff --git a/vsprintf.c b/vsprintf.c
index f6019f0..0125e72 100644
--- a/vsprintf.c
+++ b/vsprintf.c
@@ -11,11 +11,15 @@
#include "defs.h"
-#ifdef USE_CUSTOM_PRINTF
+#if USE_CUSTOM_PRINTF
#include <stdarg.h>
#include <limits.h>
+#ifndef HAVE_FPUTS_UNLOCKED
+# define fputs_unlocked fputs
+#endif
+
#define noinline_for_stack /*nothing*/
#define likely(expr) (expr)
#define unlikely(expr) (expr)
diff --git a/xlate.el b/xlate.el
new file mode 100644
index 0000000..d1645e7
--- /dev/null
+++ b/xlate.el
@@ -0,0 +1,78 @@
+;; 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.
+
+;; Description: Automate the construction of strace xlat tables.
+
+;; Usage: Put point and mark around a set of definitions in a header
+;; file. Then grab them with C-c G. Switch to the strace source file
+;; and build the xlat table with C-c B. Then type the name of the table.
+
+(global-set-key "\C-cG" 'grab-xlate)
+(global-set-key "\C-cB" 'build-xlate)
+
+(defvar xlate-list nil
+ "See grab-xlate and build-xlate.")
+
+(defun grab-xlate (beg end)
+ "Grab all of the defined names in the region and save them in xlate-list."
+ (interactive "r")
+ (save-excursion
+ (setq xlate-list nil)
+ (goto-char beg)
+ (beginning-of-line)
+ (while (< (point) end)
+ (and (looking-at "^#[ \t]*define[ \t]+\\([A-Za-z0-9_]+\\)[ \t]+")
+ (setq xlate-list (cons (buffer-substring (match-beginning 1)
+ (match-end 1))
+ xlate-list)))
+ (forward-line)))
+ (and (fboundp 'deactivate-mark)
+ (deactivate-mark))
+ (setq xlate-list (nreverse xlate-list)))
+
+(defun build-xlate (&optional list)
+ "Build and insert an strace xlat table based on the last grab."
+ (interactive)
+ (or list
+ (setq list xlate-list))
+ (beginning-of-line)
+ (save-excursion
+ (insert "static struct xlat ?[] = {\n")
+ (while list
+ (insert "\t{ " (car list) ",\n")
+ (backward-char)
+ (move-to-column 24 'force)
+ (end-of-line)
+ (insert "\"" (car list) "\"")
+ (move-to-column 40 'force)
+ (end-of-line)
+ (insert "},")
+ (forward-line)
+ (setq list (cdr list)))
+ (insert " { 0, NULL },\n")
+ (insert "};\n")
+ (insert "\n"))
+ (search-forward "?")
+ (delete-backward-char 1))