scripts/decodecode: Fixup trapping instruction marker
PATCH 1/1 scripts/decodecode: Fixup trapping instruction marker
From: Borislav Petkov <[email protected]>
When dumping "Code: " sections from an oops, the trapping instruction %rip points to can be a string copy
2b:* f3 a5 rep movsl %ds:(%rsi),%es:(%rdi)
and the line contain a bunch of ":". Current "cut" selects only the and the second field output looks funnily overlaid this:
2b:* f3 a5 rep movsl %ds <-- trapping instruction:(%rsi),%es:(%rdi
Fix this by selecting the remaining fields too.
Cc Andrew Morton <[email protected]>
Cc Linus Torvalds <[email protected]>
Signed-off-by Borislav Petkov <[email protected]>
--- scripts/decodecode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/decodecode +1 -1
@@ -89,7 +89,7 @@ echo $code >> $T.s disas $T cat $T.dis >> $T.aa -faultline=`cat $T.dis | head -1 | cut -d":" -f2` +faultline=`cat $T.dis | head -1 | cut -d":" -f2-` faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` cat $T.oo | sed -e "s/\($faultline\)/\*\1 <-- trapping instruction/g"
Signature · 1 line
1.7.11.rc1