Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp839368imw; Thu, 14 Jul 2022 11:46:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1slxK8d2Mg7YQd1xwqS/j0Q2nOH95NQzluQPYwYLUaMA5IpPYk5ry0xxc+zGNz/qgze+iKW X-Received: by 2002:a17:907:1c8c:b0:72b:6b8f:4add with SMTP id nb12-20020a1709071c8c00b0072b6b8f4addmr10041162ejc.556.1657824361349; Thu, 14 Jul 2022 11:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657824361; cv=none; d=google.com; s=arc-20160816; b=HdEfXUkVLQ16DAjQPnREmpx7cVq3SwNv46hHbhHgA/T9LHnesq23WzMFWqQ+qMSCiU tP1dtLlXREj3YKZCo38q1vYjeqCJtaNunyRJACc3Kw3sw9+b5TZ4qhZGJCNJYpGKAyeQ hXk+xhLfk4GnUkUe4V5ZAbUDHZMizo+9k6/lCD9iH7l58s/9J6lepQ97j9XQJAiG7Dvi lLfzswM1saKA3nAEixIWiZiMM81vXNIe0PecItCshQGIqClgPBvPcOiA0g1B+fFG1brq aT2rtdcso7GYC0/gkkjKBbe0d7ZEM27wOim63ZC4cfq1+B32CYVbOfuFrYe2weMeewIk LMrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4V6a/KJO4cJjMe509hS1p2ekMNPrFvs9A9TzOLsThG8=; b=niG9kePf+cgnW0bkynn5Nxfo5e02u4tTzgXXuUXMV4aM7+wOGXTtXXzFH00PsC6y19 iFyRooeoRbrImsBhSi8YKeSozXZUBlvhFJjXC0NFWylJ0YBcolwjwoI45a7W2vbTm8Rg VbM/eNvnYx8KcEUe3lpkBecofm4MHyN+QpglatR9yM5goNZRWVcE7xIKBQX2WFM13i7k VswYzM+WWn51Mw9Wge6WdEexcntz6hzMfzU4/UbjBcy3NltmujDN8KTbEPlCNLr6gART pRMWdduJDX9gDBItniV8tYVrUUD7srr05oLOo3tOp14roOntZA7YdN+G3SxMmNIigN3f 0m7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=JgROHQwK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb3-20020a1709077e8300b00710ac087dd5si138544ejc.699.2022.07.14.11.45.36; Thu, 14 Jul 2022 11:46:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=JgROHQwK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240515AbiGNSL7 (ORCPT + 99 others); Thu, 14 Jul 2022 14:11:59 -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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.