aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ipc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-06-29 20:34:43 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-06-29 20:34:43 +0200
commitf7498af7af98d89cb5dc49c872213a3a5ef8268a (patch)
tree32abb56358551c45dbce9a4c865781009fddd122 /pkg/ipc
parent0c4b1960d01985c2d8d6da62e8c82395b70838c8 (diff)
prog: add stronger fallback signal
Also mixin resource constructors and some signature of flags values for successful calls into fallback coverage.
Diffstat (limited to 'pkg/ipc')
-rw-r--r--pkg/ipc/ipc.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go
index 5ab5e26a7..65e883acf 100644
--- a/pkg/ipc/ipc.go
+++ b/pkg/ipc/ipc.go
@@ -19,7 +19,6 @@ import (
"unsafe"
"github.com/google/syzkaller/pkg/osutil"
- "github.com/google/syzkaller/pkg/signal"
"github.com/google/syzkaller/prog"
"github.com/google/syzkaller/sys/targets"
)
@@ -329,12 +328,14 @@ func (env *Env) Exec(opts *ExecOpts, p *prog.Prog) (output []byte, info []CallIn
// We use syscall number or-ed with returned errno value as signal.
// At least this gives us all combinations of syscall+errno.
func addFallbackSignal(p *prog.Prog, info []CallInfo) {
- for i, call := range p.Calls {
- inf := &info[i]
- if !inf.Executed || len(inf.Signal) != 0 {
- continue
- }
- inf.Signal = []uint32{signal.EncodeFallback(call.Meta.ID, inf.Errno)}
+ callInfos := make([]prog.CallInfo, len(info))
+ for i, inf := range info {
+ callInfos[i].Executed = inf.Executed
+ callInfos[i].Errno = inf.Errno
+ }
+ p.FallbackSignal(callInfos)
+ for i, inf := range callInfos {
+ info[i].Signal = inf.Signal
}
}