From 91928e49f4639c55f9a4d7b86094987dda537286 Mon Sep 17 00:00:00 2001 From: Louis Merlin Date: Thu, 31 Oct 2024 15:46:26 +0100 Subject: [PATCH] Improve system-config message --- src/bin/cargo-ziggy/fuzz.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/bin/cargo-ziggy/fuzz.rs b/src/bin/cargo-ziggy/fuzz.rs index 873ecca..797d198 100644 --- a/src/bin/cargo-ziggy/fuzz.rs +++ b/src/bin/cargo-ziggy/fuzz.rs @@ -167,16 +167,15 @@ impl Fuzz { { if afl_log.contains("ready to roll") { afl_output_ok = true; - } else if afl_log.contains("echo core >/proc/sys/kernel/core_pattern") { + } else if afl_log.contains("echo core >/proc/sys/kernel/core_pattern") + || afl_log.contains("cd /sys/devices/system/cpu") + { stop_fuzzers(&mut processes)?; - eprintln!("AFL++ needs you to run the following command before it can start fuzzing:\n"); - eprintln!(" echo core >/proc/sys/kernel/core_pattern\n"); - return Ok(()); - } else if afl_log.contains("cd /sys/devices/system/cpu") { - stop_fuzzers(&mut processes)?; - eprintln!("AFL++ needs you to run the following commands before it can start fuzzing:\n"); - eprintln!(" cd /sys/devices/system/cpu"); - eprintln!(" echo performance | tee cpu*/cpufreq/scaling_governor\n"); + eprintln!("We highly recommend you configure your system for better performance:\n"); + eprintln!(" cargo afl system-config\n"); + eprintln!( + "Or set AFL_SKIP_CPUFREQ and AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES\n" + ); return Ok(()); } }