On Thu, Sep 4, 2025 at 11:57 AM Oleg Nesterov <o...@redhat.com> wrote: > > On 09/04, Andrii Nakryiko wrote: > > > > On Thu, Sep 4, 2025 at 8:02 AM Alexei Starovoitov > > <alexei.starovoi...@gmail.com> wrote: > > > > > > On Thu, Sep 4, 2025 at 4:26 AM Oleg Nesterov <o...@redhat.com> wrote: > > > > > > > > On 09/04, Jiri Olsa wrote: > > > > > > > > > > > > > > > ok, got excited too soon.. so you meant getting rid of is_unique > > > > > check only for this patch and have just change below.. but keep > > > > > the unique/exclusive flag from patch#1 > > > > > > > > Yes, this is what I meant, > > > > > > > > > IIUC Andrii would remove the unique flag completely? > > > > > > > > Lets wait for Andrii... > > > > > > Not Andrii, but I see only negatives in this extra flag. > > > It doesn't add any safety or guardrails. > > > No need to pollute uapi with pointless flags. > > > > +1. I think it's fine to just have something like > > > > if (unlikely(instruction_pointer(regs) != bp_vaddr)) > > goto out; > > > > after all uprobe callbacks were processed. Even if every single one of > > them modify IP, the last one that did that wins. > > OK. If any consumer can change regs->ip, then I can only repeat: > > Yes... but what if we there are multiple consumers? The 1st one > changes > instruction_pointer, the next is unaware. Or it may change regs->ip > too... > > > Others (if they care) > > can detect this. > > How? If the the consumer which changes regs->ip is not the 1st one? >
We are probably speaking past each other. uprobe consumers (including BPF ones) see struct pt_regs, so they get what's the latest regs->ip. Sure, they won't know that it was changed, but oh well, not sure that matters all that much. And if it does matter, then we can solve that by giving users ability to carefully order consumers (we have similar problems and some solutions for that in BPF for some other BPF programs; it just never been necessary for uprobes/kprobes specifically). > That said. If you guys don't see a problem - I won't even try to argue. I don't, yep. > > As I said many times, I have no idea how people actually use uprobes ;) > > Oleg. >