Skip to content

Commit

Permalink
scripts/decodecode: Fixup trapping instruction marker
Browse files Browse the repository at this point in the history
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]>
Cc: [email protected]
Signed-off-by: Borislav Petkov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Borislav Petkov authored and torvalds committed Aug 16, 2012
1 parent 2b014fc commit 2a95e37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/decodecode
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2a95e37

Please sign in to comment.