[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/10] fuzz/i440fx: remove fork-based fuzzer
From: |
Alexander Bulekov |
Subject: |
[PULL 08/10] fuzz/i440fx: remove fork-based fuzzer |
Date: |
Thu, 16 Feb 2023 23:08:53 -0500 |
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
---
tests/qtest/fuzz/i440fx_fuzz.c | 27 +--------------------------
1 file changed, 1 insertion(+), 26 deletions(-)
diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_fuzz.c
index b17fc725df..155fe018f8 100644
--- a/tests/qtest/fuzz/i440fx_fuzz.c
+++ b/tests/qtest/fuzz/i440fx_fuzz.c
@@ -18,7 +18,6 @@
#include "tests/qtest/libqos/pci-pc.h"
#include "fuzz.h"
#include "qos_fuzz.h"
-#include "fork_fuzz.h"
#define I440FX_PCI_HOST_BRIDGE_CFG 0xcf8
@@ -89,6 +88,7 @@ static void i440fx_fuzz_qtest(QTestState *s,
size_t Size)
{
ioport_fuzz_qtest(s, Data, Size);
+ fuzz_reset(s);
}
static void pciconfig_fuzz_qos(QTestState *s, QPCIBus *bus,
@@ -145,17 +145,6 @@ static void i440fx_fuzz_qos(QTestState *s,
pciconfig_fuzz_qos(s, bus, Data, Size);
}
-static void i440fx_fuzz_qos_fork(QTestState *s,
- const unsigned char *Data, size_t Size) {
- if (fork() == 0) {
- i440fx_fuzz_qos(s, Data, Size);
- _Exit(0);
- } else {
- flush_events(s);
- wait(NULL);
- }
-}
-
static const char *i440fx_qtest_argv = TARGET_NAME " -machine accel=qtest"
" -m 0 -display none";
static GString *i440fx_argv(FuzzTarget *t)
@@ -163,10 +152,6 @@ static GString *i440fx_argv(FuzzTarget *t)
return g_string_new(i440fx_qtest_argv);
}
-static void fork_init(void)
-{
- counter_shm_init();
-}
static void register_pci_fuzz_targets(void)
{
@@ -178,16 +163,6 @@ static void register_pci_fuzz_targets(void)
.get_init_cmdline = i440fx_argv,
.fuzz = i440fx_fuzz_qtest});
- /* Uses libqos and forks to prevent state leakage */
- fuzz_add_qos_target(&(FuzzTarget){
- .name = "i440fx-qos-fork-fuzz",
- .description = "Fuzz the i440fx using raw qtest commands and "
- "rebooting after each run",
- .pre_vm_init = &fork_init,
- .fuzz = i440fx_fuzz_qos_fork,},
- "i440FX-pcihost",
- &(QOSGraphTestOptions){}
- );
/*
* Uses libqos. Doesn't do anything to reset state. Note that if we were to
--
2.39.0
- [PULL 01/10] hw/sparse-mem: clear memory on reset, (continued)
- [PULL 01/10] hw/sparse-mem: clear memory on reset, Alexander Bulekov, 2023/02/16
- [PULL 02/10] fuzz: add fuzz_reset API, Alexander Bulekov, 2023/02/16
- [PULL 03/10] fuzz/generic-fuzz: use reboots instead of forks to reset state, Alexander Bulekov, 2023/02/16
- [PULL 04/10] fuzz/generic-fuzz: add a limit on DMA bytes written, Alexander Bulekov, 2023/02/16
- [PULL 05/10] fuzz/virtio-scsi: remove fork-based fuzzer, Alexander Bulekov, 2023/02/16
- [PULL 06/10] fuzz/virtio-net: remove fork-based fuzzer, Alexander Bulekov, 2023/02/16
- [PULL 07/10] fuzz/virtio-blk: remove fork-based fuzzer, Alexander Bulekov, 2023/02/16
- [PULL 09/10] fuzz: remove fork-fuzzing scaffolding, Alexander Bulekov, 2023/02/16
- [PULL 08/10] fuzz/i440fx: remove fork-based fuzzer,
Alexander Bulekov <=
- [PULL 10/10] docs/fuzz: remove mentions of fork-based fuzzing, Alexander Bulekov, 2023/02/16
- Re: [PULL 00/10] Replace fork-based fuzzing with reboots, Peter Maydell, 2023/02/21