Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Douglas RAILLARD <douglas.raillard@arm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org (open list:TRACING),
	linux-trace-kernel@vger.kernel.org (open list:TRACING),
	"Paul E. McKenney" <paulmck@kernel.org>,
	Joel Fernandes <joel@joelfernandes.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	rcu@vger.kernel.org
Subject: Re: [PATCH] rcu: Fix rcu_torture_read ftrace event
Date: Mon, 20 Mar 2023 11:20:15 -0400	[thread overview]
Message-ID: <20230320112015.2271da9c@gandalf.local.home> (raw)
In-Reply-To: <20230306122744.236790-1-douglas.raillard@arm.com>


[ Wondering why this didn't get picked up in v6.3-rc3, I see that the
  maintainers of RCU were not Cc'd :-( ]

This is a bug that will cause unwanted results. I have a patch that will not
let the kernel build when code like this is added.

  https://patchwork.kernel.org/project/linux-trace-kernel/patch/20230309221302.642e82d9@gandalf.local.home/

( The kernel robot even failed when applying the above patch, because it
  caught the code that this patch fixes )

On Mon,  6 Mar 2023 12:27:43 +0000
Douglas RAILLARD <douglas.raillard@arm.com> wrote:

> From: Douglas Raillard <douglas.raillard@arm.com>
> 
> Fix the rcutorturename field so that its size is correctly reported in
> the text format embedded in trace.dat files. As it stands, it is
> reported as being of size 1:

And that the offsets of the following fields will be incorrect as well.

> 
>     field:char rcutorturename[8];   offset:8;       size:1; signed:0;
> 

Please add:

Cc: stable@vger.kernel.org
Fixes: 04ae87a52074e ("ftrace: Rework event_create_dir()")

Thanks,

-- Steve

> Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
> ---
>  include/trace/events/rcu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
> index 90b2fb0292cb..012fa0d171b2 100644
> --- a/include/trace/events/rcu.h
> +++ b/include/trace/events/rcu.h
> @@ -768,7 +768,7 @@ TRACE_EVENT_RCU(rcu_torture_read,
>  	TP_ARGS(rcutorturename, rhp, secs, c_old, c),
>  
>  	TP_STRUCT__entry(
> -		__field(char, rcutorturename[RCUTORTURENAME_LEN])
> +		__array(char, rcutorturename, RCUTORTURENAME_LEN)
>  		__field(struct rcu_head *, rhp)
>  		__field(unsigned long, secs)
>  		__field(unsigned long, c_old)


  parent reply	other threads:[~2023-03-20 15:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 12:27 [PATCH] rcu: Fix rcu_torture_read ftrace event Douglas RAILLARD
2023-03-06 12:54 ` Mukesh Ojha
2023-03-20 15:20 ` Steven Rostedt [this message]
2023-03-20 16:58   ` Paul E. McKenney
2023-03-20 17:36     ` Steven Rostedt
2023-03-20 18:49       ` Paul E. McKenney

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=20230320112015.2271da9c@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=douglas.raillard@arm.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.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