Re: [PATCH] tracing/user_events: Run BPF program if attached

From: Beau Belgrave
Date: Wed May 17 2023 - 20:14:34 EST


On Wed, May 17, 2023 at 07:25:28PM -0400, Steven Rostedt wrote:
> On Wed, 17 May 2023 16:14:43 -0700
> Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> > On Wed, May 17, 2023 at 4:01 PM Beau Belgrave <beaub@xxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > Do you mind giving me your Signed-off-by for these?
> >
> > Assuming you have some test-cases that you've run them through, then yes:
>
> Beau,
>
> Can you update the tools/testing/selftests/user_events/ to make sure that
> it triggers the lockdep splat without these updates (assuming that it does
> trigger without these patches). Then add these patches to make sure the
> splat goes away. This will confirm that the patches do what is expected of
> them.
>

Yes, I have run these through selftests with CONFIG_DEBUG_ATOMIC_SLEEP=y.

I can confirm without the patches it splats with that setting. When
these have been applied, the splat is gone.

> I usually run the selftests for tracing and for your user events with
> lockdep and prove locking enabled. But it may have triggered on something
> else disabling it when I ran my tests, in which case I sometimes disable
> that and forget to re-enable it.
>

Do you run with CONFIG_DEBUG_ATOMIC_SLEEP? It will not splat with just
CONFIG_PROVE_LOCKING and CONFIG_PROVE_RCU, which bit me here. I'm now
running all three now that I know better.

> -- Steve

Thanks,
-Beau