]> git.karo-electronics.de Git - linux-beck.git/commit
x86/dumpstack: Print orig_ax in __show_regs()
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 20 Oct 2016 16:34:45 +0000 (11:34 -0500)
committerIngo Molnar <mingo@kernel.org>
Fri, 21 Oct 2016 07:26:05 +0000 (09:26 +0200)
commit6fa81a12b3f1834a22167aa2d7b24dcc4bf884e3
tree78ef1e8004edcc18a989979d98dc774f05150ff6
parent1141c3e39c64e4aba2d98cb3dcca95369c9dafbe
x86/dumpstack: Print orig_ax in __show_regs()

The value of regs->orig_ax contains potentially useful debugging data:
For syscalls it contains the syscall number.  For interrupts it contains
the (negated) vector number.  To reduce noise, print it only if it has a
useful value (i.e., something other than -1).

Here's what it looks like for a write syscall:

  RIP: 0033:[<00007f53ad7b1940>] 0x7f53ad7b1940
  RSP: 002b:00007fff8de66558 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
  RAX: ffffffffffffffda RBX: 0000000000000046 RCX: 00007f53ad7b1940
  RDX: 0000000000000002 RSI: 00007f53ae0ca000 RDI: 0000000000000001
  ...

Suggested-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/93f0fe0307a4af884d3fca00edabcc8cff236002.1476973742.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/process_64.c