Re: [PATCH 0/3] tracing: Fix some selftest issues

From: Steven Rostedt
Date: Mon Jun 10 2024 - 15:49:42 EST


On Mon, 10 Jun 2024 11:10:01 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> > But you don't explain what exactly the conflict is. What about those
> > events causes kprobe selftests to fail?
>
> I also found another problem on these modules. These modules get trace
> event file references to prevent removing probes. Therefore, if we
> embed these modules, we can not remove these events forever!
>
> /*
> * Now get the gen_kprobe_test event file. We need to prevent
> * the instance and event from disappearing from underneath
> * us, which trace_get_event_file() does (though in this case
> * we're using the top-level instance which never goes away).
> */
> gen_kprobe_test = trace_get_event_file(NULL, "kprobes",
> "gen_kprobe_test");
> if (IS_ERR(gen_kprobe_test)) {
> ret = PTR_ERR(gen_kprobe_test);
> goto delete;
> }
>
> This means most ftracetest fails because we can not clean up the
> tracing state by removing dynamic events, which are installed while
> booting.
> Note that these references (locks) will be removed when the module
> is unloaded.

I'm fine if you want to force these as modules. Just make sure the change
log lists all the issues of them not being modules.

-- Steve