process.cc (8229:78bf55f23338) process.cc (10494:ffe6ab7141ab)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 23 unchanged lines hidden (view full) ---

32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Gabe Black
38 */
39
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 23 unchanged lines hidden (view full) ---

32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Gabe Black
38 */
39
40#include "arch/x86/linux/linux.hh"
40#include "arch/x86/linux/process.hh"
41#include "arch/x86/isa_traits.hh"
42#include "arch/x86/registers.hh"
43#include "base/trace.hh"
44#include "cpu/thread_context.hh"
45#include "kern/linux/linux.hh"
46#include "sim/process.hh"
41#include "arch/x86/linux/process.hh"
42#include "arch/x86/isa_traits.hh"
43#include "arch/x86/registers.hh"
44#include "base/trace.hh"
45#include "cpu/thread_context.hh"
46#include "kern/linux/linux.hh"
47#include "sim/process.hh"
48#include "sim/syscall_emul.hh"
47
48using namespace std;
49using namespace X86ISA;
50
49
50using namespace std;
51using namespace X86ISA;
52
53/// Target uname() handler.
54static SyscallReturn
55unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
56 ThreadContext *tc)
57{
58 int index = 0;
59 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index));
60
61 strcpy(name->sysname, "Linux");
62 strcpy(name->nodename, "sim.gem5.org");
63 strcpy(name->release, "3.0.0");
64 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
65 strcpy(name->machine, "x86_64");
66
67 name.copyOut(tc->getMemProxy());
68
69 return 0;
70}
71
72static SyscallReturn
73archPrctlFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
74 ThreadContext *tc)
75{
76 enum ArchPrctlCodes
77 {
78 SetFS = 0x1002,
79 GetFS = 0x1003,
80 SetGS = 0x1001,
81 GetGS = 0x1004
82 };
83
84 //First argument is the code, second is the address
85 int index = 0;
86 int code = process->getSyscallArg(tc, index);
87 uint64_t addr = process->getSyscallArg(tc, index);
88 uint64_t fsBase, gsBase;
89 SETranslatingPortProxy &p = tc->getMemProxy();
90 switch(code)
91 {
92 //Each of these valid options should actually check addr.
93 case SetFS:
94 tc->setMiscRegNoEffect(MISCREG_FS_BASE, addr);
95 tc->setMiscRegNoEffect(MISCREG_FS_EFF_BASE, addr);
96 return 0;
97 case GetFS:
98 fsBase = tc->readMiscRegNoEffect(MISCREG_FS_BASE);
99 p.write(addr, fsBase);
100 return 0;
101 case SetGS:
102 tc->setMiscRegNoEffect(MISCREG_GS_BASE, addr);
103 tc->setMiscRegNoEffect(MISCREG_GS_EFF_BASE, addr);
104 return 0;
105 case GetGS:
106 gsBase = tc->readMiscRegNoEffect(MISCREG_GS_BASE);
107 p.write(addr, gsBase);
108 return 0;
109 default:
110 return -EINVAL;
111 }
112}
113
114BitUnion32(UserDescFlags)
115 Bitfield<0> seg_32bit;
116 Bitfield<2, 1> contents;
117 Bitfield<3> read_exec_only;
118 Bitfield<4> limit_in_pages;
119 Bitfield<5> seg_not_present;
120 Bitfield<6> useable;
121EndBitUnion(UserDescFlags)
122
123struct UserDesc32 {
124 uint32_t entry_number;
125 uint32_t base_addr;
126 uint32_t limit;
127 uint32_t flags;
128};
129
130struct UserDesc64 {
131 uint32_t entry_number;
132 uint32_t __padding1;
133 uint64_t base_addr;
134 uint32_t limit;
135 uint32_t flags;
136};
137
138static SyscallReturn
139setThreadArea32Func(SyscallDesc *desc, int callnum,
140 LiveProcess *process, ThreadContext *tc)
141{
142 const int minTLSEntry = 6;
143 const int numTLSEntries = 3;
144 const int maxTLSEntry = minTLSEntry + numTLSEntries - 1;
145
146 X86LiveProcess *x86lp = dynamic_cast<X86LiveProcess *>(process);
147 assert(x86lp);
148
149 assert((maxTLSEntry + 1) * sizeof(uint64_t) <= x86lp->gdtSize());
150
151 int argIndex = 0;
152 TypedBufferArg<UserDesc32> userDesc(process->getSyscallArg(tc, argIndex));
153 TypedBufferArg<uint64_t>
154 gdt(x86lp->gdtStart() + minTLSEntry * sizeof(uint64_t),
155 numTLSEntries * sizeof(uint64_t));
156
157 if (!userDesc.copyIn(tc->getMemProxy()))
158 return -EFAULT;
159
160 if (!gdt.copyIn(tc->getMemProxy()))
161 panic("Failed to copy in GDT for %s.\n", desc->name);
162
163 if (userDesc->entry_number == (uint32_t)(-1)) {
164 // Find a free TLS entry.
165 for (int i = 0; i < numTLSEntries; i++) {
166 if (gdt[i] == 0) {
167 userDesc->entry_number = i + minTLSEntry;
168 break;
169 }
170 }
171 // We failed to find one.
172 if (userDesc->entry_number == (uint32_t)(-1))
173 return -ESRCH;
174 }
175
176 int index = userDesc->entry_number;
177
178 if (index < minTLSEntry || index > maxTLSEntry)
179 return -EINVAL;
180
181 index -= minTLSEntry;
182
183 // Build the entry we're going to add.
184 SegDescriptor segDesc = 0;
185 UserDescFlags flags = userDesc->flags;
186
187 segDesc.limitLow = bits(userDesc->limit, 15, 0);
188 segDesc.baseLow = bits(userDesc->base_addr, 23, 0);
189 segDesc.type.a = 1;
190 if (!flags.read_exec_only)
191 segDesc.type.w = 1;
192 if (bits((uint8_t)flags.contents, 0))
193 segDesc.type.e = 1;
194 if (bits((uint8_t)flags.contents, 1))
195 segDesc.type.codeOrData = 1;
196 segDesc.s = 1;
197 segDesc.dpl = 3;
198 if (!flags.seg_not_present)
199 segDesc.p = 1;
200 segDesc.limitHigh = bits(userDesc->limit, 19, 16);
201 if (flags.useable)
202 segDesc.avl = 1;
203 segDesc.l = 0;
204 if (flags.seg_32bit)
205 segDesc.d = 1;
206 if (flags.limit_in_pages)
207 segDesc.g = 1;
208 segDesc.baseHigh = bits(userDesc->base_addr, 31, 24);
209
210 gdt[index] = (uint64_t)segDesc;
211
212 if (!userDesc.copyOut(tc->getMemProxy()))
213 return -EFAULT;
214 if (!gdt.copyOut(tc->getMemProxy()))
215 panic("Failed to copy out GDT for %s.\n", desc->name);
216
217 return 0;
218}
219
220static SyscallDesc syscallDescs64[] = {
221 /* 0 */ SyscallDesc("read", readFunc),
222 /* 1 */ SyscallDesc("write", writeFunc),
223 /* 2 */ SyscallDesc("open", openFunc<X86Linux64>),
224 /* 3 */ SyscallDesc("close", closeFunc),
225 /* 4 */ SyscallDesc("stat", stat64Func<X86Linux64>),
226 /* 5 */ SyscallDesc("fstat", fstat64Func<X86Linux64>),
227 /* 6 */ SyscallDesc("lstat", lstat64Func<X86Linux64>),
228 /* 7 */ SyscallDesc("poll", unimplementedFunc),
229 /* 8 */ SyscallDesc("lseek", lseekFunc),
230 /* 9 */ SyscallDesc("mmap", mmapFunc<X86Linux64>),
231 /* 10 */ SyscallDesc("mprotect", ignoreFunc),
232 /* 11 */ SyscallDesc("munmap", munmapFunc),
233 /* 12 */ SyscallDesc("brk", brkFunc),
234 /* 13 */ SyscallDesc("rt_sigaction", ignoreFunc),
235 /* 14 */ SyscallDesc("rt_sigprocmask", ignoreFunc),
236 /* 15 */ SyscallDesc("rt_sigreturn", unimplementedFunc),
237 /* 16 */ SyscallDesc("ioctl", ioctlFunc<X86Linux64>),
238 /* 17 */ SyscallDesc("pread64", unimplementedFunc),
239 /* 18 */ SyscallDesc("pwrite64", unimplementedFunc),
240 /* 19 */ SyscallDesc("readv", unimplementedFunc),
241 /* 20 */ SyscallDesc("writev", writevFunc<X86Linux64>),
242 /* 21 */ SyscallDesc("access", ignoreFunc),
243 /* 22 */ SyscallDesc("pipe", unimplementedFunc),
244 /* 23 */ SyscallDesc("select", unimplementedFunc),
245 /* 24 */ SyscallDesc("sched_yield", unimplementedFunc),
246 /* 25 */ SyscallDesc("mremap", mremapFunc<X86Linux64>),
247 /* 26 */ SyscallDesc("msync", unimplementedFunc),
248 /* 27 */ SyscallDesc("mincore", unimplementedFunc),
249 /* 28 */ SyscallDesc("madvise", unimplementedFunc),
250 /* 29 */ SyscallDesc("shmget", unimplementedFunc),
251 /* 30 */ SyscallDesc("shmat", unimplementedFunc),
252 /* 31 */ SyscallDesc("shmctl", unimplementedFunc),
253 /* 32 */ SyscallDesc("dup", dupFunc),
254 /* 33 */ SyscallDesc("dup2", unimplementedFunc),
255 /* 34 */ SyscallDesc("pause", unimplementedFunc),
256 /* 35 */ SyscallDesc("nanosleep", unimplementedFunc),
257 /* 36 */ SyscallDesc("getitimer", unimplementedFunc),
258 /* 37 */ SyscallDesc("alarm", unimplementedFunc),
259 /* 38 */ SyscallDesc("setitimer", unimplementedFunc),
260 /* 39 */ SyscallDesc("getpid", getpidFunc),
261 /* 40 */ SyscallDesc("sendfile", unimplementedFunc),
262 /* 41 */ SyscallDesc("socket", unimplementedFunc),
263 /* 42 */ SyscallDesc("connect", unimplementedFunc),
264 /* 43 */ SyscallDesc("accept", unimplementedFunc),
265 /* 44 */ SyscallDesc("sendto", unimplementedFunc),
266 /* 45 */ SyscallDesc("recvfrom", unimplementedFunc),
267 /* 46 */ SyscallDesc("sendmsg", unimplementedFunc),
268 /* 47 */ SyscallDesc("recvmsg", unimplementedFunc),
269 /* 48 */ SyscallDesc("shutdown", unimplementedFunc),
270 /* 49 */ SyscallDesc("bind", unimplementedFunc),
271 /* 50 */ SyscallDesc("listen", unimplementedFunc),
272 /* 51 */ SyscallDesc("getsockname", unimplementedFunc),
273 /* 52 */ SyscallDesc("getpeername", unimplementedFunc),
274 /* 53 */ SyscallDesc("socketpair", unimplementedFunc),
275 /* 54 */ SyscallDesc("setsockopt", unimplementedFunc),
276 /* 55 */ SyscallDesc("getsockopt", unimplementedFunc),
277 /* 56 */ SyscallDesc("clone", cloneFunc),
278 /* 57 */ SyscallDesc("fork", unimplementedFunc),
279 /* 58 */ SyscallDesc("vfork", unimplementedFunc),
280 /* 59 */ SyscallDesc("execve", unimplementedFunc),
281 /* 60 */ SyscallDesc("exit", exitFunc),
282 /* 61 */ SyscallDesc("wait4", unimplementedFunc),
283 /* 62 */ SyscallDesc("kill", unimplementedFunc),
284 /* 63 */ SyscallDesc("uname", unameFunc),
285 /* 64 */ SyscallDesc("semget", unimplementedFunc),
286 /* 65 */ SyscallDesc("semop", unimplementedFunc),
287 /* 66 */ SyscallDesc("semctl", unimplementedFunc),
288 /* 67 */ SyscallDesc("shmdt", unimplementedFunc),
289 /* 68 */ SyscallDesc("msgget", unimplementedFunc),
290 /* 69 */ SyscallDesc("msgsnd", unimplementedFunc),
291 /* 70 */ SyscallDesc("msgrcv", unimplementedFunc),
292 /* 71 */ SyscallDesc("msgctl", unimplementedFunc),
293 /* 72 */ SyscallDesc("fcntl", fcntlFunc),
294 /* 73 */ SyscallDesc("flock", unimplementedFunc),
295 /* 74 */ SyscallDesc("fsync", unimplementedFunc),
296 /* 75 */ SyscallDesc("fdatasync", unimplementedFunc),
297 /* 76 */ SyscallDesc("truncate", truncateFunc),
298 /* 77 */ SyscallDesc("ftruncate", ftruncateFunc),
299 /* 78 */ SyscallDesc("getdents", getdentsFunc),
300 /* 79 */ SyscallDesc("getcwd", getcwdFunc),
301 /* 80 */ SyscallDesc("chdir", unimplementedFunc),
302 /* 81 */ SyscallDesc("fchdir", unimplementedFunc),
303 /* 82 */ SyscallDesc("rename", renameFunc),
304 /* 83 */ SyscallDesc("mkdir", unimplementedFunc),
305 /* 84 */ SyscallDesc("rmdir", unimplementedFunc),
306 /* 85 */ SyscallDesc("creat", unimplementedFunc),
307 /* 86 */ SyscallDesc("link", unimplementedFunc),
308 /* 87 */ SyscallDesc("unlink", unlinkFunc),
309 /* 88 */ SyscallDesc("symlink", unimplementedFunc),
310 /* 89 */ SyscallDesc("readlink", readlinkFunc),
311 /* 90 */ SyscallDesc("chmod", unimplementedFunc),
312 /* 91 */ SyscallDesc("fchmod", unimplementedFunc),
313 /* 92 */ SyscallDesc("chown", unimplementedFunc),
314 /* 93 */ SyscallDesc("fchown", unimplementedFunc),
315 /* 94 */ SyscallDesc("lchown", unimplementedFunc),
316 /* 95 */ SyscallDesc("umask", unimplementedFunc),
317 /* 96 */ SyscallDesc("gettimeofday", gettimeofdayFunc<X86Linux64>),
318 /* 97 */ SyscallDesc("getrlimit", getrlimitFunc<X86Linux64>),
319 /* 98 */ SyscallDesc("getrusage", getrusageFunc<X86Linux64>),
320 /* 99 */ SyscallDesc("sysinfo", sysinfoFunc<X86Linux64>),
321 /* 100 */ SyscallDesc("times", timesFunc<X86Linux64>),
322 /* 101 */ SyscallDesc("ptrace", unimplementedFunc),
323 /* 102 */ SyscallDesc("getuid", getuidFunc),
324 /* 103 */ SyscallDesc("syslog", unimplementedFunc),
325 /* 104 */ SyscallDesc("getgid", getgidFunc),
326 /* 105 */ SyscallDesc("setuid", unimplementedFunc),
327 /* 106 */ SyscallDesc("setgid", unimplementedFunc),
328 /* 107 */ SyscallDesc("geteuid", geteuidFunc),
329 /* 108 */ SyscallDesc("getegid", getegidFunc),
330 /* 109 */ SyscallDesc("setpgid", unimplementedFunc),
331 /* 110 */ SyscallDesc("getppid", getppidFunc),
332 /* 111 */ SyscallDesc("getpgrp", unimplementedFunc),
333 /* 112 */ SyscallDesc("setsid", unimplementedFunc),
334 /* 113 */ SyscallDesc("setreuid", unimplementedFunc),
335 /* 114 */ SyscallDesc("setregid", unimplementedFunc),
336 /* 115 */ SyscallDesc("getgroups", unimplementedFunc),
337 /* 116 */ SyscallDesc("setgroups", unimplementedFunc),
338 /* 117 */ SyscallDesc("setresuid", unimplementedFunc),
339 /* 118 */ SyscallDesc("getresuid", unimplementedFunc),
340 /* 119 */ SyscallDesc("setresgid", unimplementedFunc),
341 /* 120 */ SyscallDesc("getresgid", unimplementedFunc),
342 /* 121 */ SyscallDesc("getpgid", unimplementedFunc),
343 /* 122 */ SyscallDesc("setfsuid", unimplementedFunc),
344 /* 123 */ SyscallDesc("setfsgid", unimplementedFunc),
345 /* 124 */ SyscallDesc("getsid", unimplementedFunc),
346 /* 125 */ SyscallDesc("capget", unimplementedFunc),
347 /* 126 */ SyscallDesc("capset", unimplementedFunc),
348 /* 127 */ SyscallDesc("rt_sigpending", unimplementedFunc),
349 /* 128 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
350 /* 129 */ SyscallDesc("rt_sigqueueinfo", unimplementedFunc),
351 /* 130 */ SyscallDesc("rt_sigsuspend", unimplementedFunc),
352 /* 131 */ SyscallDesc("sigaltstack", unimplementedFunc),
353 /* 132 */ SyscallDesc("utime", unimplementedFunc),
354 /* 133 */ SyscallDesc("mknod", unimplementedFunc),
355 /* 134 */ SyscallDesc("uselib", unimplementedFunc),
356 /* 135 */ SyscallDesc("personality", unimplementedFunc),
357 /* 136 */ SyscallDesc("ustat", unimplementedFunc),
358 /* 137 */ SyscallDesc("statfs", unimplementedFunc),
359 /* 138 */ SyscallDesc("fstatfs", unimplementedFunc),
360 /* 139 */ SyscallDesc("sysfs", unimplementedFunc),
361 /* 140 */ SyscallDesc("getpriority", unimplementedFunc),
362 /* 141 */ SyscallDesc("setpriority", unimplementedFunc),
363 /* 142 */ SyscallDesc("sched_setparam", unimplementedFunc),
364 /* 143 */ SyscallDesc("sched_getparam", unimplementedFunc),
365 /* 144 */ SyscallDesc("sched_setscheduler", unimplementedFunc),
366 /* 145 */ SyscallDesc("sched_getscheduler", unimplementedFunc),
367 /* 146 */ SyscallDesc("sched_get_priority_max", unimplementedFunc),
368 /* 147 */ SyscallDesc("sched_get_priority_min", unimplementedFunc),
369 /* 148 */ SyscallDesc("sched_rr_get_interval", unimplementedFunc),
370 /* 149 */ SyscallDesc("mlock", unimplementedFunc),
371 /* 150 */ SyscallDesc("munlock", unimplementedFunc),
372 /* 151 */ SyscallDesc("mlockall", unimplementedFunc),
373 /* 152 */ SyscallDesc("munlockall", unimplementedFunc),
374 /* 153 */ SyscallDesc("vhangup", unimplementedFunc),
375 /* 154 */ SyscallDesc("modify_ldt", unimplementedFunc),
376 /* 155 */ SyscallDesc("pivot_root", unimplementedFunc),
377 /* 156 */ SyscallDesc("_sysctl", unimplementedFunc),
378 /* 157 */ SyscallDesc("prctl", unimplementedFunc),
379 /* 158 */ SyscallDesc("arch_prctl", archPrctlFunc),
380 /* 159 */ SyscallDesc("adjtimex", unimplementedFunc),
381 /* 160 */ SyscallDesc("setrlimit", ignoreFunc),
382 /* 161 */ SyscallDesc("chroot", unimplementedFunc),
383 /* 162 */ SyscallDesc("sync", unimplementedFunc),
384 /* 163 */ SyscallDesc("acct", unimplementedFunc),
385 /* 164 */ SyscallDesc("settimeofday", unimplementedFunc),
386 /* 165 */ SyscallDesc("mount", unimplementedFunc),
387 /* 166 */ SyscallDesc("umount2", unimplementedFunc),
388 /* 167 */ SyscallDesc("swapon", unimplementedFunc),
389 /* 168 */ SyscallDesc("swapoff", unimplementedFunc),
390 /* 169 */ SyscallDesc("reboot", unimplementedFunc),
391 /* 170 */ SyscallDesc("sethostname", unimplementedFunc),
392 /* 171 */ SyscallDesc("setdomainname", unimplementedFunc),
393 /* 172 */ SyscallDesc("iopl", unimplementedFunc),
394 /* 173 */ SyscallDesc("ioperm", unimplementedFunc),
395 /* 174 */ SyscallDesc("create_module", unimplementedFunc),
396 /* 175 */ SyscallDesc("init_module", unimplementedFunc),
397 /* 176 */ SyscallDesc("delete_module", unimplementedFunc),
398 /* 177 */ SyscallDesc("get_kernel_syms", unimplementedFunc),
399 /* 178 */ SyscallDesc("query_module", unimplementedFunc),
400 /* 179 */ SyscallDesc("quotactl", unimplementedFunc),
401 /* 180 */ SyscallDesc("nfsservctl", unimplementedFunc),
402 /* 181 */ SyscallDesc("getpmsg", unimplementedFunc),
403 /* 182 */ SyscallDesc("putpmsg", unimplementedFunc),
404 /* 183 */ SyscallDesc("afs_syscall", unimplementedFunc),
405 /* 184 */ SyscallDesc("tuxcall", unimplementedFunc),
406 /* 185 */ SyscallDesc("security", unimplementedFunc),
407 /* 186 */ SyscallDesc("gettid", unimplementedFunc),
408 /* 187 */ SyscallDesc("readahead", unimplementedFunc),
409 /* 188 */ SyscallDesc("setxattr", unimplementedFunc),
410 /* 189 */ SyscallDesc("lsetxattr", unimplementedFunc),
411 /* 190 */ SyscallDesc("fsetxattr", unimplementedFunc),
412 /* 191 */ SyscallDesc("getxattr", unimplementedFunc),
413 /* 192 */ SyscallDesc("lgetxattr", unimplementedFunc),
414 /* 193 */ SyscallDesc("fgetxattr", unimplementedFunc),
415 /* 194 */ SyscallDesc("listxattr", unimplementedFunc),
416 /* 195 */ SyscallDesc("llistxattr", unimplementedFunc),
417 /* 196 */ SyscallDesc("flistxattr", unimplementedFunc),
418 /* 197 */ SyscallDesc("removexattr", unimplementedFunc),
419 /* 198 */ SyscallDesc("lremovexattr", unimplementedFunc),
420 /* 199 */ SyscallDesc("fremovexattr", unimplementedFunc),
421 /* 200 */ SyscallDesc("tkill", unimplementedFunc),
422 /* 201 */ SyscallDesc("time", timeFunc<X86Linux64>),
423 /* 202 */ SyscallDesc("futex", futexFunc<X86Linux64>),
424 /* 203 */ SyscallDesc("sched_setaffinity", unimplementedFunc),
425 /* 204 */ SyscallDesc("sched_getaffinity", unimplementedFunc),
426 /* 205 */ SyscallDesc("set_thread_area", unimplementedFunc),
427 /* 206 */ SyscallDesc("io_setup", unimplementedFunc),
428 /* 207 */ SyscallDesc("io_destroy", unimplementedFunc),
429 /* 208 */ SyscallDesc("io_getevents", unimplementedFunc),
430 /* 209 */ SyscallDesc("io_submit", unimplementedFunc),
431 /* 210 */ SyscallDesc("io_cancel", unimplementedFunc),
432 /* 211 */ SyscallDesc("get_thread_area", unimplementedFunc),
433 /* 212 */ SyscallDesc("lookup_dcookie", unimplementedFunc),
434 /* 213 */ SyscallDesc("epoll_create", unimplementedFunc),
435 /* 214 */ SyscallDesc("epoll_ctl_old", unimplementedFunc),
436 /* 215 */ SyscallDesc("epoll_wait_old", unimplementedFunc),
437 /* 216 */ SyscallDesc("remap_file_pages", unimplementedFunc),
438 /* 217 */ SyscallDesc("getdents64", getdents64Func),
439 /* 218 */ SyscallDesc("set_tid_address", unimplementedFunc),
440 /* 219 */ SyscallDesc("restart_syscall", unimplementedFunc),
441 /* 220 */ SyscallDesc("semtimedop", unimplementedFunc),
442 /* 221 */ SyscallDesc("fadvise64", unimplementedFunc),
443 /* 222 */ SyscallDesc("timer_create", unimplementedFunc),
444 /* 223 */ SyscallDesc("timer_settime", unimplementedFunc),
445 /* 224 */ SyscallDesc("timer_gettime", unimplementedFunc),
446 /* 225 */ SyscallDesc("timer_getoverrun", unimplementedFunc),
447 /* 226 */ SyscallDesc("timer_delete", unimplementedFunc),
448 /* 227 */ SyscallDesc("clock_settime", unimplementedFunc),
449 /* 228 */ SyscallDesc("clock_gettime", unimplementedFunc),
450 /* 229 */ SyscallDesc("clock_getres", unimplementedFunc),
451 /* 230 */ SyscallDesc("clock_nanosleep", unimplementedFunc),
452 /* 231 */ SyscallDesc("exit_group", exitGroupFunc),
453 /* 232 */ SyscallDesc("epoll_wait", unimplementedFunc),
454 /* 233 */ SyscallDesc("epoll_ctl", unimplementedFunc),
455 /* 234 */ SyscallDesc("tgkill", unimplementedFunc),
456 /* 235 */ SyscallDesc("utimes", unimplementedFunc),
457 /* 236 */ SyscallDesc("vserver", unimplementedFunc),
458 /* 237 */ SyscallDesc("mbind", unimplementedFunc),
459 /* 238 */ SyscallDesc("set_mempolicy", unimplementedFunc),
460 /* 239 */ SyscallDesc("get_mempolicy", unimplementedFunc),
461 /* 240 */ SyscallDesc("mq_open", unimplementedFunc),
462 /* 241 */ SyscallDesc("mq_unlink", unimplementedFunc),
463 /* 242 */ SyscallDesc("mq_timedsend", unimplementedFunc),
464 /* 243 */ SyscallDesc("mq_timedreceive", unimplementedFunc),
465 /* 244 */ SyscallDesc("mq_notify", unimplementedFunc),
466 /* 245 */ SyscallDesc("mq_getsetattr", unimplementedFunc),
467 /* 246 */ SyscallDesc("kexec_load", unimplementedFunc),
468 /* 247 */ SyscallDesc("waitid", unimplementedFunc),
469 /* 248 */ SyscallDesc("add_key", unimplementedFunc),
470 /* 249 */ SyscallDesc("request_key", unimplementedFunc),
471 /* 250 */ SyscallDesc("keyctl", unimplementedFunc),
472 /* 251 */ SyscallDesc("ioprio_set", unimplementedFunc),
473 /* 252 */ SyscallDesc("ioprio_get", unimplementedFunc),
474 /* 253 */ SyscallDesc("inotify_init", unimplementedFunc),
475 /* 254 */ SyscallDesc("inotify_add_watch", unimplementedFunc),
476 /* 255 */ SyscallDesc("inotify_rm_watch", unimplementedFunc),
477 /* 256 */ SyscallDesc("migrate_pages", unimplementedFunc),
478 /* 257 */ SyscallDesc("openat", unimplementedFunc),
479 /* 258 */ SyscallDesc("mkdirat", unimplementedFunc),
480 /* 259 */ SyscallDesc("mknodat", unimplementedFunc),
481 /* 260 */ SyscallDesc("fchownat", unimplementedFunc),
482 /* 261 */ SyscallDesc("futimesat", unimplementedFunc),
483 /* 262 */ SyscallDesc("newfstatat", unimplementedFunc),
484 /* 263 */ SyscallDesc("unlinkat", unimplementedFunc),
485 /* 264 */ SyscallDesc("renameat", unimplementedFunc),
486 /* 265 */ SyscallDesc("linkat", unimplementedFunc),
487 /* 266 */ SyscallDesc("symlinkat", unimplementedFunc),
488 /* 267 */ SyscallDesc("readlinkat", unimplementedFunc),
489 /* 268 */ SyscallDesc("fchmodat", unimplementedFunc),
490 /* 269 */ SyscallDesc("faccessat", unimplementedFunc),
491 /* 270 */ SyscallDesc("pselect6", unimplementedFunc),
492 /* 271 */ SyscallDesc("ppoll", unimplementedFunc),
493 /* 272 */ SyscallDesc("unshare", unimplementedFunc)
494};
495
51X86_64LinuxProcess::X86_64LinuxProcess(LiveProcessParams * params,
52 ObjectFile *objFile)
496X86_64LinuxProcess::X86_64LinuxProcess(LiveProcessParams * params,
497 ObjectFile *objFile)
53 : X86_64LiveProcess(params, objFile, syscallDescs, numSyscalls)
498 : X86_64LiveProcess(params, objFile, syscallDescs64,
499 sizeof(syscallDescs64) / sizeof(SyscallDesc))
54{}
55
500{}
501
502static SyscallDesc syscallDescs32[] = {
503 /* 0 */ SyscallDesc("restart_syscall", unimplementedFunc),
504 /* 1 */ SyscallDesc("exit", exitFunc),
505 /* 2 */ SyscallDesc("fork", unimplementedFunc),
506 /* 3 */ SyscallDesc("read", readFunc),
507 /* 4 */ SyscallDesc("write", writeFunc),
508 /* 5 */ SyscallDesc("open", openFunc<X86Linux32>),
509 /* 6 */ SyscallDesc("close", closeFunc),
510 /* 7 */ SyscallDesc("waitpid", unimplementedFunc),
511 /* 8 */ SyscallDesc("creat", unimplementedFunc),
512 /* 9 */ SyscallDesc("link", unimplementedFunc),
513 /* 10 */ SyscallDesc("unlink", unimplementedFunc),
514 /* 11 */ SyscallDesc("execve", unimplementedFunc),
515 /* 12 */ SyscallDesc("chdir", unimplementedFunc),
516 /* 13 */ SyscallDesc("time", timeFunc<X86Linux32>),
517 /* 14 */ SyscallDesc("mknod", unimplementedFunc),
518 /* 15 */ SyscallDesc("chmod", unimplementedFunc),
519 /* 16 */ SyscallDesc("lchown", unimplementedFunc),
520 /* 17 */ SyscallDesc("break", unimplementedFunc),
521 /* 18 */ SyscallDesc("oldstat", unimplementedFunc),
522 /* 19 */ SyscallDesc("lseek", unimplementedFunc),
523 /* 20 */ SyscallDesc("getpid", unimplementedFunc),
524 /* 21 */ SyscallDesc("mount", unimplementedFunc),
525 /* 22 */ SyscallDesc("umount", unimplementedFunc),
526 /* 23 */ SyscallDesc("setuid", unimplementedFunc),
527 /* 24 */ SyscallDesc("getuid", getuidFunc),
528 /* 25 */ SyscallDesc("stime", unimplementedFunc),
529 /* 26 */ SyscallDesc("ptrace", unimplementedFunc),
530 /* 27 */ SyscallDesc("alarm", unimplementedFunc),
531 /* 28 */ SyscallDesc("oldfstat", unimplementedFunc),
532 /* 29 */ SyscallDesc("pause", unimplementedFunc),
533 /* 30 */ SyscallDesc("utime", unimplementedFunc),
534 /* 31 */ SyscallDesc("stty", unimplementedFunc),
535 /* 32 */ SyscallDesc("gtty", unimplementedFunc),
536 /* 33 */ SyscallDesc("access", ignoreFunc),
537 /* 34 */ SyscallDesc("nice", unimplementedFunc),
538 /* 35 */ SyscallDesc("ftime", unimplementedFunc),
539 /* 36 */ SyscallDesc("sync", unimplementedFunc),
540 /* 37 */ SyscallDesc("kill", unimplementedFunc),
541 /* 38 */ SyscallDesc("rename", unimplementedFunc),
542 /* 39 */ SyscallDesc("mkdir", unimplementedFunc),
543 /* 40 */ SyscallDesc("rmdir", unimplementedFunc),
544 /* 41 */ SyscallDesc("dup", dupFunc),
545 /* 42 */ SyscallDesc("pipe", unimplementedFunc),
546 /* 43 */ SyscallDesc("times", timesFunc<X86Linux32>),
547 /* 44 */ SyscallDesc("prof", unimplementedFunc),
548 /* 45 */ SyscallDesc("brk", brkFunc),
549 /* 46 */ SyscallDesc("setgid", unimplementedFunc),
550 /* 47 */ SyscallDesc("getgid", getgidFunc),
551 /* 48 */ SyscallDesc("signal", unimplementedFunc),
552 /* 49 */ SyscallDesc("geteuid", geteuidFunc),
553 /* 50 */ SyscallDesc("getegid", getegidFunc),
554 /* 51 */ SyscallDesc("acct", unimplementedFunc),
555 /* 52 */ SyscallDesc("umount2", unimplementedFunc),
556 /* 53 */ SyscallDesc("lock", unimplementedFunc),
557 /* 54 */ SyscallDesc("ioctl", ioctlFunc<X86Linux32>),
558 /* 55 */ SyscallDesc("fcntl", unimplementedFunc),
559 /* 56 */ SyscallDesc("mpx", unimplementedFunc),
560 /* 57 */ SyscallDesc("setpgid", unimplementedFunc),
561 /* 58 */ SyscallDesc("ulimit", unimplementedFunc),
562 /* 59 */ SyscallDesc("oldolduname", unimplementedFunc),
563 /* 60 */ SyscallDesc("umask", unimplementedFunc),
564 /* 61 */ SyscallDesc("chroot", unimplementedFunc),
565 /* 62 */ SyscallDesc("ustat", unimplementedFunc),
566 /* 63 */ SyscallDesc("dup2", unimplementedFunc),
567 /* 64 */ SyscallDesc("getppid", unimplementedFunc),
568 /* 65 */ SyscallDesc("getpgrp", unimplementedFunc),
569 /* 66 */ SyscallDesc("setsid", unimplementedFunc),
570 /* 67 */ SyscallDesc("sigaction", unimplementedFunc),
571 /* 68 */ SyscallDesc("sgetmask", unimplementedFunc),
572 /* 69 */ SyscallDesc("ssetmask", unimplementedFunc),
573 /* 70 */ SyscallDesc("setreuid", unimplementedFunc),
574 /* 71 */ SyscallDesc("setregid", unimplementedFunc),
575 /* 72 */ SyscallDesc("sigsuspend", unimplementedFunc),
576 /* 73 */ SyscallDesc("sigpending", unimplementedFunc),
577 /* 74 */ SyscallDesc("sethostname", unimplementedFunc),
578 /* 75 */ SyscallDesc("setrlimit", ignoreFunc),
579 /* 76 */ SyscallDesc("getrlimit", getrlimitFunc<X86Linux32>),
580 /* 77 */ SyscallDesc("getrusage", getrusageFunc<X86Linux32>),
581 /* 78 */ SyscallDesc("gettimeofday", unimplementedFunc),
582 /* 79 */ SyscallDesc("settimeofday", unimplementedFunc),
583 /* 80 */ SyscallDesc("getgroups", unimplementedFunc),
584 /* 81 */ SyscallDesc("setgroups", unimplementedFunc),
585 /* 82 */ SyscallDesc("select", unimplementedFunc),
586 /* 83 */ SyscallDesc("symlink", unimplementedFunc),
587 /* 84 */ SyscallDesc("oldlstat", unimplementedFunc),
588 /* 85 */ SyscallDesc("readlink", unimplementedFunc),
589 /* 86 */ SyscallDesc("uselib", unimplementedFunc),
590 /* 87 */ SyscallDesc("swapon", unimplementedFunc),
591 /* 88 */ SyscallDesc("reboot", unimplementedFunc),
592 /* 89 */ SyscallDesc("readdir", unimplementedFunc),
593 /* 90 */ SyscallDesc("mmap", unimplementedFunc),
594 /* 91 */ SyscallDesc("munmap", munmapFunc),
595 /* 92 */ SyscallDesc("truncate", truncateFunc),
596 /* 93 */ SyscallDesc("ftruncate", ftruncateFunc),
597 /* 94 */ SyscallDesc("fchmod", unimplementedFunc),
598 /* 95 */ SyscallDesc("fchown", unimplementedFunc),
599 /* 96 */ SyscallDesc("getpriority", unimplementedFunc),
600 /* 97 */ SyscallDesc("setpriority", unimplementedFunc),
601 /* 98 */ SyscallDesc("profil", unimplementedFunc),
602 /* 99 */ SyscallDesc("statfs", unimplementedFunc),
603 /* 100 */ SyscallDesc("fstatfs", unimplementedFunc),
604 /* 101 */ SyscallDesc("ioperm", unimplementedFunc),
605 /* 102 */ SyscallDesc("socketcall", unimplementedFunc),
606 /* 103 */ SyscallDesc("syslog", unimplementedFunc),
607 /* 104 */ SyscallDesc("setitimer", unimplementedFunc),
608 /* 105 */ SyscallDesc("getitimer", unimplementedFunc),
609 /* 106 */ SyscallDesc("stat", unimplementedFunc),
610 /* 107 */ SyscallDesc("lstat", unimplementedFunc),
611 /* 108 */ SyscallDesc("fstat", unimplementedFunc),
612 /* 109 */ SyscallDesc("olduname", unimplementedFunc),
613 /* 110 */ SyscallDesc("iopl", unimplementedFunc),
614 /* 111 */ SyscallDesc("vhangup", unimplementedFunc),
615 /* 112 */ SyscallDesc("idle", unimplementedFunc),
616 /* 113 */ SyscallDesc("vm86old", unimplementedFunc),
617 /* 114 */ SyscallDesc("wait4", unimplementedFunc),
618 /* 115 */ SyscallDesc("swapoff", unimplementedFunc),
619 /* 116 */ SyscallDesc("sysinfo", sysinfoFunc<X86Linux32>),
620 /* 117 */ SyscallDesc("ipc", unimplementedFunc),
621 /* 118 */ SyscallDesc("fsync", unimplementedFunc),
622 /* 119 */ SyscallDesc("sigreturn", unimplementedFunc),
623 /* 120 */ SyscallDesc("clone", unimplementedFunc),
624 /* 121 */ SyscallDesc("setdomainname", unimplementedFunc),
625 /* 122 */ SyscallDesc("uname", unameFunc),
626 /* 123 */ SyscallDesc("modify_ldt", unimplementedFunc),
627 /* 124 */ SyscallDesc("adjtimex", unimplementedFunc),
628 /* 125 */ SyscallDesc("mprotect", ignoreFunc),
629 /* 126 */ SyscallDesc("sigprocmask", unimplementedFunc),
630 /* 127 */ SyscallDesc("create_module", unimplementedFunc),
631 /* 128 */ SyscallDesc("init_module", unimplementedFunc),
632 /* 129 */ SyscallDesc("delete_module", unimplementedFunc),
633 /* 130 */ SyscallDesc("get_kernel_syms", unimplementedFunc),
634 /* 131 */ SyscallDesc("quotactl", unimplementedFunc),
635 /* 132 */ SyscallDesc("getpgid", unimplementedFunc),
636 /* 133 */ SyscallDesc("fchdir", unimplementedFunc),
637 /* 134 */ SyscallDesc("bdflush", unimplementedFunc),
638 /* 135 */ SyscallDesc("sysfs", unimplementedFunc),
639 /* 136 */ SyscallDesc("personality", unimplementedFunc),
640 /* 137 */ SyscallDesc("afs_syscall", unimplementedFunc),
641 /* 138 */ SyscallDesc("setfsuid", unimplementedFunc),
642 /* 139 */ SyscallDesc("setfsgid", unimplementedFunc),
643 /* 140 */ SyscallDesc("_llseek", _llseekFunc),
644 /* 141 */ SyscallDesc("getdents", unimplementedFunc),
645 /* 142 */ SyscallDesc("_newselect", unimplementedFunc),
646 /* 143 */ SyscallDesc("flock", unimplementedFunc),
647 /* 144 */ SyscallDesc("msync", unimplementedFunc),
648 /* 145 */ SyscallDesc("readv", unimplementedFunc),
649 /* 146 */ SyscallDesc("writev", writevFunc<X86Linux32>),
650 /* 147 */ SyscallDesc("getsid", unimplementedFunc),
651 /* 148 */ SyscallDesc("fdatasync", unimplementedFunc),
652 /* 149 */ SyscallDesc("_sysctl", unimplementedFunc),
653 /* 150 */ SyscallDesc("mlock", unimplementedFunc),
654 /* 151 */ SyscallDesc("munlock", unimplementedFunc),
655 /* 152 */ SyscallDesc("mlockall", unimplementedFunc),
656 /* 153 */ SyscallDesc("munlockall", unimplementedFunc),
657 /* 154 */ SyscallDesc("sched_setparam", unimplementedFunc),
658 /* 155 */ SyscallDesc("sched_getparam", unimplementedFunc),
659 /* 156 */ SyscallDesc("sched_setscheduler", unimplementedFunc),
660 /* 157 */ SyscallDesc("sched_getscheduler", unimplementedFunc),
661 /* 158 */ SyscallDesc("sched_yield", unimplementedFunc),
662 /* 159 */ SyscallDesc("sched_get_priority_max", unimplementedFunc),
663 /* 160 */ SyscallDesc("sched_get_priority_min", unimplementedFunc),
664 /* 161 */ SyscallDesc("sched_rr_get_interval", unimplementedFunc),
665 /* 162 */ SyscallDesc("nanosleep", unimplementedFunc),
666 /* 163 */ SyscallDesc("mremap", unimplementedFunc),
667 /* 164 */ SyscallDesc("setresuid", unimplementedFunc),
668 /* 165 */ SyscallDesc("getresuid", unimplementedFunc),
669 /* 166 */ SyscallDesc("vm86", unimplementedFunc),
670 /* 167 */ SyscallDesc("query_module", unimplementedFunc),
671 /* 168 */ SyscallDesc("poll", unimplementedFunc),
672 /* 169 */ SyscallDesc("nfsservctl", unimplementedFunc),
673 /* 170 */ SyscallDesc("setresgid", unimplementedFunc),
674 /* 171 */ SyscallDesc("getresgid", unimplementedFunc),
675 /* 172 */ SyscallDesc("prctl", unimplementedFunc),
676 /* 173 */ SyscallDesc("rt_sigreturn", unimplementedFunc),
677 /* 174 */ SyscallDesc("rt_sigaction", ignoreFunc),
678 /* 175 */ SyscallDesc("rt_sigprocmask", ignoreFunc),
679 /* 176 */ SyscallDesc("rt_sigpending", unimplementedFunc),
680 /* 177 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
681 /* 178 */ SyscallDesc("rt_sigqueueinfo", unimplementedFunc),
682 /* 179 */ SyscallDesc("rt_sigsuspend", unimplementedFunc),
683 /* 180 */ SyscallDesc("pread64", unimplementedFunc),
684 /* 181 */ SyscallDesc("pwrite64", unimplementedFunc),
685 /* 182 */ SyscallDesc("chown", unimplementedFunc),
686 /* 183 */ SyscallDesc("getcwd", getcwdFunc),
687 /* 184 */ SyscallDesc("capget", unimplementedFunc),
688 /* 185 */ SyscallDesc("capset", unimplementedFunc),
689 /* 186 */ SyscallDesc("sigaltstack", unimplementedFunc),
690 /* 187 */ SyscallDesc("sendfile", unimplementedFunc),
691 /* 188 */ SyscallDesc("getpmsg", unimplementedFunc),
692 /* 189 */ SyscallDesc("putpmsg", unimplementedFunc),
693 /* 190 */ SyscallDesc("vfork", unimplementedFunc),
694 /* 191 */ SyscallDesc("ugetrlimit", ignoreFunc),
695 /* 192 */ SyscallDesc("mmap2", mmapFunc<X86Linux32>),
696 /* 193 */ SyscallDesc("truncate64", truncate64Func),
697 /* 194 */ SyscallDesc("ftruncate64", ftruncate64Func),
698 /* 195 */ SyscallDesc("stat64", stat64Func<X86Linux32>),
699 /* 196 */ SyscallDesc("lstat64", unimplementedFunc),
700 /* 197 */ SyscallDesc("fstat64", fstat64Func<X86Linux32>),
701 /* 198 */ SyscallDesc("lchown32", unimplementedFunc),
702 /* 199 */ SyscallDesc("getuid32", getuidFunc),
703 /* 200 */ SyscallDesc("getgid32", getgidFunc),
704 /* 201 */ SyscallDesc("geteuid32", geteuidFunc),
705 /* 202 */ SyscallDesc("getegid32", getegidFunc),
706 /* 203 */ SyscallDesc("setreuid32", unimplementedFunc),
707 /* 204 */ SyscallDesc("setregid32", unimplementedFunc),
708 /* 205 */ SyscallDesc("getgroups32", unimplementedFunc),
709 /* 206 */ SyscallDesc("setgroups32", unimplementedFunc),
710 /* 207 */ SyscallDesc("fchown32", unimplementedFunc),
711 /* 208 */ SyscallDesc("setresuid32", unimplementedFunc),
712 /* 209 */ SyscallDesc("getresuid32", unimplementedFunc),
713 /* 210 */ SyscallDesc("setresgid32", unimplementedFunc),
714 /* 211 */ SyscallDesc("getresgid32", unimplementedFunc),
715 /* 212 */ SyscallDesc("chown32", unimplementedFunc),
716 /* 213 */ SyscallDesc("setuid32", unimplementedFunc),
717 /* 214 */ SyscallDesc("setgid32", unimplementedFunc),
718 /* 215 */ SyscallDesc("setfsuid32", unimplementedFunc),
719 /* 216 */ SyscallDesc("setfsgid32", unimplementedFunc),
720 /* 217 */ SyscallDesc("pivot_root", unimplementedFunc),
721 /* 218 */ SyscallDesc("mincore", unimplementedFunc),
722 /* 219 */ SyscallDesc("madvise", unimplementedFunc),
723 /* 220 */ SyscallDesc("madvise1", unimplementedFunc),
724 /* 221 */ SyscallDesc("getdents64", unimplementedFunc),
725 /* 222 */ SyscallDesc("fcntl64", unimplementedFunc),
726 /* 223 */ SyscallDesc("unused", unimplementedFunc),
727 /* 224 */ SyscallDesc("gettid", unimplementedFunc),
728 /* 225 */ SyscallDesc("readahead", unimplementedFunc),
729 /* 226 */ SyscallDesc("setxattr", unimplementedFunc),
730 /* 227 */ SyscallDesc("lsetxattr", unimplementedFunc),
731 /* 228 */ SyscallDesc("fsetxattr", unimplementedFunc),
732 /* 229 */ SyscallDesc("getxattr", unimplementedFunc),
733 /* 230 */ SyscallDesc("lgetxattr", unimplementedFunc),
734 /* 231 */ SyscallDesc("fgetxattr", unimplementedFunc),
735 /* 232 */ SyscallDesc("listxattr", unimplementedFunc),
736 /* 233 */ SyscallDesc("llistxattr", unimplementedFunc),
737 /* 234 */ SyscallDesc("flistxattr", unimplementedFunc),
738 /* 235 */ SyscallDesc("removexattr", unimplementedFunc),
739 /* 236 */ SyscallDesc("lremovexattr", unimplementedFunc),
740 /* 237 */ SyscallDesc("fremovexattr", unimplementedFunc),
741 /* 238 */ SyscallDesc("tkill", unimplementedFunc),
742 /* 239 */ SyscallDesc("sendfile64", unimplementedFunc),
743 /* 240 */ SyscallDesc("futex", unimplementedFunc),
744 /* 241 */ SyscallDesc("sched_setaffinity", unimplementedFunc),
745 /* 242 */ SyscallDesc("sched_getaffinity", unimplementedFunc),
746 /* 243 */ SyscallDesc("set_thread_area", setThreadArea32Func),
747 /* 244 */ SyscallDesc("get_thread_area", unimplementedFunc),
748 /* 245 */ SyscallDesc("io_setup", unimplementedFunc),
749 /* 246 */ SyscallDesc("io_destroy", unimplementedFunc),
750 /* 247 */ SyscallDesc("io_getevents", unimplementedFunc),
751 /* 248 */ SyscallDesc("io_submit", unimplementedFunc),
752 /* 249 */ SyscallDesc("io_cancel", unimplementedFunc),
753 /* 250 */ SyscallDesc("fadvise64", unimplementedFunc),
754 /* 251 */ SyscallDesc("unused", unimplementedFunc),
755 /* 252 */ SyscallDesc("exit_group", exitFunc),
756 /* 253 */ SyscallDesc("lookup_dcookie", unimplementedFunc),
757 /* 254 */ SyscallDesc("epoll_create", unimplementedFunc),
758 /* 255 */ SyscallDesc("epoll_ctl", unimplementedFunc),
759 /* 256 */ SyscallDesc("epoll_wait", unimplementedFunc),
760 /* 257 */ SyscallDesc("remap_file_pages", unimplementedFunc),
761 /* 258 */ SyscallDesc("set_tid_address", unimplementedFunc),
762 /* 259 */ SyscallDesc("timer_create", unimplementedFunc),
763 /* 260 */ SyscallDesc("timer_settime", unimplementedFunc),
764 /* 261 */ SyscallDesc("timer_gettime", unimplementedFunc),
765 /* 262 */ SyscallDesc("timer_getoverrun", unimplementedFunc),
766 /* 263 */ SyscallDesc("timer_delete", unimplementedFunc),
767 /* 264 */ SyscallDesc("clock_settime", unimplementedFunc),
768 /* 265 */ SyscallDesc("clock_gettime", unimplementedFunc),
769 /* 266 */ SyscallDesc("clock_getres", unimplementedFunc),
770 /* 267 */ SyscallDesc("clock_nanosleep", unimplementedFunc),
771 /* 268 */ SyscallDesc("statfs64", unimplementedFunc),
772 /* 269 */ SyscallDesc("fstatfs64", unimplementedFunc),
773 /* 270 */ SyscallDesc("tgkill", unimplementedFunc),
774 /* 271 */ SyscallDesc("utimes", unimplementedFunc),
775 /* 272 */ SyscallDesc("fadvise64_64", unimplementedFunc),
776 /* 273 */ SyscallDesc("vserver", unimplementedFunc),
777 /* 274 */ SyscallDesc("mbind", unimplementedFunc),
778 /* 275 */ SyscallDesc("get_mempolicy", unimplementedFunc),
779 /* 276 */ SyscallDesc("set_mempolicy", unimplementedFunc),
780 /* 277 */ SyscallDesc("mq_open", unimplementedFunc),
781 /* 278 */ SyscallDesc("mq_unlink", unimplementedFunc),
782 /* 279 */ SyscallDesc("mq_timedsend", unimplementedFunc),
783 /* 280 */ SyscallDesc("mq_timedreceive", unimplementedFunc),
784 /* 281 */ SyscallDesc("mq_notify", unimplementedFunc),
785 /* 282 */ SyscallDesc("mq_getsetattr", unimplementedFunc),
786 /* 283 */ SyscallDesc("kexec_load", unimplementedFunc),
787 /* 284 */ SyscallDesc("waitid", unimplementedFunc),
788 /* 285 */ SyscallDesc("sys_setaltroot", unimplementedFunc),
789 /* 286 */ SyscallDesc("add_key", unimplementedFunc),
790 /* 287 */ SyscallDesc("request_key", unimplementedFunc),
791 /* 288 */ SyscallDesc("keyctl", unimplementedFunc),
792 /* 289 */ SyscallDesc("ioprio_set", unimplementedFunc),
793 /* 290 */ SyscallDesc("ioprio_get", unimplementedFunc),
794 /* 291 */ SyscallDesc("inotify_init", unimplementedFunc),
795 /* 292 */ SyscallDesc("inotify_add_watch", unimplementedFunc),
796 /* 293 */ SyscallDesc("inotify_rm_watch", unimplementedFunc),
797 /* 294 */ SyscallDesc("migrate_pages", unimplementedFunc),
798 /* 295 */ SyscallDesc("openat", unimplementedFunc),
799 /* 296 */ SyscallDesc("mkdirat", unimplementedFunc),
800 /* 297 */ SyscallDesc("mknodat", unimplementedFunc),
801 /* 298 */ SyscallDesc("fchownat", unimplementedFunc),
802 /* 299 */ SyscallDesc("futimesat", unimplementedFunc),
803 /* 300 */ SyscallDesc("fstatat64", unimplementedFunc),
804 /* 301 */ SyscallDesc("unlinkat", unimplementedFunc),
805 /* 302 */ SyscallDesc("renameat", unimplementedFunc),
806 /* 303 */ SyscallDesc("linkat", unimplementedFunc),
807 /* 304 */ SyscallDesc("symlinkat", unimplementedFunc),
808 /* 305 */ SyscallDesc("readlinkat", unimplementedFunc),
809 /* 306 */ SyscallDesc("fchmodat", unimplementedFunc),
810 /* 307 */ SyscallDesc("faccessat", unimplementedFunc),
811 /* 308 */ SyscallDesc("pselect6", unimplementedFunc),
812 /* 309 */ SyscallDesc("ppoll", unimplementedFunc),
813 /* 310 */ SyscallDesc("unshare", unimplementedFunc),
814 /* 311 */ SyscallDesc("set_robust_list", unimplementedFunc),
815 /* 312 */ SyscallDesc("get_robust_list", unimplementedFunc),
816 /* 313 */ SyscallDesc("splice", unimplementedFunc),
817 /* 314 */ SyscallDesc("sync_file_range", unimplementedFunc),
818 /* 315 */ SyscallDesc("tee", unimplementedFunc),
819 /* 316 */ SyscallDesc("vmsplice", unimplementedFunc),
820 /* 317 */ SyscallDesc("move_pages", unimplementedFunc),
821 /* 318 */ SyscallDesc("getcpu", unimplementedFunc),
822 /* 319 */ SyscallDesc("epoll_pwait", unimplementedFunc),
823 /* 320 */ SyscallDesc("utimensat", unimplementedFunc),
824 /* 321 */ SyscallDesc("signalfd", unimplementedFunc),
825 /* 322 */ SyscallDesc("timerfd", unimplementedFunc),
826 /* 323 */ SyscallDesc("eventfd", unimplementedFunc)
827};
828
56I386LinuxProcess::I386LinuxProcess(LiveProcessParams * params,
57 ObjectFile *objFile)
829I386LinuxProcess::I386LinuxProcess(LiveProcessParams * params,
830 ObjectFile *objFile)
58 : I386LiveProcess(params, objFile, syscallDescs, numSyscalls)
831 : I386LiveProcess(params, objFile, syscallDescs32,
832 sizeof(syscallDescs32) / sizeof(SyscallDesc))
59{}
833{}