Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1626641rdb; Mon, 2 Oct 2023 16:09:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMPBgV4ms48/2UhuETmf/Cth52Fi3+M3PTsMN2qjGq949gv8iJbMzWlPVR+apOrApwi39r X-Received: by 2002:a05:6808:2126:b0:3ae:1672:16ec with SMTP id r38-20020a056808212600b003ae167216ecmr15880909oiw.11.1696288175173; Mon, 02 Oct 2023 16:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696288175; cv=none; d=google.com; s=arc-20160816; b=hl+T0AbykFbTMvcT8edkZhFOrFiFim2U2BcZyiyGy2WkPz9Qg0WuIznzoImx/Cqhpm hH8f1UqU9KL22w21W0T0L5hD8KutvRL9lurhYOWv3arKvUu1VPyRn0ZGgBRSXP3oBvi8 ddVkpHG1r9ECIugssESRwUI17s+mxLYFogBAFlYq4Nwb+64ezgU0HPS/LwVeH/PVHrRx Dsvcmu8uK7eQdzT2MI+CytwkcqK7S3sIS3Dj4XXvoTFsnJCozSk+rIbPoSBWRLo6irf9 zTn7X/XVzA8a/5HcW19oPfzDunm/EJ9Rn+xXDu3CWStb0qA96gqJXTHxBsOnieczYOdy 6MGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=jHNsqZTqK+CWflNl6jVYozBZtc3uP2mldF37r/1tKYQ=; fh=QSJblmyFwzwDD4Xpa3TlZ1yf/r9Qg59myavvbJLatB8=; b=LSFARJ+4KHSSQAP7EqxG9fXU0CGLvIv5M7Xj5BoNMPXyyT+USWbzlZTKOtt94kkM+/ VlBru350Oxw2lH2iPUmorgaTFu8GBAtlaRCABTJV6PWIniyf+LkABsDlgSRN94aYj+R6 FNCAOzBYFZdGJZNrFlKeW7ZNh7ajR3XQbJXjgAiXB0zx691uj6y0UcmAo+57iY+BoupY Glb40tcfcnmBCv0VSe+Yhg5PvUZWxL82yDgjAo1Gy+LToxRPaKkNFpZjbE5ODONU8ucv 7Bx6Uw1CzB3z24PGwfmO+nACpJ/G/USSx5LPCfruUenV27IQPm1vnpY0LHxJs9GyIgIb YeVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id v20-20020a17090ac91400b00269584b6a10si9502pjt.15.2023.10.02.16.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 16:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 214FA8040385; Mon, 2 Oct 2023 16:09:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237160AbjJBXJ0 (ORCPT + 99 others); Mon, 2 Oct 2023 19:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbjJBXJZ (ORCPT ); Mon, 2 Oct 2023 19:09:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C957B4 for ; Mon, 2 Oct 2023 16:09:22 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17546C433C7; Mon, 2 Oct 2023 23:09:19 +0000 (UTC) Date: Mon, 2 Oct 2023 19:10:23 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, Michael Jeanson , Peter Zijlstra , Alexei Starovoitov , Yonghong Song , "Paul E . McKenney" , 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: <20231002191023.6175294d@gandalf.local.home> In-Reply-To: <20231002202531.3160-2-mathieu.desnoyers@efficios.com> References: <20231002202531.3160-1-mathieu.desnoyers@efficios.com> <20231002202531.3160-2-mathieu.desnoyers@efficios.com> 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 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 02 Oct 2023 16:09:33 -0700 (PDT) On Mon, 2 Oct 2023 16:25:27 -0400 Mathieu Desnoyers wrote: > @@ -202,8 +198,12 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) > if (WARN_ON_ONCE(RCUIDLE_COND(rcuidle))) \ > return; \ > \ > - /* keep srcu and sched-rcu usage consistent */ \ > - preempt_disable_notrace(); \ > + if (mayfault) { \ > + rcu_read_lock_trace(); \ I thought rcu_trace was for the case that a task can not voluntarily call schedule. If this tracepoint tries to read user space memory that isn't paged in, and faults, can't the faulting logic call schedule and break this requirement? -- Steve > + } else { \ > + /* keep srcu and sched-rcu usage consistent */ \ > + preempt_disable_notrace(); \ > + } \ > \ > /* \ > * For rcuidle callers, use srcu since sched-rcu \