From 3f94021ec61c81270e948abb0efe7da66ace3d5a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 6 May 2024 13:10:47 +0200 Subject: pkg/repro, pkg/ipc: use flatrpc.Feature Start switching from host.Features to flatrpc.Features. This change is supposed to be a no-op, just to reduce future diffs that will change how we obtain features. --- tools/syz-execprog/execprog.go | 2 +- tools/syz-repro/repro.go | 3 ++- tools/syz-runtest/runtest.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index 6c3314721..7f328e31a 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -418,7 +418,7 @@ func createConfig(target *prog.Target, features *host.Features, featuresFlags cs } execOpts.ExecFlags |= ipc.FlagCollectComps } - execOpts.EnvFlags |= ipc.FeaturesToFlags(features, featuresFlags) + execOpts.EnvFlags |= ipc.FeaturesToFlags(features.ToFlatRPC(), featuresFlags) return config, execOpts } diff --git a/tools/syz-repro/repro.go b/tools/syz-repro/repro.go index aa4e473c0..1c5d18cb9 100644 --- a/tools/syz-repro/repro.go +++ b/tools/syz-repro/repro.go @@ -10,6 +10,7 @@ import ( "path/filepath" "github.com/google/syzkaller/pkg/csource" + "github.com/google/syzkaller/pkg/flatrpc" "github.com/google/syzkaller/pkg/log" "github.com/google/syzkaller/pkg/mgrconfig" "github.com/google/syzkaller/pkg/osutil" @@ -64,7 +65,7 @@ func main() { } osutil.HandleInterrupts(vm.Shutdown) - res, stats, err := repro.Run(data, cfg, nil, reporter, vmPool, vmIndexes) + res, stats, err := repro.Run(data, cfg, flatrpc.AllFeatures, reporter, vmPool, vmIndexes) if err != nil { log.Logf(0, "reproduction failed: %v", err) } diff --git a/tools/syz-runtest/runtest.go b/tools/syz-runtest/runtest.go index fa3dbaa49..1203abbb5 100644 --- a/tools/syz-runtest/runtest.go +++ b/tools/syz-runtest/runtest.go @@ -125,7 +125,7 @@ func main() { ctx := &runtest.Context{ Dir: filepath.Join(cfg.Syzkaller, "sys", cfg.Target.OS, "test"), Target: cfg.Target, - Features: checkResult.Features, + Features: checkResult.Features.ToFlatRPC(), EnabledCalls: enabledCalls, Requests: mgr.requests, LogFunc: func(text string) { fmt.Println(text) }, -- cgit mrf-deployment