File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -969,6 +969,27 @@ check_swap () {
969
969
say_warn " WARNING: SWAP enabled"
970
970
}
971
971
972
+ check_SSBD () {
973
+ arch=$( uname -m)
974
+ if [ " $arch " = " aarch64" ]; then
975
+ local param=" ssbd=force-on"
976
+ elif [ " $arch " = " x86_64" ]; then
977
+ local param=" spec_store_bypass_disable=on"
978
+ fi
979
+
980
+ ssbd_sysfs_file=" /sys/devices/system/cpu/vulnerabilities/spec_store_bypass"
981
+
982
+ if [ -f " $ssbd_sysfs_file " ]; then
983
+ (grep -q " ^Vulnerable" $ssbd_sysfs_file ) && \
984
+ say_warn " WARNING: SSBD mitigation is either globally disabled or" \
985
+ " system does not support mitigation via prctl or seccomp. Try" \
986
+ " enabling it system-wide, using the \` ${param} \` boot parameter."
987
+ else
988
+ say_warn " WARNING: SSBD mitigation not supported on this kernel." \
989
+ " View the prod-host-setup.md for more details."
990
+ fi
991
+ }
992
+
972
993
check_vm () {
973
994
if [ $( dmesg | grep -c -i " hypervisor detected" ) -gt 0 ]; then
974
995
say_warn " WARNING: you are running in a virtual machine." \
@@ -1001,6 +1022,7 @@ cmd_checkenv() {
1001
1022
check_L1TF
1002
1023
check_SMT
1003
1024
check_swap
1025
+ check_SSBD
1004
1026
}
1005
1027
1006
1028
main () {
You can’t perform that action at this time.
0 commit comments