public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: David Carlier <devnexen@gmail.com>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Vineeth Pillai (Google)" <vineeth@bitbyteword.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] tracepoint: add lockdep rcu_is_watching() check to trace_call__##name()
Date: Thu, 30 Apr 2026 09:35:54 -0400	[thread overview]
Message-ID: <20260430093554.756072d7@gandalf.local.home> (raw)
In-Reply-To: <20260430053511.8767-1-devnexen@gmail.com>

On Thu, 30 Apr 2026 06:35:10 +0100
David Carlier <devnexen@gmail.com> wrote:

> Without it, sites converted from trace_foo(args) to trace_call__foo(args)
> lose the WARN_ONCE(!rcu_is_watching()) coverage under CONFIG_LOCKDEP when
> the tracepoint is enabled - the case that commit c2679254b9c9 ("tracing:
> Make tracepoint lockdep check actually test something") added the warning
> for.
> 
> Mirror the same block in both trace_call__##name() bodies, gated by
> (cond) in __DECLARE_TRACE to match its trace_##name() and ungated in
> __DECLARE_TRACE_SYSCALL.

If it gets called without rcu watching, the rcu dereference in
__DO_TRACE_CALL() will trigger.

No need to add the warning here. The reason the trace_foo() had it, was to
trigger when the tracepoint WASN'T enabled.

Now, perhaps where the warning should go, is in the trace_foo_enabled()
code.

-- Steve

  reply	other threads:[~2026-04-30 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30  5:35 [PATCH] tracepoint: add lockdep rcu_is_watching() check to trace_call__##name() David Carlier
2026-04-30 13:35 ` Steven Rostedt [this message]
2026-04-30 14:41 ` [PATCH v2] tracepoint: add lockdep rcu_is_watching() check to trace_##name##_enabled() David Carlier
2026-04-30 20:01   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260430093554.756072d7@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=devnexen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=peterz@infradead.org \
    --cc=vineeth@bitbyteword.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox