diff options
| author | Mark Johnston <markjdb@gmail.com> | 2019-03-06 20:29:33 -0500 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-07 19:46:55 +0100 |
| commit | 4fc2fa55acc12f9e82084e52521380b84be9a08b (patch) | |
| tree | 237a9aff39c7bcf107ddc9949f3d6dca51fa731d /sys/freebsd/sys.txt | |
| parent | c08c1cd05c3c8e0cf6b24a0425f058c6555b82cc (diff) | |
sys/freebsd: avoid mangling syscall names
syz-extract was removing certain prefixes from syscall names, but this
caused some problems:
- freebsd* prefixes are for compatibility syscalls when the syscall ABI
has changed. For instance, we have both fstat() and
freebsd11_fstat(), and it is desirable to fuzz them both.
- Stripping prefixes may leave us with undefined SYS_ constants. This
resulted in some test failures in pkg/csource, which emitted code
referencing SYS_semctl when it should have been SYS___semctl.
Fix the problem by updating syscall descriptions to match the names
given by the FreeBSD kernel. Add some new descriptions for
compatibility syscalls, fix the mknodat() description (dev_t is now 64
bits wide on FreeBSD), and remove mknod$loop, which appears to be
Linux-specific.
Diffstat (limited to 'sys/freebsd/sys.txt')
| -rw-r--r-- | sys/freebsd/sys.txt | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/freebsd/sys.txt b/sys/freebsd/sys.txt index 985236ad3..65e3951f1 100644 --- a/sys/freebsd/sys.txt +++ b/sys/freebsd/sys.txt @@ -19,13 +19,8 @@ include <sys/wait.h> syz_execute_func(text ptr[in, text[target]]) -pipe(pipefd ptr[out, pipefd]) - sendfile(fdout fd, fdin fd, off ptr[inout, fileoff[int64], opt], count int64) -stat(file ptr[in, filename], statbuf ptr[out, stat]) -lstat(file ptr[in, filename], statbuf ptr[out, stat]) - poll(fds ptr[in, array[pollfd]], nfds len[fds], timeout int32) ppoll(fds ptr[in, array[pollfd]], nfds len[fds], tsp ptr[in, timespec], sigmask ptr[in, sigset], size len[sigmask]) select(n len[inp], inp ptr[inout, fd_set], outp ptr[inout, fd_set], exp ptr[inout, fd_set], tvp ptr[inout, timeval]) @@ -40,9 +35,9 @@ fcntl$lock(fd fd, cmd flags[fcntl_lock], lock ptr[in, flock]) fcntl$getown(fd fd, cmd const[F_GETOWN]) pid fcntl$setown(fd fd, cmd const[F_SETOWN], pid pid) -mknod(file ptr[in, filename], mode flags[mknod_mode], dev int32) -mknod$loop(file ptr[in, filename], mode flags[mknod_mode], dev proc[1792, 2]) -mknodat(dirfd fd_dir, file ptr[in, filename], mode flags[mknod_mode], dev int32) +mknodat(dirfd fd_dir, file ptr[in, filename], mode flags[mknod_mode], dev int64) +freebsd11_mknod(file ptr[in, filename], mod flags[mknod_mode], dev int32) +freebsd11_mknodat(dirfd fd_dir, file ptr[in, filename], mod flags[mknod_mode], dev int32) chmod(file ptr[in, filename], mode flags[open_mode]) fchmod(fd fd, mode flags[open_mode]) fchmodat(dirfd fd_dir, file ptr[in, filename], mode flags[open_mode]) @@ -95,9 +90,9 @@ flock(fd fd, op flags[flock_op]) fsync(fd fd) fdatasync(fd fd) sync() -getdents(fd fd_dir, ent buffer[out], count len[ent]) +freebsd11_getdents(fd fd_dir, ent buffer[out], count len[ent]) chroot(dir ptr[in, filename]) -getcwd(buf buffer[out], size len[buf]) +__getcwd(buf buffer[out], size len[buf]) chdir(dir ptr[in, filename]) fchdir(fd fd) |
