aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/repro
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 /pkg/repro
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 'pkg/repro')
-rw-r--r--pkg/repro/repro.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go
index fe20c7330..d614cdfb6 100644
--- a/pkg/repro/repro.go
+++ b/pkg/repro/repro.go
@@ -192,6 +192,9 @@ func createStartOptions(cfg *mgrconfig.Config, features *host.Features, crashTyp
if !features[host.FeatureDevlinkPCI].Enabled {
opts.DevlinkPCI = false
}
+ if !features[host.FeatureNicVF].Enabled {
+ opts.NicVF = false
+ }
if !features[host.FeatureUSBEmulation].Enabled {
opts.USB = false
}
@@ -759,6 +762,7 @@ var cSimplifies = append(progSimplifies, []Simplify{
opts.BinfmtMisc = false
opts.CloseFDs = false
opts.DevlinkPCI = false
+ opts.NicVF = false
opts.USB = false
opts.VhciInjection = false
opts.Wifi = false
@@ -816,6 +820,13 @@ var cSimplifies = append(progSimplifies, []Simplify{
return true
},
func(opts *csource.Options) bool {
+ if !opts.NicVF {
+ return false
+ }
+ opts.NicVF = false
+ return true
+ },
+ func(opts *csource.Options) bool {
if !opts.USB {
return false
}