Commit bf941d6c authored by David S. Miller's avatar David S. Miller

[SPARC64]: Log faulting vaddr when bogus kernel PC detected.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c0f402f
...@@ -91,12 +91,13 @@ static void __kprobes unhandled_fault(unsigned long address, ...@@ -91,12 +91,13 @@ static void __kprobes unhandled_fault(unsigned long address,
die_if_kernel("Oops", regs); die_if_kernel("Oops", regs);
} }
static void bad_kernel_pc(struct pt_regs *regs) static void bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr)
{ {
unsigned long *ksp; unsigned long *ksp;
printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n", printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n",
regs->tpc); regs->tpc);
printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr);
__asm__("mov %%sp, %0" : "=r" (ksp)); __asm__("mov %%sp, %0" : "=r" (ksp));
show_stack(current, ksp); show_stack(current, ksp);
unhandled_fault(regs->tpc, current, regs); unhandled_fault(regs->tpc, current, regs);
...@@ -280,7 +281,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) ...@@ -280,7 +281,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
(tpc >= MODULES_VADDR && tpc < MODULES_END)) { (tpc >= MODULES_VADDR && tpc < MODULES_END)) {
/* Valid, no problems... */ /* Valid, no problems... */
} else { } else {
bad_kernel_pc(regs); bad_kernel_pc(regs, address);
return; return;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment