arm64: stacktrace: recover return address for first entry
authorMark Rutland <mark.rutland@arm.com>
Tue, 11 Apr 2023 16:29:41 +0000 (17:29 +0100)
committerWill Deacon <will@kernel.org>
Tue, 11 Apr 2023 17:34:59 +0000 (18:34 +0100)
commit9e09d445f1cab518eedf4454d119ead27979b8f4
treee48a5ada92073bdab4e6d2003f673c16756fdacf
parente8d018dd0257f744ca50a729e3d042cf2ec9da65
arm64: stacktrace: recover return address for first entry

The function which calls the top-level backtracing function may have
been instrumented with ftrace and/or kprobes, and hence the first return
address may have been rewritten.

Factor out the existing fgraph / kretprobes address recovery, and use
this for the first address. As the comment for the fgraph case isn't all
that helpful, I've also dropped that.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Kalesh Singh <kaleshsingh@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Madhavan T. Venkataraman <madvenka@linux.microsoft.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230411162943.203199-2-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/stacktrace.c