]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/system/smt
smt: Only disable SMT when the kernel thinks it is vulnerable
[people/pmueller/ipfire-2.x.git] / src / initscripts / system / smt
index f85f567fa878662965d784f3418a4366ee2a0f93..f83776c1a8e3e9926a73b2f256ec554dc5dc69a8 100644 (file)
@@ -23,7 +23,7 @@ case "${1}" in
                # Disable SMT when the processor is vulnerable to Foreshadow or Fallout/ZombieLoad/RIDL
                for vuln in l1tf mds; do
                        if [ -r "/sys/devices/system/cpu/vulnerabilities/${vuln}" ] && \
-                                       [ "$(</sys/devices/system/cpu/vulnerabilities/${vuln})" != "Not affected" ]; then
+                                       [[ "$(</sys/devices/system/cpu/vulnerabilities/${vuln})" =~ "SMT vulnerable" ]]; then
                                # Disable SMT
                                boot_mesg "Disabling Simultaneous Multi-Threading (SMT)..."
                                echo "forceoff" > /sys/devices/system/cpu/smt/control