aboutsummaryrefslogtreecommitdiffstats
path: root/docs/pseudo_syscalls.md
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-15 20:56:55 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-16 12:29:42 +0200
commitb090c64363768b1fc574b98a8d42a3dd5f7af3e9 (patch)
tree6af62d0d88f8b1e2b883a60296a94fbfe9cf6eb1 /docs/pseudo_syscalls.md
parent5395640c2ffd1900bce5484e9d1e8c70dd2328f8 (diff)
docs: add a note re pseudo-syscall dependencies
Diffstat (limited to 'docs/pseudo_syscalls.md')
-rw-r--r--docs/pseudo_syscalls.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/pseudo_syscalls.md b/docs/pseudo_syscalls.md
index 3388f0f09..0fb991806 100644
--- a/docs/pseudo_syscalls.md
+++ b/docs/pseudo_syscalls.md
@@ -72,6 +72,20 @@ are violated (e.g. passing `NULL` to a `non-NULL` argument, or passing
`-1` as file descriptor) and produce errors/warnings. `volatile` prevents
that.
+The implementation must not use any external libraries nor external headers,
+except for the most basic and standard ones (like `<unistd.h>` and
+`<sys/mman.h>`). In particular, it must not depend on libraries/headers
+installed by additional packages nor on headers for recently added kernel
+subsystems. External dependencies have proved to be brittle and easily cause
+build breakage because all dependencies will be required for any build/run on
+the fuzzer and any C reproducer. For example, packages/headers may be missing
+on some distros, named differently, be of a wrong version, broken, or conflict
+with other headers. Unfortunately, there is no way to reliably specify such
+dependencies and requirements for C programs. Therefore, if the pseudo-syscall
+requires definitions of some structures, constants, or helper functions, these
+should be described in the executor code itself as minimally as possible (they
+will be part of C reproducers).
+
Now, to handle the pseudo-syscall properly we have to update the
`isSupportedSyzkall` in
[syscalls_linux.go](../pkg/host/syscalls_linux.go) and add a particular