• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- sanitizer_syscalls_netbsd.inc ---------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Common syscalls handlers for tools like AddressSanitizer,
10// ThreadSanitizer, MemorySanitizer, etc.
11//
12// This file should be included into the tool's interceptor file,
13// which has to define it's own macros:
14//   COMMON_SYSCALL_PRE_READ_RANGE
15//          Called in prehook for regions that will be read by the kernel and
16//          must be initialized.
17//   COMMON_SYSCALL_PRE_WRITE_RANGE
18//          Called in prehook for regions that will be written to by the kernel
19//          and must be addressable. The actual write range may be smaller than
20//          reported in the prehook. See POST_WRITE_RANGE.
21//   COMMON_SYSCALL_POST_READ_RANGE
22//          Called in posthook for regions that were read by the kernel. Does
23//          not make much sense.
24//   COMMON_SYSCALL_POST_WRITE_RANGE
25//          Called in posthook for regions that were written to by the kernel
26//          and are now initialized.
27//   COMMON_SYSCALL_ACQUIRE(addr)
28//          Acquire memory visibility from addr.
29//   COMMON_SYSCALL_RELEASE(addr)
30//          Release memory visibility to addr.
31//   COMMON_SYSCALL_FD_CLOSE(fd)
32//          Called before closing file descriptor fd.
33//   COMMON_SYSCALL_FD_ACQUIRE(fd)
34//          Acquire memory visibility from fd.
35//   COMMON_SYSCALL_FD_RELEASE(fd)
36//          Release memory visibility to fd.
37//   COMMON_SYSCALL_PRE_FORK()
38//          Called before fork syscall.
39//   COMMON_SYSCALL_POST_FORK(long long res)
40//          Called after fork syscall.
41//
42// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
43//
44// Generated with: generate_netbsd_syscalls.awk
45// Generated date: 2020-09-10
46// Generated from: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp
47//
48//===----------------------------------------------------------------------===//
49
50#include "sanitizer_platform.h"
51#if SANITIZER_NETBSD
52
53#include "sanitizer_libc.h"
54
55#define PRE_SYSCALL(name)                                                      \
56  SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_pre_impl_##name
57#define PRE_READ(p, s) COMMON_SYSCALL_PRE_READ_RANGE(p, s)
58#define PRE_WRITE(p, s) COMMON_SYSCALL_PRE_WRITE_RANGE(p, s)
59
60#define POST_SYSCALL(name)                                                     \
61  SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_post_impl_##name
62#define POST_READ(p, s) COMMON_SYSCALL_POST_READ_RANGE(p, s)
63#define POST_WRITE(p, s) COMMON_SYSCALL_POST_WRITE_RANGE(p, s)
64
65#ifndef COMMON_SYSCALL_ACQUIRE
66#define COMMON_SYSCALL_ACQUIRE(addr) ((void)(addr))
67#endif
68
69#ifndef COMMON_SYSCALL_RELEASE
70#define COMMON_SYSCALL_RELEASE(addr) ((void)(addr))
71#endif
72
73#ifndef COMMON_SYSCALL_FD_CLOSE
74#define COMMON_SYSCALL_FD_CLOSE(fd) ((void)(fd))
75#endif
76
77#ifndef COMMON_SYSCALL_FD_ACQUIRE
78#define COMMON_SYSCALL_FD_ACQUIRE(fd) ((void)(fd))
79#endif
80
81#ifndef COMMON_SYSCALL_FD_RELEASE
82#define COMMON_SYSCALL_FD_RELEASE(fd) ((void)(fd))
83#endif
84
85#ifndef COMMON_SYSCALL_PRE_FORK
86#define COMMON_SYSCALL_PRE_FORK()                                              \
87  {}
88#endif
89
90#ifndef COMMON_SYSCALL_POST_FORK
91#define COMMON_SYSCALL_POST_FORK(res)                                          \
92  {}
93#endif
94
95// FIXME: do some kind of PRE_READ for all syscall arguments (int(s) and such).
96
97extern "C" {
98#define SYS_MAXSYSARGS 8
99PRE_SYSCALL(syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
100  /* Nothing to do */
101}
102POST_SYSCALL(syscall)
103(long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
104  /* Nothing to do */
105}
106PRE_SYSCALL(exit)(long long rval_) { /* Nothing to do */ }
107POST_SYSCALL(exit)(long long res, long long rval_) { /* Nothing to do */ }
108PRE_SYSCALL(fork)(void) { COMMON_SYSCALL_PRE_FORK(); }
109POST_SYSCALL(fork)(long long res) { COMMON_SYSCALL_POST_FORK(res); }
110PRE_SYSCALL(read)(long long fd_, void *buf_, long long nbyte_) {
111  if (buf_) {
112    PRE_WRITE(buf_, nbyte_);
113  }
114}
115POST_SYSCALL(read)(long long res, long long fd_, void *buf_, long long nbyte_) {
116  if (res > 0) {
117    POST_WRITE(buf_, res);
118  }
119}
120PRE_SYSCALL(write)(long long fd_, void *buf_, long long nbyte_) {
121  if (buf_) {
122    PRE_READ(buf_, nbyte_);
123  }
124}
125POST_SYSCALL(write)
126(long long res, long long fd_, void *buf_, long long nbyte_) {
127  if (res > 0) {
128    POST_READ(buf_, res);
129  }
130}
131PRE_SYSCALL(open)(void *path_, long long flags_, long long mode_) {
132  const char *path = (const char *)path_;
133  if (path) {
134    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
135  }
136}
137POST_SYSCALL(open)
138(long long res, void *path_, long long flags_, long long mode_) {
139  if (res > 0) {
140    const char *path = (const char *)path_;
141    if (path) {
142      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
143    }
144  }
145}
146PRE_SYSCALL(close)(long long fd_) { COMMON_SYSCALL_FD_CLOSE((int)fd_); }
147POST_SYSCALL(close)(long long res, long long fd_) { /* Nothing to do */ }
148PRE_SYSCALL(compat_50_wait4)
149(long long pid_, void *status_, long long options_, void *rusage_) {
150  /* TODO */
151}
152POST_SYSCALL(compat_50_wait4)
153(long long res, long long pid_, void *status_, long long options_,
154  void *rusage_) {
155  /* TODO */
156}
157PRE_SYSCALL(compat_43_ocreat)(void *path_, long long mode_) { /* TODO */ }
158POST_SYSCALL(compat_43_ocreat)(long long res, void *path_, long long mode_) {
159  /* TODO */
160}
161PRE_SYSCALL(link)(void *path_, void *link_) {
162  const char *path = (const char *)path_;
163  const char *link = (const char *)link_;
164  if (path) {
165    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
166  }
167  if (link) {
168    PRE_READ(path, __sanitizer::internal_strlen(link) + 1);
169  }
170}
171POST_SYSCALL(link)(long long res, void *path_, void *link_) {
172  if (res == 0) {
173    const char *path = (const char *)path_;
174    const char *link = (const char *)link_;
175    if (path) {
176      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
177    }
178    if (link) {
179      POST_READ(path, __sanitizer::internal_strlen(link) + 1);
180    }
181  }
182}
183PRE_SYSCALL(unlink)(void *path_) {
184  const char *path = (const char *)path_;
185  if (path) {
186    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
187  }
188}
189POST_SYSCALL(unlink)(long long res, void *path_) {
190  if (res == 0) {
191    const char *path = (const char *)path_;
192    if (path) {
193      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
194    }
195  }
196}
197/* syscall 11 has been skipped */
198PRE_SYSCALL(chdir)(void *path_) {
199  const char *path = (const char *)path_;
200  if (path) {
201    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
202  }
203}
204POST_SYSCALL(chdir)(long long res, void *path_) {
205  if (res == 0) {
206    const char *path = (const char *)path_;
207    if (path) {
208      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
209    }
210  }
211}
212PRE_SYSCALL(fchdir)(long long fd_) { /* Nothing to do */ }
213POST_SYSCALL(fchdir)(long long res, long long fd_) { /* Nothing to do */ }
214PRE_SYSCALL(compat_50_mknod)(void *path_, long long mode_, long long dev_) {
215  /* TODO */
216}
217POST_SYSCALL(compat_50_mknod)
218(long long res, void *path_, long long mode_, long long dev_) {
219  /* TODO */
220}
221PRE_SYSCALL(chmod)(void *path_, long long mode_) {
222  const char *path = (const char *)path_;
223  if (path) {
224    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
225  }
226}
227POST_SYSCALL(chmod)(long long res, void *path_, long long mode_) {
228  if (res == 0) {
229    const char *path = (const char *)path_;
230    if (path) {
231      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
232    }
233  }
234}
235PRE_SYSCALL(chown)(void *path_, long long uid_, long long gid_) {
236  const char *path = (const char *)path_;
237  if (path) {
238    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
239  }
240}
241POST_SYSCALL(chown)
242(long long res, void *path_, long long uid_, long long gid_) {
243  if (res == 0) {
244    const char *path = (const char *)path_;
245    if (path) {
246      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
247    }
248  }
249}
250PRE_SYSCALL(break)(void *nsize_) { /* Nothing to do */ }
251POST_SYSCALL(break)(long long res, void *nsize_) { /* Nothing to do */ }
252PRE_SYSCALL(compat_20_getfsstat)
253(void *buf_, long long bufsize_, long long flags_) {
254  /* TODO */
255}
256POST_SYSCALL(compat_20_getfsstat)
257(long long res, void *buf_, long long bufsize_, long long flags_) {
258  /* TODO */
259}
260PRE_SYSCALL(compat_43_olseek)
261(long long fd_, long long offset_, long long whence_) {
262  /* TODO */
263}
264POST_SYSCALL(compat_43_olseek)
265(long long res, long long fd_, long long offset_, long long whence_) {
266  /* TODO */
267}
268PRE_SYSCALL(getpid)(void) { /* Nothing to do */ }
269POST_SYSCALL(getpid)(long long res) { /* Nothing to do */ }
270PRE_SYSCALL(compat_40_mount)
271(void *type_, void *path_, long long flags_, void *data_) {
272  /* TODO */
273}
274POST_SYSCALL(compat_40_mount)
275(long long res, void *type_, void *path_, long long flags_, void *data_) {
276  /* TODO */
277}
278PRE_SYSCALL(unmount)(void *path_, long long flags_) {
279  const char *path = (const char *)path_;
280  if (path) {
281    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
282  }
283}
284POST_SYSCALL(unmount)(long long res, void *path_, long long flags_) {
285  if (res == 0) {
286    const char *path = (const char *)path_;
287    if (path) {
288      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
289    }
290  }
291}
292PRE_SYSCALL(setuid)(long long uid_) { /* Nothing to do */ }
293POST_SYSCALL(setuid)(long long res, long long uid_) { /* Nothing to do */ }
294PRE_SYSCALL(getuid)(void) { /* Nothing to do */ }
295POST_SYSCALL(getuid)(long long res) { /* Nothing to do */ }
296PRE_SYSCALL(geteuid)(void) { /* Nothing to do */ }
297POST_SYSCALL(geteuid)(long long res) { /* Nothing to do */ }
298PRE_SYSCALL(ptrace)
299(long long req_, long long pid_, void *addr_, long long data_) {
300  if (req_ == ptrace_pt_io) {
301    struct __sanitizer_ptrace_io_desc *addr =
302        (struct __sanitizer_ptrace_io_desc *)addr_;
303    PRE_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
304    if (addr->piod_op == ptrace_piod_write_d ||
305        addr->piod_op == ptrace_piod_write_i) {
306      PRE_READ(addr->piod_addr, addr->piod_len);
307    }
308    if (addr->piod_op == ptrace_piod_read_d ||
309        addr->piod_op == ptrace_piod_read_i ||
310        addr->piod_op == ptrace_piod_read_auxv) {
311      PRE_WRITE(addr->piod_addr, addr->piod_len);
312    }
313  } else if (req_ == ptrace_pt_lwpinfo) {
314    struct __sanitizer_ptrace_lwpinfo *addr =
315        (struct __sanitizer_ptrace_lwpinfo *)addr_;
316    PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
317    PRE_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
318  } else if (req_ == ptrace_pt_set_event_mask) {
319    PRE_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
320  } else if (req_ == ptrace_pt_get_event_mask) {
321    PRE_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
322  } else if (req_ == ptrace_pt_set_siginfo) {
323    PRE_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
324  } else if (req_ == ptrace_pt_get_siginfo) {
325    PRE_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
326  } else if (req_ == ptrace_pt_lwpstatus) {
327    struct __sanitizer_ptrace_lwpstatus *addr =
328        (struct __sanitizer_ptrace_lwpstatus *)addr_;
329    PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
330    PRE_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
331  } else if (req_ == ptrace_pt_lwpnext) {
332    struct __sanitizer_ptrace_lwpstatus *addr =
333        (struct __sanitizer_ptrace_lwpstatus *)addr_;
334    PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
335    PRE_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
336  } else if (req_ == ptrace_pt_setregs) {
337    PRE_READ(addr_, struct_ptrace_reg_struct_sz);
338  } else if (req_ == ptrace_pt_getregs) {
339    PRE_WRITE(addr_, struct_ptrace_reg_struct_sz);
340  } else if (req_ == ptrace_pt_setfpregs) {
341    PRE_READ(addr_, struct_ptrace_fpreg_struct_sz);
342  } else if (req_ == ptrace_pt_getfpregs) {
343    PRE_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
344  } else if (req_ == ptrace_pt_setdbregs) {
345    PRE_READ(addr_, struct_ptrace_dbreg_struct_sz);
346  } else if (req_ == ptrace_pt_getdbregs) {
347    PRE_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
348  }
349}
350POST_SYSCALL(ptrace)
351(long long res, long long req_, long long pid_, void *addr_, long long data_) {
352  if (res == 0) {
353    if (req_ == ptrace_pt_io) {
354      struct __sanitizer_ptrace_io_desc *addr =
355          (struct __sanitizer_ptrace_io_desc *)addr_;
356      POST_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
357      if (addr->piod_op == ptrace_piod_write_d ||
358          addr->piod_op == ptrace_piod_write_i) {
359        POST_READ(addr->piod_addr, addr->piod_len);
360      }
361      if (addr->piod_op == ptrace_piod_read_d ||
362          addr->piod_op == ptrace_piod_read_i ||
363          addr->piod_op == ptrace_piod_read_auxv) {
364        POST_WRITE(addr->piod_addr, addr->piod_len);
365      }
366    } else if (req_ == ptrace_pt_lwpinfo) {
367      struct __sanitizer_ptrace_lwpinfo *addr =
368          (struct __sanitizer_ptrace_lwpinfo *)addr_;
369      POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
370      POST_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
371    } else if (req_ == ptrace_pt_set_event_mask) {
372      POST_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
373    } else if (req_ == ptrace_pt_get_event_mask) {
374      POST_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
375    } else if (req_ == ptrace_pt_set_siginfo) {
376      POST_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
377    } else if (req_ == ptrace_pt_get_siginfo) {
378      POST_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
379    } else if (req_ == ptrace_pt_lwpstatus) {
380      struct __sanitizer_ptrace_lwpstatus *addr =
381          (struct __sanitizer_ptrace_lwpstatus *)addr_;
382      POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
383      POST_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
384    } else if (req_ == ptrace_pt_lwpnext) {
385      struct __sanitizer_ptrace_lwpstatus *addr =
386          (struct __sanitizer_ptrace_lwpstatus *)addr_;
387      POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
388      POST_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
389    } else if (req_ == ptrace_pt_setregs) {
390      POST_READ(addr_, struct_ptrace_reg_struct_sz);
391    } else if (req_ == ptrace_pt_getregs) {
392      POST_WRITE(addr_, struct_ptrace_reg_struct_sz);
393    } else if (req_ == ptrace_pt_setfpregs) {
394      POST_READ(addr_, struct_ptrace_fpreg_struct_sz);
395    } else if (req_ == ptrace_pt_getfpregs) {
396      POST_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
397    } else if (req_ == ptrace_pt_setdbregs) {
398      POST_READ(addr_, struct_ptrace_dbreg_struct_sz);
399    } else if (req_ == ptrace_pt_getdbregs) {
400      POST_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
401    }
402  }
403}
404PRE_SYSCALL(recvmsg)(long long s_, void *msg_, long long flags_) {
405  PRE_WRITE(msg_, sizeof(__sanitizer_msghdr));
406}
407POST_SYSCALL(recvmsg)
408(long long res, long long s_, void *msg_, long long flags_) {
409  if (res > 0) {
410    POST_WRITE(msg_, sizeof(__sanitizer_msghdr));
411  }
412}
413PRE_SYSCALL(sendmsg)(long long s_, void *msg_, long long flags_) {
414  PRE_READ(msg_, sizeof(__sanitizer_msghdr));
415}
416POST_SYSCALL(sendmsg)
417(long long res, long long s_, void *msg_, long long flags_) {
418  if (res > 0) {
419    POST_READ(msg_, sizeof(__sanitizer_msghdr));
420  }
421}
422PRE_SYSCALL(recvfrom)
423(long long s_, void *buf_, long long len_, long long flags_, void *from_,
424  void *fromlenaddr_) {
425  PRE_WRITE(buf_, len_);
426  PRE_WRITE(from_, struct_sockaddr_sz);
427  PRE_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
428}
429POST_SYSCALL(recvfrom)
430(long long res, long long s_, void *buf_, long long len_, long long flags_,
431  void *from_, void *fromlenaddr_) {
432  if (res >= 0) {
433    POST_WRITE(buf_, res);
434    POST_WRITE(from_, struct_sockaddr_sz);
435    POST_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
436  }
437}
438PRE_SYSCALL(accept)(long long s_, void *name_, void *anamelen_) {
439  PRE_WRITE(name_, struct_sockaddr_sz);
440  PRE_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
441}
442POST_SYSCALL(accept)
443(long long res, long long s_, void *name_, void *anamelen_) {
444  if (res == 0) {
445    POST_WRITE(name_, struct_sockaddr_sz);
446    POST_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
447  }
448}
449PRE_SYSCALL(getpeername)(long long fdes_, void *asa_, void *alen_) {
450  PRE_WRITE(asa_, struct_sockaddr_sz);
451  PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
452}
453POST_SYSCALL(getpeername)
454(long long res, long long fdes_, void *asa_, void *alen_) {
455  if (res == 0) {
456    POST_WRITE(asa_, struct_sockaddr_sz);
457    POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
458  }
459}
460PRE_SYSCALL(getsockname)(long long fdes_, void *asa_, void *alen_) {
461  PRE_WRITE(asa_, struct_sockaddr_sz);
462  PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
463}
464POST_SYSCALL(getsockname)
465(long long res, long long fdes_, void *asa_, void *alen_) {
466  if (res == 0) {
467    POST_WRITE(asa_, struct_sockaddr_sz);
468    POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
469  }
470}
471PRE_SYSCALL(access)(void *path_, long long flags_) {
472  const char *path = (const char *)path_;
473  if (path) {
474    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
475  }
476}
477POST_SYSCALL(access)(long long res, void *path_, long long flags_) {
478  if (res == 0) {
479    const char *path = (const char *)path_;
480    if (path) {
481      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
482    }
483  }
484}
485PRE_SYSCALL(chflags)(void *path_, long long flags_) {
486  const char *path = (const char *)path_;
487  if (path) {
488    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
489  }
490}
491POST_SYSCALL(chflags)(long long res, void *path_, long long flags_) {
492  if (res == 0) {
493    const char *path = (const char *)path_;
494    if (path) {
495      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
496    }
497  }
498}
499PRE_SYSCALL(fchflags)(long long fd_, long long flags_) { /* Nothing to do */ }
500POST_SYSCALL(fchflags)(long long res, long long fd_, long long flags_) {
501  /* Nothing to do */
502}
503PRE_SYSCALL(sync)(void) { /* Nothing to do */ }
504POST_SYSCALL(sync)(long long res) { /* Nothing to do */ }
505PRE_SYSCALL(kill)(long long pid_, long long signum_) { /* Nothing to do */ }
506POST_SYSCALL(kill)(long long res, long long pid_, long long signum_) {
507  /* Nothing to do */
508}
509PRE_SYSCALL(compat_43_stat43)(void *path_, void *ub_) { /* TODO */ }
510POST_SYSCALL(compat_43_stat43)(long long res, void *path_, void *ub_) {
511  /* TODO */
512}
513PRE_SYSCALL(getppid)(void) { /* Nothing to do */ }
514POST_SYSCALL(getppid)(long long res) { /* Nothing to do */ }
515PRE_SYSCALL(compat_43_lstat43)(void *path_, void *ub_) { /* TODO */ }
516POST_SYSCALL(compat_43_lstat43)(long long res, void *path_, void *ub_) {
517  /* TODO */
518}
519PRE_SYSCALL(dup)(long long fd_) { /* Nothing to do */ }
520POST_SYSCALL(dup)(long long res, long long fd_) { /* Nothing to do */ }
521PRE_SYSCALL(pipe)(void) {
522  /* pipe returns two descriptors through two returned values */
523}
524POST_SYSCALL(pipe)(long long res) {
525  /* pipe returns two descriptors through two returned values */
526}
527PRE_SYSCALL(getegid)(void) { /* Nothing to do */ }
528POST_SYSCALL(getegid)(long long res) { /* Nothing to do */ }
529PRE_SYSCALL(profil)
530(void *samples_, long long size_, long long offset_, long long scale_) {
531  if (samples_) {
532    PRE_WRITE(samples_, size_);
533  }
534}
535POST_SYSCALL(profil)
536(long long res, void *samples_, long long size_, long long offset_,
537  long long scale_) {
538  if (res == 0) {
539    if (samples_) {
540      POST_WRITE(samples_, size_);
541    }
542  }
543}
544PRE_SYSCALL(ktrace)
545(void *fname_, long long ops_, long long facs_, long long pid_) {
546  const char *fname = (const char *)fname_;
547  if (fname) {
548    PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
549  }
550}
551POST_SYSCALL(ktrace)
552(long long res, void *fname_, long long ops_, long long facs_, long long pid_) {
553  const char *fname = (const char *)fname_;
554  if (res == 0) {
555    if (fname) {
556      POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
557    }
558  }
559}
560PRE_SYSCALL(compat_13_sigaction13)(long long signum_, void *nsa_, void *osa_) {
561  /* TODO */
562}
563POST_SYSCALL(compat_13_sigaction13)
564(long long res, long long signum_, void *nsa_, void *osa_) {
565  /* TODO */
566}
567PRE_SYSCALL(getgid)(void) { /* Nothing to do */ }
568POST_SYSCALL(getgid)(long long res) { /* Nothing to do */ }
569PRE_SYSCALL(compat_13_sigprocmask13)(long long how_, long long mask_) {
570  /* TODO */
571}
572POST_SYSCALL(compat_13_sigprocmask13)
573(long long res, long long how_, long long mask_) {
574  /* TODO */
575}
576PRE_SYSCALL(__getlogin)(void *namebuf_, long long namelen_) {
577  if (namebuf_) {
578    PRE_WRITE(namebuf_, namelen_);
579  }
580}
581POST_SYSCALL(__getlogin)(long long res, void *namebuf_, long long namelen_) {
582  if (res == 0) {
583    if (namebuf_) {
584      POST_WRITE(namebuf_, namelen_);
585    }
586  }
587}
588PRE_SYSCALL(__setlogin)(void *namebuf_) {
589  const char *namebuf = (const char *)namebuf_;
590  if (namebuf) {
591    PRE_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
592  }
593}
594POST_SYSCALL(__setlogin)(long long res, void *namebuf_) {
595  if (res == 0) {
596    const char *namebuf = (const char *)namebuf_;
597    if (namebuf) {
598      POST_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
599    }
600  }
601}
602PRE_SYSCALL(acct)(void *path_) {
603  const char *path = (const char *)path_;
604  if (path) {
605    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
606  }
607}
608POST_SYSCALL(acct)(long long res, void *path_) {
609  if (res == 0) {
610    const char *path = (const char *)path_;
611    if (path) {
612      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
613    }
614  }
615}
616PRE_SYSCALL(compat_13_sigpending13)(void) { /* TODO */ }
617POST_SYSCALL(compat_13_sigpending13)(long long res) { /* TODO */ }
618PRE_SYSCALL(compat_13_sigaltstack13)(void *nss_, void *oss_) { /* TODO */ }
619POST_SYSCALL(compat_13_sigaltstack13)(long long res, void *nss_, void *oss_) {
620  /* TODO */
621}
622PRE_SYSCALL(ioctl)(long long fd_, long long com_, void *data_) {
623  /* Nothing to do */
624}
625POST_SYSCALL(ioctl)(long long res, long long fd_, long long com_, void *data_) {
626  /* Nothing to do */
627}
628PRE_SYSCALL(compat_12_oreboot)(long long opt_) { /* TODO */ }
629POST_SYSCALL(compat_12_oreboot)(long long res, long long opt_) { /* TODO */ }
630PRE_SYSCALL(revoke)(void *path_) {
631  const char *path = (const char *)path_;
632  if (path) {
633    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
634  }
635}
636POST_SYSCALL(revoke)(long long res, void *path_) {
637  if (res == 0) {
638    const char *path = (const char *)path_;
639    if (path) {
640      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
641    }
642  }
643}
644PRE_SYSCALL(symlink)(void *path_, void *link_) {
645  const char *path = (const char *)path_;
646  const char *link = (const char *)link_;
647  if (path) {
648    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
649  }
650  if (link) {
651    PRE_READ(link, __sanitizer::internal_strlen(link) + 1);
652  }
653}
654POST_SYSCALL(symlink)(long long res, void *path_, void *link_) {
655  if (res == 0) {
656    const char *path = (const char *)path_;
657    const char *link = (const char *)link_;
658    if (path) {
659      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
660    }
661    if (link) {
662      POST_READ(link, __sanitizer::internal_strlen(link) + 1);
663    }
664  }
665}
666PRE_SYSCALL(readlink)(void *path_, void *buf_, long long count_) {
667  const char *path = (const char *)path_;
668  if (path) {
669    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
670  }
671  if (buf_) {
672    PRE_WRITE(buf_, count_);
673  }
674}
675POST_SYSCALL(readlink)
676(long long res, void *path_, void *buf_, long long count_) {
677  if (res > 0) {
678    const char *path = (const char *)path_;
679    if (path) {
680      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
681    }
682    if (buf_) {
683      PRE_WRITE(buf_, res);
684    }
685  }
686}
687PRE_SYSCALL(execve)(void *path_, void *argp_, void *envp_) {
688  const char *path = (const char *)path_;
689  char **argp = (char **)argp_;
690  char **envp = (char **)envp_;
691  if (path) {
692    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
693  }
694  if (argp && argp[0]) {
695    char *a = argp[0];
696    while (a++) {
697      PRE_READ(a, __sanitizer::internal_strlen(a) + 1);
698    }
699  }
700  if (envp && envp[0]) {
701    char *e = envp[0];
702    while (e++) {
703      PRE_READ(e, __sanitizer::internal_strlen(e) + 1);
704    }
705  }
706}
707POST_SYSCALL(execve)(long long res, void *path_, void *argp_, void *envp_) {
708  /* If we are here, something went wrong */
709  const char *path = (const char *)path_;
710  char **argp = (char **)argp_;
711  char **envp = (char **)envp_;
712  if (path) {
713    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
714  }
715  if (argp && argp[0]) {
716    char *a = argp[0];
717    while (a++) {
718      POST_READ(a, __sanitizer::internal_strlen(a) + 1);
719    }
720  }
721  if (envp && envp[0]) {
722    char *e = envp[0];
723    while (e++) {
724      POST_READ(e, __sanitizer::internal_strlen(e) + 1);
725    }
726  }
727}
728PRE_SYSCALL(umask)(long long newmask_) { /* Nothing to do */ }
729POST_SYSCALL(umask)(long long res, long long newmask_) { /* Nothing to do */ }
730PRE_SYSCALL(chroot)(void *path_) {
731  const char *path = (const char *)path_;
732  if (path) {
733    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
734  }
735}
736POST_SYSCALL(chroot)(long long res, void *path_) {
737  if (res == 0) {
738    const char *path = (const char *)path_;
739    if (path) {
740      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
741    }
742  }
743}
744PRE_SYSCALL(compat_43_fstat43)(long long fd_, void *sb_) { /* TODO */ }
745POST_SYSCALL(compat_43_fstat43)(long long res, long long fd_, void *sb_) {
746  /* TODO */
747}
748PRE_SYSCALL(compat_43_ogetkerninfo)
749(long long op_, void *where_, void *size_, long long arg_) {
750  /* TODO */
751}
752POST_SYSCALL(compat_43_ogetkerninfo)
753(long long res, long long op_, void *where_, void *size_, long long arg_) {
754  /* TODO */
755}
756PRE_SYSCALL(compat_43_ogetpagesize)(void) { /* TODO */ }
757POST_SYSCALL(compat_43_ogetpagesize)(long long res) { /* TODO */ }
758PRE_SYSCALL(compat_12_msync)(void *addr_, long long len_) { /* TODO */ }
759POST_SYSCALL(compat_12_msync)(long long res, void *addr_, long long len_) {
760  /* TODO */
761}
762PRE_SYSCALL(vfork)(void) { /* Nothing to do */ }
763POST_SYSCALL(vfork)(long long res) { /* Nothing to do */ }
764/* syscall 67 has been skipped */
765/* syscall 68 has been skipped */
766/* syscall 69 has been skipped */
767/* syscall 70 has been skipped */
768PRE_SYSCALL(compat_43_ommap)
769(void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
770  long long pos_) {
771  /* TODO */
772}
773POST_SYSCALL(compat_43_ommap)
774(long long res, void *addr_, long long len_, long long prot_, long long flags_,
775  long long fd_, long long pos_) {
776  /* TODO */
777}
778PRE_SYSCALL(vadvise)(long long anom_) { /* Nothing to do */ }
779POST_SYSCALL(vadvise)(long long res, long long anom_) { /* Nothing to do */ }
780PRE_SYSCALL(munmap)(void *addr_, long long len_) { /* Nothing to do */ }
781POST_SYSCALL(munmap)(long long res, void *addr_, long long len_) {
782  /* Nothing to do */
783}
784PRE_SYSCALL(mprotect)(void *addr_, long long len_, long long prot_) {
785  /* Nothing to do */
786}
787POST_SYSCALL(mprotect)
788(long long res, void *addr_, long long len_, long long prot_) {
789  /* Nothing to do */
790}
791PRE_SYSCALL(madvise)(void *addr_, long long len_, long long behav_) {
792  /* Nothing to do */
793}
794POST_SYSCALL(madvise)
795(long long res, void *addr_, long long len_, long long behav_) {
796  /* Nothing to do */
797}
798/* syscall 76 has been skipped */
799/* syscall 77 has been skipped */
800PRE_SYSCALL(mincore)(void *addr_, long long len_, void *vec_) {
801  /* Nothing to do */
802}
803POST_SYSCALL(mincore)(long long res, void *addr_, long long len_, void *vec_) {
804  /* Nothing to do */
805}
806PRE_SYSCALL(getgroups)(long long gidsetsize_, void *gidset_) {
807  unsigned int *gidset = (unsigned int *)gidset_;
808  if (gidset) {
809    PRE_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
810  }
811}
812POST_SYSCALL(getgroups)(long long res, long long gidsetsize_, void *gidset_) {
813  if (res == 0) {
814    unsigned int *gidset = (unsigned int *)gidset_;
815    if (gidset) {
816      POST_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
817    }
818  }
819}
820PRE_SYSCALL(setgroups)(long long gidsetsize_, void *gidset_) {
821  unsigned int *gidset = (unsigned int *)gidset_;
822  if (gidset) {
823    PRE_READ(gidset, sizeof(*gidset) * gidsetsize_);
824  }
825}
826POST_SYSCALL(setgroups)(long long res, long long gidsetsize_, void *gidset_) {
827  if (res == 0) {
828    unsigned int *gidset = (unsigned int *)gidset_;
829    if (gidset) {
830      POST_READ(gidset, sizeof(*gidset) * gidsetsize_);
831    }
832  }
833}
834PRE_SYSCALL(getpgrp)(void) { /* Nothing to do */ }
835POST_SYSCALL(getpgrp)(long long res) { /* Nothing to do */ }
836PRE_SYSCALL(setpgid)(long long pid_, long long pgid_) { /* Nothing to do */ }
837POST_SYSCALL(setpgid)(long long res, long long pid_, long long pgid_) {
838  /* Nothing to do */
839}
840PRE_SYSCALL(compat_50_setitimer)(long long which_, void *itv_, void *oitv_) {
841  /* TODO */
842}
843POST_SYSCALL(compat_50_setitimer)
844(long long res, long long which_, void *itv_, void *oitv_) {
845  /* TODO */
846}
847PRE_SYSCALL(compat_43_owait)(void) { /* TODO */ }
848POST_SYSCALL(compat_43_owait)(long long res) { /* TODO */ }
849PRE_SYSCALL(compat_12_oswapon)(void *name_) { /* TODO */ }
850POST_SYSCALL(compat_12_oswapon)(long long res, void *name_) { /* TODO */ }
851PRE_SYSCALL(compat_50_getitimer)(long long which_, void *itv_) { /* TODO */ }
852POST_SYSCALL(compat_50_getitimer)(long long res, long long which_, void *itv_) {
853  /* TODO */
854}
855PRE_SYSCALL(compat_43_ogethostname)(void *hostname_, long long len_) {
856  /* TODO */
857}
858POST_SYSCALL(compat_43_ogethostname)
859(long long res, void *hostname_, long long len_) {
860  /* TODO */
861}
862PRE_SYSCALL(compat_43_osethostname)(void *hostname_, long long len_) {
863  /* TODO */
864}
865POST_SYSCALL(compat_43_osethostname)
866(long long res, void *hostname_, long long len_) {
867  /* TODO */
868}
869PRE_SYSCALL(compat_43_ogetdtablesize)(void) { /* TODO */ }
870POST_SYSCALL(compat_43_ogetdtablesize)(long long res) { /* TODO */ }
871PRE_SYSCALL(dup2)(long long from_, long long to_) { /* Nothing to do */ }
872POST_SYSCALL(dup2)(long long res, long long from_, long long to_) {
873  /* Nothing to do */
874}
875PRE_SYSCALL(getrandom)(void *buf_, long long buflen_, long long flags_) {
876  /* TODO */
877}
878POST_SYSCALL(getrandom)
879(long long res, void *buf_, long long buflen_, long long flags_) {
880  /* TODO */
881}
882PRE_SYSCALL(fcntl)(long long fd_, long long cmd_, void *arg_) {
883  /* Nothing to do */
884}
885POST_SYSCALL(fcntl)(long long res, long long fd_, long long cmd_, void *arg_) {
886  /* Nothing to do */
887}
888PRE_SYSCALL(compat_50_select)
889(long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
890  /* TODO */
891}
892POST_SYSCALL(compat_50_select)
893(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
894  /* TODO */
895}
896/* syscall 94 has been skipped */
897PRE_SYSCALL(fsync)(long long fd_) { /* Nothing to do */ }
898POST_SYSCALL(fsync)(long long res, long long fd_) { /* Nothing to do */ }
899PRE_SYSCALL(setpriority)(long long which_, long long who_, long long prio_) {
900  /* Nothing to do */
901}
902POST_SYSCALL(setpriority)
903(long long res, long long which_, long long who_, long long prio_) {
904  /* Nothing to do */
905}
906PRE_SYSCALL(compat_30_socket)
907(long long domain_, long long type_, long long protocol_) {
908  /* TODO */
909}
910POST_SYSCALL(compat_30_socket)
911(long long res, long long domain_, long long type_, long long protocol_) {
912  /* TODO */
913}
914PRE_SYSCALL(connect)(long long s_, void *name_, long long namelen_) {
915  PRE_READ(name_, namelen_);
916}
917POST_SYSCALL(connect)
918(long long res, long long s_, void *name_, long long namelen_) {
919  if (res == 0) {
920    POST_READ(name_, namelen_);
921  }
922}
923PRE_SYSCALL(compat_43_oaccept)(long long s_, void *name_, void *anamelen_) {
924  /* TODO */
925}
926POST_SYSCALL(compat_43_oaccept)
927(long long res, long long s_, void *name_, void *anamelen_) {
928  /* TODO */
929}
930PRE_SYSCALL(getpriority)(long long which_, long long who_) {
931  /* Nothing to do */
932}
933POST_SYSCALL(getpriority)(long long res, long long which_, long long who_) {
934  /* Nothing to do */
935}
936PRE_SYSCALL(compat_43_osend)
937(long long s_, void *buf_, long long len_, long long flags_) {
938  /* TODO */
939}
940POST_SYSCALL(compat_43_osend)
941(long long res, long long s_, void *buf_, long long len_, long long flags_) {
942  /* TODO */
943}
944PRE_SYSCALL(compat_43_orecv)
945(long long s_, void *buf_, long long len_, long long flags_) {
946  /* TODO */
947}
948POST_SYSCALL(compat_43_orecv)
949(long long res, long long s_, void *buf_, long long len_, long long flags_) {
950  /* TODO */
951}
952PRE_SYSCALL(compat_13_sigreturn13)(void *sigcntxp_) { /* TODO */ }
953POST_SYSCALL(compat_13_sigreturn13)(long long res, void *sigcntxp_) {
954  /* TODO */
955}
956PRE_SYSCALL(bind)(long long s_, void *name_, long long namelen_) {
957  PRE_READ(name_, namelen_);
958}
959POST_SYSCALL(bind)
960(long long res, long long s_, void *name_, long long namelen_) {
961  if (res == 0) {
962    PRE_READ(name_, namelen_);
963  }
964}
965PRE_SYSCALL(setsockopt)
966(long long s_, long long level_, long long name_, void *val_,
967  long long valsize_) {
968  if (val_) {
969    PRE_READ(val_, valsize_);
970  }
971}
972POST_SYSCALL(setsockopt)
973(long long res, long long s_, long long level_, long long name_, void *val_,
974  long long valsize_) {
975  if (res == 0) {
976    if (val_) {
977      POST_READ(val_, valsize_);
978    }
979  }
980}
981PRE_SYSCALL(listen)(long long s_, long long backlog_) { /* Nothing to do */ }
982POST_SYSCALL(listen)(long long res, long long s_, long long backlog_) {
983  /* Nothing to do */
984}
985/* syscall 107 has been skipped */
986PRE_SYSCALL(compat_43_osigvec)(long long signum_, void *nsv_, void *osv_) {
987  /* TODO */
988}
989POST_SYSCALL(compat_43_osigvec)
990(long long res, long long signum_, void *nsv_, void *osv_) {
991  /* TODO */
992}
993PRE_SYSCALL(compat_43_osigblock)(long long mask_) { /* TODO */ }
994POST_SYSCALL(compat_43_osigblock)(long long res, long long mask_) { /* TODO */ }
995PRE_SYSCALL(compat_43_osigsetmask)(long long mask_) { /* TODO */ }
996POST_SYSCALL(compat_43_osigsetmask)(long long res, long long mask_) {
997  /* TODO */
998}
999PRE_SYSCALL(compat_13_sigsuspend13)(long long mask_) { /* TODO */ }
1000POST_SYSCALL(compat_13_sigsuspend13)(long long res, long long mask_) {
1001  /* TODO */
1002}
1003PRE_SYSCALL(compat_43_osigstack)(void *nss_, void *oss_) { /* TODO */ }
1004POST_SYSCALL(compat_43_osigstack)(long long res, void *nss_, void *oss_) {
1005  /* TODO */
1006}
1007PRE_SYSCALL(compat_43_orecvmsg)(long long s_, void *msg_, long long flags_) {
1008  /* TODO */
1009}
1010POST_SYSCALL(compat_43_orecvmsg)
1011(long long res, long long s_, void *msg_, long long flags_) {
1012  /* TODO */
1013}
1014PRE_SYSCALL(compat_43_osendmsg)(long long s_, void *msg_, long long flags_) {
1015  /* TODO */
1016}
1017POST_SYSCALL(compat_43_osendmsg)
1018(long long res, long long s_, void *msg_, long long flags_) {
1019  /* TODO */
1020}
1021/* syscall 115 has been skipped */
1022PRE_SYSCALL(compat_50_gettimeofday)(void *tp_, void *tzp_) { /* TODO */ }
1023POST_SYSCALL(compat_50_gettimeofday)(long long res, void *tp_, void *tzp_) {
1024  /* TODO */
1025}
1026PRE_SYSCALL(compat_50_getrusage)(long long who_, void *rusage_) { /* TODO */ }
1027POST_SYSCALL(compat_50_getrusage)
1028(long long res, long long who_, void *rusage_) {
1029  /* TODO */
1030}
1031PRE_SYSCALL(getsockopt)
1032(long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
1033  /* TODO */
1034}
1035POST_SYSCALL(getsockopt)
1036(long long res, long long s_, long long level_, long long name_, void *val_,
1037  void *avalsize_) {
1038  /* TODO */
1039}
1040/* syscall 119 has been skipped */
1041PRE_SYSCALL(readv)(long long fd_, void *iovp_, long long iovcnt_) {
1042  struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1043  int i;
1044  if (iovp) {
1045    PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1046    for (i = 0; i < iovcnt_; i++) {
1047      PRE_WRITE(iovp[i].iov_base, iovp[i].iov_len);
1048    }
1049  }
1050}
1051POST_SYSCALL(readv)
1052(long long res, long long fd_, void *iovp_, long long iovcnt_) {
1053  struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1054  int i;
1055  uptr m, n = res;
1056  if (res > 0) {
1057    if (iovp) {
1058      POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1059      for (i = 0; i < iovcnt_ && n > 0; i++) {
1060        m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
1061        POST_WRITE(iovp[i].iov_base, m);
1062        n -= m;
1063      }
1064    }
1065  }
1066}
1067PRE_SYSCALL(writev)(long long fd_, void *iovp_, long long iovcnt_) {
1068  struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1069  int i;
1070  if (iovp) {
1071    PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1072    for (i = 0; i < iovcnt_; i++) {
1073      PRE_READ(iovp[i].iov_base, iovp[i].iov_len);
1074    }
1075  }
1076}
1077POST_SYSCALL(writev)
1078(long long res, long long fd_, void *iovp_, long long iovcnt_) {
1079  struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
1080  int i;
1081  uptr m, n = res;
1082  if (res > 0) {
1083    if (iovp) {
1084      POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
1085      for (i = 0; i < iovcnt_ && n > 0; i++) {
1086        m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
1087        POST_READ(iovp[i].iov_base, m);
1088        n -= m;
1089      }
1090    }
1091  }
1092}
1093PRE_SYSCALL(compat_50_settimeofday)(void *tv_, void *tzp_) { /* TODO */ }
1094POST_SYSCALL(compat_50_settimeofday)(long long res, void *tv_, void *tzp_) {
1095  /* TODO */
1096}
1097PRE_SYSCALL(fchown)(long long fd_, long long uid_, long long gid_) {
1098  /* Nothing to do */
1099}
1100POST_SYSCALL(fchown)
1101(long long res, long long fd_, long long uid_, long long gid_) {
1102  /* Nothing to do */
1103}
1104PRE_SYSCALL(fchmod)(long long fd_, long long mode_) { /* Nothing to do */ }
1105POST_SYSCALL(fchmod)(long long res, long long fd_, long long mode_) {
1106  /* Nothing to do */
1107}
1108PRE_SYSCALL(compat_43_orecvfrom)
1109(long long s_, void *buf_, long long len_, long long flags_, void *from_,
1110  void *fromlenaddr_) {
1111  /* TODO */
1112}
1113POST_SYSCALL(compat_43_orecvfrom)
1114(long long res, long long s_, void *buf_, long long len_, long long flags_,
1115  void *from_, void *fromlenaddr_) {
1116  /* TODO */
1117}
1118PRE_SYSCALL(setreuid)(long long ruid_, long long euid_) { /* Nothing to do */ }
1119POST_SYSCALL(setreuid)(long long res, long long ruid_, long long euid_) {
1120  /* Nothing to do */
1121}
1122PRE_SYSCALL(setregid)(long long rgid_, long long egid_) { /* Nothing to do */ }
1123POST_SYSCALL(setregid)(long long res, long long rgid_, long long egid_) {
1124  /* Nothing to do */
1125}
1126PRE_SYSCALL(rename)(void *from_, void *to_) {
1127  const char *from = (const char *)from_;
1128  const char *to = (const char *)to_;
1129  if (from) {
1130    PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
1131  }
1132  if (to) {
1133    PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
1134  }
1135}
1136POST_SYSCALL(rename)(long long res, void *from_, void *to_) {
1137  if (res == 0) {
1138    const char *from = (const char *)from_;
1139    const char *to = (const char *)to_;
1140    if (from) {
1141      POST_READ(from, __sanitizer::internal_strlen(from) + 1);
1142    }
1143    if (to) {
1144      POST_READ(to, __sanitizer::internal_strlen(to) + 1);
1145    }
1146  }
1147}
1148PRE_SYSCALL(compat_43_otruncate)(void *path_, long long length_) { /* TODO */ }
1149POST_SYSCALL(compat_43_otruncate)
1150(long long res, void *path_, long long length_) {
1151  /* TODO */
1152}
1153PRE_SYSCALL(compat_43_oftruncate)(long long fd_, long long length_) {
1154  /* TODO */
1155}
1156POST_SYSCALL(compat_43_oftruncate)
1157(long long res, long long fd_, long long length_) {
1158  /* TODO */
1159}
1160PRE_SYSCALL(flock)(long long fd_, long long how_) { /* Nothing to do */ }
1161POST_SYSCALL(flock)(long long res, long long fd_, long long how_) {
1162  /* Nothing to do */
1163}
1164PRE_SYSCALL(mkfifo)(void *path_, long long mode_) {
1165  const char *path = (const char *)path_;
1166  if (path) {
1167    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1168  }
1169}
1170POST_SYSCALL(mkfifo)(long long res, void *path_, long long mode_) {
1171  if (res == 0) {
1172    const char *path = (const char *)path_;
1173    if (path) {
1174      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1175    }
1176  }
1177}
1178PRE_SYSCALL(sendto)
1179(long long s_, void *buf_, long long len_, long long flags_, void *to_,
1180  long long tolen_) {
1181  PRE_READ(buf_, len_);
1182  PRE_READ(to_, tolen_);
1183}
1184POST_SYSCALL(sendto)
1185(long long res, long long s_, void *buf_, long long len_, long long flags_,
1186  void *to_, long long tolen_) {
1187  if (res >= 0) {
1188    POST_READ(buf_, len_);
1189    POST_READ(to_, tolen_);
1190  }
1191}
1192PRE_SYSCALL(shutdown)(long long s_, long long how_) { /* Nothing to do */ }
1193POST_SYSCALL(shutdown)(long long res, long long s_, long long how_) {
1194  /* Nothing to do */
1195}
1196PRE_SYSCALL(socketpair)
1197(long long domain_, long long type_, long long protocol_, void *rsv_) {
1198  PRE_WRITE(rsv_, 2 * sizeof(int));
1199}
1200POST_SYSCALL(socketpair)
1201(long long res, long long domain_, long long type_, long long protocol_,
1202  void *rsv_) {
1203  if (res == 0) {
1204    POST_WRITE(rsv_, 2 * sizeof(int));
1205  }
1206}
1207PRE_SYSCALL(mkdir)(void *path_, long long mode_) {
1208  const char *path = (const char *)path_;
1209  if (path) {
1210    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1211  }
1212}
1213POST_SYSCALL(mkdir)(long long res, void *path_, long long mode_) {
1214  if (res == 0) {
1215    const char *path = (const char *)path_;
1216    if (path) {
1217      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1218    }
1219  }
1220}
1221PRE_SYSCALL(rmdir)(void *path_) {
1222  const char *path = (const char *)path_;
1223  if (path) {
1224    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1225  }
1226}
1227POST_SYSCALL(rmdir)(long long res, void *path_) {
1228  if (res == 0) {
1229    const char *path = (const char *)path_;
1230    if (path) {
1231      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1232    }
1233  }
1234}
1235PRE_SYSCALL(compat_50_utimes)(void *path_, void *tptr_) { /* TODO */ }
1236POST_SYSCALL(compat_50_utimes)(long long res, void *path_, void *tptr_) {
1237  /* TODO */
1238}
1239/* syscall 139 has been skipped */
1240PRE_SYSCALL(compat_50_adjtime)(void *delta_, void *olddelta_) { /* TODO */ }
1241POST_SYSCALL(compat_50_adjtime)(long long res, void *delta_, void *olddelta_) {
1242  /* TODO */
1243}
1244PRE_SYSCALL(compat_43_ogetpeername)(long long fdes_, void *asa_, void *alen_) {
1245  /* TODO */
1246}
1247POST_SYSCALL(compat_43_ogetpeername)
1248(long long res, long long fdes_, void *asa_, void *alen_) {
1249  /* TODO */
1250}
1251PRE_SYSCALL(compat_43_ogethostid)(void) { /* TODO */ }
1252POST_SYSCALL(compat_43_ogethostid)(long long res) { /* TODO */ }
1253PRE_SYSCALL(compat_43_osethostid)(long long hostid_) { /* TODO */ }
1254POST_SYSCALL(compat_43_osethostid)(long long res, long long hostid_) {
1255  /* TODO */
1256}
1257PRE_SYSCALL(compat_43_ogetrlimit)(long long which_, void *rlp_) { /* TODO */ }
1258POST_SYSCALL(compat_43_ogetrlimit)
1259(long long res, long long which_, void *rlp_) {
1260  /* TODO */
1261}
1262PRE_SYSCALL(compat_43_osetrlimit)(long long which_, void *rlp_) { /* TODO */ }
1263POST_SYSCALL(compat_43_osetrlimit)
1264(long long res, long long which_, void *rlp_) {
1265  /* TODO */
1266}
1267PRE_SYSCALL(compat_43_okillpg)(long long pgid_, long long signum_) {
1268  /* TODO */
1269}
1270POST_SYSCALL(compat_43_okillpg)
1271(long long res, long long pgid_, long long signum_) {
1272  /* TODO */
1273}
1274PRE_SYSCALL(setsid)(void) { /* Nothing to do */ }
1275POST_SYSCALL(setsid)(long long res) { /* Nothing to do */ }
1276PRE_SYSCALL(compat_50_quotactl)
1277(void *path_, long long cmd_, long long uid_, void *arg_) {
1278  /* TODO */
1279}
1280POST_SYSCALL(compat_50_quotactl)
1281(long long res, void *path_, long long cmd_, long long uid_, void *arg_) {
1282  /* TODO */
1283}
1284PRE_SYSCALL(compat_43_oquota)(void) { /* TODO */ }
1285POST_SYSCALL(compat_43_oquota)(long long res) { /* TODO */ }
1286PRE_SYSCALL(compat_43_ogetsockname)(long long fdec_, void *asa_, void *alen_) {
1287  /* TODO */
1288}
1289POST_SYSCALL(compat_43_ogetsockname)
1290(long long res, long long fdec_, void *asa_, void *alen_) {
1291  /* TODO */
1292}
1293/* syscall 151 has been skipped */
1294/* syscall 152 has been skipped */
1295/* syscall 153 has been skipped */
1296/* syscall 154 has been skipped */
1297PRE_SYSCALL(nfssvc)(long long flag_, void *argp_) { /* Nothing to do */ }
1298POST_SYSCALL(nfssvc)(long long res, long long flag_, void *argp_) {
1299  /* Nothing to do */
1300}
1301PRE_SYSCALL(compat_43_ogetdirentries)
1302(long long fd_, void *buf_, long long count_, void *basep_) {
1303  /* TODO */
1304}
1305POST_SYSCALL(compat_43_ogetdirentries)
1306(long long res, long long fd_, void *buf_, long long count_, void *basep_) {
1307  /* TODO */
1308}
1309PRE_SYSCALL(compat_20_statfs)(void *path_, void *buf_) { /* TODO */ }
1310POST_SYSCALL(compat_20_statfs)(long long res, void *path_, void *buf_) {
1311  /* TODO */
1312}
1313PRE_SYSCALL(compat_20_fstatfs)(long long fd_, void *buf_) { /* TODO */ }
1314POST_SYSCALL(compat_20_fstatfs)(long long res, long long fd_, void *buf_) {
1315  /* TODO */
1316}
1317/* syscall 159 has been skipped */
1318/* syscall 160 has been skipped */
1319PRE_SYSCALL(compat_30_getfh)(void *fname_, void *fhp_) { /* TODO */ }
1320POST_SYSCALL(compat_30_getfh)(long long res, void *fname_, void *fhp_) {
1321  /* TODO */
1322}
1323PRE_SYSCALL(compat_09_ogetdomainname)(void *domainname_, long long len_) {
1324  /* TODO */
1325}
1326POST_SYSCALL(compat_09_ogetdomainname)
1327(long long res, void *domainname_, long long len_) {
1328  /* TODO */
1329}
1330PRE_SYSCALL(compat_09_osetdomainname)(void *domainname_, long long len_) {
1331  /* TODO */
1332}
1333POST_SYSCALL(compat_09_osetdomainname)
1334(long long res, void *domainname_, long long len_) {
1335  /* TODO */
1336}
1337PRE_SYSCALL(compat_09_ouname)(void *name_) { /* TODO */ }
1338POST_SYSCALL(compat_09_ouname)(long long res, void *name_) { /* TODO */ }
1339PRE_SYSCALL(sysarch)(long long op_, void *parms_) { /* TODO */ }
1340POST_SYSCALL(sysarch)(long long res, long long op_, void *parms_) { /* TODO */ }
1341PRE_SYSCALL(__futex)
1342(void *uaddr_, long long op_, long long val_, void *timeout_, void *uaddr2_,
1343  long long val2_, long long val3_) {
1344  /* TODO */
1345}
1346POST_SYSCALL(__futex)
1347(long long res, void *uaddr_, long long op_, long long val_, void *timeout_,
1348  void *uaddr2_, long long val2_, long long val3_) {
1349  /* TODO */
1350}
1351PRE_SYSCALL(__futex_set_robust_list)(void *head_, long long len_) { /* TODO */ }
1352POST_SYSCALL(__futex_set_robust_list)
1353(long long res, void *head_, long long len_) {
1354  /* TODO */
1355}
1356PRE_SYSCALL(__futex_get_robust_list)
1357(long long lwpid_, void **headp_, void *lenp_) {
1358  /* TODO */
1359}
1360POST_SYSCALL(__futex_get_robust_list)
1361(long long res, long long lwpid_, void **headp_, void *lenp_) {
1362  /* TODO */
1363}
1364#if !defined(_LP64)
1365PRE_SYSCALL(compat_10_osemsys)
1366(long long which_, long long a2_, long long a3_, long long a4_, long long a5_) {
1367  /* TODO */
1368}
1369POST_SYSCALL(compat_10_osemsys)
1370(long long res, long long which_, long long a2_, long long a3_, long long a4_,
1371  long long a5_) {
1372  /* TODO */
1373}
1374#else
1375/* syscall 169 has been skipped */
1376#endif
1377#if !defined(_LP64)
1378PRE_SYSCALL(compat_10_omsgsys)
1379(long long which_, long long a2_, long long a3_, long long a4_, long long a5_,
1380  long long a6_) {
1381  /* TODO */
1382}
1383POST_SYSCALL(compat_10_omsgsys)
1384(long long res, long long which_, long long a2_, long long a3_, long long a4_,
1385  long long a5_, long long a6_) {
1386  /* TODO */
1387}
1388#else
1389/* syscall 170 has been skipped */
1390#endif
1391#if !defined(_LP64)
1392PRE_SYSCALL(compat_10_oshmsys)
1393(long long which_, long long a2_, long long a3_, long long a4_) {
1394  /* TODO */
1395}
1396POST_SYSCALL(compat_10_oshmsys)
1397(long long res, long long which_, long long a2_, long long a3_, long long a4_) {
1398  /* TODO */
1399}
1400#else
1401/* syscall 171 has been skipped */
1402#endif
1403/* syscall 172 has been skipped */
1404PRE_SYSCALL(pread)
1405(long long fd_, void *buf_, long long nbyte_, long long PAD_,
1406  long long offset_) {
1407  if (buf_) {
1408    PRE_WRITE(buf_, nbyte_);
1409  }
1410}
1411POST_SYSCALL(pread)
1412(long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
1413  long long offset_) {
1414  if (res > 0) {
1415    POST_WRITE(buf_, res);
1416  }
1417}
1418PRE_SYSCALL(pwrite)
1419(long long fd_, void *buf_, long long nbyte_, long long PAD_,
1420  long long offset_) {
1421  if (buf_) {
1422    PRE_READ(buf_, nbyte_);
1423  }
1424}
1425POST_SYSCALL(pwrite)
1426(long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
1427  long long offset_) {
1428  if (res > 0) {
1429    POST_READ(buf_, res);
1430  }
1431}
1432PRE_SYSCALL(compat_30_ntp_gettime)(void *ntvp_) { /* TODO */ }
1433POST_SYSCALL(compat_30_ntp_gettime)(long long res, void *ntvp_) { /* TODO */ }
1434#if defined(NTP) || !defined(_KERNEL_OPT)
1435PRE_SYSCALL(ntp_adjtime)(void *tp_) { /* Nothing to do */ }
1436POST_SYSCALL(ntp_adjtime)(long long res, void *tp_) { /* Nothing to do */ }
1437#else
1438/* syscall 176 has been skipped */
1439#endif
1440/* syscall 177 has been skipped */
1441/* syscall 178 has been skipped */
1442/* syscall 179 has been skipped */
1443/* syscall 180 has been skipped */
1444PRE_SYSCALL(setgid)(long long gid_) { /* Nothing to do */ }
1445POST_SYSCALL(setgid)(long long res, long long gid_) { /* Nothing to do */ }
1446PRE_SYSCALL(setegid)(long long egid_) { /* Nothing to do */ }
1447POST_SYSCALL(setegid)(long long res, long long egid_) { /* Nothing to do */ }
1448PRE_SYSCALL(seteuid)(long long euid_) { /* Nothing to do */ }
1449POST_SYSCALL(seteuid)(long long res, long long euid_) { /* Nothing to do */ }
1450PRE_SYSCALL(lfs_bmapv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
1451  /* TODO */
1452}
1453POST_SYSCALL(lfs_bmapv)
1454(long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
1455  /* TODO */
1456}
1457PRE_SYSCALL(lfs_markv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
1458  /* TODO */
1459}
1460POST_SYSCALL(lfs_markv)
1461(long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
1462  /* TODO */
1463}
1464PRE_SYSCALL(lfs_segclean)(void *fsidp_, long long segment_) { /* TODO */ }
1465POST_SYSCALL(lfs_segclean)(long long res, void *fsidp_, long long segment_) {
1466  /* TODO */
1467}
1468PRE_SYSCALL(compat_50_lfs_segwait)(void *fsidp_, void *tv_) { /* TODO */ }
1469POST_SYSCALL(compat_50_lfs_segwait)(long long res, void *fsidp_, void *tv_) {
1470  /* TODO */
1471}
1472PRE_SYSCALL(compat_12_stat12)(void *path_, void *ub_) { /* TODO */ }
1473POST_SYSCALL(compat_12_stat12)(long long res, void *path_, void *ub_) {
1474  /* TODO */
1475}
1476PRE_SYSCALL(compat_12_fstat12)(long long fd_, void *sb_) { /* TODO */ }
1477POST_SYSCALL(compat_12_fstat12)(long long res, long long fd_, void *sb_) {
1478  /* TODO */
1479}
1480PRE_SYSCALL(compat_12_lstat12)(void *path_, void *ub_) { /* TODO */ }
1481POST_SYSCALL(compat_12_lstat12)(long long res, void *path_, void *ub_) {
1482  /* TODO */
1483}
1484PRE_SYSCALL(pathconf)(void *path_, long long name_) {
1485  const char *path = (const char *)path_;
1486  if (path) {
1487    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1488  }
1489}
1490POST_SYSCALL(pathconf)(long long res, void *path_, long long name_) {
1491  if (res != -1) {
1492    const char *path = (const char *)path_;
1493    if (path) {
1494      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1495    }
1496  }
1497}
1498PRE_SYSCALL(fpathconf)(long long fd_, long long name_) { /* Nothing to do */ }
1499POST_SYSCALL(fpathconf)(long long res, long long fd_, long long name_) {
1500  /* Nothing to do */
1501}
1502PRE_SYSCALL(getsockopt2)
1503(long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
1504  /* TODO */
1505}
1506POST_SYSCALL(getsockopt2)
1507(long long res, long long s_, long long level_, long long name_, void *val_,
1508  void *avalsize_) {
1509  /* TODO */
1510}
1511PRE_SYSCALL(getrlimit)(long long which_, void *rlp_) {
1512  PRE_WRITE(rlp_, struct_rlimit_sz);
1513}
1514POST_SYSCALL(getrlimit)(long long res, long long which_, void *rlp_) {
1515  if (res == 0) {
1516    POST_WRITE(rlp_, struct_rlimit_sz);
1517  }
1518}
1519PRE_SYSCALL(setrlimit)(long long which_, void *rlp_) {
1520  PRE_READ(rlp_, struct_rlimit_sz);
1521}
1522POST_SYSCALL(setrlimit)(long long res, long long which_, void *rlp_) {
1523  if (res == 0) {
1524    POST_READ(rlp_, struct_rlimit_sz);
1525  }
1526}
1527PRE_SYSCALL(compat_12_getdirentries)
1528(long long fd_, void *buf_, long long count_, void *basep_) {
1529  /* TODO */
1530}
1531POST_SYSCALL(compat_12_getdirentries)
1532(long long res, long long fd_, void *buf_, long long count_, void *basep_) {
1533  /* TODO */
1534}
1535PRE_SYSCALL(mmap)
1536(void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
1537  long long PAD_, long long pos_) {
1538  /* Nothing to do */
1539}
1540POST_SYSCALL(mmap)
1541(long long res, void *addr_, long long len_, long long prot_, long long flags_,
1542  long long fd_, long long PAD_, long long pos_) {
1543  /* Nothing to do */
1544}
1545PRE_SYSCALL(__syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
1546  /* Nothing to do */
1547}
1548POST_SYSCALL(__syscall)
1549(long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
1550  /* Nothing to do */
1551}
1552PRE_SYSCALL(lseek)
1553(long long fd_, long long PAD_, long long offset_, long long whence_) {
1554  /* Nothing to do */
1555}
1556POST_SYSCALL(lseek)
1557(long long res, long long fd_, long long PAD_, long long offset_,
1558  long long whence_) {
1559  /* Nothing to do */
1560}
1561PRE_SYSCALL(truncate)(void *path_, long long PAD_, long long length_) {
1562  const char *path = (const char *)path_;
1563  if (path) {
1564    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1565  }
1566}
1567POST_SYSCALL(truncate)
1568(long long res, void *path_, long long PAD_, long long length_) {
1569  if (res == 0) {
1570    const char *path = (const char *)path_;
1571    if (path) {
1572      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1573    }
1574  }
1575}
1576PRE_SYSCALL(ftruncate)(long long fd_, long long PAD_, long long length_) {
1577  /* Nothing to do */
1578}
1579POST_SYSCALL(ftruncate)
1580(long long res, long long fd_, long long PAD_, long long length_) {
1581  /* Nothing to do */
1582}
1583PRE_SYSCALL(__sysctl)
1584(void *name_, long long namelen_, void *oldv_, void *oldlenp_, void *newv_,
1585  long long newlen_) {
1586  const int *name = (const int *)name_;
1587  if (name) {
1588    PRE_READ(name, namelen_ * sizeof(*name));
1589  }
1590  if (newv_) {
1591    PRE_READ(name, newlen_);
1592  }
1593}
1594POST_SYSCALL(__sysctl)
1595(long long res, void *name_, long long namelen_, void *oldv_, void *oldlenp_,
1596  void *newv_, long long newlen_) {
1597  if (res == 0) {
1598    const int *name = (const int *)name_;
1599    if (name) {
1600      POST_READ(name, namelen_ * sizeof(*name));
1601    }
1602    if (newv_) {
1603      POST_READ(name, newlen_);
1604    }
1605  }
1606}
1607PRE_SYSCALL(mlock)(void *addr_, long long len_) { /* Nothing to do */ }
1608POST_SYSCALL(mlock)(long long res, void *addr_, long long len_) {
1609  /* Nothing to do */
1610}
1611PRE_SYSCALL(munlock)(void *addr_, long long len_) { /* Nothing to do */ }
1612POST_SYSCALL(munlock)(long long res, void *addr_, long long len_) {
1613  /* Nothing to do */
1614}
1615PRE_SYSCALL(undelete)(void *path_) {
1616  const char *path = (const char *)path_;
1617  if (path) {
1618    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
1619  }
1620}
1621POST_SYSCALL(undelete)(long long res, void *path_) {
1622  if (res == 0) {
1623    const char *path = (const char *)path_;
1624    if (path) {
1625      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
1626    }
1627  }
1628}
1629PRE_SYSCALL(compat_50_futimes)(long long fd_, void *tptr_) { /* TODO */ }
1630POST_SYSCALL(compat_50_futimes)(long long res, long long fd_, void *tptr_) {
1631  /* TODO */
1632}
1633PRE_SYSCALL(getpgid)(long long pid_) { /* Nothing to do */ }
1634POST_SYSCALL(getpgid)(long long res, long long pid_) { /* Nothing to do */ }
1635PRE_SYSCALL(reboot)(long long opt_, void *bootstr_) {
1636  const char *bootstr = (const char *)bootstr_;
1637  if (bootstr) {
1638    PRE_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
1639  }
1640}
1641POST_SYSCALL(reboot)(long long res, long long opt_, void *bootstr_) {
1642  /* This call should never return */
1643  const char *bootstr = (const char *)bootstr_;
1644  if (bootstr) {
1645    POST_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
1646  }
1647}
1648PRE_SYSCALL(poll)(void *fds_, long long nfds_, long long timeout_) {
1649  /* Nothing to do */
1650}
1651POST_SYSCALL(poll)
1652(long long res, void *fds_, long long nfds_, long long timeout_) {
1653  /* Nothing to do */
1654}
1655PRE_SYSCALL(afssys)
1656(long long id_, long long a1_, long long a2_, long long a3_, long long a4_,
1657  long long a5_, long long a6_) {
1658  /* TODO */
1659}
1660POST_SYSCALL(afssys)
1661(long long res, long long id_, long long a1_, long long a2_, long long a3_,
1662  long long a4_, long long a5_, long long a6_) {
1663  /* TODO */
1664}
1665/* syscall 211 has been skipped */
1666/* syscall 212 has been skipped */
1667/* syscall 213 has been skipped */
1668/* syscall 214 has been skipped */
1669/* syscall 215 has been skipped */
1670/* syscall 216 has been skipped */
1671/* syscall 217 has been skipped */
1672/* syscall 218 has been skipped */
1673/* syscall 219 has been skipped */
1674PRE_SYSCALL(compat_14___semctl)
1675(long long semid_, long long semnum_, long long cmd_, void *arg_) {
1676  /* TODO */
1677}
1678POST_SYSCALL(compat_14___semctl)
1679(long long res, long long semid_, long long semnum_, long long cmd_,
1680  void *arg_) {
1681  /* TODO */
1682}
1683PRE_SYSCALL(semget)(long long key_, long long nsems_, long long semflg_) {
1684  /* Nothing to do */
1685}
1686POST_SYSCALL(semget)
1687(long long res, long long key_, long long nsems_, long long semflg_) {
1688  /* Nothing to do */
1689}
1690PRE_SYSCALL(semop)(long long semid_, void *sops_, long long nsops_) {
1691  if (sops_) {
1692    PRE_READ(sops_, nsops_ * struct_sembuf_sz);
1693  }
1694}
1695POST_SYSCALL(semop)
1696(long long res, long long semid_, void *sops_, long long nsops_) {
1697  if (res == 0) {
1698    if (sops_) {
1699      POST_READ(sops_, nsops_ * struct_sembuf_sz);
1700    }
1701  }
1702}
1703PRE_SYSCALL(semconfig)(long long flag_) { /* Nothing to do */ }
1704POST_SYSCALL(semconfig)(long long res, long long flag_) { /* Nothing to do */ }
1705PRE_SYSCALL(compat_14_msgctl)(long long msqid_, long long cmd_, void *buf_) {
1706  /* TODO */
1707}
1708POST_SYSCALL(compat_14_msgctl)
1709(long long res, long long msqid_, long long cmd_, void *buf_) {
1710  /* TODO */
1711}
1712PRE_SYSCALL(msgget)(long long key_, long long msgflg_) { /* Nothing to do */ }
1713POST_SYSCALL(msgget)(long long res, long long key_, long long msgflg_) {
1714  /* Nothing to do */
1715}
1716PRE_SYSCALL(msgsnd)
1717(long long msqid_, void *msgp_, long long msgsz_, long long msgflg_) {
1718  if (msgp_) {
1719    PRE_READ(msgp_, msgsz_);
1720  }
1721}
1722POST_SYSCALL(msgsnd)
1723(long long res, long long msqid_, void *msgp_, long long msgsz_,
1724  long long msgflg_) {
1725  if (res == 0) {
1726    if (msgp_) {
1727      POST_READ(msgp_, msgsz_);
1728    }
1729  }
1730}
1731PRE_SYSCALL(msgrcv)
1732(long long msqid_, void *msgp_, long long msgsz_, long long msgtyp_,
1733  long long msgflg_) {
1734  /* Nothing to do */
1735}
1736POST_SYSCALL(msgrcv)
1737(long long res, long long msqid_, void *msgp_, long long msgsz_,
1738  long long msgtyp_, long long msgflg_) {
1739  /* Nothing to do */
1740}
1741PRE_SYSCALL(shmat)(long long shmid_, void *shmaddr_, long long shmflg_) {
1742  /* Nothing to do */
1743}
1744POST_SYSCALL(shmat)
1745(long long res, long long shmid_, void *shmaddr_, long long shmflg_) {
1746  /* Nothing to do */
1747}
1748PRE_SYSCALL(compat_14_shmctl)(long long shmid_, long long cmd_, void *buf_) {
1749  /* TODO */
1750}
1751POST_SYSCALL(compat_14_shmctl)
1752(long long res, long long shmid_, long long cmd_, void *buf_) {
1753  /* TODO */
1754}
1755PRE_SYSCALL(shmdt)(void *shmaddr_) { /* Nothing to do */ }
1756POST_SYSCALL(shmdt)(long long res, void *shmaddr_) { /* Nothing to do */ }
1757PRE_SYSCALL(shmget)(long long key_, long long size_, long long shmflg_) {
1758  /* Nothing to do */
1759}
1760POST_SYSCALL(shmget)
1761(long long res, long long key_, long long size_, long long shmflg_) {
1762  /* Nothing to do */
1763}
1764PRE_SYSCALL(compat_50_clock_gettime)(long long clock_id_, void *tp_) {
1765  /* TODO */
1766}
1767POST_SYSCALL(compat_50_clock_gettime)
1768(long long res, long long clock_id_, void *tp_) {
1769  /* TODO */
1770}
1771PRE_SYSCALL(compat_50_clock_settime)(long long clock_id_, void *tp_) {
1772  /* TODO */
1773}
1774POST_SYSCALL(compat_50_clock_settime)
1775(long long res, long long clock_id_, void *tp_) {
1776  /* TODO */
1777}
1778PRE_SYSCALL(compat_50_clock_getres)(long long clock_id_, void *tp_) {
1779  /* TODO */
1780}
1781POST_SYSCALL(compat_50_clock_getres)
1782(long long res, long long clock_id_, void *tp_) {
1783  /* TODO */
1784}
1785PRE_SYSCALL(timer_create)(long long clock_id_, void *evp_, void *timerid_) {
1786  /* Nothing to do */
1787}
1788POST_SYSCALL(timer_create)
1789(long long res, long long clock_id_, void *evp_, void *timerid_) {
1790  /* Nothing to do */
1791}
1792PRE_SYSCALL(timer_delete)(long long timerid_) { /* Nothing to do */ }
1793POST_SYSCALL(timer_delete)(long long res, long long timerid_) {
1794  /* Nothing to do */
1795}
1796PRE_SYSCALL(compat_50_timer_settime)
1797(long long timerid_, long long flags_, void *value_, void *ovalue_) {
1798  /* TODO */
1799}
1800POST_SYSCALL(compat_50_timer_settime)
1801(long long res, long long timerid_, long long flags_, void *value_,
1802  void *ovalue_) {
1803  /* TODO */
1804}
1805PRE_SYSCALL(compat_50_timer_gettime)(long long timerid_, void *value_) {
1806  /* TODO */
1807}
1808POST_SYSCALL(compat_50_timer_gettime)
1809(long long res, long long timerid_, void *value_) {
1810  /* TODO */
1811}
1812PRE_SYSCALL(timer_getoverrun)(long long timerid_) { /* Nothing to do */ }
1813POST_SYSCALL(timer_getoverrun)(long long res, long long timerid_) {
1814  /* Nothing to do */
1815}
1816PRE_SYSCALL(compat_50_nanosleep)(void *rqtp_, void *rmtp_) { /* TODO */ }
1817POST_SYSCALL(compat_50_nanosleep)(long long res, void *rqtp_, void *rmtp_) {
1818  /* TODO */
1819}
1820PRE_SYSCALL(fdatasync)(long long fd_) { /* Nothing to do */ }
1821POST_SYSCALL(fdatasync)(long long res, long long fd_) { /* Nothing to do */ }
1822PRE_SYSCALL(mlockall)(long long flags_) { /* Nothing to do */ }
1823POST_SYSCALL(mlockall)(long long res, long long flags_) { /* Nothing to do */ }
1824PRE_SYSCALL(munlockall)(void) { /* Nothing to do */ }
1825POST_SYSCALL(munlockall)(long long res) { /* Nothing to do */ }
1826PRE_SYSCALL(compat_50___sigtimedwait)(void *set_, void *info_, void *timeout_) {
1827  /* TODO */
1828}
1829POST_SYSCALL(compat_50___sigtimedwait)
1830(long long res, void *set_, void *info_, void *timeout_) {
1831  /* TODO */
1832}
1833PRE_SYSCALL(sigqueueinfo)(long long pid_, void *info_) {
1834  if (info_) {
1835    PRE_READ(info_, siginfo_t_sz);
1836  }
1837}
1838POST_SYSCALL(sigqueueinfo)(long long res, long long pid_, void *info_) {}
1839PRE_SYSCALL(modctl)(long long cmd_, void *arg_) { /* TODO */ }
1840POST_SYSCALL(modctl)(long long res, long long cmd_, void *arg_) { /* TODO */ }
1841PRE_SYSCALL(_ksem_init)(long long value_, void *idp_) { /* Nothing to do */ }
1842POST_SYSCALL(_ksem_init)(long long res, long long value_, void *idp_) {
1843  /* Nothing to do */
1844}
1845PRE_SYSCALL(_ksem_open)
1846(void *name_, long long oflag_, long long mode_, long long value_, void *idp_) {
1847  const char *name = (const char *)name_;
1848  if (name) {
1849    PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1850  }
1851}
1852POST_SYSCALL(_ksem_open)
1853(long long res, void *name_, long long oflag_, long long mode_,
1854  long long value_, void *idp_) {
1855  const char *name = (const char *)name_;
1856  if (name) {
1857    POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1858  }
1859}
1860PRE_SYSCALL(_ksem_unlink)(void *name_) {
1861  const char *name = (const char *)name_;
1862  if (name) {
1863    PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1864  }
1865}
1866POST_SYSCALL(_ksem_unlink)(long long res, void *name_) {
1867  const char *name = (const char *)name_;
1868  if (name) {
1869    POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1870  }
1871}
1872PRE_SYSCALL(_ksem_close)(long long id_) { /* Nothing to do */ }
1873POST_SYSCALL(_ksem_close)(long long res, long long id_) { /* Nothing to do */ }
1874PRE_SYSCALL(_ksem_post)(long long id_) { /* Nothing to do */ }
1875POST_SYSCALL(_ksem_post)(long long res, long long id_) { /* Nothing to do */ }
1876PRE_SYSCALL(_ksem_wait)(long long id_) { /* Nothing to do */ }
1877POST_SYSCALL(_ksem_wait)(long long res, long long id_) { /* Nothing to do */ }
1878PRE_SYSCALL(_ksem_trywait)(long long id_) { /* Nothing to do */ }
1879POST_SYSCALL(_ksem_trywait)(long long res, long long id_) {
1880  /* Nothing to do */
1881}
1882PRE_SYSCALL(_ksem_getvalue)(long long id_, void *value_) { /* Nothing to do */ }
1883POST_SYSCALL(_ksem_getvalue)(long long res, long long id_, void *value_) {
1884  /* Nothing to do */
1885}
1886PRE_SYSCALL(_ksem_destroy)(long long id_) { /* Nothing to do */ }
1887POST_SYSCALL(_ksem_destroy)(long long res, long long id_) {
1888  /* Nothing to do */
1889}
1890PRE_SYSCALL(_ksem_timedwait)(long long id_, void *abstime_) {
1891  if (abstime_) {
1892    PRE_READ(abstime_, struct_timespec_sz);
1893  }
1894}
1895POST_SYSCALL(_ksem_timedwait)(long long res, long long id_, void *abstime_) {}
1896PRE_SYSCALL(mq_open)
1897(void *name_, long long oflag_, long long mode_, void *attr_) {
1898  const char *name = (const char *)name_;
1899  if (name) {
1900    PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1901  }
1902}
1903POST_SYSCALL(mq_open)
1904(long long res, void *name_, long long oflag_, long long mode_, void *attr_) {
1905  const char *name = (const char *)name_;
1906  if (name) {
1907    POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1908  }
1909}
1910PRE_SYSCALL(mq_close)(long long mqdes_) { /* Nothing to do */ }
1911POST_SYSCALL(mq_close)(long long res, long long mqdes_) { /* Nothing to do */ }
1912PRE_SYSCALL(mq_unlink)(void *name_) {
1913  const char *name = (const char *)name_;
1914  if (name) {
1915    PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
1916  }
1917}
1918POST_SYSCALL(mq_unlink)(long long res, void *name_) {
1919  const char *name = (const char *)name_;
1920  if (name) {
1921    POST_READ(name, __sanitizer::internal_strlen(name) + 1);
1922  }
1923}
1924PRE_SYSCALL(mq_getattr)(long long mqdes_, void *mqstat_) { /* Nothing to do */ }
1925POST_SYSCALL(mq_getattr)(long long res, long long mqdes_, void *mqstat_) {
1926  /* Nothing to do */
1927}
1928PRE_SYSCALL(mq_setattr)(long long mqdes_, void *mqstat_, void *omqstat_) {
1929  if (mqstat_) {
1930    PRE_READ(mqstat_, struct_mq_attr_sz);
1931  }
1932}
1933POST_SYSCALL(mq_setattr)
1934(long long res, long long mqdes_, void *mqstat_, void *omqstat_) {}
1935PRE_SYSCALL(mq_notify)(long long mqdes_, void *notification_) {
1936  if (notification_) {
1937    PRE_READ(notification_, struct_sigevent_sz);
1938  }
1939}
1940POST_SYSCALL(mq_notify)(long long res, long long mqdes_, void *notification_) {}
1941PRE_SYSCALL(mq_send)
1942(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_) {
1943  if (msg_ptr_) {
1944    PRE_READ(msg_ptr_, msg_len_);
1945  }
1946}
1947POST_SYSCALL(mq_send)
1948(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1949  long long msg_prio_) {}
1950PRE_SYSCALL(mq_receive)
1951(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_) {
1952  /* Nothing to do */
1953}
1954POST_SYSCALL(mq_receive)
1955(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1956  void *msg_prio_) {
1957  /* Nothing to do */
1958}
1959PRE_SYSCALL(compat_50_mq_timedsend)
1960(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
1961  void *abs_timeout_) {
1962  /* TODO */
1963}
1964POST_SYSCALL(compat_50_mq_timedsend)
1965(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1966  long long msg_prio_, void *abs_timeout_) {
1967  /* TODO */
1968}
1969PRE_SYSCALL(compat_50_mq_timedreceive)
1970(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
1971  void *abs_timeout_) {
1972  /* TODO */
1973}
1974POST_SYSCALL(compat_50_mq_timedreceive)
1975(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
1976  void *msg_prio_, void *abs_timeout_) {
1977  /* TODO */
1978}
1979/* syscall 267 has been skipped */
1980/* syscall 268 has been skipped */
1981/* syscall 269 has been skipped */
1982PRE_SYSCALL(__posix_rename)(void *from_, void *to_) {
1983  const char *from = (const char *)from_;
1984  const char *to = (const char *)to_;
1985  if (from_) {
1986    PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
1987  }
1988  if (to) {
1989    PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
1990  }
1991}
1992POST_SYSCALL(__posix_rename)(long long res, void *from_, void *to_) {
1993  const char *from = (const char *)from_;
1994  const char *to = (const char *)to_;
1995  if (from) {
1996    POST_READ(from, __sanitizer::internal_strlen(from) + 1);
1997  }
1998  if (to) {
1999    POST_READ(to, __sanitizer::internal_strlen(to) + 1);
2000  }
2001}
2002PRE_SYSCALL(swapctl)(long long cmd_, void *arg_, long long misc_) { /* TODO */ }
2003POST_SYSCALL(swapctl)
2004(long long res, long long cmd_, void *arg_, long long misc_) {
2005  /* TODO */
2006}
2007PRE_SYSCALL(compat_30_getdents)(long long fd_, void *buf_, long long count_) {
2008  /* TODO */
2009}
2010POST_SYSCALL(compat_30_getdents)
2011(long long res, long long fd_, void *buf_, long long count_) {
2012  /* TODO */
2013}
2014PRE_SYSCALL(minherit)(void *addr_, long long len_, long long inherit_) {
2015  /* Nothing to do */
2016}
2017POST_SYSCALL(minherit)
2018(long long res, void *addr_, long long len_, long long inherit_) {
2019  /* Nothing to do */
2020}
2021PRE_SYSCALL(lchmod)(void *path_, long long mode_) {
2022  const char *path = (const char *)path_;
2023  if (path) {
2024    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2025  }
2026}
2027POST_SYSCALL(lchmod)(long long res, void *path_, long long mode_) {
2028  const char *path = (const char *)path_;
2029  if (path) {
2030    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2031  }
2032}
2033PRE_SYSCALL(lchown)(void *path_, long long uid_, long long gid_) {
2034  const char *path = (const char *)path_;
2035  if (path) {
2036    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2037  }
2038}
2039POST_SYSCALL(lchown)
2040(long long res, void *path_, long long uid_, long long gid_) {
2041  const char *path = (const char *)path_;
2042  if (path) {
2043    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2044  }
2045}
2046PRE_SYSCALL(compat_50_lutimes)(void *path_, void *tptr_) { /* TODO */ }
2047POST_SYSCALL(compat_50_lutimes)(long long res, void *path_, void *tptr_) {
2048  /* TODO */
2049}
2050PRE_SYSCALL(__msync13)(void *addr_, long long len_, long long flags_) {
2051  /* Nothing to do */
2052}
2053POST_SYSCALL(__msync13)
2054(long long res, void *addr_, long long len_, long long flags_) {
2055  /* Nothing to do */
2056}
2057PRE_SYSCALL(compat_30___stat13)(void *path_, void *ub_) { /* TODO */ }
2058POST_SYSCALL(compat_30___stat13)(long long res, void *path_, void *ub_) {
2059  /* TODO */
2060}
2061PRE_SYSCALL(compat_30___fstat13)(long long fd_, void *sb_) { /* TODO */ }
2062POST_SYSCALL(compat_30___fstat13)(long long res, long long fd_, void *sb_) {
2063  /* TODO */
2064}
2065PRE_SYSCALL(compat_30___lstat13)(void *path_, void *ub_) { /* TODO */ }
2066POST_SYSCALL(compat_30___lstat13)(long long res, void *path_, void *ub_) {
2067  /* TODO */
2068}
2069PRE_SYSCALL(__sigaltstack14)(void *nss_, void *oss_) {
2070  if (nss_) {
2071    PRE_READ(nss_, struct_sigaltstack_sz);
2072  }
2073  if (oss_) {
2074    PRE_READ(oss_, struct_sigaltstack_sz);
2075  }
2076}
2077POST_SYSCALL(__sigaltstack14)(long long res, void *nss_, void *oss_) {}
2078PRE_SYSCALL(__vfork14)(void) { /* Nothing to do */ }
2079POST_SYSCALL(__vfork14)(long long res) { /* Nothing to do */ }
2080PRE_SYSCALL(__posix_chown)(void *path_, long long uid_, long long gid_) {
2081  const char *path = (const char *)path_;
2082  if (path) {
2083    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2084  }
2085}
2086POST_SYSCALL(__posix_chown)
2087(long long res, void *path_, long long uid_, long long gid_) {
2088  const char *path = (const char *)path_;
2089  if (path) {
2090    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2091  }
2092}
2093PRE_SYSCALL(__posix_fchown)(long long fd_, long long uid_, long long gid_) {
2094  /* Nothing to do */
2095}
2096POST_SYSCALL(__posix_fchown)
2097(long long res, long long fd_, long long uid_, long long gid_) {
2098  /* Nothing to do */
2099}
2100PRE_SYSCALL(__posix_lchown)(void *path_, long long uid_, long long gid_) {
2101  const char *path = (const char *)path_;
2102  if (path) {
2103    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2104  }
2105}
2106POST_SYSCALL(__posix_lchown)
2107(long long res, void *path_, long long uid_, long long gid_) {
2108  const char *path = (const char *)path_;
2109  if (path) {
2110    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2111  }
2112}
2113PRE_SYSCALL(getsid)(long long pid_) { /* Nothing to do */ }
2114POST_SYSCALL(getsid)(long long res, long long pid_) { /* Nothing to do */ }
2115PRE_SYSCALL(__clone)(long long flags_, void *stack_) { /* Nothing to do */ }
2116POST_SYSCALL(__clone)(long long res, long long flags_, void *stack_) {
2117  /* Nothing to do */
2118}
2119PRE_SYSCALL(fktrace)
2120(long long fd_, long long ops_, long long facs_, long long pid_) {
2121  /* Nothing to do */
2122}
2123POST_SYSCALL(fktrace)
2124(long long res, long long fd_, long long ops_, long long facs_,
2125  long long pid_) {
2126  /* Nothing to do */
2127}
2128PRE_SYSCALL(preadv)
2129(long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2130  long long offset_) {
2131  /* Nothing to do */
2132}
2133POST_SYSCALL(preadv)
2134(long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2135  long long offset_) {
2136  /* Nothing to do */
2137}
2138PRE_SYSCALL(pwritev)
2139(long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2140  long long offset_) {
2141  /* Nothing to do */
2142}
2143POST_SYSCALL(pwritev)
2144(long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
2145  long long offset_) {
2146  /* Nothing to do */
2147}
2148PRE_SYSCALL(compat_16___sigaction14)
2149(long long signum_, void *nsa_, void *osa_) {
2150  /* TODO */
2151}
2152POST_SYSCALL(compat_16___sigaction14)
2153(long long res, long long signum_, void *nsa_, void *osa_) {
2154  /* TODO */
2155}
2156PRE_SYSCALL(__sigpending14)(void *set_) { /* Nothing to do */ }
2157POST_SYSCALL(__sigpending14)(long long res, void *set_) { /* Nothing to do */ }
2158PRE_SYSCALL(__sigprocmask14)(long long how_, void *set_, void *oset_) {
2159  /* Nothing to do */
2160}
2161POST_SYSCALL(__sigprocmask14)
2162(long long res, long long how_, void *set_, void *oset_) {
2163  /* Nothing to do */
2164}
2165PRE_SYSCALL(__sigsuspend14)(void *set_) {
2166  if (set_) {
2167    PRE_READ(set_, sizeof(__sanitizer_sigset_t));
2168  }
2169}
2170POST_SYSCALL(__sigsuspend14)(long long res, void *set_) {
2171  if (set_) {
2172    PRE_READ(set_, sizeof(__sanitizer_sigset_t));
2173  }
2174}
2175PRE_SYSCALL(compat_16___sigreturn14)(void *sigcntxp_) { /* TODO */ }
2176POST_SYSCALL(compat_16___sigreturn14)(long long res, void *sigcntxp_) {
2177  /* TODO */
2178}
2179PRE_SYSCALL(__getcwd)(void *bufp_, long long length_) { /* Nothing to do */ }
2180POST_SYSCALL(__getcwd)(long long res, void *bufp_, long long length_) {
2181  /* Nothing to do */
2182}
2183PRE_SYSCALL(fchroot)(long long fd_) { /* Nothing to do */ }
2184POST_SYSCALL(fchroot)(long long res, long long fd_) { /* Nothing to do */ }
2185PRE_SYSCALL(compat_30_fhopen)(void *fhp_, long long flags_) { /* TODO */ }
2186POST_SYSCALL(compat_30_fhopen)(long long res, void *fhp_, long long flags_) {
2187  /* TODO */
2188}
2189PRE_SYSCALL(compat_30_fhstat)(void *fhp_, void *sb_) { /* TODO */ }
2190POST_SYSCALL(compat_30_fhstat)(long long res, void *fhp_, void *sb_) {
2191  /* TODO */
2192}
2193PRE_SYSCALL(compat_20_fhstatfs)(void *fhp_, void *buf_) { /* TODO */ }
2194POST_SYSCALL(compat_20_fhstatfs)(long long res, void *fhp_, void *buf_) {
2195  /* TODO */
2196}
2197PRE_SYSCALL(compat_50_____semctl13)
2198(long long semid_, long long semnum_, long long cmd_, void *arg_) {
2199  /* TODO */
2200}
2201POST_SYSCALL(compat_50_____semctl13)
2202(long long res, long long semid_, long long semnum_, long long cmd_,
2203  void *arg_) {
2204  /* TODO */
2205}
2206PRE_SYSCALL(compat_50___msgctl13)
2207(long long msqid_, long long cmd_, void *buf_) {
2208  /* TODO */
2209}
2210POST_SYSCALL(compat_50___msgctl13)
2211(long long res, long long msqid_, long long cmd_, void *buf_) {
2212  /* TODO */
2213}
2214PRE_SYSCALL(compat_50___shmctl13)
2215(long long shmid_, long long cmd_, void *buf_) {
2216  /* TODO */
2217}
2218POST_SYSCALL(compat_50___shmctl13)
2219(long long res, long long shmid_, long long cmd_, void *buf_) {
2220  /* TODO */
2221}
2222PRE_SYSCALL(lchflags)(void *path_, long long flags_) {
2223  const char *path = (const char *)path_;
2224  if (path) {
2225    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2226  }
2227}
2228POST_SYSCALL(lchflags)(long long res, void *path_, long long flags_) {
2229  const char *path = (const char *)path_;
2230  if (path) {
2231    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2232  }
2233}
2234PRE_SYSCALL(issetugid)(void) { /* Nothing to do */ }
2235POST_SYSCALL(issetugid)(long long res) { /* Nothing to do */ }
2236PRE_SYSCALL(utrace)(void *label_, void *addr_, long long len_) {
2237  const char *label = (const char *)label_;
2238  if (label) {
2239    PRE_READ(label, __sanitizer::internal_strlen(label) + 1);
2240  }
2241  if (addr_) {
2242    PRE_READ(addr_, len_);
2243  }
2244}
2245POST_SYSCALL(utrace)(long long res, void *label_, void *addr_, long long len_) {
2246  const char *label = (const char *)label_;
2247  if (label) {
2248    POST_READ(label, __sanitizer::internal_strlen(label) + 1);
2249  }
2250  if (addr_) {
2251    POST_READ(addr_, len_);
2252  }
2253}
2254PRE_SYSCALL(getcontext)(void *ucp_) { /* Nothing to do */ }
2255POST_SYSCALL(getcontext)(long long res, void *ucp_) { /* Nothing to do */ }
2256PRE_SYSCALL(setcontext)(void *ucp_) {
2257  if (ucp_) {
2258    PRE_READ(ucp_, ucontext_t_sz);
2259  }
2260}
2261POST_SYSCALL(setcontext)(long long res, void *ucp_) {}
2262PRE_SYSCALL(_lwp_create)(void *ucp_, long long flags_, void *new_lwp_) {
2263  if (ucp_) {
2264    PRE_READ(ucp_, ucontext_t_sz);
2265  }
2266}
2267POST_SYSCALL(_lwp_create)
2268(long long res, void *ucp_, long long flags_, void *new_lwp_) {}
2269PRE_SYSCALL(_lwp_exit)(void) { /* Nothing to do */ }
2270POST_SYSCALL(_lwp_exit)(long long res) { /* Nothing to do */ }
2271PRE_SYSCALL(_lwp_self)(void) { /* Nothing to do */ }
2272POST_SYSCALL(_lwp_self)(long long res) { /* Nothing to do */ }
2273PRE_SYSCALL(_lwp_wait)(long long wait_for_, void *departed_) {
2274  /* Nothing to do */
2275}
2276POST_SYSCALL(_lwp_wait)(long long res, long long wait_for_, void *departed_) {
2277  /* Nothing to do */
2278}
2279PRE_SYSCALL(_lwp_suspend)(long long target_) { /* Nothing to do */ }
2280POST_SYSCALL(_lwp_suspend)(long long res, long long target_) {
2281  /* Nothing to do */
2282}
2283PRE_SYSCALL(_lwp_continue)(long long target_) { /* Nothing to do */ }
2284POST_SYSCALL(_lwp_continue)(long long res, long long target_) {
2285  /* Nothing to do */
2286}
2287PRE_SYSCALL(_lwp_wakeup)(long long target_) { /* Nothing to do */ }
2288POST_SYSCALL(_lwp_wakeup)(long long res, long long target_) {
2289  /* Nothing to do */
2290}
2291PRE_SYSCALL(_lwp_getprivate)(void) { /* Nothing to do */ }
2292POST_SYSCALL(_lwp_getprivate)(long long res) { /* Nothing to do */ }
2293PRE_SYSCALL(_lwp_setprivate)(void *ptr_) { /* Nothing to do */ }
2294POST_SYSCALL(_lwp_setprivate)(long long res, void *ptr_) { /* Nothing to do */ }
2295PRE_SYSCALL(_lwp_kill)(long long target_, long long signo_) {
2296  /* Nothing to do */
2297}
2298POST_SYSCALL(_lwp_kill)(long long res, long long target_, long long signo_) {
2299  /* Nothing to do */
2300}
2301PRE_SYSCALL(_lwp_detach)(long long target_) { /* Nothing to do */ }
2302POST_SYSCALL(_lwp_detach)(long long res, long long target_) {
2303  /* Nothing to do */
2304}
2305PRE_SYSCALL(compat_50__lwp_park)
2306(void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
2307  /* TODO */
2308}
2309POST_SYSCALL(compat_50__lwp_park)
2310(long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
2311  /* TODO */
2312}
2313PRE_SYSCALL(_lwp_unpark)(long long target_, void *hint_) { /* Nothing to do */ }
2314POST_SYSCALL(_lwp_unpark)(long long res, long long target_, void *hint_) {
2315  /* Nothing to do */
2316}
2317PRE_SYSCALL(_lwp_unpark_all)(void *targets_, long long ntargets_, void *hint_) {
2318  if (targets_) {
2319    PRE_READ(targets_, ntargets_ * sizeof(__sanitizer_lwpid_t));
2320  }
2321}
2322POST_SYSCALL(_lwp_unpark_all)
2323(long long res, void *targets_, long long ntargets_, void *hint_) {}
2324PRE_SYSCALL(_lwp_setname)(long long target_, void *name_) {
2325  const char *name = (const char *)name_;
2326  if (name) {
2327    PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
2328  }
2329}
2330POST_SYSCALL(_lwp_setname)(long long res, long long target_, void *name_) {
2331  const char *name = (const char *)name_;
2332  if (name) {
2333    POST_READ(name, __sanitizer::internal_strlen(name) + 1);
2334  }
2335}
2336PRE_SYSCALL(_lwp_getname)(long long target_, void *name_, long long len_) {
2337  /* Nothing to do */
2338}
2339POST_SYSCALL(_lwp_getname)
2340(long long res, long long target_, void *name_, long long len_) {
2341  /* Nothing to do */
2342}
2343PRE_SYSCALL(_lwp_ctl)(long long features_, void **address_) {
2344  /* Nothing to do */
2345}
2346POST_SYSCALL(_lwp_ctl)(long long res, long long features_, void **address_) {
2347  /* Nothing to do */
2348}
2349/* syscall 326 has been skipped */
2350/* syscall 327 has been skipped */
2351/* syscall 328 has been skipped */
2352/* syscall 329 has been skipped */
2353PRE_SYSCALL(compat_60_sa_register)
2354(void *newv_, void **oldv_, long long flags_, long long stackinfo_offset_) {
2355  /* TODO */
2356}
2357POST_SYSCALL(compat_60_sa_register)
2358(long long res, void *newv_, void **oldv_, long long flags_,
2359  long long stackinfo_offset_) {
2360  /* TODO */
2361}
2362PRE_SYSCALL(compat_60_sa_stacks)(long long num_, void *stacks_) { /* TODO */ }
2363POST_SYSCALL(compat_60_sa_stacks)
2364(long long res, long long num_, void *stacks_) {
2365  /* TODO */
2366}
2367PRE_SYSCALL(compat_60_sa_enable)(void) { /* TODO */ }
2368POST_SYSCALL(compat_60_sa_enable)(long long res) { /* TODO */ }
2369PRE_SYSCALL(compat_60_sa_setconcurrency)(long long concurrency_) { /* TODO */ }
2370POST_SYSCALL(compat_60_sa_setconcurrency)
2371(long long res, long long concurrency_) {
2372  /* TODO */
2373}
2374PRE_SYSCALL(compat_60_sa_yield)(void) { /* TODO */ }
2375POST_SYSCALL(compat_60_sa_yield)(long long res) { /* TODO */ }
2376PRE_SYSCALL(compat_60_sa_preempt)(long long sa_id_) { /* TODO */ }
2377POST_SYSCALL(compat_60_sa_preempt)(long long res, long long sa_id_) {
2378  /* TODO */
2379}
2380/* syscall 336 has been skipped */
2381/* syscall 337 has been skipped */
2382/* syscall 338 has been skipped */
2383/* syscall 339 has been skipped */
2384PRE_SYSCALL(__sigaction_sigtramp)
2385(long long signum_, void *nsa_, void *osa_, void *tramp_, long long vers_) {
2386  if (nsa_) {
2387    PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
2388  }
2389}
2390POST_SYSCALL(__sigaction_sigtramp)
2391(long long res, long long signum_, void *nsa_, void *osa_, void *tramp_,
2392  long long vers_) {
2393  if (nsa_) {
2394    PRE_READ(nsa_, sizeof(__sanitizer_sigaction));
2395  }
2396}
2397/* syscall 341 has been skipped */
2398/* syscall 342 has been skipped */
2399PRE_SYSCALL(rasctl)(void *addr_, long long len_, long long op_) {
2400  /* Nothing to do */
2401}
2402POST_SYSCALL(rasctl)
2403(long long res, void *addr_, long long len_, long long op_) {
2404  /* Nothing to do */
2405}
2406PRE_SYSCALL(kqueue)(void) { /* Nothing to do */ }
2407POST_SYSCALL(kqueue)(long long res) { /* Nothing to do */ }
2408PRE_SYSCALL(compat_50_kevent)
2409(long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
2410  long long nevents_, void *timeout_) {
2411  /* TODO */
2412}
2413POST_SYSCALL(compat_50_kevent)
2414(long long res, long long fd_, void *changelist_, long long nchanges_,
2415  void *eventlist_, long long nevents_, void *timeout_) {
2416  /* TODO */
2417}
2418PRE_SYSCALL(_sched_setparam)
2419(long long pid_, long long lid_, long long policy_, void *params_) {
2420  if (params_) {
2421    PRE_READ(params_, struct_sched_param_sz);
2422  }
2423}
2424POST_SYSCALL(_sched_setparam)
2425(long long res, long long pid_, long long lid_, long long policy_,
2426  void *params_) {
2427  if (params_) {
2428    PRE_READ(params_, struct_sched_param_sz);
2429  }
2430}
2431PRE_SYSCALL(_sched_getparam)
2432(long long pid_, long long lid_, void *policy_, void *params_) {
2433  /* Nothing to do */
2434}
2435POST_SYSCALL(_sched_getparam)
2436(long long res, long long pid_, long long lid_, void *policy_, void *params_) {
2437  /* Nothing to do */
2438}
2439PRE_SYSCALL(_sched_setaffinity)
2440(long long pid_, long long lid_, long long size_, void *cpuset_) {
2441  if (cpuset_) {
2442    PRE_READ(cpuset_, size_);
2443  }
2444}
2445POST_SYSCALL(_sched_setaffinity)
2446(long long res, long long pid_, long long lid_, long long size_,
2447  void *cpuset_) {
2448  if (cpuset_) {
2449    PRE_READ(cpuset_, size_);
2450  }
2451}
2452PRE_SYSCALL(_sched_getaffinity)
2453(long long pid_, long long lid_, long long size_, void *cpuset_) {
2454  /* Nothing to do */
2455}
2456POST_SYSCALL(_sched_getaffinity)
2457(long long res, long long pid_, long long lid_, long long size_,
2458  void *cpuset_) {
2459  /* Nothing to do */
2460}
2461PRE_SYSCALL(sched_yield)(void) { /* Nothing to do */ }
2462POST_SYSCALL(sched_yield)(long long res) { /* Nothing to do */ }
2463PRE_SYSCALL(_sched_protect)(long long priority_) { /* Nothing to do */ }
2464POST_SYSCALL(_sched_protect)(long long res, long long priority_) {
2465  /* Nothing to do */
2466}
2467/* syscall 352 has been skipped */
2468/* syscall 353 has been skipped */
2469PRE_SYSCALL(fsync_range)
2470(long long fd_, long long flags_, long long start_, long long length_) {
2471  /* Nothing to do */
2472}
2473POST_SYSCALL(fsync_range)
2474(long long res, long long fd_, long long flags_, long long start_,
2475  long long length_) {
2476  /* Nothing to do */
2477}
2478PRE_SYSCALL(uuidgen)(void *store_, long long count_) { /* Nothing to do */ }
2479POST_SYSCALL(uuidgen)(long long res, void *store_, long long count_) {
2480  /* Nothing to do */
2481}
2482PRE_SYSCALL(compat_90_getvfsstat)
2483(void *buf_, long long bufsize_, long long flags_) {
2484  /* Nothing to do */
2485}
2486POST_SYSCALL(compat_90_getvfsstat)
2487(long long res, void *buf_, long long bufsize_, long long flags_) {
2488  /* Nothing to do */
2489}
2490PRE_SYSCALL(compat_90_statvfs1)(void *path_, void *buf_, long long flags_) {
2491  const char *path = (const char *)path_;
2492  if (path) {
2493    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2494  }
2495}
2496POST_SYSCALL(compat_90_statvfs1)
2497(long long res, void *path_, void *buf_, long long flags_) {
2498  const char *path = (const char *)path_;
2499  if (path) {
2500    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2501  }
2502}
2503PRE_SYSCALL(compat_90_fstatvfs1)(long long fd_, void *buf_, long long flags_) {
2504  /* Nothing to do */
2505}
2506POST_SYSCALL(compat_90_fstatvfs1)
2507(long long res, long long fd_, void *buf_, long long flags_) {
2508  /* Nothing to do */
2509}
2510PRE_SYSCALL(compat_30_fhstatvfs1)(void *fhp_, void *buf_, long long flags_) {
2511  /* TODO */
2512}
2513POST_SYSCALL(compat_30_fhstatvfs1)
2514(long long res, void *fhp_, void *buf_, long long flags_) {
2515  /* TODO */
2516}
2517PRE_SYSCALL(extattrctl)
2518(void *path_, long long cmd_, void *filename_, long long attrnamespace_,
2519  void *attrname_) {
2520  const char *path = (const char *)path_;
2521  if (path) {
2522    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2523  }
2524}
2525POST_SYSCALL(extattrctl)
2526(long long res, void *path_, long long cmd_, void *filename_,
2527  long long attrnamespace_, void *attrname_) {
2528  const char *path = (const char *)path_;
2529  if (path) {
2530    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2531  }
2532}
2533PRE_SYSCALL(extattr_set_file)
2534(void *path_, long long attrnamespace_, void *attrname_, void *data_,
2535  long long nbytes_) {
2536  const char *path = (const char *)path_;
2537  if (path) {
2538    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2539  }
2540}
2541POST_SYSCALL(extattr_set_file)
2542(long long res, void *path_, long long attrnamespace_, void *attrname_,
2543  void *data_, long long nbytes_) {
2544  const char *path = (const char *)path_;
2545  if (path) {
2546    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2547  }
2548}
2549PRE_SYSCALL(extattr_get_file)
2550(void *path_, long long attrnamespace_, void *attrname_, void *data_,
2551  long long nbytes_) {
2552  const char *path = (const char *)path_;
2553  if (path) {
2554    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2555  }
2556}
2557POST_SYSCALL(extattr_get_file)
2558(long long res, void *path_, long long attrnamespace_, void *attrname_,
2559  void *data_, long long nbytes_) {
2560  const char *path = (const char *)path_;
2561  if (path) {
2562    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2563  }
2564}
2565PRE_SYSCALL(extattr_delete_file)
2566(void *path_, long long attrnamespace_, void *attrname_) {
2567  const char *path = (const char *)path_;
2568  if (path) {
2569    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2570  }
2571}
2572POST_SYSCALL(extattr_delete_file)
2573(long long res, void *path_, long long attrnamespace_, void *attrname_) {
2574  const char *path = (const char *)path_;
2575  if (path) {
2576    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2577  }
2578}
2579PRE_SYSCALL(extattr_set_fd)
2580(long long fd_, long long attrnamespace_, void *attrname_, void *data_,
2581  long long nbytes_) {
2582  /* TODO */
2583}
2584POST_SYSCALL(extattr_set_fd)
2585(long long res, long long fd_, long long attrnamespace_, void *attrname_,
2586  void *data_, long long nbytes_) {
2587  /* TODO */
2588}
2589PRE_SYSCALL(extattr_get_fd)
2590(long long fd_, long long attrnamespace_, void *attrname_, void *data_,
2591  long long nbytes_) {
2592  /* TODO */
2593}
2594POST_SYSCALL(extattr_get_fd)
2595(long long res, long long fd_, long long attrnamespace_, void *attrname_,
2596  void *data_, long long nbytes_) {
2597  /* TODO */
2598}
2599PRE_SYSCALL(extattr_delete_fd)
2600(long long fd_, long long attrnamespace_, void *attrname_) {
2601  /* TODO */
2602}
2603POST_SYSCALL(extattr_delete_fd)
2604(long long res, long long fd_, long long attrnamespace_, void *attrname_) {
2605  /* TODO */
2606}
2607PRE_SYSCALL(extattr_set_link)
2608(void *path_, long long attrnamespace_, void *attrname_, void *data_,
2609  long long nbytes_) {
2610  const char *path = (const char *)path_;
2611  if (path) {
2612    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2613  }
2614}
2615POST_SYSCALL(extattr_set_link)
2616(long long res, void *path_, long long attrnamespace_, void *attrname_,
2617  void *data_, long long nbytes_) {
2618  const char *path = (const char *)path_;
2619  if (path) {
2620    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2621  }
2622}
2623PRE_SYSCALL(extattr_get_link)
2624(void *path_, long long attrnamespace_, void *attrname_, void *data_,
2625  long long nbytes_) {
2626  const char *path = (const char *)path_;
2627  if (path) {
2628    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2629  }
2630}
2631POST_SYSCALL(extattr_get_link)
2632(long long res, void *path_, long long attrnamespace_, void *attrname_,
2633  void *data_, long long nbytes_) {
2634  const char *path = (const char *)path_;
2635  if (path) {
2636    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2637  }
2638}
2639PRE_SYSCALL(extattr_delete_link)
2640(void *path_, long long attrnamespace_, void *attrname_) {
2641  const char *path = (const char *)path_;
2642  if (path) {
2643    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2644  }
2645}
2646POST_SYSCALL(extattr_delete_link)
2647(long long res, void *path_, long long attrnamespace_, void *attrname_) {
2648  const char *path = (const char *)path_;
2649  if (path) {
2650    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2651  }
2652}
2653PRE_SYSCALL(extattr_list_fd)
2654(long long fd_, long long attrnamespace_, void *data_, long long nbytes_) {
2655  /* TODO */
2656}
2657POST_SYSCALL(extattr_list_fd)
2658(long long res, long long fd_, long long attrnamespace_, void *data_,
2659  long long nbytes_) {
2660  /* TODO */
2661}
2662PRE_SYSCALL(extattr_list_file)
2663(void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
2664  const char *path = (const char *)path_;
2665  if (path) {
2666    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2667  }
2668}
2669POST_SYSCALL(extattr_list_file)
2670(long long res, void *path_, long long attrnamespace_, void *data_,
2671  long long nbytes_) {
2672  const char *path = (const char *)path_;
2673  if (path) {
2674    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2675  }
2676}
2677PRE_SYSCALL(extattr_list_link)
2678(void *path_, long long attrnamespace_, void *data_, long long nbytes_) {
2679  const char *path = (const char *)path_;
2680  if (path) {
2681    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2682  }
2683}
2684POST_SYSCALL(extattr_list_link)
2685(long long res, void *path_, long long attrnamespace_, void *data_,
2686  long long nbytes_) {
2687  const char *path = (const char *)path_;
2688  if (path) {
2689    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2690  }
2691}
2692PRE_SYSCALL(compat_50_pselect)
2693(long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
2694  /* TODO */
2695}
2696POST_SYSCALL(compat_50_pselect)
2697(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
2698  void *mask_) {
2699  /* TODO */
2700}
2701PRE_SYSCALL(compat_50_pollts)
2702(void *fds_, long long nfds_, void *ts_, void *mask_) {
2703  /* TODO */
2704}
2705POST_SYSCALL(compat_50_pollts)
2706(long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {
2707  /* TODO */
2708}
2709PRE_SYSCALL(setxattr)
2710(void *path_, void *name_, void *value_, long long size_, long long flags_) {
2711  const char *path = (const char *)path_;
2712  if (path) {
2713    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2714  }
2715}
2716POST_SYSCALL(setxattr)
2717(long long res, void *path_, void *name_, void *value_, long long size_,
2718  long long flags_) {
2719  const char *path = (const char *)path_;
2720  if (path) {
2721    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2722  }
2723}
2724PRE_SYSCALL(lsetxattr)
2725(void *path_, void *name_, void *value_, long long size_, long long flags_) {
2726  const char *path = (const char *)path_;
2727  if (path) {
2728    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2729  }
2730}
2731POST_SYSCALL(lsetxattr)
2732(long long res, void *path_, void *name_, void *value_, long long size_,
2733  long long flags_) {
2734  const char *path = (const char *)path_;
2735  if (path) {
2736    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2737  }
2738}
2739PRE_SYSCALL(fsetxattr)
2740(long long fd_, void *name_, void *value_, long long size_, long long flags_) {
2741  /* Nothing to do */
2742}
2743POST_SYSCALL(fsetxattr)
2744(long long res, long long fd_, void *name_, void *value_, long long size_,
2745  long long flags_) {
2746  /* Nothing to do */
2747}
2748PRE_SYSCALL(getxattr)(void *path_, void *name_, void *value_, long long size_) {
2749  const char *path = (const char *)path_;
2750  if (path) {
2751    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2752  }
2753}
2754POST_SYSCALL(getxattr)
2755(long long res, void *path_, void *name_, void *value_, long long size_) {
2756  const char *path = (const char *)path_;
2757  if (path) {
2758    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2759  }
2760}
2761PRE_SYSCALL(lgetxattr)
2762(void *path_, void *name_, void *value_, long long size_) {
2763  const char *path = (const char *)path_;
2764  if (path) {
2765    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2766  }
2767}
2768POST_SYSCALL(lgetxattr)
2769(long long res, void *path_, void *name_, void *value_, long long size_) {
2770  const char *path = (const char *)path_;
2771  if (path) {
2772    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2773  }
2774}
2775PRE_SYSCALL(fgetxattr)
2776(long long fd_, void *name_, void *value_, long long size_) {
2777  /* Nothing to do */
2778}
2779POST_SYSCALL(fgetxattr)
2780(long long res, long long fd_, void *name_, void *value_, long long size_) {
2781  /* Nothing to do */
2782}
2783PRE_SYSCALL(listxattr)(void *path_, void *list_, long long size_) {
2784  const char *path = (const char *)path_;
2785  if (path) {
2786    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2787  }
2788}
2789POST_SYSCALL(listxattr)
2790(long long res, void *path_, void *list_, long long size_) {
2791  const char *path = (const char *)path_;
2792  if (path) {
2793    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2794  }
2795}
2796PRE_SYSCALL(llistxattr)(void *path_, void *list_, long long size_) {
2797  const char *path = (const char *)path_;
2798  if (path) {
2799    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2800  }
2801}
2802POST_SYSCALL(llistxattr)
2803(long long res, void *path_, void *list_, long long size_) {
2804  const char *path = (const char *)path_;
2805  if (path) {
2806    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2807  }
2808}
2809PRE_SYSCALL(flistxattr)(long long fd_, void *list_, long long size_) {
2810  /* TODO */
2811}
2812POST_SYSCALL(flistxattr)
2813(long long res, long long fd_, void *list_, long long size_) {
2814  /* TODO */
2815}
2816PRE_SYSCALL(removexattr)(void *path_, void *name_) {
2817  const char *path = (const char *)path_;
2818  if (path) {
2819    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2820  }
2821}
2822POST_SYSCALL(removexattr)(long long res, void *path_, void *name_) {
2823  const char *path = (const char *)path_;
2824  if (path) {
2825    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2826  }
2827}
2828PRE_SYSCALL(lremovexattr)(void *path_, void *name_) {
2829  const char *path = (const char *)path_;
2830  if (path) {
2831    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2832  }
2833}
2834POST_SYSCALL(lremovexattr)(long long res, void *path_, void *name_) {
2835  const char *path = (const char *)path_;
2836  if (path) {
2837    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2838  }
2839}
2840PRE_SYSCALL(fremovexattr)(long long fd_, void *name_) { /* TODO */ }
2841POST_SYSCALL(fremovexattr)(long long res, long long fd_, void *name_) {
2842  /* TODO */
2843}
2844PRE_SYSCALL(compat_50___stat30)(void *path_, void *ub_) { /* TODO */ }
2845POST_SYSCALL(compat_50___stat30)(long long res, void *path_, void *ub_) {
2846  /* TODO */
2847}
2848PRE_SYSCALL(compat_50___fstat30)(long long fd_, void *sb_) { /* TODO */ }
2849POST_SYSCALL(compat_50___fstat30)(long long res, long long fd_, void *sb_) {
2850  /* TODO */
2851}
2852PRE_SYSCALL(compat_50___lstat30)(void *path_, void *ub_) { /* TODO */ }
2853POST_SYSCALL(compat_50___lstat30)(long long res, void *path_, void *ub_) {
2854  /* TODO */
2855}
2856PRE_SYSCALL(__getdents30)(long long fd_, void *buf_, long long count_) {
2857  /* Nothing to do */
2858}
2859POST_SYSCALL(__getdents30)
2860(long long res, long long fd_, void *buf_, long long count_) {
2861  /* Nothing to do */
2862}
2863PRE_SYSCALL(posix_fadvise)(long long) { /* Nothing to do */ }
2864POST_SYSCALL(posix_fadvise)(long long res, long long) { /* Nothing to do */ }
2865PRE_SYSCALL(compat_30___fhstat30)(void *fhp_, void *sb_) { /* TODO */ }
2866POST_SYSCALL(compat_30___fhstat30)(long long res, void *fhp_, void *sb_) {
2867  /* TODO */
2868}
2869PRE_SYSCALL(compat_50___ntp_gettime30)(void *ntvp_) { /* TODO */ }
2870POST_SYSCALL(compat_50___ntp_gettime30)(long long res, void *ntvp_) {
2871  /* TODO */
2872}
2873PRE_SYSCALL(__socket30)
2874(long long domain_, long long type_, long long protocol_) {
2875  /* Nothing to do */
2876}
2877POST_SYSCALL(__socket30)
2878(long long res, long long domain_, long long type_, long long protocol_) {
2879  /* Nothing to do */
2880}
2881PRE_SYSCALL(__getfh30)(void *fname_, void *fhp_, void *fh_size_) {
2882  const char *fname = (const char *)fname_;
2883  if (fname) {
2884    PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
2885  }
2886}
2887POST_SYSCALL(__getfh30)
2888(long long res, void *fname_, void *fhp_, void *fh_size_) {
2889  const char *fname = (const char *)fname_;
2890  if (res == 0) {
2891    if (fname) {
2892      POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
2893    }
2894  }
2895}
2896PRE_SYSCALL(__fhopen40)(void *fhp_, long long fh_size_, long long flags_) {
2897  if (fhp_) {
2898    PRE_READ(fhp_, fh_size_);
2899  }
2900}
2901POST_SYSCALL(__fhopen40)
2902(long long res, void *fhp_, long long fh_size_, long long flags_) {}
2903PRE_SYSCALL(compat_90_fhstatvfs1)
2904(void *fhp_, long long fh_size_, void *buf_, long long flags_) {
2905  if (fhp_) {
2906    PRE_READ(fhp_, fh_size_);
2907  }
2908}
2909POST_SYSCALL(compat_90_fhstatvfs1)
2910(long long res, void *fhp_, long long fh_size_, void *buf_, long long flags_) {}
2911PRE_SYSCALL(compat_50___fhstat40)(void *fhp_, long long fh_size_, void *sb_) {
2912  if (fhp_) {
2913    PRE_READ(fhp_, fh_size_);
2914  }
2915}
2916POST_SYSCALL(compat_50___fhstat40)
2917(long long res, void *fhp_, long long fh_size_, void *sb_) {}
2918PRE_SYSCALL(aio_cancel)(long long fildes_, void *aiocbp_) {
2919  if (aiocbp_) {
2920    PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2921  }
2922}
2923POST_SYSCALL(aio_cancel)(long long res, long long fildes_, void *aiocbp_) {}
2924PRE_SYSCALL(aio_error)(void *aiocbp_) {
2925  if (aiocbp_) {
2926    PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2927  }
2928}
2929POST_SYSCALL(aio_error)(long long res, void *aiocbp_) {}
2930PRE_SYSCALL(aio_fsync)(long long op_, void *aiocbp_) {
2931  if (aiocbp_) {
2932    PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2933  }
2934}
2935POST_SYSCALL(aio_fsync)(long long res, long long op_, void *aiocbp_) {}
2936PRE_SYSCALL(aio_read)(void *aiocbp_) {
2937  if (aiocbp_) {
2938    PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2939  }
2940}
2941POST_SYSCALL(aio_read)(long long res, void *aiocbp_) {}
2942PRE_SYSCALL(aio_return)(void *aiocbp_) {
2943  if (aiocbp_) {
2944    PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2945  }
2946}
2947POST_SYSCALL(aio_return)(long long res, void *aiocbp_) {}
2948PRE_SYSCALL(compat_50_aio_suspend)
2949(void *list_, long long nent_, void *timeout_) {
2950  /* TODO */
2951}
2952POST_SYSCALL(compat_50_aio_suspend)
2953(long long res, void *list_, long long nent_, void *timeout_) {
2954  /* TODO */
2955}
2956PRE_SYSCALL(aio_write)(void *aiocbp_) {
2957  if (aiocbp_) {
2958    PRE_READ(aiocbp_, sizeof(struct __sanitizer_aiocb));
2959  }
2960}
2961POST_SYSCALL(aio_write)(long long res, void *aiocbp_) {}
2962PRE_SYSCALL(lio_listio)
2963(long long mode_, void *list_, long long nent_, void *sig_) {
2964  /* Nothing to do */
2965}
2966POST_SYSCALL(lio_listio)
2967(long long res, long long mode_, void *list_, long long nent_, void *sig_) {
2968  /* Nothing to do */
2969}
2970/* syscall 407 has been skipped */
2971/* syscall 408 has been skipped */
2972/* syscall 409 has been skipped */
2973PRE_SYSCALL(__mount50)
2974(void *type_, void *path_, long long flags_, void *data_, long long data_len_) {
2975  const char *type = (const char *)type_;
2976  const char *path = (const char *)path_;
2977  if (type) {
2978    PRE_READ(type, __sanitizer::internal_strlen(type) + 1);
2979  }
2980  if (path) {
2981    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
2982  }
2983  if (data_) {
2984    PRE_READ(data_, data_len_);
2985  }
2986}
2987POST_SYSCALL(__mount50)
2988(long long res, void *type_, void *path_, long long flags_, void *data_,
2989  long long data_len_) {
2990  const char *type = (const char *)type_;
2991  const char *path = (const char *)path_;
2992  if (type) {
2993    POST_READ(type, __sanitizer::internal_strlen(type) + 1);
2994  }
2995  if (path) {
2996    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
2997  }
2998  if (data_) {
2999    POST_READ(data_, data_len_);
3000  }
3001}
3002PRE_SYSCALL(mremap)
3003(void *old_address_, long long old_size_, void *new_address_,
3004  long long new_size_, long long flags_) {
3005  /* Nothing to do */
3006}
3007POST_SYSCALL(mremap)
3008(long long res, void *old_address_, long long old_size_, void *new_address_,
3009  long long new_size_, long long flags_) {
3010  /* Nothing to do */
3011}
3012PRE_SYSCALL(pset_create)(void *psid_) { /* Nothing to do */ }
3013POST_SYSCALL(pset_create)(long long res, void *psid_) { /* Nothing to do */ }
3014PRE_SYSCALL(pset_destroy)(long long psid_) { /* Nothing to do */ }
3015POST_SYSCALL(pset_destroy)(long long res, long long psid_) {
3016  /* Nothing to do */
3017}
3018PRE_SYSCALL(pset_assign)(long long psid_, long long cpuid_, void *opsid_) {
3019  /* Nothing to do */
3020}
3021POST_SYSCALL(pset_assign)
3022(long long res, long long psid_, long long cpuid_, void *opsid_) {
3023  /* Nothing to do */
3024}
3025PRE_SYSCALL(_pset_bind)
3026(long long idtype_, long long first_id_, long long second_id_, long long psid_,
3027  void *opsid_) {
3028  /* Nothing to do */
3029}
3030POST_SYSCALL(_pset_bind)
3031(long long res, long long idtype_, long long first_id_, long long second_id_,
3032  long long psid_, void *opsid_) {
3033  /* Nothing to do */
3034}
3035PRE_SYSCALL(__posix_fadvise50)
3036(long long fd_, long long PAD_, long long offset_, long long len_,
3037  long long advice_) {
3038  /* Nothing to do */
3039}
3040POST_SYSCALL(__posix_fadvise50)
3041(long long res, long long fd_, long long PAD_, long long offset_,
3042  long long len_, long long advice_) {
3043  /* Nothing to do */
3044}
3045PRE_SYSCALL(__select50)
3046(long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
3047  /* Nothing to do */
3048}
3049POST_SYSCALL(__select50)
3050(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
3051  /* Nothing to do */
3052}
3053PRE_SYSCALL(__gettimeofday50)(void *tp_, void *tzp_) { /* Nothing to do */ }
3054POST_SYSCALL(__gettimeofday50)(long long res, void *tp_, void *tzp_) {
3055  /* Nothing to do */
3056}
3057PRE_SYSCALL(__settimeofday50)(void *tv_, void *tzp_) {
3058  if (tv_) {
3059    PRE_READ(tv_, timeval_sz);
3060  }
3061  if (tzp_) {
3062    PRE_READ(tzp_, struct_timezone_sz);
3063  }
3064}
3065POST_SYSCALL(__settimeofday50)(long long res, void *tv_, void *tzp_) {}
3066PRE_SYSCALL(__utimes50)(void *path_, void *tptr_) {
3067  struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3068  const char *path = (const char *)path_;
3069  if (path) {
3070    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3071  }
3072  if (tptr) {
3073    PRE_READ(tptr[0], struct_timespec_sz);
3074    PRE_READ(tptr[1], struct_timespec_sz);
3075  }
3076}
3077POST_SYSCALL(__utimes50)(long long res, void *path_, void *tptr_) {}
3078PRE_SYSCALL(__adjtime50)(void *delta_, void *olddelta_) {
3079  if (delta_) {
3080    PRE_READ(delta_, timeval_sz);
3081  }
3082}
3083POST_SYSCALL(__adjtime50)(long long res, void *delta_, void *olddelta_) {}
3084PRE_SYSCALL(__lfs_segwait50)(void *fsidp_, void *tv_) { /* TODO */ }
3085POST_SYSCALL(__lfs_segwait50)(long long res, void *fsidp_, void *tv_) {
3086  /* TODO */
3087}
3088PRE_SYSCALL(__futimes50)(long long fd_, void *tptr_) {
3089  struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3090  if (tptr) {
3091    PRE_READ(tptr[0], struct_timespec_sz);
3092    PRE_READ(tptr[1], struct_timespec_sz);
3093  }
3094}
3095POST_SYSCALL(__futimes50)(long long res, long long fd_, void *tptr_) {}
3096PRE_SYSCALL(__lutimes50)(void *path_, void *tptr_) {
3097  struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3098  const char *path = (const char *)path_;
3099  if (path) {
3100    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3101  }
3102  if (tptr) {
3103    PRE_READ(tptr[0], struct_timespec_sz);
3104    PRE_READ(tptr[1], struct_timespec_sz);
3105  }
3106}
3107POST_SYSCALL(__lutimes50)(long long res, void *path_, void *tptr_) {
3108  struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3109  const char *path = (const char *)path_;
3110  if (path) {
3111    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3112  }
3113  if (tptr) {
3114    POST_READ(tptr[0], struct_timespec_sz);
3115    POST_READ(tptr[1], struct_timespec_sz);
3116  }
3117}
3118PRE_SYSCALL(__setitimer50)(long long which_, void *itv_, void *oitv_) {
3119  struct __sanitizer_itimerval *itv = (struct __sanitizer_itimerval *)itv_;
3120  if (itv) {
3121    PRE_READ(&itv->it_interval.tv_sec, sizeof(__sanitizer_time_t));
3122    PRE_READ(&itv->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
3123    PRE_READ(&itv->it_value.tv_sec, sizeof(__sanitizer_time_t));
3124    PRE_READ(&itv->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
3125  }
3126}
3127POST_SYSCALL(__setitimer50)
3128(long long res, long long which_, void *itv_, void *oitv_) {}
3129PRE_SYSCALL(__getitimer50)(long long which_, void *itv_) { /* Nothing to do */ }
3130POST_SYSCALL(__getitimer50)(long long res, long long which_, void *itv_) {
3131  /* Nothing to do */
3132}
3133PRE_SYSCALL(__clock_gettime50)(long long clock_id_, void *tp_) {
3134  /* Nothing to do */
3135}
3136POST_SYSCALL(__clock_gettime50)(long long res, long long clock_id_, void *tp_) {
3137  /* Nothing to do */
3138}
3139PRE_SYSCALL(__clock_settime50)(long long clock_id_, void *tp_) {
3140  if (tp_) {
3141    PRE_READ(tp_, struct_timespec_sz);
3142  }
3143}
3144POST_SYSCALL(__clock_settime50)
3145(long long res, long long clock_id_, void *tp_) {}
3146PRE_SYSCALL(__clock_getres50)(long long clock_id_, void *tp_) {
3147  /* Nothing to do */
3148}
3149POST_SYSCALL(__clock_getres50)(long long res, long long clock_id_, void *tp_) {
3150  /* Nothing to do */
3151}
3152PRE_SYSCALL(__nanosleep50)(void *rqtp_, void *rmtp_) {
3153  if (rqtp_) {
3154    PRE_READ(rqtp_, struct_timespec_sz);
3155  }
3156}
3157POST_SYSCALL(__nanosleep50)(long long res, void *rqtp_, void *rmtp_) {}
3158PRE_SYSCALL(____sigtimedwait50)(void *set_, void *info_, void *timeout_) {
3159  if (set_) {
3160    PRE_READ(set_, sizeof(__sanitizer_sigset_t));
3161  }
3162  if (timeout_) {
3163    PRE_READ(timeout_, struct_timespec_sz);
3164  }
3165}
3166POST_SYSCALL(____sigtimedwait50)
3167(long long res, void *set_, void *info_, void *timeout_) {}
3168PRE_SYSCALL(__mq_timedsend50)
3169(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
3170  void *abs_timeout_) {
3171  if (msg_ptr_) {
3172    PRE_READ(msg_ptr_, msg_len_);
3173  }
3174  if (abs_timeout_) {
3175    PRE_READ(abs_timeout_, struct_timespec_sz);
3176  }
3177}
3178POST_SYSCALL(__mq_timedsend50)
3179(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
3180  long long msg_prio_, void *abs_timeout_) {}
3181PRE_SYSCALL(__mq_timedreceive50)
3182(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
3183  void *abs_timeout_) {
3184  if (msg_ptr_) {
3185    PRE_READ(msg_ptr_, msg_len_);
3186  }
3187  if (abs_timeout_) {
3188    PRE_READ(abs_timeout_, struct_timespec_sz);
3189  }
3190}
3191POST_SYSCALL(__mq_timedreceive50)
3192(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
3193  void *msg_prio_, void *abs_timeout_) {}
3194PRE_SYSCALL(compat_60__lwp_park)
3195(void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
3196  /* TODO */
3197}
3198POST_SYSCALL(compat_60__lwp_park)
3199(long long res, void *ts_, long long unpark_, void *hint_, void *unparkhint_) {
3200  /* TODO */
3201}
3202PRE_SYSCALL(__kevent50)
3203(long long fd_, void *changelist_, long long nchanges_, void *eventlist_,
3204  long long nevents_, void *timeout_) {
3205  if (changelist_) {
3206    PRE_READ(changelist_, nchanges_ * struct_kevent_sz);
3207  }
3208  if (timeout_) {
3209    PRE_READ(timeout_, struct_timespec_sz);
3210  }
3211}
3212POST_SYSCALL(__kevent50)
3213(long long res, long long fd_, void *changelist_, long long nchanges_,
3214  void *eventlist_, long long nevents_, void *timeout_) {}
3215PRE_SYSCALL(__pselect50)
3216(long long nd_, void *in_, void *ou_, void *ex_, void *ts_, void *mask_) {
3217  if (ts_) {
3218    PRE_READ(ts_, struct_timespec_sz);
3219  }
3220  if (mask_) {
3221    PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));
3222  }
3223}
3224POST_SYSCALL(__pselect50)
3225(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *ts_,
3226  void *mask_) {}
3227PRE_SYSCALL(__pollts50)(void *fds_, long long nfds_, void *ts_, void *mask_) {
3228  if (ts_) {
3229    PRE_READ(ts_, struct_timespec_sz);
3230  }
3231  if (mask_) {
3232    PRE_READ(mask_, sizeof(struct __sanitizer_sigset_t));
3233  }
3234}
3235POST_SYSCALL(__pollts50)
3236(long long res, void *fds_, long long nfds_, void *ts_, void *mask_) {}
3237PRE_SYSCALL(__aio_suspend50)(void *list_, long long nent_, void *timeout_) {
3238  int i;
3239  const struct aiocb *const *list = (const struct aiocb *const *)list_;
3240  if (list) {
3241    for (i = 0; i < nent_; i++) {
3242      if (list[i]) {
3243        PRE_READ(list[i], sizeof(struct __sanitizer_aiocb));
3244      }
3245    }
3246  }
3247  if (timeout_) {
3248    PRE_READ(timeout_, struct_timespec_sz);
3249  }
3250}
3251POST_SYSCALL(__aio_suspend50)
3252(long long res, void *list_, long long nent_, void *timeout_) {}
3253PRE_SYSCALL(__stat50)(void *path_, void *ub_) {
3254  const char *path = (const char *)path_;
3255  if (path) {
3256    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3257  }
3258}
3259POST_SYSCALL(__stat50)(long long res, void *path_, void *ub_) {
3260  const char *path = (const char *)path_;
3261  if (res == 0) {
3262    if (path) {
3263      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3264    }
3265  }
3266}
3267PRE_SYSCALL(__fstat50)(long long fd_, void *sb_) { /* Nothing to do */ }
3268POST_SYSCALL(__fstat50)(long long res, long long fd_, void *sb_) {
3269  /* Nothing to do */
3270}
3271PRE_SYSCALL(__lstat50)(void *path_, void *ub_) {
3272  const char *path = (const char *)path_;
3273  if (path) {
3274    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3275  }
3276}
3277POST_SYSCALL(__lstat50)(long long res, void *path_, void *ub_) {
3278  const char *path = (const char *)path_;
3279  if (res == 0) {
3280    if (path) {
3281      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3282    }
3283  }
3284}
3285PRE_SYSCALL(____semctl50)
3286(long long semid_, long long semnum_, long long cmd_, void *arg_) {
3287  /* Nothing to do */
3288}
3289POST_SYSCALL(____semctl50)
3290(long long res, long long semid_, long long semnum_, long long cmd_,
3291  void *arg_) {
3292  /* Nothing to do */
3293}
3294PRE_SYSCALL(__shmctl50)(long long shmid_, long long cmd_, void *buf_) {
3295  /* Nothing to do */
3296}
3297POST_SYSCALL(__shmctl50)
3298(long long res, long long shmid_, long long cmd_, void *buf_) {
3299  /* Nothing to do */
3300}
3301PRE_SYSCALL(__msgctl50)(long long msqid_, long long cmd_, void *buf_) {
3302  /* Nothing to do */
3303}
3304POST_SYSCALL(__msgctl50)
3305(long long res, long long msqid_, long long cmd_, void *buf_) {
3306  /* Nothing to do */
3307}
3308PRE_SYSCALL(__getrusage50)(long long who_, void *rusage_) {
3309  /* Nothing to do */
3310}
3311POST_SYSCALL(__getrusage50)(long long res, long long who_, void *rusage_) {
3312  /* Nothing to do */
3313}
3314PRE_SYSCALL(__timer_settime50)
3315(long long timerid_, long long flags_, void *value_, void *ovalue_) {
3316  struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
3317  if (value) {
3318    PRE_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
3319    PRE_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
3320    PRE_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));
3321    PRE_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
3322  }
3323}
3324POST_SYSCALL(__timer_settime50)
3325(long long res, long long timerid_, long long flags_, void *value_,
3326  void *ovalue_) {
3327  struct __sanitizer_itimerval *value = (struct __sanitizer_itimerval *)value_;
3328  if (res == 0) {
3329    if (value) {
3330      POST_READ(&value->it_interval.tv_sec, sizeof(__sanitizer_time_t));
3331      POST_READ(&value->it_interval.tv_usec, sizeof(__sanitizer_suseconds_t));
3332      POST_READ(&value->it_value.tv_sec, sizeof(__sanitizer_time_t));
3333      POST_READ(&value->it_value.tv_usec, sizeof(__sanitizer_suseconds_t));
3334    }
3335  }
3336}
3337PRE_SYSCALL(__timer_gettime50)(long long timerid_, void *value_) {
3338  /* Nothing to do */
3339}
3340POST_SYSCALL(__timer_gettime50)
3341(long long res, long long timerid_, void *value_) {
3342  /* Nothing to do */
3343}
3344#if defined(NTP) || !defined(_KERNEL_OPT)
3345PRE_SYSCALL(__ntp_gettime50)(void *ntvp_) { /* Nothing to do */ }
3346POST_SYSCALL(__ntp_gettime50)(long long res, void *ntvp_) {
3347  /* Nothing to do */
3348}
3349#else
3350/* syscall 448 has been skipped */
3351#endif
3352PRE_SYSCALL(__wait450)
3353(long long pid_, void *status_, long long options_, void *rusage_) {
3354  /* Nothing to do */
3355}
3356POST_SYSCALL(__wait450)
3357(long long res, long long pid_, void *status_, long long options_,
3358  void *rusage_) {
3359  /* Nothing to do */
3360}
3361PRE_SYSCALL(__mknod50)(void *path_, long long mode_, long long dev_) {
3362  const char *path = (const char *)path_;
3363  if (path) {
3364    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3365  }
3366}
3367POST_SYSCALL(__mknod50)
3368(long long res, void *path_, long long mode_, long long dev_) {
3369  const char *path = (const char *)path_;
3370  if (res == 0) {
3371    if (path) {
3372      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3373    }
3374  }
3375}
3376PRE_SYSCALL(__fhstat50)(void *fhp_, long long fh_size_, void *sb_) {
3377  if (fhp_) {
3378    PRE_READ(fhp_, fh_size_);
3379  }
3380}
3381POST_SYSCALL(__fhstat50)
3382(long long res, void *fhp_, long long fh_size_, void *sb_) {
3383  if (res == 0) {
3384    if (fhp_) {
3385      POST_READ(fhp_, fh_size_);
3386    }
3387  }
3388}
3389/* syscall 452 has been skipped */
3390PRE_SYSCALL(pipe2)(void *fildes_, long long flags_) { /* Nothing to do */ }
3391POST_SYSCALL(pipe2)(long long res, void *fildes_, long long flags_) {
3392  /* Nothing to do */
3393}
3394PRE_SYSCALL(dup3)(long long from_, long long to_, long long flags_) {
3395  /* Nothing to do */
3396}
3397POST_SYSCALL(dup3)
3398(long long res, long long from_, long long to_, long long flags_) {
3399  /* Nothing to do */
3400}
3401PRE_SYSCALL(kqueue1)(long long flags_) { /* Nothing to do */ }
3402POST_SYSCALL(kqueue1)(long long res, long long flags_) { /* Nothing to do */ }
3403PRE_SYSCALL(paccept)
3404(long long s_, void *name_, void *anamelen_, void *mask_, long long flags_) {
3405  if (mask_) {
3406    PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
3407  }
3408}
3409POST_SYSCALL(paccept)
3410(long long res, long long s_, void *name_, void *anamelen_, void *mask_,
3411  long long flags_) {
3412  if (res >= 0) {
3413    if (mask_) {
3414      PRE_READ(mask_, sizeof(__sanitizer_sigset_t));
3415    }
3416  }
3417}
3418PRE_SYSCALL(linkat)
3419(long long fd1_, void *name1_, long long fd2_, void *name2_, long long flags_) {
3420  const char *name1 = (const char *)name1_;
3421  const char *name2 = (const char *)name2_;
3422  if (name1) {
3423    PRE_READ(name1, __sanitizer::internal_strlen(name1) + 1);
3424  }
3425  if (name2) {
3426    PRE_READ(name2, __sanitizer::internal_strlen(name2) + 1);
3427  }
3428}
3429POST_SYSCALL(linkat)
3430(long long res, long long fd1_, void *name1_, long long fd2_, void *name2_,
3431  long long flags_) {
3432  const char *name1 = (const char *)name1_;
3433  const char *name2 = (const char *)name2_;
3434  if (res == 0) {
3435    if (name1) {
3436      POST_READ(name1, __sanitizer::internal_strlen(name1) + 1);
3437    }
3438    if (name2) {
3439      POST_READ(name2, __sanitizer::internal_strlen(name2) + 1);
3440    }
3441  }
3442}
3443PRE_SYSCALL(renameat)
3444(long long fromfd_, void *from_, long long tofd_, void *to_) {
3445  const char *from = (const char *)from_;
3446  const char *to = (const char *)to_;
3447  if (from) {
3448    PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
3449  }
3450  if (to) {
3451    PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
3452  }
3453}
3454POST_SYSCALL(renameat)
3455(long long res, long long fromfd_, void *from_, long long tofd_, void *to_) {
3456  const char *from = (const char *)from_;
3457  const char *to = (const char *)to_;
3458  if (res == 0) {
3459    if (from) {
3460      POST_READ(from, __sanitizer::internal_strlen(from) + 1);
3461    }
3462    if (to) {
3463      POST_READ(to, __sanitizer::internal_strlen(to) + 1);
3464    }
3465  }
3466}
3467PRE_SYSCALL(mkfifoat)(long long fd_, void *path_, long long mode_) {
3468  const char *path = (const char *)path_;
3469  if (path) {
3470    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3471  }
3472}
3473POST_SYSCALL(mkfifoat)
3474(long long res, long long fd_, void *path_, long long mode_) {
3475  const char *path = (const char *)path_;
3476  if (res == 0) {
3477    if (path) {
3478      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3479    }
3480  }
3481}
3482PRE_SYSCALL(mknodat)
3483(long long fd_, void *path_, long long mode_, long long PAD_, long long dev_) {
3484  const char *path = (const char *)path_;
3485  if (path) {
3486    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3487  }
3488}
3489POST_SYSCALL(mknodat)
3490(long long res, long long fd_, void *path_, long long mode_, long long PAD_,
3491  long long dev_) {
3492  const char *path = (const char *)path_;
3493  if (res == 0) {
3494    if (path) {
3495      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3496    }
3497  }
3498}
3499PRE_SYSCALL(mkdirat)(long long fd_, void *path_, long long mode_) {
3500  const char *path = (const char *)path_;
3501  if (path) {
3502    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3503  }
3504}
3505POST_SYSCALL(mkdirat)
3506(long long res, long long fd_, void *path_, long long mode_) {
3507  const char *path = (const char *)path_;
3508  if (res == 0) {
3509    if (path) {
3510      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3511    }
3512  }
3513}
3514PRE_SYSCALL(faccessat)
3515(long long fd_, void *path_, long long amode_, long long flag_) {
3516  const char *path = (const char *)path_;
3517  if (path) {
3518    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3519  }
3520}
3521POST_SYSCALL(faccessat)
3522(long long res, long long fd_, void *path_, long long amode_, long long flag_) {
3523  const char *path = (const char *)path_;
3524  if (res == 0) {
3525    if (path) {
3526      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3527    }
3528  }
3529}
3530PRE_SYSCALL(fchmodat)
3531(long long fd_, void *path_, long long mode_, long long flag_) {
3532  const char *path = (const char *)path_;
3533  if (path) {
3534    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3535  }
3536}
3537POST_SYSCALL(fchmodat)
3538(long long res, long long fd_, void *path_, long long mode_, long long flag_) {
3539  const char *path = (const char *)path_;
3540  if (res == 0) {
3541    if (path) {
3542      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3543    }
3544  }
3545}
3546PRE_SYSCALL(fchownat)
3547(long long fd_, void *path_, long long owner_, long long group_,
3548  long long flag_) {
3549  const char *path = (const char *)path_;
3550  if (path) {
3551    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3552  }
3553}
3554POST_SYSCALL(fchownat)
3555(long long res, long long fd_, void *path_, long long owner_, long long group_,
3556  long long flag_) {
3557  const char *path = (const char *)path_;
3558  if (res == 0) {
3559    if (path) {
3560      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3561    }
3562  }
3563}
3564PRE_SYSCALL(fexecve)(long long fd_, void *argp_, void *envp_) { /* TODO */ }
3565POST_SYSCALL(fexecve)(long long res, long long fd_, void *argp_, void *envp_) {
3566  /* TODO */
3567}
3568PRE_SYSCALL(fstatat)(long long fd_, void *path_, void *buf_, long long flag_) {
3569  const char *path = (const char *)path_;
3570  if (path) {
3571    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3572  }
3573}
3574POST_SYSCALL(fstatat)
3575(long long res, long long fd_, void *path_, void *buf_, long long flag_) {
3576  const char *path = (const char *)path_;
3577  if (path) {
3578    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3579  }
3580}
3581PRE_SYSCALL(utimensat)
3582(long long fd_, void *path_, void *tptr_, long long flag_) {
3583  const char *path = (const char *)path_;
3584  if (path) {
3585    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3586  }
3587  if (tptr_) {
3588    PRE_READ(tptr_, struct_timespec_sz);
3589  }
3590}
3591POST_SYSCALL(utimensat)
3592(long long res, long long fd_, void *path_, void *tptr_, long long flag_) {
3593  const char *path = (const char *)path_;
3594  if (res > 0) {
3595    if (path) {
3596      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3597    }
3598    if (tptr_) {
3599      POST_READ(tptr_, struct_timespec_sz);
3600    }
3601  }
3602}
3603PRE_SYSCALL(openat)
3604(long long fd_, void *path_, long long oflags_, long long mode_) {
3605  const char *path = (const char *)path_;
3606  if (path) {
3607    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3608  }
3609}
3610POST_SYSCALL(openat)
3611(long long res, long long fd_, void *path_, long long oflags_,
3612  long long mode_) {
3613  const char *path = (const char *)path_;
3614  if (res > 0) {
3615    if (path) {
3616      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3617    }
3618  }
3619}
3620PRE_SYSCALL(readlinkat)
3621(long long fd_, void *path_, void *buf_, long long bufsize_) {
3622  const char *path = (const char *)path_;
3623  if (path) {
3624    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3625  }
3626}
3627POST_SYSCALL(readlinkat)
3628(long long res, long long fd_, void *path_, void *buf_, long long bufsize_) {
3629  const char *path = (const char *)path_;
3630  if (res > 0) {
3631    if (path) {
3632      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3633    }
3634  }
3635}
3636PRE_SYSCALL(symlinkat)(void *path1_, long long fd_, void *path2_) {
3637  const char *path1 = (const char *)path1_;
3638  const char *path2 = (const char *)path2_;
3639  if (path1) {
3640    PRE_READ(path1, __sanitizer::internal_strlen(path1) + 1);
3641  }
3642  if (path2) {
3643    PRE_READ(path2, __sanitizer::internal_strlen(path2) + 1);
3644  }
3645}
3646POST_SYSCALL(symlinkat)
3647(long long res, void *path1_, long long fd_, void *path2_) {
3648  const char *path1 = (const char *)path1_;
3649  const char *path2 = (const char *)path2_;
3650  if (res == 0) {
3651    if (path1) {
3652      POST_READ(path1, __sanitizer::internal_strlen(path1) + 1);
3653    }
3654    if (path2) {
3655      POST_READ(path2, __sanitizer::internal_strlen(path2) + 1);
3656    }
3657  }
3658}
3659PRE_SYSCALL(unlinkat)(long long fd_, void *path_, long long flag_) {
3660  const char *path = (const char *)path_;
3661  if (path) {
3662    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3663  }
3664}
3665POST_SYSCALL(unlinkat)
3666(long long res, long long fd_, void *path_, long long flag_) {
3667  const char *path = (const char *)path_;
3668  if (res == 0) {
3669    if (path) {
3670      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3671    }
3672  }
3673}
3674PRE_SYSCALL(futimens)(long long fd_, void *tptr_) {
3675  struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3676  if (tptr) {
3677    PRE_READ(tptr[0], struct_timespec_sz);
3678    PRE_READ(tptr[1], struct_timespec_sz);
3679  }
3680}
3681POST_SYSCALL(futimens)(long long res, long long fd_, void *tptr_) {
3682  struct __sanitizer_timespec **tptr = (struct __sanitizer_timespec **)tptr_;
3683  if (res == 0) {
3684    if (tptr) {
3685      POST_READ(tptr[0], struct_timespec_sz);
3686      POST_READ(tptr[1], struct_timespec_sz);
3687    }
3688  }
3689}
3690PRE_SYSCALL(__quotactl)(void *path_, void *args_) {
3691  const char *path = (const char *)path_;
3692  if (path) {
3693    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3694  }
3695}
3696POST_SYSCALL(__quotactl)(long long res, void *path_, void *args_) {
3697  const char *path = (const char *)path_;
3698  if (res == 0) {
3699    if (path) {
3700      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3701    }
3702  }
3703}
3704PRE_SYSCALL(posix_spawn)
3705(void *pid_, void *path_, void *file_actions_, void *attrp_, void *argv_,
3706  void *envp_) {
3707  const char *path = (const char *)path_;
3708  if (path) {
3709    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3710  }
3711}
3712POST_SYSCALL(posix_spawn)
3713(long long res, void *pid_, void *path_, void *file_actions_, void *attrp_,
3714  void *argv_, void *envp_) {
3715  const char *path = (const char *)path_;
3716  if (pid_) {
3717    if (path) {
3718      POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3719    }
3720  }
3721}
3722PRE_SYSCALL(recvmmsg)
3723(long long s_, void *mmsg_, long long vlen_, long long flags_, void *timeout_) {
3724  if (timeout_) {
3725    PRE_READ(timeout_, struct_timespec_sz);
3726  }
3727}
3728POST_SYSCALL(recvmmsg)
3729(long long res, long long s_, void *mmsg_, long long vlen_, long long flags_,
3730  void *timeout_) {
3731  if (res >= 0) {
3732    if (timeout_) {
3733      POST_READ(timeout_, struct_timespec_sz);
3734    }
3735  }
3736}
3737PRE_SYSCALL(sendmmsg)
3738(long long s_, void *mmsg_, long long vlen_, long long flags_) {
3739  struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
3740  if (mmsg) {
3741    PRE_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) *
3742                       (vlen_ > 1024 ? 1024 : vlen_));
3743  }
3744}
3745POST_SYSCALL(sendmmsg)
3746(long long res, long long s_, void *mmsg_, long long vlen_, long long flags_) {
3747  struct __sanitizer_mmsghdr *mmsg = (struct __sanitizer_mmsghdr *)mmsg_;
3748  if (res >= 0) {
3749    if (mmsg) {
3750      POST_READ(mmsg, sizeof(struct __sanitizer_mmsghdr) *
3751                          (vlen_ > 1024 ? 1024 : vlen_));
3752    }
3753  }
3754}
3755PRE_SYSCALL(clock_nanosleep)
3756(long long clock_id_, long long flags_, void *rqtp_, void *rmtp_) {
3757  if (rqtp_) {
3758    PRE_READ(rqtp_, struct_timespec_sz);
3759  }
3760}
3761POST_SYSCALL(clock_nanosleep)
3762(long long res, long long clock_id_, long long flags_, void *rqtp_,
3763  void *rmtp_) {
3764  if (rqtp_) {
3765    POST_READ(rqtp_, struct_timespec_sz);
3766  }
3767}
3768PRE_SYSCALL(___lwp_park60)
3769(long long clock_id_, long long flags_, void *ts_, long long unpark_,
3770  void *hint_, void *unparkhint_) {
3771  if (ts_) {
3772    PRE_READ(ts_, struct_timespec_sz);
3773  }
3774}
3775POST_SYSCALL(___lwp_park60)
3776(long long res, long long clock_id_, long long flags_, void *ts_,
3777  long long unpark_, void *hint_, void *unparkhint_) {
3778  if (res == 0) {
3779    if (ts_) {
3780      POST_READ(ts_, struct_timespec_sz);
3781    }
3782  }
3783}
3784PRE_SYSCALL(posix_fallocate)
3785(long long fd_, long long PAD_, long long pos_, long long len_) {
3786  /* Nothing to do */
3787}
3788POST_SYSCALL(posix_fallocate)
3789(long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
3790  /* Nothing to do */
3791}
3792PRE_SYSCALL(fdiscard)
3793(long long fd_, long long PAD_, long long pos_, long long len_) {
3794  /* Nothing to do */
3795}
3796POST_SYSCALL(fdiscard)
3797(long long res, long long fd_, long long PAD_, long long pos_, long long len_) {
3798  /* Nothing to do */
3799}
3800PRE_SYSCALL(wait6)
3801(long long idtype_, long long id_, void *status_, long long options_,
3802  void *wru_, void *info_) {
3803  /* Nothing to do */
3804}
3805POST_SYSCALL(wait6)
3806(long long res, long long idtype_, long long id_, void *status_,
3807  long long options_, void *wru_, void *info_) {
3808  /* Nothing to do */
3809}
3810PRE_SYSCALL(clock_getcpuclockid2)
3811(long long idtype_, long long id_, void *clock_id_) {
3812  /* Nothing to do */
3813}
3814POST_SYSCALL(clock_getcpuclockid2)
3815(long long res, long long idtype_, long long id_, void *clock_id_) {
3816  /* Nothing to do */
3817}
3818PRE_SYSCALL(__getvfsstat90)(void *buf_, long long bufsize_, long long flags_) {
3819  /* Nothing to do */
3820}
3821POST_SYSCALL(__getvfsstat90)
3822(long long res, void *buf_, long long bufsize_, long long flags_) {
3823  /* Nothing to do */
3824}
3825PRE_SYSCALL(__statvfs190)(void *path_, void *buf_, long long flags_) {
3826  const char *path = (const char *)path_;
3827  if (path) {
3828    PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
3829  }
3830}
3831POST_SYSCALL(__statvfs190)
3832(long long res, void *path_, void *buf_, long long flags_) {
3833  const char *path = (const char *)path_;
3834  if (path) {
3835    POST_READ(path, __sanitizer::internal_strlen(path) + 1);
3836  }
3837}
3838PRE_SYSCALL(__fstatvfs190)(long long fd_, void *buf_, long long flags_) {
3839  /* Nothing to do */
3840}
3841POST_SYSCALL(__fstatvfs190)
3842(long long res, long long fd_, void *buf_, long long flags_) {
3843  /* Nothing to do */
3844}
3845PRE_SYSCALL(__fhstatvfs190)
3846(void *fhp_, long long fh_size_, void *buf_, long long flags_) {
3847  if (fhp_) {
3848    PRE_READ(fhp_, fh_size_);
3849  }
3850}
3851POST_SYSCALL(__fhstatvfs190)
3852(long long res, void *fhp_, long long fh_size_, void *buf_, long long flags_) {}
3853PRE_SYSCALL(__acl_get_link)(void *path_, long long type_, void *aclp_) {
3854  /* TODO */
3855}
3856POST_SYSCALL(__acl_get_link)
3857(long long res, void *path_, long long type_, void *aclp_) {
3858  /* TODO */
3859}
3860PRE_SYSCALL(__acl_set_link)(void *path_, long long type_, void *aclp_) {
3861  /* TODO */
3862}
3863POST_SYSCALL(__acl_set_link)
3864(long long res, void *path_, long long type_, void *aclp_) {
3865  /* TODO */
3866}
3867PRE_SYSCALL(__acl_delete_link)(void *path_, long long type_) { /* TODO */ }
3868POST_SYSCALL(__acl_delete_link)(long long res, void *path_, long long type_) {
3869  /* TODO */
3870}
3871PRE_SYSCALL(__acl_aclcheck_link)(void *path_, long long type_, void *aclp_) {
3872  /* TODO */
3873}
3874POST_SYSCALL(__acl_aclcheck_link)
3875(long long res, void *path_, long long type_, void *aclp_) {
3876  /* TODO */
3877}
3878PRE_SYSCALL(__acl_get_file)(void *path_, long long type_, void *aclp_) {
3879  /* TODO */
3880}
3881POST_SYSCALL(__acl_get_file)
3882(long long res, void *path_, long long type_, void *aclp_) {
3883  /* TODO */
3884}
3885PRE_SYSCALL(__acl_set_file)(void *path_, long long type_, void *aclp_) {
3886  /* TODO */
3887}
3888POST_SYSCALL(__acl_set_file)
3889(long long res, void *path_, long long type_, void *aclp_) {
3890  /* TODO */
3891}
3892PRE_SYSCALL(__acl_get_fd)(long long filedes_, long long type_, void *aclp_) {
3893  /* TODO */
3894}
3895POST_SYSCALL(__acl_get_fd)
3896(long long res, long long filedes_, long long type_, void *aclp_) {
3897  /* TODO */
3898}
3899PRE_SYSCALL(__acl_set_fd)(long long filedes_, long long type_, void *aclp_) {
3900  /* TODO */
3901}
3902POST_SYSCALL(__acl_set_fd)
3903(long long res, long long filedes_, long long type_, void *aclp_) {
3904  /* TODO */
3905}
3906PRE_SYSCALL(__acl_delete_file)(void *path_, long long type_) { /* TODO */ }
3907POST_SYSCALL(__acl_delete_file)(long long res, void *path_, long long type_) {
3908  /* TODO */
3909}
3910PRE_SYSCALL(__acl_delete_fd)(long long filedes_, long long type_) { /* TODO */ }
3911POST_SYSCALL(__acl_delete_fd)
3912(long long res, long long filedes_, long long type_) {
3913  /* TODO */
3914}
3915PRE_SYSCALL(__acl_aclcheck_file)(void *path_, long long type_, void *aclp_) {
3916  /* TODO */
3917}
3918POST_SYSCALL(__acl_aclcheck_file)
3919(long long res, void *path_, long long type_, void *aclp_) {
3920  /* TODO */
3921}
3922PRE_SYSCALL(__acl_aclcheck_fd)
3923(long long filedes_, long long type_, void *aclp_) {
3924  /* TODO */
3925}
3926POST_SYSCALL(__acl_aclcheck_fd)
3927(long long res, long long filedes_, long long type_, void *aclp_) {
3928  /* TODO */
3929}
3930PRE_SYSCALL(lpathconf)(void *path_, long long name_) { /* TODO */ }
3931POST_SYSCALL(lpathconf)(long long res, void *path_, long long name_) {
3932  /* TODO */
3933}
3934#undef SYS_MAXSYSARGS
3935} // extern "C"
3936
3937#undef PRE_SYSCALL
3938#undef PRE_READ
3939#undef PRE_WRITE
3940#undef POST_SYSCALL
3941#undef POST_READ
3942#undef POST_WRITE
3943
3944#endif // SANITIZER_NETBSD
3945