From: Jens Remus <jremus@linux.ibm.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Steven Rostedt <rostedt@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Indu Bhagat <ibhagatgnu@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Dylan Hatch <dylanbhatch@google.com>,
Weinan Liu <wnliu@google.com>
Cc: Jens Remus <jremus@linux.ibm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH v1 0/4] arm64: SFrame user space unwinding
Date: Fri, 17 Apr 2026 17:08:23 +0200 [thread overview]
Message-ID: <20260417150827.1183376-1-jremus@linux.ibm.com> (raw)
This series adds arm64 support for unwinding of user space using SFrame V3.
It is based on Josh's, Steven's, and my work.
Prerequirements:
This series applies on top of the latest unwind user sframe series
"[PATCH v13 00/18] unwind_deferred: Implement sframe handling":
https://lore.kernel.org/all/20260127150554.2760964-1-jremus@linux.ibm.com/
For which Steven Rostedt kindly maintains a branch:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git sframe/core
Like above series it depends on binutils 2.46 to be used to build
executables and libraries (e.g. vDSO) with SFrame V3 on aarch64
(using the assembler option --gsframe-3).
The unwind user sframe series depends on a Glibc patch from Josh, that
adds support for the prctls introduced in the Kernel:
https://lore.kernel.org/all/20250122023517.lmztuocecdjqzfhc@jpoimboe/
Note that Josh's Glibc patch needs to be adjusted for the updated prctl
numbers from "[PATCH v13 18/18] unwind_user/sframe: Add prctl() interface
for registering .sframe sections":
https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/diff/include/uapi/linux/prctl.h?h=sframe/core
Overview:
Patch 1 enables deferred FP-based unwinding of user space on arm64.
This is used by unwind user as fallback if SFrame is not available.
Patch 2 adds an unsafe_copy_from_user() implementation for arm64.
This is needed by unwind user sframe to access .sframe sections.
Patch 3 enables .sframe generation in vDSO on arm64.
Patch 4 enables deferred SFrame-based unwinding of user space on arm64.
Usage:
perf tools already support the deferred unwinding infrastructure by
using option "--call-graph fp,defer" (name subject to change):
$ perf record -F 999 --call-graph fp,defer /path/to/executable
$ perf script
Limitations:
Support for PAC is not yet implemented. Note that SFrame V3 already
provides the required information though:
SFRAME_V3_AARCH64_FDE_PAUTH_KEY(fde_info)
SFRAME_V3_AARCH64_FRE_MANGLED_RA_P(fre_info)
Thanks and regards,
Jens
Jens Remus (4):
arm64/unwind_user/fp: Enable HAVE_UNWIND_USER_FP
arm64/uaccess: Add unsafe_copy_from_user() implementation
arm64/vdso: Enable SFrame generation in vDSO
arm64/unwind_user/sframe: Enable sframe unwinding on arm64
arch/arm64/Kconfig | 2 +
arch/arm64/include/asm/uaccess.h | 39 +++++++++----
arch/arm64/include/asm/unwind_user.h | 65 +++++++++++++++++++++
arch/arm64/include/asm/unwind_user_sframe.h | 8 +++
arch/arm64/kernel/vdso/Makefile | 14 ++++-
arch/arm64/kernel/vdso/vdso.lds.S | 21 +++++++
6 files changed, 137 insertions(+), 12 deletions(-)
create mode 100644 arch/arm64/include/asm/unwind_user.h
create mode 100644 arch/arm64/include/asm/unwind_user_sframe.h
--
2.51.0
next reply other threads:[~2026-04-17 15:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 15:08 Jens Remus [this message]
2026-04-17 15:08 ` [PATCH v1 1/4] arm64/unwind_user/fp: Enable HAVE_UNWIND_USER_FP Jens Remus
2026-04-17 15:08 ` [PATCH v1 2/4] arm64/uaccess: Add unsafe_copy_from_user() implementation Jens Remus
2026-04-17 15:08 ` [PATCH v1 3/4] arm64/vdso: Enable SFrame generation in vDSO Jens Remus
2026-04-17 15:08 ` [PATCH v1 4/4] arm64/unwind_user/sframe: Enable sframe unwinding on arm64 Jens Remus
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=20260417150827.1183376-1-jremus@linux.ibm.com \
--to=jremus@linux.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=dylanbhatch@google.com \
--cc=hca@linux.ibm.com \
--cc=ibhagatgnu@gmail.com \
--cc=iii@linux.ibm.com \
--cc=jpoimboe@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@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