[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v2 03/17] fuzz: Keep memory mapped for fork-base
From: |
Oleinik, Alexander |
Subject: |
[Qemu-devel] [RFC PATCH v2 03/17] fuzz: Keep memory mapped for fork-based fuzzer |
Date: |
Mon, 5 Aug 2019 07:11:04 +0000 |
Otherwise, the RAM is unmapped from the child-processes, which breaks
any fuzz tests relying on DMA.
Signed-off-by: Alexander Oleinik <address@hidden>
---
exec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/exec.c b/exec.c
index 3e78de3b8f..b3b56db8f0 100644
--- a/exec.c
+++ b/exec.c
@@ -2317,7 +2317,9 @@ static void ram_block_add(RAMBlock *new_block, Error
**errp, bool shared)
qemu_ram_setup_dump(new_block->host, new_block->max_length);
qemu_madvise(new_block->host, new_block->max_length,
QEMU_MADV_HUGEPAGE);
/* MADV_DONTFORK is also needed by KVM in absence of synchronous MMU */
+#ifndef CONFIG_FUZZ /* This conflicts with fork-based fuzzing */
qemu_madvise(new_block->host, new_block->max_length,
QEMU_MADV_DONTFORK);
+#endif
ram_block_notify_add(new_block->host, new_block->max_length);
}
}
--
2.20.1
- [Qemu-devel] [RFC PATCH v2 00/17] Add virtual device fuzzing support, Oleinik, Alexander, 2019/08/05
- [Qemu-devel] [RFC PATCH v2 01/17] fuzz: Move initialization from main to qemu_init, Oleinik, Alexander, 2019/08/05
- [Qemu-devel] [RFC PATCH v2 02/17] fuzz: Add fuzzer configure options, Oleinik, Alexander, 2019/08/05
- [Qemu-devel] [RFC PATCH v2 03/17] fuzz: Keep memory mapped for fork-based fuzzer,
Oleinik, Alexander <=
- [Qemu-devel] [RFC PATCH v2 04/17] fuzz: Skip modules that were already initialized, Oleinik, Alexander, 2019/08/05
- [Qemu-devel] [RFC PATCH v2 05/17] fuzz: Add direct receive function for qtest server, Oleinik, Alexander, 2019/08/05
- [Qemu-devel] [RFC PATCH v2 06/17] fuzz: Add FUZZ_TARGET module type, Oleinik, Alexander, 2019/08/05
- [Qemu-devel] [RFC PATCH v2 07/17] fuzz: Add ramfile qemu-file type, Oleinik, Alexander, 2019/08/05