diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2012-08-15 07:00:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-16 14:15:09 -0400 |
commit | 2a95e37c128d1c12b3cb0eb6dfdc1739a7104cd8 (patch) | |
tree | ef7c12b15069ae6840a797aa66c0337cfb246921 /scripts | |
parent | 2b014fcc7d99d31c3693a7e50d7dcb8b4ddc9cee (diff) |
scripts/decodecode: Fixup trapping instruction marker
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 <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/decodecode | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/decodecode b/scripts/decodecode index 18ba881c3415..4f8248d5a11f 100755 --- a/scripts/decodecode +++ b/scripts/decodecode | |||
@@ -89,7 +89,7 @@ echo $code >> $T.s | |||
89 | disas $T | 89 | disas $T |
90 | cat $T.dis >> $T.aa | 90 | cat $T.dis >> $T.aa |
91 | 91 | ||
92 | faultline=`cat $T.dis | head -1 | cut -d":" -f2` | 92 | faultline=`cat $T.dis | head -1 | cut -d":" -f2-` |
93 | faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` | 93 | faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` |
94 | 94 | ||
95 | cat $T.oo | sed -e "s/\($faultline\)/\*\1 <-- trapping instruction/g" | 95 | cat $T.oo | sed -e "s/\($faultline\)/\*\1 <-- trapping instruction/g" |