From 800605ed4763b8457f8238c9168ff71ce82d6b7c Mon Sep 17 00:00:00 2001 From: Hrutvik Kanabar Date: Mon, 19 Sep 2022 10:19:25 +0000 Subject: prog: add an attribute for syscalls which should not be minimized Create a `no_minimize` attribute to be used with syscalls that `syzkaller` should not try to modify when minimizing a program that produces a bug. The intention is to use this with syscalls that are expensive to minimize, such as `syz_mount_image`. Currently there are no `no_minimize` syscalls, but the next commit will add some. --- prog/minimization.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'prog/minimization.go') diff --git a/prog/minimization.go b/prog/minimization.go index fcb681054..ee8f565c9 100644 --- a/prog/minimization.go +++ b/prog/minimization.go @@ -35,6 +35,9 @@ func Minimize(p0 *Prog, callIndex0 int, crash bool, pred0 func(*Prog, int) bool) // Try to minimize individual calls. for i := 0; i < len(p0.Calls); i++ { + if p0.Calls[i].Meta.Attrs.NoMinimize { + continue + } ctx := &minimizeArgsCtx{ target: p0.Target, p0: &p0, -- cgit mrf-deployment