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 11F00E776D1 for ; Mon, 2 Oct 2023 23:09:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237151AbjJBXJ1 (ORCPT ); Mon, 2 Oct 2023 19:09:27 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 \