diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-15 14:54:59 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-16 14:20:36 +0000 |
| commit | 7e9780e93983e03547322aab489429ae4a7d2fa3 (patch) | |
| tree | 9bebbfce248f8350928fe0218ef080705ebcd484 /pkg | |
| parent | 0e05124fa8b99e403da71f699481bf4096fa6997 (diff) | |
syz-manager, syz-fuzzer: send RPC notifications about executing programs
Instead of printing full program from the fuzzer,
send a short notification with program ID to the manager
and let manager emit the program into the log.
This significnatly reduces amount of communication
and makes it possible to not send text programs to the fuzzer at all.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/rpctype/rpc.go | 4 | ||||
| -rw-r--r-- | pkg/rpctype/rpctype.go | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/pkg/rpctype/rpc.go b/pkg/rpctype/rpc.go index 39a299653..73e4512c4 100644 --- a/pkg/rpctype/rpc.go +++ b/pkg/rpctype/rpc.go @@ -110,6 +110,10 @@ func (cli *RPCClient) Call(method string, args, reply interface{}) error { return cli.c.Call(method, args, reply) } +func (cli *RPCClient) AsyncCall(method string, args interface{}) { + cli.c.Go(method, args, nil, nil) +} + func (cli *RPCClient) Close() { cli.c.Close() } diff --git a/pkg/rpctype/rpctype.go b/pkg/rpctype/rpctype.go index 7e15ba69c..07a217e05 100644 --- a/pkg/rpctype/rpctype.go +++ b/pkg/rpctype/rpctype.go @@ -37,8 +37,10 @@ type ExecutionRequest struct { // ExecutionResult is sent after ExecutionRequest is completed. type ExecutionResult struct { - ID int64 - Info ipc.ProgInfo + ID int64 + ProcID int + Try int + Info ipc.ProgInfo } // ExchangeInfoRequest is periodically sent by syz-fuzzer to syz-manager. @@ -57,6 +59,17 @@ type ExchangeInfoReply struct { DropMaxSignal []uint32 } +// ExecutingRequest is notification from the fuzzer that it started executing +// the program ProgID. We want this request to be as small and as fast as possible +// b/c we want it to reach manager (or at least leave the VM) before it crashes +// executing this program. +type ExecutingRequest struct { + Name string + ID int64 + ProcID int + Try int +} + // TODO: merge ExecutionRequest and ExecTask. type ExecTask struct { Prog []byte |
