Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Borislav Petkov and committed by
Linus Torvalds
2a95e37c 2b014fcc

+1 -1
+1 -1
scripts/decodecode
··· 89 89 disas $T 90 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 93 faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` 94 94 95 95 cat $T.oo | sed -e "s/\($faultline\)/\*\1 <-- trapping instruction/g"