From: Dylan Hatch <dylanbhatch@google.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Indu Bhagat <indu.bhagat@oracle.com>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Jiri Kosina <jikos@kernel.org>
Cc: Dylan Hatch <dylanbhatch@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Weinan Liu <wnliu@google.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Rogers <irogers@google.com>,
linux-toolchains@vger.kernel.org, linux-kernel@vger.kernel.org,
live-patching@vger.kernel.org, joe.lawrence@redhat.com,
Puranjay Mohan <puranjay@kernel.org>, Song Liu <song@kernel.org>
Subject: [PATCH v2 0/6] unwind, arm64: add sframe unwinder for kernel
Date: Thu, 4 Sep 2025 22:38:44 +0000 [thread overview]
Message-ID: <20250904223850.884188-1-dylanbhatch@google.com> (raw)
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
next reply other threads:[~2025-09-04 22:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 22:38 Dylan Hatch [this message]
2025-09-04 22:38 ` [PATCH v2 1/6] unwind: build kernel with sframe info Dylan Hatch
2025-09-04 22:38 ` [PATCH v2 2/6] arm64: entry: add unwind info for various kernel entries Dylan Hatch
2025-09-04 22:38 ` [PATCH v2 3/6] unwind: add sframe v2 header Dylan Hatch
2025-09-04 22:38 ` [PATCH v2 4/6] unwind: Implement generic sframe unwinder library Dylan Hatch
2025-09-04 22:38 ` [PATCH v2 5/6] arm64/module, unwind: Add sframe support for modules Dylan Hatch
2025-09-04 22:38 ` [PATCH v2 6/6] unwind: arm64: Add reliable stacktrace with sframe unwinder Dylan Hatch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250904223850.884188-1-dylanbhatch@google.com \
--to=dylanbhatch@google.com \
--cc=catalin.marinas@arm.com \
--cc=indu.bhagat@oracle.com \
--cc=irogers@google.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-toolchains@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=puranjay@kernel.org \
--cc=roman.gushchin@linux.dev \
--cc=rostedt@goodmis.org \
--cc=song@kernel.org \
--cc=will@kernel.org \
--cc=wnliu@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).