Received: by 10.223.148.5 with SMTP id 5csp7862512wrq; Thu, 18 Jan 2018 10:25:15 -0800 (PST) X-Google-Smtp-Source: ACJfBovxT9iLLyKUkJ62NyApabTcKIyYazzur8tqUUcOkYFGxp/ek27shtq0DF8OQQDqULrCCkKS X-Received: by 2002:a17:902:6809:: with SMTP id h9-v6mr217772plk.46.1516299915063; Thu, 18 Jan 2018 10:25:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516299915; cv=none; d=google.com; s=arc-20160816; b=CsnS9/uY79JD8UmDmU9pFgC3bouAfgGZEypmhjmQbCYNhF9cdm85dnqMJvuo8hDYPl Tp+APzPlSv1+Is5svOZ/MJCVsAatgHyPY8Gv3wqz/89jBrVDAJEkbu9zIWmd3VS7i59e 4iAf9Ot9EgIGxDW6tTB9dz2ju3ApojAVY15Bmvn5hH2NWpTjFrYnxthCD8d7DygH6U+e Nl55DNgQvZxTFmQc07n0iuzIbyl6l1yzATtITaEO+npCyTkHyCCRnTajnY0FYBJDEfpA cv2UE/8SGo0pigHA74OHujN0WVcLbieS5N0LTGYhAMLUHyAsV8Mo+G/B4PmzAqAaKP7Z au/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=XDZZ80DWLJjlbWmNoa+Mi1guqgIJ/3BxTYPcfZAxiXQ=; b=gj95VNlyZEUbvDaoUrnrMZe8PD5ujlqvcazYGap9T9qLp0Td3jBXAzNwIb9e+sh2A6 8LciUuoqWgeY5lhtz014JkIXfnuLfRz4nwnJ6aui3Vns0wKsoqpYY3dMnT/ZlmcUMSZu LVi+T0CzUV4KHM8uv6htr6ten70uiarTUD/L6DxjR6IfbYk+OB+aOR9UZLcryReCyEtQ paSv6Ap0B2hCtnAY2Yxqlj0hz6CiE6GGgPYAhlrFHNYveSZ9NNX8eaZLIL7cfaWj9+CG 29Qaxt71Hso0z9D2O4OQlVlL4TJ9x/izUikZtDeKFIbrYrTX1LrmJKmAVq7ZIOOx8MkE 3d4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si6532840pgb.595.2018.01.18.10.25.00; Thu, 18 Jan 2018 10:25:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932089AbeARSYh (ORCPT + 99 others); Thu, 18 Jan 2018 13:24:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43958 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753228AbeARSYg (ORCPT ); Thu, 18 Jan 2018 13:24:36 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 586857853D; Thu, 18 Jan 2018 18:24:36 +0000 (UTC) Received: from treble (ovpn-126-50.rdu2.redhat.com [10.10.126.50]) by smtp.corp.redhat.com (Postfix) with SMTP id 3625E5D6A8; Thu, 18 Jan 2018 18:24:31 +0000 (UTC) Date: Thu, 18 Jan 2018 12:24:31 -0600 From: Josh Poimboeuf To: Paolo Bonzini Cc: Dave Hansen , Peter Zijlstra , David Woodhouse , Thomas Gleixner , linux-kernel@vger.kernel.org, Ashok Raj , Tim Chen , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , Dan Williams , Jun Nakajima , Asit Mallick , Jason Baron Subject: Re: [PATCH 23/35] x86/speculation: Add basic speculation control code Message-ID: <20180118182431.xvmk6kzxpzu43b43@treble> References: <20180118134800.711245485@infradead.org> <20180118140152.830682032@infradead.org> <20180118163745.t5nmwdr53wjsl7o5@treble> <73a5735a-6a5b-0e0f-1f0b-e7cd955880d2@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 18 Jan 2018 18:24:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 06:12:36PM +0100, Paolo Bonzini wrote: > On 18/01/2018 18:08, Dave Hansen wrote: > > On 01/18/2018 08:37 AM, Josh Poimboeuf wrote: > >>> > >>> --- a/Documentation/admin-guide/kernel-parameters.txt > >>> +++ b/Documentation/admin-guide/kernel-parameters.txt > >>> @@ -3932,6 +3932,7 @@ > >>> retpoline - replace indirect branches > >>> retpoline,generic - google's original retpoline > >>> retpoline,amd - AMD-specific minimal thunk > >>> + ibrs - Intel: Indirect Branch Restricted Speculation > >> Are there plans to add spectre_v2=ibrs_always to prevent SMT-based > >> attacks? > > > > What does "ibrs_always" mean to you? Maybe ibrs_always isn't the best name. Basically we need an option to protect user-user attacks via SMT. It could be implemented with IBRS=1, or STIBP, or as part of the mythical IBRS_ATT. Maybe a 'user_smt' option, which could be appended to existing 'retpoline' or 'ibrs' options? Like spectre_v2=retpoline,user_smt or spectre_v2=ibrs,user_smt? > > There is a second bit in the MSR (STIBP) that is intended to keep > > hyperthreads from influencing each-other. That is behavior is implicit > > when IBRS is enabled. Does this bit exist yet? I've never seen any patches for it. > Yeah, I think we should have a mode to always leave that enabled, or > always set IBRS=1. > > > I think ibrs_always *should* probably be kept to refer to the future > > CPUs that can safely leave IBRS enabled all the time. > > Is that "safely" or "without throwing performance down the drain"? > > Does "always IBRS=1" *hinder* the mitigation on existing processor, as > long as you reset IBRS=1 on kernel entry and vmexit? Or is it just slow? Yes, enquiring minds want to know... -- Josh