fuzz: ignore address_space_map is_write flag
commitfc1c8344e65807843ae8eaa25284e5277bdcd1eb
authorAlexander Bulekov <alxndr@bu.edu>
Wed, 20 Jan 2021 06:02:55 +0000 (20 01:02 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 8 Feb 2021 13:43:54 +0000 (8 14:43 +0100)
treea14b23020cf22dc265017b4f6daec6dd4de02707
parent6f0e9c26dbae9ac18b89d359791008fe3432ca91
fuzz: ignore address_space_map is_write flag

We passed an is_write flag to the fuzz_dma_read_cb function to
differentiate between the mapped DMA regions that need to be populated
with fuzzed data, and those that don't. We simply passed through the
address_space_map is_write parameter. The goal was to cut down on
unnecessarily populating mapped DMA regions, when they are not read
from.

Unfortunately, nothing precludes code from reading from regions mapped
with is_write=true. For example, see:
https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg04729.html

This patch removes the is_write parameter to fuzz_dma_read_cb. As a
result, we will fill all mapped DMA regions with fuzzed data, ignoring
the specified transfer direction.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20210120060255.558535-1-alxndr@bu.edu>
include/exec/memory.h
include/exec/memory_ldst_cached.h.inc
memory_ldst.c.inc
softmmu/memory.c
softmmu/physmem.c
tests/qtest/fuzz/generic_fuzz.c