aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host/syscalls.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/host/syscalls.go')
-rw-r--r--pkg/host/syscalls.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/pkg/host/syscalls.go b/pkg/host/syscalls.go
deleted file mode 100644
index 3068cec2b..000000000
--- a/pkg/host/syscalls.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2018 syzkaller project authors. All rights reserved.
-// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-
-package host
-
-import (
- "github.com/google/syzkaller/pkg/log"
- "github.com/google/syzkaller/prog"
-)
-
-// DetectSupportedSyscalls returns list on supported and unsupported syscalls on the host.
-// For unsupported syscalls it also returns reason as to why it is unsupported.
-func DetectSupportedSyscalls(target *prog.Target, sandbox string, enabled map[*prog.Syscall]bool) (
- map[*prog.Syscall]bool, map[*prog.Syscall]string, error) {
- log.Logf(1, "detecting supported syscalls")
- supported := make(map[*prog.Syscall]bool)
- unsupported := make(map[*prog.Syscall]string)
- // These do not have own host and parasitize on some other OS.
- if noHostChecks(target) {
- for _, c := range target.Syscalls {
- if c.Attrs.Disabled || !enabled[c] {
- continue
- }
- supported[c] = true
- }
- } else {
- for _, c := range target.Syscalls {
- if c.Attrs.Disabled || !enabled[c] {
- continue
- }
- ok, reason := isSupported(c, target, sandbox)
- if ok {
- supported[c] = true
- } else {
- if reason == "" {
- reason = "unknown"
- }
- unsupported[c] = reason
- }
- }
- }
- return supported, unsupported, nil
-}
-
-var testFallback = false