Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 182dc9c

Browse files
committed
powerpc/kernel: Print actual address of regs when oopsing
When we oops or otherwise call show_regs() we print the address of the regs structure. Being able to see the address is fairly useful, firstly to verify that the regs pointer is not completely bogus, and secondly it allows you to dump the regs and surrounding memory with a debugger if you have one. In the normal case the regs will be located somewhere on the stack, so printing their location discloses no further information than printing the stack pointer does already. So switch to %px and print the actual address, not the hashed value. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 110df8b commit 182dc9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ void show_regs(struct pt_regs * regs)
14031403

14041404
printk("NIP: "REG" LR: "REG" CTR: "REG"\n",
14051405
regs->nip, regs->link, regs->ctr);
1406-
printk("REGS: %p TRAP: %04lx %s (%s)\n",
1406+
printk("REGS: %px TRAP: %04lx %s (%s)\n",
14071407
regs, regs->trap, print_tainted(), init_utsname()->release);
14081408
printk("MSR: "REG" ", regs->msr);
14091409
print_msr_bits(regs->msr);

0 commit comments

Comments
 (0)