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 C232EC77B6E for ; Wed, 12 Apr 2023 17:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbjDLRYT (ORCPT ); Wed, 12 Apr 2023 13:24:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjDLRYQ (ORCPT ); Wed, 12 Apr 2023 13:24:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 933FE1BE4 for ; Wed, 12 Apr 2023 10:24:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2EDDB631A2 for ; Wed, 12 Apr 2023 17:24:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4965DC433A1; Wed, 12 Apr 2023 17:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681320254; bh=yZE3NaZNWGex7AsabXWKzco4PSx2Xxsuc1liFr6+lK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rFCA96UFwB7JCZC7odAG2lpfvCiX8M3sewQ1lShv0FAI3+MNVHqaX0W1BDBo8Kb7E 0IpsEtpCXVH1vazJj1HTAN4sdg63WbLJVv4jTNRaaZMIujhZY4A3rEDLhbTWvPUGhK xMcFecgN+MkYpu7qjz9m5beWzFPIbCjZwdAy282+/v/c4ZM1IqjVptDsEuqj4/EfnX E/jfiWgXL3Mnaa30JRfcKvhM4GP//PgXaEktaB8nG8xmBhAFxXUsmhVpEsAoIlK1eY tJl4n9rb2EvZSCLauXSmGaf5j6+wH+9Y5s+YWICWGCsDQdsuLNHDdsHhrTO3hijVkf HmFIUWOZ5sDZA== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , frederic@kernel.org, paulmck@kernel.org, keescook@chromium.org Subject: [PATCH 1/3] context_tracking: Fix KCSAN noinstr violation Date: Wed, 12 Apr 2023 10:24:06 -0700 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With KCSAN enabled, even empty inline stubs can be out-of-lined. Force the context_tracking_guest_exit() stub inline. Fixes the following warnings: vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0x1be: call to context_tracking_guest_exit() leaves .noinstr.text section vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0x85: call to context_tracking_guest_exit() leaves .noinstr.text section Signed-off-by: Josh Poimboeuf --- include/linux/context_tracking.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h index d4afa8508a80..5ae3abd767b4 100644 --- a/include/linux/context_tracking.h +++ b/include/linux/context_tracking.h @@ -97,7 +97,7 @@ static inline int exception_enter(void) { return 0; } static inline void exception_exit(enum ctx_state prev_ctx) { } static inline int ct_state(void) { return -1; } static __always_inline bool context_tracking_guest_enter(void) { return false; } -static inline void context_tracking_guest_exit(void) { } +static __always_inline void context_tracking_guest_exit(void) { } #define CT_WARN_ON(cond) do { } while (0) #endif /* !CONFIG_CONTEXT_TRACKING_USER */ -- 2.39.2