ronin-code-asm 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.document +4 -0
  3. data/.editorconfig +11 -0
  4. data/.github/workflows/ruby.yml +31 -0
  5. data/.gitignore +11 -0
  6. data/.mailmap +1 -0
  7. data/.rspec +1 -0
  8. data/.ruby-version +1 -0
  9. data/.yardopts +1 -0
  10. data/COPYING.txt +165 -0
  11. data/ChangeLog.md +44 -0
  12. data/Gemfile +25 -0
  13. data/README.md +166 -0
  14. data/Rakefile +39 -0
  15. data/data/os/freebsd/amd64/syscalls.yml +415 -0
  16. data/data/os/freebsd/x86/syscalls.yml +415 -0
  17. data/data/os/linux/amd64/syscalls.yml +306 -0
  18. data/data/os/linux/x86/syscalls.yml +339 -0
  19. data/gemspec.yml +26 -0
  20. data/lib/ronin/code/asm/archs/amd64.rb +100 -0
  21. data/lib/ronin/code/asm/archs/x86.rb +170 -0
  22. data/lib/ronin/code/asm/archs.rb +22 -0
  23. data/lib/ronin/code/asm/config.rb +33 -0
  24. data/lib/ronin/code/asm/immediate_operand.rb +84 -0
  25. data/lib/ronin/code/asm/instruction.rb +66 -0
  26. data/lib/ronin/code/asm/memory_operand.rb +119 -0
  27. data/lib/ronin/code/asm/os/freebsd.rb +35 -0
  28. data/lib/ronin/code/asm/os/linux.rb +35 -0
  29. data/lib/ronin/code/asm/os/os.rb +47 -0
  30. data/lib/ronin/code/asm/os.rb +57 -0
  31. data/lib/ronin/code/asm/program.rb +509 -0
  32. data/lib/ronin/code/asm/register.rb +111 -0
  33. data/lib/ronin/code/asm/shellcode.rb +75 -0
  34. data/lib/ronin/code/asm/syntax/att.rb +164 -0
  35. data/lib/ronin/code/asm/syntax/common.rb +241 -0
  36. data/lib/ronin/code/asm/syntax/intel.rb +150 -0
  37. data/lib/ronin/code/asm/syntax.rb +22 -0
  38. data/lib/ronin/code/asm/version.rb +28 -0
  39. data/lib/ronin/code/asm.rb +68 -0
  40. data/ronin-code-asm.gemspec +62 -0
  41. data/spec/asm_spec.rb +14 -0
  42. data/spec/config_spec.rb +10 -0
  43. data/spec/immediate_operand_spec.rb +79 -0
  44. data/spec/instruction_spec.rb +62 -0
  45. data/spec/memory_operand_spec.rb +80 -0
  46. data/spec/os_spec.rb +68 -0
  47. data/spec/program_spec.rb +439 -0
  48. data/spec/register_spec.rb +112 -0
  49. data/spec/shellcode_spec.rb +58 -0
  50. data/spec/spec_helper.rb +7 -0
  51. data/spec/syntax/att_spec.rb +181 -0
  52. data/spec/syntax/common_spec.rb +42 -0
  53. data/spec/syntax/intel_spec.rb +174 -0
  54. metadata +143 -0
