From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796099080; b=bEtinBnYFJ5YlCdF2FpU/6d4Ltq3UGDE8y7pQSzLuUc7cPSMDeb98CZBto2aR7xsLYYL zsOKmU2km+n1RS5SzSjDyB4VGYHqBd+obdrJjeN4oEqCB2q1Ps3Fii7h9MaHsT/k1a7ha XVin/R0DcyYUBxfA45Xx+IC3I1zjJWKqFzt67krhM3QFiO/OBW2gi4R2/di8/6UAphQLH V80VPop/g/B2xOp6QYC9shdfzTRtmNWSPYwDd1Mn1HJ/9t148EwyizXUF5W885R4+zI+E YLOiCvQv9xdRbfDSoyc5pF9bwqKqsdKt+lQBSaiKtJVKAcXL/c7IN97Ndh4G+5Ed/8w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796099080; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=3Kbsad6WZYW/MRQMkgcC40veuOWfbNrTDdNbCl362cY=; b=5L8LN2oegzJxTtshIDXKWzbHWKFC9MmaQ+J47sVbP9IzXrqoRWSHdgb3LreSEoslIs2G t1m9t/hIxxPJgPBNmXKhJjn/y1AE4W5rFRecRIeVFbJny08i+3K3EExa93PBF4tvENw+e SJhMfb99qwveQXHtDCqU+VbHl0Ul9gj/yNT70ofBnw4kdzqXIlp1tl/keZH1ZvtuoEISn W2k1LchqsArHVQs/qMvS1kK7o1Hiw4T/Z7T2yh7852f3jCmQLQMd1q9Xdq0BC9aIzVXAe 3/EjSXcIf8BSgOnS0W09UCyCMz4OEKQZT39z/PBb1bcg/fG3hHBeJYBS/y1i7SGB2zg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=T+ojH5vv; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A846A606A31A; Tue, 1 Dec 2026 04:24:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=T+ojH5vv Received: by smtp.kernel.org (Postfix) with ESMTPSA id A871F1F00897; Tue, 1 Dec 2026 04:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796099080; bh=3Kbsad6WZYW/MRQMkgcC40veuOWfbNrTDdNbCl362cY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=T+ojH5vv7kLcUewA8HWNuvCY54cKtEfTTQqlgE/Uk1Y5nBrJdVlggjg/rWYX29nat Ln93mbMc7WNcDT2NW00oOJGfCUfVOQKjZXZn5n3L8nTR/LC0IIDgb/E9ekTHYTiJ5E 7dazJerWUmoAX0dSpBcrfK8Ly+CF5mNRzjeGFmsngEQIOOvbQ5LwVuEFYmjTBMypbn TR1hzHG2F4Jn8esKohKm2ltzLAe5gax3hU1SBVK09Tq3eEvns+ehurBWstJnsA5LJo kiA2MbhLCA/59n1JblvvkDWGbai5OHkQvAam1cqaRXMPxVY00U2ASqOxjKpZh2t1Zv Rq11cV+dGX38w== From: Song Liu To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, bpf@vger.kernel.org Cc: rostedt@goodmis.org, mhiramat@kernel.org, mark.rutland@arm.com, peterz@infradead.org, tglx@kernel.org, frederic@kernel.org, paulmck@kernel.org, catalin.marinas@arm.com, will@kernel.org, maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, ojeda@kernel.org, kernel-team@meta.com, Song Liu Subject: [PATCH v3 08/22] srcu: Mark the fast notrace read-side helpers notrace Date: Mon, 30 Nov 2026 20:21:47 -0800 Message-ID: <20261201042201.3199928-9-song@kernel.org> X-Mailer: git-send-email 2.53.1 In-Reply-To: <20261201042201.3199928-1-song@kernel.org> References: <20261201042201.3199928-1-song@kernel.org> X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit srcu_read_lock_fast_notrace() and srcu_read_unlock_fast_notrace() are used by tracepoints, and their comments say they cannot be traced. They are plain inline functions, as are srcu_check_read_flavor() and the Tiny SRCU versions of __srcu_read_lock_fast() and __srcu_read_unlock_fast() that they call. An out-of-line copy of any of them is untraced only because inline implies notrace. Mark them notrace explicitly, as srcu_read_lock_notrace() and the Tree SRCU __srcu_read_lock_fast() and __srcu_read_unlock_fast() already are. No functional change. Assisted-by: Claude:claude-opus-5 Signed-off-by: Song Liu --- include/linux/srcu.h | 8 +++++--- include/linux/srcutiny.h | 5 +++-- include/linux/srcutree.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 36f4c6445642..fab834f2d870 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -487,7 +487,8 @@ static inline struct srcu_ctr __percpu *srcu_read_lock_fast_updown(struct srcu_s * Used by tracing, cannot be traced and cannot call lockdep. * See srcu_read_lock_fast() for more information. */ -static inline struct srcu_ctr __percpu *srcu_read_lock_fast_notrace(struct srcu_struct *ssp) +static inline struct srcu_ctr __percpu notrace * +srcu_read_lock_fast_notrace(struct srcu_struct *ssp) __acquires_shared(ssp) { struct srcu_ctr __percpu *retval; @@ -651,8 +652,9 @@ srcu_read_unlock_fast_updown(struct srcu_struct *ssp, struct srcu_ctr __percpu * * Used by tracing, cannot be traced and cannot call lockdep. * See srcu_read_unlock_fast() for more information. */ -static inline void srcu_read_unlock_fast_notrace(struct srcu_struct *ssp, - struct srcu_ctr __percpu *scp) __releases_shared(ssp) +static inline void notrace +srcu_read_unlock_fast_notrace(struct srcu_struct *ssp, + struct srcu_ctr __percpu *scp) __releases_shared(ssp) { srcu_check_read_flavor(ssp, SRCU_READ_FLAVOR_FAST); __srcu_read_unlock_fast(ssp, scp); diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h index 47a368f945e3..c6f9ff9e1557 100644 --- a/include/linux/srcutiny.h +++ b/include/linux/srcutiny.h @@ -114,13 +114,14 @@ static inline struct srcu_ctr __percpu *__srcu_ctr_to_ptr(struct srcu_struct *ss return (struct srcu_ctr __percpu *)(intptr_t)idx; } -static inline struct srcu_ctr __percpu *__srcu_read_lock_fast(struct srcu_struct *ssp) +static inline struct srcu_ctr __percpu notrace *__srcu_read_lock_fast(struct srcu_struct *ssp) __acquires_shared(ssp) { return __srcu_ctr_to_ptr(ssp, __srcu_read_lock(ssp)); } -static inline void __srcu_read_unlock_fast(struct srcu_struct *ssp, struct srcu_ctr __percpu *scp) +static inline void notrace +__srcu_read_unlock_fast(struct srcu_struct *ssp, struct srcu_ctr __percpu *scp) __releases_shared(ssp) { __srcu_read_unlock(ssp, __srcu_ptr_to_ctr(ssp, scp)); diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h index 93b76e543894..8ca6ae6a74ad 100644 --- a/include/linux/srcutree.h +++ b/include/linux/srcutree.h @@ -381,7 +381,7 @@ __srcu_read_unlock_fast_updown(struct srcu_struct *ssp, struct srcu_ctr __percpu void __srcu_check_read_flavor(struct srcu_struct *ssp, int read_flavor); // Record SRCU-reader usage type only for CONFIG_PROVE_RCU=y kernels. -static inline void srcu_check_read_flavor(struct srcu_struct *ssp, int read_flavor) +static inline void notrace srcu_check_read_flavor(struct srcu_struct *ssp, int read_flavor) { if (IS_ENABLED(CONFIG_PROVE_RCU)) __srcu_check_read_flavor(ssp, read_flavor); -- 2.53.1-Meta