Received: by 10.223.176.46 with SMTP id f43csp4670538wra; Tue, 23 Jan 2018 12:40:48 -0800 (PST) X-Google-Smtp-Source: AH8x225FahT3uBtSdcGp4YrTH8VkCo8f4A727xO+CwUFUQF7nDEU4VkB/rJ6L9mRsuL596JDgQTj X-Received: by 10.107.51.149 with SMTP id z143mr5499868ioz.287.1516740048042; Tue, 23 Jan 2018 12:40:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516740047; cv=none; d=google.com; s=arc-20160816; b=zx2wOeCi6nECz+DwhnSrP9HTudyXKUTvuQVjj4y4NOK3pfal7cUMV9r6VGqF9teast /dXjeJ3IIhROmkfxrKAVExM1Q/VTfCWMjRGeHfYbWs5zghs13JBvzZwwVDmkfFYE8+q1 lZba4fGqYkbuwyDHx7/QN+nvu4+b8PzNCSngz3vfZgyN4cLnLILdkYQefCi8PrnvLYnE oqREEqGgj5VOw2x+wdrGuK5KO6gzrVNZByHt+wIAT7ieKgIlVA5050698CuoPbJjMGiT jeS1yRkxmM3H1C1OeJe+OfNh846BQnZK+q0XeFoQUKl0VHi8jg3v6/UXiGUgLOBtwHjv xtvw== 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=I/UNQ11waNZzbqDC//oQ/y71958R5ZuBtgGpdRFxxsU=; b=KdHtCLITgamnzd6dxWHixJyz1DTClsyFVMIRKl2Oo0/8QfZ8kFeW5RCRslSdVvfts8 Lc2epgMk7zTIl8RgarGw3deiTPeGCCDiIwtkXKJCTJHeAmdig/TTyH9nLr3noTkFCw4P I0emfpOgChB9TvjFlxTNN1jUspvLTPwPp2vNXRw07mqhsUGhNejTalm/f20bNp09lzsN nViQaTpFif9l/ph1u0fG/QsLZGXNwMr+VumOvrGOLTDP0BagnII3XxL4E9SSGDTF7gvQ mLRyThkS4HUDGk5IvbbeVuGAQhkDmgY7jVqEZg2L3Aq8McD+BezuC6OA8TSs66mPYA1/ YQaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZhTwWMen; 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 b8si9067671itc.152.2018.01.23.12.40.34; Tue, 23 Jan 2018 12:40:47 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ZhTwWMen; 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 S932150AbeAWUiu (ORCPT + 99 others); Tue, 23 Jan 2018 15:38:50 -0500 Received: from mail-it0-f49.google.com ([209.85.214.49]:45080 "EHLO mail-it0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932088AbeAWUis (ORCPT ); Tue, 23 Jan 2018 15:38:48 -0500 Received: by mail-it0-f49.google.com with SMTP id x42so2536621ita.4 for ; Tue, 23 Jan 2018 12:38:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=I/UNQ11waNZzbqDC//oQ/y71958R5ZuBtgGpdRFxxsU=; b=ZhTwWMenb6fUuy7I5hvT6CACWPDcwHDwz142CRoYbpZPoTU1jNjjuQpXwu4jdhbDi1 uC5izyQinHTEW8D2itwtmcOpKlqs7nNuahhBzt43QvrxAYzxeogCuVW8GKjjU2NYtvRz mmqkyEuLdjSD3zeCJdrGcFHDzPCiYU1diq7gMAr/GMT/Qgle3b8SBcNwmsDWmOjDKX4e fJ4rnyyUDxGH3YzqwYlwqSgduRrI676rf9bm3MB02v111mitVU6fo15wWIOr44tkiYAh eW1Tfjhvamw4VhY+kLlshWOYwovCH5yNzAWHAkdVy8xuDQTMHV3TOGTbapUkczx4KYm1 XXCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=I/UNQ11waNZzbqDC//oQ/y71958R5ZuBtgGpdRFxxsU=; b=UASZCovmTx5EGOIbqGJMrUkedeK7IB8yNX5uj85Fy6BbLU+trpG5V5qIiJ7l3E8RNy nVclixNA6nnLXXg8ImdkHuTLsRNGgjgP02i0wcaB0B300G3eygrbsQIdmi54fRSsS5HP lPL1L9pAOymhcL1ahZ0C4pDM763wBvHV2vJj/ZsnocApP5hTwefCDBOYIfsfUm6MHegF fxScwKStaAcYI0xqwsWVGibL6l393QhURzIvoJ4ACXc9qk6mtzcoBYwSXR8MYl6FCo/L w/3v3QqONsD4Tk3TsRbyDq78Sxof5bToXgLJUyojDxLGI0vGyARlNvNYpTL1ITcg61nk ksLg== X-Gm-Message-State: AKwxytdSZy416rrMl8myXJh0oALdjVouX37Zn4lu10C3uoEJUdLJGIXd 1mEf1H2hrbVfUgkOe0h71WLphly+DDSnf1r9sUIy3A== X-Received: by 10.36.238.194 with SMTP id b185mr5767645iti.100.1516739928019; Tue, 23 Jan 2018 12:38:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.59.196 with HTTP; Tue, 23 Jan 2018 12:38:47 -0800 (PST) In-Reply-To: <20180123173312.1d8cf02f@alans-desktop> References: <1516726375-25168-1-git-send-email-dwmw@amazon.co.uk> <1516726375-25168-6-git-send-email-dwmw@amazon.co.uk> <20180123173312.1d8cf02f@alans-desktop> From: Linus Torvalds Date: Tue, 23 Jan 2018 12:38:47 -0800 X-Google-Sender-Auth: TKeGYlvcJryKT75WEirfAlU0AZc Message-ID: Subject: Re: [PATCH v2 5/5] x86/pti: Do not enable PTI on fixed Intel processors To: Alan Cox Cc: David Woodhouse , Linux Kernel Mailing List 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 Tue, Jan 23, 2018 at 10:45 AM, Alan Cox wrote: > > static int in_order_cpu(void) > { > /* Processors with CPU id etc */ > if (x86_match_cpu(cpu_in_order)) > return 1; > /* Other rules here */ > return 0; > } Note that "in-order" does *not* necessarily mean "no speculation". You still do branch prediction, you still have a BTB for all but the simplest in-order things, and you may still end up running instructions at least part-way through a pipeline. Whether it gets to a cache replacement or not is unclear. So that naming is very misleading. It is quite possible (even likely) that the old in-order Atoms do not have this issue, because it's definitely true that in-order tends to limit speculation a lot, and any mis-predict will _probably_ kill instructions early enough that you'd never see this. But meltdown, for example, is based entirely on uarch details in the memory pipeline, not on in-order vs ooo. Again, an in-order CPU is probably less aggressive in the memory pipeline too, so there is probably strong correlation, but there is no causal relationship. Linus