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 /include/exec/memory.h | |
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 'include/exec/memory.h')
-rw-r--r-- | include/exec/memory.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index 4aaf578ce6..aff6ef7605 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2462,6 +2462,7 @@ address_space_read_cached(MemoryRegionCache *cache, hwaddr addr, void *buf, hwaddr len) { assert(addr < cache->len && len <= cache->len - addr); + fuzz_dma_read_cb(cache->xlat + addr, len, cache->mrs.mr, false); if (likely(cache->ptr)) { memcpy(buf, cache->ptr + addr, len); return MEMTX_OK; |