about summary refs log tree commit diff
path: root/afl-persistent-config
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2022-09-16 11:51:17 +0200
committerGitHub <noreply@github.com>2022-09-16 11:51:17 +0200
commit869138aa41db5411535003fa575a35b75b857389 (patch)
tree1acbb68c44c4e3c743714cddedf4eb01066fea62 /afl-persistent-config
parent147654f8715d237fe45c1657c87b2fe36c4db22a (diff)
parent5bf8bffd4aaedad1eef83504c46fc762e0262c27 (diff)
downloadafl++-869138aa41db5411535003fa575a35b75b857389.tar.gz
Merge pull request #1519 from AFLplusplus/dev
push to stable
Diffstat (limited to 'afl-persistent-config')
-rwxr-xr-xafl-persistent-config8
1 files changed, 4 insertions, 4 deletions
diff --git a/afl-persistent-config b/afl-persistent-config
index fd453cbc..927f0062 100755
--- a/afl-persistent-config
+++ b/afl-persistent-config
@@ -111,11 +111,11 @@ kernel.sched_latency_ns=250000000
 EOF
   }
 
-  egrep -q '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub 2>/dev/null || echo Error: /etc/default/grub with GRUB_CMDLINE_LINUX_DEFAULT is not present, cannot set boot options
-  egrep -q '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub 2>/dev/null && {
-    egrep '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub | egrep -q hardened_usercopy=off || {
+  grep -E -q '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub 2>/dev/null || echo Error: /etc/default/grub with GRUB_CMDLINE_LINUX_DEFAULT is not present, cannot set boot options
+  grep -E -q '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub 2>/dev/null && {
+    grep -E '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub | grep -E -q hardened_usercopy=off || {
       echo "Configuring performance boot options"
-      LINE=`egrep '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub | sed 's/^GRUB_CMDLINE_LINUX_DEFAULT=//' | tr -d '"'`
+      LINE=`grep -E '^GRUB_CMDLINE_LINUX_DEFAULT=' /etc/default/grub | sed 's/^GRUB_CMDLINE_LINUX_DEFAULT=//' | tr -d '"'`
       OPTIONS="$LINE 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 srbds=off noexec=off noexec32=off tsx=on tsx=on tsx_async_abort=off mitigations=off audit=0 hardened_usercopy=off ssbd=force-off"
       echo Setting boot options in /etc/default/grub to GRUB_CMDLINE_LINUX_DEFAULT=\"$OPTIONS\"
       sed -i "s|^GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT=\"$OPTIONS\"|" /etc/default/grub