Thread (52 messages) 52 messages, 7 authors, 2023-06-08

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

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2023-05-17 19:37:22
Also in: bpf, lkml

On Wed, May 17, 2023 at 12:26 PM Linus Torvalds
[off-list ref] wrote:
Also note that this does NOT fix the incorrect RCU walks.
.. this is the patch that I think should go on top of it to fix the
misleading "safe" and the incorrect RCU walk.

NOTE! This adds that

        lockdep_assert_held(&event_mutex);

to user_event_enabler_update() too. It's already there in
user_event_enabler_write(), but I'm not actually convinced this has
gotten enough coverage checking, so I also did it in that caller.

Some callers obviously hold that mutex. Others are much less obvious,
eg that user_event_reg() -> update_enable_bit_for() chain. I *assume*
all the 'class->reg()' callers get the event mutex, but I did not in
any way check that it is true.

So that lockdep annotation should be actually *tested* with lockdep
enabled and somebody doing all these operations.

Final note: I do not know this code *AT*ALL*. I'm literally just going
by "this is the only correct coding pattern to use", not by some
deeper understanding of what the code actually wants to do.

                   Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help