/*
 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
 * Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
 * Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
 * Copyright (C) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// flag bit 7 is set 0, as const char*;
// flag bit 7 is set 1, as void*, size indicate in next-arg;
unsigned char syscall_param_flags[] = {
0x82, 3, //read=0
0x82, 3, //write=1
1, 3, //open=2
0, 1, //close=3
1, 2, //stat=4
0, 2, //fstat=5
1, 2, //lstat=6
0, 3, //poll=7
0, 3, //lseek=8
0, 6, //mmap=9
0, 3, //mprotect=10
0, 2, //munmap=11
0, 1, //brk=12
0, 4, //rt_sigaction=13
0, 4, //rt_sigprocmask=14
0, 0, //rt_sigreturn=15
0, 3, //ioctl=16
0x82, 4, //pread64=17
0x82, 4, //pwrite64=18
0, 3, //readv=19
0, 3, //writev=20
1, 2, //access=21
0, 1, //pipe=22
0, 5, //select=23
0, 0, //sched_yield=24
0, 5, //mremap=25
0, 3, //msync=26
0, 3, //mincore=27
0, 3, //madvise=28
0, 3, //shmget=29
0, 3, //shmat=30
0, 3, //shmctl=31
0, 1, //dup=32
0, 2, //dup2=33
0, 0, //pause=34
0, 2, //nanosleep=35
0, 2, //getitimer=36
0, 1, //alarm=37
0, 3, //setitimer=38
0, 0, //getpid=39
0, 4, //sendfile=40
0, 3, //socket=41
0, 3, //connect=42
0, 3, //accept=43
0x82, 6, //sendto=44
0x82, 6, //recvfrom=45
0, 3, //sendmsg=46
0, 3, //recvmsg=47
0, 2, //shutdown=48
0, 3, //bind=49
0, 2, //listen=50
0, 3, //getsockname=51
0, 3, //getpeername=52
0, 4, //socketpair=53
0, 5, //setsockopt=54
0, 5, //getsockopt=55
0, 5, //clone=56
0, 0, //fork=57
0, 0, //vfork=58
0, 3, //execve=59
0, 1, //exit=60
0, 4, //wait4=61
0, 2, //kill=62
0, 1, //uname=63
0, 3, //semget=64
0, 3, //semop=65
0, 4, //semctl=66
0, 1, //shmdt=67
0, 2, //msgget=68
0, 4, //msgsnd=69
0, 5, //msgrcv=70
0, 3, //msgctl=71
0, 3, //fcntl=72
0, 2, //flock=73
0, 1, //fsync=74
0, 1, //fdatasync=75
1, 2, //truncate=76
0, 2, //ftruncate=77
0, 3, //getdents=78
0, 2, //getcwd=79
1, 1, //chdir=80
0, 1, //fchdir=81
3, 2, //rename=82
1, 2, //mkdir=83
1, 1, //rmdir=84
1, 2, //creat=85
3, 2, //link=86
1, 1, //unlink=87
3, 2, //symlink=88
1, 3, //readlink=89
1, 2, //chmod=90
0, 2, //fchmod=91
1, 3, //chown=92
0, 3, //fchown=93
1, 3, //lchown=94
0, 1, //umask=95
0, 2, //gettimeofday=96
0, 2, //getrlimit=97
0, 2, //getrusage=98
0, 1, //sysinfo=99
0, 1, //times=100
0, 4, //ptrace=101
0, 0, //getuid=102
0, 3, //syslog=103
0, 0, //getgid=104
0, 1, //setuid=105
0, 1, //setgid=106
0, 0, //geteuid=107
0, 0, //getegid=108
0, 2, //setpgid=109
0, 0, //getppid=110
0, 0, //getpgrp=111
0, 0, //setsid=112
0, 2, //setreuid=113
0, 2, //setregid=114
0, 2, //getgroups=115
0, 2, //setgroups=116
0, 3, //setresuid=117
0, 3, //getresuid=118
0, 3, //setresgid=119
0, 3, //getresgid=120
0, 1, //getpgid=121
0, 1, //setfsuid=122
0, 1, //setfsgid=123
0, 1, //getsid=124
0, 2, //capget=125
0, 2, //capset=126
0, 2, //rt_sigpending=127
0, 4, //rt_sigtimedwait=128
0, 3, //rt_sigqueueinfo=129
0, 2, //rt_sigsuspend=130
0, 2, //sigaltstack=131
1, 2, //utime=132
1, 3, //mknod=133
1, 1, //uselib=134
0, 1, //personality=135
0, 2, //ustat=136
1, 2, //statfs=137
0, 2, //fstatfs=138
0, 3, //sysfs=139
0, 2, //getpriority=140
0, 3, //setpriority=141
0, 2, //sched_setparam=142
0, 2, //sched_getparam=143
0, 3, //sched_setscheduler=144
0, 1, //sched_getscheduler=145
0, 1, //sched_get_priority_max=146
0, 1, //sched_get_priority_min=147
0, 2, //sched_rr_get_interval=148
0, 2, //mlock=149
0, 2, //munlock=150
0, 1, //mlockall=151
0, 0, //munlockall=152
0, 0, //vhangup=153
0, 3, //modify_ldt=154
3, 2, //pivot_root=155
0, 1, //_sysctl=156
0, 5, //prctl=157
0, 2, //arch_prctl=158
0, 1, //adjtimex=159
0, 2, //setrlimit=160
1, 1, //chroot=161
0, 0, //sync=162
1, 1, //acct=163
0, 2, //settimeofday=164
7, 5, //mount=165
1, 2, //umount2=166
1, 2, //swapon=167
1, 1, //swapoff=168
0, 4, //reboot=169
1, 2, //sethostname=170
1, 2, //setdomainname=171
0, 1, //iopl=172
0, 3, //ioperm=173
1, 2, //create_module=174
4, 3, //init_module=175
1, 2, //delete_module=176
0, 1, //get_kernel_syms=177
1, 5, //query_module=178
2, 4, //quotactl=179
0, 3, //nfsservctl=180
0, 5, //getpmsg=181
0, 5, //putpmsg=182
0, 5, //afs_syscall=183
0, 3, //tuxcall=184
0, 3, //security=185
0, 0, //gettid=186
0, 3, //readahead=187
3, 5, //setxattr=188
3, 5, //lsetxattr=189
2, 5, //fsetxattr=190
3, 4, //getxattr=191
3, 4, //lgetxattr=192
2, 4, //fgetxattr=193
1, 3, //listxattr=194
1, 3, //llistxattr=195
0, 3, //flistxattr=196
3, 2, //removexattr=197
3, 2, //lremovexattr=198
2, 2, //fremovexattr=199
0, 2, //tkill=200
0, 1, //time=201
0, 6, //futex=202
0, 3, //sched_setaffinity=203
0, 3, //sched_getaffinity=204
0, 1, //set_thread_area=205
0, 2, //io_setup=206
0, 1, //io_destroy=207
0, 5, //io_getevents=208
0, 3, //io_submit=209
0, 3, //io_cancel=210
0, 1, //get_thread_area=211
0, 3, //lookup_dcookie=212
0, 1, //epoll_create=213
0, 4, //epoll_ctl_old=214
0, 4, //epoll_wait_old=215
0, 5, //remap_file_pages=216
0, 3, //getdents64=217
0, 1, //set_tid_address=218
0, 0, //restart_syscall=219
0, 4, //semtimedop=220
0, 4, //fadvise64=221
0, 3, //timer_create=222
0, 4, //timer_settime=223
0, 2, //timer_gettime=224
0, 1, //timer_getoverrun=225
0, 1, //timer_delete=226
0, 2, //clock_settime=227
0, 2, //clock_gettime=228
0, 2, //clock_getres=229
0, 4, //clock_nanosleep=230
0, 1, //exit_group=231
0, 4, //epoll_wait=232
0, 4, //epoll_ctl=233
0, 3, //tgkill=234
1, 2, //utimes=235
0, 5, //vserver=236
0, 6, //mbind=237
0, 3, //set_mempolicy=238
0, 5, //get_mempolicy=239
1, 4, //mq_open=240
1, 1, //mq_unlink=241
2, 5, //mq_timedsend=242
0, 5, //mq_timedreceive=243
0, 2, //mq_notify=244
0, 3, //mq_getsetattr=245
0, 4, //kexec_load=246
0, 5, //waitid=247
3, 5, //add_key=248
7, 4, //request_key=249
0, 5, //keyctl=250
0, 3, //ioprio_set=251
0, 2, //ioprio_get=252
0, 0, //inotify_init=253
2, 3, //inotify_add_watch=254
0, 2, //inotify_rm_watch=255
0, 4, //migrate_pages=256
2, 4, //openat=257
2, 3, //mkdirat=258
2, 4, //mknodat=259
2, 5, //fchownat=260
2, 3, //futimesat=261
2, 4, //newfstatat=262
2, 3, //unlinkat=263
10, 4, //renameat=264
10, 5, //linkat=265
5, 3, //symlinkat=266
2, 4, //readlinkat=267
2, 4, //fchmodat=268
2, 4, //faccessat=269
0, 6, //pselect6=270
0, 5, //ppoll=271
0, 1, //unshare=272
0, 2, //set_robust_list=273
0, 3, //get_robust_list=274
0, 6, //splice=275
0, 4, //tee=276
0, 4, //sync_file_range=277
0, 4, //vmsplice=278
0, 6, //move_pages=279
2, 4, //utimensat=280
0, 6, //epoll_pwait=281
0, 3, //signalfd=282
0, 2, //timerfd_create=283
0, 1, //eventfd=284
0, 4, //fallocate=285
0, 4, //timerfd_settime=286
0, 2, //timerfd_gettime=287
0, 4, //accept4=288
0, 4, //signalfd4=289
0, 2, //eventfd2=290
0, 1, //epoll_create1=291
0, 3, //dup3=292
0, 2, //pipe2=293
0, 1, //inotify_init1=294
0, 4, //preadv=295
0, 4, //pwritev=296
0, 4, //rt_tgsigqueueinfo=297
0, 5, //perf_event_open=298
0, 5, //recvmmsg=299
0, 2, //fanotify_init=300
16, 5, //fanotify_mark=301
0, 4, //prlimit64=302
2, 5, //name_to_handle_at=303
0, 3, //open_by_handle_at=304
0, 2, //clock_adjtime=305
0, 1, //syncfs=306
0, 4, //sendmmsg=307
0, 2, //setns=308
0, 3, //getcpu=309
0, 6, //process_vm_readv=310
0, 6, //process_vm_writev=311
0, 5, //kcmp=312
2, 3, //finit_module=313
0, 3, //sched_setattr=314
0, 4, //sched_getattr=315
10, 5, //renameat2=316
0, 3, //seccomp=317
0, 3, //getrandom=318
1, 2, //memfd_create=319
8, 5, //kexec_file_load=320
0, 3, //bpf=321
0, 5, //execveat=322
0, 1, //userfaultfd=323
0, 2, //membarrier=324
0, 3, //mlock2=325
0, 6, //copy_file_range=326
0, 6, //preadv2=327
0, 6, //pwritev2=328
0, 4, //pkey_mprotect=329
0, 2, //pkey_alloc=330
0, 1, //pkey_free=331
};
