Re: [PATCH 1/2] arm64: Implement arch_stack_walk_reliable
Breno Leitao <[email protected]>
| Newsgroups | org.kernel.vger.linux-toolchains,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.live-patching |
|---|---|
| Message-ID | <20250313-angelic-coral-giraffe-dfa4f3@leitao> |
On Fri, Mar 07, 2025 at 05:27:41PM -0800, Song Liu wrote: > With proper exception boundary detection, it is possible to implment > arch_stack_walk_reliable without sframe. > > Note that, arch_stack_walk_reliable does not guarantee getting reliable > stack in all scenarios. Instead, it can reliably detect when the stack > trace is not reliable, which is enough to provide reliable livepatching. > > This version has been inspired by Weinan Liu's patch [1]. > > [1] https://lore.kernel.org/live-patching/[email protected]/ > Signed-off-by: Song Liu <[email protected]> Tested-by: Breno Leitao <[email protected]> > arch/arm64/Kconfig | 2 +- > arch/arm64/include/asm/stacktrace/common.h | 1 + > arch/arm64/kernel/stacktrace.c | 44 +++++++++++++++++++++- > 3 files changed, 45 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 940343beb3d4..ed4f7bf4a879 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -275,6 +275,7 @@ config ARM64 > select HAVE_SOFTIRQ_ON_OWN_STACK > select USER_STACKTRACE_SUPPORT > select VDSO_GETRANDOM > + select HAVE_RELIABLE_STACKTRACE Can we really mark this is reliable stacktrace? I am wondering if we need an intermediate state (potentially reliable stacktrace?) until we have a fully reliable stack unwinder. Thanks for working on it. --breno