Re: [PATCH v2 04/12] uprobes: revamp uprobe refcounting and lifetime management
From: Peter Zijlstra <peterz@infradead.org>
Date: 2024-07-04 08:32:05
Also in:
bpf
From: Peter Zijlstra <peterz@infradead.org>
Date: 2024-07-04 08:32:05
Also in:
bpf
On Wed, Jul 03, 2024 at 01:47:23PM -0700, Andrii Nakryiko wrote:
quoted
When I cobble all that together (it really shouldn't be one patch, but you get the idea I hope) it looks a little something like the below. I *think* it should work, but perhaps I've missed something?Well, at the very least you missed that we can't delay SRCU (or any other sleepable RCU flavor) potentially indefinitely for uretprobes, which are completely under user space control.
Sure, but that's fixable. You can work around that by having (u)tasks with a non-empty return_instance list carry a timer. When/if that timer fires, it goes and converts the SRCU references to actual references. Not so very hard to do, but very much not needed for a PoC.