diff options
author | Borislav Petkov <bp@suse.de> | 2018-04-17 19:11:22 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-04-26 17:15:27 +0300 |
commit | 7cccf0725cf7402514e09c52b089430005798b7f (patch) | |
tree | e47f08bcdbdd8be700811f4d6c75062a8aac251d /arch/x86/include/asm/stacktrace.h | |
parent | ba54d856a9d8a9c56b87e20c88602b7e3cb568fb (diff) | |
download | linux-7cccf0725cf7402514e09c52b089430005798b7f.tar.xz |
x86/dumpstack: Add a show_ip() function
... which shows the Instruction Pointer along with the insn bytes around
it. Use it whenever rIP is printed. Drop the rIP < PAGE_OFFSET check since
probe_kernel_read() can handle any address properly.
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Link: https://lkml.kernel.org/r/20180417161124.5294-8-bp@alien8.de
Diffstat (limited to 'arch/x86/include/asm/stacktrace.h')
-rw-r--r-- | arch/x86/include/asm/stacktrace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/stacktrace.h b/arch/x86/include/asm/stacktrace.h index 0630eeb18bbc..b6dc698f992a 100644 --- a/arch/x86/include/asm/stacktrace.h +++ b/arch/x86/include/asm/stacktrace.h @@ -112,4 +112,5 @@ static inline unsigned long caller_frame_pointer(void) } void show_opcodes(u8 *rip, const char *loglvl); +void show_ip(struct pt_regs *regs, const char *loglvl); #endif /* _ASM_X86_STACKTRACE_H */ |