diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-11-26 12:01:29 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-11-26 11:32:06 +0000 |
| commit | 5f6d557d4454398c38d85f6774152d5e0a4436d7 (patch) | |
| tree | 9d5fbc2f1fe2c8ef08c64ff0a4c511ddd41bc3fa /tools/syz-diff | |
| parent | 7de7a5ecf43a5c41b5170d0cb70cb744fdf9de9f (diff) | |
pkg/rpcserver: refactoring in preparation for dynamic interface extraction
Few assorted changes to reduce future diffs:
- add rpcserver.RemoteConfig similar to LocalConfig
(there are too many parameters)
- add CheckGlobs to requesting additional globs from VMs
- pass whole InfoRequest to the MachineChecked callback
so that it's possible to read globs information
- add per-mode config checking in the manager
- add Manager.saveJson helper
Diffstat (limited to 'tools/syz-diff')
| -rw-r--r-- | tools/syz-diff/diff.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/syz-diff/diff.go b/tools/syz-diff/diff.go index 6549aed70..a7609fb2a 100644 --- a/tools/syz-diff/diff.go +++ b/tools/syz-diff/diff.go @@ -273,7 +273,12 @@ func setup(ctx context.Context, name string, cfg *mgrconfig.Config) *kernelConte log.Fatalf("failed to create reporter for %q: %v", name, err) } - kernelCtx.serv, err = rpcserver.New(cfg, kernelCtx, kernelCtx.servStats, *flagDebug) + kernelCtx.serv, err = rpcserver.New(&rpcserver.RemoteConfig{ + Config: cfg, + Manager: kernelCtx, + Stats: kernelCtx.servStats, + Debug: *flagDebug, + }) if err != nil { log.Fatalf("failed to create rpc server for %q: %v", name, err) } @@ -305,7 +310,8 @@ func (kc *kernelContext) BugFrames() (leaks, races []string) { return nil, nil } -func (kc *kernelContext) MachineChecked(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) queue.Source { +func (kc *kernelContext) MachineChecked(_ *flatrpc.InfoRequestRawT, features flatrpc.Feature, + syscalls map[*prog.Syscall]bool) queue.Source { if len(syscalls) == 0 { log.Fatalf("all system calls are disabled") } |
