diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-02-05 16:19:34 +0100 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@gmail.com> | 2019-03-05 14:30:10 +0100 |
| commit | dfd609eca1871f01757d6b04b19fc273c87c14e5 (patch) | |
| tree | bd16e4561775f52e40f970a35a032f1f390171a9 /executor/executor.cc | |
| parent | c55829aef16e95df564cb23e700e5de8490229a0 (diff) | |
execprog, stress, prog2c: unify flags to enable additional features
This change makes all syz-execprog, syz-prog2c and syz-stress accept
-enable and -disable flags to enable or disable additional features
(tun, net_dev, net_reset, cgroups and binfmt_misc) instead of having
a separate flag for each of them.
The default (without any flags) behavior isn't changed: syz-execprog
and syz-stress enabled all the features (provided the runtime supports
them) and syz-prog2c disables all of them.
Diffstat (limited to 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/executor/executor.cc b/executor/executor.cc index 22a728905..f1f6ba294 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -112,10 +112,13 @@ uint64 start_time_ms = 0; static bool flag_debug; static bool flag_cover; static sandbox_type flag_sandbox; +static bool flag_extra_cover; +static bool flag_enable_fault_injection; static bool flag_enable_tun; static bool flag_enable_net_dev; -static bool flag_enable_fault_injection; -static bool flag_extra_cover; +static bool flag_enable_net_reset; +static bool flag_enable_cgroups; +static bool flag_enable_binfmt_misc; static bool flag_collect_cover; static bool flag_dedup_cover; @@ -444,10 +447,13 @@ void parse_env_flags(uint64 flags) flag_sandbox = sandbox_namespace; else if (flags & (1 << 4)) flag_sandbox = sandbox_android_untrusted_app; - flag_enable_tun = flags & (1 << 5); - flag_enable_net_dev = flags & (1 << 6); - flag_enable_fault_injection = flags & (1 << 7); - flag_extra_cover = flags & (1 << 8); + flag_extra_cover = flags & (1 << 5); + flag_enable_fault_injection = flags & (1 << 6); + flag_enable_tun = flags & (1 << 7); + flag_enable_net_dev = flags & (1 << 8); + flag_enable_net_reset = flags & (1 << 9); + flag_enable_cgroups = flags & (1 << 10); + flag_enable_binfmt_misc = flags & (1 << 11); } #if SYZ_EXECUTOR_USES_FORK_SERVER |
