aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/mgrconfig
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/mgrconfig')
-rw-r--r--pkg/mgrconfig/config.go9
-rw-r--r--pkg/mgrconfig/load.go20
2 files changed, 26 insertions, 3 deletions
diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go
index 1e499412a..a02c00c67 100644
--- a/pkg/mgrconfig/config.go
+++ b/pkg/mgrconfig/config.go
@@ -191,6 +191,15 @@ type Config struct {
// If set, for each reproducer syzkaller will run it once more under strace and save
// the output.
StraceBin string `json:"strace_bin"`
+ // If true, syzkaller will expect strace_bin to be part of the target
+ // image instead of copying it from the host (default: false).
+ StraceBinOnTarget bool `json:"strace_bin_on_target"`
+
+ // File in PATH to syz-execprog/executor on the target. If set,
+ // syzkaller will expect the execprog/executor binaries to be part of
+ // the target image instead of copying them from the host.
+ ExecprogBinOnTarget string `json:"execprog_bin_on_target"`
+ ExecutorBinOnTarget string `json:"executor_bin_on_target"`
// Whether to run fsck commands on file system images found in new crash
// reproducers. The fsck logs get reported as assets in the dashboard.
diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go
index ccaebba74..602cf4ec8 100644
--- a/pkg/mgrconfig/load.go
+++ b/pkg/mgrconfig/load.go
@@ -308,17 +308,31 @@ func (cfg *Config) completeBinaries() error {
}
cfg.ExecprogBin = targetBin("syz-execprog", cfg.TargetVMArch)
cfg.ExecutorBin = targetBin("syz-executor", cfg.TargetArch)
- // If the target already provides an executor binary, we don't need to copy it.
+
+ if cfg.ExecprogBinOnTarget != "" {
+ cfg.SysTarget.ExecprogBin = cfg.ExecprogBinOnTarget
+ }
+ if cfg.ExecutorBinOnTarget != "" {
+ cfg.SysTarget.ExecutorBin = cfg.ExecutorBinOnTarget
+ }
+ if cfg.StraceBinOnTarget && cfg.StraceBin == "" {
+ cfg.StraceBin = "strace"
+ }
+
+ // If the target already provides binaries, we don't need to copy them.
+ if cfg.SysTarget.ExecprogBin != "" {
+ cfg.ExecprogBin = ""
+ }
if cfg.SysTarget.ExecutorBin != "" {
cfg.ExecutorBin = ""
}
- if !osutil.IsExist(cfg.ExecprogBin) {
+ if cfg.ExecprogBin != "" && !osutil.IsExist(cfg.ExecprogBin) {
return fmt.Errorf("bad config syzkaller param: can't find %v", cfg.ExecprogBin)
}
if cfg.ExecutorBin != "" && !osutil.IsExist(cfg.ExecutorBin) {
return fmt.Errorf("bad config syzkaller param: can't find %v", cfg.ExecutorBin)
}
- if cfg.StraceBin != "" {
+ if !cfg.StraceBinOnTarget && cfg.StraceBin != "" {
if !osutil.IsExist(cfg.StraceBin) {
return fmt.Errorf("bad config param strace_bin: can't find %v", cfg.StraceBin)
}