1 //===-- sanitizer_syscalls_netbsd.inc ---------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // Common syscalls handlers for tools like AddressSanitizer,
9 // ThreadSanitizer, MemorySanitizer, etc.
11 // This file should be included into the tool's interceptor file,
12 // which has to define it's own macros:
13 // COMMON_SYSCALL_PRE_READ_RANGE
14 // Called in prehook for regions that will be read by the kernel and
15 // must be initialized.
16 // COMMON_SYSCALL_PRE_WRITE_RANGE
17 // Called in prehook for regions that will be written to by the kernel
18 // and must be addressable. The actual write range may be smaller than
19 // reported in the prehook. See POST_WRITE_RANGE.
20 // COMMON_SYSCALL_POST_READ_RANGE
21 // Called in posthook for regions that were read by the kernel. Does
22 // not make much sense.
23 // COMMON_SYSCALL_POST_WRITE_RANGE
24 // Called in posthook for regions that were written to by the kernel
25 // and are now initialized.
26 // COMMON_SYSCALL_ACQUIRE(addr)
27 // Acquire memory visibility from addr.
28 // COMMON_SYSCALL_RELEASE(addr)
29 // Release memory visibility to addr.
30 // COMMON_SYSCALL_FD_CLOSE(fd)
31 // Called before closing file descriptor fd.
32 // COMMON_SYSCALL_FD_ACQUIRE(fd)
33 // Acquire memory visibility from fd.
34 // COMMON_SYSCALL_FD_RELEASE(fd)
35 // Release memory visibility to fd.
36 // COMMON_SYSCALL_PRE_FORK()
37 // Called before fork syscall.
38 // COMMON_SYSCALL_POST_FORK(long long res)
39 // Called after fork syscall.
41 // DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
43 // Generated with: generate_netbsd_syscalls.awk
44 // Generated date: 2018-03-03
45 // Generated from: syscalls.master,v 1.291 2018/01/06 16:41:23 kamil Exp
47 //===----------------------------------------------------------------------===//
49 #include "sanitizer_platform.h"
52 #include "sanitizer_libc.h"
54 #define PRE_SYSCALL(name) \
55 SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_pre_impl_##name
56 #define PRE_READ(p, s) COMMON_SYSCALL_PRE_READ_RANGE(p, s)
57 #define PRE_WRITE(p, s) COMMON_SYSCALL_PRE_WRITE_RANGE(p, s)
59 #define POST_SYSCALL(name) \
60 SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_post_impl_##name
61 #define POST_READ(p, s) COMMON_SYSCALL_POST_READ_RANGE(p, s)
62 #define POST_WRITE(p, s) COMMON_SYSCALL_POST_WRITE_RANGE(p, s)
64 #ifndef COMMON_SYSCALL_ACQUIRE
65 #define COMMON_SYSCALL_ACQUIRE(addr) ((void)(addr))
68 #ifndef COMMON_SYSCALL_RELEASE
69 #define COMMON_SYSCALL_RELEASE(addr) ((void)(addr))
72 #ifndef COMMON_SYSCALL_FD_CLOSE
73 #define COMMON_SYSCALL_FD_CLOSE(fd) ((void)(fd))
76 #ifndef COMMON_SYSCALL_FD_ACQUIRE
77 #define COMMON_SYSCALL_FD_ACQUIRE(fd) ((void)(fd))
80 #ifndef COMMON_SYSCALL_FD_RELEASE
81 #define COMMON_SYSCALL_FD_RELEASE(fd) ((void)(fd))
84 #ifndef COMMON_SYSCALL_PRE_FORK
85 #define COMMON_SYSCALL_PRE_FORK() \
89 #ifndef COMMON_SYSCALL_POST_FORK
90 #define COMMON_SYSCALL_POST_FORK(res) \
94 // FIXME: do some kind of PRE_READ for all syscall arguments (int(s) and such).
97 #define SYS_MAXSYSARGS 8
98 PRE_SYSCALL(syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
101 POST_SYSCALL(syscall)
102 (long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
105 PRE_SYSCALL(exit)(long long rval_) { /* Nothing to do */ }
106 POST_SYSCALL(exit)(long long res, long long rval_) { /* Nothing to do */ }
107 PRE_SYSCALL(fork)(void) { COMMON_SYSCALL_PRE_FORK(); }
108 POST_SYSCALL(fork)(long long res) { COMMON_SYSCALL_POST_FORK(res); }
109 PRE_SYSCALL(read)(long long fd_, void *buf_, long long nbyte_) {
111 PRE_WRITE(buf_, nbyte_);
114 POST_SYSCALL(read)(long long res, long long fd_, void *buf_, long long nbyte_) {
116 POST_WRITE(buf_, res);
119 PRE_SYSCALL(write)(long long fd_, void *buf_, long long nbyte_) {
121 PRE_READ(buf_, nbyte_);
125 (long long res, long long fd_, void *buf_, long long nbyte_) {
127 POST_READ(buf_, res);
130 PRE_SYSCALL(open)(void *path_, long long flags_, long long mode_) {
131 const char *path = (const char *)path_;
133 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
137 (long long res, void *path_, long long flags_, long long mode_) {
139 const char *path = (const char *)path_;
141 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
145 PRE_SYSCALL(close)(long long fd_) { COMMON_SYSCALL_FD_CLOSE((int)fd_); }
146 POST_SYSCALL(close)(long long res, long long fd_) { /* Nothing to do */ }
147 PRE_SYSCALL(compat_50_wait4)
148 (long long pid_, void *status_, long long options_, void *rusage_) {
151 POST_SYSCALL(compat_50_wait4)
152 (long long res, long long pid_, void *status_, long long options_,
156 PRE_SYSCALL(compat_43_ocreat)(void *path_, long long mode_) { /* TODO */ }
157 POST_SYSCALL(compat_43_ocreat)(long long res, void *path_, long long mode_) {
160 PRE_SYSCALL(link)(void *path_, void *link_) {
161 const char *path = (const char *)path_;
162 const char *link = (const char *)link_;
164 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
167 PRE_READ(path, __sanitizer::internal_strlen(link) + 1);
170 POST_SYSCALL(link)(long long res, void *path_, void *link_) {
172 const char *path = (const char *)path_;
173 const char *link = (const char *)link_;
175 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
178 POST_READ(path, __sanitizer::internal_strlen(link) + 1);
182 PRE_SYSCALL(unlink)(void *path_) {
183 const char *path = (const char *)path_;
185 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
188 POST_SYSCALL(unlink)(long long res, void *path_) {
190 const char *path = (const char *)path_;
192 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
196 /* syscall 11 has been skipped */
197 PRE_SYSCALL(chdir)(void *path_) {
198 const char *path = (const char *)path_;
200 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
203 POST_SYSCALL(chdir)(long long res, void *path_) {
205 const char *path = (const char *)path_;
207 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
211 PRE_SYSCALL(fchdir)(long long fd_) { /* Nothing to do */ }
212 POST_SYSCALL(fchdir)(long long res, long long fd_) { /* Nothing to do */ }
213 PRE_SYSCALL(compat_50_mknod)(void *path_, long long mode_, long long dev_) {
216 POST_SYSCALL(compat_50_mknod)
217 (long long res, void *path_, long long mode_, long long dev_) {
220 PRE_SYSCALL(chmod)(void *path_, long long mode_) {
221 const char *path = (const char *)path_;
223 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
226 POST_SYSCALL(chmod)(long long res, void *path_, long long mode_) {
228 const char *path = (const char *)path_;
230 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
234 PRE_SYSCALL(chown)(void *path_, long long uid_, long long gid_) {
235 const char *path = (const char *)path_;
237 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
241 (long long res, void *path_, long long uid_, long long gid_) {
243 const char *path = (const char *)path_;
245 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
249 PRE_SYSCALL(break)(void *nsize_) { /* Nothing to do */ }
250 POST_SYSCALL(break)(long long res, void *nsize_) { /* Nothing to do */ }
251 PRE_SYSCALL(compat_20_getfsstat)
252 (void *buf_, long long bufsize_, long long flags_) {
255 POST_SYSCALL(compat_20_getfsstat)
256 (long long res, void *buf_, long long bufsize_, long long flags_) {
259 PRE_SYSCALL(compat_43_olseek)
260 (long long fd_, long long offset_, long long whence_) {
263 POST_SYSCALL(compat_43_olseek)
264 (long long res, long long fd_, long long offset_, long long whence_) {
267 PRE_SYSCALL(getpid)(void) { /* Nothing to do */ }
268 POST_SYSCALL(getpid)(long long res) { /* Nothing to do */ }
269 PRE_SYSCALL(compat_40_mount)
270 (void *type_, void *path_, long long flags_, void *data_) {
273 POST_SYSCALL(compat_40_mount)
274 (long long res, void *type_, void *path_, long long flags_, void *data_) {
277 PRE_SYSCALL(unmount)(void *path_, long long flags_) {
278 const char *path = (const char *)path_;
280 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
283 POST_SYSCALL(unmount)(long long res, void *path_, long long flags_) {
285 const char *path = (const char *)path_;
287 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
291 PRE_SYSCALL(setuid)(long long uid_) { /* Nothing to do */ }
292 POST_SYSCALL(setuid)(long long res, long long uid_) { /* Nothing to do */ }
293 PRE_SYSCALL(getuid)(void) { /* Nothing to do */ }
294 POST_SYSCALL(getuid)(long long res) { /* Nothing to do */ }
295 PRE_SYSCALL(geteuid)(void) { /* Nothing to do */ }
296 POST_SYSCALL(geteuid)(long long res) { /* Nothing to do */ }
298 (long long req_, long long pid_, void *addr_, long long data_) {
299 if (req_ == ptrace_pt_io) {
300 struct __sanitizer_ptrace_io_desc *addr =
301 (struct __sanitizer_ptrace_io_desc *)addr_;
302 PRE_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
303 if (addr->piod_op == ptrace_piod_write_d ||
304 addr->piod_op == ptrace_piod_write_i) {
305 PRE_READ(addr->piod_addr, addr->piod_len);
307 if (addr->piod_op == ptrace_piod_read_d ||
308 addr->piod_op == ptrace_piod_read_i ||
309 addr->piod_op == ptrace_piod_read_auxv) {
310 PRE_WRITE(addr->piod_addr, addr->piod_len);
312 } else if (req_ == ptrace_pt_lwpinfo) {
313 struct __sanitizer_ptrace_lwpinfo *addr =
314 (struct __sanitizer_ptrace_lwpinfo *)addr_;
315 PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
316 PRE_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
317 } else if (req_ == ptrace_pt_set_event_mask) {
318 PRE_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
319 } else if (req_ == ptrace_pt_get_event_mask) {
320 PRE_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
321 } else if (req_ == ptrace_pt_set_siginfo) {
322 PRE_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
323 } else if (req_ == ptrace_pt_get_siginfo) {
324 PRE_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
325 } else if (req_ == ptrace_pt_setregs) {
326 PRE_READ(addr_, struct_ptrace_reg_struct_sz);
327 } else if (req_ == ptrace_pt_getregs) {
328 PRE_WRITE(addr_, struct_ptrace_reg_struct_sz);
329 } else if (req_ == ptrace_pt_setfpregs) {
330 PRE_READ(addr_, struct_ptrace_fpreg_struct_sz);
331 } else if (req_ == ptrace_pt_getfpregs) {
332 PRE_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
333 } else if (req_ == ptrace_pt_setdbregs) {
334 PRE_READ(addr_, struct_ptrace_dbreg_struct_sz);
335 } else if (req_ == ptrace_pt_getdbregs) {
336 PRE_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
340 (long long res, long long req_, long long pid_, void *addr_, long long data_) {
342 if (req_ == ptrace_pt_io) {
343 struct __sanitizer_ptrace_io_desc *addr =
344 (struct __sanitizer_ptrace_io_desc *)addr_;
345 POST_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
346 if (addr->piod_op == ptrace_piod_write_d ||
347 addr->piod_op == ptrace_piod_write_i) {
348 POST_READ(addr->piod_addr, addr->piod_len);
350 if (addr->piod_op == ptrace_piod_read_d ||
351 addr->piod_op == ptrace_piod_read_i ||
352 addr->piod_op == ptrace_piod_read_auxv) {
353 POST_WRITE(addr->piod_addr, addr->piod_len);
355 } else if (req_ == ptrace_pt_lwpinfo) {
356 struct __sanitizer_ptrace_lwpinfo *addr =
357 (struct __sanitizer_ptrace_lwpinfo *)addr_;
358 POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
359 POST_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
360 } else if (req_ == ptrace_pt_set_event_mask) {
361 POST_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
362 } else if (req_ == ptrace_pt_get_event_mask) {
363 POST_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
364 } else if (req_ == ptrace_pt_set_siginfo) {
365 POST_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
366 } else if (req_ == ptrace_pt_get_siginfo) {
367 POST_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
368 } else if (req_ == ptrace_pt_setregs) {
369 POST_READ(addr_, struct_ptrace_reg_struct_sz);
370 } else if (req_ == ptrace_pt_getregs) {
371 POST_WRITE(addr_, struct_ptrace_reg_struct_sz);
372 } else if (req_ == ptrace_pt_setfpregs) {
373 POST_READ(addr_, struct_ptrace_fpreg_struct_sz);
374 } else if (req_ == ptrace_pt_getfpregs) {
375 POST_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
376 } else if (req_ == ptrace_pt_setdbregs) {
377 POST_READ(addr_, struct_ptrace_dbreg_struct_sz);
378 } else if (req_ == ptrace_pt_getdbregs) {
379 POST_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
383 PRE_SYSCALL(recvmsg)(long long s_, void *msg_, long long flags_) {
384 PRE_WRITE(msg_, sizeof(__sanitizer_msghdr));
386 POST_SYSCALL(recvmsg)
387 (long long res, long long s_, void *msg_, long long flags_) {
389 POST_WRITE(msg_, sizeof(__sanitizer_msghdr));
392 PRE_SYSCALL(sendmsg)(long long s_, void *msg_, long long flags_) {
393 PRE_READ(msg_, sizeof(__sanitizer_msghdr));
395 POST_SYSCALL(sendmsg)
396 (long long res, long long s_, void *msg_, long long flags_) {
398 POST_READ(msg_, sizeof(__sanitizer_msghdr));
401 PRE_SYSCALL(recvfrom)
402 (long long s_, void *buf_, long long len_, long long flags_, void *from_,
403 void *fromlenaddr_) {
404 PRE_WRITE(buf_, len_);
405 PRE_WRITE(from_, struct_sockaddr_sz);
406 PRE_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
408 POST_SYSCALL(recvfrom)
409 (long long res, long long s_, void *buf_, long long len_, long long flags_,
410 void *from_, void *fromlenaddr_) {
412 POST_WRITE(buf_, res);
413 POST_WRITE(from_, struct_sockaddr_sz);
414 POST_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
417 PRE_SYSCALL(accept)(long long s_, void *name_, void *anamelen_) {
418 PRE_WRITE(name_, struct_sockaddr_sz);
419 PRE_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
422 (long long res, long long s_, void *name_, void *anamelen_) {
424 POST_WRITE(name_, struct_sockaddr_sz);
425 POST_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
428 PRE_SYSCALL(getpeername)(long long fdes_, void *asa_, void *alen_) {
429 PRE_WRITE(asa_, struct_sockaddr_sz);
430 PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
432 POST_SYSCALL(getpeername)
433 (long long res, long long fdes_, void *asa_, void *alen_) {
435 POST_WRITE(asa_, struct_sockaddr_sz);
436 POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
439 PRE_SYSCALL(getsockname)(long long fdes_, void *asa_, void *alen_) {
440 PRE_WRITE(asa_, struct_sockaddr_sz);
441 PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
443 POST_SYSCALL(getsockname)
444 (long long res, long long fdes_, void *asa_, void *alen_) {
446 POST_WRITE(asa_, struct_sockaddr_sz);
447 POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
450 PRE_SYSCALL(access)(void *path_, long long flags_) {
451 const char *path = (const char *)path_;
453 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
456 POST_SYSCALL(access)(long long res, void *path_, long long flags_) {
458 const char *path = (const char *)path_;
460 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
464 PRE_SYSCALL(chflags)(void *path_, long long flags_) {
465 const char *path = (const char *)path_;
467 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
470 POST_SYSCALL(chflags)(long long res, void *path_, long long flags_) {
472 const char *path = (const char *)path_;
474 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
478 PRE_SYSCALL(fchflags)(long long fd_, long long flags_) { /* Nothing to do */ }
479 POST_SYSCALL(fchflags)(long long res, long long fd_, long long flags_) {
482 PRE_SYSCALL(sync)(void) { /* Nothing to do */ }
483 POST_SYSCALL(sync)(long long res) { /* Nothing to do */ }
484 PRE_SYSCALL(kill)(long long pid_, long long signum_) { /* Nothing to do */ }
485 POST_SYSCALL(kill)(long long res, long long pid_, long long signum_) {
488 PRE_SYSCALL(compat_43_stat43)(void *path_, void *ub_) { /* TODO */ }
489 POST_SYSCALL(compat_43_stat43)(long long res, void *path_, void *ub_) {
492 PRE_SYSCALL(getppid)(void) { /* Nothing to do */ }
493 POST_SYSCALL(getppid)(long long res) { /* Nothing to do */ }
494 PRE_SYSCALL(compat_43_lstat43)(void *path_, void *ub_) { /* TODO */ }
495 POST_SYSCALL(compat_43_lstat43)(long long res, void *path_, void *ub_) {
498 PRE_SYSCALL(dup)(long long fd_) { /* Nothing to do */ }
499 POST_SYSCALL(dup)(long long res, long long fd_) { /* Nothing to do */ }
500 PRE_SYSCALL(pipe)(void) {
501 /* pipe returns two descriptors through two returned values */
503 POST_SYSCALL(pipe)(long long res) {
504 /* pipe returns two descriptors through two returned values */
506 PRE_SYSCALL(getegid)(void) { /* Nothing to do */ }
507 POST_SYSCALL(getegid)(long long res) { /* Nothing to do */ }
509 (void *samples_, long long size_, long long offset_, long long scale_) {
511 PRE_WRITE(samples_, size_);
515 (long long res, void *samples_, long long size_, long long offset_,
519 POST_WRITE(samples_, size_);
524 (void *fname_, long long ops_, long long facs_, long long pid_) {
525 const char *fname = (const char *)fname_;
527 PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
531 (long long res, void *fname_, long long ops_, long long facs_, long long pid_) {
532 const char *fname = (const char *)fname_;
535 POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
539 PRE_SYSCALL(compat_13_sigaction13)(long long signum_, void *nsa_, void *osa_) {
542 POST_SYSCALL(compat_13_sigaction13)
543 (long long res, long long signum_, void *nsa_, void *osa_) {
546 PRE_SYSCALL(getgid)(void) { /* Nothing to do */ }
547 POST_SYSCALL(getgid)(long long res) { /* Nothing to do */ }
548 PRE_SYSCALL(compat_13_sigprocmask13)(long long how_, long long mask_) {
551 POST_SYSCALL(compat_13_sigprocmask13)
552 (long long res, long long how_, long long mask_) {
555 PRE_SYSCALL(__getlogin)(void *namebuf_, long long namelen_) {
557 PRE_WRITE(namebuf_, namelen_);
560 POST_SYSCALL(__getlogin)(long long res, void *namebuf_, long long namelen_) {
563 POST_WRITE(namebuf_, namelen_);
567 PRE_SYSCALL(__setlogin)(void *namebuf_) {
568 const char *namebuf = (const char *)namebuf_;
570 PRE_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
573 POST_SYSCALL(__setlogin)(long long res, void *namebuf_) {
575 const char *namebuf = (const char *)namebuf_;
577 POST_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
581 PRE_SYSCALL(acct)(void *path_) {
582 const char *path = (const char *)path_;
584 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
587 POST_SYSCALL(acct)(long long res, void *path_) {
589 const char *path = (const char *)path_;
591 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
595 PRE_SYSCALL(compat_13_sigpending13)(void) { /* TODO */ }
596 POST_SYSCALL(compat_13_sigpending13)(long long res) { /* TODO */ }
597 PRE_SYSCALL(compat_13_sigaltstack13)(void *nss_, void *oss_) { /* TODO */ }
598 POST_SYSCALL(compat_13_sigaltstack13)(long long res, void *nss_, void *oss_) {
601 PRE_SYSCALL(ioctl)(long long fd_, long long com_, void *data_) {
604 POST_SYSCALL(ioctl)(long long res, long long fd_, long long com_, void *data_) {
607 PRE_SYSCALL(compat_12_oreboot)(long long opt_) { /* TODO */ }
608 POST_SYSCALL(compat_12_oreboot)(long long res, long long opt_) { /* TODO */ }
609 PRE_SYSCALL(revoke)(void *path_) {
610 const char *path = (const char *)path_;
612 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
615 POST_SYSCALL(revoke)(long long res, void *path_) {
617 const char *path = (const char *)path_;
619 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
623 PRE_SYSCALL(symlink)(void *path_, void *link_) {
624 const char *path = (const char *)path_;
625 const char *link = (const char *)link_;
627 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
630 PRE_READ(link, __sanitizer::internal_strlen(link) + 1);
633 POST_SYSCALL(symlink)(long long res, void *path_, void *link_) {
635 const char *path = (const char *)path_;
636 const char *link = (const char *)link_;
638 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
641 POST_READ(link, __sanitizer::internal_strlen(link) + 1);
645 PRE_SYSCALL(readlink)(void *path_, void *buf_, long long count_) {
646 const char *path = (const char *)path_;
648 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
651 PRE_WRITE(buf_, count_);
654 POST_SYSCALL(readlink)
655 (long long res, void *path_, void *buf_, long long count_) {
657 const char *path = (const char *)path_;
659 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
662 PRE_WRITE(buf_, res);
666 PRE_SYSCALL(execve)(void *path_, void *argp_, void *envp_) {
667 const char *path = (const char *)path_;
668 char **argp = (char **)argp_;
669 char **envp = (char **)envp_;
671 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
673 if (argp && argp[0]) {
676 PRE_READ(a, __sanitizer::internal_strlen(a) + 1);
679 if (envp && envp[0]) {
682 PRE_READ(e, __sanitizer::internal_strlen(e) + 1);
686 POST_SYSCALL(execve)(long long res, void *path_, void *argp_, void *envp_) {
687 /* If we are here, something went wrong */
688 const char *path = (const char *)path_;
689 char **argp = (char **)argp_;
690 char **envp = (char **)envp_;
692 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
694 if (argp && argp[0]) {
697 POST_READ(a, __sanitizer::internal_strlen(a) + 1);
700 if (envp && envp[0]) {
703 POST_READ(e, __sanitizer::internal_strlen(e) + 1);
707 PRE_SYSCALL(umask)(long long newmask_) { /* Nothing to do */ }
708 POST_SYSCALL(umask)(long long res, long long newmask_) { /* Nothing to do */ }
709 PRE_SYSCALL(chroot)(void *path_) {
710 const char *path = (const char *)path_;
712 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
715 POST_SYSCALL(chroot)(long long res, void *path_) {
717 const char *path = (const char *)path_;
719 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
723 PRE_SYSCALL(compat_43_fstat43)(long long fd_, void *sb_) { /* TODO */ }
724 POST_SYSCALL(compat_43_fstat43)(long long res, long long fd_, void *sb_) {
727 PRE_SYSCALL(compat_43_ogetkerninfo)
728 (long long op_, void *where_, void *size_, long long arg_) {
731 POST_SYSCALL(compat_43_ogetkerninfo)
732 (long long res, long long op_, void *where_, void *size_, long long arg_) {
735 PRE_SYSCALL(compat_43_ogetpagesize)(void) { /* TODO */ }
736 POST_SYSCALL(compat_43_ogetpagesize)(long long res) { /* TODO */ }
737 PRE_SYSCALL(compat_12_msync)(void *addr_, long long len_) { /* TODO */ }
738 POST_SYSCALL(compat_12_msync)(long long res, void *addr_, long long len_) {
741 PRE_SYSCALL(vfork)(void) { /* Nothing to do */ }
742 POST_SYSCALL(vfork)(long long res) { /* Nothing to do */ }
743 /* syscall 67 has been skipped */
744 /* syscall 68 has been skipped */
745 /* syscall 69 has been skipped */
746 /* syscall 70 has been skipped */
747 PRE_SYSCALL(compat_43_ommap)
748 (void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
752 POST_SYSCALL(compat_43_ommap)
753 (long long res, void *addr_, long long len_, long long prot_, long long flags_,
754 long long fd_, long long pos_) {
757 PRE_SYSCALL(vadvise)(long long anom_) { /* Nothing to do */ }
758 POST_SYSCALL(vadvise)(long long res, long long anom_) { /* Nothing to do */ }
759 PRE_SYSCALL(munmap)(void *addr_, long long len_) { /* Nothing to do */ }
760 POST_SYSCALL(munmap)(long long res, void *addr_, long long len_) {
763 PRE_SYSCALL(mprotect)(void *addr_, long long len_, long long prot_) {
766 POST_SYSCALL(mprotect)
767 (long long res, void *addr_, long long len_, long long prot_) {
770 PRE_SYSCALL(madvise)(void *addr_, long long len_, long long behav_) {
773 POST_SYSCALL(madvise)
774 (long long res, void *addr_, long long len_, long long behav_) {
777 /* syscall 76 has been skipped */
778 /* syscall 77 has been skipped */
779 PRE_SYSCALL(mincore)(void *addr_, long long len_, void *vec_) {
782 POST_SYSCALL(mincore)(long long res, void *addr_, long long len_, void *vec_) {
785 PRE_SYSCALL(getgroups)(long long gidsetsize_, void *gidset_) {
786 unsigned int *gidset = (unsigned int *)gidset_;
788 PRE_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
791 POST_SYSCALL(getgroups)(long long res, long long gidsetsize_, void *gidset_) {
793 unsigned int *gidset = (unsigned int *)gidset_;
795 POST_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
799 PRE_SYSCALL(setgroups)(long long gidsetsize_, void *gidset_) {
800 unsigned int *gidset = (unsigned int *)gidset_;
802 PRE_READ(gidset, sizeof(*gidset) * gidsetsize_);
805 POST_SYSCALL(setgroups)(long long res, long long gidsetsize_, void *gidset_) {
807 unsigned int *gidset = (unsigned int *)gidset_;
809 POST_READ(gidset, sizeof(*gidset) * gidsetsize_);
813 PRE_SYSCALL(getpgrp)(void) { /* Nothing to do */ }
814 POST_SYSCALL(getpgrp)(long long res) { /* Nothing to do */ }
815 PRE_SYSCALL(setpgid)(long long pid_, long long pgid_) { /* Nothing to do */ }
816 POST_SYSCALL(setpgid)(long long res, long long pid_, long long pgid_) {
819 PRE_SYSCALL(compat_50_setitimer)(long long which_, void *itv_, void *oitv_) {
822 POST_SYSCALL(compat_50_setitimer)
823 (long long res, long long which_, void *itv_, void *oitv_) {
826 PRE_SYSCALL(compat_43_owait)(void) { /* TODO */ }
827 POST_SYSCALL(compat_43_owait)(long long res) { /* TODO */ }
828 PRE_SYSCALL(compat_12_oswapon)(void *name_) { /* TODO */ }
829 POST_SYSCALL(compat_12_oswapon)(long long res, void *name_) { /* TODO */ }
830 PRE_SYSCALL(compat_50_getitimer)(long long which_, void *itv_) { /* TODO */ }
831 POST_SYSCALL(compat_50_getitimer)(long long res, long long which_, void *itv_) {
834 PRE_SYSCALL(compat_43_ogethostname)(void *hostname_, long long len_) {
837 POST_SYSCALL(compat_43_ogethostname)
838 (long long res, void *hostname_, long long len_) {
841 PRE_SYSCALL(compat_43_osethostname)(void *hostname_, long long len_) {
844 POST_SYSCALL(compat_43_osethostname)
845 (long long res, void *hostname_, long long len_) {
848 PRE_SYSCALL(compat_43_ogetdtablesize)(void) { /* TODO */ }
849 POST_SYSCALL(compat_43_ogetdtablesize)(long long res) { /* TODO */ }
850 PRE_SYSCALL(dup2)(long long from_, long long to_) { /* Nothing to do */ }
851 POST_SYSCALL(dup2)(long long res, long long from_, long long to_) {
854 /* syscall 91 has been skipped */
855 PRE_SYSCALL(fcntl)(long long fd_, long long cmd_, void *arg_) {
858 POST_SYSCALL(fcntl)(long long res, long long fd_, long long cmd_, void *arg_) {
861 PRE_SYSCALL(compat_50_select)
862 (long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
865 POST_SYSCALL(compat_50_select)
866 (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
869 /* syscall 94 has been skipped */
870 PRE_SYSCALL(fsync)(long long fd_) { /* Nothing to do */ }
871 POST_SYSCALL(fsync)(long long res, long long fd_) { /* Nothing to do */ }
872 PRE_SYSCALL(setpriority)(long long which_, long long who_, long long prio_) {
875 POST_SYSCALL(setpriority)
876 (long long res, long long which_, long long who_, long long prio_) {
879 PRE_SYSCALL(compat_30_socket)
880 (long long domain_, long long type_, long long protocol_) {
883 POST_SYSCALL(compat_30_socket)
884 (long long res, long long domain_, long long type_, long long protocol_) {
887 PRE_SYSCALL(connect)(long long s_, void *name_, long long namelen_) {
888 PRE_READ(name_, namelen_);
890 POST_SYSCALL(connect)
891 (long long res, long long s_, void *name_, long long namelen_) {
893 POST_READ(name_, namelen_);
896 PRE_SYSCALL(compat_43_oaccept)(long long s_, void *name_, void *anamelen_) {
899 POST_SYSCALL(compat_43_oaccept)
900 (long long res, long long s_, void *name_, void *anamelen_) {
903 PRE_SYSCALL(getpriority)(long long which_, long long who_) {
906 POST_SYSCALL(getpriority)(long long res, long long which_, long long who_) {
909 PRE_SYSCALL(compat_43_osend)
910 (long long s_, void *buf_, long long len_, long long flags_) {
913 POST_SYSCALL(compat_43_osend)
914 (long long res, long long s_, void *buf_, long long len_, long long flags_) {
917 PRE_SYSCALL(compat_43_orecv)
918 (long long s_, void *buf_, long long len_, long long flags_) {
921 POST_SYSCALL(compat_43_orecv)
922 (long long res, long long s_, void *buf_, long long len_, long long flags_) {
925 PRE_SYSCALL(compat_13_sigreturn13)(void *sigcntxp_) { /* TODO */ }
926 POST_SYSCALL(compat_13_sigreturn13)(long long res, void *sigcntxp_) {
929 PRE_SYSCALL(bind)(long long s_, void *name_, long long namelen_) {
930 PRE_READ(name_, namelen_);
933 (long long res, long long s_, void *name_, long long namelen_) {
935 PRE_READ(name_, namelen_);
938 PRE_SYSCALL(setsockopt)
939 (long long s_, long long level_, long long name_, void *val_,
940 long long valsize_) {
942 PRE_READ(val_, valsize_);
945 POST_SYSCALL(setsockopt)
946 (long long res, long long s_, long long level_, long long name_, void *val_,
947 long long valsize_) {
950 POST_READ(val_, valsize_);
954 PRE_SYSCALL(listen)(long long s_, long long backlog_) { /* Nothing to do */ }
955 POST_SYSCALL(listen)(long long res, long long s_, long long backlog_) {
958 /* syscall 107 has been skipped */
959 PRE_SYSCALL(compat_43_osigvec)(long long signum_, void *nsv_, void *osv_) {
962 POST_SYSCALL(compat_43_osigvec)
963 (long long res, long long signum_, void *nsv_, void *osv_) {
966 PRE_SYSCALL(compat_43_osigblock)(long long mask_) { /* TODO */ }
967 POST_SYSCALL(compat_43_osigblock)(long long res, long long mask_) { /* TODO */ }
968 PRE_SYSCALL(compat_43_osigsetmask)(long long mask_) { /* TODO */ }
969 POST_SYSCALL(compat_43_osigsetmask)(long long res, long long mask_) {
972 PRE_SYSCALL(compat_13_sigsuspend13)(long long mask_) { /* TODO */ }
973 POST_SYSCALL(compat_13_sigsuspend13)(long long res, long long mask_) {
976 PRE_SYSCALL(compat_43_osigstack)(void *nss_, void *oss_) { /* TODO */ }
977 POST_SYSCALL(compat_43_osigstack)(long long res, void *nss_, void *oss_) {
980 PRE_SYSCALL(compat_43_orecvmsg)(long long s_, void *msg_, long long flags_) {
983 POST_SYSCALL(compat_43_orecvmsg)
984 (long long res, long long s_, void *msg_, long long flags_) {
987 PRE_SYSCALL(compat_43_osendmsg)(long long s_, void *msg_, long long flags_) {
990 POST_SYSCALL(compat_43_osendmsg)
991 (long long res, long long s_, void *msg_, long long flags_) {
994 /* syscall 115 has been skipped */
995 PRE_SYSCALL(compat_50_gettimeofday)(void *tp_, void *tzp_) { /* TODO */ }
996 POST_SYSCALL(compat_50_gettimeofday)(long long res, void *tp_, void *tzp_) {
999 PRE_SYSCALL(compat_50_getrusage)(long long who_, void *rusage_) { /* TODO */ }
1000 POST_SYSCALL(compat_50_getrusage)
1001 (long long res, long long who_, void *rusage_) {
1004 PRE_SYSCALL(getsockopt)
1005 (long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
1008 POST_SYSCALL(getsockopt)
1009 (long long res, long long s_, long long level_, long long name_, void *val_,
1013 /* syscall 119 has been skipped */
1014 PRE_SYSCALL(readv)(long long fd_, void *iovp_, long long iovcnt_) {
1015 struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1018 PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1019 for (i = 0; i < iovcnt_; i++) {
1020 PRE_WRITE(iovp[i].iov_base, iovp[i].iov_len);
1025 (long long res, long long fd_, void *iovp_, long long iovcnt_) {
1026 struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1031 POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1032 for (i = 0; i < iovcnt_ && n > 0; i++) {
1033 m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
1034 POST_WRITE(iovp[i].iov_base, m);
1040 PRE_SYSCALL(writev)(long long fd_, void *iovp_, long long iovcnt_) {
1041 struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1044 PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1045 for (i = 0; i < iovcnt_; i++) {
1046 PRE_READ(iovp[i].iov_base, iovp[i].iov_len);
1050 POST_SYSCALL(writev)
1051 (long long res, long long fd_, void *iovp_, long long iovcnt_) {
1052 struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1057 POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1058 for (i = 0; i < iovcnt_ && n > 0; i++) {
1059 m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
1060 POST_READ(iovp[i].iov_base, m);
1066 PRE_SYSCALL(compat_50_settimeofday)(void *tv_, void *tzp_) { /* TODO */ }
1067 POST_SYSCALL(compat_50_settimeofday)(long long res, void *tv_, void *tzp_) {
1070 PRE_SYSCALL(fchown)(long long fd_, long long uid_, long long gid_) {
1073 POST_SYSCALL(fchown)
1074 (long long res, long long fd_, long long uid_, long long gid_) {
1077 PRE_SYSCALL(fchmod)(long long fd_, long long mode_) { /* Nothing to do */ }
1078 POST_SYSCALL(fchmod)(long long res, long long fd_, long long mode_) {
1081 PRE_SYSCALL(compat_43_orecvfrom)
1082 (long long s_, void *buf_, long long len_, long long flags_, void *from_,
1083 void *fromlenaddr_) {
1086 POST_SYSCALL(compat_43_orecvfrom)
1087 (long long res, long long s_, void *buf_, long long len_, long long flags_,
1088 void *from_, void *fromlenaddr_) {
1091 PRE_SYSCALL(setreuid)(long long ruid_, long long euid_) { /* Nothing to do */ }
1092 POST_SYSCALL(setreuid)(long long res, long long ruid_, long long euid_) {
1095 PRE_SYSCALL(setregid)(long long rgid_, long long egid_) { /* Nothing to do */ }
1096 POST_SYSCALL(setregid)(long long res, long long rgid_, long long egid_) {
1099 PRE_SYSCALL(rename)(void *from_, void *to_) {
1100 const char *from = (const char *)from_;
1101 const char *to = (const char *)to_;
1103 PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
1106 PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
1109 POST_SYSCALL(rename)(long long res, void *from_, void *to_) {
1111 const char *from = (const char *)from_;
1112 const char *to = (const char *)to_;
1114 POST_READ(from, __sanitizer::internal_strlen(from) + 1);
1117 POST_READ(to, __sanitizer::internal_strlen(to) + 1);
1121 PRE_SYSCALL(compat_43_otruncate)(void *path_, long long length_) { /* TODO */ }
1122 POST_SYSCALL(compat_43_otruncate)
1123 (long long res, void *path_, long long length_) {
1126 PRE_SYSCALL(compat_43_oftruncate)(long long fd_, long long length_) {
1129 POST_SYSCALL(compat_43_oftruncate)
1130 (long long res, long long fd_, long long length_) {
1133 PRE_SYSCALL(flock)(long long fd_, long long how_) { /* Nothing to do */ }
1134 POST_SYSCALL(flock)(long long res, long long fd_, long long how_) {
1137 PRE_SYSCALL(mkfifo)(void *path_, long long mode_) {
1138 const char *path = (const char *)path_;
1140 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1143 POST_SYSCALL(mkfifo)(long long res, void *path_, long long mode_) {
1145 const char *path = (const char *)path_;
1147 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1152 (long long s_, void *buf_, long long len_, long long flags_, void *to_,
1154 PRE_READ(buf_, len_);
1155 PRE_READ(to_, tolen_);
1157 POST_SYSCALL(sendto)
1158 (long long res, long long s_, void *buf_, long long len_, long long flags_,
1159 void *to_, long long tolen_) {
1161 POST_READ(buf_, len_);
1162 POST_READ(to_, tolen_);
1165 PRE_SYSCALL(shutdown)(long long s_, long long how_) { /* Nothing to do */ }
1166 POST_SYSCALL(shutdown)(long long res, long long s_, long long how_) {
1169 PRE_SYSCALL(socketpair)
1170 (long long domain_, long long type_, long long protocol_, void *rsv_) {
1171 PRE_WRITE(rsv_, 2 * sizeof(int));
1173 POST_SYSCALL(socketpair)
1174 (long long res, long long domain_, long long type_, long long protocol_,
1177 POST_WRITE(rsv_, 2 * sizeof(int));
1180 PRE_SYSCALL(mkdir)(void *path_, long long mode_) {
1181 const char *path = (const char *)path_;
1183 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1186 POST_SYSCALL(mkdir)(long long res, void *path_, long long mode_) {
1188 const char *path = (const char *)path_;
1190 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1194 PRE_SYSCALL(rmdir)(void *path_) {
1195 const char *path = (const char *)path_;
1197 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1200 POST_SYSCALL(rmdir)(long long res, void *path_) {
1202 const char *path = (const char *)path_;
1204 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1208 PRE_SYSCALL(compat_50_utimes)(void *path_, void *tptr_) { /* TODO */ }
1209 POST_SYSCALL(compat_50_utimes)(long long res, void *path_, void *tptr_) {
1212 /* syscall 139 has been skipped */
1213 PRE_SYSCALL(compat_50_adjtime)(void *delta_, void *olddelta_) { /* TODO */ }
1214 POST_SYSCALL(compat_50_adjtime)(long long res, void *delta_, void *olddelta_) {
1217 PRE_SYSCALL(compat_43_ogetpeername)(long long fdes_, void *asa_, void *alen_) {
1220 POST_SYSCALL(compat_43_ogetpeername)
1221 (long long res, long long fdes_, void *asa_, void *alen_) {
1224 PRE_SYSCALL(compat_43_ogethostid)(void) { /* TODO */ }
1225 POST_SYSCALL(compat_43_ogethostid)(long long res) { /* TODO */ }
1226 PRE_SYSCALL(compat_43_osethostid)(long long hostid_) { /* TODO */ }
1227 POST_SYSCALL(compat_43_osethostid)(long long res, long long hostid_) {
1230 PRE_SYSCALL(compat_43_ogetrlimit)(long long which_, void *rlp_) { /* TODO */ }
1231 POST_SYSCALL(compat_43_ogetrlimit)
1232 (long long res, long long which_, void *rlp_) {
1235 PRE_SYSCALL(compat_43_osetrlimit)(long long which_, void *rlp_) { /* TODO */ }
1236 POST_SYSCALL(compat_43_osetrlimit)
1237 (long long res, long long which_, void *rlp_) {
1240 PRE_SYSCALL(compat_43_okillpg)(long long pgid_, long long signum_) {
1243 POST_SYSCALL(compat_43_okillpg)
1244 (long long res, long long pgid_, long long signum_) {
1247 PRE_SYSCALL(setsid)(void) { /* Nothing to do */ }
1248 POST_SYSCALL(setsid)(long long res) { /* Nothing to do */ }
1249 PRE_SYSCALL(compat_50_quotactl)
1250 (void *path_, long long cmd_, long long uid_, void *arg_) {
1253 POST_SYSCALL(compat_50_quotactl)
1254 (long long res, void *path_, long long cmd_, long long uid_, void *arg_) {
1257 PRE_SYSCALL(compat_43_oquota)(void) { /* TODO */ }
1258 POST_SYSCALL(compat_43_oquota)(long long res) { /* TODO */ }
1259 PRE_SYSCALL(compat_43_ogetsockname)(long long fdec_, void *asa_, void *alen_) {
1262 POST_SYSCALL(compat_43_ogetsockname)
1263 (long long res, long long fdec_, void *asa_, void *alen_) {
1266 /* syscall 151 has been skipped */
1267 /* syscall 152 has been skipped */
1268 /* syscall 153 has been skipped */
1269 /* syscall 154 has been skipped */
1270 PRE_SYSCALL(nfssvc)(long long flag_, void *argp_) { /* Nothing to do */ }
1271 POST_SYSCALL(nfssvc)(long long res, long long flag_, void *argp_) {
1274 PRE_SYSCALL(compat_43_ogetdirentries)
1275 (long long fd_, void *buf_, long long count_, void *basep_) {
1278 POST_SYSCALL(compat_43_ogetdirentries)
1279 (long long res, long long fd_, void *buf_, long long count_, void *basep_) {
1282 PRE_SYSCALL(compat_20_statfs)(void *path_, void *buf_) { /* TODO */ }
1283 POST_SYSCALL(compat_20_statfs)(long long res, void *path_, void *buf_) {
1286 PRE_SYSCALL(compat_20_fstatfs)(long long fd_, void *buf_) { /* TODO */ }
1287 POST_SYSCALL(compat_20_fstatfs)(long long res, long long fd_, void *buf_) {
1290 /* syscall 159 has been skipped */
1291 /* syscall 160 has been skipped */
1292 PRE_SYSCALL(compat_30_getfh)(void *fname_, void *fhp_) { /* TODO */ }
1293 POST_SYSCALL(compat_30_getfh)(long long res, void *fname_, void *fhp_) {
1296 PRE_SYSCALL(compat_09_ogetdomainname)(void *domainname_, long long len_) {
1299 POST_SYSCALL(compat_09_ogetdomainname)
1300 (long long res, void *domainname_, long long len_) {
1303 PRE_SYSCALL(compat_09_osetdomainname)(void *domainname_, long long len_) {
1306 POST_SYSCALL(compat_09_osetdomainname)
1307 (long long res, void *domainname_, long long len_) {
1310 PRE_SYSCALL(compat_09_ouname)(void *name_) { /* TODO */ }
1311 POST_SYSCALL(compat_09_ouname)(long long res, void *name_) { /* TODO */ }
1312 PRE_SYSCALL(sysarch)(long long op_, void *parms_) { /* TODO */ }
1313 POST_SYSCALL(sysarch)(long long res, long long op_, void *parms_) { /* TODO */ }
1314 /* syscall 166 has been skipped */
1315 /* syscall 167 has been skipped */
1316 /* syscall 168 has been skipped */
1318 PRE_SYSCALL(compat_10_osemsys)
1319 (long long which_, long long a2_, long long a3_, long long a4_, long long a5_) {
1322 POST_SYSCALL(compat_10_osemsys)
1323 (long long res, long long which_, long long a2_, long long a3_, long long a4_,
1328 /* syscall 169 has been skipped */
1331 PRE_SYSCALL(compat_10_omsgsys)
1332 (long long which_, long long a2_, long long a3_, long long a4_, long long a5_,
1336 POST_SYSCALL(compat_10_omsgsys)
1337 (long long res, long long which_, long long a2_, long long a3_, long long a4_,
1338 long long a5_, long long a6_) {
1342 /* syscall 170 has been skipped */
1345 PRE_SYSCALL(compat_10_oshmsys)
1346 (long long which_, long long a2_, long long a3_, long long a4_) {
1349 POST_SYSCALL(compat_10_oshmsys)
1350 (long long res, long long which_, long long a2_, long long a3_, long long a4_) {
1354 /* syscall 171 has been skipped */
1356 /* syscall 172 has been skipped */
1358 (long long fd_, void *buf_, long long nbyte_, long long PAD_,
1359 long long offset_) {
1361 PRE_WRITE(buf_, nbyte_);
1365 (long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
1366 long long offset_) {
1368 POST_WRITE(buf_, res);
1372 (long long fd_, void *buf_, long long nbyte_, long long PAD_,
1373 long long offset_) {
1375 PRE_READ(buf_, nbyte_);
1378 POST_SYSCALL(pwrite)
1379 (long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
1380 long long offset_) {
1382 POST_READ(buf_, res);
1385 PRE_SYSCALL(compat_30_ntp_gettime)(void *ntvp_) { /* TODO */ }
1386 POST_SYSCALL(compat_30_ntp_gettime)(long long res, void *ntvp_) { /* TODO */ }
1387 #if defined(NTP) || !defined(_KERNEL_OPT)
1388 PRE_SYSCALL(ntp_adjtime)(void *tp_) { /* Nothing to do */ }
1389 POST_SYSCALL(ntp_adjtime)(long long res, void *tp_) { /* Nothing to do */ }
1391 /* syscall 176 has been skipped */
1393 /* syscall 177 has been skipped */
1394 /* syscall 178 has been skipped */
1395 /* syscall 179 has been skipped */
1396 /* syscall 180 has been skipped */
1397 PRE_SYSCALL(setgid)(long long gid_) { /* Nothing to do */ }
1398 POST_SYSCALL(setgid)(long long res, long long gid_) { /* Nothing to do */ }
1399 PRE_SYSCALL(setegid)(long long egid_) { /* Nothing to do */ }
1400 POST_SYSCALL(setegid)(long long res, long long egid_) { /* Nothing to do */ }
1401 PRE_SYSCALL(seteuid)(long long euid_) { /* Nothing to do */ }
1402 POST_SYSCALL(seteuid)(long long res, long long euid_) { /* Nothing to do */ }
1403 PRE_SYSCALL(lfs_bmapv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
1406 POST_SYSCALL(lfs_bmapv)
1407 (long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
1410 PRE_SYSCALL(lfs_markv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
1413 POST_SYSCALL(lfs_markv)
1414 (long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
1417 PRE_SYSCALL(lfs_segclean)(void *fsidp_, long long segment_) { /* TODO */ }
1418 POST_SYSCALL(lfs_segclean)(long long res, void *fsidp_, long long segment_) {
1421 PRE_SYSCALL(compat_50_lfs_segwait)(void *fsidp_, void *tv_) { /* TODO */ }
1422 POST_SYSCALL(compat_50_lfs_segwait)(long long res, void *fsidp_, void *tv_) {
1425 PRE_SYSCALL(compat_12_stat12)(void *path_, void *ub_) { /* TODO */ }
1426 POST_SYSCALL(compat_12_stat12)(long long res, void *path_, void *ub_) {
1429 PRE_SYSCALL(compat_12_fstat12)(long long fd_, void *sb_) { /* TODO */ }
1430 POST_SYSCALL(compat_12_fstat12)(long long res, long long fd_, void *sb_) {
1433 PRE_SYSCALL(compat_12_lstat12)(void *path_, void *ub_) { /* TODO */ }
1434 POST_SYSCALL(compat_12_lstat12)(long long res, void *path_, void *ub_) {
1437 PRE_SYSCALL(pathconf)(void *path_, long long name_) {
1438 const char *path = (const char *)path_;
1440 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1443 POST_SYSCALL(pathconf)(long long res, void *path_, long long name_) {
1445 const char *path = (const char *)path_;
1447 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1451 PRE_SYSCALL(fpathconf)(long long fd_, long long name_) { /* Nothing to do */ }
1452 POST_SYSCALL(fpathconf)(long long res, long long fd_, long long name_) {
1455 /* syscall 193 has been skipped */
1456 PRE_SYSCALL(getrlimit)(long long which_, void *rlp_) {
1457 PRE_WRITE(rlp_, struct_rlimit_sz);
1459 POST_SYSCALL(getrlimit)(long long res, long long which_, void *rlp_) {
1461 POST_WRITE(rlp_, struct_rlimit_sz);
1464 PRE_SYSCALL(setrlimit)(long long which_, void *rlp_) {
1465 PRE_READ(rlp_, struct_rlimit_sz);
1467 POST_SYSCALL(setrlimit)(long long res, long long which_, void *rlp_) {
1469 POST_READ(rlp_, struct_rlimit_sz);
1472 PRE_SYSCALL(compat_12_getdirentries)
1473 (long long fd_, void *buf_, long long count_, void *basep_) {
1476 POST_SYSCALL(compat_12_getdirentries)
1477 (long long res, long long fd_, void *buf_, long long count_, void *basep_) {
1481 (void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
1482 long long PAD_, long long pos_) {
1486 (long long res, void *addr_, long long len_, long long prot_, long long flags_,
1487 long long fd_, long long PAD_, long long pos_) {
1490 PRE_SYSCALL(__syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
1493 POST_SYSCALL(__syscall)
1494 (long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
1498 (long long fd_, long long PAD_, long long offset_, long long whence_) {
1502 (long long res, long long fd_, long long PAD_, long long offset_,
1503 long long whence_) {
1506 PRE_SYSCALL(truncate)(void *path_, long long PAD_, long long length_) {
1507 const char *path = (const char *)path_;
1509 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1512 POST_SYSCALL(truncate)
1513 (long long res, void *path_, long long PAD_, long long length_) {
1515 const char *path = (const char *)path_;
1517 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1521 PRE_SYSCALL(ftruncate)(long long fd_, long long PAD_, long long length_) {
1524 POST_SYSCALL(ftruncate)
1525 (long long res, long long fd_, long long PAD_, long long length_) {
1528 PRE_SYSCALL(__sysctl)
1529 (void *name_, long long namelen_, void *oldv_, void *oldlenp_, void *newv_,
1530 long long newlen_) {
1531 const int *name = (const int *)name_;
1533 PRE_READ(name, namelen_ * sizeof(*name));
1536 PRE_READ(name, newlen_);
1539 POST_SYSCALL(__sysctl)
1540 (long long res, void *name_, long long namelen_, void *oldv_, void *oldlenp_,
1541 void *newv_, long long newlen_) {
1543 const int *name = (const int *)name_;
1545 POST_READ(name, namelen_ * sizeof(*name));
1548 POST_READ(name, newlen_);
1552 PRE_SYSCALL(mlock)(void *addr_, long long len_) { /* Nothing to do */ }
1553 POST_SYSCALL(mlock)(long long res, void *addr_, long long len_) {
1556 PRE_SYSCALL(munlock)(void *addr_, long long len_) { /* Nothing to do */ }
1557 POST_SYSCALL(munlock)(long long res, void *addr_, long long len_) {
1560 PRE_SYSCALL(undelete)(void *path_) {
1561 const char *path = (const char *)path_;
1563 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1566 POST_SYSCALL(undelete)(long long res, void *path_) {
1568 const char *path = (const char *)path_;
1570 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1574 PRE_SYSCALL(compat_50_futimes)(long long fd_, void *tptr_) { /* TODO */ }
1575 POST_SYSCALL(compat_50_futimes)(long long res, long long fd_, void *tptr_) {
1578 PRE_SYSCALL(getpgid)(long long pid_) { /* Nothing to do */ }
1579 POST_SYSCALL(getpgid)(long long res, long long pid_) { /* Nothing to do */ }
1580 PRE_SYSCALL(reboot)(long long opt_, void *bootstr_) {
1581 const char *bootstr = (const char *)bootstr_;
1583 PRE_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
1586 POST_SYSCALL(reboot)(long long res, long long opt_, void *bootstr_) {
1587 /* This call should never return */
1588 const char *bootstr = (const char *)bootstr_;
1590 POST_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
1593 PRE_SYSCALL(poll)(void *fds_, long long nfds_, long long timeout_) {
1597 (long long res, void *fds_, long long nfds_, long long timeout_) {
1601 (long long id_, long long a1_, long long a2_, long long a3_, long long a4_,
1602 long long a5_, long long a6_) {
1605 POST_SYSCALL(afssys)
1606 (long long res, long long id_, long long a1_, long long a2_, long long a3_,
1607 long long a4_, long long a5_, long long a6_) {
1610 /* syscall 211 has been skipped */
1611 /* syscall 212 has been skipped */
1612 /* syscall 213 has been skipped */
1613 /* syscall 214 has been skipped */
1614 /* syscall 215 has been skipped */
1615 /* syscall 216 has been skipped */
1616 /* syscall 217 has been skipped */
1617 /* syscall 218 has been skipped */
1618 /* syscall 219 has been skipped */
1619 PRE_SYSCALL(compat_14___semctl)
1620 (long long semid_, long long semnum_, long long cmd_, void *arg_) {
1623 POST_SYSCALL(compat_14___semctl)
1624 (long long res, long long semid_, long long semnum_, long long cmd_,
1628 PRE_SYSCALL(semget)(long long key_, long long nsems_, long long semflg_) {
1631 POST_SYSCALL(semget)
1632 (long long res, long long key_, long long nsems_, long long semflg_) {
1635 PRE_SYSCALL(semop)(long long semid_, void *sops_, long long nsops_) {
1637 PRE_READ(sops_, nsops_ * struct_sembuf_sz);
1641 (long long res, long long semid_, void *sops_, long long nsops_) {
1644 POST_READ(sops_, nsops_ * struct_sembuf_sz);
1648 PRE_SYSCALL(semconfig)(long long flag_) { /* Nothing to do */ }
1649 POST_SYSCALL(semconfig)(long long res, long long flag_) { /* Nothing to do */ }
1650 PRE_SYSCALL(compat_14_msgctl)(long long msqid_, long long cmd_, void *buf_) {
1653 POST_SYSCALL(compat_14_msgctl)
1654 (long long res, long long msqid_, long long cmd_, void *buf_) {
1657 PRE_SYSCALL(msgget)(long long key_, long long msgflg_) { /* Nothing to do */ }
1658 POST_SYSCALL(msgget)(long long res, long long key_, long long msgflg_) {
1662 (long long msqid_, void *msgp_, long long msgsz_, long long msgflg_) {
1664 PRE_READ(msgp_, msgsz_);
1667 POST_SYSCALL(msgsnd)
1668 (long long res, long long msqid_, void *msgp_, long long msgsz_,
1669 long long msgflg_) {
1672 POST_READ(msgp_, msgsz_);
1677 (long long msqid_, void *msgp_, long long msgsz_, long long msgtyp_,
1678 long long msgflg_) {
1681 POST_SYSCALL(msgrcv)
1682 (long long res, long long msqid_, void *msgp_, long long msgsz_,
1683 long long msgtyp_, long long msgflg_) {
1686 PRE_SYSCALL(shmat)(long long shmid_, void *shmaddr_, long long shmflg_) {
1690 (long long res, long long shmid_, void *shmaddr_, long long shmflg_) {
1693 PRE_SYSCALL(compat_14_shmctl)(long long shmid_, long long cmd_, void *buf_) {
1696 POST_SYSCALL(compat_14_shmctl)
1697 (long long res, long long shmid_, long long cmd_, void *buf_) {
1700 PRE_SYSCALL(shmdt)(void *shmaddr_) { /* Nothing to do */ }
1701 POST_SYSCALL(shmdt)(long long res, void *shmaddr_) { /* Nothing to do */ }
1702 PRE_SYSCALL(shmget)(long long key_, long long size_, long long shmflg_) {
1705 POST_SYSCALL(shmget)
1706 (long long res, long long key_, long long size_, long long shmflg_) {
1709 PRE_SYSCALL(compat_50_clock_gettime)(long long clock_id_, void *tp_) {
1712 POST_SYSCALL(compat_50_clock_gettime)
1713 (long long res, long long clock_id_, void *tp_) {
1716 PRE_SYSCALL(compat_50_clock_settime)(long long clock_id_, void *tp_) {
1719 POST_SYSCALL(compat_50_clock_settime)
1720 (long long res, long long clock_id_, void *tp_) {
1723 PRE_SYSCALL(compat_50_clock_getres)(long long clock_id_, void *tp_) {
1726 POST_SYSCALL(compat_50_clock_getres)
1727 (long long res, long long clock_id_, void *tp_) {
1730 PRE_SYSCALL(timer_create)(long long clock_id_, void *evp_, void *timerid_) {
1733 POST_SYSCALL(timer_create)
1734 (long long res, long long clock_id_, void *evp_, void *timerid_) {
1737 PRE_SYSCALL(timer_delete)(long long timerid_) { /* Nothing to do */ }
1738 POST_SYSCALL(timer_delete)(long long res, long long timerid_) {
1741 PRE_SYSCALL(compat_50_timer_settime)
1742 (long long timerid_, long long flags_, void *value_, void *ovalue_) {
1745 POST_SYSCALL(compat_50_timer_settime)
1746 (long long res, long long timerid_, long long flags_, void *value_,
1750 PRE_SYSCALL(compat_50_timer_gettime)(long long timerid_, void *value_) {
1753 POST_SYSCALL(compat_50_timer_gettime)
1754 (long long res, long long timerid_, void *value_) {
1757 PRE_SYSCALL(timer_getoverrun)(long long timerid_) { /* Nothing to do */ }
1758 POST_SYSCALL(timer_getoverrun)(long long res, long long timerid_) {
1761 PRE_SYSCALL(compat_50_nanosleep)(void *rqtp_, void *rmtp_) { /* TODO */ }
1762 POST_SYSCALL(compat_50_nanosleep)(long long res, void *rqtp_, void *rmtp_) {
1765 PRE_SYSCALL(fdatasync)(long long fd_) { /* Nothing to do */ }
1766 POST_SYSCALL(fdatasync)(long long res, long long fd_) { /* Nothing to do */ }
1767 PRE_SYSCALL(mlockall)(long long flags_) { /* Nothing to do */ }
1768 POST_SYSCALL(mlockall)(long long res, long long flags_) { /* Nothing to do */ }
1769 PRE_SYSCALL(munlockall)(void) { /* Nothing to do */ }
1770 POST_SYSCALL(munlockall)(long long res) { /* Nothing to do */ }
1771 PRE_SYSCALL(compat_50___sigtimedwait)(void *set_, void *info_, void *timeout_) {
1774 POST_SYSCALL(compat_50___sigtimedwait)
1775 (long long res, void *set_, void *info_, void *timeout_) {
1778 PRE_SYSCALL(sigqueueinfo)(long long pid_, void *info_) {
1780 PRE_READ(info_, siginfo_t_sz);
1783 POST_SYSCALL(sigqueueinfo)(long long res, long long pid_, void *info_) {}
1784 PRE_SYSCALL(modctl)(long long cmd_, void *arg_) { /* TODO */ }
1785 POST_SYSCALL(modctl)(long long res, long long cmd_, void *arg_) { /* TODO */ }
1786 PRE_SYSCALL(_ksem_init)(long long value_, void *idp_) { /* Nothing to do */ }
1787 POST_SYSCALL(_ksem_init)(long long res, long long value_, void *idp_) {
1790 PRE_SYSCALL(_ksem_open)
1791 (void *name_, long long oflag_, long long mode_, long long value_, void *idp_) {
1792 const char *name = (const char *)name_;
1794 PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1797 POST_SYSCALL(_ksem_open)
1798 (long long res, void *name_, long long oflag_, long long mode_,
1799 long long value_, void *idp_) {
1800 const char *name = (const char *)name_;
1802 POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1805 PRE_SYSCALL(_ksem_unlink)(void *name_) {
1806 const char *name = (const char *)name_;
1808 PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1811 POST_SYSCALL(_ksem_unlink)(long long res, void *name_) {
1812 const char *name = (const char *)name_;
1814 POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1817 PRE_SYSCALL(_ksem_close)(long long id_) { /* Nothing to do */ }
1818 POST_SYSCALL(_ksem_close)(long long res, long long id_) { /* Nothing to do */ }
1819 PRE_SYSCALL(_ksem_post)(long long id_) { /* Nothing to do */ }
1820 POST_SYSCALL(_ksem_post)(long long res, long long id_) { /* Nothing to do */ }
1821 PRE_SYSCALL(_ksem_wait)(long long id_) { /* Nothing to do */ }
1822 POST_SYSCALL(_ksem_wait)(long long res, long long id_) { /* Nothing to do */ }
1823 PRE_SYSCALL(_ksem_trywait)(long long id_) { /* Nothing to do */ }
1824 POST_SYSCALL(_ksem_trywait)(long long res, long long id_) {
1827 PRE_SYSCALL(_ksem_getvalue)(long long id_, void *value_) { /* Nothing to do */ }
1828 POST_SYSCALL(_ksem_getvalue)(long long res, long long id_, void *value_) {
1831 PRE_SYSCALL(_ksem_destroy)(long long id_) { /* Nothing to do */ }
1832 POST_SYSCALL(_ksem_destroy)(long long res, long long id_) {
1835 PRE_SYSCALL(_ksem_timedwait)(long long id_, void *abstime_) {
1837 PRE_READ(abstime_, struct_timespec_sz);
1840 POST_SYSCALL(_ksem_timedwait)(long long res, long long id_, void *abstime_) {}
1841 PRE_SYSCALL(mq_open)
1842 (void *name_, long long oflag_, long long mode_, void *attr_) {
1843 const char *name = (const char *)name_;
1845 PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1848 POST_SYSCALL(mq_open)
1849 (long long res, void *name_, long long oflag_, long long mode_, void *attr_) {
1850 const char *name = (const char *)name_;
1852 POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1855 PRE_SYSCALL(mq_close)(long long mqdes_) { /* Nothing to do */ }
1856 POST_SYSCALL(mq_close)(long long res, long long mqdes_) { /* Nothing to do */ }
1857 PRE_SYSCALL(mq_unlink)(void *name_) {
1858 const char *name = (const char *)name_;
1860 PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1863 POST_SYSCALL(mq_unlink)(long long res, void *name_) {
1864 const char *name = (const char *)name_;
1866 POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1869 PRE_SYSCALL(mq_getattr)(long long mqdes_, void *mqstat_) { /* Nothing to do */ }
1870 POST_SYSCALL(mq_getattr)(long long res, long long mqdes_, void *mqstat_) {
1873 PRE_SYSCALL(mq_setattr)(long long mqdes_, void *mqstat_, void *omqstat_) {
1875 PRE_READ(mqstat_, struct_mq_attr_sz);
1878 POST_SYSCALL(mq_setattr)
1879 (long long res, long long mqdes_, void *mqstat_, void *omqstat_) {}
1880 PRE_SYSCALL(mq_notify)(long long mqdes_, void *notification_) {
1881 if (notification_) {
1882 PRE_READ(notification_, struct_sigevent_sz);
1885 POST_SYSCALL(mq_notify)(long long res, long long mqdes_, void *notification_) {}
1886 PRE_SYSCALL(mq_send)
1887 (long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_) {
1889 PRE_READ(msg_ptr_, msg_len_);
1892 POST_SYSCALL(mq_send)
1893 (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1894 long long msg_prio_) {}
1895 PRE_SYSCALL(mq_receive)
1896 (long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_) {
1899 POST_SYSCALL(mq_receive)
1900 (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1904 PRE_SYSCALL(compat_50_mq_timedsend)
1905 (long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
1906 void *abs_timeout_) {
1909 POST_SYSCALL(compat_50_mq_timedsend)
1910 (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1911 long long msg_prio_, void *abs_timeout_) {
1914 PRE_SYSCALL(compat_50_mq_timedreceive)
1915 (long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
1916 void *abs_timeout_) {
1919 POST_SYSCALL(compat_50_mq_timedreceive)
1920 (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1921 void *msg_prio_, void *abs_timeout_) {
1924 /* syscall 267 has been skipped */
1925 /* syscall 268 has been skipped */
1926 /* syscall 269 has been skipped */
1927 PRE_SYSCALL(__posix_rename)(void *from_, void *to_) {
1928 const char *from = (const char *)from_;
1929 const char *to = (const char *)to_;
1931 PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
1934 PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
1937 POST_SYSCALL(__posix_rename)(long long res, void *from_, void *to_) {
1938 const char *from = (const char *)from_;
1939 const char *to = (const char *)to_;
1941 POST_READ(from, __sanitizer::internal_strlen(from) + 1);
1944 POST_READ(to, __sanitizer::internal_strlen(to) + 1);
1947 PRE_SYSCALL(swapctl)(long long cmd_, void *arg_, long long misc_) { /* TODO */ }
1948 POST_SYSCALL(swapctl)
1949 (long long res, long long cmd_, void *arg_, long long misc_) {
1952 PRE_SYSCALL(compat_30_getdents)(long long fd_, void *buf_, long long count_) {
1955 POST_SYSCALL(compat_30_getdents)
1956 (long long res, long long fd_, void *buf_, long long count_) {
1959 PRE_SYSCALL(minherit)(void *addr_, long long len_, long long inherit_) {
1962 POST_SYSCALL(minherit)
1963 (long long res, void *addr_, long long len_, long long inherit_) {
1966 PRE_SYSCALL(lchmod)(void *path_, long long mode_) {
1967 const char *path = (const char *)path_;
1969 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1972 POST_SYSCALL(lchmod)(long long res, void *path_, long long mode_) {
1973 const char *path = (const char *)path_;
1975 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1978 PRE_SYSCALL(lchown)(void *path_, long long uid_, long long gid_) {
1979 const char *path = (const char *)path_;
1981 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1984 POST_SYSCALL(lchown)
1985 (long long res, void *path_, long long uid_, long long gid_) {
1986 const char *path = (const char *)path_;
1988 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1991 PRE_SYSCALL(compat_50_lutimes)(void *path_, void *tptr_) { /* TODO */ }
1992 POST_SYSCALL(compat_50_lutimes)(long long res, void *path_, void *tptr_) {
1995 PRE_SYSCALL(__msync13)(void *addr_, long long len_, long long flags_) {
1998 POST_SYSCALL(__msync13)
1999 (long long res, void *addr_, long long len_, long long flags_) {
2002 PRE_SYSCALL(compat_30___stat13)(void *path_, void *ub_) { /* TODO */ }
2003 POST_SYSCALL(compat_30___stat13)(long long res, void *path_, void *ub_) {
2006 PRE_SYSCALL(compat_30___fstat13)(long long fd_, void *sb_) { /* TODO */ }
2007 POST_SYSCALL(compat_30___fstat13)(long long res, long long fd_, void *sb_) {
2010 PRE_SYSCALL(compat_30___lstat13)(void *path_, void *ub_) { /* TODO */ }
2011 POST_SYSCALL(compat_30___lstat13)(long long res, void *path_, void *ub_) {
2014 PRE_SYSCALL(__sigaltstack14)(void *nss_, void *oss_) {
2016 PRE_READ(nss_, struct_sigaltstack_sz);
2019 PRE_READ(oss_, struct_sigaltstack_sz);
2022 POST_SYSCALL(__sigaltstack14)(long long res, void *nss_, void *oss_) {}
2023 PRE_SYSCALL(__vfork14)(void) { /* Nothing to do */ }
2024 POST_SYSCALL(__vfork14)(long long res) { /* Nothing to do */ }
2025 PRE_SYSCALL(__posix_chown)(void *path_, long long uid_, long long gid_) {
2026 const char *path = (const char *)path_;
2028 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2031 POST_SYSCALL(__posix_chown)
2032 (long long res, void *path_, long long uid_, long long gid_) {
2033 const char *path = (const char *)path_;
2035 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2038 PRE_SYSCALL(__posix_fchown)(long long fd_, long long uid_, long long gid_) {
2041 POST_SYSCALL(__posix_fchown)
2042 (long long res, long long fd_, long long uid_, long long gid_) {
2045 PRE_SYSCALL(__posix_lchown)(void *path_, long long uid_, long long gid_) {
2046 const char *path = (const char *)path_;
2048 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2051 POST_SYSCALL(__posix_lchown)
2052 (long long res, void *path_, long long uid_, long long gid_) {
2053 const char *path = (const char *)path_;
2055 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2058 PRE_SYSCALL(getsid)(long long pid_) { /* Nothing to do */ }
2059 POST_SYSCALL(getsid)(long long res, long long pid_) { /* Nothing to do */ }
2060 PRE_SYSCALL(__clone)(long long flags_, void *stack_) { /* Nothing to do */ }
2061 POST_SYSCALL(__clone)(long long res, long long flags_, void *stack_) {
2064 PRE_SYSCALL(fktrace)
2065 (long long fd_, long long ops_, long long facs_, long long pid_) {
2068 POST_SYSCALL(fktrace)
2069 (long long res, long long fd_, long long ops_, long long facs_,
2074 (long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2075 long long offset_) {
2078 POST_SYSCALL(preadv)
2079 (long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2080 long long offset_) {
2083 PRE_SYSCALL(pwritev)
2084 (long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2085 long long offset_) {
2088 POST_SYSCALL(pwritev)
2089 (long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2090 long long offset_) {
2093 PRE_SYSCALL(compat_16___sigaction14)
2094 (long long signum_, void *nsa_, void *osa_) {
2097 POST_SYSCALL(compat_16___sigaction14)
2098 (long long res, long long signum_, void *nsa_, void *osa_) {
2101 PRE_SYSCALL(__sigpending14)(void *set_) { /* Nothing to do */ }
2102 POST_SYSCALL(__sigpending14)(long long res, void *set_) { /* Nothing to do */ }
2103 PRE_SYSCALL(__sigprocmask14)(long long how_, void *set_, void *oset_) {
2106 POST_SYSCALL(__sigprocmask14)
2107 (long long res, long long how_, void *set_, void *oset_) {
2110 PRE_SYSCALL(__sigsuspend14)(void *set_) {
2112 PRE_READ(set_, sizeof(__sanitizer_sigset_t));
2115 POST_SYSCALL(__sigsuspend14)(long long res, void *set_) {
2117 PRE_READ(set_, sizeof(__sanitizer_sigset_t));
2120 PRE_SYSCALL(compat_16___sigreturn14)(void *sigcntxp_) { /* TODO */ }
2121 POST_SYSCALL(compat_16___sigreturn14)(long long res, void *sigcntxp_) {
2124 PRE_SYSCALL(__getcwd)(void *bufp_, long long length_) { /* Nothing to do */ }
2125 POST_SYSCALL(__getcwd)(long long res, void *bufp_, long long length_) {
2128 PRE_SYSCALL(fchroot)(long long fd_) { /* Nothing to do */ }
2129 POST_SYSCALL(fchroot)(long long res, long long fd_) { /* Nothing to do */ }
2130 PRE_SYSCALL(compat_30_fhopen)(void *fhp_, long long flags_) { /* TODO */ }
2131 POST_SYSCALL(compat_30_fhopen)(long long res, void *fhp_, long long flags_) {
2134 PRE_SYSCALL(compat_30_fhstat)(void *fhp_, void *sb_) { /* TODO */ }
2135 POST_SYSCALL(compat_30_fhstat)(long long res, void *fhp_, void *sb_) {
2138 PRE_SYSCALL(compat_20_fhstatfs)(void *fhp_, void *buf_) { /* TODO */ }
2139 POST_SYSCALL(compat_20_fhstatfs)(long long res, void *fhp_, void *buf_) {
2142 PRE_SYSCALL(compat_50_____semctl13)
2143 (long long semid_, long long semnum_, long long cmd_, void *arg_) {
2146 POST_SYSCALL(compat_50_____semctl13)
2147 (long long res, long long semid_, long long semnum_, long long cmd_,
2151 PRE_SYSCALL(compat_50___msgctl13)
2152 (long long msqid_, long long cmd_, void *buf_) {
2155 POST_SYSCALL(compat_50___msgctl13)
2156 (long long res, long long msqid_, long long cmd_, void *buf_) {
2159 PRE_SYSCALL(compat_50___shmctl13)
2160 (long long shmid_, long long cmd_, void *buf_) {
2163 POST_SYSCALL(compat_50___shmctl13)
2164 (long long res, long long shmid_, long long cmd_, void *buf_) {
2167 PRE_SYSCALL(lchflags)(void *path_, long long flags_) {
2168 const char *path = (const char *)path_;
2170 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2173 POST_SYSCALL(lchflags)(long long res, void *path_, long long flags_) {
2174 const char *path = (const char *)path_;
2176 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2179 PRE_SYSCALL(issetugid)(void) { /* Nothing to do */ }
2180 POST_SYSCALL(issetugid)(long long res) { /* Nothing to do */ }
2181 PRE_SYSCALL(utrace)(void *label_, void *addr_, long long len_) {
2182 const char *label = (const char *)label_;
2184 PRE_READ(label, __sanitizer::internal_strlen(label) + 1);
2187 PRE_READ(addr_, len_);
2190 POST_SYSCALL(utrace)(long long res, void *label_, void *addr_, long long len_) {
2191 const char *label = (const char *)label_;
2193 POST_READ(label, __sanitizer::internal_strlen(label) + 1);
2196 POST_READ(addr_, len_);
2199 PRE_SYSCALL(getcontext)(void *ucp_) { /* Nothing to do */ }
2200 POST_SYSCALL(getcontext)(long long res, void *ucp_) { /* Nothing to do */ }
2201 PRE_SYSCALL(setcontext)(void *ucp_) {
2203 PRE_READ(ucp_, ucontext_t_sz);
2206 POST_SYSCALL(setcontext)(long long res, void *ucp_) {}
2207 PRE_SYSCALL(_lwp_create)(void *ucp_, long long flags_, void *new_lwp_) {
2209 PRE_READ(ucp_, ucontext_t_sz);
2212 POST_SYSCALL(_lwp_create)
2213 (long long res, void *ucp_, long long flags_, void *new_lwp_) {}
2214 PRE_SYSCALL(_lwp_exit)(void) { /* Nothing to do */ }
2215 POST_SYSCALL(_lwp_exit)(long long res) { /* Nothing to do */ }
2216 PRE_SYSCALL(_lwp_self)(void) { /* Nothing to do */ }
2217 POST_SYSCALL(_lwp_self)(long long res) { /* Nothing to do */ }
2218 PRE_SYSCALL(_lwp_wait)(long long wait_for_, void *departed_) {
2221 POST_SYSCALL(_lwp_wait)(long long res, long long wait_for_, void *departed_) {
2224 PRE_SYSCALL(_lwp_suspend)(long long target_) { /* Nothing to do */ }
2225 POST_SYSCALL(_lwp_suspend)(long long res, long long target_) {
2228 PRE_SYSCALL(_lwp_continue)(long long target_) { /* Nothing to do */ }
2229 POST_SYSCALL(_lwp_continue)(long long res, long long target_) {
2232 PRE_SYSCALL(_lwp_wakeup)(long long target_) { /* Nothing to do */ }
2233 POST_SYSCALL(_lwp_wakeup)(long long res, long long target_) {
2236 PRE_SYSCALL(_lwp_getprivate)(void) { /* Nothing to do */ }
2237 POST_SYSCALL(_lwp_getprivate)(long long res) { /* Nothing to do */ }
2238 PRE_SYSCALL(_lwp_setprivate)(void *ptr_) { /* Nothing to do */ }
2239 POST_SYSCALL(_lwp_setprivate)(long long res, void *ptr_) { /* Nothing to do */ }
2240 PRE_SYSCALL(_lwp_kill)(long long target_, long long signo_) {
2243 POST_SYSCALL(_lwp_kill)(long long res, long long target_, long long signo_) {
2246 PRE_SYSCALL(_lwp_detach)(long long target_) { /* Nothing to do */ }
2247 POST_SYSCALL(_lwp_detach)(long long res, long long target_) {
2250 PRE_SYSCALL(compat_50__lwp_park)
2251 (void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
2254 POST_SYSCALL(compat_50__lwp_park)
2255 (long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
2258 PRE_SYSCALL(_lwp_unpark)(long long target_, void *hint_) { /* Nothing to do */ }
2259 POST_SYSCALL(_lwp_unpark)(long long res, long long target_, void *hint_) {
2262 PRE_SYSCALL(_lwp_unpark_all)(void *targets_, long long ntargets_, void *hint_) {
2264 PRE_READ(targets_, ntargets_ * sizeof(__sanitizer_lwpid_t));
2267 POST_SYSCALL(_lwp_unpark_all)
2268 (long long res, void *targets_, long long ntargets_, void *hint_) {}
2269 PRE_SYSCALL(_lwp_setname)(long long target_, void *name_) {
2270 const char *name = (const char *)name_;
2272 PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
2275 POST_SYSCALL(_lwp_setname)(long long res, long long target_, void *name_) {
2276 const char *name = (const char *)name_;
2278 POST_READ(name, __sanitizer::internal_strlen(name) + 1);
2281 PRE_SYSCALL(_lwp_getname)(long long target_, void *name_, long long len_) {
2284 POST_SYSCALL(_lwp_getname)
2285 (long long res, long long target_, void *name_, long long len_) {
2288 PRE_SYSCALL(_lwp_ctl)(long long features_, void **address_) {
2291 POST_SYSCALL(_lwp_ctl)(long long res, long long features_, void **address_) {
2294 /* syscall 326 has been skipped */
2295 /* syscall 327 has been skipped */
2296 /* syscall 328 has been skipped */
2297 /* syscall 329 has been skipped */
2298 PRE_SYSCALL(compat_60_sa_register)
2299 (void *newv_, void **oldv_, long long flags_, long long stackinfo_offset_) {
2302 POST_SYSCALL(compat_60_sa_register)
2303 (long long res, void *newv_, void **oldv_, long long flags_,
2304 long long stackinfo_offset_) {
2307 PRE_SYSCALL(compat_60_sa_stacks)(long long num_, void *stacks_) { /* TODO */ }
2308 POST_SYSCALL(compat_60_sa_stacks)
2309 (long long res, long long num_, void *stacks_) {
2312 PRE_SYSCALL(compat_60_sa_enable)(void) { /* TODO */ }
2313 POST_SYSCALL(compat_60_sa_enable)(long long res) { /* TODO */ }
2314 PRE_SYSCALL(compat_60_sa_setconcurrency)(long long concurrency_) { /* TODO */ }
2315 POST_SYSCALL(compat_60_sa_setconcurrency)
2316 (long long res, long long concurrency_) {
2319 PRE_SYSCALL(compat_60_sa_yield)(void) { /* TODO */ }
2320 POST_SYSCALL(compat_60_sa_yield)(long long res) { /* TODO */ }
2321 PRE_SYSCALL(compat_60_sa_preempt)(long long sa_id_) { /* TODO */ }
2322 POST_SYSCALL(compat_60_sa_preempt)(long long res, long long sa_id_) {
2325 /* syscall 336 has been skipped */
2326 /* syscall 337 has been skipped */
2327 /* syscall 338 has been skipped */
2328 /* syscall 339 has been skipped */
2329 PRE_SYSCALL(__sigaction_sigtramp)
2330 (long long signum_, void *nsa_, void *osa_, void *tramp_, long long vers_) {
2332 PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
2335 POST_SYSCALL(__sigaction_sigtramp)
2336 (long long res, long long signum_, void *nsa_, void *osa_, void *tramp_,
2339 PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
2342 PRE_SYSCALL(pmc_get_info)(long long ctr_, long long op_, void *args_) {
2345 POST_SYSCALL(pmc_get_info)
2346 (long long res, long long ctr_, long long op_, void *args_) {
2349 PRE_SYSCALL(pmc_control)(long long ctr_, long long op_, void *args_) {
2352 POST_SYSCALL(pmc_control)
2353 (long long res, long long ctr_, long long op_, void *args_) {
2356 PRE_SYSCALL(rasctl)(void *addr_, long long len_, long long op_) {
2359 POST_SYSCALL(rasctl)
2360 (long long res, void *addr_, long long len_, long long op_) {
2363 PRE_SYSCALL(kqueue)(void) { /* Nothing to do */ }
2364 POST_SYSCALL(kqueue)(long long res) { /* Nothing to do */ }
2365 PRE_SYSCALL(compat_50_kevent)
2366 (long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
2367 long long nevents_, void *timeout_) {
2370 POST_SYSCALL(compat_50_kevent)
2371 (long long res, long long fd_, void *changelist_, long long nchanges_,
2372 void *eventlist_, long long nevents_, void *timeout_) {
2375 PRE_SYSCALL(_sched_setparam)
2376 (long long pid_, long long lid_, long long policy_, void *params_) {
2378 PRE_READ(params_, struct_sched_param_sz);
2381 POST_SYSCALL(_sched_setparam)
2382 (long long res, long long pid_, long long lid_, long long policy_,
2385 PRE_READ(params_, struct_sched_param_sz);
2388 PRE_SYSCALL(_sched_getparam)
2389 (long long pid_, long long lid_, void *policy_, void *params_) {
2392 POST_SYSCALL(_sched_getparam)
2393 (long long res, long long pid_, long long lid_, void *policy_, void *params_) {
2396 PRE_SYSCALL(_sched_setaffinity)
2397 (long long pid_, long long lid_, long long size_, void *cpuset_) {
2399 PRE_READ(cpuset_, size_);
2402 POST_SYSCALL(_sched_setaffinity)
2403 (long long res, long long pid_, long long lid_, long long size_,
2406 PRE_READ(cpuset_, size_);
2409 PRE_SYSCALL(_sched_getaffinity)
2410 (long long pid_, long long lid_, long long size_, void *cpuset_) {
2413 POST_SYSCALL(_sched_getaffinity)
2414 (long long res, long long pid_, long long lid_, long long size_,
2418 PRE_SYSCALL(sched_yield)(void) { /* Nothing to do */ }
2419 POST_SYSCALL(sched_yield)(long long res) { /* Nothing to do */ }
2420 PRE_SYSCALL(_sched_protect)(long long priority_) { /* Nothing to do */ }
2421 POST_SYSCALL(_sched_protect)(long long res, long long priority_) {
2424 /* syscall 352 has been skipped */
2425 /* syscall 353 has been skipped */
2426 PRE_SYSCALL(fsync_range)
2427 (long long fd_, long long flags_, long long start_, long long length_) {
2430 POST_SYSCALL(fsync_range)
2431 (long long res, long long fd_, long long flags_, long long start_,
2432 long long length_) {
2435 PRE_SYSCALL(uuidgen)(void *store_, long long count_) { /* Nothing to do */ }
2436 POST_SYSCALL(uuidgen)(long long res, void *store_, long long count_) {
2439 PRE_SYSCALL(getvfsstat)(void *buf_, long long bufsize_, long long flags_) {
2442 POST_SYSCALL(getvfsstat)
2443 (long long res, void *buf_, long long bufsize_, long long flags_) {
2446 PRE_SYSCALL(statvfs1)(void *path_, void *buf_, long long flags_) {
2447 const char *path = (const char *)path_;
2449 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2452 POST_SYSCALL(statvfs1)
2453 (long long res, void *path_, void *buf_, long long flags_) {
2454 const char *path = (const char *)path_;
2456 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2459 PRE_SYSCALL(fstatvfs1)(long long fd_, void *buf_, long long flags_) {
2462 POST_SYSCALL(fstatvfs1)
2463 (long long res, long long fd_, void *buf_, long long flags_) {
2466 PRE_SYSCALL(compat_30_fhstatvfs1)(void *fhp_, void *buf_, long long flags_) {
2469 POST_SYSCALL(compat_30_fhstatvfs1)
2470 (long long res, void *fhp_, void *buf_, long long flags_) {
2473 PRE_SYSCALL(extattrctl)
2474 (void *path_, long long cmd_, void *filename_, long long attrnamespace_,
2476 const char *path = (const char *)path_;
2478 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2481 POST_SYSCALL(extattrctl)
2482 (long long res, void *path_, long long cmd_, void *filename_,
2483 long long attrnamespace_, void *attrname_) {
2484 const char *path = (const char *)path_;
2486 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2489 PRE_SYSCALL(extattr_set_file)
2490 (void *path_, long long attrnamespace_, void *attrname_, void *data_,
2491 long long nbytes_) {
2492 const char *path = (const char *)path_;
2494 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2497 POST_SYSCALL(extattr_set_file)
2498 (long long res, void *path_, long long attrnamespace_, void *attrname_,
2499 void *data_, long long nbytes_) {
2500 const char *path = (const char *)path_;
2502 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2505 PRE_SYSCALL(extattr_get_file)
2506 (void *path_, long long attrnamespace_, void *attrname_, void *data_,
2507 long long nbytes_) {
2508 const char *path = (const char *)path_;
2510 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2513 POST_SYSCALL(extattr_get_file)
2514 (long long res, void *path_, long long attrnamespace_, void *attrname_,
2515 void *data_, long long nbytes_) {
2516 const char *path = (const char *)path_;
2518 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2521 PRE_SYSCALL(extattr_delete_file)
2522 (void *path_, long long attrnamespace_, void *attrname_) {
2523 const char *path = (const char *)path_;
2525 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2528 POST_SYSCALL(extattr_delete_file)
2529 (long long res, void *path_, long long attrnamespace_, void *attrname_) {
2530 const char *path = (const char *)path_;
2532 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2535 PRE_SYSCALL(extattr_set_fd)
2536 (long long fd_, long long attrnamespace_, void *attrname_, void *data_,
2537 long long nbytes_) {
2540 POST_SYSCALL(extattr_set_fd)
2541 (long long res, long long fd_, long long attrnamespace_, void *attrname_,
2542 void *data_, long long nbytes_) {
2545 PRE_SYSCALL(extattr_get_fd)
2546 (long long fd_, long long attrnamespace_, void *attrname_, void *data_,
2547 long long nbytes_) {
2550 POST_SYSCALL(extattr_get_fd)
2551 (long long res, long long fd_, long long attrnamespace_, void *attrname_,
2552 void *data_, long long nbytes_) {
2555 PRE_SYSCALL(extattr_delete_fd)
2556 (long long fd_, long long attrnamespace_, void *attrname_) {
2559 POST_SYSCALL(extattr_delete_fd)
2560 (long long res, long long fd_, long long attrnamespace_, void *attrname_) {
2563 PRE_SYSCALL(extattr_set_link)
2564 (void *path_, long long attrnamespace_, void *attrname_, void *data_,
2565 long long nbytes_) {
2566 const char *path = (const char *)path_;
2568 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2571 POST_SYSCALL(extattr_set_link)
2572 (long long res, void *path_, long long attrnamespace_, void *attrname_,
2573 void *data_, long long nbytes_) {
2574 const char *path = (const char *)path_;
2576 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2579 PRE_SYSCALL(extattr_get_link)
2580 (void *path_, long long attrnamespace_, void *attrname_, void *data_,
2581 long long nbytes_) {
2582 const char *path = (const char *)path_;
2584 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2587 POST_SYSCALL(extattr_get_link)
2588 (long long res, void *path_, long long attrnamespace_, void *attrname_,
2589 void *data_, long long nbytes_) {
2590 const char *path = (const char *)path_;
2592 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2595 PRE_SYSCALL(extattr_delete_link)
2596 (void *path_, long long attrnamespace_, void *attrname_) {
2597 const char *path = (const char *)path_;
2599 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2602 POST_SYSCALL(extattr_delete_link)
2603 (long long res, void *path_, long long attrnamespace_, void *attrname_) {
2604 const char *path = (const char *)path_;
2606 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2609 PRE_SYSCALL(extattr_list_fd)
2610 (long long fd_, long long attrnamespace_, void *data_, long long nbytes_) {
2613 POST_SYSCALL(extattr_list_fd)
2614 (long long res, long long fd_, long long attrnamespace_, void *data_,
2615 long long nbytes_) {
2618 PRE_SYSCALL(extattr_list_file)
2619 (void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
2620 const char *path = (const char *)path_;
2622 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2625 POST_SYSCALL(extattr_list_file)
2626 (long long res, void *path_, long long attrnamespace_, void *data_,
2627 long long nbytes_) {
2628 const char *path = (const char *)path_;
2630 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2633 PRE_SYSCALL(extattr_list_link)
2634 (void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
2635 const char *path = (const char *)path_;
2637 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2640 POST_SYSCALL(extattr_list_link)
2641 (long long res, void *path_, long long attrnamespace_, void *data_,
2642 long long nbytes_) {
2643 const char *path = (const char *)path_;
2645 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2648 PRE_SYSCALL(compat_50_pselect)
2649 (long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
2652 POST_SYSCALL(compat_50_pselect)
2653 (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
2657 PRE_SYSCALL(compat_50_pollts)
2658 (void *fds_, long long nfds_, void *ts_, void *mask_) {
2661 POST_SYSCALL(compat_50_pollts)
2662 (long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {
2665 PRE_SYSCALL(setxattr)
2666 (void *path_, void *name_, void *value_, long long size_, long long flags_) {
2667 const char *path = (const char *)path_;
2669 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2672 POST_SYSCALL(setxattr)
2673 (long long res, void *path_, void *name_, void *value_, long long size_,
2675 const char *path = (const char *)path_;
2677 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2680 PRE_SYSCALL(lsetxattr)
2681 (void *path_, void *name_, void *value_, long long size_, long long flags_) {
2682 const char *path = (const char *)path_;
2684 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2687 POST_SYSCALL(lsetxattr)
2688 (long long res, void *path_, void *name_, void *value_, long long size_,
2690 const char *path = (const char *)path_;
2692 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2695 PRE_SYSCALL(fsetxattr)
2696 (long long fd_, void *name_, void *value_, long long size_, long long flags_) {
2699 POST_SYSCALL(fsetxattr)
2700 (long long res, long long fd_, void *name_, void *value_, long long size_,
2704 PRE_SYSCALL(getxattr)(void *path_, void *name_, void *value_, long long size_) {
2705 const char *path = (const char *)path_;
2707 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2710 POST_SYSCALL(getxattr)
2711 (long long res, void *path_, void *name_, void *value_, long long size_) {
2712 const char *path = (const char *)path_;
2714 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2717 PRE_SYSCALL(lgetxattr)
2718 (void *path_, void *name_, void *value_, long long size_) {
2719 const char *path = (const char *)path_;
2721 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2724 POST_SYSCALL(lgetxattr)
2725 (long long res, void *path_, void *name_, void *value_, long long size_) {
2726 const char *path = (const char *)path_;
2728 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2731 PRE_SYSCALL(fgetxattr)
2732 (long long fd_, void *name_, void *value_, long long size_) {
2735 POST_SYSCALL(fgetxattr)
2736 (long long res, long long fd_, void *name_, void *value_, long long size_) {
2739 PRE_SYSCALL(listxattr)(void *path_, void *list_, long long size_) {
2740 const char *path = (const char *)path_;
2742 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2745 POST_SYSCALL(listxattr)
2746 (long long res, void *path_, void *list_, long long size_) {
2747 const char *path = (const char *)path_;
2749 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2752 PRE_SYSCALL(llistxattr)(void *path_, void *list_, long long size_) {
2753 const char *path = (const char *)path_;
2755 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2758 POST_SYSCALL(llistxattr)
2759 (long long res, void *path_, void *list_, long long size_) {
2760 const char *path = (const char *)path_;
2762 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2765 PRE_SYSCALL(flistxattr)(long long fd_, void *list_, long long size_) {
2768 POST_SYSCALL(flistxattr)
2769 (long long res, long long fd_, void *list_, long long size_) {
2772 PRE_SYSCALL(removexattr)(void *path_, void *name_) {
2773 const char *path = (const char *)path_;
2775 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2778 POST_SYSCALL(removexattr)(long long res, void *path_, void *name_) {
2779 const char *path = (const char *)path_;
2781 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2784 PRE_SYSCALL(lremovexattr)(void *path_, void *name_) {
2785 const char *path = (const char *)path_;
2787 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2790 POST_SYSCALL(lremovexattr)(long long res, void *path_, void *name_) {
2791 const char *path = (const char *)path_;
2793 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2796 PRE_SYSCALL(fremovexattr)(long long fd_, void *name_) { /* TODO */ }
2797 POST_SYSCALL(fremovexattr)(long long res, long long fd_, void *name_) {
2800 PRE_SYSCALL(compat_50___stat30)(void *path_, void *ub_) { /* TODO */ }
2801 POST_SYSCALL(compat_50___stat30)(long long res, void *path_, void *ub_) {
2804 PRE_SYSCALL(compat_50___fstat30)(long long fd_, void *sb_) { /* TODO */ }
2805 POST_SYSCALL(compat_50___fstat30)(long long res, long long fd_, void *sb_) {
2808 PRE_SYSCALL(compat_50___lstat30)(void *path_, void *ub_) { /* TODO */ }
2809 POST_SYSCALL(compat_50___lstat30)(long long res, void *path_, void *ub_) {
2812 PRE_SYSCALL(__getdents30)(long long fd_, void *buf_, long long count_) {
2815 POST_SYSCALL(__getdents30)
2816 (long long res, long long fd_, void *buf_, long long count_) {
2819 PRE_SYSCALL(posix_fadvise)(long long) { /* Nothing to do */ }
2820 POST_SYSCALL(posix_fadvise)(long long res, long long) { /* Nothing to do */ }
2821 PRE_SYSCALL(compat_30___fhstat30)(void *fhp_, void *sb_) { /* TODO */ }
2822 POST_SYSCALL(compat_30___fhstat30)(long long res, void *fhp_, void *sb_) {
2825 PRE_SYSCALL(compat_50___ntp_gettime30)(void *ntvp_) { /* TODO */ }
2826 POST_SYSCALL(compat_50___ntp_gettime30)(long long res, void *ntvp_) {
2829 PRE_SYSCALL(__socket30)
2830 (long long domain_, long long type_, long long protocol_) {
2833 POST_SYSCALL(__socket30)
2834 (long long res, long long domain_, long long type_, long long protocol_) {
2837 PRE_SYSCALL(__getfh30)(void *fname_, void *fhp_, void *fh_size_) {
2838 const char *fname = (const char *)fname_;
2840 PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
2843 POST_SYSCALL(__getfh30)
2844 (long long res, void *fname_, void *fhp_, void *fh_size_) {
2845 const char *fname = (const char *)fname_;
2848 POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
2852 PRE_SYSCALL(__fhopen40)(void *fhp_, long long fh_size_, long long flags_) {
2854 PRE_READ(fhp_, fh_size_);
2857 POST_SYSCALL(__fhopen40)
2858 (long long res, void *fhp_, long long fh_size_, long long flags_) {}
2859 PRE_SYSCALL(__fhstatvfs140)
2860 (void *fhp_, long long fh_size_, void *buf_, long long flags_) {
2862 PRE_READ(fhp_, fh_size_);
2865 POST_SYSCALL(__fhstatvfs140)
2866 (long long res, void *fhp_, long long fh_size_, void *buf_, long long flags_) {}
2867 PRE_SYSCALL(compat_50___fhstat40)(void *fhp_, long long fh_size_, void *sb_) {
2869 PRE_READ(fhp_, fh_size_);
2872 POST_SYSCALL(compat_50___fhstat40)
2873 (long long res, void *fhp_, long long fh_size_, void *sb_) {}
2874 PRE_SYSCALL(aio_cancel)(long long fildes_, void *aiocbp_) {
2876 PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2879 POST_SYSCALL(aio_cancel)(long long res, long long fildes_, void *aiocbp_) {}
2880 PRE_SYSCALL(aio_error)(void *aiocbp_) {
2882 PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2885 POST_SYSCALL(aio_error)(long long res, void *aiocbp_) {}
2886 PRE_SYSCALL(aio_fsync)(long long op_, void *aiocbp_) {
2888 PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2891 POST_SYSCALL(aio_fsync)(long long res, long long op_, void *aiocbp_) {}
2892 PRE_SYSCALL(aio_read)(void *aiocbp_) {
2894 PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2897 POST_SYSCALL(aio_read)(long long res, void *aiocbp_) {}
2898 PRE_SYSCALL(aio_return)(void *aiocbp_) {
2900 PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2903 POST_SYSCALL(aio_return)(long long res, void *aiocbp_) {}
2904 PRE_SYSCALL(compat_50_aio_suspend)
2905 (void *list_, long long nent_, void *timeout_) {
2908 POST_SYSCALL(compat_50_aio_suspend)
2909 (long long res, void *list_, long long nent_, void *timeout_) {
2912 PRE_SYSCALL(aio_write)(void *aiocbp_) {
2914 PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2917 POST_SYSCALL(aio_write)(long long res, void *aiocbp_) {}
2918 PRE_SYSCALL(lio_listio)
2919 (long long mode_, void *list_, long long nent_, void *sig_) {
2922 POST_SYSCALL(lio_listio)
2923 (long long res, long long mode_, void *list_, long long nent_, void *sig_) {
2926 /* syscall 407 has been skipped */
2927 /* syscall 408 has been skipped */
2928 /* syscall 409 has been skipped */
2929 PRE_SYSCALL(__mount50)
2930 (void *type_, void *path_, long long flags_, void *data_, long long data_len_) {
2931 const char *type = (const char *)type_;
2932 const char *path = (const char *)path_;
2934 PRE_READ(type, __sanitizer::internal_strlen(type) + 1);
2937 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2940 PRE_READ(data_, data_len_);
2943 POST_SYSCALL(__mount50)
2944 (long long res, void *type_, void *path_, long long flags_, void *data_,
2945 long long data_len_) {
2946 const char *type = (const char *)type_;
2947 const char *path = (const char *)path_;
2949 POST_READ(type, __sanitizer::internal_strlen(type) + 1);
2952 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2955 POST_READ(data_, data_len_);
2959 (void *old_address_, long long old_size_, void *new_address_,
2960 long long new_size_, long long flags_) {
2963 POST_SYSCALL(mremap)
2964 (long long res, void *old_address_, long long old_size_, void *new_address_,
2965 long long new_size_, long long flags_) {
2968 PRE_SYSCALL(pset_create)(void *psid_) { /* Nothing to do */ }
2969 POST_SYSCALL(pset_create)(long long res, void *psid_) { /* Nothing to do */ }
2970 PRE_SYSCALL(pset_destroy)(long long psid_) { /* Nothing to do */ }
2971 POST_SYSCALL(pset_destroy)(long long res, long long psid_) {
2974 PRE_SYSCALL(pset_assign)(long long psid_, long long cpuid_, void *opsid_) {
2977 POST_SYSCALL(pset_assign)
2978 (long long res, long long psid_, long long cpuid_, void *opsid_) {
2981 PRE_SYSCALL(_pset_bind)
2982 (long long idtype_, long long first_id_, long long second_id_, long long psid_,
2986 POST_SYSCALL(_pset_bind)
2987 (long long res, long long idtype_, long long first_id_, long long second_id_,
2988 long long psid_, void *opsid_) {
2991 PRE_SYSCALL(__posix_fadvise50)
2992 (long long fd_, long long PAD_, long long offset_, long long len_,
2993 long long advice_) {
2996 POST_SYSCALL(__posix_fadvise50)
2997 (long long res, long long fd_, long long PAD_, long long offset_,
2998 long long len_, long long advice_) {
3001 PRE_SYSCALL(__select50)
3002 (long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
3005 POST_SYSCALL(__select50)
3006 (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
3009 PRE_SYSCALL(__gettimeofday50)(void *tp_, void *tzp_) { /* Nothing to do */ }
3010 POST_SYSCALL(__gettimeofday50)(long long res, void *tp_, void *tzp_) {
3013 PRE_SYSCALL(__settimeofday50)(void *tv_, void *tzp_) {
3015 PRE_READ(tv_, timeval_sz);
3018 PRE_READ(tzp_, struct_timezone_sz);
3021 POST_SYSCALL(__settimeofday50)(long long res, void *tv_, void *tzp_) {}
3022 PRE_SYSCALL(__utimes50)(void *path_, void *tptr_) {
3023 struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3024 const char *path = (const char *)path_;
3026 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3029 PRE_READ(tptr[0], struct_timespec_sz);
3030 PRE_READ(tptr[1], struct_timespec_sz);
3033 POST_SYSCALL(__utimes50)(long long res, void *path_, void *tptr_) {}
3034 PRE_SYSCALL(__adjtime50)(void *delta_, void *olddelta_) {
3036 PRE_READ(delta_, timeval_sz);
3039 POST_SYSCALL(__adjtime50)(long long res, void *delta_, void *olddelta_) {}
3040 PRE_SYSCALL(__lfs_segwait50)(void *fsidp_, void *tv_) { /* TODO */ }
3041 POST_SYSCALL(__lfs_segwait50)(long long res, void *fsidp_, void *tv_) {
3044 PRE_SYSCALL(__futimes50)(long long fd_, void *tptr_) {
3045 struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3047 PRE_READ(tptr[0], struct_timespec_sz);
3048 PRE_READ(tptr[1], struct_timespec_sz);
3051 POST_SYSCALL(__futimes50)(long long res, long long fd_, void *tptr_) {}
3052 PRE_SYSCALL(__lutimes50)(void *path_, void *tptr_) {
3053 struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3054 const char *path = (const char *)path_;
3056 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3059 PRE_READ(tptr[0], struct_timespec_sz);
3060 PRE_READ(tptr[1], struct_timespec_sz);
3063 POST_SYSCALL(__lutimes50)(long long res, void *path_, void *tptr_) {
3064 struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3065 const char *path = (const char *)path_;
3067 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3070 POST_READ(tptr[0], struct_timespec_sz);
3071 POST_READ(tptr[1], struct_timespec_sz);
3074 PRE_SYSCALL(__setitimer50)(long long which_, void *itv_, void *oitv_) {
3075 struct __sanitizer_itimerval *itv = (struct __sanitizer_itimerval *)itv_;
3077 PRE_READ(&itv->it_interval.tv_sec, sizeof(__sanitizer_time_t));
3078 PRE_READ(&itv->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
3079 PRE_READ(&itv->it_value.tv_sec, sizeof(__sanitizer_time_t));
3080 PRE_READ(&itv->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
3083 POST_SYSCALL(__setitimer50)
3084 (long long res, long long which_, void *itv_, void *oitv_) {}
3085 PRE_SYSCALL(__getitimer50)(long long which_, void *itv_) { /* Nothing to do */ }
3086 POST_SYSCALL(__getitimer50)(long long res, long long which_, void *itv_) {
3089 PRE_SYSCALL(__clock_gettime50)(long long clock_id_, void *tp_) {
3092 POST_SYSCALL(__clock_gettime50)(long long res, long long clock_id_, void *tp_) {
3095 PRE_SYSCALL(__clock_settime50)(long long clock_id_, void *tp_) {
3097 PRE_READ(tp_, struct_timespec_sz);
3100 POST_SYSCALL(__clock_settime50)
3101 (long long res, long long clock_id_, void *tp_) {}
3102 PRE_SYSCALL(__clock_getres50)(long long clock_id_, void *tp_) {
3105 POST_SYSCALL(__clock_getres50)(long long res, long long clock_id_, void *tp_) {
3108 PRE_SYSCALL(__nanosleep50)(void *rqtp_, void *rmtp_) {
3110 PRE_READ(rqtp_, struct_timespec_sz);
3113 POST_SYSCALL(__nanosleep50)(long long res, void *rqtp_, void *rmtp_) {}
3114 PRE_SYSCALL(____sigtimedwait50)(void *set_, void *info_, void *timeout_) {
3116 PRE_READ(set_, sizeof(__sanitizer_sigset_t));
3119 PRE_READ(timeout_, struct_timespec_sz);
3122 POST_SYSCALL(____sigtimedwait50)
3123 (long long res, void *set_, void *info_, void *timeout_) {}
3124 PRE_SYSCALL(__mq_timedsend50)
3125 (long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
3126 void *abs_timeout_) {
3128 PRE_READ(msg_ptr_, msg_len_);
3131 PRE_READ(abs_timeout_, struct_timespec_sz);
3134 POST_SYSCALL(__mq_timedsend50)
3135 (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
3136 long long msg_prio_, void *abs_timeout_) {}
3137 PRE_SYSCALL(__mq_timedreceive50)
3138 (long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
3139 void *abs_timeout_) {
3141 PRE_READ(msg_ptr_, msg_len_);
3144 PRE_READ(abs_timeout_, struct_timespec_sz);
3147 POST_SYSCALL(__mq_timedreceive50)
3148 (long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
3149 void *msg_prio_, void *abs_timeout_) {}
3150 PRE_SYSCALL(compat_60__lwp_park)
3151 (void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
3154 POST_SYSCALL(compat_60__lwp_park)
3155 (long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
3158 PRE_SYSCALL(__kevent50)
3159 (long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
3160 long long nevents_, void *timeout_) {
3162 PRE_READ(changelist_, nchanges_ * struct_kevent_sz);
3165 PRE_READ(timeout_, struct_timespec_sz);
3168 POST_SYSCALL(__kevent50)
3169 (long long res, long long fd_, void *changelist_, long long nchanges_,
3170 void *eventlist_, long long nevents_, void *timeout_) {}
3171 PRE_SYSCALL(__pselect50)
3172 (long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
3174 PRE_READ(ts_, struct_timespec_sz);
3177 PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));
3180 POST_SYSCALL(__pselect50)
3181 (long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
3183 PRE_SYSCALL(__pollts50)(void *fds_, long long nfds_, void *ts_, void *mask_) {
3185 PRE_READ(ts_, struct_timespec_sz);
3188 PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));
3191 POST_SYSCALL(__pollts50)
3192 (long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {}
3193 PRE_SYSCALL(__aio_suspend50)(void *list_, long long nent_, void *timeout_) {
3195 const struct aiocb *const *list = (const struct aiocb *const *)list_;
3197 for (i = 0; i < nent_; i++) {
3199 PRE_READ(list[i], sizeof(struct __sanitizer_aiocb));
3204 PRE_READ(timeout_, struct_timespec_sz);
3207 POST_SYSCALL(__aio_suspend50)
3208 (long long res, void *list_, long long nent_, void *timeout_) {}
3209 PRE_SYSCALL(__stat50)(void *path_, void *ub_) {
3210 const char *path = (const char *)path_;
3212 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3215 POST_SYSCALL(__stat50)(long long res, void *path_, void *ub_) {
3216 const char *path = (const char *)path_;
3219 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3223 PRE_SYSCALL(__fstat50)(long long fd_, void *sb_) { /* Nothing to do */ }
3224 POST_SYSCALL(__fstat50)(long long res, long long fd_, void *sb_) {
3227 PRE_SYSCALL(__lstat50)(void *path_, void *ub_) {
3228 const char *path = (const char *)path_;
3230 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3233 POST_SYSCALL(__lstat50)(long long res, void *path_, void *ub_) {
3234 const char *path = (const char *)path_;
3237 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3241 PRE_SYSCALL(____semctl50)
3242 (long long semid_, long long semnum_, long long cmd_, void *arg_) {
3245 POST_SYSCALL(____semctl50)
3246 (long long res, long long semid_, long long semnum_, long long cmd_,
3250 PRE_SYSCALL(__shmctl50)(long long shmid_, long long cmd_, void *buf_) {
3253 POST_SYSCALL(__shmctl50)
3254 (long long res, long long shmid_, long long cmd_, void *buf_) {
3257 PRE_SYSCALL(__msgctl50)(long long msqid_, long long cmd_, void *buf_) {
3260 POST_SYSCALL(__msgctl50)
3261 (long long res, long long msqid_, long long cmd_, void *buf_) {
3264 PRE_SYSCALL(__getrusage50)(long long who_, void *rusage_) {
3267 POST_SYSCALL(__getrusage50)(long long res, long long who_, void *rusage_) {
3270 PRE_SYSCALL(__timer_settime50)
3271 (long long timerid_, long long flags_, void *value_, void *ovalue_) {
3272 struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
3274 PRE_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
3275 PRE_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
3276 PRE_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));
3277 PRE_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
3280 POST_SYSCALL(__timer_settime50)
3281 (long long res, long long timerid_, long long flags_, void *value_,
3283 struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
3286 POST_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
3287 POST_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
3288 POST_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));
3289 POST_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
3293 PRE_SYSCALL(__timer_gettime50)(long long timerid_, void *value_) {
3296 POST_SYSCALL(__timer_gettime50)
3297 (long long res, long long timerid_, void *value_) {
3300 #if defined(NTP) || !defined(_KERNEL_OPT)
3301 PRE_SYSCALL(__ntp_gettime50)(void *ntvp_) { /* Nothing to do */ }
3302 POST_SYSCALL(__ntp_gettime50)(long long res, void *ntvp_) {
3306 /* syscall 448 has been skipped */
3308 PRE_SYSCALL(__wait450)
3309 (long long pid_, void *status_, long long options_, void *rusage_) {
3312 POST_SYSCALL(__wait450)
3313 (long long res, long long pid_, void *status_, long long options_,
3317 PRE_SYSCALL(__mknod50)(void *path_, long long mode_, long long dev_) {
3318 const char *path = (const char *)path_;
3320 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3323 POST_SYSCALL(__mknod50)
3324 (long long res, void *path_, long long mode_, long long dev_) {
3325 const char *path = (const char *)path_;
3328 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3332 PRE_SYSCALL(__fhstat50)(void *fhp_, long long fh_size_, void *sb_) {
3334 PRE_READ(fhp_, fh_size_);
3337 POST_SYSCALL(__fhstat50)
3338 (long long res, void *fhp_, long long fh_size_, void *sb_) {
3341 POST_READ(fhp_, fh_size_);
3345 /* syscall 452 has been skipped */
3346 PRE_SYSCALL(pipe2)(void *fildes_, long long flags_) { /* Nothing to do */ }
3347 POST_SYSCALL(pipe2)(long long res, void *fildes_, long long flags_) {
3350 PRE_SYSCALL(dup3)(long long from_, long long to_, long long flags_) {
3354 (long long res, long long from_, long long to_, long long flags_) {
3357 PRE_SYSCALL(kqueue1)(long long flags_) { /* Nothing to do */ }
3358 POST_SYSCALL(kqueue1)(long long res, long long flags_) { /* Nothing to do */ }
3359 PRE_SYSCALL(paccept)
3360 (long long s_, void *name_, void *anamelen_, void *mask_, long long flags_) {
3362 PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
3365 POST_SYSCALL(paccept)
3366 (long long res, long long s_, void *name_, void *anamelen_, void *mask_,
3370 PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
3375 (long long fd1_, void *name1_, long long fd2_, void *name2_, long long flags_) {
3376 const char *name1 = (const char *)name1_;
3377 const char *name2 = (const char *)name2_;
3379 PRE_READ(name1, __sanitizer::internal_strlen(name1) + 1);
3382 PRE_READ(name2, __sanitizer::internal_strlen(name2) + 1);
3385 POST_SYSCALL(linkat)
3386 (long long res, long long fd1_, void *name1_, long long fd2_, void *name2_,
3388 const char *name1 = (const char *)name1_;
3389 const char *name2 = (const char *)name2_;
3392 POST_READ(name1, __sanitizer::internal_strlen(name1) + 1);
3395 POST_READ(name2, __sanitizer::internal_strlen(name2) + 1);
3399 PRE_SYSCALL(renameat)
3400 (long long fromfd_, void *from_, long long tofd_, void *to_) {
3401 const char *from = (const char *)from_;
3402 const char *to = (const char *)to_;
3404 PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
3407 PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
3410 POST_SYSCALL(renameat)
3411 (long long res, long long fromfd_, void *from_, long long tofd_, void *to_) {
3412 const char *from = (const char *)from_;
3413 const char *to = (const char *)to_;
3416 POST_READ(from, __sanitizer::internal_strlen(from) + 1);
3419 POST_READ(to, __sanitizer::internal_strlen(to) + 1);
3423 PRE_SYSCALL(mkfifoat)(long long fd_, void *path_, long long mode_) {
3424 const char *path = (const char *)path_;
3426 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3429 POST_SYSCALL(mkfifoat)
3430 (long long res, long long fd_, void *path_, long long mode_) {
3431 const char *path = (const char *)path_;
3434 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3438 PRE_SYSCALL(mknodat)
3439 (long long fd_, void *path_, long long mode_, long long PAD_, long long dev_) {
3440 const char *path = (const char *)path_;
3442 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3445 POST_SYSCALL(mknodat)
3446 (long long res, long long fd_, void *path_, long long mode_, long long PAD_,
3448 const char *path = (const char *)path_;
3451 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3455 PRE_SYSCALL(mkdirat)(long long fd_, void *path_, long long mode_) {
3456 const char *path = (const char *)path_;
3458 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3461 POST_SYSCALL(mkdirat)
3462 (long long res, long long fd_, void *path_, long long mode_) {
3463 const char *path = (const char *)path_;
3466 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3470 PRE_SYSCALL(faccessat)
3471 (long long fd_, void *path_, long long amode_, long long flag_) {
3472 const char *path = (const char *)path_;
3474 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3477 POST_SYSCALL(faccessat)
3478 (long long res, long long fd_, void *path_, long long amode_, long long flag_) {
3479 const char *path = (const char *)path_;
3482 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3486 PRE_SYSCALL(fchmodat)
3487 (long long fd_, void *path_, long long mode_, long long flag_) {
3488 const char *path = (const char *)path_;
3490 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3493 POST_SYSCALL(fchmodat)
3494 (long long res, long long fd_, void *path_, long long mode_, long long flag_) {
3495 const char *path = (const char *)path_;
3498 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3502 PRE_SYSCALL(fchownat)
3503 (long long fd_, void *path_, long long owner_, long long group_,
3505 const char *path = (const char *)path_;
3507 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3510 POST_SYSCALL(fchownat)
3511 (long long res, long long fd_, void *path_, long long owner_, long long group_,
3513 const char *path = (const char *)path_;
3516 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3520 PRE_SYSCALL(fexecve)(long long fd_, void *argp_, void *envp_) { /* TODO */ }
3521 POST_SYSCALL(fexecve)(long long res, long long fd_, void *argp_, void *envp_) {
3524 PRE_SYSCALL(fstatat)(long long fd_, void *path_, void *buf_, long long flag_) {
3525 const char *path = (const char *)path_;
3527 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3530 POST_SYSCALL(fstatat)
3531 (long long res, long long fd_, void *path_, void *buf_, long long flag_) {
3532 const char *path = (const char *)path_;
3534 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3537 PRE_SYSCALL(utimensat)
3538 (long long fd_, void *path_, void *tptr_, long long flag_) {
3539 const char *path = (const char *)path_;
3541 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3544 PRE_READ(tptr_, struct_timespec_sz);
3547 POST_SYSCALL(utimensat)
3548 (long long res, long long fd_, void *path_, void *tptr_, long long flag_) {
3549 const char *path = (const char *)path_;
3552 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3555 POST_READ(tptr_, struct_timespec_sz);
3560 (long long fd_, void *path_, long long oflags_, long long mode_) {
3561 const char *path = (const char *)path_;
3563 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3566 POST_SYSCALL(openat)
3567 (long long res, long long fd_, void *path_, long long oflags_,
3569 const char *path = (const char *)path_;
3572 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3576 PRE_SYSCALL(readlinkat)
3577 (long long fd_, void *path_, void *buf_, long long bufsize_) {
3578 const char *path = (const char *)path_;
3580 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3583 POST_SYSCALL(readlinkat)
3584 (long long res, long long fd_, void *path_, void *buf_, long long bufsize_) {
3585 const char *path = (const char *)path_;
3588 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3592 PRE_SYSCALL(symlinkat)(void *path1_, long long fd_, void *path2_) {
3593 const char *path1 = (const char *)path1_;
3594 const char *path2 = (const char *)path2_;
3596 PRE_READ(path1, __sanitizer::internal_strlen(path1) + 1);
3599 PRE_READ(path2, __sanitizer::internal_strlen(path2) + 1);
3602 POST_SYSCALL(symlinkat)
3603 (long long res, void *path1_, long long fd_, void *path2_) {
3604 const char *path1 = (const char *)path1_;
3605 const char *path2 = (const char *)path2_;
3608 POST_READ(path1, __sanitizer::internal_strlen(path1) + 1);
3611 POST_READ(path2, __sanitizer::internal_strlen(path2) + 1);
3615 PRE_SYSCALL(unlinkat)(long long fd_, void *path_, long long flag_) {
3616 const char *path = (const char *)path_;
3618 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3621 POST_SYSCALL(unlinkat)
3622 (long long res, long long fd_, void *path_, long long flag_) {
3623 const char *path = (const char *)path_;
3626 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3630 PRE_SYSCALL(futimens)(long long fd_, void *tptr_) {
3631 struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3633 PRE_READ(tptr[0], struct_timespec_sz);
3634 PRE_READ(tptr[1], struct_timespec_sz);
3637 POST_SYSCALL(futimens)(long long res, long long fd_, void *tptr_) {
3638 struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3641 POST_READ(tptr[0], struct_timespec_sz);
3642 POST_READ(tptr[1], struct_timespec_sz);
3646 PRE_SYSCALL(__quotactl)(void *path_, void *args_) {
3647 const char *path = (const char *)path_;
3649 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3652 POST_SYSCALL(__quotactl)(long long res, void *path_, void *args_) {
3653 const char *path = (const char *)path_;
3656 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3660 PRE_SYSCALL(posix_spawn)
3661 (void *pid_, void *path_, void *file_actions_, void *attrp_, void *argv_,
3663 const char *path = (const char *)path_;
3665 PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3668 POST_SYSCALL(posix_spawn)
3669 (long long res, void *pid_, void *path_, void *file_actions_, void *attrp_,
3670 void *argv_, void *envp_) {
3671 const char *path = (const char *)path_;
3674 POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3678 PRE_SYSCALL(recvmmsg)
3679 (long long s_, void *mmsg_, long long vlen_, long long flags_, void *timeout_) {
3681 PRE_READ(timeout_, struct_timespec_sz);
3684 POST_SYSCALL(recvmmsg)
3685 (long long res, long long s_, void *mmsg_, long long vlen_, long long flags_,
3689 POST_READ(timeout_, struct_timespec_sz);
3693 PRE_SYSCALL(sendmmsg)
3694 (long long s_, void *mmsg_, long long vlen_, long long flags_) {
3695 struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
3696 unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);
3698 PRE_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);
3701 POST_SYSCALL(sendmmsg)
3702 (long long res, long long s_, void *mmsg_, long long vlen_, long long flags_) {
3703 struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
3704 unsigned int vlen = (vlen_ > 1024 ? 1024 : vlen_);
3707 POST_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) * vlen);
3711 PRE_SYSCALL(clock_nanosleep)
3712 (long long clock_id_, long long flags_, void *rqtp_, void *rmtp_) {
3714 PRE_READ(rqtp_, struct_timespec_sz);
3717 POST_SYSCALL(clock_nanosleep)
3718 (long long res, long long clock_id_, long long flags_, void *rqtp_,
3721 POST_READ(rqtp_, struct_timespec_sz);
3724 PRE_SYSCALL(___lwp_park60)
3725 (long long clock_id_, long long flags_, void *ts_, long long unpark_,
3726 void *hint_, void *unparkhint_) {
3728 PRE_READ(ts_, struct_timespec_sz);
3731 POST_SYSCALL(___lwp_park60)
3732 (long long res, long long clock_id_, long long flags_, void *ts_,
3733 long long unpark_, void *hint_, void *unparkhint_) {
3736 POST_READ(ts_, struct_timespec_sz);
3740 PRE_SYSCALL(posix_fallocate)
3741 (long long fd_, long long PAD_, long long pos_, long long len_) {
3744 POST_SYSCALL(posix_fallocate)
3745 (long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
3748 PRE_SYSCALL(fdiscard)
3749 (long long fd_, long long PAD_, long long pos_, long long len_) {
3752 POST_SYSCALL(fdiscard)
3753 (long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
3757 (long long idtype_, long long id_, void *status_, long long options_,
3758 void *wru_, void *info_) {
3762 (long long res, long long idtype_, long long id_, void *status_,
3763 long long options_, void *wru_, void *info_) {
3766 PRE_SYSCALL(clock_getcpuclockid2)
3767 (long long idtype_, long long id_, void *clock_id_) {
3770 POST_SYSCALL(clock_getcpuclockid2)
3771 (long long res, long long idtype_, long long id_, void *clock_id_) {
3774 #undef SYS_MAXSYSARGS
3784 #endif // SANITIZER_NETBSD