fuzz: Add fuzzer for virtio-rng

To make the fuzzer faster and more effective, the guest memory is
setup with a much smaller size (comparing with other virtio device
fuzzers) and  a hole between the memory for holding virtio queue and
the rest of guest data. It brings two benefits: 1) avoid writing large
chunk of data from 'urandom' into the available descriptor chain (which
makes the fuzzer faster); 2) reduce substantial amount of overwrites to
the virtio queue data by the data from 'urandom (which makes the fuzzer
more deterministic and hence effective).

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2022-09-19 16:43:10 -07:00
committed by Sebastien Boeuf
parent f815fcbb5d
commit e1b483fc88
2 changed files with 140 additions and 0 deletions

View File

@@ -69,6 +69,12 @@ path = "fuzz_targets/qcow.rs"
test = false
doc = false
[[bin]]
name = "rng"
path = "fuzz_targets/rng.rs"
test = false
doc = false
[[bin]]
name = "serial"
path = "fuzz_targets/serial.rs"