aboutsummaryrefslogtreecommitdiffstats
path: root/sys/targets
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-01-12 13:54:32 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-01-13 17:03:14 +0100
commitf635b41d90ee4c01636d9b7f67091aa2ce2c2f20 (patch)
tree51a479e96f86fa7b3cca4aff90f9067da6182b33 /sys/targets
parent40c93acdacf984554ac152f1b7f06ba400fde8b0 (diff)
all: explicitly list pseudo syscall dependencies
Pseudo syscalls can (and most of the time) do invoke normal system calls. However, when there's a risk that those calls might not be present, syzkaller needs to take preventive actions - prepend the corresponding defines. Otherwise syz-executor or C reproducers might not compile on the host machine. List those dependencies in sys/targets, check them during machine check and add the corresponding defines during C source generation.
Diffstat (limited to 'sys/targets')
-rw-r--r--sys/targets/targets.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index 65b258ccb..a5946cf16 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -76,6 +76,9 @@ type osCommon struct {
KernelObject string
// Name of cpp(1) executable.
CPP string
+ // Syscalls on which pseudo syscalls depend. Syzkaller will make sure that __NR* or SYS* definitions
+ // for those syscalls are enabled.
+ PseudoSyscallDeps map[string][]string
// Common CFLAGS for this OS.
cflags []string
}