On Tue, Nov 04, 2025 at 12:22:01PM +0100, Florian Weimer wrote: > * Peter Zijlstra: > > > +/* > > + * Heuristic-based check if uprobe is installed at the function entry. > > + * > > + * Under assumption of user code being compiled with frame pointers, > > + * `push %rbp/%ebp` is a good indicator that we indeed are. > > + * > > + * Similarly, `endbr64` (assuming 64-bit mode) is also a common pattern. > > + * If we get this wrong, captured stack trace might have one extra bogus > > + * entry, but the rest of stack trace will still be meaningful. > > + */ > > +bool is_uprobe_at_func_entry(struct pt_regs *regs) > > Is this specifically for uprobes? Wouldn't it make sense to tell the > kernel when the uprobe is installed whether the frame pointer has been > set up at this point? Userspace can typically figure this out easily > enough (it's not much more difficult to find the address of the > function).
Yeah, I suppose so. Not sure the actual user interface for this allows for that. Someone would have to dig into that a bit.
