From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Poimboeuf Subject: Re: [PATCH RFC 2/5] x86/speculation: Add support for 'cpu_spec_mitigations=' cmdline options Date: Fri, 5 Apr 2019 11:05:36 -0500 Message-ID: <20190405160536.sks2hmo6sxnxg3tl@treble> References: <78c63cb08f36f55407f534d49cc2543079e44dbb.1554396090.git.jpoimboe@redhat.com> <20190405135712.GF23348@zn.tnic> <20190405143101.ksj7ayjis4p52dgt@treble> <20190405152650.GH23348@zn.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20190405152650.GH23348@zn.tnic> Sender: linux-kernel-owner@vger.kernel.org To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Jiri Kosina , Waiman Long , Andrea Arcangeli , Jon Masters , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead List-Id: linux-arch.vger.kernel.org On Fri, Apr 05, 2019 at 05:26:50PM +0200, Borislav Petkov wrote: > On Fri, Apr 05, 2019 at 09:31:01AM -0500, Josh Poimboeuf wrote: > > My thinking was that the individual options could be used to override > > the global option. But maybe that's overkill? I dunno. > > You mean if the user deliberately types: > > "cpu_spec_mitigations=off spectre_v2=auto" > > on the cmdline to turn off all and then enable only one? > > Hmm, yap, sounds like an overkill to me. Then I'd probably do: > > pr_err("Make up your mind already!\n"); > return; > > :-)) > > I'd say let's do the simpler and cleaner thing now and think about > supporting this overkill when it really turns out that it is needed. Fair enough. > > I assume you mean just the part where L1TF_MITIGATION_DEFAULT is added? > > Yap. Ok. -- Josh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:38760 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbfDEQFo (ORCPT ); Fri, 5 Apr 2019 12:05:44 -0400 Date: Fri, 5 Apr 2019 11:05:36 -0500 From: Josh Poimboeuf Subject: Re: [PATCH RFC 2/5] x86/speculation: Add support for 'cpu_spec_mitigations=' cmdline options Message-ID: <20190405160536.sks2hmo6sxnxg3tl@treble> References: <78c63cb08f36f55407f534d49cc2543079e44dbb.1554396090.git.jpoimboe@redhat.com> <20190405135712.GF23348@zn.tnic> <20190405143101.ksj7ayjis4p52dgt@treble> <20190405152650.GH23348@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190405152650.GH23348@zn.tnic> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Jiri Kosina , Waiman Long , Andrea Arcangeli , Jon Masters , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Greg Kroah-Hartman , Tyler Hicks , Linus Torvalds Message-ID: <20190405160536.QPWhlHsvgBm_kAUrhLLsn_ruQrtPacGUZ5ZFjc5vBS8@z> On Fri, Apr 05, 2019 at 05:26:50PM +0200, Borislav Petkov wrote: > On Fri, Apr 05, 2019 at 09:31:01AM -0500, Josh Poimboeuf wrote: > > My thinking was that the individual options could be used to override > > the global option. But maybe that's overkill? I dunno. > > You mean if the user deliberately types: > > "cpu_spec_mitigations=off spectre_v2=auto" > > on the cmdline to turn off all and then enable only one? > > Hmm, yap, sounds like an overkill to me. Then I'd probably do: > > pr_err("Make up your mind already!\n"); > return; > > :-)) > > I'd say let's do the simpler and cleaner thing now and think about > supporting this overkill when it really turns out that it is needed. Fair enough. > > I assume you mean just the part where L1TF_MITIGATION_DEFAULT is added? > > Yap. Ok. -- Josh