Received: by 10.223.176.5 with SMTP id f5csp2896396wra; Thu, 1 Feb 2018 07:41:41 -0800 (PST) X-Google-Smtp-Source: AH8x2255j8Hg6u50XEBvuHagtmfEWqYRCBZHM0Q94sd2UToBWc7kH+MZoSpjJvcwEW4LKCErM1Qj X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr23603145pld.17.1517499701596; Thu, 01 Feb 2018 07:41:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517499701; cv=none; d=google.com; s=arc-20160816; b=P61U/sCFjaNx1AXQKuxuWC9O0By3yHblyJI5EbyLYdYhdfg2UEQL+rCIfsvsFkoqwK rVlfftU6KthdGjXgHmnfKldQAGQfto1eXsuFdVF3LwjkqBjmuhf2CpWRvsf/opdnhpxF HpCp4WQrXJhnyr9xBvPsWm2wT9pieGPjiIFYi7CBpIbb3EkgAz0eAupjxcjUib2WCqBM OFzOLgsIcU6q9fmkCFz7dG9IkPeMbfpEpGpbmXxv3mgqKcMQC9sUwF+uLniwoAvObuj4 HOz2gK66Vy5RSp61SEwts3oyTKXubRWeMEleXOn2pRbTYndL41dTEM2VRrJUM0LJzzmx Kh5Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=xAnBiDjXfJ0I4CdHne6Vz3fo8YqKQ+PijKVjE4uVXP0=; b=eelgfsKBF2akhilGiANzrY3dD18/iaPPIUWmGNH3s+GuKaeqdm6hJ8lUxjjXy1rTTL 1hR92cH6wHvMO0wBwzlXcpYns2qW5PoPJ8XTmpSTV3hb4ynnKMRqA0e2oL8R/GFNKPRu 5WUcgiMyUW5P2WxVFDJyeBgraYmBbKFVa6igix5df4lDkCTbGYKcnxx2IczNAJG/eNjh omqSwchvMDyMBdEIIDsq3h+UumRwKox5bQv6Jz+dQI83m6IO2u2Ip+sVD6L5dqXYM7zC kAOA39atAphfF9liwEtcr4GQt7Xd7gDGRCBcKGzQxWDXBWCn7Et4xuTwJU59EgEdfeZJ RVVg== 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 8-v6si216642pla.105.2018.02.01.07.41.26; Thu, 01 Feb 2018 07:41:41 -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 S1752466AbeBAPkz (ORCPT + 99 others); Thu, 1 Feb 2018 10:40:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45116 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752318AbeBAPky (ORCPT ); Thu, 1 Feb 2018 10:40:54 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CEA344E4C3; Thu, 1 Feb 2018 15:40:53 +0000 (UTC) Received: from treble (ovpn-122-228.rdu2.redhat.com [10.10.122.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id B32BF60FC2; Thu, 1 Feb 2018 15:40:52 +0000 (UTC) Date: Thu, 1 Feb 2018 09:40:52 -0600 From: Josh Poimboeuf To: David Woodhouse Cc: Dominik Brodowski , mingo@kernel.org, hpa@zytor.com, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, "Wieczorkiewicz, Pawel" Subject: Re: [tip:x86/pti] x86/speculation: Use Indirect Branch Prediction Barrier in context switch Message-ID: <20180201154052.qomk5rjdipufaxa7@treble> References: <1517263487-3708-1-git-send-email-dwmw@amazon.co.uk> <20180131070300.GA28206@light.dominikbrodowski.net> <1517473913.18619.281.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1517473913.18619.281.camel@infradead.org> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 01 Feb 2018 15:40:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 01, 2018 at 08:31:53AM +0000, David Woodhouse wrote: > On Wed, 2018-01-31 at 08:03 +0100, Dominik Brodowski wrote: > > Whether a process needs protection by IBPB on context switches is a > > different question to whether a process should be allowed to be dumped, > > though the former may be a superset of the latter. Enable IBPB on all > > context switches to a different userspace process, until we have a clear > > mitigation strategy for userspace against Spectre-v2 designed and > > implemented. > > > > ... > >                 if (tsk && tsk->mm && > > -                   tsk->mm->context.ctx_id != last_ctx_id && > > -                   get_dumpable(tsk->mm) != SUID_DUMP_USER) > > +                   tsk->mm->context.ctx_id != last_ctx_id) > >                         indirect_branch_prediction_barrier(); > > > I understand your argument and I sympathise. > > But that's going to hurt a *lot*, and we don't even have a viable > proof-of-concept for a user←→user Spectre v2 attack, do we? It's only > theoretical? > > Show a working PoC and it makes the argument somewhat more > convincing... Fair point. From what I can gather, user space ASLR seems to be the only layer of protection before a POC would be feasible. So, unless I'm mistaken, which is very possible, it seems to be a question of how much we trust ASLR. -- Josh