On Tue, 29 Sep 2026 15:39:06 -0400 Steven Rostedt <[email protected]> wrote:
> On Mon, 28 Sep 2026 21:22:51 +0900 > Masami Hiramatsu (Google) <[email protected]> wrote: > > > > > Hm, OK. Maybe we need to add something like checking rcu_watching, but > > FTRACE_OPS_FL_RCU does not work correctly because fgraph_init_ops() only > > configures subops (gops->ops). ftrace_startup_subops() does not propagete > > that flag to graph_ops. (I guess that is yet another problem?) > > > > To guarantee no illegal RCU usage or lockdep splats if an instrumented > > function returns while RCU is offline, we can check > > > > if (unlikely(!rcu_is_watching())) > > return; > > If rcu isn't watching then that is a bug. Yeah, I made another fix for this bug. https://lore.kernel.org/all/179064115227.394389.16910234241400391996.stgit@devnote2/ > > If you enable CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING then the > ftrace_test_recursion_trylock() tests for rcu_is_watching(). We > actually had that as default for some time to trigger any ftrace calls > that were outside of RCU watching and was fixed. > > Perhaps we need to enable that on more test machines to see if anything > came back and allowed ftrace to trigger without it watching? What about adding that config to tools/testing/selftests/ftrace/config? Thank you, > > -- Steve -- Masami Hiramatsu (Google) <[email protected]>
