From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0608EC433FE for ; Fri, 6 May 2022 16:01:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6AA4A6B0072; Fri, 6 May 2022 12:01:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 659AB6B0073; Fri, 6 May 2022 12:01:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 521856B0074; Fri, 6 May 2022 12:01:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 42A1C6B0072 for ; Fri, 6 May 2022 12:01:12 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1ACE42F982 for ; Fri, 6 May 2022 16:01:12 +0000 (UTC) X-FDA: 79435782384.19.7E0AE81 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by imf09.hostedemail.com (Postfix) with ESMTP id E9386140062 for ; Fri, 6 May 2022 16:01:04 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id d22so7828411plr.9 for ; Fri, 06 May 2022 09:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DJQuHSIAlHGIpor5c5dPdkEnVxEx8DbE7jmudCub3d4=; b=jQ7xZaZTB7N7rBpIHs/0CElGn01l9AQXdNaX6k8jXrAaJqQ25NEB9BM5bbodgfv0cZ o8v4laiuonAI3gk+YGqelG0OD+DVySSMRg63uSIqREDRrPhJMR3KSuT35wwaUS8YFYch rOrxpkfD5RuaAn4QY/2lg91WF1zOptOKzMP2JKXphcGymjOcFefW0nQQh9kP7UJMY1GG OiLAM9wX+KmK/RtQGaobXp58jVCwVZnXJF4OhYZCQMkQfwBS7mr1AOvo0j7jY7pfCkbU dUVjbhAvhfetI4VuQjiWvUUR2qZuZOW3KhYQrFs63jjEkTtnpgJAig8xUxU2zRQZBPk2 my1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DJQuHSIAlHGIpor5c5dPdkEnVxEx8DbE7jmudCub3d4=; b=MIkk6QB4SgnxM6e+DA4Qr/Aacrun+/6iaPnOySU9NacS2LAtB1StPaG4Kz+aVhklMK Qd4QbRD3aFmEO5682bB9YXHY24K/F3zFa8rpmcm7mgx67cp6ECmwN2JG/GV/fMwz5Wcx eIl/PxAh/phnDB+DCIrFSf37BBGVdRUjd2E/mCaVoNNmw50gG7NY3DS6svW4lNH8Ejen sglvXYGjgz51MYRZyeaUNo+yfTu96Y//0Wh3FzKhzp6yvjjnRQOXsRcZnn0JaGOLAMKm 6AkkvKLwgmKVSrqOwvVDKDOFNrxxfrxEeHEiPVuRhqI5FkJk7jvEt7pH2Iqmu3koZyKI mU4A== X-Gm-Message-State: AOAM532ECAXS4d+BiPVdEMTtdVLFYcsVkExJLYioFUFGDiWExo4x2Sdr kQB/3y6xGPN91J6wQArLUcxnc61iikIzDu+uXhynqA== X-Google-Smtp-Source: ABdhPJzetNCcmtdzsuA7MVysj4PUmFLJT04ZeXbzfGR3fv4T/RqwwNln8yT470KW1ll1x94sH07JlabaHewBC2MmUDk= X-Received: by 2002:a17:902:da8b:b0:15e:c0e8:d846 with SMTP id j11-20020a170902da8b00b0015ec0e8d846mr4360481plx.34.1651852868602; Fri, 06 May 2022 09:01:08 -0700 (PDT) MIME-Version: 1.0 References: <20220429201717.1946178-1-martin.fernandez@eclypsium.com> <6d90c832-af4a-7ed6-4f72-dae08bb69c37@intel.com> In-Reply-To: <6d90c832-af4a-7ed6-4f72-dae08bb69c37@intel.com> From: Dan Williams Date: Fri, 6 May 2022 09:00:57 -0700 Message-ID: Subject: Re: [PATCH v8 0/8] x86: Show in sysfs if a memory node is able to do encryption To: Dave Hansen Cc: Borislav Petkov , Martin Fernandez , Linux Kernel Mailing List , linux-efi , platform-driver-x86@vger.kernel.org, Linux MM , Thomas Gleixner , Ingo Molnar , Dave Hansen , X86 ML , "H. Peter Anvin" , Ard Biesheuvel , Darren Hart , Andy Shevchenko , Greg KH , "Rafael J. Wysocki" , Mike Rapoport , Andrew Morton , daniel.gutson@eclypsium.com, hughsient@gmail.com, alex.bazhaniuk@eclypsium.com, "Schofield, Alison" , Kees Cook , Ben Widawsky , "Huang, Kai" Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: E9386140062 X-Stat-Signature: h9tnr63dzcq1n835f6tfcjsqwng7gqzc Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel-com.20210112.gappssmtp.com header.s=20210112 header.b=jQ7xZaZT; spf=none (imf09.hostedemail.com: domain of dan.j.williams@intel.com has no SPF policy when checking 209.85.214.182) smtp.mailfrom=dan.j.williams@intel.com; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=intel.com (policy=none) X-HE-Tag: 1651852864-973570 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 6, 2022 at 8:32 AM Dave Hansen wrote: > > On 5/6/22 05:44, Borislav Petkov wrote: > >> Dave Hansen pointed those out in a previuos patch serie, here is the > >> quote: > >> > >>> CXL devices will have normal RAM on them, be exposed as "System RAM" and > >>> they won't have encryption capabilities. I think these devices were > >>> probably the main motivation for EFI_MEMORY_CPU_CRYPTO. > > So this would mean that if a system doesn't have CXL devices and has > > TME/SME/SEV-* enabled, then it is running with encrypted memory. > > > > Which would then also mean, you don't need any of that code - you only > > need to enumerate CXL devices which, it seems, do not support memory > > encryption, and then state that memory encryption is enabled on the > > whole system, except for the memory of those devices. > > CXL devices are just the easiest example to explain, but they are not > the only problem. > > For example, Intel NVDIMMs don't support TDX (or MKTME with integrity) > since TDX requires integrity protection and NVDIMMs don't have metadata > space available. > > Also, if this were purely a CXL problem, I would have expected this to > have been dealt with in the CXL spec alone. But, this series is > actually driven by an ACPI spec. That tells me that we'll see these > mismatched encryption capabilities in many more places than just CXL > devices. Yes, the problem is that encryption capabilities cut across multiple specifications. For example, you might need to consult a CPU vendor-specific manual, ACPI, EFI, PCI, and CXL specifications for a single security feature.