aboutsummaryrefslogtreecommitdiffstats
path: root/docs/pseudo_syscalls.md
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-03 10:16:58 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-05-15 12:55:36 +0000
commit0b3dad4606c0984ce2d81ba5dd698fa248ce91b8 (patch)
treed732c2d7c4096a3a3223529088725c1adb54e3e0 /docs/pseudo_syscalls.md
parent94b087b1f1dce14942bc35bb35a8f58e57b1fc63 (diff)
pkg/vminfo: move feature checking to host
Feature checking procedure is split into 2 phases: 1. syz-fuzzer invokes "syz-executor setup feature" for each feature one-by-one, and checks if executor does not fail. Executor can also return a special "this feature does not need custom setup", this allows to not call setup of these features in each new VM. 2. pkg/vminfo runs a simple program with ipc.ExecOpts specific for a concrete feature, e.g. for wifi injection it will try to run a program with wifi feature enabled, if setup of the feature fails, executor should also exit with an error. For coverage features we also additionally check that we actually got coverage. Then pkg/vminfo combines results of these 2 checks into final result. syz-execprog now also uses vminfo package and mimics the same checking procedure. Update #1541
Diffstat (limited to 'docs/pseudo_syscalls.md')
-rw-r--r--docs/pseudo_syscalls.md13
1 files changed, 3 insertions, 10 deletions
diff --git a/docs/pseudo_syscalls.md b/docs/pseudo_syscalls.md
index cb899e6fc..fc36f85f9 100644
--- a/docs/pseudo_syscalls.md
+++ b/docs/pseudo_syscalls.md
@@ -56,17 +56,10 @@ are violated (e.g. passing `NULL` to a `non-NULL` argument, or passing
that.
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
+`linuxSyscallChecks` in
+[linux_syscalls.go](../pkg/vminfo/linux_syscalls.go) and add a particular
case for this syscall, enabling it when necessary. If we want to enable
-it unconditionally we can simply make `isSupportedSyzkall` return `true,
-""` for it:
-
- func isSupportedSyzkall(sandbox string, c *prog.Syscall) (bool, string) {
- switch c.CallName {
- ...
- case "syz_mycall":
- return true, ""
+it unconditionally we can simply use `alwaysSupported` for it.
Finally, run `make generate`. Now you can use it in a syscall
description file as if it was a regular system call: