From dda1df0a5873b98e1169eb699d9a09756e17d67d Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Tue, 29 Sep 2020 20:53:01 -0700 Subject: [PATCH] fuzz: Fix the building errors with recent changes This patch adds two required dependencies to fuzz/Cargo.toml, and fixes the building error on the 'block' fuzzer. Signed-off-by: Bo Chen --- fuzz/Cargo.toml | 2 ++ fuzz/fuzz_targets/block.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index aaa2fa484..b1e52798b 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -10,9 +10,11 @@ edition = "2018" cargo-fuzz = true [dependencies] +kvm-ioctls = { git = "https://github.com/cloud-hypervisor/kvm-ioctls", branch = "ch" } libc = "0.2.72" libfuzzer-sys = "0.3" qcow = { path = "../qcow" } +seccomp = { git = "https://github.com/firecracker-microvm/firecracker", tag = "v0.22.0" } virtio-devices = { path = "../virtio-devices" } vmm-sys-util = ">=0.3.1" vm-virtio = { path = "../vm-virtio" } diff --git a/fuzz/fuzz_targets/block.rs b/fuzz/fuzz_targets/block.rs index ac6a7e4a5..addfa0a88 100644 --- a/fuzz/fuzz_targets/block.rs +++ b/fuzz/fuzz_targets/block.rs @@ -16,6 +16,7 @@ use virtio_devices::{Block, VirtioDevice, VirtioInterrupt, VirtioInterruptType}; use vm_memory::{Bytes, GuestAddress, GuestMemoryAtomic, GuestMemoryMmap}; use vm_virtio::Queue; use vmm_sys_util::eventfd::EventFd; +use seccomp::SeccompAction; const MEM_SIZE: u64 = 256 * 1024 * 1024; const DESC_SIZE: u64 = 16; // Bytes in one virtio descriptor. @@ -92,6 +93,7 @@ fuzz_target!(|bytes| { false, 2, 256, + SeccompAction::Allow, ) .unwrap();