From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
paulmck <paulmck@kernel.org>, Stefan Metzmacher <metze@samba.org>,
stable <stable@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] Fix: tracepoint: static call: compare data on transition from 2->1 callees
Date: Thu, 5 Aug 2021 13:57:30 -0400 (EDT) [thread overview]
Message-ID: <1270289445.7118.1628186250992.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20210805130700.0bc7e52a@oasis.local.home>
----- On Aug 5, 2021, at 1:07 PM, rostedt rostedt@goodmis.org wrote:
> On Thu, 5 Aug 2021 09:27:15 -0400
> Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
>
>> On transition from 2->1 callees, we should be comparing .data rather
>> than .func, because the same callback can be registered twice with
>> different data, and what we care about here is that the data of array
>> element 0 is unchanged to skip rcu sync.
>>
>> Link:
>> https://lore.kernel.org/io-uring/4ebea8f0-58c9-e571-fd30-0ce4f6f09c70@samba.org/
>
> FYI, You only need to show one Fixes.
>
>> Fixes: d25e37d89dd2 ("tracepoint: Optimize using static_call()")
>
> The above is fixed by the one below. Which means all the stable kernels
> that have the above, will also have the below, and thus the above is
> just redundant.
>
>> Fixes: 547305a64632 ("tracepoint: Fix out of sync data passing by static
>> caller")
>
> The above is what the patch actually fixes.
>
>> Fixes: 352384d5c84e ("tracepoints: Update static_call before tp_funcs when
>> adding a tracepoint")
>
> How does this patch fix the above? Perhaps the above did not go enough
> to fix the issue, but it's unrelated.
OK
>
> I'll remove the first and last Fixes tag.
OK
>
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: "Paul E. McKenney" <paulmck@kernel.org>
>> Cc: Stefan Metzmacher <metze@samba.org>
>> Cc: <stable@vger.kernel.org> # 5.10+
>
> The "# 5.10+" is now obsolete, and not needed. The Fixes tag is used to
> determine where this gets backported to.
>
> Other than that. This patch looks good.
Great, thanks!
Mathieu
>
> -- Steve
>
>> ---
>> kernel/tracepoint.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
>> index fc32821f8240..133b6454b287 100644
>> --- a/kernel/tracepoint.c
>> +++ b/kernel/tracepoint.c
>> @@ -338,7 +338,7 @@ static int tracepoint_remove_func(struct tracepoint *tp,
>> } else {
>> rcu_assign_pointer(tp->funcs, tp_funcs);
>> tracepoint_update_call(tp, tp_funcs,
>> - tp_funcs[0].func != old[0].func);
>> + tp_funcs[0].data != old[0].data);
>> }
>> release_probes(old);
> > return 0;
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2021-08-05 17:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 13:27 [PATCH 0/3] tracepoint static call fixes Mathieu Desnoyers
2021-08-05 13:27 ` [PATCH 1/3] Fix: tracepoint: static call: compare data on transition from 2->1 callees Mathieu Desnoyers
2021-08-05 17:07 ` Steven Rostedt
2021-08-05 17:57 ` Mathieu Desnoyers [this message]
2021-08-05 13:27 ` [PATCH 2/3] Fix: tracepoint: static call function vs data state mismatch (v2) Mathieu Desnoyers
2021-08-05 18:56 ` Steven Rostedt
2021-08-05 19:15 ` Mathieu Desnoyers
2021-08-05 19:38 ` Steven Rostedt
2021-08-05 19:42 ` Mathieu Desnoyers
2021-08-05 13:27 ` [PATCH 3/3] Fix: tracepoint: rcu get state and cond sync for static call updates (v2) Mathieu Desnoyers
2021-08-05 19:12 ` Steven Rostedt
2021-08-05 19:29 ` [PATCH v3 1/1] Fix: tracepoint: rcu get state and cond sync for static call updates Mathieu Desnoyers
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=1270289445.7118.1628186250992.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metze@samba.org \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).