Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp858771imw; Thu, 14 Jul 2022 12:10:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uu7vD/XnJSYfcBNUIgMauqeu4uF3MOhW54rutVWYAawdkIaGjNTanTpV+NDTzZzIcu75Ji X-Received: by 2002:a05:6402:354b:b0:43a:b180:7a22 with SMTP id f11-20020a056402354b00b0043ab1807a22mr14386199edd.225.1657825841850; Thu, 14 Jul 2022 12:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657825841; cv=none; d=google.com; s=arc-20160816; b=IBrrdmHbQMqZ5SLhA8QzpGjMADp43FQgofS5LU6b1bwj6WC5NFm7d9C9+DE70C+qi7 p+U8FbgOvEOXPXPqaibZGhP7IER03hjpkkdwhNetbBKYEmcEwS5ATVEn4yE4k3ZRkRko smrulN7cxmCDpl/skIutfvb3ZcAZI/UK+F3MV0fSvYSNiwtk18XOq5bhCdCKQAQPmcDf sQr+OqIr7fyhTC7RnoAlg8kaiez2ZrBEqTZgcw3prcvrYXxpGODert+2VmHIG3GJumm2 UjABjHLJk88JFmTL9jkn1e5bpNRAYrFiYvY2rbJgXFJ0z2X1jwQGJ447QQvqYWSnxgUQ tqyA== 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=VLaGZ0CFcCMDw4sKrezyshgqgNu52lSz3UC7gONrKKM=; b=QlEbFyiWmiJCT8bRVK/Lm4I7Qs+ebqM8bChSo6nrLxDxjdPCT02nH7Ob8Lkwv3Nzca j/y8g7IaxGHFo5IN1damzfYYa6dF44SsTObNh9olFAhn4UEjj33dykHkm5gwYpQA8B09 nTrqOWKxe0zIPa4RcFRJOOU0w185UqbbL3VJbGfLdPV2LKCaABBx1ctLusOZQNJGwrh+ aNBpZbEAbjZGxid99UmsHq8LS/itNaV2N9aXnxDzhwRcxGyWLWsvNkDUbP/2cZwdGNgD BYHCqt6gX317VrimC1HWyo67xlclGl9pmtBILpWTA2pC6RzF6dAaYpNKFrIDbiIgh63p 3stA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C1t1w87k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc23-20020a1709078a1700b0072ed47c301fsi3284428ejc.455.2022.07.14.12.10.14; Thu, 14 Jul 2022 12:10:41 -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=@intel.com header.s=Intel header.b=C1t1w87k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240788AbiGNSmh (ORCPT + 99 others); Thu, 14 Jul 2022 14:42:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232093AbiGNSmf (ORCPT ); Thu, 14 Jul 2022 14:42:35 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2AE8599F6; Thu, 14 Jul 2022 11:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657824154; x=1689360154; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=VLaGZ0CFcCMDw4sKrezyshgqgNu52lSz3UC7gONrKKM=; b=C1t1w87kosiH+02dpsYA7EXoIhh+dyMdmaohh+fxi9i7vA0UQPR/MXKM U+YzajLc0RLDtloH55IgBTBtsdbXoXHaUrFEl05mYJFPxX4yKueFm8XDO D7bU6aCGotngx6FH33grnmaUAR0gZaCViRTXri5OzO4UjfvraUBfUfqlj 7P+XWYI36Rs++EOliz36zag8PV/2AOjkNavpPnkwrYnpNTtaFeczy481U lzFZKEmucL8SUCswwwr5ZkSPBYt0svtIoJB/5xeSDfhgQO64o7ac1g9m9 p45ELtSi4rjxsUhXSmtgc5ceUmoaJRRkNiL+xc4g+i8htIhndhJ19rB9d Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="268629871" X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="268629871" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 11:42:33 -0700 X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="653996066" Received: from pravinpa-mobl.amr.corp.intel.com (HELO desk) ([10.212.243.89]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 11:42:32 -0700 Date: Thu, 14 Jul 2022 11:42:29 -0700 From: Pawan Gupta To: Josh Poimboeuf Cc: Peter Zijlstra , Thadeu Lima de Souza Cascardo , 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: <20220714184229.lw24xiqzwlcxjnaq@desk> 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=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <20220714173814.p5kdyimu6ho7zjt5@treble> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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". Apart from testing, I don't see a reason for a user to deliberately choose =ibrs on Enhanced IBRS parts. But, I am guessing most users would just rely on "=auto" mode. So honoring what the user asked and printing a warning may be fine. And hope they would see the warning if they unintentionally chose "=ibrs" on an eIBRS part. Thanks, Pawan