mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
seccomp: Allow fcntl in virtio-block thread
Add fcntl to virtio_block_thread_rules to allow try_clone() on file descriptors. The try_clone() method uses fcntl(fd, F_DUPFD_CLOEXEC) to duplicate file descriptors, which is needed for efficient QCOW2 L1 table sync that avoids temporary allocations. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
@@ -99,6 +99,7 @@ fn virtio_balloon_thread_rules() -> Vec<(i64, Vec<SeccompRule>)> {
|
||||
fn virtio_block_thread_rules() -> Vec<(i64, Vec<SeccompRule>)> {
|
||||
vec![
|
||||
(libc::SYS_fallocate, vec![]),
|
||||
(libc::SYS_fcntl, vec![]),
|
||||
(libc::SYS_fdatasync, vec![]),
|
||||
(libc::SYS_fsync, vec![]),
|
||||
(libc::SYS_ftruncate, vec![]),
|
||||
|
||||
Reference in New Issue
Block a user