From 794b6172050da8a2ece51d315ff6252edb60e25d Mon Sep 17 00:00:00 2001 From: Alwin Berger Date: Wed, 21 May 2025 08:25:13 +0000 Subject: [PATCH] rm README; /dev/null drive --- fuzzers/FRET/README.md | 26 -------------------------- fuzzers/FRET/src/fuzzer.rs | 2 +- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 fuzzers/FRET/README.md diff --git a/fuzzers/FRET/README.md b/fuzzers/FRET/README.md deleted file mode 100644 index 14098dc09c..0000000000 --- a/fuzzers/FRET/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Qemu systemmode with launcher - -This folder contains an example fuzzer for the qemu systemmode, using LLMP for fast multi-process fuzzing and crash detection. - -## Build - -To build this example, run - -```bash -cargo build --release -cd example; sh build.sh; cd .. -``` - -This will build the the fuzzer (src/fuzzer.rs) and a small example binary based on FreeRTOS, which can run under a qemu emulation target. - -## Run - -Since the instrumentation is based on snapshtos QEMU needs a virtual drive (even if it is unused...). -Create on and then run the fuzzer: -```bash -# create an image -qemu-img create -f qcow2 dummy.qcow2 32M -# run the fuzzer -KERNEL=./example/example.elf target/release/qemu_systemmode -icount shift=auto,align=off,sleep=off -machine mps2-an385 -monitor null -kernel ./example/example.elf -serial null -nographic -snapshot -drive if=none,format=qcow2,file=dummy.qcow2 -S -``` -Currently the ``KERNEL`` variable is needed because the fuzzer does not parse QEMUs arguments to find the binary. \ No newline at end of file diff --git a/fuzzers/FRET/src/fuzzer.rs b/fuzzers/FRET/src/fuzzer.rs index fead1dcd16..76cfef04be 100644 --- a/fuzzers/FRET/src/fuzzer.rs +++ b/fuzzers/FRET/src/fuzzer.rs @@ -246,7 +246,7 @@ let run_client = |state: Option<_>, mut mgr, _core_id| { #[cfg(not(feature = "snapshot_fast"))] "-drive", #[cfg(not(feature = "snapshot_fast"))] - "if=none,format=qcow2,file=dummy.qcow2", + "if=none,format=qcow2,file=/dev/null", // dummy drive to avoid qemu error ].into_iter().map(String::from).collect(); let env: Vec<(String, String)> = env::vars().collect(); let qemu = Qemu::init(&args).expect("Emulator creation failed");