diff options
| author | Andrey Artemiev <artemiev@google.com> | 2022-08-06 05:17:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-06 14:17:33 +0200 |
| commit | 88e3a1226bc591d81c1fb98e83cb63cd4f341c6e (patch) | |
| tree | 323b7fa492a8d9698e432c1d3bd4514771fc3252 /pkg/ipc/ipcconfig | |
| parent | e853abd9a2542fcccb8e1a23eb8ae475500ecaf9 (diff) | |
pkg/csource, pkg/instance, pkg/ipc, pkg/mgrconfig, tools/syz-prog2c, syz-manager: introduce a new setting 'sandbox_arg' (#3263)
Diffstat (limited to 'pkg/ipc/ipcconfig')
| -rw-r--r-- | pkg/ipc/ipcconfig/ipcconfig.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pkg/ipc/ipcconfig/ipcconfig.go b/pkg/ipc/ipcconfig/ipcconfig.go index 5be4d4b39..15e1dfde0 100644 --- a/pkg/ipc/ipcconfig/ipcconfig.go +++ b/pkg/ipc/ipcconfig/ipcconfig.go @@ -12,12 +12,13 @@ import ( ) var ( - flagExecutor = flag.String("executor", "./syz-executor", "path to executor binary") - flagThreaded = flag.Bool("threaded", true, "use threaded mode in executor") - flagSignal = flag.Bool("cover", false, "collect feedback signals (coverage)") - flagSandbox = flag.String("sandbox", "none", "sandbox for fuzzing (none/setuid/namespace/android)") - flagDebug = flag.Bool("debug", false, "debug output from executor") - flagSlowdown = flag.Int("slowdown", 1, "execution slowdown caused by emulation/instrumentation") + flagExecutor = flag.String("executor", "./syz-executor", "path to executor binary") + flagThreaded = flag.Bool("threaded", true, "use threaded mode in executor") + flagSignal = flag.Bool("cover", false, "collect feedback signals (coverage)") + flagSandbox = flag.String("sandbox", "none", "sandbox for fuzzing (none/setuid/namespace/android)") + flagSandboxArg = flag.Int("sandbox_arg", 0, "argument for sandbox runner to adjust it via config") + flagDebug = flag.Bool("debug", false, "debug output from executor") + flagSlowdown = flag.Int("slowdown", 1, "execution slowdown caused by emulation/instrumentation") ) func Default(target *prog.Target) (*ipc.Config, *ipc.ExecOpts, error) { @@ -36,6 +37,7 @@ func Default(target *prog.Target) (*ipc.Config, *ipc.ExecOpts, error) { if err != nil { return nil, nil, err } + c.SandboxArg = *flagSandboxArg c.Flags |= sandboxFlags c.UseShmem = sysTarget.ExecutorUsesShmem c.UseForkServer = sysTarget.ExecutorUsesForkServer |
