* Dave Hansen (dave.hansen@intel.com) wrote:
On 10/6/21 11:18 PM, Dov Murik wrote:
quoted
+static int sev_secret_map_area(void)
+{
+ struct sev_secret *s = sev_secret_get();
+ struct linux_efi_coco_secret_area *secret_area;
+ u32 secret_area_size;
+
+ if (efi.coco_secret == EFI_INVALID_TABLE_ADDR) {
+ pr_err("Secret area address is not available\n");
+ return -EINVAL;
+ }
+
+ secret_area = memremap(efi.coco_secret, sizeof(*secret_area), MEMREMAP_WB);
+ if (secret_area == NULL) {
+ pr_err("Could not map secret area header\n");
+ return -ENOMEM;
+ }
There doesn't seem to be anything truly SEV-specific in here at all.
Isn't this more accurately called "efi_secret" or something? What's to
prevent Intel or an ARM vendor from implementing this?
I don't think anything; although the last discussion I remember on list
with Intel was that Intel preferred some interface with an ioctl to read
the secrets and stuff. I'm not quite sure if the attestation/secret
delivery order makes sense with TDX, but if it does, then if you could
persuade someone to standardise on this it would be great.
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK