Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbeAFTra (ORCPT + 1 other); Sat, 6 Jan 2018 14:47:30 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:46680 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751509AbeAFTr3 (ORCPT ); Sat, 6 Jan 2018 14:47:29 -0500 Date: Sat, 6 Jan 2018 20:47:19 +0100 (CET) From: Thomas Gleixner To: Dave Hansen cc: "Van De Ven, Arjan" , Konrad Rzeszutek Wilk , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , David Woodhouse , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature In-Reply-To: Message-ID: References: <20180106144110.GA2592@localhost.localdomain> <742ed1d9-7210-8443-0373-5af74f193ab9@intel.com> <0575AF4FD06DD142AD198903C74E1CC87A56C6FE@ORSMSX103.amr.corp.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Sat, 6 Jan 2018, Dave Hansen wrote: > On 01/06/2018 09:41 AM, Van De Ven, Arjan wrote: > >>>> .macro DISABLE_IBRS > >>>> - ALTERNATIVE "jmp .Lskip_\@", "", X86_FEATURE_SPEC_CTRL > >>>> + testl $1, dynamic_ibrs > >>> On every system call we end up hammering on this 'dynamic_ibrs' > >>> variable. And it looks like it can be flipped via the IPI mechanism. > >>> > >>> Would it make sense for this to be per-cpu? > >> > >> It's probably better to either just make it __read_mostly or get the > >> static branches that folks were suggesting actually working. > > > > I still wonder if this isn't just better as a boot command line > > It's simpler that way. But, ideally, we want to make it runtime > switchable to match the implementation in the distros. Stop this silly argument please. The distros shipped lots of crap which we dont want to have at all. I told you folks yesterday what I want to see and the sysctl thing is the least on that list and it's not needed for getting the important thing - the protection - to work. Can we pretty please do the basics and worry about that sysctl or whatever people have on their wishlist once the dust settled. Thanks, tglx