Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753344AbeAOAJQ (ORCPT + 1 other); Sun, 14 Jan 2018 19:09:16 -0500 Received: from mga17.intel.com ([192.55.52.151]:60118 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752746AbeAOAJO (ORCPT ); Sun, 14 Jan 2018 19:09:14 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,361,1511856000"; d="scan'208";a="195230869" Date: Sun, 14 Jan 2018 16:09:04 -0800 From: Andi Kleen To: pjt@google.com, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, riel@redhat.com, jikos@kernel.org, jpoimboe@redhat.com, luto@amacapital.net, torvalds@linux-foundation.org, tglx@linutronix.de, dwmw@amazon.co.uk, hpa@zytor.com, peterz@infradead.org, dave.hansen@intel.com, mingo@kernel.org, keescook@google.com, gregkh@linux-foundation.org, arjan@linux.intel.com Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/pti] x86/retpoline: Fill RSB on context switch for affected CPUs Message-ID: <20180115000904.GA10203@tassilo.jf.intel.com> References: <1515779365-9032-1-git-send-email-dwmw@amazon.co.uk> <20180115000554.GA7844@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180115000554.GA7844@tassilo.jf.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sun, Jan 14, 2018 at 04:05:54PM -0800, Andi Kleen wrote: > > + if ((!boot_cpu_has(X86_FEATURE_PTI) && > > + !boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era()) { > > + setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); > > + pr_info("Filling RSB on context switch\n"); > > + } > > Missing an option to turn this off. My earlier patch did this properly by folding it into the big option parser. https://marc.info/?l=linux-kernel&m=151578282016915&w=2 -Andi