Received: by 10.192.165.148 with SMTP id m20csp3449359imm; Mon, 23 Apr 2018 06:49:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx48AfAbdB+MP3SDnSsfKkN/FB+wsxnn6RV84XeFcAqv86gmbaJpOsceyvE3ZEin2kpVYsbW5 X-Received: by 10.99.114.88 with SMTP id c24mr17363364pgn.453.1524491397975; Mon, 23 Apr 2018 06:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524491397; cv=none; d=google.com; s=arc-20160816; b=Abo311VUR44YmRSGXN2PPTTSL1pkhyq0UcL+eEI6UNurPRoU8SofuZiYHPA/39bh4g Fkp7x6vWqaWMXCjP1rPMvcZODVfv0TAl45kupzfnmAwCwnAGeVuOxqdSDp2x4uilnkfA xWxkJVaWExaf/DoNsYc2fTGpuFcCv/AJOk4jGBQRajC5rby+08QD9wmsK2pbDMM92lsd aN4pIj9YNyDWjY0M4z674gbpxH9fLAVpX4bcnRBbOMCjThHBPVGW9QgiDOYvKg/wL18j Ki02cpB40y6NSkzGIkeC3NjCRJ4Y1251mQ+JNAdDk4dqo15rjjd936HAWachlbQHNicG nAng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=c4I/CDbsR6tK4yDFs+eralFrCOq3rSZGdgQp01R6/aw=; b=HSjWtuSXQp0sFYqSGZNm1kr3L9AYmUUX2p9o0OvvEifqTmwFfTHcTCobEf9KyIYj77 M1bA32xGBSom2DIob+rfHeQ+n/oi3PuRWEp/ScPrJHd/B1n6qVQ7SQ+2aa1TA3LZhCma cHeyhqB1ANChN3qr8BjsSluzA0uykVDrsqhUdEP1CsBhFmIufOON+BgNG2jzUOKVb0Re eC3biNlkZYc/d97xPjZ0LEjNle4iyU2kSXXIWfSmr4o0j/c7IlAWLYSd5JHj21c5a//i Xrkpig4zGvwcC0YddmoTLmW7L+6BaY0WdxLFZbrR/E8NiPA/bx3Kn6NPk3SdMfyjGhsi Hhsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Vnqq4yv9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si11579199plb.478.2018.04.23.06.49.43; Mon, 23 Apr 2018 06:49:57 -0700 (PDT) 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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Vnqq4yv9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755349AbeDWNsX (ORCPT + 99 others); Mon, 23 Apr 2018 09:48:23 -0400 Received: from mail-oi0-f54.google.com ([209.85.218.54]:34363 "EHLO mail-oi0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755215AbeDWNsS (ORCPT ); Mon, 23 Apr 2018 09:48:18 -0400 Received: by mail-oi0-f54.google.com with SMTP id e23-v6so14304481oiy.1 for ; Mon, 23 Apr 2018 06:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=c4I/CDbsR6tK4yDFs+eralFrCOq3rSZGdgQp01R6/aw=; b=Vnqq4yv9xnEP5gRN9/A9A1kIEdNSs3MGSJZ3IpoWzxFX6SXN5ONDO4jH6kGcUeoxcF W2cfskEUia3p2YJbbnT7fcAIzQKboTMsuVCOjH8ONp+Ik/j3JuM+MEiMsc6Of7wah0Ye VDbXK8Nz9xjxLxNnThg0bQeZRXs9sR+cufKbTd5xhkMmNUkAIOWJVPXSY24DTGE5SM3R rgPql8V85FD49y1eZcEhVR2Zy4EJsyABruU6hweVXo4W3egJpecgg7M04F/EEuZiv3JT qnfBwCJU4BwF1NnJderj2k8Gg8zIsEpk69Op/f0ZDe3iI/tykbpIRvXTxqEtNJ9mL1jm Zk6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=c4I/CDbsR6tK4yDFs+eralFrCOq3rSZGdgQp01R6/aw=; b=fcbsFAJx3k7G9faRTx0hQhVe/7jan7kxs4/i4hGtnPvBVXFSLR//REMpXUMasyAXgf u4LXxiA3dvnbYOqkw0FlzwIhSyRy3vnGImTB0S9SR0NLckLWA3na0/BexHQjQGzoa4Xs EigBOd5JdwipNBh2WZwxV4wI1DHt2BMoT7e6Z6+d3PZg+gNdavipgDynBe6cxPeGowbz pNL2akN8ERTepAEqpEKjSpmVJ+U41R5dDNbPXt9FtI+bfirkWM/dav2+lpU2H9eUnJF/ mQTfq91vtohh+m7BYCcXLBbje2lwwAsUDXDjUptLB1zX1GaLtSXfUnRti31fnXd7HtcR FqNw== X-Gm-Message-State: ALQs6tCTlytBrCZYvGCPKKX8Pe/t5/X9FxaP3I97RPHw2tYhDSZ2BqA4 6h5dZCjcz606CNRq+lIEFv0ChlDqDr+F25P9KxylQQ== X-Received: by 2002:aca:b5c2:: with SMTP id e185-v6mr12164895oif.166.1524491298231; Mon, 23 Apr 2018 06:48:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2d36:0:0:0:0:0 with HTTP; Mon, 23 Apr 2018 06:48:17 -0700 (PDT) In-Reply-To: <20180423124552.GY4064@hirez.programming.kicks-ass.net> References: <20180419051510.GA21898@mwanda> <20180420120044.GN4064@hirez.programming.kicks-ass.net> <20180423124552.GY4064@hirez.programming.kicks-ass.net> From: Dan Williams Date: Mon, 23 Apr 2018 06:48:17 -0700 Message-ID: Subject: Re: Smatch check for Spectre stuff To: Peter Zijlstra Cc: "Gustavo A. R. Silva" , Dan Carpenter , Linux Kernel Mailing List , Ingo Molnar , Thomas Gleixner , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 5:45 AM, Peter Zijlstra wrote: > On Mon, Apr 23, 2018 at 07:31:03AM -0500, Gustavo A. R. Silva wrote: >> Hi Peter, >> >> On 04/20/2018 07:00 AM, Peter Zijlstra wrote: >> > >> > Hi Dan, >> > >> > awesome stuff... >> > >> > So I fear that many are actually things we want to fix. Our policy was >> > to kill the speculation on the first load and not worry if it can be >> > completed with a dependent load/store. >> > >> I wonder if there is any thread where I can read the discussion about that >> policy that you mention. >> >> Could you share it here, please? > > I think it was somewhere in the many spectre variant1 threads when Linus > Alexei and Dan W were hashing out the mitigation thing. I cannot quickly > find the specific email. > > Clarifying that position was one reason for the patches I did, Linus and > Dan W are on Cc and I figure that if they all agree we should maybe add > a little something to Documentation/speculation.txt. Yes, given that speculation windows are large if an attacker can trigger one out of bounds read it is difficult to identify that all of possible speculation from that point is safe, or that future code changes will not introduce a data ex-filtration sequence relative to that first out of bounds access. This is also the reason we protect all get_user() and __get_user() instances.