From 6099a1719c3532818617a2616a3380b080c56554 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 generated Create a `no_generate` attribute to be used with syscalls that `syzkaller` should not try to generate from scratch. In other words, `syzkaller` will only use seeds of this call. This will be useful for syscalls which are unlikely to be correctly generated. In particular, prevent these syscalls from being included in the choice table or from being considered as possible resource constructors. Also add a test which will attempt to generate programs with a bias towards `no_generate` syscalls, and flag up any that make it into result programs. Currently there are no `no_generate` syscalls, but the next commit will add some. --- prog/any_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prog/any_test.go') diff --git a/prog/any_test.go b/prog/any_test.go index 386ce8443..0e2f5e0e4 100644 --- a/prog/any_test.go +++ b/prog/any_test.go @@ -20,7 +20,7 @@ func TestIsComplexPtr(t *testing.T) { r := newRand(target, rs) compl := make(map[string]bool) for _, meta := range target.Syscalls { - if meta.Attrs.Disabled { + if meta.Attrs.Disabled || meta.Attrs.NoGenerate { continue } for i := 0; i < iters; i++ { -- cgit mrf-deployment