From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4A23E7AD77 for ; Tue, 3 Oct 2023 17:38:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbjJCRiI (ORCPT ); Tue, 3 Oct 2023 13:38:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231892AbjJCRiF (ORCPT ); Tue, 3 Oct 2023 13:38:05 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46930A6 for ; Tue, 3 Oct 2023 10:38:01 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA6D4C433C8; Tue, 3 Oct 2023 17:37:53 +0000 (UTC) Date: Tue, 3 Oct 2023 13:38:56 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Mathieu Desnoyers , linux-kernel@vger.kernel.org, Michael Jeanson , Peter Zijlstra , Alexei Starovoitov , Yonghong Song , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , bpf@vger.kernel.org, Joel Fernandes Subject: Re: [RFC PATCH v3 1/5] tracing: Introduce faultable tracepoints (v3) Message-ID: <20231003133856.2879f36f@gandalf.local.home> In-Reply-To: <99ec6025-c170-459c-8b43-58cf1a85f832@paulmck-laptop> References: <20231002202531.3160-1-mathieu.desnoyers@efficios.com> <20231002202531.3160-2-mathieu.desnoyers@efficios.com> <20231002191023.6175294d@gandalf.local.home> <97c559c9-51cf-415c-8b0b-39eba47b8898@paulmck-laptop> <20231002211936.5948253e@gandalf.local.home> <5d0771e9-332c-42cd-acf3-53d46bb691f3@paulmck-laptop> <20231003100854.7285d2a9@gandalf.local.home> <99ec6025-c170-459c-8b43-58cf1a85f832@paulmck-laptop> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Oct 2023 10:33:33 -0700 "Paul E. McKenney" wrote: > On Tue, Oct 03, 2023 at 10:08:54AM -0400, Steven Rostedt wrote: > > On Tue, 3 Oct 2023 06:44:50 -0700 > > "Paul E. McKenney" wrote: > > > > > > That way it is clear what uses what, as I read the original paragraph a > > > > couple of times and could have sworn that rcu_read_lock_trace() required > > > > tasks to not block. > > > > > > That would work for me. Would you like to send a patch, or would you > > > rather we made the adjustments? > > > > Which ever. > > OK, how about like this? Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/all/20231002211936.5948253e@gandalf.local.home/ -- Steve > > Thanx, Paul > > ------------------------------------------------------------------------ > > commit 973eb79ec46c16f13bb5b47ad14d44a1f1c79dc9 > Author: Paul E. McKenney > Date: Tue Oct 3 10:30:01 2023 -0700 > > doc: Clarify RCU Tasks reader/updater checklist > > Currently, the reader/updater compatibility rules for the three RCU > Tasks flavors are squished together in a single paragraph, which can > result in confusion. This commit therefore splits them out into a list, > clearly showing the distinction between these flavors. > > Reported-by: Steven Rostedt > Signed-off-by: Paul E. McKenney > > diff --git a/Documentation/RCU/checklist.rst b/Documentation/RCU/checklist.rst > index bd3c58c44bef..c432899aff22 100644 > --- a/Documentation/RCU/checklist.rst > +++ b/Documentation/RCU/checklist.rst > @@ -241,15 +241,22 @@ over a rather long period of time, but improvements are always welcome! > srcu_struct. The rules for the expedited RCU grace-period-wait > primitives are the same as for their non-expedited counterparts. > > - If the updater uses call_rcu_tasks() or synchronize_rcu_tasks(), > - then the readers must refrain from executing voluntary > - context switches, that is, from blocking. If the updater uses > - call_rcu_tasks_trace() or synchronize_rcu_tasks_trace(), then > - the corresponding readers must use rcu_read_lock_trace() and > - rcu_read_unlock_trace(). If an updater uses call_rcu_tasks_rude() > - or synchronize_rcu_tasks_rude(), then the corresponding readers > - must use anything that disables preemption, for example, > - preempt_disable() and preempt_enable(). > + Similarly, it is necssary to correctly use the RCU Tasks flavors: > + > + a. If the updater uses synchronize_rcu_tasks() or > + call_rcu_tasks(), then the readers must refrain from > + executing voluntary context switches, that is, from > + blocking. > + > + b. If the updater uses call_rcu_tasks_trace() > + or synchronize_rcu_tasks_trace(), then the > + corresponding readers must use rcu_read_lock_trace() > + and rcu_read_unlock_trace(). > + > + c. If an updater uses call_rcu_tasks_rude() or > + synchronize_rcu_tasks_rude(), then the corresponding > + readers must use anything that disables preemption, > + for example, preempt_disable() and preempt_enable(). > > Mixing things up will result in confusion and broken kernels, and > has even resulted in an exploitable security issue. Therefore,