From 88e3a1226bc591d81c1fb98e83cb63cd4f341c6e Mon Sep 17 00:00:00 2001 From: Andrey Artemiev Date: Sat, 6 Aug 2022 05:17:33 -0700 Subject: pkg/csource, pkg/instance, pkg/ipc, pkg/mgrconfig, tools/syz-prog2c, syz-manager: introduce a new setting 'sandbox_arg' (#3263) --- pkg/ipc/ipcconfig/ipcconfig.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'pkg/ipc/ipcconfig') 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 -- cgit mrf-deployment