Skip to content

Commit 83ea78f

Browse files
committed
fix: arm: also detect variant 1 mitigation when using native objdump
1 parent 602b68d commit 83ea78f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spectre-meltdown-checker.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,8 @@ check_variant1_linux()
18451845
#ffffff8008082e48: 8a3a0273 bic x19, x19, x26
18461846
#ffffff8008082e4c: 8a93ff5a and x26, x26, x19, asr #63
18471847
#ffffff8008082e50: d503229f hint #0x14
1848+
# /!\ can also just be "csdb" instead of "hint #0x14" for native objdump
1849+
#
18481850
# if we have v1_mask_nospec or redhat_canonical_spectre>0, don't bother disassembling the kernel, the answer is no.
18491851
if [ -n "$v1_mask_nospec" ] || [ "$redhat_canonical_spectre" -gt 0 ]; then
18501852
pstatus yellow NO
@@ -1855,7 +1857,7 @@ check_variant1_linux()
18551857
elif ! which "${opt_arch_prefix}objdump" >/dev/null 2>&1; then
18561858
pstatus yellow UNKNOWN "missing '${opt_arch_prefix}objdump' tool, please install it, usually it's in the binutils package"
18571859
else
1858-
"${opt_arch_prefix}objdump" -d "$kernel" | perl -ne 'push @r, $_; /\shint\s/ && $r[0]=~/\ssub\s+(x\d+)/ && $r[1]=~/\sbic\s+$1,\s+$1,/ && $r[2]=~/\sand\s/ && exit(9); shift @r if @r>3'; ret=$?
1860+
"${opt_arch_prefix}objdump" -d "$kernel" | perl -ne 'push @r, $_; /\s(hint|csdb)\s/ && $r[0]=~/\ssub\s+(x\d+)/ && $r[1]=~/\sbic\s+$1,\s+$1,/ && $r[2]=~/\sand\s/ && exit(9); shift @r if @r>3'; ret=$?
18591861
if [ "$ret" -eq 9 ]; then
18601862
pstatus green YES "mask_nospec64 macro is present and used"
18611863
v1_mask_nospec="arm mask_nospec64"

0 commit comments

Comments
 (0)