1bb748cb5cd8eb9a5739586221e1ab80d529c8c3ctom#define _GNU_SOURCE
2bb748cb5cd8eb9a5739586221e1ab80d529c8c3ctom
39faf3ed28d365fc3eb4270c4408d9ac03ff3e104sewardj#include "../../memcheck.h"
475a8c98921a3f59ac0351c270b84fa1c7cc29e01nethercote#include "scalar.h"
5870f170ccce872764e974b86f55247c0d97dc634njn#include <unistd.h>
6870f170ccce872764e974b86f55247c0d97dc634njn#include <sched.h>
7870f170ccce872764e974b86f55247c0d97dc634njn#include <signal.h>
8e4310b34c9de11dce6477053259afbaab498370ebart#include <linux/mman.h> // MREMAP_FIXED
9ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes#include <sys/prctl.h>
10c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
11330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// Here we are trying to trigger every syscall error (scalar errors and
12330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// memory errors) for every syscall.  We do this by passing a lot of bogus
13330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// arguments, mostly 0 and 1 (often it's 1 because NULL ptr args often aren't
14330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// checked for memory errors, or in order to have a non-zero length used
15330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// with some buffer).  So most of the syscalls don't actually succeed and do
16330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// anything.
17330abb517e58fd0ee96fda7fb8563e32e029a63enethercote//
18330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// Occasionally we have to be careful not to cause Valgrind to seg fault in
19330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// its pre-syscall wrappers;  it does so because it can't know in general
20330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// when memory is unaddressable, and so tries to dereference it when doing
211d0825ff46d57f0ce83c3fa88538a42f67022eeenjn// PRE_MEM_READ/PRE_MEM_WRITE calls.  (Note that Memcheck will
22330abb517e58fd0ee96fda7fb8563e32e029a63enethercote// always issue an error message immediately before these seg faults occur).
233d22508583ff2adf28fda5c73b1c6e6a966be537njn//
243d22508583ff2adf28fda5c73b1c6e6a966be537njn// The output has numbers like "3s 2m" for each syscall.  "s" is short for
253d22508583ff2adf28fda5c73b1c6e6a966be537njn// "scalar", ie. the argument itself is undefined.  "m" is short for "memory",
263d22508583ff2adf28fda5c73b1c6e6a966be537njn// ie. the argument points to memory which is unaddressable.
27330abb517e58fd0ee96fda7fb8563e32e029a63enethercote
288b76fe55a596a4296ba5028e2510015fef38b02fnethercoteint main(void)
298b76fe55a596a4296ba5028e2510015fef38b02fnethercote{
30303a751b15a2c604100dee2e9c7355fdad5b7f13nethercote   // uninitialised, but we know px[0] is 0x0
31303a751b15a2c604100dee2e9c7355fdad5b7f13nethercote   long* px  = malloc(sizeof(long));
32303a751b15a2c604100dee2e9c7355fdad5b7f13nethercote   long  x0  = px[0];
3392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   long  res;
34e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
35e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // All __NR_xxx numbers are taken from x86
368b305afa8054d5d2093cde7a278597cf4a866c47nethercote
37b9d1e65c39913d56020d508fdf38db3992c4a378nethercote   // __NR_restart_syscall 0  // XXX: not yet handled, perhaps should be...
38b9d1e65c39913d56020d508fdf38db3992c4a378nethercote   GO(__NR_restart_syscall, "n/a");
39b9d1e65c39913d56020d508fdf38db3992c4a378nethercote //SY(__NR_restart_syscall); // (Not yet handled by Valgrind) FAIL;
409c311eb3d0c532a972449e5e600d10f0470120b6nethercote
41e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // __NR_exit 1
42d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_exit, "below");
43e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // (see below)
44e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
45e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // __NR_fork 2
46d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_fork, "other");
479b9b74b17f1a3b33949c11da3703cbf140b137e8nethercote   // (sse scalar_fork.c)
48e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
4942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_read 3
50e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // Nb: here we are also getting an error from the syscall arg itself.
51660e4eefc61fbfa322277ab4afaa6ae4e0104ab7nethercote   GO(__NR_read, "1+3s 1m");
5292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_read+x0, x0, x0, x0+1); FAILx(EFAULT);
53e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
5442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_write 4
55eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote   GO(__NR_write, "3s 1m");
5692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_write, x0, x0, x0+1); FAIL;
57c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
5842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_open 5
59c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_open, "(2-args) 2s 1m");
6092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_open, x0, x0); FAIL;
61c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
62870f170ccce872764e974b86f55247c0d97dc634njn   // Only 1s 0m errors -- the other 2s 1m have been checked in the previous
63870f170ccce872764e974b86f55247c0d97dc634njn   // open test, and if we test them they may be commoned up but they also
64870f170ccce872764e974b86f55247c0d97dc634njn   // may not.
6592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_open, "(3-args) 1s 0m");
66870f170ccce872764e974b86f55247c0d97dc634njn   SY(__NR_open, "scalar.c", O_CREAT|O_EXCL, x0); FAIL;
67c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
6842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_close 6
69c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_close, "1s 0m");
7092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_close, x0-1); FAIL;
71c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
7242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_waitpid 7
73c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_waitpid, "3s 1m");
7492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_waitpid, x0, x0+1, x0); FAIL;
75e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
7642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_creat 8
77c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_creat, "2s 1m");
7892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_creat, x0, x0); FAIL;
79e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
8042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_link 9
81c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_link, "2s 2m");
8292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_link, x0, x0); FAIL;
83c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
8442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_unlink 10
85c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_unlink, "1s 1m");
8692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_unlink, x0); FAIL;
87e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
8842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_execve 11
897310afb71e7db05a9df8c1e9c7332f92c4d3d8fanethercote   GO(__NR_execve, "3s 1m");
90ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_execve, x0 + 1, x0 + 1, x0); FAIL;
91ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes
92ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_execve, "3s 1m");
93ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_execve, x0 + 1, x0, x0 + 1); FAIL;
94ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes
95ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   char *argv_envp[] = {(char *) (x0 + 1), NULL};
96ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_execve, "4s 2m");
97ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_execve, x0 + 1, x0 + argv_envp, x0); FAIL;
98ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes
99ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_execve, "4s 2m");
100ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_execve, x0 + 1, x0, x0 + argv_envp); FAIL;
1017310afb71e7db05a9df8c1e9c7332f92c4d3d8fanethercote
10242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_chdir 12
103c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_chdir, "1s 1m");
10492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_chdir, x0); FAIL;
105c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
10642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_time 13
107c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_time, "1s 1m");
10892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_time, x0+1); FAIL;
109c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
11042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mknod 14
111eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote   GO(__NR_mknod, "3s 1m");
11292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mknod, x0, x0, x0); FAIL;
113c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
11442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_chmod 15
115eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote   GO(__NR_chmod, "2s 1m");
11692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_chmod, x0, x0); FAIL;
117c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
118e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // __NR_lchown 16
11942b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_lchown, "n/a");
12092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_lchown); // (Not yet handled by Valgrind) FAIL;
121eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
12242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_break 17
12342b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_break, "ni");
12492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_break); FAIL;
125eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
126e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // __NR_oldstat 18
12742b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_oldstat, "n/a");
1289a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   // (obsolete, not handled by Valgrind)
129c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
13042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lseek 19
131eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote   GO(__NR_lseek, "3s 0m");
13292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lseek, x0-1, x0, x0); FAILx(EBADF);
133c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
13442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getpid 20
135eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote   GO(__NR_getpid, "0s 0m");
13692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getpid); SUCC;
1374e632c27da75082fb80efae45bbf5f7fbf8a2e3enethercote
13842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mount 21
139c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_mount, "5s 3m");
14092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mount, x0, x0, x0, x0, x0); FAIL;
1414e632c27da75082fb80efae45bbf5f7fbf8a2e3enethercote
14242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_umount 22
143c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_umount, "1s 1m");
14492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_umount, x0); FAIL;
145c6851dde1b46166417a2bdb096c05818f5f07f09nethercote
14642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setuid 23
147c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_setuid, "1s 0m");
14892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setuid, x0); FAIL;
1490df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
15042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getuid 24
15142b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getuid, "0s 0m");
15292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getuid); SUCC;
1530df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
154e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // __NR_stime 25
15542b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_stime, "n/a");
15692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_stime); // (Not yet handled by Valgrind) FAIL;
1579a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
15842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_ptrace 26
159fbd55ef61b2b72f265068b41b24402e9dc52fcd7nethercote   // XXX: memory pointed to be arg3 goes unchecked... otherwise would be 2m
160fbd55ef61b2b72f265068b41b24402e9dc52fcd7nethercote   GO(__NR_ptrace, "4s 1m");
16192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ptrace, x0+PTRACE_GETREGS, x0, x0, x0); FAIL;
1629a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
16342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_alarm 27
1649a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_alarm, "1s 0m");
16592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_alarm, x0); SUCC;
1669a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
167e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // __NR_oldfstat 28
16842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_oldfstat, "n/a");
1699a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   // (obsolete, not handled by Valgrind)
1700df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
17142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_pause 29
172d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_pause, "ignore");
173d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   // (hard to test, and no args so not much to be gained -- don't bother)
1740df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
17542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_utime 30
1769a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_utime, "2s 2m");
17792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_utime, x0, x0+1); FAIL;
178eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
17942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_stty 31
18042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_stty, "ni");
18192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_stty); FAIL;
182eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
18342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_gtty 32
18442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_gtty, "ni");
18592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_gtty); FAIL;
186eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
18742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_access 33
1889a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_access, "2s 1m");
18992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_access, x0, x0); FAIL;
190eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
19142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_nice 34
1929a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_nice, "1s 0m");
19392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_nice, x0); SUCC;
194eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
19542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_ftime 35
19642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_ftime, "ni");
19792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ftime); FAIL;
1980df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
19942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sync 36
20042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_sync, "0s 0m");
20192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sync); SUCC;
2020df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
20342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_kill 37
2049a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_kill, "2s 0m");
20592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_kill, x0, x0); SUCC;
2069a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
20742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_rename 38
2089a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_rename, "2s 2m");
20992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_rename, x0, x0); FAIL;
2109a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
21142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mkdir 39
2129a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_mkdir, "2s 1m");
21392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mkdir, x0, x0); FAIL;
2149a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
21542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_rmdir 40
2169a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_rmdir, "1s 1m");
21792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_rmdir, x0); FAIL;
2189a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
21942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_dup 41
2209a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_dup, "1s 0m");
22192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_dup, x0-1); FAIL;
2229a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
22342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_pipe 42
2249a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote   GO(__NR_pipe, "1s 1m");
22592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_pipe, x0); FAIL;
2269a3beb9fc89e9859ca9c3b93fa9c08ee2a2df11bnethercote
22742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_times 43
2289c311eb3d0c532a972449e5e600d10f0470120b6nethercote   GO(__NR_times, "1s 1m");
22992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_times, x0+1); FAIL;
230eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
23142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_prof 44
23242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_prof, "ni");
23392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_prof); FAIL;
234eb1c7b730b5f601c2a5d55ee3dd02f930df4792fnethercote
23542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_brk 45
2369c311eb3d0c532a972449e5e600d10f0470120b6nethercote   GO(__NR_brk, "1s 0m");
23792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_brk, x0); SUCC;
2389c311eb3d0c532a972449e5e600d10f0470120b6nethercote
23942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setgid 46
2409c311eb3d0c532a972449e5e600d10f0470120b6nethercote   GO(__NR_setgid, "1s 0m");
24192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setgid, x0); FAIL;
2420df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
24342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getgid 47
24442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getgid, "0s 0m");
24592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getgid); SUCC;
2460df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
247e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   // __NR_signal 48
24842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_signal, "n/a");
24992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_signal); // (Not yet handled by Valgrind) FAIL;
2500df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
25142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_geteuid 49
25242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_geteuid, "0s 0m");
25392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_geteuid); SUCC;
2540df495a33f39817e5cabbe94f3a5159f178d1a3anethercote
25542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getegid 50
25642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getegid, "0s 0m");
25792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getegid); SUCC;
2586c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
25942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_acct 51
2606c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_acct, "1s 1m");
26192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_acct, x0); FAIL;
2626c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
26342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_umount2 52
2646c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_umount2, "2s 1m");
26592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_umount2, x0, x0); FAIL;
2666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
26742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lock 53
26842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_lock, "ni");
26992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lock); FAIL;
2706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
27142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_ioctl 54
2726c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   #include <asm/ioctls.h>
2736c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_ioctl, "3s 1m");
27492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ioctl, x0, x0+TCSETS, x0); FAIL;
2756c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
27642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fcntl 55
277cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   // As with sys_open(), the 'fd' error is suppressed for the later ones.
278cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   // For F_GETFD the 3rd arg is ignored
279cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   GO(__NR_fcntl, "(GETFD) 2s 0m");
280cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   SY(__NR_fcntl, x0-1, x0+F_GETFD, x0); FAILx(EBADF);
281cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn
282870f170ccce872764e974b86f55247c0d97dc634njn   // For F_DUPFD the 3rd arg is 'arg'.  We don't check the 1st two args
283870f170ccce872764e974b86f55247c0d97dc634njn   // because any errors may or may not be commoned up with the ones from
284870f170ccce872764e974b86f55247c0d97dc634njn   // the previous fcntl call.
285cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   GO(__NR_fcntl, "(DUPFD) 1s 0m");
286870f170ccce872764e974b86f55247c0d97dc634njn   SY(__NR_fcntl, -1, F_DUPFD, x0); FAILx(EBADF);
287cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn
288870f170ccce872764e974b86f55247c0d97dc634njn   // For F_GETLK the 3rd arg is 'lock'.  On x86, this fails w/EBADF.  But
289870f170ccce872764e974b86f55247c0d97dc634njn   // on amd64 in 32-bit mode it fails w/EFAULT.  We don't check the 1st two
290870f170ccce872764e974b86f55247c0d97dc634njn   // args for the reason given above.
291ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_fcntl, "(GETLK) 1s 5m");
292870f170ccce872764e974b86f55247c0d97dc634njn   SY(__NR_fcntl, -1, F_GETLK, x0); FAIL; //FAILx(EBADF);
2936c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
29442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mpx 56
29542b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_mpx, "ni");
29692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mpx); FAIL;
2976c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
2986c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_setpgid 57
2996c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setpgid, "2s 0m");
30092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setpgid, x0, x0-1); FAIL;
3016c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
30242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_ulimit 58
30342b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_ulimit, "ni");
30492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ulimit); FAIL;
3056c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3066c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_oldolduname 59
30742b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_oldolduname, "n/a");
3086c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // (obsolete, not handled by Valgrind)
3096c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3106c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_umask 60
3116c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_umask, "1s 0m");
31292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_umask, x0+022); SUCC;
3136c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3146c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_chroot 61
3156c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_chroot, "1s 1m");
31692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_chroot, x0); FAIL;
3176c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3186c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_ustat 62
31942b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_ustat, "n/a");
3206c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // (deprecated, not handled by Valgrind)
3216c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3226c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_dup2 63
3236c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_dup2, "2s 0m");
32492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_dup2, x0-1, x0); FAIL;
3256c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
32642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getppid 64
32742b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getppid, "0s 0m");
32892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getppid); SUCC;
3296c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
33042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getpgrp 65
33142b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getpgrp, "0s 0m");
33292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getpgrp); SUCC;
3336c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
33442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setsid 66
33542b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_setsid, "0s 0m");
33692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setsid); SUCC_OR_FAIL;
3376c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
33842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sigaction 67
339a23e6c9a3ba38d0e6ad3396e853d5e9474f0c912njn   GO(__NR_sigaction, "3s 4m");
34050acf1d7db73549c2af783d6acb79962a171b12enjn   SY(__NR_sigaction, x0, x0+&px[1], x0+&px[1]); FAIL;
3416c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
34242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sgetmask 68 sys_sgetmask()
34342b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_sgetmask, "n/a");
34492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_sgetmask); // (Not yet handled by Valgrind) FAIL;
3456c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3466c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_ssetmask 69
34742b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_ssetmask, "n/a");
34892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_ssetmask); // (Not yet handled by Valgrind) FAIL;
3496c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
35042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setreuid 70
3516c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setreuid, "2s 0m");
35292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setreuid, x0, x0); FAIL;
3536c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
35442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setregid 71
3556c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setregid, "2s 0m");
35692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setregid, x0, x0); FAIL;
3576c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
35842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sigsuspend 72
3596c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // XXX: how do you use this function?
360d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_sigsuspend, "ignore");
361d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   // (I don't know how to test this...)
3626c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
36342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sigpending 73
3646c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_sigpending, "1s 1m");
36592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sigpending, x0); FAIL;
3666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3676c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sethostname 74
36842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_sethostname, "n/a");
36992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_sethostname); // (Not yet handled by Valgrind) FAIL;
3706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
37142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setrlimit 75
3726c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setrlimit, "2s 1m");
37392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setrlimit, x0, x0); FAIL;
3746c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3756c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_getrlimit 76
3766c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getrlimit, "2s 1m");
37792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getrlimit, x0, x0); FAIL;
3786c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
3796c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_getrusage 77
3806c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getrusage, "2s 1m");
38192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getrusage, x0, x0); FAIL;
3826c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
38342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_gettimeofday 78
3846c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_gettimeofday, "2s 2m");
38572bbd8d24c6bd39734f465ce8d54904b6865de9bnjn   SY(__NR_gettimeofday, x0+1, x0+1); FAIL;
3866c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
38742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_settimeofday 79
3886c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_settimeofday, "2s 2m");
38972bbd8d24c6bd39734f465ce8d54904b6865de9bnjn   SY(__NR_settimeofday, x0+1, x0+1); FAIL;
3906c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
39142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getgroups 80
3926c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getgroups, "2s 1m");
39392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getgroups, x0+1, x0+1); FAIL;
3946c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
39542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setgroups 81
3966c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setgroups, "2s 1m");
39792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setgroups, x0+1, x0+1); FAIL;
3986c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
39942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_select 82
4006c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   {
4016c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote      long args[5] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1 };
402870f170ccce872764e974b86f55247c0d97dc634njn      GO(__NR_select, "1s 5m");
40392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote      SY(__NR_select, args+x0); FAIL;
4046c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   }
4056c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
40642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_symlink 83
4075a945afbb6f858ed3a51219bb8aaf24caa07c2c5nethercote   GO(__NR_symlink, "2s 2m");
40892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_symlink, x0, x0); FAIL;
4096c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
4106c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_oldlstat 84
41142b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_oldlstat, "n/a");
4126c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // (obsolete, not handled by Valgrind)
4136c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
4146c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_readlink 85
4155a945afbb6f858ed3a51219bb8aaf24caa07c2c5nethercote   GO(__NR_readlink, "3s 2m");
41692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_readlink, x0+1, x0+1, x0+1); FAIL;
4176c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
4186c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_uselib 86
41942b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_uselib, "n/a");
42092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_uselib); // (Not yet handled by Valgrind) FAIL;
4216c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
4226c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_swapon 87
42342b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_swapon, "n/a");
42492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_swapon); // (Not yet handled by Valgrind) FAIL;
4256c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
4266c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_reboot 88
42742b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_reboot, "n/a");
42892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_reboot); // (Not yet handled by Valgrind) FAIL;
4296c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
4306c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_readdir 89
43142b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_readdir, "n/a");
4326c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // (superseded, not handled by Valgrind)
4336c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
43442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mmap 90
435151effa452a43ebf3da8bc2b0924887e3c0a91d5nethercote   {
436151effa452a43ebf3da8bc2b0924887e3c0a91d5nethercote      long args[6] = { x0, x0, x0, x0, x0-1, x0 };
437870f170ccce872764e974b86f55247c0d97dc634njn      GO(__NR_mmap, "1s 1m");
43892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote      SY(__NR_mmap, args+x0); FAIL;
439151effa452a43ebf3da8bc2b0924887e3c0a91d5nethercote   }
4406c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
44142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_munmap 91
44206c7bd748d9b40861e8a764e4947b30a787fef2bnethercote   GO(__NR_munmap, "2s 0m");
44392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_munmap, x0, x0); FAIL;
4446c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
44542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_truncate 92
4465a945afbb6f858ed3a51219bb8aaf24caa07c2c5nethercote   GO(__NR_truncate, "2s 1m");
44792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_truncate, x0, x0); FAIL;
4486c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
44942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_ftruncate 93
4505a945afbb6f858ed3a51219bb8aaf24caa07c2c5nethercote   GO(__NR_ftruncate, "2s 0m");
45192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ftruncate, x0, x0); FAIL;
4526c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
45342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fchmod 94
454dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_fchmod, "2s 0m");
45592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fchmod, x0-1, x0); FAIL;
4566c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
45742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fchown 95
4586c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_fchown, "3s 0m");
45992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fchown, x0, x0, x0); FAIL;
4606c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
46142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getpriority 96
462dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_getpriority, "2s 0m");
46392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getpriority, x0-1, x0); FAIL;
4646c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
46542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setpriority 97
466dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_setpriority, "3s 0m");
46792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setpriority, x0-1, x0, x0); FAIL;
4686c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
4696c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_profil 98
47042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_profil, "ni");
47192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_profil); FAIL;
4726c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
47342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_statfs 99
474dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_statfs, "2s 2m");
47592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_statfs, x0, x0); FAIL;
4766c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
47742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fstatfs 100
478dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_fstatfs, "2s 1m");
47992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fstatfs, x0, x0); FAIL;
4806c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
48142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_ioperm 101
482dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_ioperm, "3s 0m");
48392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ioperm, x0, x0, x0); FAIL;
4846c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
48542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_socketcall 102
486d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_socketcall, "XXX");
487d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   // (XXX: need to do all sub-cases properly)
4886c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
48942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_syslog 103
490dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_syslog, "3s 1m");
49192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_syslog, x0+2, x0, x0+1); FAIL;
4926c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
49342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setitimer 104
4945b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_setitimer, "3s 2m");
49592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setitimer, x0, x0+1, x0+1); FAIL;
4966c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
49742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getitimer 105
4985b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_getitimer, "2s 1m");
49992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getitimer, x0, x0, x0); FAIL;
5006c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
50142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_stat 106
5026c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_stat, "2s 2m");
50392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_stat, x0, x0); FAIL;
5046c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
50542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lstat 107
5066c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_lstat, "2s 2m");
50792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lstat, x0, x0); FAIL;
5086c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
50942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fstat 108
5106c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_fstat, "2s 1m");
51192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fstat, x0, x0); FAIL;
5126c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5136c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_olduname 109
51442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_olduname, "n/a");
5156c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // (obsolete, not handled by Valgrind)
5166c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
51742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_iopl 110
5187f7e4d1ac0c4ea8bf771e5490b69d0e4d619dfe9nethercote   GO(__NR_iopl, "1s 0m");
51992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_iopl, x0+100); FAIL;
5206c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
52142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_vhangup 111
52242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_vhangup, "0s 0m");
52392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_vhangup); SUCC_OR_FAIL;  // Will succeed for superuser
5246c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
52542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_idle 112
52642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_idle, "ni");
52792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_idle); FAIL;
5286c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5296c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_vm86old 113
53042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_vm86old, "n/a");
53142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // (will probably never be handled by Valgrind)
5326c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
53342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_wait4 114
5347f7e4d1ac0c4ea8bf771e5490b69d0e4d619dfe9nethercote   GO(__NR_wait4, "4s 2m");
53592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_wait4, x0, x0+1, x0, x0+1); FAIL;
5366c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5376c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_swapoff 115
53838e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_swapoff, "n/a");
53992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_swapoff); // (Not yet handled by Valgrind) FAIL;
5406c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
54142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sysinfo 116
542dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_sysinfo, "1s 1m");
54392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sysinfo, x0); FAIL;
5446c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5456c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_ipc 117
546d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   // XXX: This is simplistic -- need to do all the sub-cases properly.
5477f7e4d1ac0c4ea8bf771e5490b69d0e4d619dfe9nethercote   // XXX: Also, should be 6 scalar errors, except glibc's syscall() doesn't
5487f7e4d1ac0c4ea8bf771e5490b69d0e4d619dfe9nethercote   //      use the 6th one!
5497f7e4d1ac0c4ea8bf771e5490b69d0e4d619dfe9nethercote   GO(__NR_ipc, "5s 0m");
55092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ipc, x0+4, x0, x0, x0, x0, x0); FAIL;
5516c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
55242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fsync 118
553dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_fsync, "1s 0m");
55492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fsync, x0-1); FAIL;
5556c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5566c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sigreturn 119
557d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_sigreturn, "n/a");
558d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote //SY(__NR_sigreturn); // (Not yet handled by Valgrind) FAIL;
5596c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5606c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_clone 120
56116e36d8d1d60eb6c76245784a419f7cd9fa05563thughes#ifndef CLONE_PARENT_SETTID
56216e36d8d1d60eb6c76245784a419f7cd9fa05563thughes#define CLONE_PARENT_SETTID	0x00100000
56316e36d8d1d60eb6c76245784a419f7cd9fa05563thughes#endif
564a262f62d4fdd6e1b2e57070510573bcbfccaaf33njn   GO(__NR_clone, "5s 3m");
565a262f62d4fdd6e1b2e57070510573bcbfccaaf33njn   SY(__NR_clone, x0|CLONE_PARENT_SETTID|CLONE_SETTLS|CLONE_CHILD_SETTID|SIGCHLD, x0, x0, x0, x0); FAIL;
56692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   if (0 == res) {
56792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote      SY(__NR_exit, 0); FAIL;
56816e36d8d1d60eb6c76245784a419f7cd9fa05563thughes   }
5696c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_setdomainname 121
57142b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_setdomainname, "n/a");
57292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_setdomainname); // (Not yet handled by Valgrind) FAIL;
5736c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5746c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_uname 122
5756c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_uname, "1s 1m");
57692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_uname, x0); FAIL;
5776c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5786c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_modify_ldt 123
5790eafe55e939f876d23803d592233d10e376101adnethercote   GO(__NR_modify_ldt, "3s 1m");
58092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_modify_ldt, x0+1, x0, x0+1); FAILx(EINVAL);
5816c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
58242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_adjtimex 124
583d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   // XXX: need to do properly, but deref'ing NULL causing Valgrind to crash...
584d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote     GO(__NR_adjtimex, "XXX");
58592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote//   SY(__NR_adjtimex, x0); FAIL;
5866c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
58742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mprotect 125
58806c7bd748d9b40861e8a764e4947b30a787fef2bnethercote   GO(__NR_mprotect, "3s 0m");
58992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mprotect, x0+1, x0, x0); FAILx(EINVAL);
5906c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5916c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sigprocmask 126
59292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_sigprocmask, "3s 2m");
59392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sigprocmask, x0, x0+&px[1], x0+&px[1]); SUCC;
5946c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
59542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_create_module 127
59642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_create_module, "ni");
59792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_create_module); FAIL;
5986c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
5996c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_init_module 128
6000eafe55e939f876d23803d592233d10e376101adnethercote   GO(__NR_init_module, "3s 2m");
60192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_init_module, x0, x0+1, x0); FAIL;
6026c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6036c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_delete_module 129
60442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_delete_module, "n/a");
60592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_delete_module); // (Not yet handled by Valgrind) FAIL;
6066c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
60742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_get_kernel_syms 130
60842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_get_kernel_syms, "ni");
60992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_get_kernel_syms); FAIL;
6106c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
61142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_quotactl 131
6125b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_quotactl, "4s 1m");
61392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_quotactl, x0, x0, x0, x0); FAIL;
6146c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
61542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getpgid 132
6165b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_getpgid, "1s 0m");
61792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getpgid, x0-1); FAIL;
6186c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
61942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fchdir 133
6205b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_fchdir, "1s 0m");
62192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fchdir, x0-1); FAIL;
6226c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6236c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_bdflush 134
62438e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_bdflush, "n/a");
62592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_bdflush); // (Not yet handled by Valgrind) FAIL;
6266c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6276c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sysfs 135
628d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_sysfs, "n/a");
629d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote //SY(__NR_sysfs); // (Not yet handled by Valgrind) FAIL;
6306c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
63142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_personality 136
6325b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_personality, "1s 0m");
63392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_personality, x0+0xffffffff); SUCC;
6346c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
63542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_afs_syscall 137
63642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_afs_syscall, "ni");
63792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_afs_syscall); FAIL;
6386c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6396c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_setfsuid 138
6406c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setfsuid, "1s 0m");
64192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setfsuid, x0); SUCC;  // This syscall has a stupid return value
6426c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6436c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_setfsgid 139
6446c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setfsgid, "1s 0m");
64592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setfsgid, x0); SUCC;  // This syscall has a stupid return value
6466c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6476c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR__llseek 140
648d6b5a2103d0d57546d4ef9e00fb5f3a07fe0e803nethercote   GO(__NR__llseek, "5s 1m");
64992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR__llseek, x0, x0, x0, x0, x0); FAIL;
6506c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
65142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getdents 141
65206c7bd748d9b40861e8a764e4947b30a787fef2bnethercote   GO(__NR_getdents, "3s 1m");
65392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getdents, x0, x0, x0+1); FAIL;
6546c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
65542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR__newselect 142
6566c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR__newselect, "5s 4m");
65792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR__newselect, x0+8, x0+0xffffffff, x0+1, x0+1, x0+1); FAIL;
6586c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6596c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_flock 143
66006c7bd748d9b40861e8a764e4947b30a787fef2bnethercote   GO(__NR_flock, "2s 0m");
66192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_flock, x0, x0); FAIL;
6626c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
66342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_msync 144
66492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_msync, "3s 1m");
66592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_msync, x0, x0+1, x0); FAIL;
6666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6676c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_readv 145
668d6b5a2103d0d57546d4ef9e00fb5f3a07fe0e803nethercote   GO(__NR_readv, "3s 1m");
66992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_readv, x0, x0, x0+1); FAIL;
6706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6716c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_writev 146
672d6b5a2103d0d57546d4ef9e00fb5f3a07fe0e803nethercote   GO(__NR_writev, "3s 1m");
67392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_writev, x0, x0, x0+1); FAIL;
6746c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
67542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getsid 147
6765b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_getsid, "1s 0m");
67792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getsid, x0-1); FAIL;
6786c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
67942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fdatasync 148
680dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_fdatasync, "1s 0m");
68192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fdatasync, x0-1); FAIL;
6826c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
6836c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR__sysctl 149
6843954ea3d83385ac1da159a6cda76869e08342afdnethercote   GO(__NR__sysctl, "1s 1m");
68592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR__sysctl, x0); FAIL;
6866c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
68742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mlock 150
68806c7bd748d9b40861e8a764e4947b30a787fef2bnethercote   GO(__NR_mlock, "2s 0m");
68992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mlock, x0, x0+1); FAIL;
6906c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
69142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_munlock 151
69206c7bd748d9b40861e8a764e4947b30a787fef2bnethercote   GO(__NR_munlock, "2s 0m");
69392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_munlock, x0, x0+1); FAIL;
6946c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
69542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mlockall 152
69692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_mlockall, "1s 0m");
69792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mlockall, x0-1); FAIL;
6986c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
69942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_munlockall 153
70042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_munlockall, "0s 0m");
701b5f6f51ebcac183818061bf53427a3e7808ef10dsewardj   SY(__NR_munlockall); SUCC_OR_FAILx(EPERM);
7026c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
70342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_setparam 154
7045b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_setparam, "2s 1m");
70592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_setparam, x0, x0); FAIL;
7066c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
70742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_getparam 155
7085b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_getparam, "2s 1m");
70992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_getparam, x0, x0); FAIL;
7106c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
71142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_setscheduler 156
7125b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_setscheduler, "3s 1m");
71392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_setscheduler, x0-1, x0, x0+1); FAIL;
7146c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
71542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_getscheduler 157
7165b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_getscheduler, "1s 0m");
71792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_getscheduler, x0-1); FAIL;
7186c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
7196c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sched_yield 158
720d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_sched_yield, "0s 0m");
721d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   SY(__NR_sched_yield); SUCC;
7226c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
72342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_get_priority_max 159
7245b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_get_priority_max, "1s 0m");
72592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_get_priority_max, x0-1); FAIL;
7266c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
72742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_get_priority_min 160
7285b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_get_priority_min, "1s 0m");
72992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_get_priority_min, x0-1); FAIL;
7306c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
7316c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sched_rr_get_interval 161
73242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_sched_rr_get_interval, "n/a");
73392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_sched_rr_get_interval); // (Not yet handled by Valgrind) FAIL;
7346c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
73542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_nanosleep 162
7365b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_nanosleep, "2s 2m");
73792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_nanosleep, x0, x0+1); FAIL;
7386c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
7396c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mremap 163
740d16f20b1ac9dbb3f9d0625764b9ce14ff82faba0nethercote   GO(__NR_mremap, "5s 0m");
741870f170ccce872764e974b86f55247c0d97dc634njn   SY(__NR_mremap, x0+1, x0, x0, x0+MREMAP_FIXED, x0); FAILx(EINVAL);
7426c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
74342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setresuid 164
7446c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setresuid, "3s 0m");
74592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setresuid, x0, x0, x0); FAIL;
7466c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
74742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getresuid 165
7486c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getresuid, "3s 3m");
74992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getresuid, x0, x0, x0); FAIL;
7506c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
7516c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_vm86 166
75242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_vm86, "n/a");
75342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // (will probably never be handled by Valgrind)
7546c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
75542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_query_module 167
75642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_query_module, "ni");
75792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_query_module); FAIL;
7586c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
75942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_poll 168
760f90953e0461db3fb14e293a66a909a5d661dd0adnethercote   GO(__NR_poll, "3s 1m");
76192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_poll, x0, x0+1, x0); FAIL;
7626c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
7636c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_nfsservctl 169
76442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_nfsservctl, "n/a");
76592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_nfsservctl); // (Not yet handled by Valgrind) FAIL;
7666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
76742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setresgid 170
7686c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setresgid, "3s 0m");
76992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setresgid, x0, x0, x0); FAIL;
7706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
77142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getresgid 171
7726c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getresgid, "3s 3m");
77392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getresgid, x0, x0, x0); FAIL;
7746c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
7753954ea3d83385ac1da159a6cda76869e08342afdnethercote   // __NR_prctl 172
7763954ea3d83385ac1da159a6cda76869e08342afdnethercote   GO(__NR_prctl, "5s 0m");
77792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_prctl, x0, x0, x0, x0, x0); FAIL;
7786c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
779ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   char buf16[16] = "123456789012345.";
780ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   buf16[15] = x0; // this will cause 'using unitialised value'
781ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_prctl, "2s 0m");
782ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_prctl, x0 + PR_SET_NAME, buf16); SUCC;
783ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes
784ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   char buf17[17] = "1234567890123456.";
785ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   buf17[16] = x0; // this must not cause 'using unitialised value'
786ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_prctl, "1s 0m");
787ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_prctl, x0 + PR_SET_NAME, buf17); SUCC;
788ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes
7896c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_rt_sigreturn 173
79042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_rt_sigreturn, "n/a");
79192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_rt_sigreturn); // (Not yet handled by Valgrind) FAIL;
7926c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
79342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_rt_sigaction 174
794a23e6c9a3ba38d0e6ad3396e853d5e9474f0c912njn   GO(__NR_rt_sigaction, "4s 4m");
795da50328edb17722ca72d51d91bcf1040e6210bb6tom   SY(__NR_rt_sigaction, x0, x0+&px[2], x0+&px[2], x0); FAIL;
7966c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
7976c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_rt_sigprocmask 175
7987fbe08a08ea369c3c805280a3260edf5c68dc3aenethercote   GO(__NR_rt_sigprocmask, "4s 2m");
79992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_rt_sigprocmask, x0, x0+1, x0+1, x0); FAIL;
8006c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8016c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_rt_sigpending 176
80238e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_rt_sigpending, "2s 1m");
80392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_rt_sigpending, x0, x0+1); FAIL;
8046c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8056c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_rt_sigtimedwait 177
80638e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_rt_sigtimedwait, "4s 3m");
80792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_rt_sigtimedwait, x0+1, x0+1, x0+1, x0); FAIL;
8086c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8096c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_rt_sigqueueinfo 178
81092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_rt_sigqueueinfo, "3s 1m");
81192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_rt_sigqueueinfo, x0, x0+1, x0); FAIL;
8126c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8136c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_rt_sigsuspend 179
814ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_rt_sigsuspend, "2s 1m");
815ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_rt_sigsuspend, x0 + 1, x0 + sizeof(sigset_t)); FAILx(EFAULT);
8166c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8176c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_pread64 180
81838e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_pread64, "5s 1m");
81992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_pread64, x0, x0, x0+1, x0, x0); FAIL;
8206c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8216c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_pwrite64 181
82238e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_pwrite64, "5s 1m");
82392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_pwrite64, x0, x0, x0+1, x0, x0); FAIL;
8246c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
82542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_chown 182
8266c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_chown, "3s 1m");
82792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_chown, x0, x0, x0); FAIL;
8286c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8296c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_getcwd 183
83038e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_getcwd, "2s 1m");
83192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getcwd, x0, x0+1); FAIL;
8326c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
83342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_capget 184
8345b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_capget, "2s 2m");
835199c15bc1bdc8599254aa128276e5ed89f9f8854tom   SY(__NR_capget, x0, x0+1); FAIL;
8366c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
83742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_capset 185
8385b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_capset, "2s 2m");
83992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_capset, x0, x0); FAIL;
8406c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8416c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sigaltstack 186
842b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   {
843b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote      struct our_sigaltstack {
844b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote              void *ss_sp;
845b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote              int ss_flags;
846b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote              size_t ss_size;
847b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote      } ss;
848b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote      ss.ss_sp     = NULL;
849b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote      ss.ss_flags  = 0;
850b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote      ss.ss_size   = 0;
851dbf7ca71128c6787ba8a99cbd03c3773ff572d96njn      VALGRIND_MAKE_MEM_NOACCESS(& ss, sizeof(struct our_sigaltstack));
852b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote      GO(__NR_sigaltstack, "2s 2m");
853b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote      SY(__NR_sigaltstack, x0+&ss, x0+&ss); SUCC;
854b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   }
8556c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8566c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sendfile 187
85738e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_sendfile, "4s 1m");
85892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sendfile, x0, x0, x0+1, x0); FAIL;
8596c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8606c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_getpmsg 188
861b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   // Could do 5s 4m with more effort, but I can't be bothered for this
862b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   // crappy non-standard syscall.
863b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   GO(__NR_getpmsg, "5s 0m");
864b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   SY(__NR_getpmsg, x0, x0, x0, x0); FAIL;
8656c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_putpmsg 189
867b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   // Could do 5s 2m with more effort, but I can't be bothered for this
868b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   // crappy non-standard syscall.
869b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   GO(__NR_putpmsg, "5s 0m");
870b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   SY(__NR_putpmsg, x0, x0, x0, x0, x0); FAIL;
8716c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8726c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_vfork 190
87392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_vfork, "other");
8749b9b74b17f1a3b33949c11da3703cbf140b137e8nethercote   // (sse scalar_vfork.c)
8756c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8766c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_ugetrlimit 191
8776c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_ugetrlimit, "2s 1m");
87892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ugetrlimit, x0, x0); FAIL;
8796c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
88042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mmap2 192
881870f170ccce872764e974b86f55247c0d97dc634njn   GO(__NR_mmap2, "6s 0m");
88292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mmap2, x0, x0, x0, x0, x0-1, x0); FAIL;
8836c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
88442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_truncate64 193
8855a945afbb6f858ed3a51219bb8aaf24caa07c2c5nethercote   GO(__NR_truncate64, "3s 1m");
88692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_truncate64, x0, x0, x0); FAIL;
8876c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
88842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_ftruncate64 194
8895a945afbb6f858ed3a51219bb8aaf24caa07c2c5nethercote   GO(__NR_ftruncate64, "3s 0m");
89092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_ftruncate64, x0, x0, x0); FAIL;
8916c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8926c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_stat64 195
8936c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_stat64, "2s 2m");
89492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_stat64, x0, x0); FAIL;
8956c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
8966c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_lstat64 196
8976c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_lstat64, "2s 2m");
89892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lstat64, x0, x0); FAIL;
8996c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9006c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_fstat64 197
9016c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_fstat64, "2s 1m");
90292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fstat64, x0, x0); FAIL;
9036c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
90442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lchown32 198
9056c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_lchown32, "3s 1m");
90692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lchown32, x0, x0, x0); FAIL;
9076c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
90842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getuid32 199
90942b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getuid32, "0s 0m");
91092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getuid32); SUCC;
9116c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
91242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getgid32 200
91342b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getgid32, "0s 0m");
91492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getgid32); SUCC;
9156c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
91642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_geteuid32 201
91742b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_geteuid32, "0s 0m");
91892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_geteuid32); SUCC;
9196c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
92042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getegid32 202
92142b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_getegid32, "0s 0m");
92292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getegid32); SUCC;
9236c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9246c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_setreuid32 203
9256c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setreuid32, "2s 0m");
92692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setreuid32, x0, x0); FAIL;
9276c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9286c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_setregid32 204
9296c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setregid32, "2s 0m");
93092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setregid32, x0, x0); FAIL;
9316c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
93242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getgroups32 205
9336c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getgroups32, "2s 1m");
93492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getgroups32, x0+1, x0+1); FAIL;
9356c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
93642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setgroups32 206
9376c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setgroups32, "2s 1m");
93892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setgroups32, x0+1, x0+1); FAIL;
9396c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
94042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fchown32 207
9416c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_fchown32, "3s 0m");
94292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fchown32, x0, x0, x0); FAIL;
9436c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
94442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setresuid32 208
9456c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setresuid32, "3s 0m");
94692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setresuid32, x0, x0, x0); FAIL;
9476c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
94842b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getresuid32 209
9496c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getresuid32, "3s 3m");
95092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getresuid32, x0, x0, x0); FAIL;
9516c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
95242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setresgid32 210
9536c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setresgid32, "3s 0m");
95492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setresgid32, x0, x0, x0); FAIL;
9556c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
95642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getresgid32 211
9576c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getresgid32, "3s 3m");
95892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getresgid32, x0, x0, x0); FAIL;
9596c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
96042b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_chown32 212
9616c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_chown32, "3s 1m");
96292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_chown32, x0, x0, x0); FAIL;
9636c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
96442b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setuid32 213
9656c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setuid32, "1s 0m");
96692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setuid32, x0); FAIL;
9676c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9686c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_setgid32 214
9696c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setgid32, "1s 0m");
97092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setgid32, x0); FAIL;
9716c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
97242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setfsuid32 215
9736c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setfsuid32, "1s 0m");
97492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setfsuid32, x0); SUCC;  // This syscall has a stupid return value
9756c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
97642b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setfsgid32 216
9776c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setfsgid32, "1s 0m");
97892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setfsgid32, x0); SUCC;  // This syscall has a stupid return value
9796c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9806c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_pivot_root 217
98142b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_pivot_root, "n/a");
98292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_pivot_root); // (Not yet handled by Valgrind) FAIL;
9836c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9846c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mincore 218
98538e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_mincore, "3s 1m");
98692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mincore, x0, x0+40960, x0); FAIL;
9876c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9886c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_madvise 219
98938e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_madvise, "3s 0m");
99092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_madvise, x0, x0+1, x0); FAILx(ENOMEM);
9916c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
99242b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getdents64 220
99306c7bd748d9b40861e8a764e4947b30a787fef2bnethercote   GO(__NR_getdents64, "3s 1m");
99492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getdents64, x0, x0, x0+1); FAIL;
9956c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
9966c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_fcntl64 221
997870f170ccce872764e974b86f55247c0d97dc634njn   // As with sys_open(), we don't trigger errors for the 1st two args for
998870f170ccce872764e974b86f55247c0d97dc634njn   // the later ones.
999870f170ccce872764e974b86f55247c0d97dc634njn   // For F_GETFD the 3rd arg is ignored.
1000cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   GO(__NR_fcntl64, "(GETFD) 2s 0m");
1001cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   SY(__NR_fcntl64, x0-1, x0+F_GETFD, x0); FAILx(EBADF);
1002cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn
1003cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   // For F_DUPFD the 3rd arg is 'arg'
1004cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   GO(__NR_fcntl64, "(DUPFD) 1s 0m");
1005870f170ccce872764e974b86f55247c0d97dc634njn   SY(__NR_fcntl64, -1, F_DUPFD, x0); FAILx(EBADF);
1006cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn
1007870f170ccce872764e974b86f55247c0d97dc634njn   // For F_GETLK the 3rd arg is 'lock'.
1008870f170ccce872764e974b86f55247c0d97dc634njn   // On x86, this fails w/EBADF.  But on amd64 in 32-bit mode it fails
1009870f170ccce872764e974b86f55247c0d97dc634njn   // w/EFAULT.
1010870f170ccce872764e974b86f55247c0d97dc634njn   GO(__NR_fcntl64, "(GETLK) 1s 0m");
1011870f170ccce872764e974b86f55247c0d97dc634njn   SY(__NR_fcntl64, -1, +F_GETLK, x0); FAIL; //FAILx(EBADF);
10126c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
101342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // 222
101442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(222, "ni");
101592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(222); FAIL;
10166c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
101742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // 223
101842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(223, "ni");
101992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(223); FAIL;
10206c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
10216c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_gettid 224
102242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_gettid, "n/a");
102392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_gettid); // (Not yet handled by Valgrind) FAIL;
10246c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
10256c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_readahead 225
102642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_readahead, "n/a");
102792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_readahead); // (Not yet handled by Valgrind) FAIL;
10286c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
102942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_setxattr 226
10306c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_setxattr, "5s 3m");
103192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_setxattr, x0, x0, x0, x0+1, x0); FAIL;
10326c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
103342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lsetxattr 227
10346c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_lsetxattr, "5s 3m");
103592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lsetxattr, x0, x0, x0, x0+1, x0); FAIL;
10366c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
103742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fsetxattr 228
10386c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_fsetxattr, "5s 2m");
103992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fsetxattr, x0, x0, x0, x0+1, x0); FAIL;
10406c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
104142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_getxattr 229
10426c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_getxattr, "4s 3m");
104392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_getxattr, x0, x0, x0, x0+1); FAIL;
10446c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
104542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lgetxattr 230
10466c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_lgetxattr, "4s 3m");
104792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lgetxattr, x0, x0, x0, x0+1); FAIL;
10486c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
104942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fgetxattr 231
10506c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_fgetxattr, "4s 2m");
105192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fgetxattr, x0, x0, x0, x0+1); FAIL;
10526c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
105342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_listxattr 232
10546c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_listxattr, "3s 2m");
105592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_listxattr, x0, x0, x0+1); FAIL;
10566c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
105742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_llistxattr 233
10586c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_llistxattr, "3s 2m");
105992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_llistxattr, x0, x0, x0+1); FAIL;
10606c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
106142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_flistxattr 234
10626c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_flistxattr, "3s 1m");
10635fd5453b88316093b29d91b6e878360d26739becnjn   SY(__NR_flistxattr, x0-1, x0, x0+1); FAIL; /* kernel returns EBADF, but both seem correct */
10646c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
106542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_removexattr 235
10666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_removexattr, "2s 2m");
106792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_removexattr, x0, x0); FAIL;
10686c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
106942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lremovexattr 236
10706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_lremovexattr, "2s 2m");
107192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lremovexattr, x0, x0); FAIL;
10726c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
107342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fremovexattr 237
10746c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_fremovexattr, "2s 1m");
107592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fremovexattr, x0, x0); FAIL;
10766c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
10776c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_tkill 238
107842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_tkill, "n/a");
107992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_tkill); // (Not yet handled by Valgrind) FAIL;
10806c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
10816c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_sendfile64 239
108238e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_sendfile64, "4s 1m");
108392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sendfile64, x0, x0, x0+1, x0); FAIL;
10846c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
10856c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_futex 240
108638e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   #ifndef FUTEX_WAIT
108738e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   #define FUTEX_WAIT   0
108838e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   #endif
108938e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   // XXX: again, glibc not doing 6th arg means we have only 5s errors
1090ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   GO(__NR_futex, "4s 2m");
1091ed39800a83baf5bffbe391f3974eb2af0f415f80Elliott Hughes   SY(__NR_futex, x0+FUTEX_WAIT, x0, x0, x0+1); FAIL;
10926c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
109342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_setaffinity 241
10945b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_setaffinity, "3s 1m");
109592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_setaffinity, x0, x0+1, x0); FAIL;
10966c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
109742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sched_getaffinity 242
10985b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_sched_getaffinity, "3s 1m");
109992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sched_getaffinity, x0, x0+1, x0); FAIL;
11006c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11016c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_set_thread_area 243
1102b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   GO(__NR_set_thread_area, "1s 1m");
1103b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   SY(__NR_set_thread_area, x0); FAILx(EFAULT);
11046c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11056c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_get_thread_area 244
1106b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   GO(__NR_get_thread_area, "1s 1m");
1107b77dee6ad91370ba97e4aa8ba169d0b6cc18cce2nethercote   SY(__NR_get_thread_area, x0); FAILx(EFAULT);
11086c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11096c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_io_setup 245
1110330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_io_setup, "2s 1m");
111192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_io_setup, x0, x0); FAIL;
11126c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11136c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_io_destroy 246
1114330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   {
1115330abb517e58fd0ee96fda7fb8563e32e029a63enethercote      // jump through hoops to prevent the PRE(io_destroy) wrapper crashing.
1116330abb517e58fd0ee96fda7fb8563e32e029a63enethercote      struct fake_aio_ring {
1117330abb517e58fd0ee96fda7fb8563e32e029a63enethercote        unsigned        id;     /* kernel internal index number */
1118330abb517e58fd0ee96fda7fb8563e32e029a63enethercote        unsigned        nr;     /* number of io_events */
1119330abb517e58fd0ee96fda7fb8563e32e029a63enethercote        // There are more fields in the real aio_ring, but the 'nr' field is
1120330abb517e58fd0ee96fda7fb8563e32e029a63enethercote        // the only one used by the PRE() wrapper.
1121330abb517e58fd0ee96fda7fb8563e32e029a63enethercote      } ring = { 0, 0 };
1122330abb517e58fd0ee96fda7fb8563e32e029a63enethercote      struct fake_aio_ring* ringptr = &ring;
1123330abb517e58fd0ee96fda7fb8563e32e029a63enethercote      GO(__NR_io_destroy, "1s 0m");
112492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote      SY(__NR_io_destroy, x0+&ringptr); FAIL;
1125330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   }
11266c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11276c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_io_getevents 247
1128330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_io_getevents, "5s 2m");
112992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_io_getevents, x0, x0, x0+1, x0, x0+1); FAIL;
11306c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11316c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_io_submit 248
1132330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_io_submit, "3s 1m");
113392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_io_submit, x0, x0+1, x0); FAIL;
11346c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11356c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_io_cancel 249
1136330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_io_cancel, "3s 2m");
113792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_io_cancel, x0, x0, x0); FAIL;
11386c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11396c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_fadvise64 250
114042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_fadvise64, "n/a");
114192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_fadvise64); // (Not yet handled by Valgrind) FAIL;
11426c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
114342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // 251
114442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(251, "ni");
114592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(251); FAIL;
11466c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11476c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_exit_group 252
11489b9b74b17f1a3b33949c11da3703cbf140b137e8nethercote   GO(__NR_exit_group, "other");
11499b9b74b17f1a3b33949c11da3703cbf140b137e8nethercote   // (see scalar_exit_group.c)
11506c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
115142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_lookup_dcookie 253
11526c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(__NR_lookup_dcookie, "4s 1m");
115392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_lookup_dcookie, x0, x0, x0, x0+1); FAIL;
11546c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
115542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_epoll_create 254
1156f90953e0461db3fb14e293a66a909a5d661dd0adnethercote   GO(__NR_epoll_create, "1s 0m");
1157cfb8ad53df2d8d59757bc9477da105fc7fbb1843njn   SY(__NR_epoll_create, x0); SUCC_OR_FAIL;
11586c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
115942b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_epoll_ctl 255
1160f90953e0461db3fb14e293a66a909a5d661dd0adnethercote   GO(__NR_epoll_ctl, "4s 1m");
116192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_epoll_ctl, x0, x0, x0, x0); FAIL;
11626c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
116342b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_epoll_wait 256
1164f90953e0461db3fb14e293a66a909a5d661dd0adnethercote   GO(__NR_epoll_wait, "4s 1m");
116592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_epoll_wait, x0, x0, x0+1, x0); FAIL;
11666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11676c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_remap_file_pages 257
116838e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_remap_file_pages, "n/a");
116992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_remap_file_pages); // (Not yet handled by Valgrind) FAIL;
11706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
117142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_set_tid_address 258
11725b653bc2c60f6913e5bb6c2ebabfcf705a90c012nethercote   GO(__NR_set_tid_address, "1s 0m");
1173b5f6f51ebcac183818061bf53427a3e7808ef10dsewardj   SY(__NR_set_tid_address, x0); SUCC_OR_FAILx(ENOSYS);
11746c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11756c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_timer_create 259
117692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_timer_create, "3s 2m");
117792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_timer_create, x0, x0+1, x0); FAIL;
11786c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11796c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_timer_settime (__NR_timer_create+1)
118092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_timer_settime, "4s 2m");
118192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_timer_settime, x0, x0, x0, x0+1); FAIL;
11826c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11836c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_timer_gettime (__NR_timer_create+2)
118492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_timer_gettime, "2s 1m");
118592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_timer_gettime, x0, x0); FAIL;
11866c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11876c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_timer_getoverrun (__NR_timer_create+3)
118892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_timer_getoverrun, "1s 0m");
118992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_timer_getoverrun, x0); FAIL;
11906c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11916c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_timer_delete (__NR_timer_create+4)
119292b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_timer_delete, "1s 0m");
119392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_timer_delete, x0); FAIL;
11946c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11956c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_clock_settime (__NR_timer_create+5)
119692b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_clock_settime, "2s 1m");
119792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_clock_settime, x0, x0);  FAIL; FAIL;
11986c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
11996c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_clock_gettime (__NR_timer_create+6)
120092b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_clock_gettime, "2s 1m");
120192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_clock_gettime, x0, x0); FAIL;
12026c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12036c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_clock_getres (__NR_timer_create+7)
120492b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_clock_getres, "2s 1m");
120592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_clock_getres, x0+1, x0+1); FAIL; FAIL;
12066c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12076c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_clock_nanosleep (__NR_timer_create+8)
120892b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   GO(__NR_clock_nanosleep, "n/a");
120992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_clock_nanosleep); // (Not yet handled by Valgrind) FAIL;
12106c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
121142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_statfs64 268
1212dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_statfs64, "3s 2m");
121392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_statfs64, x0, x0+1, x0); FAIL;
12146c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
121542b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_fstatfs64 269
1216dc18c0af0474a07abb889f27b43d487d03805fa9nethercote   GO(__NR_fstatfs64, "3s 1m");
121792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_fstatfs64, x0, x0+1, x0); FAIL;
12186c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12196c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_tgkill 270
122042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_tgkill, "n/a");
122192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_tgkill); // (Not yet handled by Valgrind) FAIL;
12226c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12236c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_utimes 271
122438e0a9e2eb08b3b0895ffdff21942c62428582d3nethercote   GO(__NR_utimes, "2s 2m");
122592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_utimes, x0, x0+1); FAIL;
12266c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12276c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_fadvise64_64 272
122842b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_fadvise64_64, "n/a");
122992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_fadvise64_64); // (Not yet handled by Valgrind) FAIL;
12306c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
123142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_vserver 273
123242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_vserver, "ni");
123392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_vserver); FAIL;
12346c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12356c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mbind 274
123642b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_mbind, "n/a");
123792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_mbind); // (Not yet handled by Valgrind) FAIL;
12386c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12396c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_get_mempolicy 275
124042b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_get_mempolicy, "n/a");
124192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_get_mempolicy); // (Not yet handled by Valgrind) FAIL;
12426c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12436c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_set_mempolicy 276
124442b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_set_mempolicy, "n/a");
124592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote //SY(__NR_set_mempolicy); // (Not yet handled by Valgrind) FAIL;
12466c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
124742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_mq_open 277
1248fbd55ef61b2b72f265068b41b24402e9dc52fcd7nethercote   GO(__NR_mq_open, "4s 3m");
124992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mq_open, x0, x0+O_CREAT, x0, x0+1); FAIL;
12506c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12516c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mq_unlink (__NR_mq_open+1)
1252330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_mq_unlink, "1s 1m");
125392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mq_unlink, x0); FAIL;
12546c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12556c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mq_timedsend (__NR_mq_open+2)
1256330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_mq_timedsend, "5s 2m");
125792b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mq_timedsend, x0, x0, x0+1, x0, x0+1); FAIL;
12586c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12596c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mq_timedreceive (__NR_mq_open+3)
1260330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_mq_timedreceive, "5s 3m");
126192b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mq_timedreceive, x0, x0, x0+1, x0+1, x0+1); FAIL;
1262330abb517e58fd0ee96fda7fb8563e32e029a63enethercote
12636c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mq_notify (__NR_mq_open+4)
1264330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_mq_notify, "2s 1m");
126592b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mq_notify, x0, x0+1); FAIL;
12666c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12676c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   // __NR_mq_getsetattr (__NR_mq_open+5)
1268330abb517e58fd0ee96fda7fb8563e32e029a63enethercote   GO(__NR_mq_getsetattr, "3s 2m");
126992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_mq_getsetattr, x0, x0+1, x0+1); FAIL;
12706c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
127142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_sys_kexec_load 283
127242b2f313ebf0d57f6887198aa17282a32623f122nethercote   GO(__NR_sys_kexec_load, "ni");
127392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_sys_kexec_load); FAIL;
12746c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
12757271588235cfca5ae3b6e355d7ad054f0d6d46fdnjn   // __NR_epoll_create1 329
12767271588235cfca5ae3b6e355d7ad054f0d6d46fdnjn   GO(__NR_epoll_create1, "1s 0m");
12777271588235cfca5ae3b6e355d7ad054f0d6d46fdnjn   SY(__NR_epoll_create1, x0); SUCC_OR_FAIL;
12787271588235cfca5ae3b6e355d7ad054f0d6d46fdnjn
12799e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom   // __NR_process_vm_readv 347
12809e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom   GO(__NR_process_vm_readv, "6s 2m");
12819e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom   SY(__NR_process_vm_readv, x0, x0, x0+1, x0, x0+1, x0); FAIL;
12829e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom
12839e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom   // __NR_process_vm_writev 348
12849e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom   GO(__NR_process_vm_writev, "6s 2m");
12859e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom   SY(__NR_process_vm_writev, x0, x0, x0+1, x0, x0+1, x0); FAIL;
12869e4b636f786d7d105cb8ead0a4c9f0b403e82e71tom
128742b2f313ebf0d57f6887198aa17282a32623f122nethercote   // no such syscall...
12886c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote   GO(9999, "1e");
128992b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(9999); FAIL;
12906c0e2d054088c79dc6134d43db53ce03c2b05bb6nethercote
129142b2f313ebf0d57f6887198aa17282a32623f122nethercote   // __NR_exit 1
1292c6851dde1b46166417a2bdb096c05818f5f07f09nethercote   GO(__NR_exit, "1s 0m");
129392b2fd542e89939b46edfa5c424af81f4a3bfe0cnethercote   SY(__NR_exit, x0); FAIL;
1294e824cc428f6ef4a68707e99119e4ff5f1764681enethercote
1295e824cc428f6ef4a68707e99119e4ff5f1764681enethercote   assert(0);
12968b76fe55a596a4296ba5028e2510015fef38b02fnethercote}
12978b76fe55a596a4296ba5028e2510015fef38b02fnethercote
1298