aboutsummaryrefslogtreecommitdiffstats
path: root/prog/minimization.go
diff options
context:
space:
mode:
authorHrutvik Kanabar <hrutvik@google.com>2022-09-19 10:19:25 +0000
committerMarco Elver <me@marcoelver.com>2022-09-22 16:42:04 +0200
commit800605ed4763b8457f8238c9168ff71ce82d6b7c (patch)
treeee957137d30dcdd4b8efb5b6668ed5b7c82d9ff3 /prog/minimization.go
parentc9dfe30e8bd19c371375c14d80a1e54cf88193ce (diff)
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.
Diffstat (limited to 'prog/minimization.go')
-rw-r--r--prog/minimization.go3
1 files changed, 3 insertions, 0 deletions
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,