An error occurred fetching the project authors.
  1. 29 Apr, 2013 1 commit
    • Borislav Petkov's avatar
      scripts/decodecode: make faulting insn ptr more robust · 18ff44b1
      Borislav Petkov authored
      It can accidentally happen that the faulting insn (the exact instruction
      bytes) is repeated a little further on in the trace.  This causes that
      same instruction to be tagged twice, see example below.
      
      What we want to do, however, is to track back from the end of the whole
      disassembly so many lines as the slice which starts with the faulting
      instruction is long.  This leads us to the actual faulting instruction
      and *then* we tag it.
      
      While we're at it, we can drop the sed "g" flag because we address only
      this one line.
      
      Also, if we point to an instruction which changes decoding depending on
      the slice being objdumped, like a Jcc insn, for example, we do not even
      tag it as a faulting instruction because the instruction decode changes
      in the second slice but we use that second format as a regex on the
      fsrst disassembled buffer and more often than not that instruction
      doesn't match.
      
      Again, simply tag the line which is deduced from the original "<>"
      marking we've received from the kernel.
      
      This also solves the pathologic issue of multiple tagging like this:
      
        29:*  0f 0b                   ud2         <-- trapping instruction
        2b:*  0f 0b                   ud2         <-- trapping instruction
        2d:*  0f 0b                   ud2         <-- trapping instruction
      
      Double tagging example:
      
      Code: 34 dd 40 30 ad 81 48 c7 c0 80 f6 00 00 48 8b 3c 30 48 01 c6 b8 ff ff ff ff 48 8d 57 f0 48 39 f7 74 2f 49 8b 4c 24 08 48 8b 47 f0 <48> 39 48 08 75 0e eb 2a 66 90 48 8b 40 f0 48 39 48 08 74 1e 48
      All code
      ========
         0:   34 dd                   xor    $0xdd,%al
         2:   40 30 ad 81 48 c7 c0    xor    %bpl,-0x3f38b77f(%rbp)
         9:   80 f6 00                xor    $0x0,%dh
         c:   00 48 8b                add    %cl,-0x75(%rax)
         f:   3c 30                   cmp    $0x30,%al
        11:   48 01 c6                add    %rax,%rsi
        14:   b8 ff ff ff ff          mov    $0xffffffff,%eax
        19:   48 8d 57 f0             lea    -0x10(%rdi),%rdx
        1d:   48 39 f7                cmp    %rsi,%rdi
        20:   74 2f                   je     0x51
        22:   49 8b 4c 24 08          mov    0x8(%r12),%rcx
        27:   48 8b 47 f0             mov    -0x10(%rdi),%rax
        2b:*  48 39 48 08             cmp    %rcx,0x8(%rax)     <-- trapping instruction
        2f:   75 0e                   jne    0x3f
        31:   eb 2a                   jmp    0x5d
        33:   66 90                   xchg   %ax,%ax
        35:   48 8b 40 f0             mov    -0x10(%rax),%rax
        39:*  48 39 48 08             cmp    %rcx,0x8(%rax)     <-- trapping instruction
        3d:   74 1e                   je     0x5d
        3f:   48                      rex.W
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      18ff44b1
  2. 16 Aug, 2012 1 commit
    • Borislav Petkov's avatar
      scripts/decodecode: Fixup trapping instruction marker · 2a95e37c
      Borislav Petkov authored
      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: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2a95e37c
  3. 04 Jun, 2010 1 commit
  4. 02 Feb, 2010 1 commit
    • Rabin Vincent's avatar
      scripts: add ARM support to decodecode · 5358db0b
      Rabin Vincent authored
      This patch adds support for decoding ARM oopses to scripts/decodecode.
      The following things are handled:
      
       - ARCH and CROSS_COMPILE environment variables are respected.
      
       - The Code: in x86 oopses is in bytes, while it is in either words (4
         bytes) or halfwords for ARM.
      
       - Some versions of ARM objdump refuse to disassemble instructions
         generated by literal constants (".word 0x...").  The workaround is to
         strip the object file first.
      
       - The faulting instruction is marked (liked so) in ARM, but <like so>
         in x86.
      
       - ARM mnemonics may include characters such as [] which need to be
         escaped before being passed to sed for the "<- trapping instruction"
         substitution.
      Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      5358db0b
  5. 03 Dec, 2008 1 commit
  6. 30 May, 2008 1 commit
  7. 28 Jan, 2008 1 commit
  8. 16 Jul, 2007 1 commit