aboutsummaryrefslogtreecommitdiff
path: root/memcheck/tests/darwin/scalar.c
blob: 5d65820c2780398130618a589f22a5bc7f76e31e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
#include "../../memcheck.h"
#include "scalar.h"
#include <unistd.h>
#include <sched.h>
#include <signal.h>
#include <sys/shm.h>

// See memcheck/tests/x86-linux/scalar.c for an explanation of what this test
// is doing.

int main(void)
{
   // uninitialised, but we know px[0] is 0x0
   long* px  = malloc(sizeof(long));
   long  x0  = px[0];
   long  res;

   VALGRIND_MAKE_MEM_NOACCESS(0, 0x1000);

   // __NR_syscall 0
   // XXX

   // __NR_exit 1 
   GO(__NR_exit, "below");
   // (see below)

   // __NR_fork 2
   GO(__NR_fork, "other");
   // (sse scalar_fork.c)

   // __NR_read 3
   // Nb: here we are also getting an error from the syscall arg itself.
   GO(__NR_read, "1+3s 1m");
   SY(__NR_read+(int)x0, x0, x0, x0+1); FAILx(EFAULT);

   // __NR_write 4
   GO(__NR_write, "3s 1m");
   SY(__NR_write, x0, x0, x0+1); FAIL;
   //res = write(x0, x0, x0+1); FAIL;

   // __NR_open 5
   // __NR_close 6
   // __NR_wait4 7
   // /* 8  old creat */
   // __NR_link 9
   // __NR_unlink 10
   // /* 11  old execv */
   // __NR_chdir 12
   // __NR_fchdir 13
   // __NR_mknod 14
   // __NR_chmod 15
   // __NR_chown 16
   // /* 17  old break */
   // __NR_getfsstat 18
   // /* 19  old lseek */
   // __NR_getpid 20
   // /* 21  old mount */
   // /* 22  old umount */
   // __NR_setuid 23
   // __NR_getuid 24
   // __NR_geteuid 25
   // __NR_ptrace 26
   // __NR_recvmsg 27
   // __NR_sendmsg 28
   // __NR_recvfrom 29
   // __NR_accept 30
   // __NR_getpeername 31
   // __NR_getsockname 32
   // __NR_access 33
   // __NR_chflags 34
   // __NR_fchflags 35
   // __NR_sync 36
   // __NR_kill 37
   // /* 38  old stat */
   // __NR_getppid 39
   // /* 40  old lstat */
   // __NR_dup 41
   // __NR_pipe           VG_DARWIN_SYSCALL_CONSTRUCT_UX64(42
   // __NR_getegid 43
   // __NR_profil 44
   // /* 45  old ktrace */
   // __NR_sigaction 46
   // __NR_getgid 47
   // __NR_sigprocmask 48
   // __NR_getlogin 49
   // __NR_setlogin 50
   // __NR_acct 51
   // __NR_sigpending 52
   // __NR_sigaltstack 53
   // __NR_ioctl 54
   // __NR_reboot 55
   // __NR_revoke 56
   // __NR_symlink 57
   // __NR_readlink 58
   // __NR_execve 59
   // __NR_umask 60
   // __NR_chroot 61
   // /* 62  old fstat */
   // /* 63  used internally , reserved */
   // /* 64  old getpagesize */
   // __NR_msync 65
   // __NR_vfork 66
   // /* 67  old vread */
   // /* 68  old vwrite */
   // /* 69  old sbrk */
   // /* 70  old sstk */
   // /* 71  old mmap */
   // /* 72  old vadvise */
   // __NR_munmap 73
   // __NR_mprotect 74
   // __NR_madvise 75
   // /* 76  old vhangup */
   // /* 77  old vlimit */
   // __NR_mincore 78
   // __NR_getgroups 79
   // __NR_setgroups 80
   // __NR_getpgrp 81
   // __NR_setpgid 82
   // __NR_setitimer 83
   // /* 84  old wait */
   // __NR_swapon 85
   // __NR_getitimer 86
   // /* 87  old gethostname */
   // /* 88  old sethostname */
   // __NR_getdtablesize 89
   // __NR_dup2 90
   // /* 91  old getdopt */
   // __NR_fcntl 92
   // __NR_select 93
   // /* 94  old setdopt */
   // __NR_fsync 95
   // __NR_setpriority 96
   // __NR_socket 97
   // __NR_connect 98
   // /* 99  old accept */
   // __NR_getpriority 100
   // /* 101  old send */
   // /* 102  old recv */
   // /* 103  old sigreturn */
   // __NR_bind 104

   // __NR_setsockopt 105
   GO(__NR_setsockopt, "5s 1m");
   SY(__NR_setsockopt, x0, x0, x0, x0+1, x0+1); FAIL;

   // __NR_listen 106
   // /* 107  old vtimes */
   // /* 108  old sigvec */
   // /* 109  old sigblock */
   // /* 110  old sigsetmask */
   // __NR_sigsuspend 111
   // /* 112  old sigstack */
   // /* 113  old recvmsg */
   // /* 114  old sendmsg */
   // /* 115  old vtrace */
   // __NR_gettimeofday 116
   // __NR_getrusage 117

   // __NR_getsockopt 118
   // Nb: there's no "getsockopt(optlen) points to unaddressable byte(s)";
   // difficult to get with arg4 being checked with buf_and_len_pre_check.
   GO(__NR_getsockopt, "5s 1m");
   SY(__NR_getsockopt, x0, x0, x0, x0+1, x0+&px[1]); FAIL;

   // /* 119  old resuba */
   // __NR_readv 120
   // __NR_writev 121
   // __NR_settimeofday 122
   // __NR_fchown 123
   // __NR_fchmod 124
   // /* 125  old recvfrom */
   // __NR_setreuid 126
   // __NR_setregid 127
   // __NR_rename 128
   // /* 129  old truncate */
   // /* 130  old ftruncate */
   // __NR_flock 131
   // __NR_mkfifo 132
   // __NR_sendto 133
   // __NR_shutdown 134
   // __NR_socketpair 135
   // __NR_mkdir 136
   // __NR_rmdir 137
   // __NR_utimes 138
   // __NR_futimes 139
   // __NR_adjtime 140
   // /* 141  old getpeername */
   // __NR_gethostuuid 142
   // /* 143  old sethostid */
   // /* 144  old getrlimit */
   // /* 145  old setrlimit */
   // /* 146  old killpg */
   // __NR_setsid 147
   // /* 148  old setquota */
   // /* 149  old qquota */
   // /* 150  old getsockname */
   // __NR_getpgid 151
   // __NR_setprivexec 152
   // __NR_pread 153
   // __NR_pwrite 154
   // __NR_nfssvc 155
   // /* 156  old getdirentries */
   // __NR_statfs 157
   // __NR_fstatfs 158
   // __NR_unmount 159
   // /* 160  old async_daemon */
   // __NR_getfh 161
   // /* 162  old getdomainname */
   // /* 163  old setdomainname */
   // /* 164 */
   // __NR_quotactl 165
   // /* 166  old exportfs */
   // __NR_mount 167
   // /* 168  old ustat */

   // __NR_csops 169
   GO(__NR_csops, "4s 1m");
   SY(__NR_csops, x0, x0, x0+1, x0+1); FAILx(EFAULT);

   // /* 170  old table */
   // /* 171  old wait3 */
   // /* 172  old rpause */
   // __NR_waitid 173
   // /* 174  old getdents */
   // /* 175  old gc_control */
   // __NR_add_profil 176
   // /* 177 */
   // /* 178 */
   // /* 179 */
   // __NR_kdebug_trace 180
   // __NR_setgid 181
   // __NR_setegid 182
   // __NR_seteuid 183
   // __NR_sigreturn 184
   // __NR_chud 185
   // /* 186 */
   // /* 187 */
   // __NR_stat 188
   // __NR_fstat 189
   // __NR_lstat 190
   // __NR_pathconf 191
   // __NR_fpathconf 192
   // /* 193 */
   // __NR_getrlimit 194
   // __NR_setrlimit 195
   // __NR_getdirentries 196
   // __NR_mmap 197
   // /* 198  __syscall */
   // __NR_lseek          VG_DARWIN_SYSCALL_CONSTRUCT_UX64(199
   // __NR_truncate 200
   // __NR_ftruncate 201
   // __NR___sysctl 202
   // __NR_mlock 203
   // __NR_munlock 204
   // __NR_undelete 205
   // __NR_ATsocket 206
   // __NR_ATgetmsg 207
   // __NR_ATputmsg 208
   // __NR_ATPsndreq 209
   // __NR_ATPsndrsp 210
   // __NR_ATPgetreq 211
   // __NR_ATPgetrsp 212
   // /* 213  Reserved for AppleTalk */
   // __NR_kqueue_from_portset_np 214
   // __NR_kqueue_portset_np 215
   // __NR_mkcomplex 216
   // __NR_statv 217
   // __NR_lstatv 218
   // __NR_fstatv 219
   // __NR_getattrlist 220
   // __NR_setattrlist 221
   // __NR_getdirentriesattr 222

   // __NR_exchangedata 223
   GO(__NR_exchangedata, "3s 2m");
   SY(__NR_exchangedata, x0, x0, x0); FAIL;

   // /* 224  checkuseraccess */
   // __NR_searchfs 225
   // __NR_delete 226
   // __NR_copyfile 227
   // /* 228 */
   // /* 229 */
   // __NR_poll 230
   // __NR_watchevent 231
   // __NR_waitevent 232
   // __NR_modwatch 233
   // __NR_getxattr 234
   // __NR_fgetxattr 235
   // __NR_setxattr 236
   // __NR_fsetxattr 237
   // __NR_removexattr 238
   // __NR_fremovexattr 239
   // __NR_listxattr 240
   // __NR_flistxattr 241
   // __NR_fsctl 242
   // __NR_initgroups 243
   // __NR_posix_spawn 244
   // /* 245 */
   // /* 246 */
   // __NR_nfsclnt 247
   // __NR_fhopen 248
   // /* 249 */
   // __NR_minherit 250
   // __NR_semsys 251
   // __NR_msgsys 252
   // __NR_shmsys 253
   // __NR_semctl 254
   // __NR_semget 255
   // __NR_semop 256
   // /* 257 */
   // __NR_msgctl 258
   // __NR_msgget 259
   // __NR_msgsnd 260
   // __NR_msgrcv 261
   // __NR_shmat 262

   // __NR_shmctl 263
   GO(__NR_shmctl, "3s 1m");
   SY(__NR_shmctl, x0, x0+IPC_STAT, x0+1); FAIL;

   // __NR_shmdt 264

   // __NR_shmget 265
   GO(__NR_shmget, "3s 0m");
   SY(__NR_shmget, x0, x0, x0); FAIL;

   // __NR_shm_open 266
   // __NR_shm_unlink 267

   // __NR_sem_open 268
   GO(__NR_sem_open, "2s 1m");
   SY(__NR_sem_open, x0, x0); FAIL;

   GO(__NR_sem_open, "(4-args) 2s 0m");
   SY(__NR_sem_open, "my_sem", O_CREAT|O_EXCL, x0, x0); SUCC_OR_FAIL;

   // __NR_sem_close 269
   // Nb: we add 0x12345 to make sure it's not a valid semaphore descriptor.
   GO(__NR_sem_close, "1s 0m");
   SY(__NR_sem_close, x0+0x12345); FAIL;

   // __NR_sem_unlink 270
   GO(__NR_sem_unlink, "1s 1m");
   SY(__NR_sem_unlink, x0); FAIL;

   // __NR_sem_wait 271
   GO(__NR_sem_wait, "1s 0m");
   SY(__NR_sem_wait, x0); FAIL;

   // __NR_sem_trywait 272
   GO(__NR_sem_trywait, "1s 0m");
   SY(__NR_sem_trywait, x0); FAIL;

   // __NR_sem_post 273
   GO(__NR_sem_post, "1s 0m");
   SY(__NR_sem_post, x0); FAIL;

   // __NR_sem_getvalue 274

   // __NR_sem_init 275
   GO(__NR_sem_init, "3s 1m");
   SY(__NR_sem_init, x0+1, x0, x0); FAILx(ENOSYS);

   // __NR_sem_destroy 276
   GO(__NR_sem_destroy, "1s 1m");
   SY(__NR_sem_destroy, x0+1); FAILx(ENOSYS);

   // __NR_open_extended 277
   // __NR_umask_extended 278

   // __NR_stat_extended 279
   {
      size_t one = 1;
      GO(__NR_stat_extended, "4s 4m");
      SY(__NR_stat_extended, x0, x0, x0, x0); FAIL;
      // Go again to get a complaint about where the 3rd arg points;  it
      // requires the 4th arg to point to a valid value.
      SY(__NR_stat_extended, 0, 0, 0, &one); FAIL;

   // __NR_lstat_extended 280
      GO(__NR_lstat_extended, "4s 4m");
      SY(__NR_lstat_extended, x0, x0, x0, x0); FAIL;
      // Go again to get a complaint about where the 3rd arg points;  it
      // requires the 4th arg to point to a valid value.
      SY(__NR_lstat_extended, 0, 0, 0, &one); FAIL;
   }

   // __NR_fstat_extended 281
   // __NR_chmod_extended 282
   // __NR_fchmod_extended 283
   // __NR_access_extended 284
   // __NR_settid 285
   // __NR_gettid 286
   // __NR_setsgroups 287
   // __NR_getsgroups 288
   // __NR_setwgroups 289
   // __NR_getwgroups 290
   // __NR_mkfifo_extended 291
   // __NR_mkdir_extended 292
   // __NR_identitysvc 293
   // __NR_shared_region_check_np 294
   // __NR_shared_region_map_np 295
   // /* 296  old load_shared_file */
   // /* 297  old reset_shared_file */
   // /* 298  old new_system_shared_regions */
   // /* 299  old shared_region_map_file_np */
   // /* 300  old shared_region_make_private_np */
   // __NR___pthread_mutex_destroy 301
   // __NR___pthread_mutex_init 302
   // __NR___pthread_mutex_lock 303
   // __NR___pthread_mutex_trylock 304
   // __NR___pthread_mutex_unlock 305
   // __NR___pthread_cond_init 306
   // __NR___pthread_cond_destroy 307
   // __NR___pthread_cond_broadcast 308
   // __NR___pthread_cond_signal 309
   // __NR_getsid 310
   // __NR_settid_with_pid 311
   // __NR___pthread_cond_timedwait 312
   // __NR_aio_fsync 313
   // __NR_aio_return 314
   // __NR_aio_suspend 315
   // __NR_aio_cancel 316
   // __NR_aio_error 317
   // __NR_aio_read 318
   // __NR_aio_write 319
   // __NR_lio_listio 320
   // __NR___pthread_cond_wait 321
   // __NR_iopolicysys 322
   // /* 323 */
   // __NR_mlockall 324
   // __NR_munlockall 325
   // /* 326 */
   // __NR_issetugid 327
   // __NR___pthread_kill 328
   // __NR___pthread_sigmask 329
   // __NR___sigwait 330
   // __NR_sigwait 330) // GrP fixme hack
   // __NR___disable_threadsignal 331
   // __NR___pthread_markcancel 332
   // __NR___pthread_canceled 333
   // __NR___semwait_signal 334
   // /* 335  old utrace */
   // __NR_proc_info 336
   // __NR_sendfile 337
   // __NR_stat64 338
   // __NR_fstat64 339
   // __NR_lstat64 340
   // __NR_stat64_extended 341

   // __NR_lstat64_extended 342
   {
      size_t one = 1;
      GO(__NR_stat64_extended, "4s 4m");
      SY(__NR_stat64_extended, x0, x0, x0, x0); FAIL;
      // Go again to get a complaint about where the 3rd arg points;  it
      // requires the 4th arg to point to a valid value.
      SY(__NR_stat64_extended, 0, 0, 0, &one); FAIL;

   // __NR_fstat64_extended 343
      GO(__NR_lstat64_extended, "4s 4m");
      SY(__NR_lstat64_extended, x0, x0, x0, x0); FAIL;
      // Go again to get a complaint about where the 3rd arg points;  it
      // requires the 4th arg to point to a valid value.
      SY(__NR_lstat64_extended, 0, 0, 0, &one); FAIL;
   }

   // __NR_getdirentries64 344
   // __NR_statfs64 345
   // __NR_fstatfs64 346
   // __NR_getfsstat64 347
   // __NR___pthread_chdir 348
   // __NR___pthread_fchdir 349
   // __NR_audit 350
   // __NR_auditon 351
   // /* 352 */
   // __NR_getauid 353
   // __NR_setauid 354
   // __NR_getaudit 355
   // __NR_setaudit 356
   // __NR_getaudit_addr 357
   // __NR_setaudit_addr 358
   // __NR_auditctl 359
   // __NR_bsdthread_create 360
   // __NR_bsdthread_terminate 361
   // __NR_kqueue 362
   // __NR_kevent 363
   // __NR_lchown 364
   // __NR_stack_snapshot 365
   // __NR_bsdthread_register 366
   // __NR_workq_open 367
   // __NR_workq_ops 368
   // /* 369 */
   // /* 370 */
   // /* 371 */
   // /* 372 */
   // /* 373 */
   // /* 374 */
   // /* 375 */
   // /* 376 */
   // /* 377 */
   // /* 378 */
   // /* 379 */
   // __NR___mac_execve 380
   // __NR___mac_syscall 381
   // __NR___mac_get_file 382
   // __NR___mac_set_file 383
   // __NR___mac_get_link 384
   // __NR___mac_set_link 385
   // __NR___mac_get_proc 386
   // __NR___mac_set_proc 387
   // __NR___mac_get_fd 388
   // __NR___mac_set_fd 389
   // __NR___mac_get_pid 390
   // __NR___mac_get_lcid 391
   // __NR___mac_get_lctx 392
   // __NR___mac_set_lctx 393
   // __NR_setlcid 394
   // __NR_getlcid 395

   // The nocancel syscalls (396--423) are tested in scalar_nocancel.c.

   // __NR___mac_mount 424
   // __NR___mac_get_mount 425
   // __NR___mac_getfsstat 426
   // __NR_MAXSYSCALL 427

#if 0
   // XXX: all these are copied from x86-linux/scalar.c.

   // __NR_open 5
   GO(__NR_open, "(2-args) 2s 1m");
   SY(__NR_open, x0, x0); FAIL;

   // Only 1s 0m errors -- the other 2s 1m have been checked in the previous
   // open test, and if we test them they may be commoned up but they also
   // may not.
   GO(__NR_open, "(3-args) 1s 0m");    
   SY(__NR_open, "scalar.c", O_CREAT|O_EXCL, x0); FAIL;

   // __NR_close 6
   GO(__NR_close, "1s 0m");
   SY(__NR_close, x0-1); FAIL;

   // __NR_waitpid 7
   GO(__NR_waitpid, "3s 1m");
   SY(__NR_waitpid, x0, x0+1, x0); FAIL;

   // __NR_creat 8
   GO(__NR_creat, "2s 1m");
   SY(__NR_creat, x0, x0); FAIL;

   // __NR_link 9
   GO(__NR_link, "2s 2m");
   SY(__NR_link, x0, x0); FAIL;

   // __NR_unlink 10
   GO(__NR_unlink, "1s 1m");
   SY(__NR_unlink, x0); FAIL;

   // __NR_execve 11
   // Nb: could have 3 memory errors if we pass x0+1 as the 2nd and 3rd
   // args, except for bug #93174.
   GO(__NR_execve, "3s 1m");
   SY(__NR_execve, x0, x0, x0); FAIL;

   // __NR_chdir 12
   GO(__NR_chdir, "1s 1m");
   SY(__NR_chdir, x0); FAIL;

   // __NR_time 13
   GO(__NR_time, "1s 1m");
   SY(__NR_time, x0+1); FAIL;

   // __NR_mknod 14
   GO(__NR_mknod, "3s 1m");
   SY(__NR_mknod, x0, x0, x0); FAIL;

   // __NR_chmod 15
   GO(__NR_chmod, "2s 1m");
   SY(__NR_chmod, x0, x0); FAIL;

   // __NR_lchown 16
   GO(__NR_lchown, "n/a");
 //SY(__NR_lchown); // (Not yet handled by Valgrind) FAIL;

   // __NR_break 17
   GO(__NR_break, "ni");
   SY(__NR_break); FAIL;

   // __NR_oldstat 18
   GO(__NR_oldstat, "n/a");
   // (obsolete, not handled by Valgrind)

   // __NR_lseek 19
   GO(__NR_lseek, "3s 0m");
   SY(__NR_lseek, x0-1, x0, x0); FAILx(EBADF);

   // __NR_getpid 20
   GO(__NR_getpid, "0s 0m");
   SY(__NR_getpid); SUCC;

   // __NR_mount 21
   GO(__NR_mount, "5s 3m");
   SY(__NR_mount, x0, x0, x0, x0, x0); FAIL;
   
   // __NR_umount 22
   GO(__NR_umount, "1s 1m");
   SY(__NR_umount, x0); FAIL;

   // __NR_setuid 23
   GO(__NR_setuid, "1s 0m");
   SY(__NR_setuid, x0); FAIL;

   // __NR_getuid 24
   GO(__NR_getuid, "0s 0m");
   SY(__NR_getuid); SUCC;

   // __NR_stime 25
   GO(__NR_stime, "n/a");
 //SY(__NR_stime); // (Not yet handled by Valgrind) FAIL;

   // __NR_ptrace 26
   // XXX: memory pointed to be arg3 goes unchecked... otherwise would be 2m
   GO(__NR_ptrace, "4s 1m");
   SY(__NR_ptrace, x0+PTRACE_GETREGS, x0, x0, x0); FAIL;

   // __NR_alarm 27
   GO(__NR_alarm, "1s 0m");
   SY(__NR_alarm, x0); SUCC;

   // __NR_oldfstat 28
   GO(__NR_oldfstat, "n/a");
   // (obsolete, not handled by Valgrind)

   // __NR_pause 29
   GO(__NR_pause, "ignore");
   // (hard to test, and no args so not much to be gained -- don't bother)

   // __NR_utime 30
   GO(__NR_utime, "2s 2m");
   SY(__NR_utime, x0, x0+1); FAIL;

   // __NR_stty 31
   GO(__NR_stty, "ni");
   SY(__NR_stty); FAIL;

   // __NR_gtty 32
   GO(__NR_gtty, "ni");
   SY(__NR_gtty); FAIL;

   // __NR_access 33
   GO(__NR_access, "2s 1m");
   SY(__NR_access, x0, x0); FAIL;

   // __NR_nice 34
   GO(__NR_nice, "1s 0m");
   SY(__NR_nice, x0); SUCC;

   // __NR_ftime 35
   GO(__NR_ftime, "ni");
   SY(__NR_ftime); FAIL;

   // __NR_sync 36
   GO(__NR_sync, "0s 0m");
   SY(__NR_sync); SUCC;

   // __NR_kill 37
   GO(__NR_kill, "2s 0m");
   SY(__NR_kill, x0, x0); SUCC;

   // __NR_rename 38
   GO(__NR_rename, "2s 2m");
   SY(__NR_rename, x0, x0); FAIL;

   // __NR_mkdir 39
   GO(__NR_mkdir, "2s 1m");
   SY(__NR_mkdir, x0, x0); FAIL;

   // __NR_rmdir 40
   GO(__NR_rmdir, "1s 1m");
   SY(__NR_rmdir, x0); FAIL;

   // __NR_dup 41
   GO(__NR_dup, "1s 0m");
   SY(__NR_dup, x0-1); FAIL;

   // __NR_pipe 42
   GO(__NR_pipe, "1s 1m");
   SY(__NR_pipe, x0); FAIL;

   // __NR_times 43
   GO(__NR_times, "1s 1m");
   SY(__NR_times, x0+1); FAIL;

   // __NR_prof 44
   GO(__NR_prof, "ni");
   SY(__NR_prof); FAIL;

   // __NR_brk 45
   GO(__NR_brk, "1s 0m");
   SY(__NR_brk, x0); SUCC;

   // __NR_setgid 46
   GO(__NR_setgid, "1s 0m");
   SY(__NR_setgid, x0); FAIL;

   // __NR_getgid 47
   GO(__NR_getgid, "0s 0m");
   SY(__NR_getgid); SUCC;

   // __NR_signal 48
   GO(__NR_signal, "n/a");
 //SY(__NR_signal); // (Not yet handled by Valgrind) FAIL;

   // __NR_geteuid 49
   GO(__NR_geteuid, "0s 0m");
   SY(__NR_geteuid); SUCC;

   // __NR_getegid 50
   GO(__NR_getegid, "0s 0m");
   SY(__NR_getegid); SUCC;

   // __NR_acct 51
   GO(__NR_acct, "1s 1m");
   SY(__NR_acct, x0); FAIL;

   // __NR_umount2 52
   GO(__NR_umount2, "2s 1m");
   SY(__NR_umount2, x0, x0); FAIL;

   // __NR_lock 53
   GO(__NR_lock, "ni");
   SY(__NR_lock); FAIL;

   // __NR_ioctl 54
   #include <asm/ioctls.h>
   GO(__NR_ioctl, "3s 1m");
   SY(__NR_ioctl, x0, x0+TCSETS, x0); FAIL;

   // __NR_fcntl 55
   // As with sys_open(), the 'fd' error is suppressed for the later ones.
   // For F_GETFD the 3rd arg is ignored
   GO(__NR_fcntl, "(GETFD) 2s 0m");
   SY(__NR_fcntl, x0-1, x0+F_GETFD, x0); FAILx(EBADF);

   // For F_DUPFD the 3rd arg is 'arg'.  We don't check the 1st two args
   // because any errors may or may not be commoned up with the ones from
   // the previous fcntl call.
   GO(__NR_fcntl, "(DUPFD) 1s 0m");
   SY(__NR_fcntl, -1, F_DUPFD, x0); FAILx(EBADF);

   // For F_GETLK the 3rd arg is 'lock'.  On x86, this fails w/EBADF.  But
   // on amd64 in 32-bit mode it fails w/EFAULT.  We don't check the 1st two
   // args for the reason given above.
   GO(__NR_fcntl, "(GETLK) 1s 0m");
   SY(__NR_fcntl, -1, F_GETLK, x0); FAIL; //FAILx(EBADF);

   // __NR_mpx 56
   GO(__NR_mpx, "ni");
   SY(__NR_mpx); FAIL;

   // __NR_setpgid 57
   GO(__NR_setpgid, "2s 0m");
   SY(__NR_setpgid, x0, x0-1); FAIL;

   // __NR_ulimit 58
   GO(__NR_ulimit, "ni");
   SY(__NR_ulimit); FAIL;

   // __NR_oldolduname 59
   GO(__NR_oldolduname, "n/a");
   // (obsolete, not handled by Valgrind)

   // __NR_umask 60
   GO(__NR_umask, "1s 0m");
   SY(__NR_umask, x0+022); SUCC;

   // __NR_chroot 61
   GO(__NR_chroot, "1s 1m");
   SY(__NR_chroot, x0); FAIL;

   // __NR_ustat 62
   GO(__NR_ustat, "n/a");
   // (deprecated, not handled by Valgrind)

   // __NR_dup2 63
   GO(__NR_dup2, "2s 0m");
   SY(__NR_dup2, x0-1, x0); FAIL;

   // __NR_getppid 64
   GO(__NR_getppid, "0s 0m");
   SY(__NR_getppid); SUCC;

   // __NR_getpgrp 65
   GO(__NR_getpgrp, "0s 0m");
   SY(__NR_getpgrp); SUCC;

   // __NR_setsid 66
   GO(__NR_setsid, "0s 0m");
   SY(__NR_setsid); SUCC_OR_FAIL;

   // __NR_sigaction 67
   GO(__NR_sigaction, "3s 4m");
   SY(__NR_sigaction, x0, x0+&px[1], x0+&px[1]); FAIL;

   // __NR_sgetmask 68 sys_sgetmask()
   GO(__NR_sgetmask, "n/a");
 //SY(__NR_sgetmask); // (Not yet handled by Valgrind) FAIL;

   // __NR_ssetmask 69
   GO(__NR_ssetmask, "n/a");
 //SY(__NR_ssetmask); // (Not yet handled by Valgrind) FAIL;

   // __NR_setreuid 70
   GO(__NR_setreuid, "2s 0m");
   SY(__NR_setreuid, x0, x0); FAIL;

   // __NR_setregid 71
   GO(__NR_setregid, "2s 0m");
   SY(__NR_setregid, x0, x0); FAIL;

   // __NR_sigsuspend 72
   // XXX: how do you use this function?
   GO(__NR_sigsuspend, "ignore");
   // (I don't know how to test this...)

   // __NR_sigpending 73
   GO(__NR_sigpending, "1s 1m");
   SY(__NR_sigpending, x0); FAIL;

   // __NR_sethostname 74
   GO(__NR_sethostname, "n/a");
 //SY(__NR_sethostname); // (Not yet handled by Valgrind) FAIL;

   // __NR_setrlimit 75
   GO(__NR_setrlimit, "2s 1m");
   SY(__NR_setrlimit, x0, x0); FAIL;

   // __NR_getrlimit 76
   GO(__NR_getrlimit, "2s 1m");
   SY(__NR_getrlimit, x0, x0); FAIL;

   // __NR_getrusage 77
   GO(__NR_getrusage, "2s 1m");
   SY(__NR_getrusage, x0, x0); FAIL;

   // __NR_gettimeofday 78
   GO(__NR_gettimeofday, "2s 2m");
   SY(__NR_gettimeofday, x0, x0+1); FAIL;

   // __NR_settimeofday 79
   GO(__NR_settimeofday, "2s 2m");
   SY(__NR_settimeofday, x0, x0+1); FAIL;

   // __NR_getgroups 80
   GO(__NR_getgroups, "2s 1m");
   SY(__NR_getgroups, x0+1, x0+1); FAIL;

   // __NR_setgroups 81
   GO(__NR_setgroups, "2s 1m");
   SY(__NR_setgroups, x0+1, x0+1); FAIL;

   // __NR_select 82
   {
      long args[5] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1 };
      GO(__NR_select, "1s 5m");
      SY(__NR_select, args+x0); FAIL;
   }

   // __NR_symlink 83
   GO(__NR_symlink, "2s 2m");
   SY(__NR_symlink, x0, x0); FAIL;

   // __NR_oldlstat 84
   GO(__NR_oldlstat, "n/a");
   // (obsolete, not handled by Valgrind)

   // __NR_readlink 85
   GO(__NR_readlink, "3s 2m");
   SY(__NR_readlink, x0+1, x0+1, x0+1); FAIL;

   // __NR_uselib 86
   GO(__NR_uselib, "n/a");
 //SY(__NR_uselib); // (Not yet handled by Valgrind) FAIL;

   // __NR_swapon 87
   GO(__NR_swapon, "n/a");
 //SY(__NR_swapon); // (Not yet handled by Valgrind) FAIL;

   // __NR_reboot 88
   GO(__NR_reboot, "n/a");
 //SY(__NR_reboot); // (Not yet handled by Valgrind) FAIL;

   // __NR_readdir 89
   GO(__NR_readdir, "n/a");
   // (superseded, not handled by Valgrind)

   // __NR_mmap 90
   {
      long args[6] = { x0, x0, x0, x0, x0-1, x0 };
      GO(__NR_mmap, "1s 1m");
      SY(__NR_mmap, args+x0); FAIL;
   }

   // __NR_munmap 91
   GO(__NR_munmap, "2s 0m");
   SY(__NR_munmap, x0, x0); FAIL;

   // __NR_truncate 92
   GO(__NR_truncate, "2s 1m");
   SY(__NR_truncate, x0, x0); FAIL;

   // __NR_ftruncate 93
   GO(__NR_ftruncate, "2s 0m");
   SY(__NR_ftruncate, x0, x0); FAIL;

   // __NR_fchmod 94
   GO(__NR_fchmod, "2s 0m");
   SY(__NR_fchmod, x0-1, x0); FAIL;

   // __NR_fchown 95
   GO(__NR_fchown, "3s 0m");
   SY(__NR_fchown, x0, x0, x0); FAIL;

   // __NR_getpriority 96
   GO(__NR_getpriority, "2s 0m");
   SY(__NR_getpriority, x0-1, x0); FAIL;

   // __NR_setpriority 97
   GO(__NR_setpriority, "3s 0m");
   SY(__NR_setpriority, x0-1, x0, x0); FAIL;

   // __NR_profil 98
   GO(__NR_profil, "ni");
   SY(__NR_profil); FAIL;

   // __NR_statfs 99
   GO(__NR_statfs, "2s 2m");
   SY(__NR_statfs, x0, x0); FAIL;

   // __NR_fstatfs 100
   GO(__NR_fstatfs, "2s 1m");
   SY(__NR_fstatfs, x0, x0); FAIL;

   // __NR_ioperm 101
   GO(__NR_ioperm, "3s 0m");
   SY(__NR_ioperm, x0, x0, x0); FAIL;

   // __NR_socketcall 102
   GO(__NR_socketcall, "XXX");
   // (XXX: need to do all sub-cases properly)

   // __NR_syslog 103
   GO(__NR_syslog, "3s 1m");
   SY(__NR_syslog, x0+2, x0, x0+1); FAIL;

   // __NR_setitimer 104
   GO(__NR_setitimer, "3s 2m");
   SY(__NR_setitimer, x0, x0+1, x0+1); FAIL;

   // __NR_getitimer 105
   GO(__NR_getitimer, "2s 1m");
   SY(__NR_getitimer, x0, x0, x0); FAIL;

   // __NR_stat 106
   GO(__NR_stat, "2s 2m");
   SY(__NR_stat, x0, x0); FAIL;

   // __NR_lstat 107
   GO(__NR_lstat, "2s 2m");
   SY(__NR_lstat, x0, x0); FAIL;

   // __NR_fstat 108
   GO(__NR_fstat, "2s 1m");
   SY(__NR_fstat, x0, x0); FAIL;

   // __NR_olduname 109
   GO(__NR_olduname, "n/a");
   // (obsolete, not handled by Valgrind)

   // __NR_iopl 110
   GO(__NR_iopl, "1s 0m");
   SY(__NR_iopl, x0+100); FAIL;

   // __NR_vhangup 111
   GO(__NR_vhangup, "0s 0m");
   SY(__NR_vhangup); SUCC_OR_FAIL;  // Will succeed for superuser
   
   // __NR_idle 112
   GO(__NR_idle, "ni");
   SY(__NR_idle); FAIL;

   // __NR_vm86old 113
   GO(__NR_vm86old, "n/a");
   // (will probably never be handled by Valgrind)

   // __NR_wait4 114
   GO(__NR_wait4, "4s 2m");
   SY(__NR_wait4, x0, x0+1, x0, x0+1); FAIL;

   // __NR_swapoff 115
   GO(__NR_swapoff, "n/a");
 //SY(__NR_swapoff); // (Not yet handled by Valgrind) FAIL;

   // __NR_sysinfo 116
   GO(__NR_sysinfo, "1s 1m");
   SY(__NR_sysinfo, x0); FAIL;

   // __NR_ipc 117
   // XXX: This is simplistic -- need to do all the sub-cases properly.
   // XXX: Also, should be 6 scalar errors, except glibc's syscall() doesn't
   //      use the 6th one!
   GO(__NR_ipc, "5s 0m");
   SY(__NR_ipc, x0+4, x0, x0, x0, x0, x0); FAIL;

   // __NR_fsync 118
   GO(__NR_fsync, "1s 0m");
   SY(__NR_fsync, x0-1); FAIL;

   // __NR_sigreturn 119
   GO(__NR_sigreturn, "n/a");
 //SY(__NR_sigreturn); // (Not yet handled by Valgrind) FAIL;

   // __NR_clone 120
