From 1e153dc8b31e685ca8495576db4f8c077585e39c Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 23 Jan 2024 14:02:44 +0100 Subject: all: experiment with an option to reset accumulated state In the cases where we do not / cannot sandbox individual prog executions well enough, some share of progs end up being dependent on the previously accumulated state of the whole VM. As the result, * We lose 5-10% of coverage/signal on every instance restart. * A share of our corpus programs do not actually trigger the coverage they were thought to reliably trigger. This significantly affects fuzzing efficiency and prevents syzkaller from accumulating bigger and better corpus over multiple runs. Let's see if the situation becomes better if we restart syz-executor before most of prog executions. --- pkg/ipc/ipc.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkg/ipc') diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go index c96134faf..fd95d63d5 100644 --- a/pkg/ipc/ipc.go +++ b/pkg/ipc/ipc.go @@ -293,6 +293,13 @@ func (env *Env) Exec(opts *ExecOpts, p *prog.Prog) (output []byte, info *ProgInf return } +func (env *Env) ForceRestart() { + if env.cmd != nil { + env.cmd.close() + env.cmd = nil + } +} + // This smethod brings up an executor process if it was stopped. func (env *Env) RestartIfNeeded(target *prog.Target) error { if env.cmd == nil { -- cgit mrf-deployment