]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: stacktrace: track hyp stacks in unwinder's address space
authorMark Rutland <mark.rutland@arm.com>
Thu, 1 Sep 2022 13:06:46 +0000 (14:06 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 9 Sep 2022 11:30:08 +0000 (12:30 +0100)
commitb4943ce0d48d5a06736955a9b3a46b0523de79d2
tree752ec5eca9f0081fb7067152bf6ae74b1b7de9fd
parentfeb21b2f46d3a16ac0c44b95b8176d83e2477363
arm64: stacktrace: track hyp stacks in unwinder's address space

Currently unwind_next_frame_record() has an optional callback to convert
the address space of the FP. This is necessary for the NVHE unwinder,
which tracks the stacks in the hyp VA space, but accesses the frame
records in the kernel VA space.

This is a bit unfortunate since it clutters unwind_next_frame_record(),
which will get in the way of future rework.

Instead, this patch changes the NVHE unwinder to track the stacks in the
kernel's VA space and translate to FP prior to calling
unwind_next_frame_record(). This removes the need for the translate_fp()
callback, as all unwinders consistently track stacks in the native
address space of the unwinder.

At the same time, this patch consolidates the generation of the stack
addresses behind the stackinfo_get_*() helpers.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Madhavan T. Venkataraman <madvenka@linux.microsoft.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20220901130646.1316937-10-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/stacktrace/common.h
arch/arm64/kernel/stacktrace.c
arch/arm64/kvm/hyp/nvhe/stacktrace.c
arch/arm64/kvm/stacktrace.c