From: Indu Bhagat <indu.bhagat@oracle.com>
To: Puranjay Mohan <puranjay12@gmail.com>,
Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Dylan Hatch <dylanbhatch@google.com>, Song Liu <song@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Jiri Kosina <jikos@kernel.org>,
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>
Subject: Re: [PATCH v2 0/6] unwind, arm64: add sframe unwinder for kernel
Date: Tue, 18 Nov 2025 10:29:46 -0800 [thread overview]
Message-ID: <f24ae67c-b4f1-4c31-992b-d414cb793f7d@oracle.com> (raw)
In-Reply-To: <CANk7y0hKH6vvWf3Lyc678uvF9YWStMzO-Sj8yb3sbS4=4dxC6Q@mail.gmail.com>
On 11/17/25 4:49 PM, Puranjay Mohan wrote:
> On Tue, Nov 18, 2025 at 1:10 AM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>>
>> On Mon, Nov 17, 2025 at 06:42:23PM -0500, Steven Rostedt wrote:
>>> On Mon, 17 Nov 2025 15:06:32 -0800
>>> Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>>>
>>>> The ORC unwinder marks the unwind "unreliable" if it has to fall back to
>>>> frame pointers.
>>>>
>>>> But that's not a problem for livepatch because it only[*] unwinds
>>>> blocked/sleeping tasks, which shouldn't have BPF on their stack anyway.
>>>>
>>>> [*] with one exception: the task calling into livepatch
>>>
>>> It may be a problem with preempted tasks right? I believe with PREEMPT_LAZY
>>> (and definitely with PREEMPT_RT) BPF programs can be preempted.
>>
>> In that case, then yes, that stack would be marked unreliable and
>> livepatch would have to go try and patch the task later.
>>
>> If it were an isolated case, that would be fine, but if BPF were
>> consistently on the same task's stack, it could stall the completion of
>> the livepatch indefinitely.
>>
>> I haven't (yet?) heard of BPF-induced livepatch stalls happening in
>> reality, but maybe it's only a matter of time :-/
>>
>> To fix that, I suppose we would need some kind of dynamic ORC
>> registration interface. Similar to what has been discussed with
>> sframe+JIT.
>
> I work with the BPF JITs and would be interested in exploring this further,
> can you point me to this discussion if it happened on the list.
>
We discussed SFrame/JIT topic earlier this year in our monthly SFrame
meetings. I can point you to the meeting notes in a separate email. We
had some discussion around:
- SFrame specification: Allow efficient addition, removal and update
of data in SFrame sections. A part of the challenge is in representing
the variety of frames a JIT may use.
- SFrame APIs with JIT: Efficient SFrame stack trace data
manipulation by JIT.
- Interface with Linux kernel: Efficient SFrame stack trace data
registration and update stack trace data.
It will be great to have more collaboration and brainstorming, and to
include BPF/JIT in the discussions.
>>
>> If BPF were to always use frame pointers then there would be only a very
>> limited set of ORC entries (either "frame pointer" or "undefined") for a
>> given BPF function and it shouldn't be too complicated.
>>
>> --
>> Josh
next prev parent reply other threads:[~2025-11-18 18:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 22:38 [PATCH v2 0/6] unwind, arm64: add sframe unwinder for kernel Dylan Hatch
2025-09-04 22:38 ` [PATCH v2 1/6] unwind: build kernel with sframe info Dylan Hatch
2025-11-14 13:34 ` Will Deacon
2025-11-19 14:59 ` Jens Remus
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-09 16:44 ` Puranjay Mohan
2025-09-09 18:39 ` Indu Bhagat
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
2025-09-17 23:41 ` Josh Poimboeuf
2025-11-15 6:44 ` Dylan Hatch
2025-11-17 23:01 ` Josh Poimboeuf
2025-11-19 3:17 ` Dylan Hatch
2025-11-19 7:12 ` Indu Bhagat
2025-09-29 19:46 ` [PATCH v2 0/6] unwind, arm64: add sframe unwinder for kernel Song Liu
2025-09-29 19:55 ` Puranjay Mohan
2025-11-15 6:50 ` Dylan Hatch
2025-11-17 23:06 ` Josh Poimboeuf
2025-11-17 23:42 ` Steven Rostedt
2025-11-18 0:10 ` Josh Poimboeuf
2025-11-18 0:49 ` Puranjay Mohan
2025-11-18 5:18 ` Josh Poimboeuf
2025-11-18 18:20 ` Steven Rostedt
2025-11-18 18:29 ` Indu Bhagat [this message]
2025-11-17 23:50 ` Puranjay Mohan
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=f24ae67c-b4f1-4c31-992b-d414cb793f7d@oracle.com \
--to=indu.bhagat@oracle.com \
--cc=catalin.marinas@arm.com \
--cc=dylanbhatch@google.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=puranjay12@gmail.com \
--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).