Re: [PATCH] tracing: Refuse fprobe if RCU is not watching

Steven Rostedt
2023-03-24T03:01:27Z

On Fri, 24 Mar 2023 10:51:49 +0800
Yafang Shao <laoar.shao@gmail.com> wrote:

> On Thu, Mar 23, 2023 at 8:39 PM Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > On Thu, 23 Mar 2023 13:59:34 +0800
> > Yafang Shao <laoar.shao@gmail.com> wrote:
> >
> > > I have verified the latest linux-trace tree,
> > > git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
> > > trace/core
> > >
> > > The result of "uname -r" is ''6.3.0-rc3+".
> > > This issue still exists, and after applying this patch it disappears.
> > > It can be reproduced with a simple bpf program as follows,
> > > SEC("kprobe.multi/preempt_count_sub")
> > > int fprobe_test()
> > > {
> > > return 0;
> > > }
> >
> > Still your patch is hiding a bug, not fixing one.
> >
> > Can you apply this patch and see if the bug goes away?
> >
>
> I have verified that the bug goes away after applying this patch.
> Thanks for the fix.
>

It's in tip:

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/urgent&id=f87d28673b71b35b248231a2086f9404afbb7f28

Hopefully it will make it to mainline soon.

-- Steve