From d88ef0c5c80d45a060e170c2706371f6b2957f55 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Tue, 22 Mar 2022 10:49:49 +0100 Subject: 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 --- pkg/rpctype/rpctype.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'pkg') 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 -- cgit mrf-deployment