#ifndef CLONE_PARENT_SETTID
#define CLONE_PARENT_SETTID   0x00100000
#endif
   // XXX: should really be "4s 2m"?  Not sure... (see PRE(sys_clone))
   GO(__NR_clone, "4s 0m");
   SY(__NR_clone, x0|CLONE_PARENT_SETTID|SIGCHLD, x0, x0, x0); FAIL;
   if (0 == res) {
      SY(__NR_exit, 0); FAIL;
   }

   // __NR_setdomainname 121
   GO(__NR_setdomainname, "n/a");
 //SY(__NR_setdomainname); // (Not yet handled by Valgrind) FAIL;

   // __NR_uname 122
   GO(__NR_uname, "1s 1m");
   SY(__NR_uname, x0); FAIL;

   // __NR_modify_ldt 123
   GO(__NR_modify_ldt, "3s 1m");
   SY(__NR_modify_ldt, x0+1, x0, x0+1); FAILx(EINVAL);

   // __NR_adjtimex 124
   // XXX: need to do properly, but deref'ing NULL causing Valgrind to crash...
     GO(__NR_adjtimex, "XXX");
//   SY(__NR_adjtimex, x0); FAIL;

   // __NR_mprotect 125
   GO(__NR_mprotect, "3s 0m");
   SY(__NR_mprotect, x0+1, x0, x0); FAILx(EINVAL);

   // __NR_sigprocmask 126
   GO(__NR_sigprocmask, "3s 2m");
   SY(__NR_sigprocmask, x0, x0+&px[1], x0+&px[1]); SUCC;

   // __NR_create_module 127
   GO(__NR_create_module, "ni");
   SY(__NR_create_module); FAIL;

   // __NR_init_module 128
   GO(__NR_init_module, "3s 2m");
   SY(__NR_init_module, x0, x0+1, x0); FAIL;

   // __NR_delete_module 129
   GO(__NR_delete_module, "n/a");
 //SY(__NR_delete_module); // (Not yet handled by Valgrind) FAIL;

   // __NR_get_kernel_syms 130
   GO(__NR_get_kernel_syms, "ni");
   SY(__NR_get_kernel_syms); FAIL;

   // __NR_quotactl 131
   GO(__NR_quotactl, "4s 1m");
   SY(__NR_quotactl, x0, x0, x0, x0); FAIL;

   // __NR_getpgid 132
   GO(__NR_getpgid, "1s 0m");
   SY(__NR_getpgid, x0-1); FAIL;

   // __NR_fchdir 133
   GO(__NR_fchdir, "1s 0m");
   SY(__NR_fchdir, x0-1); FAIL;

   // __NR_bdflush 134
   GO(__NR_bdflush, "n/a");
 //SY(__NR_bdflush); // (Not yet handled by Valgrind) FAIL;

   // __NR_sysfs 135
   GO(__NR_sysfs, "n/a");
 //SY(__NR_sysfs); // (Not yet handled by Valgrind) FAIL;

   // __NR_personality 136
   GO(__NR_personality, "1s 0m");
   SY(__NR_personality, x0+0xffffffff); SUCC;

   // __NR_afs_syscall 137
   GO(__NR_afs_syscall, "ni");
   SY(__NR_afs_syscall); FAIL;

   // __NR_setfsuid 138
   GO(__NR_setfsuid, "1s 0m");
   SY(__NR_setfsuid, x0); SUCC;  // This syscall has a stupid return value

   // __NR_setfsgid 139
   GO(__NR_setfsgid, "1s 0m");
   SY(__NR_setfsgid, x0); SUCC;  // This syscall has a stupid return value

   // __NR__llseek 140
   GO(__NR__llseek, "5s 1m");
   SY(__NR__llseek, x0, x0, x0, x0, x0); FAIL;

   // __NR_getdents 141
   GO(__NR_getdents, "3s 1m");
   SY(__NR_getdents, x0, x0, x0+1); FAIL;

   // __NR__newselect 142
   GO(__NR__newselect, "5s 4m");
   SY(__NR__newselect, x0+8, x0+0xffffffff, x0+1, x0+1, x0+1); FAIL;

   // __NR_flock 143
   GO(__NR_flock, "2s 0m");
   SY(__NR_flock, x0, x0); FAIL;

   // __NR_msync 144
   GO(__NR_msync, "3s 1m");
   SY(__NR_msync, x0, x0+1, x0); FAIL;

   // __NR_readv 145
   GO(__NR_readv, "3s 1m");
   SY(__NR_readv, x0, x0, x0+1); FAIL;

   // __NR_writev 146
   GO(__NR_writev, "3s 1m");
   SY(__NR_writev, x0, x0, x0+1); FAIL;

   // __NR_getsid 147
   GO(__NR_getsid, "1s 0m");
   SY(__NR_getsid, x0-1); FAIL;

   // __NR_fdatasync 148
   GO(__NR_fdatasync, "1s 0m");
   SY(__NR_fdatasync, x0-1); FAIL;

   // __NR__sysctl 149
   GO(__NR__sysctl, "1s 1m");
   SY(__NR__sysctl, x0); FAIL;

   // __NR_mlock 150
   GO(__NR_mlock, "2s 0m");
   SY(__NR_mlock, x0, x0+1); FAIL;

   // __NR_munlock 151
   GO(__NR_munlock, "2s 0m");
   SY(__NR_munlock, x0, x0+1); FAIL;

   // __NR_mlockall 152
   GO(__NR_mlockall, "1s 0m");
   SY(__NR_mlockall, x0-1); FAIL;

   // __NR_munlockall 153
   GO(__NR_munlockall, "0s 0m");
   SY(__NR_munlockall); SUCC_OR_FAILx(EPERM);

   // __NR_sched_setparam 154
   GO(__NR_sched_setparam, "2s 1m");
   SY(__NR_sched_setparam, x0, x0); FAIL;

   // __NR_sched_getparam 155
   GO(__NR_sched_getparam, "2s 1m");
   SY(__NR_sched_getparam, x0, x0); FAIL;

   // __NR_sched_setscheduler 156
   GO(__NR_sched_setscheduler, "3s 1m");
   SY(__NR_sched_setscheduler, x0-1, x0, x0+1); FAIL;

   // __NR_sched_getscheduler 157
   GO(__NR_sched_getscheduler, "1s 0m");
   SY(__NR_sched_getscheduler, x0-1); FAIL;

   // __NR_sched_yield 158
   GO(__NR_sched_yield, "0s 0m");
   SY(__NR_sched_yield); SUCC;

   // __NR_sched_get_priority_max 159
   GO(__NR_sched_get_priority_max, "1s 0m");
   SY(__NR_sched_get_priority_max, x0-1); FAIL;

   // __NR_sched_get_priority_min 160
   GO(__NR_sched_get_priority_min, "1s 0m");
   SY(__NR_sched_get_priority_min, x0-1); FAIL;

   // __NR_sched_rr_get_interval 161
   GO(__NR_sched_rr_get_interval, "n/a");
 //SY(__NR_sched_rr_get_interval); // (Not yet handled by Valgrind) FAIL;

   // __NR_nanosleep 162
   GO(__NR_nanosleep, "2s 2m");
   SY(__NR_nanosleep, x0, x0+1); FAIL;

   // __NR_mremap 163
   GO(__NR_mremap, "5s 0m");
   SY(__NR_mremap, x0+1, x0, x0, x0+MREMAP_FIXED, x0); FAILx(EINVAL);

   // __NR_setresuid 164
   GO(__NR_setresuid, "3s 0m");
   SY(__NR_setresuid, x0, x0, x0); FAIL;

   // __NR_getresuid 165
   GO(__NR_getresuid, "3s 3m");
   SY(__NR_getresuid, x0, x0, x0); FAIL;

   // __NR_vm86 166
   GO(__NR_vm86, "n/a");
   // (will probably never be handled by Valgrind)

   // __NR_query_module 167
   GO(__NR_query_module, "ni");
   SY(__NR_query_module); FAIL;

   // __NR_poll 168
   GO(__NR_poll, "3s 1m");
   SY(__NR_poll, x0, x0+1, x0); FAIL;

   // __NR_nfsservctl 169
   GO(__NR_nfsservctl, "n/a");
 //SY(__NR_nfsservctl); // (Not yet handled by Valgrind) FAIL;

   // __NR_setresgid 170
   GO(__NR_setresgid, "3s 0m");
   SY(__NR_setresgid, x0, x0, x0); FAIL;

   // __NR_getresgid 171
   GO(__NR_getresgid, "3s 3m");
   SY(__NR_getresgid, x0, x0, x0); FAIL;

   // __NR_prctl 172
   GO(__NR_prctl, "5s 0m");
   SY(__NR_prctl, x0, x0, x0, x0, x0); FAIL;

   // __NR_rt_sigreturn 173
   GO(__NR_rt_sigreturn, "n/a");
 //SY(__NR_rt_sigreturn); // (Not yet handled by Valgrind) FAIL;

   // __NR_rt_sigaction 174
   GO(__NR_rt_sigaction, "4s 4m");
   SY(__NR_rt_sigaction, x0, x0+&px[2], x0+&px[2], x0); FAIL;

   // __NR_rt_sigprocmask 175
   GO(__NR_rt_sigprocmask, "4s 2m");
   SY(__NR_rt_sigprocmask, x0, x0+1, x0+1, x0); FAIL;

   // __NR_rt_sigpending 176
   GO(__NR_rt_sigpending, "2s 1m");
   SY(__NR_rt_sigpending, x0, x0+1); FAIL;

   // __NR_rt_sigtimedwait 177
   GO(__NR_rt_sigtimedwait, "4s 3m");
   SY(__NR_rt_sigtimedwait, x0+1, x0+1, x0+1, x0); FAIL;

   // __NR_rt_sigqueueinfo 178
   GO(__NR_rt_sigqueueinfo, "3s 1m");
   SY(__NR_rt_sigqueueinfo, x0, x0+1, x0); FAIL;

   // __NR_rt_sigsuspend 179
   GO(__NR_rt_sigsuspend, "ignore");
   // (I don't know how to test this...)

   // __NR_pread64 180
   GO(__NR_pread64, "5s 1m");
   SY(__NR_pread64, x0, x0, x0+1, x0, x0); FAIL;

   // __NR_pwrite64 181
   GO(__NR_pwrite64, "5s 1m");
   SY(__NR_pwrite64, x0, x0, x0+1, x0, x0); FAIL;

   // __NR_chown 182
   GO(__NR_chown, "3s 1m");
   SY(__NR_chown, x0, x0, x0); FAIL;

   // __NR_getcwd 183
   GO(__NR_getcwd, "2s 1m");
   SY(__NR_getcwd, x0, x0+1); FAIL;

   // __NR_capget 184
   GO(__NR_capget, "2s 2m");
   SY(__NR_capget, x0, x0); FAIL;

   // __NR_capset 185
   GO(__NR_capset, "2s 2m");
   SY(__NR_capset, x0, x0); FAIL;

   // __NR_sigaltstack 186
   {
      struct our_sigaltstack {
              void *ss_sp;
              int ss_flags;
              size_t ss_size;
      } ss;
      ss.ss_sp     = NULL;
      ss.ss_flags  = 0;
      ss.ss_size   = 0;
      VALGRIND_MAKE_MEM_NOACCESS(& ss, sizeof(struct our_sigaltstack));
      GO(__NR_sigaltstack, "2s 2m");
      SY(__NR_sigaltstack, x0+&ss, x0+&ss); SUCC;
   }

   // __NR_sendfile 187
   GO(__NR_sendfile, "4s 1m");
   SY(__NR_sendfile, x0, x0, x0+1, x0); FAIL;

   // __NR_getpmsg 188
   // Could do 5s 4m with more effort, but I can't be bothered for this
   // crappy non-standard syscall.
   GO(__NR_getpmsg, "5s 0m");
   SY(__NR_getpmsg, x0, x0, x0, x0); FAIL;

   // __NR_putpmsg 189
   // Could do 5s 2m with more effort, but I can't be bothered for this
   // crappy non-standard syscall.
   GO(__NR_putpmsg, "5s 0m");
   SY(__NR_putpmsg, x0, x0, x0, x0, x0); FAIL;

   // __NR_vfork 190
   GO(__NR_vfork, "other");
   // (sse scalar_vfork.c)

   // __NR_ugetrlimit 191
   GO(__NR_ugetrlimit, "2s 1m");
   SY(__NR_ugetrlimit, x0, x0); FAIL;

   // __NR_mmap2 192
   GO(__NR_mmap2, "6s 0m");
   SY(__NR_mmap2, x0, x0, x0, x0, x0-1, x0); FAIL;

   // __NR_truncate64 193
   GO(__NR_truncate64, "3s 1m");
   SY(__NR_truncate64, x0, x0, x0); FAIL;

   // __NR_ftruncate64 194
   GO(__NR_ftruncate64, "3s 0m");
   SY(__NR_ftruncate64, x0, x0, x0); FAIL;

   // __NR_stat64 195
   GO(__NR_stat64, "2s 2m");
   SY(__NR_stat64, x0, x0); FAIL;

   // __NR_lstat64 196
   GO(__NR_lstat64, "2s 2m");
   SY(__NR_lstat64, x0, x0); FAIL;

   // __NR_fstat64 197
   GO(__NR_fstat64, "2s 1m");
   SY(__NR_fstat64, x0, x0); FAIL;

   // __NR_lchown32 198
   GO(__NR_lchown32, "3s 1m");
   SY(__NR_lchown32, x0, x0, x0); FAIL;

   // __NR_getuid32 199
   GO(__NR_getuid32, "0s 0m");
   SY(__NR_getuid32); SUCC;

   // __NR_getgid32 200
   GO(__NR_getgid32, "0s 0m");
   SY(__NR_getgid32); SUCC;

   // __NR_geteuid32 201
   GO(__NR_geteuid32, "0s 0m");
   SY(__NR_geteuid32); SUCC;

   // __NR_getegid32 202
   GO(__NR_getegid32, "0s 0m");
   SY(__NR_getegid32); SUCC;

   // __NR_setreuid32 203
   GO(__NR_setreuid32, "2s 0m");
   SY(__NR_setreuid32, x0, x0); FAIL;

   // __NR_setregid32 204
   GO(__NR_setregid32, "2s 0m");
   SY(__NR_setregid32, x0, x0); FAIL;

   // __NR_getgroups32 205
   GO(__NR_getgroups32, "2s 1m");
   SY(__NR_getgroups32, x0+1, x0+1); FAIL;

   // __NR_setgroups32 206
   GO(__NR_setgroups32, "2s 1m");
   SY(__NR_setgroups32, x0+1, x0+1); FAIL;

   // __NR_fchown32 207
   GO(__NR_fchown32, "3s 0m");
   SY(__NR_fchown32, x0, x0, x0); FAIL;

   // __NR_setresuid32 208
   GO(__NR_setresuid32, "3s 0m");
   SY(__NR_setresuid32, x0, x0, x0); FAIL;

   // __NR_getresuid32 209
   GO(__NR_getresuid32, "3s 3m");
   SY(__NR_getresuid32, x0, x0, x0); FAIL;

   // __NR_setresgid32 210
   GO(__NR_setresgid32, "3s 0m");
   SY(__NR_setresgid32, x0, x0, x0); FAIL;

   // __NR_getresgid32 211
   GO(__NR_getresgid32, "3s 3m");
   SY(__NR_getresgid32, x0, x0, x0); FAIL;

   // __NR_chown32 212
   GO(__NR_chown32, "3s 1m");
   SY(__NR_chown32, x0, x0, x0); FAIL;

   // __NR_setuid32 213
   GO(__NR_setuid32, "1s 0m");
   SY(__NR_setuid32, x0); FAIL;

   // __NR_setgid32 214
   GO(__NR_setgid32, "1s 0m");
   SY(__NR_setgid32, x0); FAIL;

   // __NR_setfsuid32 215
   GO(__NR_setfsuid32, "1s 0m");
   SY(__NR_setfsuid32, x0); SUCC;  // This syscall has a stupid return value

   // __NR_setfsgid32 216
   GO(__NR_setfsgid32, "1s 0m");
   SY(__NR_setfsgid32, x0); SUCC;  // This syscall has a stupid return value

   // __NR_pivot_root 217
   GO(__NR_pivot_root, "n/a");
 //SY(__NR_pivot_root); // (Not yet handled by Valgrind) FAIL;

   // __NR_mincore 218
   GO(__NR_mincore, "3s 1m");
   SY(__NR_mincore, x0, x0+40960, x0); FAIL;

   // __NR_madvise 219
   GO(__NR_madvise, "3s 0m");
   SY(__NR_madvise, x0, x0+1, x0); FAILx(ENOMEM);

   // __NR_getdents64 220
   GO(__NR_getdents64, "3s 1m");
   SY(__NR_getdents64, x0, x0, x0+1); FAIL;

   // __NR_fcntl64 221
   // As with sys_open(), we don't trigger errors for the 1st two args for
   // the later ones.
   // For F_GETFD the 3rd arg is ignored.
   GO(__NR_fcntl64, "(GETFD) 2s 0m");
   SY(__NR_fcntl64, x0-1, x0+F_GETFD, x0); FAILx(EBADF);

   // For F_DUPFD the 3rd arg is 'arg'
   GO(__NR_fcntl64, "(DUPFD) 1s 0m");
   SY(__NR_fcntl64, -1, F_DUPFD, x0); FAILx(EBADF);

   // For F_GETLK the 3rd arg is 'lock'.
   // On x86, this fails w/EBADF.  But on amd64 in 32-bit mode it fails
   // w/EFAULT.
   GO(__NR_fcntl64, "(GETLK) 1s 0m"); 
   SY(__NR_fcntl64, -1, +F_GETLK, x0); FAIL; //FAILx(EBADF);

   // 222
   GO(222, "ni");
   SY(222); FAIL;

   // 223
   GO(223, "ni");
   SY(223); FAIL;

   // __NR_gettid 224
   GO(__NR_gettid, "n/a");
 //SY(__NR_gettid); // (Not yet handled by Valgrind) FAIL;

   // __NR_readahead 225
   GO(__NR_readahead, "n/a");
 //SY(__NR_readahead); // (Not yet handled by Valgrind) FAIL;

   // __NR_setxattr 226
   GO(__NR_setxattr, "5s 3m");
   SY(__NR_setxattr, x0, x0, x0, x0+1, x0); FAIL;

   // __NR_lsetxattr 227
   GO(__NR_lsetxattr, "5s 3m");
   SY(__NR_lsetxattr, x0, x0, x0, x0+1, x0); FAIL;

   // __NR_fsetxattr 228
   GO(__NR_fsetxattr, "5s 2m");
   SY(__NR_fsetxattr, x0, x0, x0, x0+1, x0); FAIL;

   // __NR_getxattr 229
   GO(__NR_getxattr, "4s 3m");
   SY(__NR_getxattr, x0, x0, x0, x0+1); FAIL;

   // __NR_lgetxattr 230
   GO(__NR_lgetxattr, "4s 3m");
   SY(__NR_lgetxattr, x0, x0, x0, x0+1); FAIL;

   // __NR_fgetxattr 231
   GO(__NR_fgetxattr, "4s 2m");
   SY(__NR_fgetxattr, x0, x0, x0, x0+1); FAIL;

   // __NR_listxattr 232
   GO(__NR_listxattr, "3s 2m");
   SY(__NR_listxattr, x0, x0, x0+1); FAIL;

   // __NR_llistxattr 233
   GO(__NR_llistxattr, "3s 2m");
   SY(__NR_llistxattr, x0, x0, x0+1); FAIL;

   // __NR_flistxattr 234
   GO(__NR_flistxattr, "3s 1m");
   SY(__NR_flistxattr, x0-1, x0, x0+1); FAIL; /* kernel returns EBADF, but both seem correct */

   // __NR_removexattr 235
   GO(__NR_removexattr, "2s 2m");
   SY(__NR_removexattr, x0, x0); FAIL;

   // __NR_lremovexattr 236
   GO(__NR_lremovexattr, "2s 2m");
   SY(__NR_lremovexattr, x0, x0); FAIL;

   // __NR_fremovexattr 237
   GO(__NR_fremovexattr, "2s 1m");
   SY(__NR_fremovexattr, x0, x0); FAIL;

   // __NR_tkill 238
   GO(__NR_tkill, "n/a");
 //SY(__NR_tkill); // (Not yet handled by Valgrind) FAIL;

   // __NR_sendfile64 239
   GO(__NR_sendfile64, "4s 1m");
   SY(__NR_sendfile64, x0, x0, x0+1, x0); FAIL;

   // __NR_futex 240
   #ifndef FUTEX_WAIT
   #define FUTEX_WAIT   0
   #endif
   // XXX: again, glibc not doing 6th arg means we have only 5s errors
   GO(__NR_futex, "5s 2m");
   SY(__NR_futex, x0+FUTEX_WAIT, x0, x0, x0+1, x0, x0); FAIL;

   // __NR_sched_setaffinity 241
   GO(__NR_sched_setaffinity, "3s 1m");
   SY(__NR_sched_setaffinity, x0, x0+1, x0); FAIL;

   // __NR_sched_getaffinity 242
   GO(__NR_sched_getaffinity, "3s 1m");
   SY(__NR_sched_getaffinity, x0, x0+1, x0); FAIL;

   // __NR_set_thread_area 243
   GO(__NR_set_thread_area, "1s 1m");
   SY(__NR_set_thread_area, x0); FAILx(EFAULT);

   // __NR_get_thread_area 244
   GO(__NR_get_thread_area, "1s 1m");
   SY(__NR_get_thread_area, x0); FAILx(EFAULT);

   // __NR_io_setup 245
   GO(__NR_io_setup, "2s 1m");
   SY(__NR_io_setup, x0, x0); FAIL;

   // __NR_io_destroy 246
   {
      // jump through hoops to prevent the PRE(io_destroy) wrapper crashing.
      struct fake_aio_ring {   
        unsigned        id;     /* kernel internal index number */
        unsigned        nr;     /* number of io_events */
        // There are more fields in the real aio_ring, but the 'nr' field is
        // the only one used by the PRE() wrapper.
      } ring = { 0, 0 };
      struct fake_aio_ring* ringptr = &ring;
      GO(__NR_io_destroy, "1s 0m");
      SY(__NR_io_destroy, x0+&ringptr); FAIL;
   }

   // __NR_io_getevents 247
   GO(__NR_io_getevents, "5s 2m");
   SY(__NR_io_getevents, x0, x0, x0+1, x0, x0+1); FAIL;

   // __NR_io_submit 248
   GO(__NR_io_submit, "3s 1m");
   SY(__NR_io_submit, x0, x0+1, x0); FAIL;

   // __NR_io_cancel 249
   GO(__NR_io_cancel, "3s 2m");
   SY(__NR_io_cancel, x0, x0, x0); FAIL;

   // __NR_fadvise64 250
   GO(__NR_fadvise64, "n/a");
 //SY(__NR_fadvise64); // (Not yet handled by Valgrind) FAIL;

   // 251
   GO(251, "ni");
   SY(251); FAIL;

   // __NR_exit_group 252
   GO(__NR_exit_group, "other");
   // (see scalar_exit_group.c)

   // __NR_lookup_dcookie 253
   GO(__NR_lookup_dcookie, "4s 1m");
   SY(__NR_lookup_dcookie, x0, x0, x0, x0+1); FAIL;

   // __NR_epoll_create 254
   GO(__NR_epoll_create, "1s 0m");
   SY(__NR_epoll_create, x0); SUCC_OR_FAIL;

   // __NR_epoll_ctl 255
   GO(__NR_epoll_ctl, "4s 1m");
   SY(__NR_epoll_ctl, x0, x0, x0, x0); FAIL;

   // __NR_epoll_wait 256
   GO(__NR_epoll_wait, "4s 1m");
   SY(__NR_epoll_wait, x0, x0, x0+1, x0); FAIL;

   // __NR_remap_file_pages 257
   GO(__NR_remap_file_pages, "n/a");
 //SY(__NR_remap_file_pages); // (Not yet handled by Valgrind) FAIL;

   // __NR_set_tid_address 258
   GO(__NR_set_tid_address, "1s 0m");
   SY(__NR_set_tid_address, x0); SUCC_OR_FAILx(ENOSYS);

   // __NR_timer_create 259
   GO(__NR_timer_create, "3s 2m");
   SY(__NR_timer_create, x0, x0+1, x0); FAIL;

   // __NR_timer_settime (__NR_timer_create+1)
   GO(__NR_timer_settime, "4s 2m");
   SY(__NR_timer_settime, x0, x0, x0, x0+1); FAIL;

   // __NR_timer_gettime (__NR_timer_create+2)
   GO(__NR_timer_gettime, "2s 1m");
   SY(__NR_timer_gettime, x0, x0); FAIL;

   // __NR_timer_getoverrun (__NR_timer_create+3)
   GO(__NR_timer_getoverrun, "1s 0m");
   SY(__NR_timer_getoverrun, x0); FAIL;

   // __NR_timer_delete (__NR_timer_create+4)
   GO(__NR_timer_delete, "1s 0m");
   SY(__NR_timer_delete, x0); FAIL;

   // __NR_clock_settime (__NR_timer_create+5)
   GO(__NR_clock_settime, "2s 1m");
   SY(__NR_clock_settime, x0, x0);  FAIL; FAIL;

   // __NR_clock_gettime (__NR_timer_create+6)
   GO(__NR_clock_gettime, "2s 1m");
   SY(__NR_clock_gettime, x0, x0); FAIL;

   // __NR_clock_getres (__NR_timer_create+7)
   GO(__NR_clock_getres, "2s 1m");
   SY(__NR_clock_getres, x0+1, x0+1); FAIL; FAIL;

   // __NR_clock_nanosleep (__NR_timer_create+8)
   GO(__NR_clock_nanosleep, "n/a");
 //SY(__NR_clock_nanosleep); // (Not yet handled by Valgrind) FAIL;

   // __NR_statfs64 268
   GO(__NR_statfs64, "3s 2m");
   SY(__NR_statfs64, x0, x0+1, x0); FAIL;

   // __NR_fstatfs64 269
   GO(__NR_fstatfs64, "3s 1m");
   SY(__NR_fstatfs64, x0, x0+1, x0); FAIL;

   // __NR_tgkill 270
   GO(__NR_tgkill, "n/a");
 //SY(__NR_tgkill); // (Not yet handled by Valgrind) FAIL;

   // __NR_utimes 271
   GO(__NR_utimes, "2s 2m");
   SY(__NR_utimes, x0, x0+1); FAIL;

   // __NR_fadvise64_64 272
   GO(__NR_fadvise64_64, "n/a");
 //SY(__NR_fadvise64_64); // (Not yet handled by Valgrind) FAIL;

   // __NR_vserver 273
   GO(__NR_vserver, "ni");
   SY(__NR_vserver); FAIL;

   // __NR_mbind 274
   GO(__NR_mbind, "n/a");
 //SY(__NR_mbind); // (Not yet handled by Valgrind) FAIL;

   // __NR_get_mempolicy 275
   GO(__NR_get_mempolicy, "n/a");
 //SY(__NR_get_mempolicy); // (Not yet handled by Valgrind) FAIL;

   // __NR_set_mempolicy 276
   GO(__NR_set_mempolicy, "n/a");
 //SY(__NR_set_mempolicy); // (Not yet handled by Valgrind) FAIL;

   // __NR_mq_open 277
   GO(__NR_mq_open, "4s 3m");
   SY(__NR_mq_open, x0, x0+O_CREAT, x0, x0+1); FAIL;

   // __NR_mq_unlink (__NR_mq_open+1)
   GO(__NR_mq_unlink, "1s 1m");
   SY(__NR_mq_unlink, x0); FAIL;

   // __NR_mq_timedsend (__NR_mq_open+2)
   GO(__NR_mq_timedsend, "5s 2m");
   SY(__NR_mq_timedsend, x0, x0, x0+1, x0, x0+1); FAIL;

   // __NR_mq_timedreceive (__NR_mq_open+3)
   GO(__NR_mq_timedreceive, "5s 3m");
   SY(__NR_mq_timedreceive, x0, x0, x0+1, x0+1, x0+1); FAIL;
  
   // __NR_mq_notify (__NR_mq_open+4)
   GO(__NR_mq_notify, "2s 1m");
   SY(__NR_mq_notify, x0, x0+1); FAIL;

   // __NR_mq_getsetattr (__NR_mq_open+5)
   GO(__NR_mq_getsetattr, "3s 2m");
   SY(__NR_mq_getsetattr, x0, x0+1, x0+1); FAIL;
   
   // __NR_sys_kexec_load 283
   GO(__NR_sys_kexec_load, "ni");
   SY(__NR_sys_kexec_load); FAIL;
#endif

   // no such syscall...
   GO(9999, "1e");
   SY(9999); FAIL;

   // __NR_exit 1
   GO(__NR_exit, "1s 0m");
   SY(__NR_exit, x0); FAIL;

   assert(0);
}