From dfd609eca1871f01757d6b04b19fc273c87c14e5 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Tue, 5 Feb 2019 16:19:34 +0100 Subject: 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. --- pkg/csource/common.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/csource/common.go') diff --git a/pkg/csource/common.go b/pkg/csource/common.go index 9de387952..a39d714e0 100644 --- a/pkg/csource/common.go +++ b/pkg/csource/common.go @@ -82,8 +82,9 @@ func defineList(p, mmapProg *prog.Prog, opts Options) (defines []string) { "SYZ_FAULT_INJECTION": opts.Fault, "SYZ_TUN_ENABLE": opts.EnableTun, "SYZ_ENABLE_CGROUPS": opts.EnableCgroups, - "SYZ_ENABLE_NETDEV": opts.EnableNetdev, - "SYZ_RESET_NET_NAMESPACE": opts.ResetNet, + "SYZ_ENABLE_NETDEV": opts.EnableNetDev, + "SYZ_RESET_NET_NAMESPACE": opts.EnableNetReset, + "SYZ_ENABLE_BINFMT_MISC": opts.EnableBinfmtMisc, "SYZ_USE_TMP_DIR": opts.UseTmpDir, "SYZ_HANDLE_SEGV": opts.HandleSegv, "SYZ_REPRO": opts.Repro, -- cgit mrf-deployment