Re: kernel BUG at net/rxrpc/local_object.c:LINE!

From: David Howells
Date: Tue Aug 13 2019 - 11:06:56 EST


Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:

> > I meant that I don't know how to turn a tracepoint on from inside the kernel.
>
> This /sys/kernel/debug/tracing/events/rxrpc/rxrpc_local/enable in:
> echo 1 > /sys/kernel/debug/tracing/events/rxrpc/rxrpc_local/enable
> should map to some global variable, right? If so, it should be
> possible to initialize that var to 1 statically. Or that won't work
> for some reason?

As I understand it, it's all hidden inside of tracing macros and ftrace
infrastructure and involves runtime patching the code to enable tracepoints
(they're effectively NOP'ed out when not in use).

So, no, it's not that simple.

I asked Steven and he says:

trace_set_clr_event("sched", "sched_switch", 1);

is the same as

echo 1 > events/sched/sched_switch/enable

So it can be done. Will syzbot actually collect the trace log?

David