[PATCH 00/10] arm64: stacktrace: improve unwind reporting
Mark Rutland
mark.rutland at arm.com
Fri Oct 11 09:32:00 PDT 2024
On Fri, Oct 11, 2024 at 05:19:15PM +0200, Miroslav Benes wrote:
> On Thu, 10 Oct 2024, Mark Rutland wrote:
>
> > This series improves arm64's unwinder to explicitly identify exception
> > boundaries, reporting both pt_regs::pc and pt_regs::lr and explicitly
> > identifying the source of elements in the stacktrace. This is useful to
> > humans when reviewing a stacktrace, and serves as infrastructure that
> > can be used for RELIABLE_STACKTRACE in future.
[...]
> > ... where:
> >
> > * "C" indicates that the first element of the trace was the caller of an unwind
> > function (vs "T" for a blocked task's stave PC, or "P" for a pt_regs::pc).
Ugh, s/stave/saved/, at least that was correct in the actual commit
message that introduced it.
[...]
> > arm64: pt_regs: assert pt_regs is a multiple of 16 bytes
> > arm64: pt_regs: remove stale big-endian layout
> > arm64: pt_regs: rename "pmr_save" -> "pmr"
> > arm64: pt_regs: swap 'unused' and 'pmr' fields
> > arm64: use a common struct frame_record
> > arm64: stacktrace: move dump_backtrace() to kunwind_stack_walk()
> > arm64: stacktrace: report source of unwind data
> > arm64: stacktrace: report recovered PCs
> > arm64: stacktrace: split unwind_consume_stack()
> > arm64: stacktrace: unwind exception boundaries
> >
> > arch/arm64/include/asm/daifflags.h | 2 +-
> > arch/arm64/include/asm/processor.h | 2 +-
> > arch/arm64/include/asm/ptrace.h | 22 ++-
> > arch/arm64/include/asm/stacktrace/common.h | 74 +++++----
> > arch/arm64/include/asm/stacktrace/frame.h | 48 ++++++
> > arch/arm64/kernel/asm-offsets.c | 3 +-
> > arch/arm64/kernel/entry.S | 16 +-
> > arch/arm64/kernel/head.S | 3 +
> > arch/arm64/kernel/probes/stBV5U5j | 0
> > arch/arm64/kernel/process.c | 5 +-
> > arch/arm64/kernel/signal.c | 5 -
> > arch/arm64/kernel/stacktrace.c | 176 +++++++++++++++++++--
> > 12 files changed, 287 insertions(+), 69 deletions(-)
> > create mode 100644 arch/arm64/include/asm/stacktrace/frame.h
>
> Very nice!
>
> Reviewed-by: Miroslav Benes <mbenes at suse.cz>
Thanks!
> > create mode 100644 arch/arm64/kernel/probes/stBV5U5j
>
> but this should probably disappear :)
Ack; gone.
I'll hold off sending a v2 with the fixups until middle/late next week
so that people get a chance to respond with anything more significant
and so that I can look over this with fresh eyes and clear out any more
typos...
In the mean time I've pushed out the fixed-up version to:
https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/stacktrace/metadata
Mark.
More information about the linux-arm-kernel
mailing list