From f635b41d90ee4c01636d9b7f67091aa2ce2c2f20 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 12 Jan 2022 13:54:32 +0000 Subject: 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. --- sys/targets/targets.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys') 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 } -- cgit mrf-deployment