aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/host
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-08-30 21:10:38 -0700
committerDmitry Vyukov <dvyukov@google.com>2018-08-30 21:45:04 -0700
commita4718693a3d9fcabb02299b2ec07c19d8208c539 (patch)
tree4646830d734816c5d6ab7bd5f71338ce3f9b1b54 /pkg/host
parent4239b99abbcccac9104facbf2b040a5af4ffe1b1 (diff)
sys/linux: add syz_execute_func
The function executes random code. Update #310
Diffstat (limited to 'pkg/host')
-rw-r--r--pkg/host/host.go8
-rw-r--r--pkg/host/host_linux.go2
2 files changed, 9 insertions, 1 deletions
diff --git a/pkg/host/host.go b/pkg/host/host.go
index 6394dd4a0..d048b2ade 100644
--- a/pkg/host/host.go
+++ b/pkg/host/host.go
@@ -21,7 +21,13 @@ func DetectSupportedSyscalls(target *prog.Target, sandbox string) (
return supported, unsupported, nil
}
for _, c := range target.Syscalls {
- ok, reason := isSupported(c, sandbox)
+ ok, reason := false, ""
+ switch c.CallName {
+ case "syz_execute_func":
+ ok = true
+ default:
+ ok, reason = isSupported(c, sandbox)
+ }
if ok {
supported[c] = true
} else {
diff --git a/pkg/host/host_linux.go b/pkg/host/host_linux.go
index dd3e146c4..3386113ee 100644
--- a/pkg/host/host_linux.go
+++ b/pkg/host/host_linux.go
@@ -205,6 +205,8 @@ func isSupportedSyzkall(sandbox string, c *prog.Syscall) (bool, string) {
return isSupportedFilesystem(fstype)
case "syz_read_part_table":
return onlySandboxNone(sandbox)
+ case "syz_execute_func":
+ return true, ""
}
panic("unknown syzkall: " + c.Name)
}