mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2024-11-19 04:22:22 +01:00
fix(opensuse): add specific location for ibrs_enabled file
This commit is contained in:
parent
a658de2f01
commit
eb0ebef5a8
@ -601,17 +601,21 @@ check_variant2()
|
|||||||
_info_nol "* Kernel support for IBRS: "
|
_info_nol "* Kernel support for IBRS: "
|
||||||
if [ "$opt_live" = 1 ]; then
|
if [ "$opt_live" = 1 ]; then
|
||||||
mount_debugfs
|
mount_debugfs
|
||||||
if [ -e /sys/kernel/debug/ibrs_enabled ]; then
|
for ibrs_file in \
|
||||||
|
/sys/kernel/debug/ibrs_enabled \
|
||||||
|
/sys/kernel/debug/x86/ibrs_enabled \
|
||||||
|
/proc/sys/kernel/ibrs_enabled; do
|
||||||
|
if [ -e "$ibrs_file" ]; then
|
||||||
# if the file is there, we have IBRS compiled-in
|
# if the file is there, we have IBRS compiled-in
|
||||||
|
# /sys/kernel/debug/ibrs_enabled: vanilla
|
||||||
|
# /sys/kernel/debug/x86/ibrs_enabled: RedHat (see https://access.redhat.com/articles/3311301)
|
||||||
|
# /proc/sys/kernel/ibrs_enabled: OpenSUSE tumbleweed
|
||||||
pstatus green YES
|
pstatus green YES
|
||||||
ibrs_supported=1
|
ibrs_supported=1
|
||||||
ibrs_enabled=$(cat /sys/kernel/debug/ibrs_enabled 2>/dev/null)
|
ibrs_enabled=$(cat "$ibrs_file" 2>/dev/null)
|
||||||
elif [ -e /sys/kernel/debug/x86/ibrs_enabled ]; then
|
break
|
||||||
# RedHat uses a different path (see https://access.redhat.com/articles/3311301)
|
|
||||||
pstatus green YES
|
|
||||||
ibrs_supported=1
|
|
||||||
ibrs_enabled=$(cat /sys/kernel/debug/x86/ibrs_enabled 2>/dev/null)
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
if [ "$ibrs_supported" != 1 -a -n "$opt_map" ]; then
|
if [ "$ibrs_supported" != 1 -a -n "$opt_map" ]; then
|
||||||
if grep -q spec_ctrl "$opt_map"; then
|
if grep -q spec_ctrl "$opt_map"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user