From 84a66e8e4f8324de38eb230b5e2539570b4d05a5 Mon Sep 17 00:00:00 2001 From: George Kennedy Date: Tue, 13 Sep 2022 15:53:09 +0000 Subject: 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 --- pkg/csource/common.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/csource/common.go') diff --git a/pkg/csource/common.go b/pkg/csource/common.go index 4b9b37455..6f3920126 100644 --- a/pkg/csource/common.go +++ b/pkg/csource/common.go @@ -117,6 +117,7 @@ func commonDefines(p *prog.Prog, opts Options) map[string]bool { "SYZ_CLOSE_FDS": opts.CloseFDs, "SYZ_KCSAN": opts.KCSAN, "SYZ_DEVLINK_PCI": opts.DevlinkPCI, + "SYZ_NIC_VF": opts.NicVF, "SYZ_USB": opts.USB, "SYZ_VHCI_INJECTION": opts.VhciInjection, "SYZ_USE_TMP_DIR": opts.UseTmpDir, -- cgit mrf-deployment