@@ -35,25 +35,26 @@ import (
3535)
3636
3737var (
38- flagOS = flag .String ("os" , runtime .GOOS , "target os" )
39- flagArch = flag .String ("arch" , runtime .GOARCH , "target arch" )
40- flagType = flag .String ("type" , "" , "target VM type" )
41- flagCoverFile = flag .String ("coverfile" , "" , "write coverage to the file" )
42- flagRepeat = flag .Int ("repeat" , 1 , "repeat execution that many times (0 for infinite loop)" )
43- flagProcs = flag .Int ("procs" , 2 * runtime .NumCPU (), "number of parallel processes to execute programs" )
44- flagOutput = flag .Bool ("output" , false , "write programs and results to stdout" )
45- flagHints = flag .Bool ("hints" , false , "do a hints-generation run" )
46- flagEnable = flag .String ("enable" , "none" , "enable only listed additional features" )
47- flagDisable = flag .String ("disable" , "none" , "enable all additional features except listed" )
48- flagExecutor = flag .String ("executor" , "./syz-executor" , "path to executor binary" )
49- flagThreaded = flag .Bool ("threaded" , true , "use threaded mode in executor" )
50- flagSignal = flag .Bool ("cover" , false , "collect feedback signals (coverage)" )
51- flagSandbox = flag .String ("sandbox" , "none" , "sandbox for fuzzing (none/setuid/namespace/android)" )
52- flagSandboxArg = flag .Int ("sandbox_arg" , 0 , "argument for sandbox runner to adjust it via config" )
53- flagDebug = flag .Bool ("debug" , false , "debug output from executor" )
54- flagSlowdown = flag .Int ("slowdown" , 1 , "execution slowdown caused by emulation/instrumentation" )
55- flagUnsafe = flag .Bool ("unsafe" , false , "use unsafe program deserialization mode" )
56- flagGlob = flag .String ("glob" , "" , "run glob expansion request" )
38+ flagOS = flag .String ("os" , runtime .GOOS , "target os" )
39+ flagArch = flag .String ("arch" , runtime .GOARCH , "target arch" )
40+ flagType = flag .String ("type" , "" , "target VM type" )
41+ flagCoverFile = flag .String ("coverfile" , "" , "write coverage to the file" )
42+ flagRepeat = flag .Int ("repeat" , 1 , "repeat execution that many times (0 for infinite loop)" )
43+ flagProcs = flag .Int ("procs" , 2 * runtime .NumCPU (), "number of parallel processes to execute programs" )
44+ flagOutput = flag .Bool ("output" , false , "write programs and results to stdout" )
45+ flagHints = flag .Bool ("hints" , false , "do a hints-generation run" )
46+ flagEnable = flag .String ("enable" , "none" , "enable only listed additional features" )
47+ flagDisable = flag .String ("disable" , "none" , "enable all additional features except listed" )
48+ flagExecutor = flag .String ("executor" , "./syz-executor" , "path to executor binary" )
49+ flagThreaded = flag .Bool ("threaded" , true , "use threaded mode in executor" )
50+ flagSignal = flag .Bool ("cover" , false , "collect feedback signals (coverage)" )
51+ flagSandbox = flag .String ("sandbox" , "none" , "sandbox for fuzzing (none/setuid/namespace/android)" )
52+ flagSandboxArg = flag .Int ("sandbox_arg" , 0 , "argument for sandbox runner to adjust it via config" )
53+ flagDebug = flag .Bool ("debug" , false , "debug output from executor" )
54+ flagSlowdown = flag .Int ("slowdown" , 1 , "execution slowdown caused by emulation/instrumentation" )
55+ flagUnsafe = flag .Bool ("unsafe" , false , "use unsafe program deserialization mode" )
56+ flagGlob = flag .String ("glob" , "" , "run glob expansion request" )
57+ flagRestartFreq = flag .Int ("restart_freq" , 0 , "restart procs every X executions" )
5758
5859 // The in the stress mode resembles simple unguided fuzzer.
5960 // This mode can be used as an intermediate step when porting syzkaller to a new OS,
@@ -175,8 +176,9 @@ func main() {
175176 Sandbox : sandbox ,
176177 SandboxArg : int64 (* flagSandboxArg ),
177178 },
178- Procs : * flagProcs ,
179- Slowdown : * flagSlowdown ,
179+ Procs : * flagProcs ,
180+ Slowdown : * flagSlowdown ,
181+ ProcRestartFreq : * flagRestartFreq ,
180182 },
181183 Executor : * flagExecutor ,
182184 HandleInterrupts : true ,
0 commit comments