fuzz: configure a sparse-mem device, by default
commit25d309fb0d6c07e49c3d9250cdbacc16941d988e
authorAlexander Bulekov <alxndr@bu.edu>
Mon, 15 Mar 2021 14:05:11 +0000 (15 10:05 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Mar 2021 18:30:30 +0000 (16 14:30 -0400)
tree48d36634c66bd2a1ae63de07156c25a726b6f558
parent230376d285b38f5b83882ebdd2e0d0570431dd09
fuzz: configure a sparse-mem device, by default

The generic-fuzzer often provides randomized DMA addresses to
virtual-devices. For a 64-bit address-space, the chance of these
randomized addresses coinciding with RAM regions, is fairly small. Even
though the fuzzer's instrumentation eventually finds valid addresses,
this can take some-time, and slows-down fuzzing progress (especially,
when multiple DMA buffers are involved). To work around this, create
"fake" sparse-memory that spans all of the 64-bit address-space. Adjust
the DMA call-back to populate this sparse memory, correspondingly

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/fuzz/generic_fuzz.c