aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/mgrconfig
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-01-31 17:33:20 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-02-04 16:42:39 +0100
commit5b157182f8287432dc2380471292574e6401378c (patch)
tree7c04456fcf44ba57dcab099d9215ca7e4711198e /pkg/mgrconfig
parenta3e470b2eedfddafc8b57ecd6999561f8d3644bb (diff)
syz-manager: add preserve_progs config
Introduce a presere_progs parameter, which, if set to false, forces syz-manager to purge unneeded programs from the corpus.
Diffstat (limited to 'pkg/mgrconfig')
-rw-r--r--pkg/mgrconfig/config.go5
-rw-r--r--pkg/mgrconfig/load.go15
2 files changed, 13 insertions, 7 deletions
diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go
index 7384b75c5..5d4a9f8f5 100644
--- a/pkg/mgrconfig/config.go
+++ b/pkg/mgrconfig/config.go
@@ -141,6 +141,11 @@ type Config struct {
// By default the value is 0, i.e. all VMs can be used for all purposes.
FuzzingVMs int `json:"fuzzing_vms,omitempty"`
+ // Keep existing programs in the corpus even if they no longer pass syscall filters.
+ // By default it is true, as this is the desired behavior when executing syzkaller
+ // locally.
+ PreserveCorpus bool `json:"preserve_corpus"`
+
// List of syscalls to test (optional). For example:
// "enable_syscalls": [ "mmap", "openat$ashmem", "ioctl$ASHMEM*" ]
EnabledSyscalls []string `json:"enable_syscalls,omitempty"`
diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go
index ff9d8e61f..c9528b38a 100644
--- a/pkg/mgrconfig/load.go
+++ b/pkg/mgrconfig/load.go
@@ -78,13 +78,14 @@ func LoadPartialFile(filename string) (*Config, error) {
func defaultValues() *Config {
return &Config{
- SSHUser: "root",
- Cover: true,
- Reproduce: true,
- Sandbox: "none",
- RPC: ":0",
- MaxCrashLogs: 100,
- Procs: 6,
+ SSHUser: "root",
+ Cover: true,
+ Reproduce: true,
+ Sandbox: "none",
+ RPC: ":0",
+ MaxCrashLogs: 100,
+ Procs: 6,
+ PreserveCorpus: true,
}
}