Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp959649imj; Thu, 7 Feb 2019 14:54:51 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia+M13Lz+JLwyj3gy2cqO56YqMw4r8JUyknFb7MpWdvP3KCRToXb1t7k9cUKCauo3jowQ/M X-Received: by 2002:a17:902:bf44:: with SMTP id u4mr4003226pls.5.1549580091634; Thu, 07 Feb 2019 14:54:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549580091; cv=none; d=google.com; s=arc-20160816; b=SJKsDs8VrfW8aZ76rL/pOTWtSJqEHNmZawOxScNwdKouqm5LCV37PREwn4WJ+IkSCU L2xMhz2JnFsaoyg66TQR1ovVNeA1hj929vSptc7ksHKXFtyDDf3++L/eDL/w05KL8uQK TUekdxl9bg2J//oc1ukOooWRsc3Lrk+fq0yZg04taEgdHiw/yOaQy0g7g9twOevVV7vr q6NI606GtLCOfCsmWWauAL7AVsISW0NAl0kQOl1OxJBO2HPcd1Vz0/hW9r/efRwcSNIG SzcmWF2teDI/CirGXiRsfBWXewNhvkoSAp0+i8LulkYkFmZ9WoxSMp4S7/NuQ/vZnIWY eCBA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=YhSNRD1YNL95zw/7uEGz3G0NGJgHNBHGk+Z0V0EY+OA=; b=XmyYaVfC98i6n5GKpXcdN9YBfKM5i/adZ+5lwkRjvSM9fcTSWLTcrOo8Y180IOy2p7 C1hd0NyyksH44yPLNsyjhEHHJyf7WWg6/FBCSaNH+XCu/jnC9Hgn01Y7MpBe8SImJIWc 4AkX3x4XVKJRR++u//Fp4/yET3Y8ECtOH1QUvUmcDXLHY8OukeHcyquDdA84nUbruFUS OYMBYi43gHEc3de1fNmd07iemaaWhla1u0ZvTGx5WYf4zTeQmotql6exbyjvrM7bvpyl HthxMM6lvBcn/M+3NOo/kiLWpHqlwIJEx+3+IE2W7wQOWzzp3oORcS/y6SeJ6kPi79YV M1yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=c3BWfxji; 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 f23si301290pfa.228.2019.02.07.14.54.35; Thu, 07 Feb 2019 14:54:51 -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=pass header.i=@linux-foundation.org header.s=google header.b=c3BWfxji; 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 S1727082AbfBGWxW (ORCPT + 99 others); Thu, 7 Feb 2019 17:53:22 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45646 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726622AbfBGWxV (ORCPT ); Thu, 7 Feb 2019 17:53:21 -0500 Received: by mail-lf1-f66.google.com with SMTP id b20so1137103lfa.12 for ; Thu, 07 Feb 2019 14:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YhSNRD1YNL95zw/7uEGz3G0NGJgHNBHGk+Z0V0EY+OA=; b=c3BWfxjiyJH2n+C8OH4ICqaY0qDLGHSdeuEQlHjL2aeJfGi8DOtBUGAc8Cpuw3DQzj Iof7dKRRGqRD+SRqieKipjWX18nC4zGnM+ekgTeZeQ/LdGrfHYO5FcOlks5g2LJLKkye blHxMCm/xworKcgtne9LjC7hN9yibqtbSodn0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YhSNRD1YNL95zw/7uEGz3G0NGJgHNBHGk+Z0V0EY+OA=; b=KmftMrqnxO5mxa1HzNfMIcPtliLsW8qGqk4C3VYfeSOprI6/hYX/CctMfV4EODaesB eWyeCxAI1Rv7kry1/Q4DsZFVQkK78AwrsJLJI+0Jnvz00tHzuKQyYTu3NSnLxaPHGP8o cm/jq5nRA8g39+Y2xlqHGAbALIPVdzDwtn8vuKdGPYhCBDCo2I1wM5WCFXP/cMEnIq23 mFhqnz0GK+L8kWnJu5z2WP8c4CsUIJUZu+zHrLZb1kRH6dvE1sVNcaZ7/uAhsJfhuqqV hWSIgdITPM9hc5YvBfzVna0Rq+c0tXXOJUvZ7u1rOdWE0OYSXSU6bgNa1WE8LcTN/gkM UW2Q== X-Gm-Message-State: AHQUAuaVDFIfsbxoXyDS2oK76u4fthfCMrraR2XkLp9pJgAukGvV56W2 vTY6/eFPOAtcymdVcrRcqHL23HQqmGjBRQ== X-Received: by 2002:a19:a9d2:: with SMTP id s201mr11801114lfe.154.1549579999177; Thu, 07 Feb 2019 14:53:19 -0800 (PST) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id z17sm53672lfh.9.2019.02.07.14.53.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 14:53:18 -0800 (PST) Received: by mail-lj1-f175.google.com with SMTP id q2-v6so1327939lji.10 for ; Thu, 07 Feb 2019 14:53:17 -0800 (PST) X-Received: by 2002:a2e:8045:: with SMTP id p5-v6mr11084699ljg.87.1549579997436; Thu, 07 Feb 2019 14:53:17 -0800 (PST) MIME-Version: 1.0 References: <20181224231106.GA27438@gmail.com> <20190207001737.GA32096@agluck-desk> <20190207101846.GB32511@hirez.programming.kicks-ass.net> <20190207140131.GB32477@hirez.programming.kicks-ass.net> <20190207173600.GA15682@agluck-desk> <20190207175720.GE32511@hirez.programming.kicks-ass.net> <8D8DF81C-3331-4105-8594-9600281010EF@amacapital.net> <20190207184606.GB17049@agluck-desk> <22E08A6D-5180-42F1-B94B-6B6DB832F953@amacapital.net> In-Reply-To: <22E08A6D-5180-42F1-B94B-6B6DB832F953@amacapital.net> From: Linus Torvalds Date: Thu, 7 Feb 2019 22:53:01 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] x86/mm changes for v4.21 To: Andy Lutomirski Cc: "Luck, Tony" , Peter Zijlstra , Dan Williams , Ingo Molnar , Linux List Kernel Mailing , Dave Hansen , Andy Lutomirski , Borislav Petkov , Thomas Gleixner , Rik van Riel 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 Thu, Feb 7, 2019 at 1:24 PM Andy Lutomirski wrote: > > How bad would it be to set CR0.CD while fiddling with the page tables rather than masking the address? I would suggest against it. When you disable caching, things don't just go "slightly slower". Everything comes to a screeching halt, with instruction fetch etc becoming a serious problem. So disabling caching for a few instructions in a very simple asm snippet might be reasonable (particularly since you could pre-fetch the cache and just rely on CR0.CD not fetching *new* lines). But doing it in C code that might have things like tracing enabled etc? I'd be very very leery. Linus