From: Dave Hansen <dave.hansen@intel.com>
To: Martin Fernandez <martin.fernandez@eclypsium.com>,
linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com,
luto@kernel.org, peterz@infradead.org, ardb@kernel.org,
dvhart@infradead.org, andy@infradead.org,
gregkh@linuxfoundation.org, rafael@kernel.org,
daniel.gutson@eclypsium.com, hughsient@gmail.com
Subject: Re: [PATCH 1/1] x86: Export information about hardware memory encryption to sysfs
Date: Fri, 10 Sep 2021 14:42:18 -0700 [thread overview]
Message-ID: <3efedc48-74eb-ee3f-451f-a96117719c4f@intel.com> (raw)
In-Reply-To: <20210910213337.48017-2-martin.fernandez@eclypsium.com>
On 9/10/21 2:33 PM, Martin Fernandez wrote:
> +static void __init efi_set_mem_crypto(void)
> +{
> + efi_memory_desc_t *md;
> +
> + efi_mem_crypto = EFI_MEM_ENCRYPTION_CAPABLE;
> +
> + for_each_efi_memory_desc(md) {
> + switch (md->type) {
> + /* System memory after ExitBootServices */
> + case EFI_LOADER_CODE:
> + case EFI_LOADER_DATA:
> + case EFI_BOOT_SERVICES_CODE:
> + case EFI_BOOT_SERVICES_DATA:
> + case EFI_CONVENTIONAL_MEMORY:
> + case EFI_ACPI_RECLAIM_MEMORY:
> + if (!(md->attribute & EFI_MEMORY_CPU_CRYPTO)) {
> + efi_mem_crypto = EFI_MEM_ENCRYPTION_NOT_CAPABLE;
> + return;
> + }
> + }
> + }
> +}
If the ABI is per-NUMA-node, shouldn't this be determining and reporting
of each individual node is EFI_MEMORY_CPU_CRYPTO instead of reporting a
system-wide value?
I understand that this was a lot easier to hack together than doing
that, but it could be extremely misleading to an end user.
Would it be possible that 'efi_mem_crypto' would need to be updated on a
memory hotplug event?
next prev parent reply other threads:[~2021-09-10 21:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 21:33 [PATCH 0/1] [RFC] x86: Export information about hardware memory encryption to sysfs Martin Fernandez
2021-09-10 21:33 ` [PATCH 1/1] " Martin Fernandez
2021-09-10 21:42 ` Dave Hansen [this message]
2021-09-10 21:44 ` [PATCH 0/1] [RFC] " Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3efedc48-74eb-ee3f-451f-a96117719c4f@intel.com \
--to=dave.hansen@intel.com \
--cc=andy@infradead.org \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=daniel.gutson@eclypsium.com \
--cc=dave.hansen@linux.intel.com \
--cc=dvhart@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=hughsient@gmail.com \
--cc=linux-efi@vger.kernel.org \
--cc=luto@kernel.org \
--cc=martin.fernandez@eclypsium.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).