aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-execprog
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2021-09-23 16:15:41 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2021-12-10 12:30:07 +0100
commitfd8caa5462e64f37cb9eebd75ffca1737dde447d (patch)
treebfa900ebf41099b21476e72acdf063ee630178c9 /tools/syz-execprog
parent4d4ce9bc2a12073dcc8b917f9fc2a4ecba26c4c5 (diff)
all: replace collide mode by `async` call property
Replace the currently existing straightforward approach to race triggering (that was almost entirely implemented inside syz-executor) with a more flexible one. The `async` call property instructs syz-executor not to block until the call has completed execution and proceed immediately to the next call. The decision on what calls to mark with `async` is made by syz-fuzzer. Ultimately this should let us implement more intelligent race provoking strategies as well as make more fine-grained reproducers.
Diffstat (limited to 'tools/syz-execprog')
-rw-r--r--tools/syz-execprog/execprog.go16
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)