aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2022-03-22 10:49:49 +0100
committerGitHub <noreply@github.com>2022-03-22 10:49:49 +0100
commitd88ef0c5c80d45a060e170c2706371f6b2957f55 (patch)
tree742b3ec54df49deb796b201cefc7b7ba6035045e /pkg
parente2d91b1d0dd8c8b4760986ec8114469246022bb8 (diff)
syz-verifier: redesigned the analysis program generation and analysis flow (#2908)
Program verification logic is located in one function now. VMs fetch programs from priority queues, not from the generator. VMs operate the tasks, not programs now. For the crashed VM - return error for every program in the queue *fixed some road errors
Diffstat (limited to 'pkg')
-rw-r--r--pkg/rpctype/rpctype.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/pkg/rpctype/rpctype.go b/pkg/rpctype/rpctype.go
index f83eac3b3..cb2f43e76 100644
--- a/pkg/rpctype/rpctype.go
+++ b/pkg/rpctype/rpctype.go
@@ -6,6 +6,8 @@
package rpctype
import (
+ "math"
+
"github.com/google/syzkaller/pkg/host"
"github.com/google/syzkaller/pkg/ipc"
"github.com/google/syzkaller/pkg/signal"
@@ -24,10 +26,9 @@ type Candidate struct {
Smashed bool
}
-type Prog struct {
- Bytes []byte
- ProgIdx int
- RunIdx int
+type ExecTask struct {
+ Prog []byte
+ ID int64
}
type ConnectArgs struct {
@@ -105,26 +106,27 @@ type UpdateUnsupportedArgs struct {
type NextExchangeArgs struct {
// Pool/VM are used to identify the instance on which the client is running.
Pool, VM int
- // ProgIdx is used to uniquely identify the program for which the client is
+ // ExecTaskID is used to uniquely identify the program for which the client is
// sending results.
- ProgIdx int
+ ExecTaskID int64
// Hanged is set to true if the program for which we are sending results
// was killed due to hanging.
Hanged bool
// Info contains information about the execution of each system call in the
// program.
Info ipc.ProgInfo
- // RunIdx is the number of times this program has been run on the kernel.
- RunIdx int
}
// NextExchaneRes contains the data passed from server to client namely
// programs to execute on the VM.
type NextExchangeRes struct {
- // Prog contains the serialized program that will be sent to the client.
- Prog
+ ExecTask
}
+const (
+ NoTask int64 = math.MaxInt64
+)
+
type HubConnectArgs struct {
// Client/Key are used for authentication.
Client string