aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-execprog
diff options
context:
space:
mode:
authorGeorge Kennedy <george.kennedy@oracle.com>2022-09-13 15:53:09 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-09-21 11:46:22 +0200
commit84a66e8e4f8324de38eb230b5e2539570b4d05a5 (patch)
tree454fe315bd0db53913128d99516201ac606addf1 /tools/syz-execprog
parent799171eb67633beabfe4f86022c58de3a796f1b4 (diff)
executor: add NIC PCI pass-through VF support
Add support for moving a NIC PCI pass-through VF into Syzkaller's network namespace so that it will tested. As DEVLINK support is triggered by setting the pass-through device to "addr=0x10", NIC PCI pass-through VF support will be triggered by setting the device to "addr=0x11". If a NIC PCI pass-through VF is detected in do_sandbox, setup a staging namespace before the fork() and transfer the NIC VF interface to it. After the fork() and in the child transfer the NIC VF interface to Syzkaller's network namespace and rename the interface to netpci0 so that it will be tested. Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Diffstat (limited to 'tools/syz-execprog')
-rw-r--r--tools/syz-execprog/execprog.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go
index 8b5bd1103..b1d580d96 100644
--- a/tools/syz-execprog/execprog.go
+++ b/tools/syz-execprog/execprog.go
@@ -355,6 +355,9 @@ func createConfig(target *prog.Target, features *host.Features, featuresFlags cs
if featuresFlags["devlink_pci"].Enabled && features[host.FeatureDevlinkPCI].Enabled {
config.Flags |= ipc.FlagEnableDevlinkPCI
}
+ if featuresFlags["nic_vf"].Enabled && features[host.FeatureNicVF].Enabled {
+ config.Flags |= ipc.FlagEnableNicVF
+ }
if featuresFlags["vhci"].Enabled && features[host.FeatureVhciInjection].Enabled {
config.Flags |= ipc.FlagEnableVhciInjection
}