[PATCH v4 0/9] arm64: stacktrace: cleanups and improvements
Mark Rutland
mark.rutland at arm.com
Thu Sep 1 06:06:37 PDT 2022
Hi,
This series is a set of improvements for the arm64 stacktrace code, atop
the rework merged for v6.0. I'm hoping this can be queued for v6.1.
Largely, the series decouples portions of the unwind code, making some
structural changes that remove the need for coupling (e.g. removing the
need for the stack type enumeration, and factoring out callbacks). This
should make it easier to make some further changes I have spoken about
previously (e.g. adding some metadata to the stack dump output), and I
have some patches building atop this which I intend to send out once
this is queued.
The only (intended) functional change from this series is improved
boundary detection, where overlapping frame records will now be caught
and rejected.
I've tested this natively (with the ftrace tests, LKDTM, and
/proc/self/stack), which seems happy.
I've also tested the NVHE and PKVM unwinders by hacking a BUG() into the
hyp code shortly after the KVM hyp code is initialized, and in both
cases the output is unchanged.
Since v1 [1]:
* Fix build warning with CONFIG_SDEI_INTERFACE=y && W=1
* Fix typos
* Fix whitespace errors
* Apply tags from Kalesh Singh and Mark Brown
Since v2 [2]:
* Fix kerneldoc comments
* Make kvm_nvhe_stack_kern_va() take a size
* Apply tags from Madhavan Venkataraman and Mark Brown
* Rebase (trivial) atop v6.0-rc1
Since v3 [3]:
* Minor typographical fixes to commit messages
* Apply tags from Madhavan Venkataraman and Mark Brown
* Rebase (trivial) atop v6.0-rc3
[1] https://lore.kernel.org/r/20220801121209.2479449-1-mark.rutland@arm.com
[2] https://lore.kernel.org/r/20220805124522.706457-1-mark.rutland@arm.com
[3] https://lore.kernel.org/r/20220815113922.3280255-1-mark.rutland@arm.com
Thanks,
Mark.
Mark Rutland (9):
arm64: stacktrace: fix kerneldoc comments
arm64: stacktrace: simplify unwind_next_common()
arm64: stacktrace: rename unwind_next_common() ->
unwind_next_frame_record()
arm64: stacktrace: move SDEI stack helpers to stacktrace code
arm64: stacktrace: add stackinfo_on_stack() helper
arm64: stacktrace: rework stack boundary discovery
arm64: stacktrace: remove stack type from fp translator
arm64: stacktrace: track all stack boundaries explicitly
arm64: stacktrace: track hyp stacks in unwinder's address space
arch/arm64/include/asm/processor.h | 2 +-
arch/arm64/include/asm/sdei.h | 17 --
arch/arm64/include/asm/stacktrace.h | 71 +++++--
arch/arm64/include/asm/stacktrace/common.h | 221 +++++++++------------
arch/arm64/include/asm/stacktrace/nvhe.h | 4 +-
arch/arm64/kernel/ptrace.c | 2 +-
arch/arm64/kernel/sdei.c | 32 ---
arch/arm64/kernel/stacktrace.c | 66 +++---
arch/arm64/kvm/hyp/nvhe/stacktrace.c | 40 ++--
arch/arm64/kvm/stacktrace.c | 137 ++++++++-----
10 files changed, 301 insertions(+), 291 deletions(-)
--
2.30.2
More information about the linux-arm-kernel
mailing list