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 8BF31C43334 for ; Thu, 14 Jul 2022 18:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240365AbiGNSL6 (ORCPT ); Thu, 14 Jul 2022 14:11:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232432AbiGNSL6 (ORCPT ); Thu, 14 Jul 2022 14:11:58 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AD79DE1; Thu, 14 Jul 2022 11:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4V6a/KJO4cJjMe509hS1p2ekMNPrFvs9A9TzOLsThG8=; b=JgROHQwK3u5dOQzc0AnQMCNEn7 WNh37RWPK/HI/+khFIX2usixbCQC3CymYsWAlCoh+A1P80WTI/GUGX2g1/PXbTiftSvY0vAcY02dY YOhfPhEKAAAZxtVRs7kJNP9+DuGCexocuCgttiPMEq9tvT/w2MTGa9GDn73/7CxDbAvFpkOV4DkWY NDKmHFjx99rrZLckiwlDj84euvLLv6nb5O0Xcn2hfffEMPcPLrqDrpNK4e+niDB+wSfldVjo/OjwF UQg6lAOODr2sEUIZpHVbO/vtY8X43A0hi8eAwB67fKgx9WWSbG/k4xqA/CNFPofp/bxh7SUTQ+1sa 83lne+sg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oC3JI-003uAd-SE; Thu, 14 Jul 2022 18:11:37 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 8FEC3980185; Thu, 14 Jul 2022 20:11:29 +0200 (CEST) Date: Thu, 14 Jul 2022 20:11:29 +0200 From: Peter Zijlstra To: Josh Poimboeuf Cc: Thadeu Lima de Souza Cascardo , Pawan Gupta , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Daniel Sneddon , antonio.gomez.iglesias@linux.intel.com Subject: Re: [PATCH] x86/bugs: Switch to "auto" when "ibrs" selected on Enhanced IBRS parts Message-ID: References: <0456b35fb9ef957d9a9138e0913fb1a3fd445dff.1657747493.git.pawan.kumar.gupta@linux.intel.com> <20220714160106.c6efowo6ptsu72ne@treble> <20220714173814.p5kdyimu6ho7zjt5@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220714173814.p5kdyimu6ho7zjt5@treble> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Jul 14, 2022 at 10:38:14AM -0700, Josh Poimboeuf wrote: > On Thu, Jul 14, 2022 at 07:03:32PM +0200, Peter Zijlstra wrote: > > On Thu, Jul 14, 2022 at 09:01:06AM -0700, Josh Poimboeuf wrote: > > > > > > Yeah this; if the user asks for IBRS, we should give him IBRS. I hate > > > > the 'I know better, let me change that for you' mentality. > > > > > > eIBRS CPUs don't even have legacy IBRS so I don't see how this is even > > > possible. > > > > You can still WRMSR a lot on them. Might not make sense but it 'works'. > > Even in Intel documentation, eIBRS is often referred to as IBRS. It > wouldn't be surprising for a user to consider spectre_v2=ibrs to mean > "use eIBRS". > > I'm pretty sure there's nobody out there that wants spectre_v2=ibrs to > mean "make it slower and possibly less secure because it's being used > contrary to the spec". Then make it print a big honking warning. Most people will either use auto or off, the very few people that force an option get what they ask for, not something else. Like said upthread, it allows testing the code-paths at the very least.