@@ -0,0 +1,415 @@
1
+ ---
2
+ :exit: 1 # { void exit(int rval); }
3
+ :fork: 2 # { int fork(void); }
4
+ :read: 3 # { user_ssize_t read(int fd, user_addr_t cbuf, user_size_t nbyte); }
5
+ :write: 4 # { user_ssize_t write(int fd, user_addr_t cbuf, user_size_t nbyte); }
6
+ :open: 5 # { int open(user_addr_t path, int flags, int mode); }
7
+ :close: 6 # { int close(int fd); }
8
+ :wait4: 7 # { int wait4(int pid, user_addr_t status, int options, user_addr_t rusage); }
9
+ :old_create: 8 # { int nosys(void); } { old creat }
10
+ :link: 9 # { int link(user_addr_t path, user_addr_t link); }
11
+ :unlink: 10 # { int unlink(user_addr_t path); }
12
+ :old_execve: 11 # { int nosys(void); } { old execv }
13
+ :chdir: 12 # { int chdir(user_addr_t path); }
14
+ :fchdir: 13 # { int fchdir(int fd); }
15
+ :mknod: 14 # { int mknod(user_addr_t path, int mode, int dev); }
16
+ :chmod: 15 # { int chmod(user_addr_t path, int mode); }
17
+ :chown: 16 # { int chown(user_addr_t path, int uid, int gid); }
18
+ :old_break: 17 # { int nosys(void); } { old break }
19
+ :getfsstat: 18 # { int getfsstat(user_addr_t buf, int bufsize, int flags); }
20
+ :old_lseek: 19 # { int nosys(void); } { old lseek }
21
+ :getpid: 20 # { int getpid(void); }
22
+ :old_mount: 21 # { int nosys(void); } { old mount }
23
+ :old_umount: 22 # { int nosys(void); } { old umount }
24
+ :setuid: 23 # { int setuid(uid_t uid); }
25
+ :getuid: 24 # { int getuid(void); }
26
+ :geteuid: 25 # { int geteuid(void); }
27
+ :ptrace: 26 # { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
28
+ :recvmsg: 27 # { int recvmsg(int s, struct msghdr *msg, int flags); }
29
+ :sendmsg: 28 # { int sendmsg(int s, caddr_t msg, int flags); }
30
+ :recvfrom: 29 # { int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, int *fromlenaddr); }
31
+ :accept: 30 # { int accept(int s, caddr_t name, socklen_t
32
+ :getpeername: 31 # { int getpeername(int fdes, caddr_t asa, socklen_t *alen); }
33
+ :getsockname: 32 # { int getsockname(int fdes, caddr_t asa, socklen_t *alen); }
34
+ :access: 33 # { int access(user_addr_t path, int flags); }
35
+ :chflags: 34 # { int chflags(char *path, int flags); }
36
+ :fchflags: 35 # { int fchflags(int fd, int flags); }
37
+ :sync: 36 # { int sync(void); }
38
+ :kill: 37 # { int kill(int pid, int signum, int posix); }
39
+ :old_stat: 38 # { int nosys(void); } { old stat }
40
+ :getppid: 39 # { int getppid(void); }
41
+ :old_lstat: 40 # { int nosys(void); } { old lstat }
42
+ :dup: 41 # { int dup(u_int fd); }
43
+ :pipe: 42 # { int pipe(void); }
44
+ :getegid: 43 # { int getegid(void); }
45
+ :profil: 44 # { int profil(short *bufbase, size_t bufsize, u_long pcoffset, u_int pcscale); }
46
+ :old_ktrace: 45 # { int nosys(void); } { old ktrace }
47
+ :sigaction: 46 # { int sigaction(int signum, struct __sigaction *nsa, struct sigaction *osa); }
48
+ :getpid: 47 # { int getgid(void); }
49
+ :sigprocmask: 48 # { int sigprocmask(int how, user_addr_t mask, user_addr_t omask); }
50
+ :getlogin: 49 # { int getlogin(char *namebuf, u_int namelen); }
51
+ :setlogin: 50 # { int setlogin(char *namebuf); }
52
+ :acct: 51 # { int acct(char *path); }
53
+ :sigpending: 52 # { int sigpending(struct sigvec *osv); }
54
+ :sigaltstack: 53 # { int sigaltstack(struct sigaltstack *nss, struct sigaltstack *oss); }
55
+ :ioctl: 54 # { int ioctl(int fd, u_long com, caddr_t data); }
56
+ :reboot: 55 # { int reboot(int opt, char *command); }
57
+ :revoke: 56 # { int revoke(char *path); }
58
+ :symlink: 57 # { int symlink(char *path, char *link); }
59
+ :readlink: 58 # { int readlink(char *path, char *buf, int count); }
60
+ :execve: 59 # { int execve(char *fname, char **argp, char **envp); }
61
+ :umask: 60 # { int umask(int newmask); }
62
+ :chroot: 61 # { int chroot(user_addr_t path); }
63
+ :old_fstat: 62 # { int nosys(void); } { old fstat }
64
+ :old_getpagesize: 64 # { int nosys(void); } { old getpagesize }
65
+ :msync: 65 # { int msync(caddr_t addr, size_t len, int flags); }
66
+ :vfork: 66 # { int vfork(void); }
67
+ :old_vread: 67 # { int nosys(void); } { old vread }
68
+ :old_write: 68 # { int nosys(void); } { old vwrite }
69
+ :old_sbrk: 69 # { int nosys(void); } { old sbrk }
70
+ :old_sstk: 70 # { int nosys(void); } { old sstk }
71
+ :old_mmap: 71 # { int nosys(void); } { old mmap }
72
+ :old_vadvise: 72 # { int nosys(void); } { old vadvise }
73
+ :munmap: 73 # { int munmap(caddr_t addr, size_t len); }
74
+ :mprotect: 74 # { int mprotect(caddr_t addr, size_t len, int prot); }
75
+ :madvise: 75 # { int madvise(caddr_t addr, size_t len, int behav); }
76
+ :old_vhangup: 76 # { int nosys(void); } { old vhangup }
77
+ :old_vlimit: 77 # { int nosys(void); } { old vlimit }
78
+ :mincore: 78 # { int mincore(user_addr_t addr, user_size_t len, user_addr_t vec); }
79
+ :getgroups: 79 # { int getgroups(u_int gidsetsize, gid_t *gidset); }
80
+ :setgroups: 80 # { int setgroups(u_int gidsetsize, gid_t *gidset); }
81
+ :getpgrp: 81 # { int getpgrp(void); }
82
+ :setpgid: 82 # { int setpgid(int pid, int pgid); }
83
+ :setitimer: 83 # { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
84
+ :old_wait: 84 # { int nosys(void); } { old wait }
85
+ :swapon: 85 # { int swapon(void); }
86
+ :getitimer: 86 # { int getitimer(u_int which, struct itimerval *itv); }
87
+ :oldgethostname: 87 # { int nosys(void); } { old gethostname }
88
+ :sethostname: 88 # { int nosys(void); } { old sethostname }
89
+ :getdtablesize: 89 # { int getdtablesize(void); }
90
+ :dup2: 90 # { int dup2(u_int from, u_int to); }
91
+ :old_getdopt: 91 { int nosys(void); } { old getdopt }
92
+ :fcntl: 92 # { int fcntl(int fd, int cmd, long arg); }
93
+ :select: 93 # { int select(int nd, u_int32_t *in, u_int32_t *ou, u_int32_t *ex, struct timeval *tv); }
94
+ :old_setdopt: 94 # { int nosys(void); } { old setdopt }
95
+ :fsync: 95 # { int fsync(int fd); }
96
+ :setpriority: 96 # { int setpriority(int which, id_t who, int prio); }
97
+ :socket: 97 # { int socket(int domain, int type, int protocol); }
98
+ :connect: 98 # { int connect(int s, caddr_t name, socklen_t namelen); }
99
+ :old_accept: 99 # { int nosys(void); } { old accept }
100
+ :getpriority: 100 # { int getpriority(int which, id_t who); }
101
+ :old_send: 101 # { int nosys(void); } { old send }
102
+ :old_recv: 102 # { int nosys(void); } { old recv }
103
+ :old_sigreturn: 103 # { int nosys(void); } { old sigreturn }
104
+ :bind: 104 # { int bind(int s, caddr_t name, socklen_t namelen); }
105
+ :setsockopt: 105 # { int setsockopt(int s, int level, int name, caddr_t val, socklen_t valsize); }
106
+ :listen: 106 # { int listen(int s, int backlog); }
107
+ :old_vtimes: 107 # { int nosys(void); } { old vtimes }
108
+ :old_sigvec: 108 # { int nosys(void); } { old sigvec }
109
+ :old_sigblock: 109 # { int nosys(void); } { old sigblock }
110
+ :old_sigsetmask: 110 # { int nosys(void); } { old sigsetmask }
111
+ :sigsuspend: 111 # { int sigsuspend(sigset_t mask); }
112
+ :old_sigstack: 112 # { int nosys(void); } { old sigstack }
113
+ :recvmsg: 113 # { int nosys(void); } { old recvmsg }
114
+ :sendmsg: 114 # { int nosys(void); } { old sendmsg }
115
+ :old_vtrace: 115 # { int nosys(void); } { old vtrace }
116
+ :gettimeofday: 116 # { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
117
+ :getrusage: 117 # { int getrusage(int who, struct rusage *rusage); }
118
+ :getsockopt: 118 # { int getsockopt(int s, int level, int name, caddr_t val, socklen_t *avalsize); }
119
+ :old_resuba: 119 # { int nosys(void); } { old resuba }
120
+ :readv: 120 # { user_ssize_t readv(int fd, struct iovec *iovp, u_int iovcnt); }
121
+ :writev: 121 # { user_ssize_t writev(int fd, struct iovec *iovp, u_int iovcnt); }
122
+ :settimeofday: 122 # { int settimeofday(struct timeval *tv, struct timezone *tzp); }
123
+ :fchown: 123 # { int fchown(int fd, int uid, int gid); }
124
+ :chmod: 124 # { int fchmod(int fd, int mode); }
125
+ :old_recvfrom: 125 # { int nosys(void); } { old recvfrom }
126
+ :setreuid: 126 # { int setreuid(uid_t ruid, uid_t euid); }
127
+ :setregid: 127 # { int setregid(gid_t rgid, gid_t egid); }
128
+ :rename: 128 # { int rename(char *from, char *to); }
129
+ :old_truncate: 129 # { int nosys(void); } { old truncate }
130
+ :old_ftruncate: 130 # { int nosys(void); } { old ftruncate }
131
+ :flock: 131 # { int flock(int fd, int how); }
132
+ :mkfifo: 132 # { int mkfifo(user_addr_t path, int mode); }
133
+ :sendto: 133 # { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, socklen_t tolen); }
134
+ :shutdown: 134 # { int shutdown(int s, int how); }
135
+ :socketpair: 135 # { int socketpair(int domain, int type, int protocol, int *rsv); }
136
+ :mkdir: 136 # { int mkdir(user_addr_t path, int mode); }
137
+ :rmdir: 137 # { int rmdir(char *path); }
138
+ :utimes: 138 # { int utimes(char *path, struct timeval *tptr); }
139
+ :futimes: 139 # { int futimes(int fd, struct timeval *tptr); }
140
+ :adjtime: 140 # { int adjtime(struct timeval *delta, struct timeval *olddelta); }
141
+ :oldgetpeername: 141 # { int nosys(void); } { old getpeername }
142
+ :gethostuuid: 142 # { int gethostuuid(unsigned char *uuid_buf, const struct timespec *timeoutp); }
143
+ :old_sethostid: 143 # { int nosys(void); } { old sethostid
144
+ :old_getrlimit: 144 # { int nosys(void); } { old getrlimit }
145
+ :setrlimit: 145 # { int nosys(void); } { old setrlimit }
146
+ :old_killpg: 146 # { int nosys(void); } { old killpg }
147
+ :setsid: 147 # { int setsid(void); }
148
+ :old_setquota: 148 # { int nosys(void); } { old setquota }
149
+ :old_qquota: 149 # { int nosys(void); } { old qquota }
150
+ :getsockname: 150 # { int nosys(void); } { old getsockname }
151
+ :getpgid: 151 # { int getpgid(pid_t pid); }
152
+ :setprivexec: 152 # { int setprivexec(int flag); }
153
+ :pread: 153 # { user_ssize_t pread(int fd, user_addr_t buf, user_size_t nbyte, off_t offset); }
154
+ :pwrite: 154 # { user_ssize_t pwrite(int fd, user_addr_t buf, user_size_t nbyte, off_t offset); }
155
+ :nfssvc: 155 # { int nfssvc(int flag, caddr_t argp); }
156
+ :old_getdirentries: 156 # { int nosys(void); } { old getdirentries }
157
+ :statfs: 157 # { int statfs(char *path, struct statfs *buf); }
158
+ :fstatfs: 158 # { int fstatfs(int fd, struct statfs *buf); }
159
+ :unmount: 159 # { int unmount(user_addr_t path, int flags); }
160
+ :old_async_daemon: 160 # { int nosys(void); } { old async_daemon }
161
+ :getfh: 161 # { int getfh(char *fname, fhandle_t *fhp); }
162
+ :old_getdomainname: 162 # { int nosys(void); } { old getdomainname }
163
+ :old_setdomainname: 163 # { int nosys(void); } { old setdomainname }
164
+ :quotactl: 165 # { int quotactl(const char *path, int cmd, int uid, caddr_t arg); }
165
+ :old_exportfs: 166 # { int nosys(void); } { old exportfs }
166
+ :mount: 167 # { int mount(char *type, char *path, int flags, caddr_t data); }
167
+ :old_ustat: 168 # { int nosys(void); } { old ustat }
168
+ :csops: 169 # { int csops(pid_t pid, uint32_t ops, user_addr_t useraddr, user_size_t usersize); }
169
+ :old_table: 170 # { int nosys(void); } { old table }
170
+ :old_wait3: 171 # { int nosys(void); } { old wait3 }
171
+ :rpause: 172 # { int nosys(void); } { old rpause }
172
+ :waitid: 173 # { int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); }
173
+ :old_getdents: 174 # { int nosys(void); } { old getdents }
174
+ :old_gc_control: 175 # { int nosys(void); } { old gc_control }
175
+ :add_profil: 176 # { int add_profil(short *bufbase, size_t bufsize, u_long pcoffset, u_int pcscale); }
176
+ :kdebug_trace: 180 # { int kdebug_trace(int code, int arg1, int arg2, int arg3, int arg4, int arg5) NO_SYSCALL_STUB; }
177
+ :setgid: 181 # { int setgid(gid_t gid); }
178
+ :setegid: 182 # { int setegid(gid_t egid); }
179
+ :seteuid: 183 # { int seteuid(uid_t euid); }
180
+ :sigreturn: 184 # { int sigreturn(struct ucontext *uctx, int infostyle) NO_SYSCALL_STUB; }
181
+ :chud: 185 # { int chud(uint64_t code, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5) NO_SYSCALL_STUB; }
182
+ :fdatasync: 187 # { int fdatasync(int fd); }
183
+ :stat: 188 # { int stat(user_addr_t path, user_addr_t ub); }
184
+ :fstat: 189 # { int fstat(int fd, user_addr_t ub); }
185
+ :lstat: 190 # { int lstat(user_addr_t path, user_addr_t ub); }
186
+ :pathconf: 191 # { int pathconf(char *path, int name); }
187
+ :fpathconf: 192 # { int fpathconf(int fd, int name); }
188
+ :getrlimit: 194 # { int getrlimit(u_int which, struct rlimit *rlp); }
189
+ :setrlimit: 195 # { int setrlimit(u_int which, struct rlimit *rlp); }
190
+ :getdirentries: 196 # { int getdirentries(int fd, char *buf, u_int count, long *basep); }
191
+ :mmap: 197 # { user_addr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); }
192
+ :lseek: 199 # { off_t lseek(int fd, off_t offset, int whence); }
193
+ :truncate: 200 # { int truncate(char *path, off_t length); }
194
+ :ftruncate: 201 # { int ftruncate(int fd, off_t length); }
195
+ :__sysctl: 202 # { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
196
+ :mlock: 203 # { int mlock(caddr_t addr, size_t len); }
197
+ :munlock: 204 # { int munlock(caddr_t addr, size_t len); }
198
+ :undelete: 205 # { int undelete(user_addr_t path); }
199
+ :ATsocket: 206 # { int ATsocket(int proto); }
200
+ :ATgetmsg: 207 # { int ATgetmsg(int fd, void *ctlptr, void *datptr, int *flags); }
201
+ :ATputmsg: 208 # { int ATputmsg(int fd, void *ctlptr, void *datptr, int flags); }
202
+ :ATPsndreg: 209 # { int ATPsndreq(int fd, unsigned char *buf, int len, int nowait); }
203
+ :ATPsndrsp: 210 # { int ATPsndrsp(int fd, unsigned char *respbuff, int resplen, int datalen); }
204
+ :ATPgetreq: 211 # { int ATPgetreq(int fd, unsigned char *buf, int buflen); }
205
+ :ATPgetrsp: 212 # { int ATPgetrsp(int fd, unsigned char *bdsp); }
206
+ #
207
+ # System Calls 216 - 230 are reserved for calls to support HFS/HFS Plus
208
+ # file system semantics. Currently, we only use 215-227. The rest is
209
+ # for future expansion in anticipation of new MacOS APIs for HFS Plus.
210
+ # These calls are not conditionalized because while they are specific
211
+ # to HFS semantics, they are not specific to the HFS filesystem.
212
+ # We expect all filesystems to recognize the call and report that it is
213
+ # not supported or to actually implement it.
214
+ #
215
+ :mkcomplex: 216 # { int mkcomplex(const char *path, mode_t mode, u_long type); }
216
+ :statv: 217 # { int statv(const char *path, struct vstat *vsb); }
217
+ :lstatv: 218 # { int lstatv(const char *path, struct vstat *vsb); }
218
+ :fstatv: 219 # { int fstatv(int fd, struct vstat *vsb); }
219
+ :getattrlist: 220 # { int getattrlist(const char *path, struct attrlist *alist, void *attributeBuffer, size_t bufferSize, u_long options); }
220
+ :setattrlist: 221 # { int setattrlist(const char *path, struct attrlist *alist, void *attributeBuffer, size_t bufferSize, u_long options); }
221
+ :getdirentriesattr: 222 # { int getdirentriesattr(int fd, struct attrlist *alist, void *buffer, size_t buffersize, u_long *count, u_long *basep, u_long *newstate, u_long options); }
222
+ :exchangedata: 223 # { int exchangedata(const char *path1, const char *path2, u_long options); }
223
+ :old_fsgetpath: 224 # { int nosys(void); } { old checkuseraccess / fsgetpath (which moved to 427) }
224
+ :searchfs: 225 # { int searchfs(const char *path, struct fssearchblock *searchblock, uint32_t *nummatches, uint32_t scriptcode, uint32_t options, struct searchstate *state); }
225
+ :delete: 226 # { int delete(user_addr_t path) NO_SYSCALL_STUB; } { private delete (Carbon semantics) }
226
+ :copyfile: 227 # { int copyfile(char *from, char *to, int mode, int flags) NO_SYSCALL_STUB; }
227
+ :fgetattrlist: 228 # { int fgetattrlist(int fd, struct attrlist *alist, void *attributeBuffer, size_t bufferSize, u_long options); }
228
+ :fsetattrlist: 229 # { int fsetattrlist(int fd, struct attrlist *alist, void *attributeBuffer, size_t bufferSize, u_long options); }
229
+ :poll: 230 # { int poll(struct pollfd *fds, u_int nfds, int timeout); }
230
+ :watchevent: 231 # { int watchevent(struct eventreq *u_req, int u_eventmask); }
231
+ :waitevent: 232 # { int waitevent(struct eventreq *u_req, struct timeval *tv); }
232
+ :modwatch: 233 # { int modwatch(struct eventreq *u_req, int u_eventmask); }
233
+ :getxattr: 234 # { user_ssize_t getxattr(user_addr_t path, user_addr_t attrname, user_addr_t value, size_t size, uint32_t position, int options); }
234
+ :fgetxattr: 235 # { user_ssize_t fgetxattr(int fd, user_addr_t attrname, user_addr_t value, size_t size, uint32_t position, int options); }
235
+ :setxattr: 236 # { int setxattr(user_addr_t path, user_addr_t attrname, user_addr_t value, size_t size, uint32_t position, int options); }
236
+ :fsetxattr: 237 # { int fsetxattr(int fd, user_addr_t attrname, user_addr_t value, size_t size, uint32_t position, int options); }
237
+ :removexattr: 238 # { int removexattr(user_addr_t path, user_addr_t attrname, int options); }
238
+ :fremovexattr: 239 # { int fremovexattr(int fd, user_addr_t attrname, int options); }
239
+ :listxattr: 240 # { user_ssize_t listxattr(user_addr_t path, user_addr_t namebuf, size_t bufsize, int options); }
240
+ :flistxattr: 241 # { user_ssize_t flistxattr(int fd, user_addr_t namebuf, size_t bufsize, int options); }
241
+ :fsctl: 242 # { int fsctl(const char *path, u_long cmd, caddr_t data, u_int options); }
242
+ :initgroups: 243 # { int initgroups(u_int gidsetsize, gid_t *gidset, int gmuid); }
243
+ :posix_spawn: 244 # { int posix_spawn(pid_t *pid, const char *path, const struct _posix_spawn_args_desc *adesc, char **argv, char **envp); }
244
+ :ffsctl: 245 # { int ffsctl(int fd, u_long cmd, caddr_t data, u_int options); }
245
+ :nfsclnt: 247 # { int nfsclnt(int flag, caddr_t argp); }
246
+ :fhopen: 248 # { int fhopen(const struct fhandle *u_fhp, int flags); }
247
+ :minherit: 250 # { int minherit(void *addr, size_t len, int inherit); }
248
+ :semsys: 251 # { int semsys(u_int which, int a2, int a3, int a4, int a5); }
249
+ :msgsys: 252 # { int msgsys(u_int which, int a2, int a3, int a4, int a5); }
250
+ :shmsys: 253 # { int shmsys(u_int which, int a2, int a3, int a4); }
251
+ :semctl: 254 # { int semctl(int semid, int semnum, int cmd, semun_t arg); }
252
+ :semget: 255 # { int semget(key_t key, int
253
+ :semop: 256 # { int semop(int semid, struct sembuf *sops, int nsops); }
254
+ :msgctl: 258 # { int msgctl(int msqid, int cmd, struct
255
+ :msgget: 259 # { int msgget(key_t key, int msgflg); }
256
+ :msgsnd: 260 # { int msgsnd(int msqid, void *msgp, size_t msgsz, int msgflg); }
257
+ :msgrcv: 261 # { user_ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
258
+ :shmat: 262 # { user_addr_t shmat(int shmid, void *shmaddr, int shmflg); }
259
+ :shmctl: 263 # { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
260
+ :shmdt: 264 # { int shmdt(void *shmaddr); }
261
+ :shmget: 265 # { int shmget(key_t key, size_t size, int shmflg); }
262
+ :shm_open: 266 # { int shm_open(const char *name, int oflag, int mode); }
263
+ :shm_unlink: 267 # { int shm_unlink(const char *name); }
264
+ :sem_open: 268 # { user_addr_t sem_open(const char *name, int oflag, int mode, int value); }
265
+ :sem_close: 269 # { int sem_close(sem_t *sem); }
266
+ :sem_unlink: 270 # { int sem_unlink(const char *name); }
267
+ :sem_wait: 271 # { int sem_wait(sem_t *sem); }
268
+ :sem_trywait: 272 # { int sem_trywait(sem_t *sem); }
269
+ :sem_post: 273 # { int sem_post(sem_t *sem); }
270
+ :sem_getvalue: 274 # { int sem_getvalue(sem_t *sem, int *sval); }
271
+ :sem_init: 275 # { int sem_init(sem_t *sem, int phsared, u_int value); }
272
+ :sem_destroy: 276 # { int sem_destroy(sem_t *sem); }
273
+ :open_extended: 277 # { int open_extended(user_addr_t path, int flags, uid_t uid, gid_t gid, int mode, user_addr_t xsecurity) NO_SYSCALL_STUB; }
274
+ :umask_extended: 278 # { int umask_extended(int newmask, user_addr_t xsecurity) NO_SYSCALL_STUB; }
275
+ :stat_extended: 279 # { int stat_extended(user_addr_t path, user_addr_t ub, user_addr_t xsecurity, user_addr_t xsecurity_size) NO_SYSCALL_STUB; }
276
+ :lstat_extended: 280 # { int lstat_extended(user_addr_t path, user_addr_t ub, user_addr_t xsecurity, user_addr_t xsecurity_size) NO_SYSCALL_STUB; }
277
+ :fstat_extended: 281 # { int fstat_extended(int fd, user_addr_t ub, user_addr_t xsecurity, user_addr_t xsecurity_size) NO_SYSCALL_STUB; }
278
+ :chmod_extended: 282 # { int chmod_extended(user_addr_t path, uid_t uid, gid_t gid, int mode, user_addr_t xsecurity) NO_SYSCALL_STUB; }
279
+ :fchmod_extended: 283 # { int fchmod_extended(int fd, uid_t uid, gid_t gid, int mode, user_addr_t xsecurity) NO_SYSCALL_STUB; }
280
+ :access_extended: 284 # { int access_extended(user_addr_t entries, size_t size, user_addr_t results, uid_t uid) NO_SYSCALL_STUB; }
281
+ :settid: 285 # { int settid(uid_t uid, gid_t gid) NO_SYSCALL_STUB; }
282
+ :gettid: 286 # { int gettid(uid_t *uidp, gid_t *gidp) NO_SYSCALL_STUB; }
283
+ :setsgroups: 287 # { int setsgroups(int setlen, user_addr_t guidset) NO_SYSCALL_STUB; }
284
+ :getsgroups: 288 # { int getsgroups(user_addr_t setlen, user_addr_t guidset) NO_SYSCALL_STUB; }
285
+ :setwgroups: 289 # { int setwgroups(int setlen, user_addr_t guidset) NO_SYSCALL_STUB; }
286
+ :getwgroups: 290 # { int getwgroups(user_addr_t setlen, user_addr_t guidset) NO_SYSCALL_STUB; }
287
+ :mkfifo_extended: 291 # { int mkfifo_extended(user_addr_t path, uid_t uid, gid_t gid, int mode, user_addr_t xsecurity) NO_SYSCALL_STUB; }
288
+ :mkdir_extended: 292 # { int mkdir_extended(user_addr_t path, uid_t uid, gid_t gid, int mode, user_addr_t xsecurity) NO_SYSCALL_STUB; }
289
+ :identitysvc: 293 # { int identitysvc(int opcode, user_addr_t message) NO_SYSCALL_STUB; }
290
+ :shared_region_check_np: 294 # { int shared_region_check_np(uint64_t *start_address) NO_SYSCALL_STUB; }
291
+ :shared_region_map_np: 295 # { int shared_region_map_np(int fd, uint32_t count, const struct shared_file_mapping_np *mappings) NO_SYSCALL_STUB; }
292
+ :vm_pressure_monitor: 296 # { int vm_pressure_monitor(int wait_for_pressure, int nsecs_monitored, uint32_t *pages_reclaimed); }
293
+ :psynch_rw_longrdlock: 297 # { uint32_t psynch_rw_longrdlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
294
+ :psynch_rw_yieldwrlock: 298 # { uint32_t psynch_rw_yieldwrlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
295
+ :psynch_rw_downgrade: 299 # { int psynch_rw_downgrade(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
296
+ :psynch_rw_upgrade: 300 # { uint32_t psynch_rw_upgrade(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
297
+ :psynch_mutexwait: 301 # { uint32_t psynch_mutexwait(user_addr_t mutex, uint32_t mgen, uint32_t ugen, uint64_t tid, uint32_t flags) NO_SYSCALL_STUB; }
298
+ :psynch_mutexdrop: 302 # { uint32_t psynch_mutexdrop(user_addr_t mutex, uint32_t mgen, uint32_t ugen, uint64_t tid, uint32_t flags) NO_SYSCALL_STUB; }
299
+ :psynch_cvbroad: 303 # { int psynch_cvbroad(user_addr_t cv, uint32_t cvgen, uint32_t diffgen, user_addr_t mutex, uint32_t mgen, uint32_t ugen, uint64_t tid, uint32_t flags) NO_SYSCALL_STUB; }
300
+ :psynch_cvsignal: 304 # { int psynch_cvsignal(user_addr_t cv, uint32_t cvgen, uint32_t cvugen, user_addr_t mutex, uint32_t mgen, uint32_t ugen, int thread_port, uint32_t flags) NO_SYSCALL_STUB; }
301
+ :psynch_cvwait: 305 # { uint32_t psynch_cvwait(user_addr_t cv, uint32_t cvgen, uint32_t cvugen, user_addr_t mutex, uint32_t mgen, uint32_t ugen, uint64_t sec, uint64_t usec) NO_SYSCALL_STUB; }
302
+ :psynch_rw_rdlock: 306 # { uint32_t psynch_rw_rdlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
303
+ :psynch_rw_wrlock: 307 # { uint32_t psynch_rw_wrlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
304
+ :psynch_rw_unlock: 308 # { uint32_t psynch_rw_unlock(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
305
+ :psynch_rw_unlock2: 309 # { uint32_t psynch_rw_unlock2(user_addr_t rwlock, uint32_t lgenval, uint32_t ugenval, uint32_t rw_wc, int flags) NO_SYSCALL_STUB; }
306
+ :getsid: 310 # { int getsid(pid_t pid); }
307
+ :settid_with_pid: 311 # { int settid_with_pid(pid_t pid, int assume) NO_SYSCALL_STUB; }
308
+ :old__pthread_cond_timedwait: 312 # { int nosys(void); } { old __pthread_cond_timedwait }
309
+ :aio_fsync: 313 # { int aio_fsync(int op, user_addr_t aiocbp); }
310
+ :aio_return: 314 # { user_ssize_t aio_return(user_addr_t aiocbp); }
311
+ :aio_suspend: 315 # { int aio_suspend(user_addr_t aiocblist, int nent, user_addr_t timeoutp); }
312
+ :aio_cancel: 316 # { int aio_cancel(int fd, user_addr_t aiocbp); }
313
+ :aio_error: 317 # { int aio_error(user_addr_t aiocbp); }
314
+ :aio_read: 318 # { int aio_read(user_addr_t aiocbp); }
315
+ :aio_write: 319 # { int aio_write(user_addr_t aiocbp); }
316
+ :lio_listio: 320 # { int lio_listio(int mode, user_addr_t aiocblist, int nent, user_addr_t sigp); }
317
+ :old__pthread_cond_wait: 321 # { int nosys(void); } { old __pthread_cond_wait }
318
+ iopolicysys: 322 # { int iopolicysys(int cmd, void *arg) NO_SYSCALL_STUB; }
319
+ :mlockall: 324 # { int mlockall(int how); }
320
+ :munlockall: 325 # { int munlockall(int how); }
321
+ :issetugid: 327 # { int issetugid(void); }
322
+ :__pthread_kill: 328 # { int __pthread_kill(int thread_port, int sig); }
323
+ :__pthread_sigmask: 329 # { int __pthread_sigmask(int how, user_addr_t set, user_addr_t oset); }
324
+ :__sigwait: 330 # { int __sigwait(user_addr_t set, user_addr_t sig); }
325
+ :__disable_threadsignal: 331 # { int __disable_threadsignal(int value); }
326
+ :__pthread_markcancel: 332 # { int __pthread_markcancel(int thread_port); }
327
+ :__pthread_canceled: 333 # { int __pthread_canceled(int action); }
328
+ :__semwait_signal: 334 # { int __semwait_signal(int cond_sem, int mutex_sem, int timeout, int relative, int64_t tv_sec, int32_t tv_nsec); }
329
+ :old_utrace: 335 # { int nosys(void); } { old utrace }
330
+ :proc_info: 336 # { int proc_info(int32_t callnum,int32_t pid,uint32_t flavor, uint64_t arg,user_addr_t buffer,int32_t buffersize) NO_SYSCALL_STUB; }
331
+ :sendfile: 337 # { int sendfile(int fd, int s, off_t offset, off_t *nbytes, struct sf_hdtr *hdtr, int flags); }
332
+ :stat64: 338 # { int stat64(user_addr_t path, user_addr_t ub); }
333
+ :fstat64: 339 # { int fstat64(int fd, user_addr_t ub); }
334
+ :lstat64: 340 # { int lstat64(user_addr_t path, user_addr_t ub); }
335
+ :stat64_extended: 341 # { int stat64_extended(user_addr_t path, user_addr_t ub, user_addr_t xsecurity, user_addr_t xsecurity_size) NO_SYSCALL_STUB; }
336
+ :lstat64_extended: 342 # { int lstat64_extended(user_addr_t path, user_addr_t ub, user_addr_t xsecurity, user_addr_t xsecurity_size) NO_SYSCALL_STUB; }
337
+ :fstat64_extended: 343 # { int fstat64_extended(int fd, user_addr_t ub, user_addr_t xsecurity, user_addr_t xsecurity_size) NO_SYSCALL_STUB; }
338
+ :getdirentries64: 344 # { user_ssize_t getdirentries64(int fd, void *buf, user_size_t bufsize, off_t *position) NO_SYSCALL_STUB; }
339
+ :statfs64: 345 # { int statfs64(char *path, struct statfs64 *buf); }
340
+ :fstatfs64: 346 # { int fstatfs64(int fd, struct statfs64 *buf); }
341
+ :getfsstat64: 347 # { int getfsstat64(user_addr_t buf, int bufsize, int flags); }
342
+ :__pthread_chdir: 348 # { int __pthread_chdir(user_addr_t path); }
343
+ :__pthread_fchdir: 349 # { int __pthread_fchdir(int fd); }
344
+ :audit: 350 # { int audit(void *record, int length); }
345
+ :auditon: 351 # { int auditon(int cmd, void *data, int length); }
346
+ :getauid: 353 # { int getauid(au_id_t *auid); }
347
+ :setauid: 354 # { int setauid(au_id_t *auid); }
348
+ :getaudit: 355 # { int getaudit(struct auditinfo *auditinfo); }
349
+ :setaudit: 356 # { int setaudit(struct auditinfo *auditinfo); }
350
+ :getaudit_addr: 357 # { int getaudit_addr(struct auditinfo_addr *auditinfo_addr, int length); }
351
+ :setaudit_addr: 358 # { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, int length); }
352
+ :auditctl: 359 # { int auditctl(char *path); }
353
+ :bsdthread_create: 360 # { user_addr_t bsdthread_create(user_addr_t func, user_addr_t func_arg, user_addr_t stack, user_addr_t pthread, uint32_t flags) NO_SYSCALL_STUB; }
354
+ :bsdthread_terminate: 361 # { int bsdthread_terminate(user_addr_t stackaddr, size_t freesize, uint32_t port, uint32_t sem) NO_SYSCALL_STUB; }
355
+ :kqueue: 362 # { int kqueue(void); }
356
+ :kevent: 363 # { int kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
357
+ :lchown: 364 # { int lchown(user_addr_t path, uid_t owner, gid_t group); }
358
+ :stack_snapshot: 365 # { int stack_snapshot(pid_t pid, user_addr_t tracebuf, uint32_t tracebuf_size, uint32_t options) NO_SYSCALL_STUB; }
359
+ :bsdthread_register: 366 # { int bsdthread_register(user_addr_t threadstart, user_addr_t wqthread, int pthsize,user_addr_t dummy_value, user_addr_t targetconc_ptr, uint64_t dispatchqueue_offset) NO_SYSCALL_STUB; }
360
+ :workq_open: 367 # { int workq_open(void) NO_SYSCALL_STUB; }
361
+ :workq_kernreturn: 368 # { int workq_kernreturn(int options, user_addr_t item, int affinity, int prio) NO_SYSCALL_STUB; }
362
+ :kevent64: 369 # { int kevent64(int fd, const struct kevent64_s *changelist, int nchanges, struct kevent64_s *eventlist, int nevents, unsigned int flags, const struct timespec *timeout); }
363
+ :old__semwait_signal: 370 # { int nosys(void); } { old __semwait_signal }
364
+ :old_semwait_signal: 371 # { int nosys(void); } { old __semwait_signal }
365
+ :thread_selfid: 372 # { user_addr_t thread_selfid (void) NO_SYSCALL_STUB; }
366
+ :__mac_execve: 380 # { int __mac_execve(char *fname, char **argp, char **envp, struct mac *mac_p); }
367
+ :__mac_syscall: 381 # { int __mac_syscall(char *policy, int call, user_addr_t arg); }
368
+ :__mac_get_file: 382 # { int __mac_get_file(char *path_p, struct mac *mac_p); }
369
+ :__mac_set_file: 383 # { int __mac_set_file(char *path_p, struct mac *mac_p); }
370
+ :__mac_get_link: 384 # { int __mac_get_link(char *path_p, struct mac *mac_p); }
371
+ :__mac_set_link: 385 # { int __mac_set_link(char *path_p, struct mac *mac_p); }
372
+ :__mac_get_proc: 386 # { int __mac_get_proc(struct mac *mac_p); }
373
+ :__mac_set_proc: 387 # { int __mac_set_proc(struct mac *mac_p); }
374
+ :__mac_get_fd: 388 # { int __mac_get_fd(int fd, struct mac *mac_p); }
375
+ :__mac_set_fd: 389 # { int __mac_set_fd(int fd, struct mac *mac_p); }
376
+ :__mac_get_pid: 390 # { int __mac_get_pid(pid_t pid, struct mac *mac_p); }
377
+ :__mac_get_lcid: 391 # { int __mac_get_lcid(pid_t lcid, struct mac *mac_p); }
378
+ :__mac_get_lctx: 392 # { int __mac_get_lctx(struct mac *mac_p); }
379
+ :__mac_set_lctx: 393 # { int __mac_set_lctx(struct mac *mac_p); }
380
+ :setlcid: 394 # { int setlcid(pid_t pid, pid_t lcid) NO_SYSCALL_STUB; }
381
+ :getlcid: 395 # { int getlcid(pid_t pid) NO_SYSCALL_STUB; }
382
+ :read_nocancel: 396 # { user_ssize_t read_nocancel(int fd, user_addr_t cbuf, user_size_t nbyte) NO_SYSCALL_STUB; }
383
+ :write_nocancel: 397 # { user_ssize_t write_nocancel(int fd, user_addr_t cbuf, user_size_t nbyte) NO_SYSCALL_STUB; }
384
+ :open_nocancel: 398 # { int open_nocancel(user_addr_t path, int flags, int mode) NO_SYSCALL_STUB; }
385
+ :close_nocancel: 399 # { int close_nocancel(int fd) NO_SYSCALL_STUB; }
386
+ :wait4_nocancel: 400 # { int wait4_nocancel(int pid, user_addr_t status, int options, user_addr_t rusage) NO_SYSCALL_STUB; }
387
+ :recvmsg_nocancel: 401 # { int recvmsg_nocancel(int s, struct msghdr *msg, int flags) NO_SYSCALL_STUB; }
388
+ :sendmsg_nocancel: 402 # { int sendmsg_nocancel(int s, caddr_t msg, int flags) NO_SYSCALL_STUB; }
389
+ :recvfrom_nocancel: 403 # { int recvfrom_nocancel(int s, void *buf, size_t len, int flags, struct sockaddr *from, int *fromlenaddr) NO_SYSCALL_STUB; }
390
+ :accept_nocancel: 404 # { int accept_nocancel(int s, caddr_t name, socklen_t
391
+ :msync_nocancel: 405 # { int msync_nocancel(caddr_t addr, size_t len, int flags) NO_SYSCALL_STUB; }
392
+ :fcntl_nocancel: 406 # { int fcntl_nocancel(int fd, int cmd, long arg) NO_SYSCALL_STUB; }
393
+ :select_nocancel: 407 # { int select_nocancel(int nd, u_int32_t *in, u_int32_t *ou, u_int32_t *ex, struct timeval *tv) NO_SYSCALL_STUB; }
394
+ :fsync_nocancel: 408 # { int fsync_nocancel(int fd) NO_SYSCALL_STUB; }
395
+ :connect_nocancel: 409 # { int connect_nocancel(int s, caddr_t name, socklen_t namelen) NO_SYSCALL_STUB; }
396
+ :sigsuspend_nocancel: 410 # { int sigsuspend_nocancel(sigset_t mask) NO_SYSCALL_STUB; }
397
+ :readv_nocancel: 411 # { user_ssize_t readv_nocancel(int fd, struct iovec *iovp, u_int iovcnt) NO_SYSCALL_STUB; }
398
+ :writev_nocancel: 412 # { user_ssize_t writev_nocancel(int fd, struct iovec *iovp, u_int iovcnt) NO_SYSCALL_STUB; }
399
+ :sendto_nocancel: 413 # { int sendto_nocancel(int s, caddr_t buf, size_t len, int flags, caddr_t to, socklen_t tolen) NO_SYSCALL_STUB; }
400
+ :pread_nocancel: 414 # { user_ssize_t pread_nocancel(int fd, user_addr_t buf, user_size_t nbyte, off_t offset) NO_SYSCALL_STUB; }
401
+ :pwrite_nocancel: 415 # { user_ssize_t pwrite_nocancel(int fd, user_addr_t buf, user_size_t nbyte, off_t offset) NO_SYSCALL_STUB; }
402
+ :waitid_nocancel: 416 # { int waitid_nocancel(idtype_t idtype, id_t id, siginfo_t *infop, int options) NO_SYSCALL_STUB; }
403
+ :poll_nocancel: 417 # { int poll_nocancel(struct pollfd *fds, u_int nfds, int timeout) NO_SYSCALL_STUB; }
404
+ :msgsnd_nocancel: 418 # { int msgsnd_nocancel(int msqid, void *msgp, size_t msgsz, int msgflg) NO_SYSCALL_STUB; }
405
+ :msgrcv_nocancel: 419 # { user_ssize_t msgrcv_nocancel(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg) NO_SYSCALL_STUB; }
406
+ :sem_wait_nocancel: 420 # { int sem_wait_nocancel(sem_t *sem) NO_SYSCALL_STUB; }
407
+ :aio_suspend_nocancel: 421 # { int aio_suspend_nocancel(user_addr_t aiocblist, int nent, user_addr_t timeoutp) NO_SYSCALL_STUB; }
408
+ :__sigwait_nocancel: 422 # { int __sigwait_nocancel(user_addr_t set, user_addr_t sig) NO_SYSCALL_STUB; }
409
+ :__semwait_signal_nocancel: 423 # { int __semwait_signal_nocancel(int cond_sem, int mutex_sem, int timeout, int relative, int64_t tv_sec, int32_t tv_nsec) NO_SYSCALL_STUB;}
410
+ :__mac_mount: 424 # { int __mac_mount(char *type, char *path, int flags, caddr_t data, struct mac *mac_p); }
411
+ :__mac_get_mount: 425 # { int __mac_get_mount(char *path, struct mac *mac_p); }
412
+ :__mac_getfsstat: 426 # { int __mac_getfsstat(user_addr_t buf, int bufsize, user_addr_t mac, int macsize, int flags); }
413
+ :fsgetpath: 427 # { user_ssize_t fsgetpath(user_addr_t buf, size_t bufsize, user_addr_t fsid, uint64_t objid) NO_SYSCALL_STUB; } { private fsgetpath (File Manager SPI) }
414
+ :audit_session_self: 428 # { mach_port_name_t audit_session_self(void); }
415
+ :audit_session_join: 429 # { int audit_session_join(mach_port_name_t port); }