diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-07-13 10:40:03 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-07-15 09:26:23 +0200 |
| commit | e2f6c0c1b57a838c4c17cb3a2e07c6fbda41a7c6 (patch) | |
| tree | a225d582b84de4f96ab663fe826316b3af868591 /pkg/host/syscalls.go | |
| parent | f3bec699b60e09e7428029b500ac2ef9b6fde4d1 (diff) | |
sys/targets: don't use HostFuzzer mode for test OS
We set HostFuzzer for all test targets b/c in some contexts
they needed the same special behavior as real HostFuzzer targets
(e.g no checking enabled syscalls).
However, in some other contexts they don't the same special
behavior as real HostFuzzer targets. For example, pkg/ipc
does rate limiting for HostFuzzer and pkg/runtest don't run
C tests for HostFuzzer.
Add special case for test targets in pkg/host,
and don't set HostFuzzer for all test targets
(keep it for one target for better coverage).
Diffstat (limited to 'pkg/host/syscalls.go')
| -rw-r--r-- | pkg/host/syscalls.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/host/syscalls.go b/pkg/host/syscalls.go index e322fc3b1..2abd3f16b 100644 --- a/pkg/host/syscalls.go +++ b/pkg/host/syscalls.go @@ -6,7 +6,6 @@ package host import ( "github.com/google/syzkaller/pkg/log" "github.com/google/syzkaller/prog" - "github.com/google/syzkaller/sys/targets" ) // DetectSupportedSyscalls returns list on supported and unsupported syscalls on the host. @@ -18,7 +17,7 @@ func DetectSupportedSyscalls(target *prog.Target, sandbox string) ( unsupported := make(map[*prog.Syscall]string) const disabledAttribute = "has disabled attribute in descriptions" // These do not have own host and parasitize on some other OS. - if targets.Get(target.OS, target.Arch).HostFuzzer { + if noHostChecks(target) { for _, c := range target.Syscalls { if c.Attrs.Disabled { unsupported[c] = disabledAttribute |
