[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250904223850.884188-1-dylanbhatch@google.com>
Date: Thu, 4 Sep 2025 22:38:44 +0000
From: Dylan Hatch <dylanbhatch@...gle.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
Indu Bhagat <indu.bhagat@...cle.com>, Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will@...nel.org>, Catalin Marinas <catalin.marinas@....com>,
Jiri Kosina <jikos@...nel.org>
Cc: Dylan Hatch <dylanbhatch@...gle.com>, Roman Gushchin <roman.gushchin@...ux.dev>,
Weinan Liu <wnliu@...gle.com>, Mark Rutland <mark.rutland@....com>, Ian Rogers <irogers@...gle.com>,
linux-toolchains@...r.kernel.org, linux-kernel@...r.kernel.org,
live-patching@...r.kernel.org, joe.lawrence@...hat.com,
Puranjay Mohan <puranjay@...nel.org>, Song Liu <song@...nel.org>
Subject: [PATCH v2 0/6] unwind, arm64: add sframe unwinder for kernel
This patchset implements a generic kernel sframe-based [1] unwinder.
The main goal is to support reliable stacktraces on arm64.
On x86 orc unwinder provides reliable stacktraces. But arm64 misses the
required support from objtool: it cannot generate orc unwind tables for
arm64.
Currently, there's already a sframe unwinder proposed for userspace: [2].
Since the sframe unwind table algorithm is similar, these two proposals
could integrate common functionality in the future.
Currently, only GCC supports sframe.
These patches are based on v6.17-rc4 and are available on github [3].
Ref:
[1]: https://sourceware.org/binutils/docs/sframe-spec.html
[2]: https://lore.kernel.org/lkml/cover.1730150953.git.jpoimboe@kernel.org/
[3]: https://github.com/dylanbhatch/linux/tree/sframe-v2
Changes since v1:
https://lore.kernel.org/live-patching/20250127213310.2496133-1-wnliu@google.com/
- Fixed detection of sframe support in compiler (Josh, Jens)
- Adapt latest sframe v2 header definition from userspace patch series
(Josh)
- Folded together unwinder/stacktrace patches (Prasanna)
- Fix "orphan section" warnings for .init.sframe sections (Puranjay,
Indu, Josh)
- Build VDSO without sframe (Dylan)
- Added support for modules (Weinan)
Dylan Hatch (2):
unwind: build kernel with sframe info
unwind: add sframe v2 header
Weinan Liu (4):
arm64: entry: add unwind info for various kernel entries
unwind: Implement generic sframe unwinder library
arm64/module, unwind: Add sframe support for modules.
unwind: arm64: Add reliable stacktrace with sframe unwinder.
Makefile | 8 +
arch/Kconfig | 6 +
arch/arm64/Kconfig.debug | 10 +
arch/arm64/include/asm/module.h | 6 +
arch/arm64/include/asm/stacktrace/common.h | 6 +
arch/arm64/kernel/entry.S | 10 +
arch/arm64/kernel/module.c | 5 +
arch/arm64/kernel/setup.c | 2 +
arch/arm64/kernel/stacktrace.c | 102 +++++++++
arch/arm64/kernel/vdso/Makefile | 2 +-
include/asm-generic/vmlinux.lds.h | 15 ++
include/linux/sframe_lookup.h | 45 ++++
kernel/Makefile | 1 +
kernel/sframe.h | 75 +++++++
kernel/sframe_lookup.c | 232 +++++++++++++++++++++
15 files changed, 524 insertions(+), 1 deletion(-)
create mode 100644 include/linux/sframe_lookup.h
create mode 100644 kernel/sframe.h
create mode 100644 kernel/sframe_lookup.c
--
2.51.0.355.g5224444f11-goog
Powered by blists - more mailing lists