This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] System call for multi-architecture


Yao, this is good, and a great jump forward. Thanks!
One political nit, can you use the name x86_64, instead of em64t or emt64 or amd64 for the 64-bit ISA that is an extension of ia32?
Andrew



Yao Qi wrote:
There were two threads in this maillist about this issue, and I
modified this patch for several time per Mark and Tom's comments, and
feedback from these two threads.

This patch could provide,
  1) draft system call list(for x86, x86_64, and powerpc).
  2) ftrace could work on these three platforms.

This patch could not provide, or could provide in the next step,
  1) 64-bit ftrace trace 32-bit app.
  2) accurate arguments for some system calls.

Mark, Sami,
the patch could give you syscallLists for different architecture.

+ new IpcSubSyscall ("semop", IPC_NUM),
+ new IpcSubSyscall("semget", IPC_NUM),
+ new IpcSubSyscall("semctl", IPC_NUM),
+ new IpcSubSyscall("semtimedop", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("msgsnd", IPC_NUM),
+ new IpcSubSyscall("msgrcv", IPC_NUM),
+ new IpcSubSyscall("msgget", IPC_NUM),
+ new IpcSubSyscall("msgctl", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("", IPC_NUM),
+ new IpcSubSyscall("shmat", IPC_NUM),
+ new IpcSubSyscall("shmdt", IPC_NUM),
+ new IpcSubSyscall("shmget", IPC_NUM),
+ new IpcSubSyscall("shmctl", IPC_NUM)
+ };
+
+ public static Syscall syscallByNum (Task task, int number)
+ {
+ if (number != SOCKET_NUM && number != IPC_NUM)
+ return Syscall.syscallByNum (number, task);
+ else
+ {
+ /** sub syscall number is in . */
+ int subSyscallNumber = 0;
+ try
+ {
+ subSyscallNumber = (int) task.getIsa().getRegisterByName("orig_r3").get(task);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException ("Could not get isa");
+ }
+
+ if (number == SOCKET_NUM)
+ {
+ return socketSubcallList[subSyscallNumber];
+ }
+ else
+ {
+ return ipcSubcallList[subSyscallNumber];
+ }
+ }
+ }
+}
--- /dev/null 2006-09-01 16:42:34.468363500 +0800
+++ frysk-core/frysk/proc/LinuxIa32Syscall.java 2006-09-13 17:12:51.000000000 +0800
@@ -0,0 +1,531 @@
+// This file is part of the program FRYSK.
+//
+// Copyright 2006 Red Hat Inc.
+//
+// FRYSK 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; version 2 of the License.
+//
+// FRYSK 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 FRYSK; if not, write to the Free Software Foundation,
+// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+// +// In addition, as a special exception, Red Hat, Inc. gives You the
+// additional right to link the code of FRYSK with code not covered
+// under the GNU General Public License ("Non-GPL Code") and to
+// distribute linked combinations including the two, subject to the
+// limitations in this paragraph. Non-GPL Code permitted under this
+// exception must only link to the code of FRYSK through those well
+// defined interfaces identified in the file named EXCEPTION found in
+// the source code files (the "Approved Interfaces"). The files of
+// Non-GPL Code may instantiate templates or use macros or inline
+// functions from the Approved Interfaces without causing the
+// resulting work to be covered by the GNU General Public
+// License. Only Red Hat, Inc. may make changes or additions to the
+// list of Approved Interfaces. You must obey the GNU General Public
+// License in all respects for all of the FRYSK code and other code
+// used in conjunction with FRYSK except the Non-GPL Code covered by
+// this exception. If you modify this file, you may extend this
+// exception to your version of the file, but you are not obligated to
+// do so. If you do not wish to provide this exception without
+// modification, you must delete this exception statement from your
+// version and license this file solely under the GPL without
+// exception.
+
+package frysk.proc;
+
+import java.util.HashMap;
+
+public class LinuxIa32Syscall
+{
+ static final int SOCKET_NUM = 102;
+ static final int IPC_NUM = 117;
+
+ // This is used to keep track of syscalls whose number we do not
+ // know.
+ static HashMap unknownSyscalls;
+
+ static class Ia32Syscall + extends Syscall
+ {
+ Ia32Syscall (String name, int number, int numArgs, + String argList, boolean noreturn)
+ {
+ super (name, number, numArgs, argList, noreturn);
+ }
+ Ia32Syscall (String name, int number, int numArgs, String argList)
+ {
+ super (name, number, numArgs, argList);
+ }
+ Ia32Syscall (String name, int number, int numArgs)
+ {
+ super (name, number, numArgs);
+ }
+ Ia32Syscall (String name, int number)
+ {
+ super (name, number);
+ }
+ Ia32Syscall (int number)
+ {
+ super (number);
+ }
+
+ public long getArguments (Task task, int n)
+ {
+ Isa isa;
+ try
+ {
+ isa = task.getIsa();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException ("Could not get isa");
+ }
+
+ switch (n)
+ {
+ case 0:
+ return isa.getRegisterByName ("orig_eax").get (task);
+ case 1:
+ return isa.getRegisterByName("ebx").get (task);
+ case 2:
+ return isa.getRegisterByName("ecx").get (task);
+ case 3:
+ return isa.getRegisterByName("edx").get (task);
+ case 4:
+ return isa.getRegisterByName("esi").get (task);
+ case 5:
+ return isa.getRegisterByName("edi").get (task);
+ case 6:
+ return isa.getRegisterByName("eax").get (task);
+ default:
+ throw new RuntimeException ("unknown syscall arg");
+ }
+ }
+ public long getReturnCode (Task task)
+ {
+ Isa isa;
+ try
+ {
+ isa = task.getIsa();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException ("Could not get isa");
+ }
+ return isa.getRegisterByName ("eax").get (task);
+ }
+ }
+ + static Syscall[] syscallList = {
+ new Ia32Syscall (0),
+ new Ia32Syscall ("exit", 1, 1),
+ new Ia32Syscall ("fork", 2, 0, "i: "),
+ new Ia32Syscall ("read", 3, 3, "i:ibn "),
+ new Ia32Syscall ("write", 4, 3, "i:ibn "),
+ new Ia32Syscall ("open", 5, 3, "i:siv "),
+ new Ia32Syscall ("close", 6, 1, "i:i "),
+ new Ia32Syscall ("waitpid", 7, 3, "i:ipi "),
+ new Ia32Syscall ("creat", 8, 2, "i:sv"),
+ new Ia32Syscall ("link", 9, 2, "i:ss "),
+ new Ia32Syscall ("unlink", 10, 1, "i:s "),
+ new Ia32Syscall ("execve", 11, 3, "i:ppp "),
+ new Ia32Syscall ("chdir", 12, 1, "i:s "),
+ new Ia32Syscall ("time", 13, 1, "i:P "),
+ new Ia32Syscall ("sys_mknod", 14, 3, "i:sii "),
+ new Ia32Syscall ("chmod", 15, 2, "i:si "),
+ new Ia32Syscall ("lchown", 16, 3, "i:sii "),
+ new Ia32Syscall ("break", 17),
+ new Ia32Syscall ("old_stat", 18, 3, "i:pp "),
+ new Ia32Syscall ("lseek", 19, 3, "i:iii "),
+ new Ia32Syscall ("getpid", 20, 0, "i: "),
+ new Ia32Syscall ("mount", 21, 5, "i:sssip "),
+ new Ia32Syscall ("umount", 22, 1, "i:s "),
+ new Ia32Syscall ("setuid", 23, 1, "i:i "),
+ new Ia32Syscall ("getuid", 24, 0, "i: "),
+ new Ia32Syscall ("stime", 25, 1, "i:p "),
+ new Ia32Syscall ("ptrace", 26, 4, "i:iiii "),
+ new Ia32Syscall ("alarm", 27, 1, "i:i "),
+ new Ia32Syscall ("old_fstat", 28, 2, "i:ip "),
+ new Ia32Syscall ("pause", 29, 0, "i: "),
+ new Ia32Syscall ("utime", 30, 2, "i:sP "),
+ new Ia32Syscall ("stty", 31),
+ new Ia32Syscall ("gtty", 32),
+ new Ia32Syscall ("access", 33, 2, "i:si "),
+ new Ia32Syscall ("nice", 34, 1, "i:i "),
+ new Ia32Syscall ("ftime", 35, 1, "i:p "),
+ new Ia32Syscall ("sync", 36, 0, "i: "),
+ new Ia32Syscall ("kill", 37, 2, "i:ii "),
+ new Ia32Syscall ("rename", 38, 2, "i:ss "),
+ new Ia32Syscall ("mkdir", 39, 2, "i:si "),
+ new Ia32Syscall ("rmdir", 40, 1, "i:s "),
+ new Ia32Syscall ("dup", 41, 1, "i:i "),
+ new Ia32Syscall ("pipe", 42, 1, "i:f "),
+ new Ia32Syscall ("times", 43, 1, "i:p "),
+ new Ia32Syscall ("prof", 44),
+ new Ia32Syscall ("brk", 45, 1, "i:p "),
+ new Ia32Syscall ("setgid", 46, 1, "i:i "),
+ new Ia32Syscall ("getgid", 47, 0, "i: "),
+ new Ia32Syscall ("signal", 48, 2, "i:ii "),
+ new Ia32Syscall ("geteuid", 49, 0, "i: "),
+ new Ia32Syscall ("getegid", 50, 0, "i: "),
+ new Ia32Syscall ("acct", 51, 1, "i:S "),
+ new Ia32Syscall ("umount2", 52, 2, "i:si "),
+ new Ia32Syscall ("lock", 53),
+ new Ia32Syscall ("ioctl", 54, 3, "i:iiI "),
+ new Ia32Syscall ("fcntl", 55, 3, "i:iiF "),
+ new Ia32Syscall ("mpx", 56),
+ new Ia32Syscall ("setpgid", 57, 2, "i:ii "),
+ new Ia32Syscall ("ulimit", 58, 2, "i:ii "),
+ new Ia32Syscall ("oldolduname", 59),
+ new Ia32Syscall ("umask", 60, 1, "i:i "),
+ new Ia32Syscall ("chroot", 61, 1, "i:s "),
+ new Ia32Syscall ("ustat", 62, 2, "i:ip "),
+ new Ia32Syscall ("dup2", 63, 2, "i:ii "),
+ new Ia32Syscall ("getppid", 64, 0, "i: "),
+ new Ia32Syscall ("getpgrp", 65, 0, "i: "),
+ new Ia32Syscall ("setsid", 66, 0, "i: "),
+ new Ia32Syscall ("sigaction", 67, 3, "i:ipp "),
+ new Ia32Syscall ("sgetmask", 68),
+ new Ia32Syscall ("ssetmask", 69),
+ new Ia32Syscall ("setreuid", 70, 2, "i:ii "),
+ new Ia32Syscall ("setregid", 71, 2, "i:ii "),
+ new Ia32Syscall ("sigsuspend", 72, 1, "i:p "),
+ new Ia32Syscall ("sigpending", 73, 1, "i:p "),
+ new Ia32Syscall ("sethostname", 74, 2, "i:pi "),
+ new Ia32Syscall ("setrlimit", 75, 2, "i:ip "),
+ new Ia32Syscall ("getrlimit", 76, 2, "i:ip "),
+ new Ia32Syscall ("getrusage", 77, 2, "i:ip "),
+ new Ia32Syscall ("gettimeofday", 78, 2, "i:PP "),
+ new Ia32Syscall ("settimeofday", 79, 2, "i:PP "),
+ new Ia32Syscall ("getgroups", 80, 2, "i:ip "),
+ new Ia32Syscall ("setgroups", 81, 2, "i:ip "),
+ new Ia32Syscall ("select", 82, 5, "i:iPPPP "),
+ new Ia32Syscall ("symlink", 83, 2, "i:ss "),
+ new Ia32Syscall ("oldlstat", 84, 2, "i:pp "),
+ new Ia32Syscall ("readlink", 85, 3, "i:spi "),
+ new Ia32Syscall ("uselib", 86, 1, "i:s "),
+ new Ia32Syscall ("swapon", 87, 2, "i:si "),
+ new Ia32Syscall ("reboot", 88, 1, "i:i "),
+ new Ia32Syscall (89),
+ new Ia32Syscall ("mmap", 90, 6, "b:aniiii "),
+ new Ia32Syscall ("munmap", 91, 2, "i:ai "),
+ new Ia32Syscall ("truncate", 92, 2, "i:si "),
+ new Ia32Syscall ("ftruncate", 93, 2, "i:ii "),
+ new Ia32Syscall ("fchmod", 94, 2, "i:ii "),
+ new Ia32Syscall ("fchown", 95, 3, "i:iii "),
+ new Ia32Syscall ("getpriority", 96, 2, "i:ii "),
+ new Ia32Syscall ("setpriority", 97, 3, "i:iii "),
+ new Ia32Syscall ("profil", 98, 4, "i:piii "),
+ new Ia32Syscall ("statfs", 99, 2, "i:sp "),
+ new Ia32Syscall ("fstatfs", 100, 2, "i:ip "),
+ new Ia32Syscall ("ioperm", 101, 3, "i:iii "),
+ new Ia32Syscall ("socketcall", 102, 2, "i:ip "),
+ new Ia32Syscall ("klogctl", 103, 3, "i:isi "),
+ new Ia32Syscall ("setitimer", 104, 3, "i:ipp "),
+ new Ia32Syscall ("getitimer", 105, 2, "i:ip "),
+ new Ia32Syscall ("sys_stat", 106, 2, "i:sp "),
+ new Ia32Syscall ("sys_lstat", 107, 2, "i:sp "),
+ new Ia32Syscall ("sys_fstat", 108, 2, "i:ip "),
+ new Ia32Syscall ("old_uname", 109, 1, "i:p "),
+ new Ia32Syscall ("iopl", 110, 1, "i:i "),
+ new Ia32Syscall ("vhangup", 111, 1, "i:i "),
+ new Ia32Syscall ("idle", 112, 0, "i: "),
+ new Ia32Syscall (113),
+ new Ia32Syscall ("wait4", 114, 4, "i:iWiP "),
+ new Ia32Syscall ("swapoff", 115, 1, "i:s "),
+ new Ia32Syscall ("sysinfo", 116, 1, "i:p "),
+ new Ia32Syscall ("ipc", 117, 6, "i:iiiipi "),
+ new Ia32Syscall ("fsync", 118, 1, "i:i "),
+ new Ia32Syscall ("sigreturn", 119),
+ new Ia32Syscall ("clone", 120, 2, "i:ip "),
+ new Ia32Syscall ("setdomain", 121, 2, "i:si "),
+ new Ia32Syscall ("uname", 122, 1, "i:p "),
+ new Ia32Syscall ("modify_ldt", 123, 3, "i:ipi "),
+ new Ia32Syscall ("adjtimex", 124, 1, "i:p "),
+ new Ia32Syscall ("mprotect", 125, 3, "i:aii "),
+ new Ia32Syscall ("sigprocmask", 126, 3, "i:ipp "),
+ new Ia32Syscall ("create_module", 127, 3),
+ new Ia32Syscall ("init_module", 128, 5),
+ new Ia32Syscall ("delete_module", 129, 3),
+ new Ia32Syscall ("get_kernel_syms", 130, 1, "i:p "),
+ new Ia32Syscall ("quotactl", 131, 4, "i:isip "),
+ new Ia32Syscall ("getpgid", 132, 1, "i:i "),
+ new Ia32Syscall ("fchdir", 133, 1, "i:i "),
+ new Ia32Syscall ("bdflush", 134, 2, "i:ii "),
+ new Ia32Syscall ("sysfs", 135, 1, "i:i "),
+ new Ia32Syscall ("personality", 136, 1, "i:i "),
+ new Ia32Syscall ("afs_syscall", 137),
+ new Ia32Syscall ("setfsuid", 138, 1, "i:i "),
+ new Ia32Syscall ("setfsgid", 139, 1, "i:i "),
+ new Ia32Syscall ("llseek", 140, 5, "i:iuupi "),
+ new Ia32Syscall ("s_getdents", 141, 3, "i:ipi "),
+ new Ia32Syscall ("select", 142, 5, "i:iPPPP "),
+ new Ia32Syscall ("flock", 143, 2, "i:ii "),
+ new Ia32Syscall ("msync", 144, 3, "i:aii "),
+ new Ia32Syscall ("readv", 145, 3, "i:ipi "),
+ new Ia32Syscall ("writev", 146, 3, "i:ipi "),
+ new Ia32Syscall ("getsid", 147, 1, "i:i "),
+ new Ia32Syscall ("fdatasync", 148, 1, "i:i "),
+ new Ia32Syscall ("sysctl", 149, 1, "i:p "),
+ new Ia32Syscall ("mlock", 150, 2, "i:bn "),
+ new Ia32Syscall ("munlock", 151, 2, "i:ai "),
+ new Ia32Syscall ("mlockall", 152, 1, "i:i "),
+ new Ia32Syscall ("munlockall", 153, 0, "i: "),
+ new Ia32Syscall ("sched_setp", 154, 2, "i:ip "),
+ new Ia32Syscall ("sched_getp", 155, 2, "i:ip "),
+ new Ia32Syscall ("sched_sets", 156, 3, "i:iip "),
+ new Ia32Syscall ("sched_gets", 157, 1, "i:i "),
+ new Ia32Syscall ("sched_yield", 158, 0, "i: "),
+ new Ia32Syscall ("sched_primax", 159, 1, "i:i "),
+ new Ia32Syscall ("sched_primin", 160, 1, "i:i "),
+ new Ia32Syscall ("sched_rr_gi", 161, 2, "i:ip "),
+ new Ia32Syscall ("nanosleep", 162, 2, "i:pp "),
+ new Ia32Syscall ("mremap", 163, 4, "b:aini "),
+ new Ia32Syscall ("setresuid", 164, 3, "i:iii "),
+ new Ia32Syscall ("getresuid", 165, 3, "i:ppp "),
+ new Ia32Syscall ("vm86", 166, 1, "i:p "),
+ new Ia32Syscall ("query_module", 167, 5, "i:sipip "),
+ new Ia32Syscall ("poll", 168, 3, "i:pii "),
+ new Ia32Syscall ("nfsservctl", 169, 3, "i:ipp "),
+ new Ia32Syscall ("setresgid", 170, 3, "i:iii "),
+ new Ia32Syscall ("getresgid", 171, 3, "i:ppp "),
+ new Ia32Syscall ("prctl", 172, 5, "i:iiiii "),
+ new Ia32Syscall ("rt_sigreturn", 173),
+ new Ia32Syscall ("rt_sigaction", 174),
+ new Ia32Syscall ("rt_sigprocmask", 175),
+ new Ia32Syscall ("rt_sigpending", 176),
+ new Ia32Syscall ("rt_sigtimedwait", 177),
+ new Ia32Syscall ("rt_sigqueueinfo", 178),
+ new Ia32Syscall ("rt_sigsuspend", 179),
+ new Ia32Syscall ("pread64", 180),
+ new Ia32Syscall ("pwrite64", 181),
+ new Ia32Syscall ("chown", 182, 3, "i:sii "),
+ new Ia32Syscall ("getcwd", 183, 2, "i:bi "),
+ new Ia32Syscall ("capget", 184, 2, "i:pp "),
+ new Ia32Syscall ("capset", 185, 2, "i:pp "),
+ new Ia32Syscall ("sigaltstack", 186, 2, "i:PP "),
+ new Ia32Syscall ("sendfile", 187, 4, "i:iipi "),
+ new Ia32Syscall ("getpmsg", 188),
+ new Ia32Syscall ("putpmsg", 189),
+ new Ia32Syscall ("vfork", 190, 0, "i: "),
+ new Ia32Syscall ("ugetrlimit", 191),
+ new Ia32Syscall ("mmap", 192, 6, "b:aniiii "),
+ new Ia32Syscall ("truncate64", 193, 3, "i:shl "),
+ new Ia32Syscall ("ftruncate64", 194, 3, "i:ihl "),
+ new Ia32Syscall ("stat64", 195, 2, "i:sp "),
+ new Ia32Syscall ("lstat64", 196, 2, "i:sp "),
+ new Ia32Syscall ("fstat64", 197, 2, "i:ip "),
+ new Ia32Syscall ("lchown32", 198, 3, "i:sii "),
+ new Ia32Syscall ("getuid32", 199),
+ new Ia32Syscall ("getgid32", 200),
+ new Ia32Syscall ("geteuid32", 201),
+ new Ia32Syscall ("getegid32", 202),
+ new Ia32Syscall ("setreuid32", 203, 2, "i:ii "),
+ new Ia32Syscall ("setregid32", 204, 2, "i:ii "),
+ new Ia32Syscall ("getgroups32", 205, 2, "i:ip "),
+ new Ia32Syscall ("setgroups32", 206, 2, "i:ip "),
+ new Ia32Syscall ("fchown32", 207, 3, "i:iii "),
+ new Ia32Syscall ("setresuid32", 208, 3, "i:iii "),
+ new Ia32Syscall ("getresuid32", 209, 3, "i:ppp "),
+ new Ia32Syscall ("setresgid32", 210, 3, "i:iii "),
+ new Ia32Syscall ("getresgid32", 211, 3, "i:ppp "),
+ new Ia32Syscall ("chown32", 212, 3, "i:sii "),
+ new Ia32Syscall ("setuid32", 213, 1, "i:i "),
+ new Ia32Syscall ("setgid32", 214, 1, "i:i "),
+ new Ia32Syscall ("setfsuid32", 215, 1, "i:i "),
+ new Ia32Syscall ("setfsgid32", 216, 1, "i:i "),
+ new Ia32Syscall ("pivot_root", 217, 2, "i:ss "),
+ new Ia32Syscall ("mincore", 218, 3, "i:anV "),
+ new Ia32Syscall ("madvise", 219, 3, "i:pii "),
+ new Ia32Syscall ("getdents64", 220, 3, "i:ipi "),
+ new Ia32Syscall ("fcntl64", 221, 3, "i:iip "),
+ new Ia32Syscall (222),
+ new Ia32Syscall (223),
+ new Ia32Syscall ("gettid", 224, 0),
+ new Ia32Syscall ("readahead", 225, 4, "i:ihli "),
+ new Ia32Syscall ("setxattr", 226),
+ new Ia32Syscall ("lsetxattr", 227),
+ new Ia32Syscall ("fsetxattr", 228),
+ new Ia32Syscall ("getxattr", 229),
+ new Ia32Syscall ("lgetxattr", 230),
+ new Ia32Syscall ("fgetxattr", 231),
+ new Ia32Syscall ("listxattr", 232),
+ new Ia32Syscall ("llistxattr", 233),
+ new Ia32Syscall ("flistxattr", 234),
+ new Ia32Syscall ("removexattr", 235),
+ new Ia32Syscall ("lremovexattr", 236),
+ new Ia32Syscall ("fremovexattr", 237),
+ new Ia32Syscall ("tkill", 238, 2, "i:ii "),
+ new Ia32Syscall ("sendfile64", 239, 4, "i:iipi "),
+ new Ia32Syscall ("futex", 240, 4, "i:piip "),
+ new Ia32Syscall ("sched_setaffinity", 241),
+ new Ia32Syscall ("sched_getaffinity", 242),
+ new Ia32Syscall ("set_thread_area", 243, 1, "i:p "),
+ new Ia32Syscall ("get_thread_area", 244, 1, "i:p "),
+ new Ia32Syscall ("io_setup", 245, 2, "i:ip "),
+ new Ia32Syscall ("io_destroy", 246, 1, "i:i "),
+ new Ia32Syscall ("io_getevents", 247, 5, "i:iiipp "),
+ new Ia32Syscall ("io_submit", 248, 3, "i:iip "),
+ new Ia32Syscall ("io_cancel", 249, 3, "i:ipp "),
+ new Ia32Syscall ("fadvise64", 250),
+ new Ia32Syscall (251),
+ new Ia32Syscall ("exit_group", 252, 1, " :i ", true),
+ new Ia32Syscall ("lookup_dcookie", 253),
+ new Ia32Syscall ("epoll_create", 254),
+ new Ia32Syscall ("epoll_ctl", 255),
+ new Ia32Syscall ("epoll_wait", 256),
+ new Ia32Syscall ("remap_file_pages", 257),
+ new Ia32Syscall ("set_tid_address", 258),
+ new Ia32Syscall ("timer_create", 259),
+ new Ia32Syscall ("timer_settime", 260),
+ new Ia32Syscall ("timer_gettime", 261),
+ new Ia32Syscall ("timer_getoverrun", 262),
+ new Ia32Syscall ("timer_delete", 263),
+ new Ia32Syscall ("clock_settime", 264),
+ new Ia32Syscall ("clock_gettime", 265),
+ new Ia32Syscall ("clock_getres", 266),
+ new Ia32Syscall ("clock_nanosleep", 267),
+ new Ia32Syscall ("statfs64", 268),
+ new Ia32Syscall ("fstatfs64", 269),
+ new Ia32Syscall ("tgkill", 270),
+ new Ia32Syscall ("utimes", 271),
+ new Ia32Syscall ("fadvise64_64", 272)
+ };
+
+
+ static class SocketSubSyscall
+ extends Ia32Syscall
+ {
+ SocketSubSyscall (String name, int number)
+ {
+ super (name, number);
+ }
+ SocketSubSyscall (String name, int number, int numArgs, String argList)
+ {
+ super (name, number, numArgs, argList);
+ }
+
+ public long getArguments (Task task, int n)
+ {
+ /** Arguments in socket subcalls are dereferenced. */
+ Isa isa;
+ try
+ {
+ isa = task.getIsa();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException ("Could not get isa");
+ }
+ long base = isa.getRegisterByName("ecx").get (task);
+
+ //System.out.println(Long.toHexString(base) + " " + n);
+ return task.memory.getInt(base + (n-1) * isa.getWordSize());
+ }
+ }
+
+ static Syscall[] socketSubcallList = {
+ new SocketSubSyscall ("", SOCKET_NUM),
+ new SocketSubSyscall ("socket", SOCKET_NUM, 3, "i:iii"),
+ new SocketSubSyscall ("bind", SOCKET_NUM, 3, "i:ipi "),
+ new SocketSubSyscall ("connect", SOCKET_NUM, 3, "i:ipi "),
+ new SocketSubSyscall ("listen", SOCKET_NUM, 2, "i:ii "),
+ new SocketSubSyscall ("accept", SOCKET_NUM, 3, "i:ipp "),
+ new SocketSubSyscall ("getsockname",SOCKET_NUM, 3, "i:ipp "),
+ new SocketSubSyscall ("getpeername",SOCKET_NUM, 4, "i:iiip "),
+ new SocketSubSyscall ("socketpair", SOCKET_NUM, 4, "i:iiip "),
+ new SocketSubSyscall ("send", SOCKET_NUM, 4, "i:ipii "),
+ new SocketSubSyscall ("recv", SOCKET_NUM, 4, "i:ipii "),
+ new SocketSubSyscall ("sendto", SOCKET_NUM, 6, "i:ipiipi"),
+ new SocketSubSyscall ("recvfrom", SOCKET_NUM, 6, "i:ipiipp "),
+ new SocketSubSyscall ("shutdown", SOCKET_NUM, 2, "i:ii "),
+ new SocketSubSyscall ("setsockopt", SOCKET_NUM, 5, "i:iiipp "),
+ new SocketSubSyscall ("getsockopt", SOCKET_NUM, 5, "i:iiipp "),
+ new SocketSubSyscall ("sendmsg", SOCKET_NUM, 5, "i:iiipp "),
+ new SocketSubSyscall ("recvmsg", SOCKET_NUM, 5, "i:iiipp ")
+ };
+
+
+ static class IpcSubSyscall
+ extends Ia32Syscall
+ {
+ IpcSubSyscall (String name, int number)
+ {
+ super (name, number);
+ }
+ IpcSubSyscall (String name, int number, int numArgs, String argList)
+ {
+ super (name, number, numArgs, argList);
+ }
+ public long getArguments (Task task, int n)
+ {
+ if (n == 0)
+ return super.getArguments (task, 0);
+ else
+ // these arguements are shifted by one.
+ return super.getArguments (task, n+1);
+ }
+ + }
+ /**FIXME: No argument list here.*/
+ static Syscall[] ipcSubcallList = {
+ new IpcSubSyscall ("semop", IPC_NUM),
+ new IpcSubSyscall ("semget", IPC_NUM),
+ new IpcSubSyscall ("semctl", IPC_NUM),
+ new IpcSubSyscall ("semtimedop", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("msgsnd", IPC_NUM),
+ new IpcSubSyscall ("msgrcv", IPC_NUM),
+ new IpcSubSyscall ("msgget", IPC_NUM),
+ new IpcSubSyscall ("msgctl", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("", IPC_NUM),
+ new IpcSubSyscall ("shmat", IPC_NUM),
+ new IpcSubSyscall ("shmdt", IPC_NUM),
+ new IpcSubSyscall ("shmget", IPC_NUM),
+ new IpcSubSyscall ("shmctl", IPC_NUM)
+ };
+
+ public static Syscall syscallByNum (Task task, int number)
+ {
+ if (number != SOCKET_NUM && number != IPC_NUM)
+ return Syscall.syscallByNum (number, task);
+ else
+ {
+ /** sub syscall number is in %ebx. */
+ int subSyscallNumber = 0;
+ try
+ {
+ subSyscallNumber = (int) task.getIsa().getRegisterByName("ebx").get (task);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException ("Could not get isa");
+ }
+
+ if (number == SOCKET_NUM)
+ {
+ return socketSubcallList[subSyscallNumber];
+ }
+ else
+ {
+ return ipcSubcallList[subSyscallNumber];
+ }
+ }
+ }
+}
--- /dev/null 2006-09-01 16:42:34.468363500 +0800
+++ frysk-core/frysk/proc/LinuxEMT64Syscall.java 2006-09-13 17:29:38.000000000 +0800
@@ -0,0 +1,383 @@
+// This file is part of the program FRYSK.
+//
+// Copyright 2005, 2006 Red Hat Inc.
+//
+// FRYSK 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; version 2 of the License.
+//
+// FRYSK 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 FRYSK; if not, write to the Free Software Foundation,
+// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+// +// In addition, as a special exception, Red Hat, Inc. gives You the
+// additional right to link the code of FRYSK with code not covered
+// under the GNU General Public License ("Non-GPL Code") and to
+// distribute linked combinations including the two, subject to the
+// limitations in this paragraph. Non-GPL Code permitted under this
+// exception must only link to the code of FRYSK through those well
+// defined interfaces identified in the file named EXCEPTION found in
+// the source code files (the "Approved Interfaces"). The files of
+// Non-GPL Code may instantiate templates or use macros or inline
+// functions from the Approved Interfaces without causing the
+// resulting work to be covered by the GNU General Public
+// License. Only Red Hat, Inc. may make changes or additions to the
+// list of Approved Interfaces. You must obey the GNU General Public
+// License in all respects for all of the FRYSK code and other code
+// used in conjunction with FRYSK except the Non-GPL Code covered by
+// this exception. If you modify this file, you may extend this
+// exception to your version of the file, but you are not obligated to
+// do so. If you do not wish to provide this exception without
+// modification, you must delete this exception statement from your
+// version and license this file solely under the GPL without
+// exception.
+
+package frysk.proc;
+
+import java.util.HashMap;
+
+public class LinuxEMT64Syscall
+{
+
+ // This is used to keep track of syscalls whose number we do not
+ // know.
+ static HashMap unknownSyscalls;
+
+ static class EMT64Syscall + extends Syscall
+ {
+ EMT64Syscall (String name, int number, int numArgs, + String argList, boolean noreturn)
+ {
+ super (name, number, numArgs, argList, noreturn);
+ }
+ EMT64Syscall (String name, int number, int numArgs, String argList)
+ {
+ super (name, number, numArgs, argList);
+ } + EMT64Syscall (String name, int number, int numArgs)
+ {
+ super (name, number, numArgs);
+ }
+ EMT64Syscall (String name, int number)
+ {
+ super (name, number);
+ }
+ EMT64Syscall (int number)
+ {
+ super (number);
+ }
+ public long getArguments (Task task, int n)
+ {
+ Isa isa;
+ try
+ {
+ isa = task.getIsa();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException ("Could not get isa");
+ }
+
+ switch (n) {
+ case 0:
+ return isa.getRegisterByName ("orig_rax").get(task);
+ case 1:
+ return isa.getRegisterByName("rdi").get(task);
+ case 2:
+ return isa.getRegisterByName("rsi").get (task);
+ case 3:
+ return isa.getRegisterByName("rdx").get (task);
+ case 4:
+ return isa.getRegisterByName("r10").get (task);
+ case 5:
+ return isa.getRegisterByName("r8").get (task);
+ case 6:
+ return isa.getRegisterByName("r9").get (task);
+ default:
+ throw new RuntimeException ("unknown syscall arg");
+ }
+ }
+ public long getReturnCode (Task task)
+ {
+ Isa isa;
+ try
+ {
+ isa = task.getIsa();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException ("Could not get isa");
+ }
+ return isa.getRegisterByName ("rax").get (task);
+ }
+ }
+ static Syscall[] syscallList = {
+ new EMT64Syscall ("read", 0, 3, "i:ibn "),
+ new EMT64Syscall ("write", 1, 3, "i:ibn "),
+ new EMT64Syscall ("open", 2, 3, "i:siv "),
+ new EMT64Syscall ("close", 3, 1, "i:i "),
+ new EMT64Syscall ("stat", 4, 2, "i:sp "),
+ new EMT64Syscall ("fstat", 5, 2, "i:ip "),
+ new EMT64Syscall ("lstat", 6, 2, "i:sp "),
+ new EMT64Syscall ("poll", 7, 3, "i:pii "),
+ new EMT64Syscall ("lseek", 8, 3, "i:iii "),
+ new EMT64Syscall ("mmap", 9, 6, "b:aniiii "),
+ new EMT64Syscall ("mprotect", 10, 3, "i:aii "),
+ new EMT64Syscall ("munmap", 11, 2, "i:ai "),
+ new EMT64Syscall ("brk", 12, 1, "i:p "),
+ new EMT64Syscall ("rt_sigaction", 13),
+ new EMT64Syscall ("rt_sigprocmask", 14),
+ new EMT64Syscall ("rt_sigreturn", 15),
+ new EMT64Syscall ("ioctl", 16, 3, "i:iiI "),
+ new EMT64Syscall ("pread64", 17),
+ new EMT64Syscall ("pwrite64", 18),
+ new EMT64Syscall ("readv", 19, 3, "i:ipi "),
+ new EMT64Syscall ("writev", 20, 3, "i:ipi "),
+ new EMT64Syscall ("access", 21, 2, "i:si "),
+ new EMT64Syscall ("pipe", 22, 1, "i:f "),
+ new EMT64Syscall ("select", 23, 5, "i:iPPPP "),
+ new EMT64Syscall ("sched_yield", 24, 0, "i: "),
+ new EMT64Syscall ("mremap", 25, 4, "b:aini "),
+ new EMT64Syscall ("msync", 26, 3, "i:aii "),
+ new EMT64Syscall ("mincore", 27, 3, "i:anV "),
+ new EMT64Syscall ("madvise", 28, 3, "i:pii "),
+ new EMT64Syscall ("shmget", 29, 3, "i:iii "),
+ new EMT64Syscall ("shmat", 30, 3, "p:ipi "),
+ new EMT64Syscall ("shmctl", 31, 3, "i:iip "),
+ new EMT64Syscall ("dup", 32, 1, "i:i "),
+ new EMT64Syscall ("dup2", 33, 2, "i:ii "),
+ new EMT64Syscall ("pause", 34, 0, "i: "),
+ new EMT64Syscall ("nanosleep", 35, 2, "i:pp "),
+ new EMT64Syscall ("getitimer", 36, 2, "i:ip "),
+ new EMT64Syscall ("alarm", 37, 1, "i:i "),
+ new EMT64Syscall ("setitimer", 38, 3, "i:ipp "),
+ new EMT64Syscall ("getpid", 39, 0, "i: "),
+ new EMT64Syscall ("sendfile", 40, 4, "i:iipi "),
+ new EMT64Syscall ("socket", 41, 3, "i:iii "),
+ new EMT64Syscall ("connect", 42),
+ new EMT64Syscall ("accept", 43),
+ new EMT64Syscall ("sendto", 44),
+ new EMT64Syscall ("recvfrom", 45),
+ new EMT64Syscall ("sendmsg", 46),
+ new EMT64Syscall ("recvmsg", 47),
+ new EMT64Syscall ("shutdown", 48),
+ new EMT64Syscall ("bind", 49, 3, "i:ipi "),
+ new EMT64Syscall ("listen", 50, 2, "i:ii "),
+ new EMT64Syscall ("getsockname", 51, 3, "i:ipp "),
+ new EMT64Syscall ("getpeername", 52, 4, "i:iiip "),
+ new EMT64Syscall ("socketpair", 53, 4, "i:iiip "),
+ new EMT64Syscall ("setsockopt", 54, 5, "i:iiipp "),
+ new EMT64Syscall ("getsockopt", 55, 5, "i:iiipp "),
+ new EMT64Syscall ("clone", 56, 2, "i:ip "),
+ new EMT64Syscall (58),
+ new EMT64Syscall ("fork", 57, 0, "i: "),
+ new EMT64Syscall ("execve", 59, 3, "i:ppp "),
+ new EMT64Syscall ("exit", 60, 1),
+ new EMT64Syscall ("wait4", 61, 4, "i:iWiP "),
+ new EMT64Syscall ("kill", 62, 2, "i:ii "),
+ new EMT64Syscall ("uname", 63, 1, "i:p "),
+ new EMT64Syscall ("semget", 64),
+ new EMT64Syscall ("semop", 65),
+ new EMT64Syscall ("semctl", 66),
+ new EMT64Syscall ("shmdt", 67),
+ new EMT64Syscall ("msgget", 68),
+ new EMT64Syscall ("msgsnd", 69),
+ new EMT64Syscall ("msgrcv", 70),
+ new EMT64Syscall ("msgctl", 71),
+ new EMT64Syscall ("fcntl", 72, 3, "i:iiF "),
+ new EMT64Syscall ("flock", 73, 2, "i:ii "),
+ new EMT64Syscall ("fsync", 74, 1, "i:i "),
+ new EMT64Syscall ("fdatasync", 75, 1, "i:i "),
+ new EMT64Syscall ("truncate", 76, 2, "i:si "),
+ new EMT64Syscall ("ftruncate", 77, 2, "i:ii "),
+ new EMT64Syscall ("getdents", 78),
+ new EMT64Syscall ("getcwd", 79, 2, "i:bi "),
+ new EMT64Syscall ("chdir", 80, 1, "i:s "),
+ new EMT64Syscall ("fchdir", 81, 1, "i:i "),
+ new EMT64Syscall ("rename", 82, 2, "i:ss "),
+ new EMT64Syscall ("mkdir", 83, 2, "i:si "),
+ new EMT64Syscall ("rmdir", 84, 1, "i:s "),
+ new EMT64Syscall ("creat", 85, 2, "i:sv"),
+ new EMT64Syscall ("link", 86, 2, "i:ss "),
+ new EMT64Syscall ("unlink", 87, 1, "i:s "),
+ new EMT64Syscall ("symlink", 88, 2, "i:ss "),
+ new EMT64Syscall ("readlink", 89, 3, "i:spi "),
+ new EMT64Syscall ("chmod", 90, 2, "i:si "),
+ new EMT64Syscall ("fchmod", 91, 2, "i:ii "),
+ new EMT64Syscall ("chown", 92, 3, "i:sii "),
+ new EMT64Syscall ("fchown", 93, 3, "i:iii "),
+ new EMT64Syscall ("lchown", 94, 3, "i:sii "),
+ new EMT64Syscall ("umask", 95, 1, "i:i "),
+ new EMT64Syscall ("gettimeofday", 96, 2, "i:PP "),
+ new EMT64Syscall ("getrlimit", 97, 2, "i:ip "),
+ new EMT64Syscall ("getrusage", 98, 2, "i:ip "),
+ new EMT64Syscall ("sysinfo", 99, 1, "i:p "),
+ new EMT64Syscall ("times", 100, 1, "i:p "),
+ new EMT64Syscall ("ptrace", 101, 4, "i:iiii "),
+ new EMT64Syscall ("getuid", 102, 0, "i: "),
+ new EMT64Syscall ("syslog", 103),
+ new EMT64Syscall ("getgid", 104, 0, "i: "),
+ new EMT64Syscall ("setuid", 105, 1, "i:i "),
+ new EMT64Syscall ("setgid", 106, 1, "i:i "),
+ new EMT64Syscall ("geteuid", 107, 0, "i: "),
+ new EMT64Syscall ("getegid", 108, 0, "i: "),
+ new EMT64Syscall ("setpgid", 109, 2, "i:ii "),
+ new EMT64Syscall ("getppid", 110, 0, "i: "),
+ new EMT64Syscall ("getpgrp", 111, 0, "i: "),
+ new EMT64Syscall ("setsid", 112, 0, "i: "),
+ new EMT64Syscall ("setreuid", 113, 2, "i:ii "),
+ new EMT64Syscall ("setregid", 114, 2, "i:ii "),
+ new EMT64Syscall ("getgroups", 115, 2, "i:ip "),
+ new EMT64Syscall ("setgroups", 116, 2, "i:ip "),
+ new EMT64Syscall ("setresuid", 117, 3, "i:iii "),
+ new EMT64Syscall ("getresuid", 118, 3, "i:ppp "),
+ new EMT64Syscall ("setresgid", 119, 3, "i:iii "),
+ new EMT64Syscall ("getresgid", 120, 3, "i:ppp "),
+ new EMT64Syscall ("getpgid", 121, 1, "i:i "),
+ new EMT64Syscall ("setfsuid", 122, 1, "i:i "),
+ new EMT64Syscall ("setfsgid", 123, 1, "i:i "),
+ new EMT64Syscall ("getsid", 124, 1, "i:i "),
+ new EMT64Syscall ("capget", 125, 2, "i:pp "),
+ new EMT64Syscall ("capset", 126, 2, "i:pp "),
+ new EMT64Syscall ("rt_sigpending", 127, 2, "i:pi "),
+ new EMT64Syscall ("rt_sigtimedwait", 128, 4, "i:pppi " ),
+ new EMT64Syscall ("rt_sigqueueinfo", 129 ),
+ new EMT64Syscall ("rt_sigsuspend", 130 ),
+ new EMT64Syscall ("sigaltstack", 131, 2, "i:PP "),
+ new EMT64Syscall ("utime", 132, 2, "i:sP "),
+ new EMT64Syscall ("mknod", 133, 3, "i:sii "),
+ new EMT64Syscall ("uselib", 134, 1, "i:s "),
+ new EMT64Syscall ("personality", 135, 1, "i:i "),
+ new EMT64Syscall ("ustat", 136, 2, "i:ip "),
+ new EMT64Syscall ("statfs", 137, 2, "i:sp "),
+ new EMT64Syscall ("fstatfs", 138, 2, "i:ip "),
+ new EMT64Syscall ("sysfs", 139, 1, "i:i "),
+ new EMT64Syscall ("getpriority", 140, 2, "i:ii "),
+ new EMT64Syscall ("setpriority", 141, 3, "i:iii "),
+ new EMT64Syscall ("sched_setparam", 142),
+ new EMT64Syscall ("sched_getparam", 143),
+ new EMT64Syscall ("sched_setscheduler", 144),
+ new EMT64Syscall ("sched_getscheduler", 145),
+ new EMT64Syscall ("sched_get_priority_max", 146),
+ new EMT64Syscall ("sched_get_priority_min", 147),
+ new EMT64Syscall ("sched_rr_get_interval", 148),
+ new EMT64Syscall ("mlock", 149, 2, "i:bn "),
+ new EMT64Syscall ("munlock", 150, 2, "i:ai "),
+ new EMT64Syscall ("mlockall", 151, 1, "i:i "),
+ new EMT64Syscall ("munlockall", 152, 0, "i: "),
+ new EMT64Syscall ("vhangup", 153, 1, "i:i "),
+ new EMT64Syscall ("modify_ldt", 154, 3, "i:ipi "),
+ new EMT64Syscall ("pivot_root", 155, 2, "i:ss "),
+ new EMT64Syscall ("_sysctl", 156),
+ new EMT64Syscall ("prctl", 157, 5, "i:iiiii "),
+ new EMT64Syscall ("arch_prctl", 158),
+ new EMT64Syscall ("adjtimex", 159, 1, "i:p "),
+ new EMT64Syscall ("setrlimit", 160, 2, "i:ip "),
+ new EMT64Syscall ("chroot", 161, 1, "i:s "),
+ new EMT64Syscall ("sync", 162, 0, "i: "),
+ new EMT64Syscall ("acct", 163, 1, "i:S "),
+ new EMT64Syscall ("settimeofday", 164, 2, "i:PP "),
+ new EMT64Syscall ("mount", 165, 5, "i:sssip "),
+ new EMT64Syscall ("umount2", 166, 2, "i:si "),
+ new EMT64Syscall ("swapon", 167, 2, "i:si "),
+ new EMT64Syscall ("swapoff", 168, 1, "i:s "),
+ new EMT64Syscall ("reboot", 169, 1, "i:i "),
+ new EMT64Syscall ("sethostname", 170, 2, "i:pi "),
+ new EMT64Syscall ("setdomainname", 171),
+ new EMT64Syscall ("iopl", 172, 1, "i:i "),
+ new EMT64Syscall ("ioperm", 173, 3, "i:iii "),
+ new EMT64Syscall ("create_module", 174, 3),
+ new EMT64Syscall ("init_module", 175, 5),
+ new EMT64Syscall ("delete_module", 176, 3),
+ new EMT64Syscall ("get_kernel_syms", 177, 1, "i:p "),
+ new EMT64Syscall ("query_module", 178, 5, "i:sipip "),
+ new EMT64Syscall ("quotactl", 179, 4, "i:isip "),
+ new EMT64Syscall ("nfsservctl", 180, 3, "i:ipp "),
+ new EMT64Syscall ("getpmsg", 181),
+ new EMT64Syscall ("putpmsg", 182),
+ new EMT64Syscall ("afs_syscall", 183),
+ new EMT64Syscall ("tuxcall", 184),
+ new EMT64Syscall ("security", 185),
+ new EMT64Syscall ("gettid", 186, 0),
+ new EMT64Syscall ("readahead", 187, 4, "i:ihli "),
+ new EMT64Syscall ("setxattr", 188),
+ new EMT64Syscall ("lsetxattr", 189 ),
+ new EMT64Syscall ("fsetxattr", 190 ),
+ new EMT64Syscall ("getxattr", 191 ),
+ new EMT64Syscall ("lgetxattr", 192 ),
+ new EMT64Syscall ("fgetxattr", 193 ),
+ new EMT64Syscall ("listxattr", 194 ),
+ new EMT64Syscall ("llistxattr", 195 ),
+ new EMT64Syscall ("flistxattr", 196 ),
+ new EMT64Syscall ("removexattr", 197 ),
+ new EMT64Syscall ("lremovexattr", 198 ),
+ new EMT64Syscall ("fremovexattr", 199 ),
+ new EMT64Syscall ("tkill", 200, 2, "i:ii "),
+ new EMT64Syscall ("time", 201, 1, "i:P "),
+ new EMT64Syscall ("futex", 202, 4, "i:piip "),
+ new EMT64Syscall ("sched_setaffinity", 203 ),
+ new EMT64Syscall ("sched_getaffinity", 204 ),
+ new EMT64Syscall ("set_thread_area", 205, 1, "i:p "),
+ new EMT64Syscall ("io_setup", 206, 2, "i:ip "),
+ new EMT64Syscall ("io_destroy", 207, 1, "i:i "),
+ new EMT64Syscall ("io_getevents", 208, 5, "i:iiipp "),
+ new EMT64Syscall ("io_submit", 209, 3, "i:iip "),
+ new EMT64Syscall ("io_cancel", 210, 3, "i:ipp "),
+ new EMT64Syscall ("get_thread_area", 211, 1, "i:p "),
+ new EMT64Syscall ("lookup_dcookie", 212),
+ new EMT64Syscall ("epoll_create", 213),
+ new EMT64Syscall ("epoll_ctl_old", 214),
+ new EMT64Syscall ("epoll_wait_old", 215),
+ new EMT64Syscall ("remap_file_pages", 216),
+ new EMT64Syscall ("getdents64", 217, 3, "i:ipi "),
+ new EMT64Syscall ("set_tid_address", 218),
+ new EMT64Syscall ("restart_syscall", 219),
+ new EMT64Syscall ("semtimedop", 220),
+ new EMT64Syscall ("fadvise64", 221),
+ new EMT64Syscall ("timer_create", 222),
+ new EMT64Syscall ("timer_settime", 223),
+ new EMT64Syscall (224),
+ new EMT64Syscall (225),
+ new EMT64Syscall ("timer_delete", 226),
+ new EMT64Syscall ("clock_settime", 227),
+ new EMT64Syscall ("clock_gettime", 228),
+ new EMT64Syscall ("clock_getres", 229),
+ new EMT64Syscall ("clock_nanosleep", 230),
+ new EMT64Syscall ("exit_group", 231, 1, " :i "),
+ new EMT64Syscall ("epoll_wait", 232),
+ new EMT64Syscall ("epoll_ctl", 233),
+ new EMT64Syscall ("tgkill", 234),
+ new EMT64Syscall ("utimes", 235),
+ new EMT64Syscall ("vserver", 236),
+ new EMT64Syscall ("mbind", 237),
+ new EMT64Syscall ("set_mempolicy", 238),
+ new EMT64Syscall ("get_mempolicy", 239),
+ new EMT64Syscall ("mq_open", 240),
+ new EMT64Syscall ("mq_unlink", 241),
+ new EMT64Syscall ("mq_timedsend", 242),
+ new EMT64Syscall ("mq_timedreceive", 243),
+ new EMT64Syscall ("mq_notify", 244),
+ new EMT64Syscall ("mq_getsetattr", 245),
+ new EMT64Syscall ("kexec_load", 246),
+ new EMT64Syscall ("waitid", 247),
+ new EMT64Syscall ("add_key", 248),
+ new EMT64Syscall ("request_key", 249),
+ new EMT64Syscall ("keyctl", 250),
+ new EMT64Syscall ("ioprio_set", 251),
+ new EMT64Syscall ("ioprio_get", 252),
+ new EMT64Syscall ("inotify_init", 253),
+ new EMT64Syscall ("inotify_add_watch", 254),
+ new EMT64Syscall ("inotify_rm_watch", 255)
+ };
+
+ public static Syscall syscallByNum (Task task, int number)
+ {
+ return Syscall.syscallByNum (number, task);
+ }
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]