Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4890545rdb; Tue, 12 Dec 2023 12:10:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdkkMuY4pMNB2usEkyJ3ibXYMrmsUX+bQS6M7Q1Wckhx8ZP4RtsucVpH3jbSCceagpCjWM X-Received: by 2002:a17:902:6f02:b0:1d0:55c7:3902 with SMTP id w2-20020a1709026f0200b001d055c73902mr3704975plk.39.1702411806199; Tue, 12 Dec 2023 12:10:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702411806; cv=none; d=google.com; s=arc-20160816; b=wWBNrkaYJCxm1gmn2H6NraIv8iVEI3YShbt+5B+848wA5ByUot+QvN2Z9maZYUBjw+ D2t5NoJbNB/ltTuZ4exzuVyFA+E29tBokz6VVouCGjF3BOImI++ro47O1lcZEL0LHpDI epaMg47ljebAuxDqyY3tApMvEYBafa6uQmFM/XibyI5RbcloYoSWUNGfzIwwCOOd0r1q KGT32e4o0IVjTsBs1b/KfHaRy1TfsfjYMiWx34dotu4XwAvVcazbYXW2q4olic2JDmCQ d7uFJKAu5+uYBy7xeTn9qT16JxPTrKjObhy25uF7G/UonczO0x0Pa42rI8GUF68wAHo7 hoYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=m+Xh20zqhrr/iCJFFTsT9uro5zbSBKHOa3I/xPuTFPg=; fh=VQcH+7Vx9gjbi8mRKqrqxRqwTw5B8bP6szsGbiNFtsQ=; b=qKs8m1XeMvQAWNP+vSrpc3Mqs4GTODpFmxyQcxK9ChbDD7Pja9BlbZqPREbwFEXe6Z 4OqnGqJa2rsEaH+SiOmejomRXYBtZsLu2NZA/G7lBnSwWBUrki0ggL7ex9/91N1hkK/L w1XKv25k1nHR5EAgB3z+qWIk/LG2kjzBi7t5joNI2K7Qv1MpzvW4aoW8moEwVU+H3O6V 62DApCnrism4yGlpWL6Lhy4Wde6vt7gPxSXx9yUmVqJwQweu0RGtvHQ/622BQgx4mV+q 7fnusZIbqXqCOpr1uoQK8UHfAUvXRurkqXENV5SPQFyE02Ixjr2WhJSfiipnYs8o5Ovf QOpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=HNUd3McG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ji7-20020a170903324700b001d2f6d7f080si6712142plb.12.2023.12.12.12.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 12:10:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=HNUd3McG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 58B1580213A2; Tue, 12 Dec 2023 12:10:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377287AbjLLUJs (ORCPT + 99 others); Tue, 12 Dec 2023 15:09:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377184AbjLLUJi (ORCPT ); Tue, 12 Dec 2023 15:09:38 -0500 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A3A8123 for ; Tue, 12 Dec 2023 12:09:42 -0800 (PST) Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6d855efb920so4832391a34.1 for ; Tue, 12 Dec 2023 12:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1702411782; x=1703016582; darn=vger.kernel.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=m+Xh20zqhrr/iCJFFTsT9uro5zbSBKHOa3I/xPuTFPg=; b=HNUd3McGI3PBXZePBJln6N7UxShskPc8zFMpV8hOI+Rfbc6TnNQOq9exgo518dAT/m fnhaGrrvrQCEmS+wMM1wixTObiMIaB88MqguBn3tDOtyT4yDIIOoSZRj4t0OxfRqh/Yj tIPGLK4uecZCNjZ64ekMpTlXsEe+anKkkA5a4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702411782; x=1703016582; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m+Xh20zqhrr/iCJFFTsT9uro5zbSBKHOa3I/xPuTFPg=; b=ROvPNfJ18fHb/ViskSH+sGg0ym2bDkGkhqCjT+exaCu5+71uZl47F3aiK+645V8FL3 dcpDh+Hf+gspWsN1Jynq8WC0DvcThGx9GRorfEwLIqIuM420v/Zt2eE7K682DRWR18XB fCVRlHHjstfh+pCmqAq+4XxWbnl6HwbhXgP6F+13k84In9g7eQe7oU7n2rOMPKBv1Ox8 pJdF9puxz9HWPe7aKy7UNWGEoq5tp+HSD1Hvy7+v7awi8XWxPIdDk2njllUibYqE5o5Y rTuTAsTM/tlkhC82/AaD4dXI21EyNzW/DPbUhRbYx9cYTvU8c16+gYSxYxBKbt6gDWjI oiHg== X-Gm-Message-State: AOJu0YwBSvy9wNte0eu0laokrggqqw7g+uKL447/al7/LqiPxA2uVnmb weEOWRV/rJjnlBQrqArskpy2ZQ== X-Received: by 2002:a9d:7351:0:b0:6d9:e67b:7890 with SMTP id l17-20020a9d7351000000b006d9e67b7890mr7569650otk.32.1702411782275; Tue, 12 Dec 2023 12:09:42 -0800 (PST) Received: from smtpclient.apple ([185.189.25.71]) by smtp.gmail.com with ESMTPSA id cy26-20020a056830699a00b006d9a339773csm16054otb.27.2023.12.12.12.09.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Dec 2023 12:09:41 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Joel Fernandes Mime-Version: 1.0 (1.0) Subject: Re: [PATCH rcu 3/5] doc: Clarify RCU Tasks reader/updater checklist Date: Tue, 12 Dec 2023 15:09:28 -0500 Message-Id: <019C4075-EDA3-48A9-8762-CBB28D0BA37C@joelfernandes.org> References: <20231212172653.11485-3-neeraj.iitr10@gmail.com> Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, paulmck@kernel.org, Neeraj.Upadhyay@amd.com, Mathieu Desnoyers In-Reply-To: <20231212172653.11485-3-neeraj.iitr10@gmail.com> To: "Neeraj Upadhyay (AMD)" X-Mailer: iPhone Mail (20B101) X-Spam-Status: No, score=1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Dec 2023 12:10:03 -0800 (PST) X-Spam-Level: * > On Dec 12, 2023, at 12:27 PM, Neeraj Upadhyay (AMD) wrote: >=20 > =EF=BB=BFFrom: "Paul E. McKenney" >=20 > 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. >=20 > Link: https://lore.kernel.org/all/20231002211936.5948253e@gandalf.local.ho= me/ >=20 > Reported-by: Steven Rostedt > Signed-off-by: Paul E. McKenney > Reviewed-by: Mathieu Desnoyers > Reviewed-by: Steven Rostedt (Google) > Signed-off-by: Neeraj Upadhyay (AMD) > --- > Documentation/RCU/checklist.rst | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) >=20 > 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 a= re always welcome! > srcu_struct. The rules for the expedited RCU grace-period-wait > primitives are the same as for their non-expedited counterparts. >=20 > - 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: Typo: necessary. Probably no need to resend this one, just fix in the PR. Thanks, - Joel > + > + 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(). >=20 > Mixing things up will result in confusion and broken kernels, and > has even resulted in an exploitable security issue. Therefore, > --=20 > 2.40.1 >=20 >=20