From 18f846ca807cfc6df9c3da3c0ab08251277dfefb Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 1 Dec 2021 17:25:40 +0000 Subject: all: add the `rerun` call property To be able to collide specific syscalls more precisely, we need to repeat the process many times. Introduce the `rerun` call property, which instructs `syz-executor` to repeat the call the specified number of times. The intended use is: call1() (rerun: 100, async) call2() (rerun: 100) For now, assign rerun values randomly to consecutive pairs of calls, where the first one is async. --- prog/minimization.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'prog/minimization.go') diff --git a/prog/minimization.go b/prog/minimization.go index 89ed6e142..26a4dfc93 100644 --- a/prog/minimization.go +++ b/prog/minimization.go @@ -120,6 +120,15 @@ func minimizeCallProps(p0 *Prog, callIndex, callIndex0 int, pred func(*Prog, int } } + // Try to drop rerun. + if props.Rerun > 0 { + p := p0.Clone() + p.Calls[callIndex].Props.Rerun = 0 + if pred(p, callIndex0) { + p0 = p + } + } + return p0 } -- cgit mrf-deployment