diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-25 21:18:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-25 21:18:04 -0400 |
commit | 36e635cb21d96da0f30b91a39cc95ef4ed1bce26 (patch) | |
tree | c28397756f579bbd23f1570ca612772c02cfbab2 /arch/x86/mm | |
parent | c265cc5c3cb2e950910437a846ef59e3a5c2df51 (diff) | |
parent | 81c2949f7fdcf8ff681326669afde24962232670 (diff) |
Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 stackdump update from Ingo Molnar:
"A number of stackdump enhancements"
* 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/dumpstack: Add show_stack_regs() and use it
printk: Make the printk*once() variants return a value
x86/dumpstack: Honor supplied @regs arg
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/extable.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index 0f90cc218d04..832b98f822be 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/module.h> | 1 | #include <linux/module.h> |
2 | #include <asm/uaccess.h> | 2 | #include <asm/uaccess.h> |
3 | #include <asm/traps.h> | 3 | #include <asm/traps.h> |
4 | #include <asm/kdebug.h> | ||
4 | 5 | ||
5 | typedef bool (*ex_handler_t)(const struct exception_table_entry *, | 6 | typedef bool (*ex_handler_t)(const struct exception_table_entry *, |
6 | struct pt_regs *, int); | 7 | struct pt_regs *, int); |
@@ -46,8 +47,9 @@ EXPORT_SYMBOL(ex_handler_ext); | |||
46 | bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup, | 47 | bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup, |
47 | struct pt_regs *regs, int trapnr) | 48 | struct pt_regs *regs, int trapnr) |
48 | { | 49 | { |
49 | WARN_ONCE(1, "unchecked MSR access error: RDMSR from 0x%x\n", | 50 | if (pr_warn_once("unchecked MSR access error: RDMSR from 0x%x at rIP: 0x%lx (%pF)\n", |
50 | (unsigned int)regs->cx); | 51 | (unsigned int)regs->cx, regs->ip, (void *)regs->ip)) |
52 | show_stack_regs(regs); | ||
51 | 53 | ||
52 | /* Pretend that the read succeeded and returned 0. */ | 54 | /* Pretend that the read succeeded and returned 0. */ |
53 | regs->ip = ex_fixup_addr(fixup); | 55 | regs->ip = ex_fixup_addr(fixup); |
@@ -60,9 +62,10 @@ EXPORT_SYMBOL(ex_handler_rdmsr_unsafe); | |||
60 | bool ex_handler_wrmsr_unsafe(const struct exception_table_entry *fixup, | 62 | bool ex_handler_wrmsr_unsafe(const struct exception_table_entry *fixup, |
61 | struct pt_regs *regs, int trapnr) | 63 | struct pt_regs *regs, int trapnr) |
62 | { | 64 | { |
63 | WARN_ONCE(1, "unchecked MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x)\n", | 65 | if (pr_warn_once("unchecked MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x) at rIP: 0x%lx (%pF)\n", |
64 | (unsigned int)regs->cx, | 66 | (unsigned int)regs->cx, (unsigned int)regs->dx, |
65 | (unsigned int)regs->dx, (unsigned int)regs->ax); | 67 | (unsigned int)regs->ax, regs->ip, (void *)regs->ip)) |
68 | show_stack_regs(regs); | ||
66 | 69 | ||
67 | /* Pretend that the write succeeded. */ | 70 | /* Pretend that the write succeeded. */ |
68 | regs->ip = ex_fixup_addr(fixup); | 71 | regs->ip = ex_fixup_addr(fixup); |