[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <03540be1-7687-4bdc-bf38-dfd713ea09db@oracle.com>
Date: Tue, 18 Nov 2025 23:12:01 -0800
From: Indu Bhagat <indu.bhagat@...cle.com>
To: Dylan Hatch <dylanbhatch@...gle.com>, Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>, Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Jiri Kosina <jikos@...nel.org>,
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>,
Prasanna Kumar T S M <ptsm@...ux.microsoft.com>
Subject: Re: [PATCH v2 6/6] unwind: arm64: Add reliable stacktrace with sframe
unwinder.
On 11/18/25 7:17 PM, Dylan Hatch wrote:
>> For sframe v3, I believe Indu is planning to add support for marking the
>> outermost frame. That would be one definitive way to know that the
>> stack trace made it to the end.
> How would this work? Is there a way of determining at compile time
> which functions would end up being the outermost frame?
No, the compiler does not emit such a marker.
SFrame information is generated by assembler using the .cfi_*
directives. For the outermost functions, they need to be marked with a:
.cfi_undefined RA
where RA is the default return address register for the ABI.
This mechanism is formalised in the DWARF standard:
"If a Return Address register is defined in the virtual unwind table,
and its rule is undefined (for example, by DW_CFA_undefined), then there
is no return address and no call address, and the virtual unwind of
stack activations is complete."
SFrame relies on this to emit a marker for identifying outermost frame.
Powered by blists - more mailing lists