From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20E8C606A320 for ; Tue, 1 Dec 2026 04:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=YwzR43Cf; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mtPYVG9g DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=omNodo3OqaII5cJsQOJ4BFSEOZn25YNScoYmPNtWZ0o=; b=YwzR43CfwtqWdo sQuccVRxr97v+9DMLABFK32fu60CYMefbx7lrWCIa23j/Ihi/UrabH8iGXyQcFESzmYRfgX1G151E OI+lJPtcH9wqWQkMsYPlMkUn415dM6w+yaNGRXVDWfnXkDJs3ZRdKirGNDDM/7NVNPDYKfunVFPxt HsaUjozI39fG+fp/GD8d8TfIs4crQHaPug/ZYGn7A90M7/4mv0NVkNCkL1UU4XxFVwMfdZvBvJTCp fldrn9gw56SDJtiDHpJtheTu6rUHbTjFg/kbGyHav+Zhne8bfTzPzgbU3dcVLpGv3hnrn6SnXL6Lm Ue9wN/e7E53ZGpV3LERg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYFRK-00000006YpJ-3mTK; Tue, 01 Dec 2026 04:26:02 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYFRA-00000006Yij-3AKX; Tue, 01 Dec 2026 04:25:55 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 217F8618D3; Tue, 1 Dec 2026 04:25:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A7E31F00934; Tue, 1 Dec 2026 04:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796099151; bh=omNodo3OqaII5cJsQOJ4BFSEOZn25YNScoYmPNtWZ0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mtPYVG9g915nwnxvZdfY5ZFQ+BbM0bZ1zvfjGc+R0mXfq3guIZc/QfOSJwCN1pGyF LRaC3cPpBgYheBygx1ycj51+Tu/ov2qIln8J6RO564R346rP/zdyWIUtCCeujaaWpf H8clpyJpOE6ijuifJ5LPPEcd/SY5O/GpRSGXfXwZGpUKwTZhRNrhK3O5s7BNidDRua 5CSZAVFTXz5cOn6AVIb3IIUatmFyxkzOCHi6bSTFDpC63qdyijrxRX2T+viEDrHV7O jm9E6A+nRKeet5FRB2x7lYSoudeX8CWc08l7xDdQ666yYvG5zHlBveZ/sYuHQOgxNY QYdap94GetlCg== 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 12/22] tracing: Mark the tracing_gen_ctx helpers notrace Date: Mon, 30 Nov 2026 20:21:51 -0800 Message-ID: <20261201042201.3199928-13-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-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 tracing_gen_ctx(), tracing_gen_ctx_flags() and tracing_gen_ctx_dec() are called by ftrace callbacks before they take any recursion protection, for example function_test_events_call() in kernel/trace/trace_events.c, which is built with -pg when CONFIG_FUNCTION_SELF_TRACING=y. They are plain inline functions, so an out-of-line copy is untraced only because inline implies notrace. Mark them notrace explicitly. No functional change. Assisted-by: Claude:claude-opus-5 Signed-off-by: Song Liu --- include/linux/trace_events.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 7a0aa23825de..6ff256b6655c 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -197,13 +197,13 @@ enum trace_flag_type { TRACE_FLAG_BH_OFF = 0x80, }; -static inline unsigned int tracing_gen_ctx_flags(unsigned long irqflags) +static inline unsigned int notrace tracing_gen_ctx_flags(unsigned long irqflags) { unsigned int irq_status = irqs_disabled_flags(irqflags) ? TRACE_FLAG_IRQS_OFF : 0; return tracing_gen_ctx_irq_test(irq_status); } -static inline unsigned int tracing_gen_ctx(void) +static inline unsigned int notrace tracing_gen_ctx(void) { unsigned long irqflags; @@ -211,7 +211,7 @@ static inline unsigned int tracing_gen_ctx(void) return tracing_gen_ctx_flags(irqflags); } -static inline unsigned int tracing_gen_ctx_dec(void) +static inline unsigned int notrace tracing_gen_ctx_dec(void) { unsigned int trace_ctx; -- 2.53.1-Meta