virtio-devices: seccomp: Add seccomp filters for iommu thread

This patch enables the seccomp filters for the iommu worker thread.

Partially fixes: #925

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2020-08-14 14:37:01 -07:00
committed by Sebastien Boeuf
parent dc6c62af09
commit 4539236690
3 changed files with 32 additions and 4 deletions

View File

@@ -1009,8 +1009,9 @@ impl DeviceManager {
let iommu_id = String::from(IOMMU_DEVICE_NAME);
let (iommu_device, iommu_mapping) = if self.config.lock().unwrap().iommu {
let (device, mapping) = virtio_devices::Iommu::new(iommu_id.clone())
.map_err(DeviceManagerError::CreateVirtioIommu)?;
let (device, mapping) =
virtio_devices::Iommu::new(iommu_id.clone(), self.seccomp_action.clone())
.map_err(DeviceManagerError::CreateVirtioIommu)?;
let device = Arc::new(Mutex::new(device));
self.iommu_device = Some(Arc::clone(&device));