diff options
| author | George Kennedy <george.kennedy@oracle.com> | 2022-09-13 15:53:09 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-09-21 11:46:22 +0200 |
| commit | 84a66e8e4f8324de38eb230b5e2539570b4d05a5 (patch) | |
| tree | 454fe315bd0db53913128d99516201ac606addf1 /executor/executor.cc | |
| parent | 799171eb67633beabfe4f86022c58de3a796f1b4 (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 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/executor/executor.cc b/executor/executor.cc index 3c76738d2..efd072a75 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -173,6 +173,7 @@ static bool flag_net_reset; static bool flag_cgroups; static bool flag_close_fds; static bool flag_devlink_pci; +static bool flag_nic_vf; static bool flag_vhci_injection; static bool flag_wifi; static bool flag_delay_kcov_mmap; @@ -621,6 +622,7 @@ void parse_env_flags(uint64 flags) flag_vhci_injection = flags & (1 << 12); flag_wifi = flags & (1 << 13); flag_delay_kcov_mmap = flags & (1 << 14); + flag_nic_vf = flags & (1 << 15); } #if SYZ_EXECUTOR_USES_FORK_SERVER |
