Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp511696ybt; Fri, 19 Jun 2020 07:12:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlRgGT10SjJtgSuZHmlTPII2LdqCbP6eK6/Crq8HtiTyNW6o/Efplz5jCxdJRiHlGCIZKu X-Received: by 2002:a17:906:328d:: with SMTP id 13mr3955601ejw.71.1592575953365; Fri, 19 Jun 2020 07:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592575953; cv=none; d=google.com; s=arc-20160816; b=TYMgnpPsX9tdrzBpFTmroYvzM+dUNKxg81/8YUUidbcoe3GjHV6jAwiCr4hp+D97cU AH0LowkS1OAX+FmZbjfgB6ZaiJoyduxIkw9KXzpyg9mYkDeBAG62h7/cR0fm73Q8IFyu fIeccPUSuXSTs8tCYE8pztxFMywJ4R1OKyqYFnFmZJrjzQhNPK7wwQ8IVyUMdOmm2MjV 7CKN+PTjcprTSx+SNY/rg8ySnHZLlOf9zqflb3M12QzKQalyq3K95nWZJsFP67k/bwpq kDPh3ZkaLbYbqne6sO9Qeun0nGL2u9ZBl9JUSDlJIKgHGwguy6LUXuftQqn/x+MVxrvz gQuA== 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=WSN+a2RVNGMBSxMoxwqKpJqZZbVxq/HTpK1YQsoLOvQ=; b=Uj8SkRGE9xDiQ0oRrvTvspz09wuF1LAJpWnOmqXx3KHgf+tcGKn4lHz2BvRmkEUrA7 v/C16/OUnxCoaQn3VVYt+evOtiY9xB/lyfySIfC4MTo9vTq7cceGPMT0DRcgXJsfL6AL npUBldl6jnxBGVtyA6QUNLhFhruhLcPATL0SGGI4NJGS8xxhxFPxKIh5Gpd9tdj8zNFc hBNh6GU34bIHXm0VOEFTwrqqc7fYgzcnqNh2+mauYQCa1T/RYO4/VJinCDN3EwwFzmzW Md9N7q7uOcm83cCsmU+oJ73LfbwgFCGQsNVYHe5WLXrLJdANELhDdKFV0EteFEYNdLPV mbxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="khk/dVYT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ha3si3988161ejb.563.2020.06.19.07.12.11; Fri, 19 Jun 2020 07:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="khk/dVYT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733197AbgFSOJ0 (ORCPT + 99 others); Fri, 19 Jun 2020 10:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbgFSOJX (ORCPT ); Fri, 19 Jun 2020 10:09:23 -0400 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C31DC06174E for ; Fri, 19 Jun 2020 07:09:23 -0700 (PDT) Received: by mail-vs1-xe44.google.com with SMTP id q2so5672996vsr.1 for ; Fri, 19 Jun 2020 07:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WSN+a2RVNGMBSxMoxwqKpJqZZbVxq/HTpK1YQsoLOvQ=; b=khk/dVYTi6EwwazULEZ22xn6wr4m9EWCJc0ruPwHDfNSiO2Ghl8ifOFklLvezpLcLj HLL91p161trSUnoVwYgLI5bdzH7DDL2CV9BHH7W1sPkkOfYES78xqlXzDQ0yLSr9oFX3 0tqtaO8x+IJnZFtS7DD1JQHcCegeTaJVZf1odfIhadequ2cjDsyNXEYSB8nXyWDjCyi7 GUgFP1QIqXLuPjIg6b8mMDNwksmfJUx49MWjS6lhD7vJnhY0Rc3QOe9RUUGDoPHg0Ykt gQci6L6xS840ab1z2MW5iBFt9vmZvor/RxNyTScU3A+dmyFC9uAI5aA6CRtQNd9LtYjd A4rw== 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=WSN+a2RVNGMBSxMoxwqKpJqZZbVxq/HTpK1YQsoLOvQ=; b=tI9HgjWPffiNyiNS8De5LM9X4JjHR2THuOZ57aRN1CGt/FMx8RQjSMQoe7fT1AjIp0 MxR2jVlh7Og/rlaUIHfknDI6r/3URU2GM0ayCxJdP/SALR1QVXHVlZGuUc4d7m81Oy95 hdwkbhSmSZebD1rlT4q1AWqdc+dG+nvlfggR6973AMZtT9t6gPh7TLiRzUuAOhnV6oHJ FyJ9VW0VgopbE41yK8m/dO9yl2/0ygaGyH1okwhCs2BEqveZpeVUlWjNCt9CWfDK6SzT DFqItNfDeIhL1X8Y3gmHS5BI8Sja3w+tNPlwHDMTkObU6SFnkiBGLxC9FlMdJ6rrdmLW ETNA== X-Gm-Message-State: AOAM531XOXvtxqveK2ueQtl/wo4sAYOfHMGVifobeiLiYTNyeUsByRE0 O3f9BkrbjHWLzX9KYDmPGJ8czeVJ45MdkwNrqx8= X-Received: by 2002:a67:d597:: with SMTP id m23mr7913365vsj.209.1592575762106; Fri, 19 Jun 2020 07:09:22 -0700 (PDT) MIME-Version: 1.0 References: <20200618210215.23602-1-daniel.gutson@eclypsium.com> <589c89ae-620e-36f8-2be5-4afc727c2911@intel.com> <23babf62-00cb-cb47-bb19-da9508325934@intel.com> <80578b72-cb6f-8da9-1043-b4055c75d7f6@intel.com> In-Reply-To: From: Richard Hughes Date: Fri, 19 Jun 2020 15:09:09 +0100 Message-ID: Subject: Re: [PATCH] Ability to read the MKTME status from userspace To: Dave Hansen Cc: Daniel Gutson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Arnd Bergmann , Greg Kroah-Hartman , Peter Zijlstra , "David S. Miller" , Rob Herring , Tony Luck , Rahul Tanwar , Xiaoyao Li , Sean Christopherson , Dave Hansen , linux-kernel 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 Fri, 19 Jun 2020 at 14:58, Dave Hansen wrote: > > Right, but for the most part you'd agree that a machine with > > functioning TME and encrypted swap partition is more secure than a > > machine without TME? > > Nope. There might be zero memory connected to the memory controller > that supports TME. So you're saying that a machine with TME available and enabled is not considered more secure than a machine without TME? What I want to do is have a sliding scale of TME not available < TME available but disabled < TME available and enabled < TME available, enabled and being used. The extra nugget of data gets me from state 2 to state 3. > > Can I use TME if the CPU supports it, but the platform has disabled > > it? How do I know that my system is actually *using* the benefits the > > TME feature provides? > > You must have a system with UEFI 2.8, ensure TME is enabled, then make > sure the OS parses EFI_MEMORY_CPU_CRYPTO, then ensure you request that > you data be placed in a region marked with EFI_MEMORY_CPU_CRYPTO, and > that it be *kept* there (hint: NUMA APIs don't do this). So my take-away from that is that it's currently impossible to actually say if your system is *actually* using TME. Richard.