Thread (20 messages) 20 messages, 5 authors, 2018-07-26

Re: [PATCH 7/7] powerpc/traps: Show instructions on exceptions

From: Murilo Opsfelder Araujo <hidden>
Date: 2018-07-25 20:51:22
Also in: lkml

Hi, Christophe.

On Wed, Jul 25, 2018 at 06:01:34PM +0200, LEROY Christophe wrote:
Murilo Opsfelder Araujo [off-list ref] a écrit :
quoted
Move show_instructions() declaration to arch/powerpc/include/asm/stacktrace.h
and include asm/stracktrace.h in arch/powerpc/kernel/process.c, which
contains
the implementation.

Modify show_instructions() not to call __kernel_text_address(), allowing
userspace instruction dump.  probe_kernel_address(), which returns -EFAULT if
something goes wrong, is still being called.

Call show_instructions() in arch/powerpc/kernel/traps.c to dump
instructions at
faulty location, useful to debugging.
Shouldn't this part be in a second patch ?
Makes sense.  Perhaps I should split this patch in two: one to remove
__kernel_text_address() check in show_instructions(), and another to
call show_instructions() in show_signal_msg().
Wouldn't it be better to also see regs in addition if we want to use this to
understand what happened ?
So you could call show_regs() instead of show_instructions() ?
I see that show_regs() prints more information and calls
show_instructions() at the end if in privileged state.

I'm not sure about which situations we might want to call show_regs() -
and display a bunch of information - or just dump instructions for some
signals.

Isn't calling show_regs() in this case considered overkill?

Cheers
Murilo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help