On Thu, May 15, 2025 at 10:24:42AM -0700, Andrii Nakryiko wrote: SNIP
> > diff --git a/tools/testing/selftests/bpf/progs/uprobe_syscall_executed.c > > b/tools/testing/selftests/bpf/progs/uprobe_syscall_executed.c > > index 0d7f1a7db2e2..c4c3447378ba 100644 > > --- a/tools/testing/selftests/bpf/progs/uprobe_syscall_executed.c > > +++ b/tools/testing/selftests/bpf/progs/uprobe_syscall_executed.c > > @@ -8,10 +8,17 @@ struct pt_regs regs; > > char _license[] SEC("license") = "GPL"; > > > > int executed = 0; > > +int pid; > > > > -SEC("uretprobe.multi") > > -int test(struct pt_regs *regs) > > +static int inc_executed(void) > > { > > - executed = 1; > > + if (bpf_get_current_pid_tgid() >> 32 == pid) > > + executed++; > > it's customary (and makes sense to me) with filtering like this to not > add nestedness: > > > if (bpf_get_current_pid_tgid() >> 32 != pid) > return 0; > > executed += 1; > return 0; ok, will change jirka > > > return 0; > > } > > + > > +SEC("uretprobe.multi") > > +int test_uretprobe_multi(struct pt_regs *ctx) > > +{ > > + return inc_executed(); > > +} > > -- > > 2.49.0 > >