diff options
Diffstat (limited to 'tools/syz-execprog/execprog.go')
| -rw-r--r-- | tools/syz-execprog/execprog.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index 6c69e0ff6..d22b5a0bf 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -38,6 +38,19 @@ var ( flagHints = flag.Bool("hints", false, "do a hints-generation run") flagEnable = flag.String("enable", "none", "enable only listed additional features") flagDisable = flag.String("disable", "none", "enable all additional features except listed") + // The following flag is only kept to let syzkaller remain compatible with older execprog versions. + // In order to test incoming patches or perform bug bisection, syz-ci must use the exact syzkaller + // version that detected the bug (as descriptions and syntax could've already been changed), and + // therefore it must be able to invoke older versions of syz-execprog. + // Unfortunately there's no clean way to drop that flag from newer versions of syz-execprog. If it + // were false by default, it would be easy - we could modify `instance.ExecprogCmd` only to pass it + // when it's true - which would never be the case in the newer versions (this is how we got rid of + // fault injection args). But the collide flag was true by default, so it must be passed by value + // (-collide=%v). The least kludgy solution is to silently accept this flag also in the newer versions + // of syzkaller, but do not process it, as there's no such functionality anymore. + // Note, however, that we do not have to do the same for `syz-prog2c`, as `collide` was there false + // by default. + flagCollide = flag.Bool("collide", false, "(DEPRECATED) collide syscalls to provoke data races") ) func main() { @@ -73,6 +86,9 @@ func main() { log.Logf(0, "%-24v: %v", feat.Name, feat.Reason) } } + if *flagCollide { + log.Fatalf("setting -collide to true is deprecated now") + } config, execOpts := createConfig(target, features, featuresFlags) if err = host.Setup(target, features, featuresFlags, config.Executor); err != nil { log.Fatal(err) |
