diff options
| author | Johannes Wellhöfer <johannes.wellhoefer@gmail.com> | 2021-03-04 18:21:18 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-03-04 19:46:43 +0100 |
| commit | 9d751681c8ca1ef150e96f3c1e18bdcaab99c9b9 (patch) | |
| tree | 3d19290dd71676c2ed6cb710c93c8461ee53c03c /pkg/mgrconfig | |
| parent | a718501ca51a396a99c6db5dce884175f390aef9 (diff) | |
pkg/mgrconfig: add a value to the json config file
Add a configureable value for the maximum number of logs stored per
crash to the json config format.
syz-manager: use the new config value
Diffstat (limited to 'pkg/mgrconfig')
| -rw-r--r-- | pkg/mgrconfig/config.go | 3 | ||||
| -rw-r--r-- | pkg/mgrconfig/load.go | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go index e18607e7f..e4bfc46f8 100644 --- a/pkg/mgrconfig/config.go +++ b/pkg/mgrconfig/config.go @@ -104,6 +104,9 @@ type Config struct { // but to not oversubscribe CPU and memory too severe to not cause OOMs and false hangs/stalls. Procs int `json:"procs"` + // Maximum number of logs to store per crash (default: 100). + MaxCrashLogs int `json:"max_crash_logs"` + // Type of sandbox to use during fuzzing: // "none": don't do anything special beyond resource sandboxing, default // "setuid": impersonate into user nobody (65534). Supported only for some OSes. diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go index 9814987a7..abfaa30e6 100644 --- a/pkg/mgrconfig/load.go +++ b/pkg/mgrconfig/load.go @@ -78,12 +78,13 @@ func LoadPartialFile(filename string) (*Config, error) { func defaultValues() *Config { return &Config{ - SSHUser: "root", - Cover: true, - Reproduce: true, - Sandbox: "none", - RPC: ":0", - Procs: 6, + SSHUser: "root", + Cover: true, + Reproduce: true, + Sandbox: "none", + RPC: ":0", + MaxCrashLogs: 100, + Procs: 6, } } |
