blob: c4a9d99fe2f014c738de0dc85a4424cdb4e3b76e [file] [log] [blame]
//===-- sanitizer_syscalls_netbsd.inc ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Common syscalls handlers for tools like AddressSanitizer,
// ThreadSanitizer, MemorySanitizer, etc.
//
// This file should be included into the tool's interceptor file,
// which has to define it's own macros:
// COMMON_SYSCALL_PRE_READ_RANGE
// Called in prehook for regions that will be read by the kernel and
// must be initialized.
// COMMON_SYSCALL_PRE_WRITE_RANGE
// Called in prehook for regions that will be written to by the kernel
// and must be addressable. The actual write range may be smaller than
// reported in the prehook. See POST_WRITE_RANGE.
// COMMON_SYSCALL_POST_READ_RANGE
// Called in posthook for regions that were read by the kernel. Does
// not make much sense.
// COMMON_SYSCALL_POST_WRITE_RANGE
// Called in posthook for regions that were written to by the kernel
// and are now initialized.
// COMMON_SYSCALL_ACQUIRE(addr)
// Acquire memory visibility from addr.
// COMMON_SYSCALL_RELEASE(addr)
// Release memory visibility to addr.
// COMMON_SYSCALL_FD_CLOSE(fd)
// Called before closing file descriptor fd.
// COMMON_SYSCALL_FD_ACQUIRE(fd)
// Acquire memory visibility from fd.
// COMMON_SYSCALL_FD_RELEASE(fd)
// Release memory visibility to fd.
// COMMON_SYSCALL_PRE_FORK()
// Called before fork syscall.
// COMMON_SYSCALL_POST_FORK(long long res)
// Called after fork syscall.
//
// DO NOT EDIT! THIS FILE HAS BEEN GENERATED!
//
// Generated with: generate_netbsd_syscalls.awk
// Generated date: 2020-09-10
// Generated from: syscalls.master,v 1.306 2020/08/14 00:53:16 riastradh Exp
//
//===----------------------------------------------------------------------===//
#include "sanitizer_platform.h"
#if SANITIZER_NETBSD
#include "sanitizer_libc.h"
#define PRE_SYSCALL(name) \
SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_pre_impl_##name
#define PRE_READ(p, s) COMMON_SYSCALL_PRE_READ_RANGE(p, s)
#define PRE_WRITE(p, s) COMMON_SYSCALL_PRE_WRITE_RANGE(p, s)
#define POST_SYSCALL(name) \
SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_syscall_post_impl_##name
#define POST_READ(p, s) COMMON_SYSCALL_POST_READ_RANGE(p, s)
#define POST_WRITE(p, s) COMMON_SYSCALL_POST_WRITE_RANGE(p, s)
#ifndef COMMON_SYSCALL_ACQUIRE
#define COMMON_SYSCALL_ACQUIRE(addr) ((void)(addr))
#endif
#ifndef COMMON_SYSCALL_RELEASE
#define COMMON_SYSCALL_RELEASE(addr) ((void)(addr))
#endif
#ifndef COMMON_SYSCALL_FD_CLOSE
#define COMMON_SYSCALL_FD_CLOSE(fd) ((void)(fd))
#endif
#ifndef COMMON_SYSCALL_FD_ACQUIRE
#define COMMON_SYSCALL_FD_ACQUIRE(fd) ((void)(fd))
#endif
#ifndef COMMON_SYSCALL_FD_RELEASE
#define COMMON_SYSCALL_FD_RELEASE(fd) ((void)(fd))
#endif
#ifndef COMMON_SYSCALL_PRE_FORK
#define COMMON_SYSCALL_PRE_FORK() \
{}
#endif
#ifndef COMMON_SYSCALL_POST_FORK
#define COMMON_SYSCALL_POST_FORK(res) \
{}
#endif
// FIXME: do some kind of PRE_READ for all syscall arguments (int(s) and such).
extern "C" {
#define SYS_MAXSYSARGS 8
PRE_SYSCALL(syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
/* Nothing to do */
}
POST_SYSCALL(syscall)
(long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
/* Nothing to do */
}
PRE_SYSCALL(exit)(long long rval_) { /* Nothing to do */ }
POST_SYSCALL(exit)(long long res, long long rval_) { /* Nothing to do */ }
PRE_SYSCALL(fork)(void) { COMMON_SYSCALL_PRE_FORK(); }
POST_SYSCALL(fork)(long long res) { COMMON_SYSCALL_POST_FORK(res); }
PRE_SYSCALL(read)(long long fd_, void *buf_, long long nbyte_) {
if (buf_) {
PRE_WRITE(buf_, nbyte_);
}
}
POST_SYSCALL(read)(long long res, long long fd_, void *buf_, long long nbyte_) {
if (res > 0) {
POST_WRITE(buf_, res);
}
}
PRE_SYSCALL(write)(long long fd_, void *buf_, long long nbyte_) {
if (buf_) {
PRE_READ(buf_, nbyte_);
}
}
POST_SYSCALL(write)
(long long res, long long fd_, void *buf_, long long nbyte_) {
if (res > 0) {
POST_READ(buf_, res);
}
}
PRE_SYSCALL(open)(void *path_, long long flags_, long long mode_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(open)
(long long res, void *path_, long long flags_, long long mode_) {
if (res > 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(close)(long long fd_) { COMMON_SYSCALL_FD_CLOSE((int)fd_); }
POST_SYSCALL(close)(long long res, long long fd_) { /* Nothing to do */ }
PRE_SYSCALL(compat_50_wait4)
(long long pid_, void *status_, long long options_, void *rusage_) {
/* TODO */
}
POST_SYSCALL(compat_50_wait4)
(long long res, long long pid_, void *status_, long long options_,
void *rusage_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ocreat)(void *path_, long long mode_) { /* TODO */ }
POST_SYSCALL(compat_43_ocreat)(long long res, void *path_, long long mode_) {
/* TODO */
}
PRE_SYSCALL(link)(void *path_, void *link_) {
const char *path = (const char *)path_;
const char *link = (const char *)link_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (link) {
PRE_READ(path, __sanitizer::internal_strlen(link) + 1);
}
}
POST_SYSCALL(link)(long long res, void *path_, void *link_) {
if (res == 0) {
const char *path = (const char *)path_;
const char *link = (const char *)link_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (link) {
POST_READ(path, __sanitizer::internal_strlen(link) + 1);
}
}
}
PRE_SYSCALL(unlink)(void *path_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(unlink)(long long res, void *path_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
/* syscall 11 has been skipped */
PRE_SYSCALL(chdir)(void *path_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(chdir)(long long res, void *path_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(fchdir)(long long fd_) { /* Nothing to do */ }
POST_SYSCALL(fchdir)(long long res, long long fd_) { /* Nothing to do */ }
PRE_SYSCALL(compat_50_mknod)(void *path_, long long mode_, long long dev_) {
/* TODO */
}
POST_SYSCALL(compat_50_mknod)
(long long res, void *path_, long long mode_, long long dev_) {
/* TODO */
}
PRE_SYSCALL(chmod)(void *path_, long long mode_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(chmod)(long long res, void *path_, long long mode_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(chown)(void *path_, long long uid_, long long gid_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(chown)
(long long res, void *path_, long long uid_, long long gid_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(break)(void *nsize_) { /* Nothing to do */ }
POST_SYSCALL(break)(long long res, void *nsize_) { /* Nothing to do */ }
PRE_SYSCALL(compat_20_getfsstat)
(void *buf_, long long bufsize_, long long flags_) {
/* TODO */
}
POST_SYSCALL(compat_20_getfsstat)
(long long res, void *buf_, long long bufsize_, long long flags_) {
/* TODO */
}
PRE_SYSCALL(compat_43_olseek)
(long long fd_, long long offset_, long long whence_) {
/* TODO */
}
POST_SYSCALL(compat_43_olseek)
(long long res, long long fd_, long long offset_, long long whence_) {
/* TODO */
}
PRE_SYSCALL(getpid)(void) { /* Nothing to do */ }
POST_SYSCALL(getpid)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(compat_40_mount)
(void *type_, void *path_, long long flags_, void *data_) {
/* TODO */
}
POST_SYSCALL(compat_40_mount)
(long long res, void *type_, void *path_, long long flags_, void *data_) {
/* TODO */
}
PRE_SYSCALL(unmount)(void *path_, long long flags_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(unmount)(long long res, void *path_, long long flags_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(setuid)(long long uid_) { /* Nothing to do */ }
POST_SYSCALL(setuid)(long long res, long long uid_) { /* Nothing to do */ }
PRE_SYSCALL(getuid)(void) { /* Nothing to do */ }
POST_SYSCALL(getuid)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(geteuid)(void) { /* Nothing to do */ }
POST_SYSCALL(geteuid)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(ptrace)
(long long req_, long long pid_, void *addr_, long long data_) {
if (req_ == ptrace_pt_io) {
struct __sanitizer_ptrace_io_desc *addr =
(struct __sanitizer_ptrace_io_desc *)addr_;
PRE_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
if (addr->piod_op == ptrace_piod_write_d ||
addr->piod_op == ptrace_piod_write_i) {
PRE_READ(addr->piod_addr, addr->piod_len);
}
if (addr->piod_op == ptrace_piod_read_d ||
addr->piod_op == ptrace_piod_read_i ||
addr->piod_op == ptrace_piod_read_auxv) {
PRE_WRITE(addr->piod_addr, addr->piod_len);
}
} else if (req_ == ptrace_pt_lwpinfo) {
struct __sanitizer_ptrace_lwpinfo *addr =
(struct __sanitizer_ptrace_lwpinfo *)addr_;
PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
PRE_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
} else if (req_ == ptrace_pt_set_event_mask) {
PRE_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
} else if (req_ == ptrace_pt_get_event_mask) {
PRE_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
} else if (req_ == ptrace_pt_set_siginfo) {
PRE_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
} else if (req_ == ptrace_pt_get_siginfo) {
PRE_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
} else if (req_ == ptrace_pt_lwpstatus) {
struct __sanitizer_ptrace_lwpstatus *addr =
(struct __sanitizer_ptrace_lwpstatus *)addr_;
PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
PRE_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
} else if (req_ == ptrace_pt_lwpnext) {
struct __sanitizer_ptrace_lwpstatus *addr =
(struct __sanitizer_ptrace_lwpstatus *)addr_;
PRE_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
PRE_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
} else if (req_ == ptrace_pt_setregs) {
PRE_READ(addr_, struct_ptrace_reg_struct_sz);
} else if (req_ == ptrace_pt_getregs) {
PRE_WRITE(addr_, struct_ptrace_reg_struct_sz);
} else if (req_ == ptrace_pt_setfpregs) {
PRE_READ(addr_, struct_ptrace_fpreg_struct_sz);
} else if (req_ == ptrace_pt_getfpregs) {
PRE_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
} else if (req_ == ptrace_pt_setdbregs) {
PRE_READ(addr_, struct_ptrace_dbreg_struct_sz);
} else if (req_ == ptrace_pt_getdbregs) {
PRE_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
}
}
POST_SYSCALL(ptrace)
(long long res, long long req_, long long pid_, void *addr_, long long data_) {
if (res == 0) {
if (req_ == ptrace_pt_io) {
struct __sanitizer_ptrace_io_desc *addr =
(struct __sanitizer_ptrace_io_desc *)addr_;
POST_READ(addr, struct_ptrace_ptrace_io_desc_struct_sz);
if (addr->piod_op == ptrace_piod_write_d ||
addr->piod_op == ptrace_piod_write_i) {
POST_READ(addr->piod_addr, addr->piod_len);
}
if (addr->piod_op == ptrace_piod_read_d ||
addr->piod_op == ptrace_piod_read_i ||
addr->piod_op == ptrace_piod_read_auxv) {
POST_WRITE(addr->piod_addr, addr->piod_len);
}
} else if (req_ == ptrace_pt_lwpinfo) {
struct __sanitizer_ptrace_lwpinfo *addr =
(struct __sanitizer_ptrace_lwpinfo *)addr_;
POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
POST_WRITE(addr, struct_ptrace_ptrace_lwpinfo_struct_sz);
} else if (req_ == ptrace_pt_set_event_mask) {
POST_READ(addr_, struct_ptrace_ptrace_event_struct_sz);
} else if (req_ == ptrace_pt_get_event_mask) {
POST_WRITE(addr_, struct_ptrace_ptrace_event_struct_sz);
} else if (req_ == ptrace_pt_set_siginfo) {
POST_READ(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
} else if (req_ == ptrace_pt_get_siginfo) {
POST_WRITE(addr_, struct_ptrace_ptrace_siginfo_struct_sz);
} else if (req_ == ptrace_pt_lwpstatus) {
struct __sanitizer_ptrace_lwpstatus *addr =
(struct __sanitizer_ptrace_lwpstatus *)addr_;
POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
POST_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
} else if (req_ == ptrace_pt_lwpnext) {
struct __sanitizer_ptrace_lwpstatus *addr =
(struct __sanitizer_ptrace_lwpstatus *)addr_;
POST_READ(&addr->pl_lwpid, sizeof(__sanitizer_lwpid_t));
POST_WRITE(addr, struct_ptrace_ptrace_lwpstatus_struct_sz);
} else if (req_ == ptrace_pt_setregs) {
POST_READ(addr_, struct_ptrace_reg_struct_sz);
} else if (req_ == ptrace_pt_getregs) {
POST_WRITE(addr_, struct_ptrace_reg_struct_sz);
} else if (req_ == ptrace_pt_setfpregs) {
POST_READ(addr_, struct_ptrace_fpreg_struct_sz);
} else if (req_ == ptrace_pt_getfpregs) {
POST_WRITE(addr_, struct_ptrace_fpreg_struct_sz);
} else if (req_ == ptrace_pt_setdbregs) {
POST_READ(addr_, struct_ptrace_dbreg_struct_sz);
} else if (req_ == ptrace_pt_getdbregs) {
POST_WRITE(addr_, struct_ptrace_dbreg_struct_sz);
}
}
}
PRE_SYSCALL(recvmsg)(long long s_, void *msg_, long long flags_) {
PRE_WRITE(msg_, sizeof(__sanitizer_msghdr));
}
POST_SYSCALL(recvmsg)
(long long res, long long s_, void *msg_, long long flags_) {
if (res > 0) {
POST_WRITE(msg_, sizeof(__sanitizer_msghdr));
}
}
PRE_SYSCALL(sendmsg)(long long s_, void *msg_, long long flags_) {
PRE_READ(msg_, sizeof(__sanitizer_msghdr));
}
POST_SYSCALL(sendmsg)
(long long res, long long s_, void *msg_, long long flags_) {
if (res > 0) {
POST_READ(msg_, sizeof(__sanitizer_msghdr));
}
}
PRE_SYSCALL(recvfrom)
(long long s_, void *buf_, long long len_, long long flags_, void *from_,
void *fromlenaddr_) {
PRE_WRITE(buf_, len_);
PRE_WRITE(from_, struct_sockaddr_sz);
PRE_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
}
POST_SYSCALL(recvfrom)
(long long res, long long s_, void *buf_, long long len_, long long flags_,
void *from_, void *fromlenaddr_) {
if (res >= 0) {
POST_WRITE(buf_, res);
POST_WRITE(from_, struct_sockaddr_sz);
POST_WRITE(fromlenaddr_, sizeof(__sanitizer_socklen_t));
}
}
PRE_SYSCALL(accept)(long long s_, void *name_, void *anamelen_) {
PRE_WRITE(name_, struct_sockaddr_sz);
PRE_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
}
POST_SYSCALL(accept)
(long long res, long long s_, void *name_, void *anamelen_) {
if (res == 0) {
POST_WRITE(name_, struct_sockaddr_sz);
POST_WRITE(anamelen_, sizeof(__sanitizer_socklen_t));
}
}
PRE_SYSCALL(getpeername)(long long fdes_, void *asa_, void *alen_) {
PRE_WRITE(asa_, struct_sockaddr_sz);
PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
}
POST_SYSCALL(getpeername)
(long long res, long long fdes_, void *asa_, void *alen_) {
if (res == 0) {
POST_WRITE(asa_, struct_sockaddr_sz);
POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
}
}
PRE_SYSCALL(getsockname)(long long fdes_, void *asa_, void *alen_) {
PRE_WRITE(asa_, struct_sockaddr_sz);
PRE_WRITE(alen_, sizeof(__sanitizer_socklen_t));
}
POST_SYSCALL(getsockname)
(long long res, long long fdes_, void *asa_, void *alen_) {
if (res == 0) {
POST_WRITE(asa_, struct_sockaddr_sz);
POST_WRITE(alen_, sizeof(__sanitizer_socklen_t));
}
}
PRE_SYSCALL(access)(void *path_, long long flags_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(access)(long long res, void *path_, long long flags_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(chflags)(void *path_, long long flags_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(chflags)(long long res, void *path_, long long flags_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(fchflags)(long long fd_, long long flags_) { /* Nothing to do */ }
POST_SYSCALL(fchflags)(long long res, long long fd_, long long flags_) {
/* Nothing to do */
}
PRE_SYSCALL(sync)(void) { /* Nothing to do */ }
POST_SYSCALL(sync)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(kill)(long long pid_, long long signum_) { /* Nothing to do */ }
POST_SYSCALL(kill)(long long res, long long pid_, long long signum_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_43_stat43)(void *path_, void *ub_) { /* TODO */ }
POST_SYSCALL(compat_43_stat43)(long long res, void *path_, void *ub_) {
/* TODO */
}
PRE_SYSCALL(getppid)(void) { /* Nothing to do */ }
POST_SYSCALL(getppid)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(compat_43_lstat43)(void *path_, void *ub_) { /* TODO */ }
POST_SYSCALL(compat_43_lstat43)(long long res, void *path_, void *ub_) {
/* TODO */
}
PRE_SYSCALL(dup)(long long fd_) { /* Nothing to do */ }
POST_SYSCALL(dup)(long long res, long long fd_) { /* Nothing to do */ }
PRE_SYSCALL(pipe)(void) {
/* pipe returns two descriptors through two returned values */
}
POST_SYSCALL(pipe)(long long res) {
/* pipe returns two descriptors through two returned values */
}
PRE_SYSCALL(getegid)(void) { /* Nothing to do */ }
POST_SYSCALL(getegid)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(profil)
(void *samples_, long long size_, long long offset_, long long scale_) {
if (samples_) {
PRE_WRITE(samples_, size_);
}
}
POST_SYSCALL(profil)
(long long res, void *samples_, long long size_, long long offset_,
long long scale_) {
if (res == 0) {
if (samples_) {
POST_WRITE(samples_, size_);
}
}
}
PRE_SYSCALL(ktrace)
(void *fname_, long long ops_, long long facs_, long long pid_) {
const char *fname = (const char *)fname_;
if (fname) {
PRE_READ(fname, __sanitizer::internal_strlen(fname) + 1);
}
}
POST_SYSCALL(ktrace)
(long long res, void *fname_, long long ops_, long long facs_, long long pid_) {
const char *fname = (const char *)fname_;
if (res == 0) {
if (fname) {
POST_READ(fname, __sanitizer::internal_strlen(fname) + 1);
}
}
}
PRE_SYSCALL(compat_13_sigaction13)(long long signum_, void *nsa_, void *osa_) {
/* TODO */
}
POST_SYSCALL(compat_13_sigaction13)
(long long res, long long signum_, void *nsa_, void *osa_) {
/* TODO */
}
PRE_SYSCALL(getgid)(void) { /* Nothing to do */ }
POST_SYSCALL(getgid)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(compat_13_sigprocmask13)(long long how_, long long mask_) {
/* TODO */
}
POST_SYSCALL(compat_13_sigprocmask13)
(long long res, long long how_, long long mask_) {
/* TODO */
}
PRE_SYSCALL(__getlogin)(void *namebuf_, long long namelen_) {
if (namebuf_) {
PRE_WRITE(namebuf_, namelen_);
}
}
POST_SYSCALL(__getlogin)(long long res, void *namebuf_, long long namelen_) {
if (res == 0) {
if (namebuf_) {
POST_WRITE(namebuf_, namelen_);
}
}
}
PRE_SYSCALL(__setlogin)(void *namebuf_) {
const char *namebuf = (const char *)namebuf_;
if (namebuf) {
PRE_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
}
}
POST_SYSCALL(__setlogin)(long long res, void *namebuf_) {
if (res == 0) {
const char *namebuf = (const char *)namebuf_;
if (namebuf) {
POST_READ(namebuf, __sanitizer::internal_strlen(namebuf) + 1);
}
}
}
PRE_SYSCALL(acct)(void *path_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(acct)(long long res, void *path_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(compat_13_sigpending13)(void) { /* TODO */ }
POST_SYSCALL(compat_13_sigpending13)(long long res) { /* TODO */ }
PRE_SYSCALL(compat_13_sigaltstack13)(void *nss_, void *oss_) { /* TODO */ }
POST_SYSCALL(compat_13_sigaltstack13)(long long res, void *nss_, void *oss_) {
/* TODO */
}
PRE_SYSCALL(ioctl)(long long fd_, long long com_, void *data_) {
/* Nothing to do */
}
POST_SYSCALL(ioctl)(long long res, long long fd_, long long com_, void *data_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_12_oreboot)(long long opt_) { /* TODO */ }
POST_SYSCALL(compat_12_oreboot)(long long res, long long opt_) { /* TODO */ }
PRE_SYSCALL(revoke)(void *path_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(revoke)(long long res, void *path_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(symlink)(void *path_, void *link_) {
const char *path = (const char *)path_;
const char *link = (const char *)link_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (link) {
PRE_READ(link, __sanitizer::internal_strlen(link) + 1);
}
}
POST_SYSCALL(symlink)(long long res, void *path_, void *link_) {
if (res == 0) {
const char *path = (const char *)path_;
const char *link = (const char *)link_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (link) {
POST_READ(link, __sanitizer::internal_strlen(link) + 1);
}
}
}
PRE_SYSCALL(readlink)(void *path_, void *buf_, long long count_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (buf_) {
PRE_WRITE(buf_, count_);
}
}
POST_SYSCALL(readlink)
(long long res, void *path_, void *buf_, long long count_) {
if (res > 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (buf_) {
PRE_WRITE(buf_, res);
}
}
}
PRE_SYSCALL(execve)(void *path_, void *argp_, void *envp_) {
const char *path = (const char *)path_;
char **argp = (char **)argp_;
char **envp = (char **)envp_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (argp && argp[0]) {
char *a = argp[0];
while (a++) {
PRE_READ(a, __sanitizer::internal_strlen(a) + 1);
}
}
if (envp && envp[0]) {
char *e = envp[0];
while (e++) {
PRE_READ(e, __sanitizer::internal_strlen(e) + 1);
}
}
}
POST_SYSCALL(execve)(long long res, void *path_, void *argp_, void *envp_) {
/* If we are here, something went wrong */
const char *path = (const char *)path_;
char **argp = (char **)argp_;
char **envp = (char **)envp_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
if (argp && argp[0]) {
char *a = argp[0];
while (a++) {
POST_READ(a, __sanitizer::internal_strlen(a) + 1);
}
}
if (envp && envp[0]) {
char *e = envp[0];
while (e++) {
POST_READ(e, __sanitizer::internal_strlen(e) + 1);
}
}
}
PRE_SYSCALL(umask)(long long newmask_) { /* Nothing to do */ }
POST_SYSCALL(umask)(long long res, long long newmask_) { /* Nothing to do */ }
PRE_SYSCALL(chroot)(void *path_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(chroot)(long long res, void *path_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(compat_43_fstat43)(long long fd_, void *sb_) { /* TODO */ }
POST_SYSCALL(compat_43_fstat43)(long long res, long long fd_, void *sb_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ogetkerninfo)
(long long op_, void *where_, void *size_, long long arg_) {
/* TODO */
}
POST_SYSCALL(compat_43_ogetkerninfo)
(long long res, long long op_, void *where_, void *size_, long long arg_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ogetpagesize)(void) { /* TODO */ }
POST_SYSCALL(compat_43_ogetpagesize)(long long res) { /* TODO */ }
PRE_SYSCALL(compat_12_msync)(void *addr_, long long len_) { /* TODO */ }
POST_SYSCALL(compat_12_msync)(long long res, void *addr_, long long len_) {
/* TODO */
}
PRE_SYSCALL(vfork)(void) { /* Nothing to do */ }
POST_SYSCALL(vfork)(long long res) { /* Nothing to do */ }
/* syscall 67 has been skipped */
/* syscall 68 has been skipped */
/* syscall 69 has been skipped */
/* syscall 70 has been skipped */
PRE_SYSCALL(compat_43_ommap)
(void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
long long pos_) {
/* TODO */
}
POST_SYSCALL(compat_43_ommap)
(long long res, void *addr_, long long len_, long long prot_, long long flags_,
long long fd_, long long pos_) {
/* TODO */
}
PRE_SYSCALL(vadvise)(long long anom_) { /* Nothing to do */ }
POST_SYSCALL(vadvise)(long long res, long long anom_) { /* Nothing to do */ }
PRE_SYSCALL(munmap)(void *addr_, long long len_) { /* Nothing to do */ }
POST_SYSCALL(munmap)(long long res, void *addr_, long long len_) {
/* Nothing to do */
}
PRE_SYSCALL(mprotect)(void *addr_, long long len_, long long prot_) {
/* Nothing to do */
}
POST_SYSCALL(mprotect)
(long long res, void *addr_, long long len_, long long prot_) {
/* Nothing to do */
}
PRE_SYSCALL(madvise)(void *addr_, long long len_, long long behav_) {
/* Nothing to do */
}
POST_SYSCALL(madvise)
(long long res, void *addr_, long long len_, long long behav_) {
/* Nothing to do */
}
/* syscall 76 has been skipped */
/* syscall 77 has been skipped */
PRE_SYSCALL(mincore)(void *addr_, long long len_, void *vec_) {
/* Nothing to do */
}
POST_SYSCALL(mincore)(long long res, void *addr_, long long len_, void *vec_) {
/* Nothing to do */
}
PRE_SYSCALL(getgroups)(long long gidsetsize_, void *gidset_) {
unsigned int *gidset = (unsigned int *)gidset_;
if (gidset) {
PRE_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
}
}
POST_SYSCALL(getgroups)(long long res, long long gidsetsize_, void *gidset_) {
if (res == 0) {
unsigned int *gidset = (unsigned int *)gidset_;
if (gidset) {
POST_WRITE(gidset, sizeof(*gidset) * gidsetsize_);
}
}
}
PRE_SYSCALL(setgroups)(long long gidsetsize_, void *gidset_) {
unsigned int *gidset = (unsigned int *)gidset_;
if (gidset) {
PRE_READ(gidset, sizeof(*gidset) * gidsetsize_);
}
}
POST_SYSCALL(setgroups)(long long res, long long gidsetsize_, void *gidset_) {
if (res == 0) {
unsigned int *gidset = (unsigned int *)gidset_;
if (gidset) {
POST_READ(gidset, sizeof(*gidset) * gidsetsize_);
}
}
}
PRE_SYSCALL(getpgrp)(void) { /* Nothing to do */ }
POST_SYSCALL(getpgrp)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(setpgid)(long long pid_, long long pgid_) { /* Nothing to do */ }
POST_SYSCALL(setpgid)(long long res, long long pid_, long long pgid_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_50_setitimer)(long long which_, void *itv_, void *oitv_) {
/* TODO */
}
POST_SYSCALL(compat_50_setitimer)
(long long res, long long which_, void *itv_, void *oitv_) {
/* TODO */
}
PRE_SYSCALL(compat_43_owait)(void) { /* TODO */ }
POST_SYSCALL(compat_43_owait)(long long res) { /* TODO */ }
PRE_SYSCALL(compat_12_oswapon)(void *name_) { /* TODO */ }
POST_SYSCALL(compat_12_oswapon)(long long res, void *name_) { /* TODO */ }
PRE_SYSCALL(compat_50_getitimer)(long long which_, void *itv_) { /* TODO */ }
POST_SYSCALL(compat_50_getitimer)(long long res, long long which_, void *itv_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ogethostname)(void *hostname_, long long len_) {
/* TODO */
}
POST_SYSCALL(compat_43_ogethostname)
(long long res, void *hostname_, long long len_) {
/* TODO */
}
PRE_SYSCALL(compat_43_osethostname)(void *hostname_, long long len_) {
/* TODO */
}
POST_SYSCALL(compat_43_osethostname)
(long long res, void *hostname_, long long len_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ogetdtablesize)(void) { /* TODO */ }
POST_SYSCALL(compat_43_ogetdtablesize)(long long res) { /* TODO */ }
PRE_SYSCALL(dup2)(long long from_, long long to_) { /* Nothing to do */ }
POST_SYSCALL(dup2)(long long res, long long from_, long long to_) {
/* Nothing to do */
}
PRE_SYSCALL(getrandom)(void *buf_, long long buflen_, long long flags_) {
/* TODO */
}
POST_SYSCALL(getrandom)
(long long res, void *buf_, long long buflen_, long long flags_) {
/* TODO */
}
PRE_SYSCALL(fcntl)(long long fd_, long long cmd_, void *arg_) {
/* Nothing to do */
}
POST_SYSCALL(fcntl)(long long res, long long fd_, long long cmd_, void *arg_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_50_select)
(long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
/* TODO */
}
POST_SYSCALL(compat_50_select)
(long long res, long long nd_, void *in_, void *ou_, void *ex_, void *tv_) {
/* TODO */
}
/* syscall 94 has been skipped */
PRE_SYSCALL(fsync)(long long fd_) { /* Nothing to do */ }
POST_SYSCALL(fsync)(long long res, long long fd_) { /* Nothing to do */ }
PRE_SYSCALL(setpriority)(long long which_, long long who_, long long prio_) {
/* Nothing to do */
}
POST_SYSCALL(setpriority)
(long long res, long long which_, long long who_, long long prio_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_30_socket)
(long long domain_, long long type_, long long protocol_) {
/* TODO */
}
POST_SYSCALL(compat_30_socket)
(long long res, long long domain_, long long type_, long long protocol_) {
/* TODO */
}
PRE_SYSCALL(connect)(long long s_, void *name_, long long namelen_) {
PRE_READ(name_, namelen_);
}
POST_SYSCALL(connect)
(long long res, long long s_, void *name_, long long namelen_) {
if (res == 0) {
POST_READ(name_, namelen_);
}
}
PRE_SYSCALL(compat_43_oaccept)(long long s_, void *name_, void *anamelen_) {
/* TODO */
}
POST_SYSCALL(compat_43_oaccept)
(long long res, long long s_, void *name_, void *anamelen_) {
/* TODO */
}
PRE_SYSCALL(getpriority)(long long which_, long long who_) {
/* Nothing to do */
}
POST_SYSCALL(getpriority)(long long res, long long which_, long long who_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_43_osend)
(long long s_, void *buf_, long long len_, long long flags_) {
/* TODO */
}
POST_SYSCALL(compat_43_osend)
(long long res, long long s_, void *buf_, long long len_, long long flags_) {
/* TODO */
}
PRE_SYSCALL(compat_43_orecv)
(long long s_, void *buf_, long long len_, long long flags_) {
/* TODO */
}
POST_SYSCALL(compat_43_orecv)
(long long res, long long s_, void *buf_, long long len_, long long flags_) {
/* TODO */
}
PRE_SYSCALL(compat_13_sigreturn13)(void *sigcntxp_) { /* TODO */ }
POST_SYSCALL(compat_13_sigreturn13)(long long res, void *sigcntxp_) {
/* TODO */
}
PRE_SYSCALL(bind)(long long s_, void *name_, long long namelen_) {
PRE_READ(name_, namelen_);
}
POST_SYSCALL(bind)
(long long res, long long s_, void *name_, long long namelen_) {
if (res == 0) {
PRE_READ(name_, namelen_);
}
}
PRE_SYSCALL(setsockopt)
(long long s_, long long level_, long long name_, void *val_,
long long valsize_) {
if (val_) {
PRE_READ(val_, valsize_);
}
}
POST_SYSCALL(setsockopt)
(long long res, long long s_, long long level_, long long name_, void *val_,
long long valsize_) {
if (res == 0) {
if (val_) {
POST_READ(val_, valsize_);
}
}
}
PRE_SYSCALL(listen)(long long s_, long long backlog_) { /* Nothing to do */ }
POST_SYSCALL(listen)(long long res, long long s_, long long backlog_) {
/* Nothing to do */
}
/* syscall 107 has been skipped */
PRE_SYSCALL(compat_43_osigvec)(long long signum_, void *nsv_, void *osv_) {
/* TODO */
}
POST_SYSCALL(compat_43_osigvec)
(long long res, long long signum_, void *nsv_, void *osv_) {
/* TODO */
}
PRE_SYSCALL(compat_43_osigblock)(long long mask_) { /* TODO */ }
POST_SYSCALL(compat_43_osigblock)(long long res, long long mask_) { /* TODO */ }
PRE_SYSCALL(compat_43_osigsetmask)(long long mask_) { /* TODO */ }
POST_SYSCALL(compat_43_osigsetmask)(long long res, long long mask_) {
/* TODO */
}
PRE_SYSCALL(compat_13_sigsuspend13)(long long mask_) { /* TODO */ }
POST_SYSCALL(compat_13_sigsuspend13)(long long res, long long mask_) {
/* TODO */
}
PRE_SYSCALL(compat_43_osigstack)(void *nss_, void *oss_) { /* TODO */ }
POST_SYSCALL(compat_43_osigstack)(long long res, void *nss_, void *oss_) {
/* TODO */
}
PRE_SYSCALL(compat_43_orecvmsg)(long long s_, void *msg_, long long flags_) {
/* TODO */
}
POST_SYSCALL(compat_43_orecvmsg)
(long long res, long long s_, void *msg_, long long flags_) {
/* TODO */
}
PRE_SYSCALL(compat_43_osendmsg)(long long s_, void *msg_, long long flags_) {
/* TODO */
}
POST_SYSCALL(compat_43_osendmsg)
(long long res, long long s_, void *msg_, long long flags_) {
/* TODO */
}
/* syscall 115 has been skipped */
PRE_SYSCALL(compat_50_gettimeofday)(void *tp_, void *tzp_) { /* TODO */ }
POST_SYSCALL(compat_50_gettimeofday)(long long res, void *tp_, void *tzp_) {
/* TODO */
}
PRE_SYSCALL(compat_50_getrusage)(long long who_, void *rusage_) { /* TODO */ }
POST_SYSCALL(compat_50_getrusage)
(long long res, long long who_, void *rusage_) {
/* TODO */
}
PRE_SYSCALL(getsockopt)
(long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
/* TODO */
}
POST_SYSCALL(getsockopt)
(long long res, long long s_, long long level_, long long name_, void *val_,
void *avalsize_) {
/* TODO */
}
/* syscall 119 has been skipped */
PRE_SYSCALL(readv)(long long fd_, void *iovp_, long long iovcnt_) {
struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
int i;
if (iovp) {
PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
for (i = 0; i < iovcnt_; i++) {
PRE_WRITE(iovp[i].iov_base, iovp[i].iov_len);
}
}
}
POST_SYSCALL(readv)
(long long res, long long fd_, void *iovp_, long long iovcnt_) {
struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
int i;
uptr m, n = res;
if (res > 0) {
if (iovp) {
POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
for (i = 0; i < iovcnt_ && n > 0; i++) {
m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
POST_WRITE(iovp[i].iov_base, m);
n -= m;
}
}
}
}
PRE_SYSCALL(writev)(long long fd_, void *iovp_, long long iovcnt_) {
struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
int i;
if (iovp) {
PRE_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
for (i = 0; i < iovcnt_; i++) {
PRE_READ(iovp[i].iov_base, iovp[i].iov_len);
}
}
}
POST_SYSCALL(writev)
(long long res, long long fd_, void *iovp_, long long iovcnt_) {
struct __sanitizer_iovec *iovp = (struct __sanitizer_iovec *)iovp_;
int i;
uptr m, n = res;
if (res > 0) {
if (iovp) {
POST_READ(iovp, sizeof(struct __sanitizer_iovec) * iovcnt_);
for (i = 0; i < iovcnt_ && n > 0; i++) {
m = n > iovp[i].iov_len ? iovp[i].iov_len : n;
POST_READ(iovp[i].iov_base, m);
n -= m;
}
}
}
}
PRE_SYSCALL(compat_50_settimeofday)(void *tv_, void *tzp_) { /* TODO */ }
POST_SYSCALL(compat_50_settimeofday)(long long res, void *tv_, void *tzp_) {
/* TODO */
}
PRE_SYSCALL(fchown)(long long fd_, long long uid_, long long gid_) {
/* Nothing to do */
}
POST_SYSCALL(fchown)
(long long res, long long fd_, long long uid_, long long gid_) {
/* Nothing to do */
}
PRE_SYSCALL(fchmod)(long long fd_, long long mode_) { /* Nothing to do */ }
POST_SYSCALL(fchmod)(long long res, long long fd_, long long mode_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_43_orecvfrom)
(long long s_, void *buf_, long long len_, long long flags_, void *from_,
void *fromlenaddr_) {
/* TODO */
}
POST_SYSCALL(compat_43_orecvfrom)
(long long res, long long s_, void *buf_, long long len_, long long flags_,
void *from_, void *fromlenaddr_) {
/* TODO */
}
PRE_SYSCALL(setreuid)(long long ruid_, long long euid_) { /* Nothing to do */ }
POST_SYSCALL(setreuid)(long long res, long long ruid_, long long euid_) {
/* Nothing to do */
}
PRE_SYSCALL(setregid)(long long rgid_, long long egid_) { /* Nothing to do */ }
POST_SYSCALL(setregid)(long long res, long long rgid_, long long egid_) {
/* Nothing to do */
}
PRE_SYSCALL(rename)(void *from_, void *to_) {
const char *from = (const char *)from_;
const char *to = (const char *)to_;
if (from) {
PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
}
if (to) {
PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
}
}
POST_SYSCALL(rename)(long long res, void *from_, void *to_) {
if (res == 0) {
const char *from = (const char *)from_;
const char *to = (const char *)to_;
if (from) {
POST_READ(from, __sanitizer::internal_strlen(from) + 1);
}
if (to) {
POST_READ(to, __sanitizer::internal_strlen(to) + 1);
}
}
}
PRE_SYSCALL(compat_43_otruncate)(void *path_, long long length_) { /* TODO */ }
POST_SYSCALL(compat_43_otruncate)
(long long res, void *path_, long long length_) {
/* TODO */
}
PRE_SYSCALL(compat_43_oftruncate)(long long fd_, long long length_) {
/* TODO */
}
POST_SYSCALL(compat_43_oftruncate)
(long long res, long long fd_, long long length_) {
/* TODO */
}
PRE_SYSCALL(flock)(long long fd_, long long how_) { /* Nothing to do */ }
POST_SYSCALL(flock)(long long res, long long fd_, long long how_) {
/* Nothing to do */
}
PRE_SYSCALL(mkfifo)(void *path_, long long mode_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(mkfifo)(long long res, void *path_, long long mode_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(sendto)
(long long s_, void *buf_, long long len_, long long flags_, void *to_,
long long tolen_) {
PRE_READ(buf_, len_);
PRE_READ(to_, tolen_);
}
POST_SYSCALL(sendto)
(long long res, long long s_, void *buf_, long long len_, long long flags_,
void *to_, long long tolen_) {
if (res >= 0) {
POST_READ(buf_, len_);
POST_READ(to_, tolen_);
}
}
PRE_SYSCALL(shutdown)(long long s_, long long how_) { /* Nothing to do */ }
POST_SYSCALL(shutdown)(long long res, long long s_, long long how_) {
/* Nothing to do */
}
PRE_SYSCALL(socketpair)
(long long domain_, long long type_, long long protocol_, void *rsv_) {
PRE_WRITE(rsv_, 2 * sizeof(int));
}
POST_SYSCALL(socketpair)
(long long res, long long domain_, long long type_, long long protocol_,
void *rsv_) {
if (res == 0) {
POST_WRITE(rsv_, 2 * sizeof(int));
}
}
PRE_SYSCALL(mkdir)(void *path_, long long mode_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(mkdir)(long long res, void *path_, long long mode_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(rmdir)(void *path_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(rmdir)(long long res, void *path_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(compat_50_utimes)(void *path_, void *tptr_) { /* TODO */ }
POST_SYSCALL(compat_50_utimes)(long long res, void *path_, void *tptr_) {
/* TODO */
}
/* syscall 139 has been skipped */
PRE_SYSCALL(compat_50_adjtime)(void *delta_, void *olddelta_) { /* TODO */ }
POST_SYSCALL(compat_50_adjtime)(long long res, void *delta_, void *olddelta_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ogetpeername)(long long fdes_, void *asa_, void *alen_) {
/* TODO */
}
POST_SYSCALL(compat_43_ogetpeername)
(long long res, long long fdes_, void *asa_, void *alen_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ogethostid)(void) { /* TODO */ }
POST_SYSCALL(compat_43_ogethostid)(long long res) { /* TODO */ }
PRE_SYSCALL(compat_43_osethostid)(long long hostid_) { /* TODO */ }
POST_SYSCALL(compat_43_osethostid)(long long res, long long hostid_) {
/* TODO */
}
PRE_SYSCALL(compat_43_ogetrlimit)(long long which_, void *rlp_) { /* TODO */ }
POST_SYSCALL(compat_43_ogetrlimit)
(long long res, long long which_, void *rlp_) {
/* TODO */
}
PRE_SYSCALL(compat_43_osetrlimit)(long long which_, void *rlp_) { /* TODO */ }
POST_SYSCALL(compat_43_osetrlimit)
(long long res, long long which_, void *rlp_) {
/* TODO */
}
PRE_SYSCALL(compat_43_okillpg)(long long pgid_, long long signum_) {
/* TODO */
}
POST_SYSCALL(compat_43_okillpg)
(long long res, long long pgid_, long long signum_) {
/* TODO */
}
PRE_SYSCALL(setsid)(void) { /* Nothing to do */ }
POST_SYSCALL(setsid)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(compat_50_quotactl)
(void *path_, long long cmd_, long long uid_, void *arg_) {
/* TODO */
}
POST_SYSCALL(compat_50_quotactl)
(long long res, void *path_, long long cmd_, long long uid_, void *arg_) {
/* TODO */
}
PRE_SYSCALL(compat_43_oquota)(void) { /* TODO */ }
POST_SYSCALL(compat_43_oquota)(long long res) { /* TODO */ }
PRE_SYSCALL(compat_43_ogetsockname)(long long fdec_, void *asa_, void *alen_) {
/* TODO */
}
POST_SYSCALL(compat_43_ogetsockname)
(long long res, long long fdec_, void *asa_, void *alen_) {
/* TODO */
}
/* syscall 151 has been skipped */
/* syscall 152 has been skipped */
/* syscall 153 has been skipped */
/* syscall 154 has been skipped */
PRE_SYSCALL(nfssvc)(long long flag_, void *argp_) { /* Nothing to do */ }
POST_SYSCALL(nfssvc)(long long res, long long flag_, void *argp_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_43_ogetdirentries)
(long long fd_, void *buf_, long long count_, void *basep_) {
/* TODO */
}
POST_SYSCALL(compat_43_ogetdirentries)
(long long res, long long fd_, void *buf_, long long count_, void *basep_) {
/* TODO */
}
PRE_SYSCALL(compat_20_statfs)(void *path_, void *buf_) { /* TODO */ }
POST_SYSCALL(compat_20_statfs)(long long res, void *path_, void *buf_) {
/* TODO */
}
PRE_SYSCALL(compat_20_fstatfs)(long long fd_, void *buf_) { /* TODO */ }
POST_SYSCALL(compat_20_fstatfs)(long long res, long long fd_, void *buf_) {
/* TODO */
}
/* syscall 159 has been skipped */
/* syscall 160 has been skipped */
PRE_SYSCALL(compat_30_getfh)(void *fname_, void *fhp_) { /* TODO */ }
POST_SYSCALL(compat_30_getfh)(long long res, void *fname_, void *fhp_) {
/* TODO */
}
PRE_SYSCALL(compat_09_ogetdomainname)(void *domainname_, long long len_) {
/* TODO */
}
POST_SYSCALL(compat_09_ogetdomainname)
(long long res, void *domainname_, long long len_) {
/* TODO */
}
PRE_SYSCALL(compat_09_osetdomainname)(void *domainname_, long long len_) {
/* TODO */
}
POST_SYSCALL(compat_09_osetdomainname)
(long long res, void *domainname_, long long len_) {
/* TODO */
}
PRE_SYSCALL(compat_09_ouname)(void *name_) { /* TODO */ }
POST_SYSCALL(compat_09_ouname)(long long res, void *name_) { /* TODO */ }
PRE_SYSCALL(sysarch)(long long op_, void *parms_) { /* TODO */ }
POST_SYSCALL(sysarch)(long long res, long long op_, void *parms_) { /* TODO */ }
PRE_SYSCALL(__futex)
(void *uaddr_, long long op_, long long val_, void *timeout_, void *uaddr2_,
long long val2_, long long val3_) {
/* TODO */
}
POST_SYSCALL(__futex)
(long long res, void *uaddr_, long long op_, long long val_, void *timeout_,
void *uaddr2_, long long val2_, long long val3_) {
/* TODO */
}
PRE_SYSCALL(__futex_set_robust_list)(void *head_, long long len_) { /* TODO */ }
POST_SYSCALL(__futex_set_robust_list)
(long long res, void *head_, long long len_) {
/* TODO */
}
PRE_SYSCALL(__futex_get_robust_list)
(long long lwpid_, void **headp_, void *lenp_) {
/* TODO */
}
POST_SYSCALL(__futex_get_robust_list)
(long long res, long long lwpid_, void **headp_, void *lenp_) {
/* TODO */
}
#if !defined(_LP64)
PRE_SYSCALL(compat_10_osemsys)
(long long which_, long long a2_, long long a3_, long long a4_, long long a5_) {
/* TODO */
}
POST_SYSCALL(compat_10_osemsys)
(long long res, long long which_, long long a2_, long long a3_, long long a4_,
long long a5_) {
/* TODO */
}
#else
/* syscall 169 has been skipped */
#endif
#if !defined(_LP64)
PRE_SYSCALL(compat_10_omsgsys)
(long long which_, long long a2_, long long a3_, long long a4_, long long a5_,
long long a6_) {
/* TODO */
}
POST_SYSCALL(compat_10_omsgsys)
(long long res, long long which_, long long a2_, long long a3_, long long a4_,
long long a5_, long long a6_) {
/* TODO */
}
#else
/* syscall 170 has been skipped */
#endif
#if !defined(_LP64)
PRE_SYSCALL(compat_10_oshmsys)
(long long which_, long long a2_, long long a3_, long long a4_) {
/* TODO */
}
POST_SYSCALL(compat_10_oshmsys)
(long long res, long long which_, long long a2_, long long a3_, long long a4_) {
/* TODO */
}
#else
/* syscall 171 has been skipped */
#endif
/* syscall 172 has been skipped */
PRE_SYSCALL(pread)
(long long fd_, void *buf_, long long nbyte_, long long PAD_,
long long offset_) {
if (buf_) {
PRE_WRITE(buf_, nbyte_);
}
}
POST_SYSCALL(pread)
(long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
long long offset_) {
if (res > 0) {
POST_WRITE(buf_, res);
}
}
PRE_SYSCALL(pwrite)
(long long fd_, void *buf_, long long nbyte_, long long PAD_,
long long offset_) {
if (buf_) {
PRE_READ(buf_, nbyte_);
}
}
POST_SYSCALL(pwrite)
(long long res, long long fd_, void *buf_, long long nbyte_, long long PAD_,
long long offset_) {
if (res > 0) {
POST_READ(buf_, res);
}
}
PRE_SYSCALL(compat_30_ntp_gettime)(void *ntvp_) { /* TODO */ }
POST_SYSCALL(compat_30_ntp_gettime)(long long res, void *ntvp_) { /* TODO */ }
#if defined(NTP) || !defined(_KERNEL_OPT)
PRE_SYSCALL(ntp_adjtime)(void *tp_) { /* Nothing to do */ }
POST_SYSCALL(ntp_adjtime)(long long res, void *tp_) { /* Nothing to do */ }
#else
/* syscall 176 has been skipped */
#endif
/* syscall 177 has been skipped */
/* syscall 178 has been skipped */
/* syscall 179 has been skipped */
/* syscall 180 has been skipped */
PRE_SYSCALL(setgid)(long long gid_) { /* Nothing to do */ }
POST_SYSCALL(setgid)(long long res, long long gid_) { /* Nothing to do */ }
PRE_SYSCALL(setegid)(long long egid_) { /* Nothing to do */ }
POST_SYSCALL(setegid)(long long res, long long egid_) { /* Nothing to do */ }
PRE_SYSCALL(seteuid)(long long euid_) { /* Nothing to do */ }
POST_SYSCALL(seteuid)(long long res, long long euid_) { /* Nothing to do */ }
PRE_SYSCALL(lfs_bmapv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
/* TODO */
}
POST_SYSCALL(lfs_bmapv)
(long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
/* TODO */
}
PRE_SYSCALL(lfs_markv)(void *fsidp_, void *blkiov_, long long blkcnt_) {
/* TODO */
}
POST_SYSCALL(lfs_markv)
(long long res, void *fsidp_, void *blkiov_, long long blkcnt_) {
/* TODO */
}
PRE_SYSCALL(lfs_segclean)(void *fsidp_, long long segment_) { /* TODO */ }
POST_SYSCALL(lfs_segclean)(long long res, void *fsidp_, long long segment_) {
/* TODO */
}
PRE_SYSCALL(compat_50_lfs_segwait)(void *fsidp_, void *tv_) { /* TODO */ }
POST_SYSCALL(compat_50_lfs_segwait)(long long res, void *fsidp_, void *tv_) {
/* TODO */
}
PRE_SYSCALL(compat_12_stat12)(void *path_, void *ub_) { /* TODO */ }
POST_SYSCALL(compat_12_stat12)(long long res, void *path_, void *ub_) {
/* TODO */
}
PRE_SYSCALL(compat_12_fstat12)(long long fd_, void *sb_) { /* TODO */ }
POST_SYSCALL(compat_12_fstat12)(long long res, long long fd_, void *sb_) {
/* TODO */
}
PRE_SYSCALL(compat_12_lstat12)(void *path_, void *ub_) { /* TODO */ }
POST_SYSCALL(compat_12_lstat12)(long long res, void *path_, void *ub_) {
/* TODO */
}
PRE_SYSCALL(pathconf)(void *path_, long long name_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(pathconf)(long long res, void *path_, long long name_) {
if (res != -1) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(fpathconf)(long long fd_, long long name_) { /* Nothing to do */ }
POST_SYSCALL(fpathconf)(long long res, long long fd_, long long name_) {
/* Nothing to do */
}
PRE_SYSCALL(getsockopt2)
(long long s_, long long level_, long long name_, void *val_, void *avalsize_) {
/* TODO */
}
POST_SYSCALL(getsockopt2)
(long long res, long long s_, long long level_, long long name_, void *val_,
void *avalsize_) {
/* TODO */
}
PRE_SYSCALL(getrlimit)(long long which_, void *rlp_) {
PRE_WRITE(rlp_, struct_rlimit_sz);
}
POST_SYSCALL(getrlimit)(long long res, long long which_, void *rlp_) {
if (res == 0) {
POST_WRITE(rlp_, struct_rlimit_sz);
}
}
PRE_SYSCALL(setrlimit)(long long which_, void *rlp_) {
PRE_READ(rlp_, struct_rlimit_sz);
}
POST_SYSCALL(setrlimit)(long long res, long long which_, void *rlp_) {
if (res == 0) {
POST_READ(rlp_, struct_rlimit_sz);
}
}
PRE_SYSCALL(compat_12_getdirentries)
(long long fd_, void *buf_, long long count_, void *basep_) {
/* TODO */
}
POST_SYSCALL(compat_12_getdirentries)
(long long res, long long fd_, void *buf_, long long count_, void *basep_) {
/* TODO */
}
PRE_SYSCALL(mmap)
(void *addr_, long long len_, long long prot_, long long flags_, long long fd_,
long long PAD_, long long pos_) {
/* Nothing to do */
}
POST_SYSCALL(mmap)
(long long res, void *addr_, long long len_, long long prot_, long long flags_,
long long fd_, long long PAD_, long long pos_) {
/* Nothing to do */
}
PRE_SYSCALL(__syscall)(long long code_, long long args_[SYS_MAXSYSARGS]) {
/* Nothing to do */
}
POST_SYSCALL(__syscall)
(long long res, long long code_, long long args_[SYS_MAXSYSARGS]) {
/* Nothing to do */
}
PRE_SYSCALL(lseek)
(long long fd_, long long PAD_, long long offset_, long long whence_) {
/* Nothing to do */
}
POST_SYSCALL(lseek)
(long long res, long long fd_, long long PAD_, long long offset_,
long long whence_) {
/* Nothing to do */
}
PRE_SYSCALL(truncate)(void *path_, long long PAD_, long long length_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(truncate)
(long long res, void *path_, long long PAD_, long long length_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(ftruncate)(long long fd_, long long PAD_, long long length_) {
/* Nothing to do */
}
POST_SYSCALL(ftruncate)
(long long res, long long fd_, long long PAD_, long long length_) {
/* Nothing to do */
}
PRE_SYSCALL(__sysctl)
(void *name_, long long namelen_, void *oldv_, void *oldlenp_, void *newv_,
long long newlen_) {
const int *name = (const int *)name_;
if (name) {
PRE_READ(name, namelen_ * sizeof(*name));
}
if (newv_) {
PRE_READ(name, newlen_);
}
}
POST_SYSCALL(__sysctl)
(long long res, void *name_, long long namelen_, void *oldv_, void *oldlenp_,
void *newv_, long long newlen_) {
if (res == 0) {
const int *name = (const int *)name_;
if (name) {
POST_READ(name, namelen_ * sizeof(*name));
}
if (newv_) {
POST_READ(name, newlen_);
}
}
}
PRE_SYSCALL(mlock)(void *addr_, long long len_) { /* Nothing to do */ }
POST_SYSCALL(mlock)(long long res, void *addr_, long long len_) {
/* Nothing to do */
}
PRE_SYSCALL(munlock)(void *addr_, long long len_) { /* Nothing to do */ }
POST_SYSCALL(munlock)(long long res, void *addr_, long long len_) {
/* Nothing to do */
}
PRE_SYSCALL(undelete)(void *path_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(undelete)(long long res, void *path_) {
if (res == 0) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
}
PRE_SYSCALL(compat_50_futimes)(long long fd_, void *tptr_) { /* TODO */ }
POST_SYSCALL(compat_50_futimes)(long long res, long long fd_, void *tptr_) {
/* TODO */
}
PRE_SYSCALL(getpgid)(long long pid_) { /* Nothing to do */ }
POST_SYSCALL(getpgid)(long long res, long long pid_) { /* Nothing to do */ }
PRE_SYSCALL(reboot)(long long opt_, void *bootstr_) {
const char *bootstr = (const char *)bootstr_;
if (bootstr) {
PRE_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
}
}
POST_SYSCALL(reboot)(long long res, long long opt_, void *bootstr_) {
/* This call should never return */
const char *bootstr = (const char *)bootstr_;
if (bootstr) {
POST_READ(bootstr, __sanitizer::internal_strlen(bootstr) + 1);
}
}
PRE_SYSCALL(poll)(void *fds_, long long nfds_, long long timeout_) {
/* Nothing to do */
}
POST_SYSCALL(poll)
(long long res, void *fds_, long long nfds_, long long timeout_) {
/* Nothing to do */
}
PRE_SYSCALL(afssys)
(long long id_, long long a1_, long long a2_, long long a3_, long long a4_,
long long a5_, long long a6_) {
/* TODO */
}
POST_SYSCALL(afssys)
(long long res, long long id_, long long a1_, long long a2_, long long a3_,
long long a4_, long long a5_, long long a6_) {
/* TODO */
}
/* syscall 211 has been skipped */
/* syscall 212 has been skipped */
/* syscall 213 has been skipped */
/* syscall 214 has been skipped */
/* syscall 215 has been skipped */
/* syscall 216 has been skipped */
/* syscall 217 has been skipped */
/* syscall 218 has been skipped */
/* syscall 219 has been skipped */
PRE_SYSCALL(compat_14___semctl)
(long long semid_, long long semnum_, long long cmd_, void *arg_) {
/* TODO */
}
POST_SYSCALL(compat_14___semctl)
(long long res, long long semid_, long long semnum_, long long cmd_,
void *arg_) {
/* TODO */
}
PRE_SYSCALL(semget)(long long key_, long long nsems_, long long semflg_) {
/* Nothing to do */
}
POST_SYSCALL(semget)
(long long res, long long key_, long long nsems_, long long semflg_) {
/* Nothing to do */
}
PRE_SYSCALL(semop)(long long semid_, void *sops_, long long nsops_) {
if (sops_) {
PRE_READ(sops_, nsops_ * struct_sembuf_sz);
}
}
POST_SYSCALL(semop)
(long long res, long long semid_, void *sops_, long long nsops_) {
if (res == 0) {
if (sops_) {
POST_READ(sops_, nsops_ * struct_sembuf_sz);
}
}
}
PRE_SYSCALL(semconfig)(long long flag_) { /* Nothing to do */ }
POST_SYSCALL(semconfig)(long long res, long long flag_) { /* Nothing to do */ }
PRE_SYSCALL(compat_14_msgctl)(long long msqid_, long long cmd_, void *buf_) {
/* TODO */
}
POST_SYSCALL(compat_14_msgctl)
(long long res, long long msqid_, long long cmd_, void *buf_) {
/* TODO */
}
PRE_SYSCALL(msgget)(long long key_, long long msgflg_) { /* Nothing to do */ }
POST_SYSCALL(msgget)(long long res, long long key_, long long msgflg_) {
/* Nothing to do */
}
PRE_SYSCALL(msgsnd)
(long long msqid_, void *msgp_, long long msgsz_, long long msgflg_) {
if (msgp_) {
PRE_READ(msgp_, msgsz_);
}
}
POST_SYSCALL(msgsnd)
(long long res, long long msqid_, void *msgp_, long long msgsz_,
long long msgflg_) {
if (res == 0) {
if (msgp_) {
POST_READ(msgp_, msgsz_);
}
}
}
PRE_SYSCALL(msgrcv)
(long long msqid_, void *msgp_, long long msgsz_, long long msgtyp_,
long long msgflg_) {
/* Nothing to do */
}
POST_SYSCALL(msgrcv)
(long long res, long long msqid_, void *msgp_, long long msgsz_,
long long msgtyp_, long long msgflg_) {
/* Nothing to do */
}
PRE_SYSCALL(shmat)(long long shmid_, void *shmaddr_, long long shmflg_) {
/* Nothing to do */
}
POST_SYSCALL(shmat)
(long long res, long long shmid_, void *shmaddr_, long long shmflg_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_14_shmctl)(long long shmid_, long long cmd_, void *buf_) {
/* TODO */
}
POST_SYSCALL(compat_14_shmctl)
(long long res, long long shmid_, long long cmd_, void *buf_) {
/* TODO */
}
PRE_SYSCALL(shmdt)(void *shmaddr_) { /* Nothing to do */ }
POST_SYSCALL(shmdt)(long long res, void *shmaddr_) { /* Nothing to do */ }
PRE_SYSCALL(shmget)(long long key_, long long size_, long long shmflg_) {
/* Nothing to do */
}
POST_SYSCALL(shmget)
(long long res, long long key_, long long size_, long long shmflg_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_50_clock_gettime)(long long clock_id_, void *tp_) {
/* TODO */
}
POST_SYSCALL(compat_50_clock_gettime)
(long long res, long long clock_id_, void *tp_) {
/* TODO */
}
PRE_SYSCALL(compat_50_clock_settime)(long long clock_id_, void *tp_) {
/* TODO */
}
POST_SYSCALL(compat_50_clock_settime)
(long long res, long long clock_id_, void *tp_) {
/* TODO */
}
PRE_SYSCALL(compat_50_clock_getres)(long long clock_id_, void *tp_) {
/* TODO */
}
POST_SYSCALL(compat_50_clock_getres)
(long long res, long long clock_id_, void *tp_) {
/* TODO */
}
PRE_SYSCALL(timer_create)(long long clock_id_, void *evp_, void *timerid_) {
/* Nothing to do */
}
POST_SYSCALL(timer_create)
(long long res, long long clock_id_, void *evp_, void *timerid_) {
/* Nothing to do */
}
PRE_SYSCALL(timer_delete)(long long timerid_) { /* Nothing to do */ }
POST_SYSCALL(timer_delete)(long long res, long long timerid_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_50_timer_settime)
(long long timerid_, long long flags_, void *value_, void *ovalue_) {
/* TODO */
}
POST_SYSCALL(compat_50_timer_settime)
(long long res, long long timerid_, long long flags_, void *value_,
void *ovalue_) {
/* TODO */
}
PRE_SYSCALL(compat_50_timer_gettime)(long long timerid_, void *value_) {
/* TODO */
}
POST_SYSCALL(compat_50_timer_gettime)
(long long res, long long timerid_, void *value_) {
/* TODO */
}
PRE_SYSCALL(timer_getoverrun)(long long timerid_) { /* Nothing to do */ }
POST_SYSCALL(timer_getoverrun)(long long res, long long timerid_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_50_nanosleep)(void *rqtp_, void *rmtp_) { /* TODO */ }
POST_SYSCALL(compat_50_nanosleep)(long long res, void *rqtp_, void *rmtp_) {
/* TODO */
}
PRE_SYSCALL(fdatasync)(long long fd_) { /* Nothing to do */ }
POST_SYSCALL(fdatasync)(long long res, long long fd_) { /* Nothing to do */ }
PRE_SYSCALL(mlockall)(long long flags_) { /* Nothing to do */ }
POST_SYSCALL(mlockall)(long long res, long long flags_) { /* Nothing to do */ }
PRE_SYSCALL(munlockall)(void) { /* Nothing to do */ }
POST_SYSCALL(munlockall)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(compat_50___sigtimedwait)(void *set_, void *info_, void *timeout_) {
/* TODO */
}
POST_SYSCALL(compat_50___sigtimedwait)
(long long res, void *set_, void *info_, void *timeout_) {
/* TODO */
}
PRE_SYSCALL(sigqueueinfo)(long long pid_, void *info_) {
if (info_) {
PRE_READ(info_, siginfo_t_sz);
}
}
POST_SYSCALL(sigqueueinfo)(long long res, long long pid_, void *info_) {}
PRE_SYSCALL(modctl)(long long cmd_, void *arg_) { /* TODO */ }
POST_SYSCALL(modctl)(long long res, long long cmd_, void *arg_) { /* TODO */ }
PRE_SYSCALL(_ksem_init)(long long value_, void *idp_) { /* Nothing to do */ }
POST_SYSCALL(_ksem_init)(long long res, long long value_, void *idp_) {
/* Nothing to do */
}
PRE_SYSCALL(_ksem_open)
(void *name_, long long oflag_, long long mode_, long long value_, void *idp_) {
const char *name = (const char *)name_;
if (name) {
PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
POST_SYSCALL(_ksem_open)
(long long res, void *name_, long long oflag_, long long mode_,
long long value_, void *idp_) {
const char *name = (const char *)name_;
if (name) {
POST_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
PRE_SYSCALL(_ksem_unlink)(void *name_) {
const char *name = (const char *)name_;
if (name) {
PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
POST_SYSCALL(_ksem_unlink)(long long res, void *name_) {
const char *name = (const char *)name_;
if (name) {
POST_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
PRE_SYSCALL(_ksem_close)(long long id_) { /* Nothing to do */ }
POST_SYSCALL(_ksem_close)(long long res, long long id_) { /* Nothing to do */ }
PRE_SYSCALL(_ksem_post)(long long id_) { /* Nothing to do */ }
POST_SYSCALL(_ksem_post)(long long res, long long id_) { /* Nothing to do */ }
PRE_SYSCALL(_ksem_wait)(long long id_) { /* Nothing to do */ }
POST_SYSCALL(_ksem_wait)(long long res, long long id_) { /* Nothing to do */ }
PRE_SYSCALL(_ksem_trywait)(long long id_) { /* Nothing to do */ }
POST_SYSCALL(_ksem_trywait)(long long res, long long id_) {
/* Nothing to do */
}
PRE_SYSCALL(_ksem_getvalue)(long long id_, void *value_) { /* Nothing to do */ }
POST_SYSCALL(_ksem_getvalue)(long long res, long long id_, void *value_) {
/* Nothing to do */
}
PRE_SYSCALL(_ksem_destroy)(long long id_) { /* Nothing to do */ }
POST_SYSCALL(_ksem_destroy)(long long res, long long id_) {
/* Nothing to do */
}
PRE_SYSCALL(_ksem_timedwait)(long long id_, void *abstime_) {
if (abstime_) {
PRE_READ(abstime_, struct_timespec_sz);
}
}
POST_SYSCALL(_ksem_timedwait)(long long res, long long id_, void *abstime_) {}
PRE_SYSCALL(mq_open)
(void *name_, long long oflag_, long long mode_, void *attr_) {
const char *name = (const char *)name_;
if (name) {
PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
POST_SYSCALL(mq_open)
(long long res, void *name_, long long oflag_, long long mode_, void *attr_) {
const char *name = (const char *)name_;
if (name) {
POST_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
PRE_SYSCALL(mq_close)(long long mqdes_) { /* Nothing to do */ }
POST_SYSCALL(mq_close)(long long res, long long mqdes_) { /* Nothing to do */ }
PRE_SYSCALL(mq_unlink)(void *name_) {
const char *name = (const char *)name_;
if (name) {
PRE_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
POST_SYSCALL(mq_unlink)(long long res, void *name_) {
const char *name = (const char *)name_;
if (name) {
POST_READ(name, __sanitizer::internal_strlen(name) + 1);
}
}
PRE_SYSCALL(mq_getattr)(long long mqdes_, void *mqstat_) { /* Nothing to do */ }
POST_SYSCALL(mq_getattr)(long long res, long long mqdes_, void *mqstat_) {
/* Nothing to do */
}
PRE_SYSCALL(mq_setattr)(long long mqdes_, void *mqstat_, void *omqstat_) {
if (mqstat_) {
PRE_READ(mqstat_, struct_mq_attr_sz);
}
}
POST_SYSCALL(mq_setattr)
(long long res, long long mqdes_, void *mqstat_, void *omqstat_) {}
PRE_SYSCALL(mq_notify)(long long mqdes_, void *notification_) {
if (notification_) {
PRE_READ(notification_, struct_sigevent_sz);
}
}
POST_SYSCALL(mq_notify)(long long res, long long mqdes_, void *notification_) {}
PRE_SYSCALL(mq_send)
(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_) {
if (msg_ptr_) {
PRE_READ(msg_ptr_, msg_len_);
}
}
POST_SYSCALL(mq_send)
(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
long long msg_prio_) {}
PRE_SYSCALL(mq_receive)
(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_) {
/* Nothing to do */
}
POST_SYSCALL(mq_receive)
(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
void *msg_prio_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_50_mq_timedsend)
(long long mqdes_, void *msg_ptr_, long long msg_len_, long long msg_prio_,
void *abs_timeout_) {
/* TODO */
}
POST_SYSCALL(compat_50_mq_timedsend)
(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
long long msg_prio_, void *abs_timeout_) {
/* TODO */
}
PRE_SYSCALL(compat_50_mq_timedreceive)
(long long mqdes_, void *msg_ptr_, long long msg_len_, void *msg_prio_,
void *abs_timeout_) {
/* TODO */
}
POST_SYSCALL(compat_50_mq_timedreceive)
(long long res, long long mqdes_, void *msg_ptr_, long long msg_len_,
void *msg_prio_, void *abs_timeout_) {
/* TODO */
}
/* syscall 267 has been skipped */
/* syscall 268 has been skipped */
/* syscall 269 has been skipped */
PRE_SYSCALL(__posix_rename)(void *from_, void *to_) {
const char *from = (const char *)from_;
const char *to = (const char *)to_;
if (from_) {
PRE_READ(from, __sanitizer::internal_strlen(from) + 1);
}
if (to) {
PRE_READ(to, __sanitizer::internal_strlen(to) + 1);
}
}
POST_SYSCALL(__posix_rename)(long long res, void *from_, void *to_) {
const char *from = (const char *)from_;
const char *to = (const char *)to_;
if (from) {
POST_READ(from, __sanitizer::internal_strlen(from) + 1);
}
if (to) {
POST_READ(to, __sanitizer::internal_strlen(to) + 1);
}
}
PRE_SYSCALL(swapctl)(long long cmd_, void *arg_, long long misc_) { /* TODO */ }
POST_SYSCALL(swapctl)
(long long res, long long cmd_, void *arg_, long long misc_) {
/* TODO */
}
PRE_SYSCALL(compat_30_getdents)(long long fd_, void *buf_, long long count_) {
/* TODO */
}
POST_SYSCALL(compat_30_getdents)
(long long res, long long fd_, void *buf_, long long count_) {
/* TODO */
}
PRE_SYSCALL(minherit)(void *addr_, long long len_, long long inherit_) {
/* Nothing to do */
}
POST_SYSCALL(minherit)
(long long res, void *addr_, long long len_, long long inherit_) {
/* Nothing to do */
}
PRE_SYSCALL(lchmod)(void *path_, long long mode_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(lchmod)(long long res, void *path_, long long mode_) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
PRE_SYSCALL(lchown)(void *path_, long long uid_, long long gid_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(lchown)
(long long res, void *path_, long long uid_, long long gid_) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
PRE_SYSCALL(compat_50_lutimes)(void *path_, void *tptr_) { /* TODO */ }
POST_SYSCALL(compat_50_lutimes)(long long res, void *path_, void *tptr_) {
/* TODO */
}
PRE_SYSCALL(__msync13)(void *addr_, long long len_, long long flags_) {
/* Nothing to do */
}
POST_SYSCALL(__msync13)
(long long res, void *addr_, long long len_, long long flags_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_30___stat13)(void *path_, void *ub_) { /* TODO */ }
POST_SYSCALL(compat_30___stat13)(long long res, void *path_, void *ub_) {
/* TODO */
}
PRE_SYSCALL(compat_30___fstat13)(long long fd_, void *sb_) { /* TODO */ }
POST_SYSCALL(compat_30___fstat13)(long long res, long long fd_, void *sb_) {
/* TODO */
}
PRE_SYSCALL(compat_30___lstat13)(void *path_, void *ub_) { /* TODO */ }
POST_SYSCALL(compat_30___lstat13)(long long res, void *path_, void *ub_) {
/* TODO */
}
PRE_SYSCALL(__sigaltstack14)(void *nss_, void *oss_) {
if (nss_) {
PRE_READ(nss_, struct_sigaltstack_sz);
}
if (oss_) {
PRE_READ(oss_, struct_sigaltstack_sz);
}
}
POST_SYSCALL(__sigaltstack14)(long long res, void *nss_, void *oss_) {}
PRE_SYSCALL(__vfork14)(void) { /* Nothing to do */ }
POST_SYSCALL(__vfork14)(long long res) { /* Nothing to do */ }
PRE_SYSCALL(__posix_chown)(void *path_, long long uid_, long long gid_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(__posix_chown)
(long long res, void *path_, long long uid_, long long gid_) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
PRE_SYSCALL(__posix_fchown)(long long fd_, long long uid_, long long gid_) {
/* Nothing to do */
}
POST_SYSCALL(__posix_fchown)
(long long res, long long fd_, long long uid_, long long gid_) {
/* Nothing to do */
}
PRE_SYSCALL(__posix_lchown)(void *path_, long long uid_, long long gid_) {
const char *path = (const char *)path_;
if (path) {
PRE_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
POST_SYSCALL(__posix_lchown)
(long long res, void *path_, long long uid_, long long gid_) {
const char *path = (const char *)path_;
if (path) {
POST_READ(path, __sanitizer::internal_strlen(path) + 1);
}
}
PRE_SYSCALL(getsid)(long long pid_) { /* Nothing to do */ }
POST_SYSCALL(getsid)(long long res, long long pid_) { /* Nothing to do */ }
PRE_SYSCALL(__clone)(long long flags_, void *stack_) { /* Nothing to do */ }
POST_SYSCALL(__clone)(long long res, long long flags_, void *stack_) {
/* Nothing to do */
}
PRE_SYSCALL(fktrace)
(long long fd_, long long ops_, long long facs_, long long pid_) {
/* Nothing to do */
}
POST_SYSCALL(fktrace)
(long long res, long long fd_, long long ops_, long long facs_,
long long pid_) {
/* Nothing to do */
}
PRE_SYSCALL(preadv)
(long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
long long offset_) {
/* Nothing to do */
}
POST_SYSCALL(preadv)
(long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
long long offset_) {
/* Nothing to do */
}
PRE_SYSCALL(pwritev)
(long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
long long offset_) {
/* Nothing to do */
}
POST_SYSCALL(pwritev)
(long long res, long long fd_, void *iovp_, long long iovcnt_, long long PAD_,
long long offset_) {
/* Nothing to do */
}
PRE_SYSCALL(compat_16___sigaction14)
(long long signum_, void *nsa_, void *osa_) {
/* TODO */
}
POST_SYSCALL(compat_16___sigaction14)
(long long res, long long signum_, void *nsa_, void *osa_) {
/* TODO *