Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1945287ybh; Sun, 8 Mar 2020 17:42:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuv1yMmtUAReZdDDm7ZOAbADKXd0xipv15z3H3Zjq6fkzsUxzcWOt2csZTAujud471ubBCz X-Received: by 2002:aca:d645:: with SMTP id n66mr1393761oig.66.1583714554614; Sun, 08 Mar 2020 17:42:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583714554; cv=none; d=google.com; s=arc-20160816; b=rysv1htv2TqpyEFUfKslhbd/+A0o0C9e3Dpa+JLeLPq9UYGcKR2j/E9FiYSEUNCBnT kMrEiIKcT/PRisPwEZs/6VQV3ruvAbV1jIMwD1vlGohMT42BqqQI5zz4V52UM/67T534 KDKDtEos8aNnpKAEoSH3ebj0XcIsNUELwCch9T/tNJ2bLJYS7xplsNygg+hRGRswHQ6i CIxBmHbJOby/76eZFtBZi3pkYB+3/Sbg78vuwDqu0VKRxs3wcGeGTuIQq8bRdirAPggJ aGNXFozl89gnoybwHNcJja23jSuQL6VHC02vZg0giFrlTbQlw7MdXrN+UtIWKnDE88hy AK8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id; bh=1fWCGf+eNOOkdzdD3DDZIaLTg6J/NqibMzZm0WJtfF0=; b=QR+ctIacSJ2egEdESsIgC0kqQW/wmhaf2L87OQOLY0PhveBb9F58TJo67YvFR0yKTd R9+VsKpR5hjhogBgC/BsIyFXY90pcW8dUl9KXt9BTvnGE61T4+mfCb15DQz4gMJV9SX6 W5p6gxes81AQMZFBVLkjgihEI0t6pSWBDZIqboM0FeFxcDs1Fd7g8SC2iNiqh12Q9MwU hzl8bybJF4YmOdrRyungUwtqTVvt49Y086K8Xxy7+NNbMaPlrVNRv3ceS5/w1f3bziib 1F5yRTCfKzE/aUouz4dyBQ+EitN811SlTvB24Ubqxw2bXOZd6cMfY+K58fIuhKbdGODE R/UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v81si3646411oia.114.2020.03.08.17.42.22; Sun, 08 Mar 2020 17:42:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbgCHXZk (ORCPT + 99 others); Sun, 8 Mar 2020 19:25:40 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57243 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbgCHXXz (ORCPT ); Sun, 8 Mar 2020 19:23:55 -0400 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jB5Gj-000365-OI; Mon, 09 Mar 2020 00:23:38 +0100 Received: from nanos.tec.linutronix.de (localhost [IPv6:::1]) by nanos.tec.linutronix.de (Postfix) with ESMTP id 75D451040B2; Mon, 9 Mar 2020 00:23:30 +0100 (CET) Message-Id: <20200308222610.040107039@linutronix.de> User-Agent: quilt/0.65 Date: Sun, 08 Mar 2020 23:24:10 +0100 From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Steven Rostedt , Brian Gerst , Juergen Gross , Frederic Weisbecker , Alexandre Chartre Subject: [patch part-II V2 11/13] x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline References: <20200308222359.370649591@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prevent the compiler from uninlining and creating traceable/probable functions as this is invoked _after_ context tracking switched to CONTEXT_USER and rcu idle. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/nospec-branch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -319,7 +319,7 @@ DECLARE_STATIC_KEY_FALSE(mds_idle_clear) * combination with microcode which triggers a CPU buffer flush when the * instruction is executed. */ -static inline void mds_clear_cpu_buffers(void) +static __always_inline void mds_clear_cpu_buffers(void) { static const u16 ds = __KERNEL_DS; @@ -340,7 +340,7 @@ static inline void mds_clear_cpu_buffers * * Clear CPU buffers if the corresponding static key is enabled */ -static inline void mds_user_clear_cpu_buffers(void) +static __always_inline void mds_user_clear_cpu_buffers(void) { if (static_branch_likely(&mds_user_clear)) mds_clear_cpu_buffers();