Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4799353iob; Mon, 9 May 2022 01:46:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQvwtZN70C523TqQGDJfA0N9bUH/1RTY/ain4gP+RL1ubXJuPkrQYjJ+rSybEcD1OqCdfQ X-Received: by 2002:a05:6638:4189:b0:32b:a06a:b007 with SMTP id az9-20020a056638418900b0032ba06ab007mr6768054jab.101.1652086005955; Mon, 09 May 2022 01:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652086005; cv=none; d=google.com; s=arc-20160816; b=fFU3l3kWVJLJITiqyvFZGhR33ImOMThULllM34LVOUGOSRQFX84g77iKJuRiVC1fuY vIbGLbruwQOav68pAG4uvTFCr/zUnhYjBng2FIhERpc9F/oPD+EHJrp+IGDQAj3KrDHC AA5WVMljBfSRlKm1vmZyxFTbZm2I8Uvg2VrwRtC+SilGDrElR2xL7s3VBFsaTAOYC350 UlV4//xGg+rGOAGUOswwXu7WrR0XJkBCA1V5+sZw+U8lGsX57VQhEs8xC36nxU68CGca 3uzsG33Fbl0VdA8VVFeJOIYJcSJReZ9gcNt19TLZJePu/evfoZppGLvZk+Pjd8HxxE71 LWsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DJQuHSIAlHGIpor5c5dPdkEnVxEx8DbE7jmudCub3d4=; b=FdRhkfSSL6e7XsUTOmV/Or2BbTBa3VD5V9GbRDhcXAxw+zC96KGT8V2elT8aH/VceW F/VFWQXo1Ja0GySqckz5T/y8Wg1h9b2HiYKKO5uA/JFiWSUkol7ktbdxeC5/KtjI6jC5 e8ZZOB0REzzZ/BgXycQLpo9gkuw9hpLR+txKqRmNKPTtaoDndomdm2cV9XMkaaqPePXV HrCTh3W1ppZEbeHqj80JXTKXgW9kDPgz2M5Vg1ObTwmIGmz3NzUcFf9GZNl6rhXjPYiC jPPj+ZeE7TSwRBzDMezR80+rbLqJrDozOqezjBlNLL9Cd+TJ0Mi1njSJ2qOqvTAjkXoG Apmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=jQ7xZaZT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s6-20020a056638218600b0032acae4c60esi11623707jaj.144.2022.05.09.01.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:46:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=jQ7xZaZT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 176B339157; Mon, 9 May 2022 01:31:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443305AbiEFQE6 (ORCPT + 99 others); Fri, 6 May 2022 12:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387752AbiEFQEz (ORCPT ); Fri, 6 May 2022 12:04:55 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A88869CC8 for ; Fri, 6 May 2022 09:01:09 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id s14so7858460plk.8 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=gqNMv787Z90ixO/5YErw1NS/s7O6EH10ZvnOiyYWqDCbsepLj2UGIcLWpZQA5xNiMx R0/VQOChlsQT6mPAulgvkDx3fLNEZG21GBNKKLL32GW9oV2BgmHlMw/PILZANWAjpQNv poJ8uCO26V7McElZX3rtC50jktID8LGQfiWEXiCgwbuNstYm346UmlD4mxfwgl68e5FL vHCJqWDsYJfvMv5BHJfN+bwk3uGgqv7bc2gUbCWyQq3aB6ZFS9/JXa/HP2OFYxbAKg4D libYgZWvduCYH6p77g/fv8YVa2Hntdp/iNEWoZI0FeN4mvSoiQ+MwvvxIpnPxPd9T9hi SPmQ== X-Gm-Message-State: AOAM53368gHi3GofSP9Ou64M8pm5NqZTUwwtfJMZz7mV46uSAgcsWyX+ OCu5QMSl1/OECPI2I7ViKRyybQadoOQYDcSD9Cbudg== 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.