[PATCH v2 6/9] ARM: unwind: dump exception stack from calling frame

Arnd Bergmann arnd at arndb.de
Tue Oct 5 05:20:06 PDT 2021


On Tue, Oct 5, 2021 at 9:15 AM Ard Biesheuvel <ardb at kernel.org> wrote:
>
> The existing code that dumps the contents of the pt_regs structure
> passed to __entry routines does so while unwinding the callee frame, and
> dereferences the stack pointer as a struct pt_regs*. This will no longer
> work when we enable support for IRQ or overflow stacks, because the
> struct pt_regs may live on the task stack, while we are executing from
> another stack.
>
> The unwinder has access to this information, but only while unwinding
> the calling frame. So let's combine the exception stack dumping code
> with the handling of the calling frame as well. By printing it before
> dumping the caller/callee addresses, the output order is preserved.
>
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>

Reviewed-by: Arnd Bergmann <arnd at arndb.de>



More information about the linux-arm-kernel mailing list