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 7908D606A327 for ; Tue, 1 Dec 2026 04:27:37 +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=I05U49BT; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fsausKB+ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=Bwf30o6UKxOj6kmSwSutIHLXv6wxucWuMcWD589bseo=; b=I05U49BT6oKBneXS7YcG/YAFc3 p9/MBsWSYC8r3I+qnposeECVnLNWuqeIe+Mz8k0jcPYq2Y5jZn99znpZsCE2wak1kMJl/M/Goj41+ vXB3Dk3WPcg5iiaCLAMMHdn7SC03RU0XMsVKoodCPD3AgeoXtLSNRgCaVz4xoUIZOi3j3ppMP/NyZ 2oS5I352NdXFZwdjSp+ZD787shnQWa28uyulPhYUJbjbKkNCd/ZUSl4sGjHug13zW6t8klOzTNlAg 0uEwnat9l7GoxaAv02M14sku1MHq0jLfyHT+uuFCyj+aw9On6G4NsywzepEmT7PwaDjoArzO1aW65 AbtN0dOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYFSh-00000006a60-0870; Tue, 01 Dec 2026 04:27:27 +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 1xYFSP-00000006Zni-0Htz; Tue, 01 Dec 2026 04:27:09 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 7139D618D3; Tue, 1 Dec 2026 04:27:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48B1E1F00926; Tue, 1 Dec 2026 04:26:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796099228; bh=A2t5iu5t/ovKZpN5dcwwK9F5J8Fu+nquR65gCkL+VN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fsausKB+tXcBLx0oLZpTS2OXwBee2l1MKKgRGSBwTIKUqo+OhzLkhca74ACTuK/eu FsJQv1/QUe1C7WG9KJcUzxpBf/x97yMG1a2ij/D20ey4lH4hdjzWmpEkoYjo83eeXH bJepsMyLgg7ePjAuw8BhcvpDU92SSU2PeNUjeJprZqbc3eabhllRTCz24MklJS7j2B vq0djWuP9/47a72QUN8VqHQMCahRpoErVfu2Bfka0qkxzhRblimKnEOLhJgKONRro8 3zG5ah4JrP7sKS6yhzfjzKdjhiDFuQjEFXqdVb6AuQRrkkTX/bazZsuTYGOkxB1iHV DSI5Dy8RmTUtQ== 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 16/22] context_tracking: Mark exception_enter() and exception_exit() notrace Date: Mon, 30 Nov 2026 20:21:55 -0800 Message-ID: <20261201042201.3199928-17-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 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham 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 The tracing code uses preempt_enable_notrace(), which calls preempt_schedule_notrace(). Tracing can happen before the kernel has left user context, so preempt_schedule_notrace() calls exception_enter() to leave it before calling the scheduler. exception_enter() therefore runs while RCU may not be watching. exception_enter() and exception_exit() are plain inline functions, so an out-of-line copy is untraced only because inline implies notrace. With clang, a powerpc ppc64le_defconfig build has such a copy of exception_enter(), called from preempt_schedule_notrace(). Mark them notrace explicitly. No functional change. Assisted-by: Claude:claude-opus-5 Signed-off-by: Song Liu --- include/linux/context_tracking.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h index af9fe87a0922..0059328995cc 100644 --- a/include/linux/context_tracking.h +++ b/include/linux/context_tracking.h @@ -48,7 +48,7 @@ static __always_inline void user_exit_irqoff(void) __ct_user_exit(CT_STATE_USER); } -static inline enum ctx_state exception_enter(void) +static inline enum ctx_state notrace exception_enter(void) { enum ctx_state prev_ctx; @@ -63,7 +63,7 @@ static inline enum ctx_state exception_enter(void) return prev_ctx; } -static inline void exception_exit(enum ctx_state prev_ctx) +static inline void notrace exception_exit(enum ctx_state prev_ctx) { if (!IS_ENABLED(CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK) && context_tracking_enabled()) { -- 2.53.1-Meta _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv