diff options
author | Alexander Bulekov <alxndr@bu.edu> | 2020-10-23 11:07:35 -0400 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2020-10-26 09:53:53 +0100 |
commit | a3c20e91dea6f7af64d886b05d678839b7b1a14c (patch) | |
tree | 67c99697c70256521950b249800338e1da7b4bea /softmmu/memory.c | |
parent | e7d3222e2e07e2a1a0aac979ef1fa5e8ef59f02c (diff) |
fuzz: Add fuzzer callbacks to DMA-read functions
We should be careful to not call any functions besides fuzz_dma_read_cb.
Without --enable-fuzzing, fuzz_dma_read_cb is an empty inlined function.
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-7-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'softmmu/memory.c')
-rw-r--r-- | softmmu/memory.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/softmmu/memory.c b/softmmu/memory.c index cec0e0f743..ee4a6bc168 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -1433,6 +1433,7 @@ MemTxResult memory_region_dispatch_read(MemoryRegion *mr, unsigned size = memop_size(op); MemTxResult r; + fuzz_dma_read_cb(addr, size, mr, false); if (!memory_region_access_valid(mr, addr, size, false, attrs)) { *pval = unassigned_mem_read(mr, addr, size); return MEMTX_DECODE_ERROR; |