virtio-devices: seccomp: Add seccomp filter for vhost_net_ctl thread

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

Partially fixes: #925

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2020-08-17 21:44:51 -07:00
committed by Sebastien Boeuf
parent 02d63149fe
commit 896b9a1d4b
3 changed files with 41 additions and 5 deletions

View File

@@ -1874,8 +1874,13 @@ impl DeviceManager {
queue_size: net_cfg.queue_size,
};
let vhost_user_net_device = Arc::new(Mutex::new(
virtio_devices::vhost_user::Net::new(id.clone(), net_cfg.mac, vu_cfg)
.map_err(DeviceManagerError::CreateVhostUserNet)?,
virtio_devices::vhost_user::Net::new(
id.clone(),
net_cfg.mac,
vu_cfg,
self.seccomp_action.clone(),
)
.map_err(DeviceManagerError::CreateVhostUserNet)?,
));
// Fill the device tree with a new node. In case of restore, we