mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
smt: Only disable SMT when the kernel thinks it is vulnerable
On virtual machines, it does not make sense to disable SMT for the virtual cores. This has to be done by the hypervisor. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user