From 5fa19f28012e7f3ccb4fdc04d9a33d9d35bed2c9 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Thu, 18 Jul 2019 10:17:50 +0200 Subject: cpu scaling updated for newer kernels --- afl-system-config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'afl-system-config') diff --git a/afl-system-config b/afl-system-config index 7538bc29..fa24d473 100755 --- a/afl-system-config +++ b/afl-system-config @@ -7,8 +7,11 @@ sysctl -w kernel.sched_autogroup_enabled=1 sysctl -w kernel.sched_migration_cost_ns=50000000 sysctl -w kernel.sched_latency_ns=250000000 echo never > /sys/kernel/mm/transparent_hugepage/enabled -echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor > /dev/null +test -e /sys/devices/system/cpu/cpufreq/scaling_governor && echo performance | tee /sys/devices/system/cpu/cpufreq/scaling_governor +test -e /sys/devices/system/cpu/cpufreq/policy0/scaling_governor && echo performance | tee /sys/devices/system/cpu/cpufreq/policy*/scaling_governor +test -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor && echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor test -e /sys/devices/system/cpu/intel_pstate/no_turbo && echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo +test -e /sys/devices/system/cpu/cpufreq/boost && echo 1 > /sys/devices/system/cpu/cpufreq/boost echo echo It is recommended to boot the kernel with lots of security off - if you are running a machine that is in a secured network - so set this: echo '/etc/default/grub:GRUB_CMDLINE_LINUX_DEFAULT="ibpb=off ibrs=off kpti=off l1tf=off mds=off mitigations=off no_stf_barrier noibpb noibrs nopcid nopti nospec_store_bypass_disable nospectre_v1 nospectre_v2 pcid=off pti=off spec_store_bypass_disable=off spectre_v2=off stf_barrier=off"' -- cgit 1.4.1 From 13b8bc1a89624f76cc901dcbc0e1a2a16cbd7b3f Mon Sep 17 00:00:00 2001 From: Heiko Eißfeldt Date: Fri, 19 Jul 2019 11:08:23 +0200 Subject: add root check --- afl-system-config | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'afl-system-config') diff --git a/afl-system-config b/afl-system-config index fa24d473..97f95c09 100755 --- a/afl-system-config +++ b/afl-system-config @@ -1,5 +1,9 @@ #!/bin/sh echo This reconfigures the system to have a better fuzzing performance +if [[ $EUID -ne 0 ]] || ! [ `id -u` = 0 ]; then + echo if you are root \(which you are currently not\) + exit 1 +fi sysctl -w kernel.core_pattern=core sysctl -w kernel.randomize_va_space=0 sysctl -w kernel.sched_child_runs_first=1 -- cgit 1.4.1 From 6fa95008bc6872802917cb2f8ddaa44b1ace474d Mon Sep 17 00:00:00 2001 From: van Hauser Date: Wed, 24 Jul 2019 12:55:37 +0200 Subject: fix root check --- afl-system-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'afl-system-config') diff --git a/afl-system-config b/afl-system-config index 97f95c09..366762ef 100755 --- a/afl-system-config +++ b/afl-system-config @@ -1,7 +1,7 @@ #!/bin/sh echo This reconfigures the system to have a better fuzzing performance -if [[ $EUID -ne 0 ]] || ! [ `id -u` = 0 ]; then - echo if you are root \(which you are currently not\) +if [ '!' "$EUID" = 0 ] && [ '!' `id -u` = 0 ] ; then + echo Error you need to be root to run this exit 1 fi sysctl -w kernel.core_pattern=core -- cgit 1.4.1