diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-execprog/execprog.go | 3 | ||||
| -rw-r--r-- | tools/syz-prog2c/prog2c.go | 47 | ||||
| -rw-r--r-- | tools/syz-reprolist/reprolist.go | 4 | ||||
| -rw-r--r-- | tools/syz-stress/stress.go | 3 |
4 files changed, 34 insertions, 23 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index 38412edd4..a5ef8fbc4 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -329,5 +329,8 @@ func createConfig(target *prog.Target, if featuresFlags["devlink_pci"].Enabled && features[host.FeatureDevlinkPCI].Enabled { config.Flags |= ipc.FlagEnableDevlinkPCI } + if featuresFlags["vhci"].Enabled && features[host.FeatureVhciInjection].Enabled { + config.Flags |= ipc.FlagEnableVhciInjection + } return config, execOpts } diff --git a/tools/syz-prog2c/prog2c.go b/tools/syz-prog2c/prog2c.go index 5d161929e..399b5e417 100644 --- a/tools/syz-prog2c/prog2c.go +++ b/tools/syz-prog2c/prog2c.go @@ -71,29 +71,30 @@ func main() { os.Exit(1) } opts := csource.Options{ - Threaded: *flagThreaded, - Collide: *flagCollide, - Repeat: *flagRepeat != 1, - RepeatTimes: *flagRepeat, - Procs: *flagProcs, - Sandbox: *flagSandbox, - Fault: *flagFaultCall >= 0, - FaultCall: *flagFaultCall, - FaultNth: *flagFaultNth, - Leak: *flagLeak, - NetInjection: features["tun"].Enabled, - NetDevices: features["net_dev"].Enabled, - NetReset: features["net_reset"].Enabled, - Cgroups: features["cgroups"].Enabled, - BinfmtMisc: features["binfmt_misc"].Enabled, - CloseFDs: features["close_fds"].Enabled, - KCSAN: features["kcsan"].Enabled, - DevlinkPCI: features["devlink_pci"].Enabled, - USB: features["usb"].Enabled, - UseTmpDir: *flagUseTmpDir, - HandleSegv: *flagHandleSegv, - Repro: false, - Trace: *flagTrace, + Threaded: *flagThreaded, + Collide: *flagCollide, + Repeat: *flagRepeat != 1, + RepeatTimes: *flagRepeat, + Procs: *flagProcs, + Sandbox: *flagSandbox, + Fault: *flagFaultCall >= 0, + FaultCall: *flagFaultCall, + FaultNth: *flagFaultNth, + Leak: *flagLeak, + NetInjection: features["tun"].Enabled, + NetDevices: features["net_dev"].Enabled, + NetReset: features["net_reset"].Enabled, + Cgroups: features["cgroups"].Enabled, + BinfmtMisc: features["binfmt_misc"].Enabled, + CloseFDs: features["close_fds"].Enabled, + KCSAN: features["kcsan"].Enabled, + DevlinkPCI: features["devlink_pci"].Enabled, + USB: features["usb"].Enabled, + VhciInjection: features["vhci"].Enabled, + UseTmpDir: *flagUseTmpDir, + HandleSegv: *flagHandleSegv, + Repro: false, + Trace: *flagTrace, } src, err := csource.Write(p, opts) if err != nil { diff --git a/tools/syz-reprolist/reprolist.go b/tools/syz-reprolist/reprolist.go index f6283f933..e4c26011f 100644 --- a/tools/syz-reprolist/reprolist.go +++ b/tools/syz-reprolist/reprolist.go @@ -228,6 +228,10 @@ func createProg2CArgs(bug *dashapi.LoadBugResp, opts csource.Options, file strin enable = append(enable, "devlink_pci") flags = append(flags, "-devlinkpci") } + if opts.VhciInjection { + enable = append(enable, "vhci") + flags = append(flags, "-vhci") + } if !haveEnableFlag { args = append(args, flags...) } else if len(enable) != 0 { diff --git a/tools/syz-stress/stress.go b/tools/syz-stress/stress.go index b2fa4cb8e..9ec0229f4 100644 --- a/tools/syz-stress/stress.go +++ b/tools/syz-stress/stress.go @@ -162,6 +162,9 @@ func createIPCConfig(target *prog.Target, features *host.Features, featuresFlags if featuresFlags["devlink_pci"].Enabled && features[host.FeatureDevlinkPCI].Enabled { config.Flags |= ipc.FlagEnableDevlinkPCI } + if featuresFlags["vhci"].Enabled && features[host.FeatureVhciInjection].Enabled { + config.Flags |= ipc.FlagEnableVhciInjection + } return config, execOpts, nil } |
