Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1678122pxb; Thu, 7 Oct 2021 12:41:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFFIs/sBUxlsNuDTlldmvlVa88kqAWfKkIaGv+rw99GLSt7D3dTSV4iVRC1ukDTeVvlLq8 X-Received: by 2002:a62:8c92:0:b0:44c:acfe:73a2 with SMTP id m140-20020a628c92000000b0044cacfe73a2mr6126831pfd.9.1633635683330; Thu, 07 Oct 2021 12:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633635683; cv=none; d=google.com; s=arc-20160816; b=SwN9WZLugIgYlvy6dCaO4jUL/brtdpFZ1BrVXom1Pzxnf3VaF8mKrNNUojInmxMInR 82U72rXALAu247tGaSgK6VhR2M64CAQlP6SxIazNxom8nACaj0NrZX8UiU5I5CCcgOZJ CnU7g/J3Y1/NcNA1clXJYOcO4PjR9BD/nk2yBARv06vr7WuVsRe579hC/qnAnIl+RyRg FgkoGz7haLb1aJiWZnMXs/ajV0eXYp+Ec0isZ4b4qPrbYyMITtYZoI1XiL0TOK5aca21 o7BP3GrnINuQJ5v5YtZoyJqaOZO+M2hHTuqeWz7oDqTbqRbEoS2eO4dokEzwSKxOmBvW 2dpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=blEAPOI+nF0owA6gNBYFWO1A41DzHlnw6VWPwMJ/+zM=; b=o4LwZbnn+ba2iCKYGdj6rTTwvyQzfRweNgiQ6E7x/8lLUyIJ87d/+zPI2qFhhyEFwT qmVEoOVNRg8fY+FdLg3zFGJeaLCGt2iQbqxbDG83/7bu23vkbbNaTJGy+cwWWQU3547y UDNdZNaD+mrFwWZK0w/43CWdgrNO33GL+7uL/XpLNZtQRq24olnLus7NxcTRoe9M1/nG 3efxv8EFN5/vV7LcPoxB7IbMouogL1ziOO73QlhrexReU6ukfnmEXVCdrsreOZ0iZ/8s D4uvH6fo1kFjy+8/2GC8U4z2P1hMvOj5y7l94T7dT9qSzTf7Y2Z/GYipEIB/ywpPt+vg nrZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LLyjASjQ; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si251697pgi.142.2021.10.07.12.41.10; Thu, 07 Oct 2021 12:41:23 -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=@redhat.com header.s=mimecast20190719 header.b=LLyjASjQ; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242673AbhJGQT4 (ORCPT + 99 others); Thu, 7 Oct 2021 12:19:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26868 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242327AbhJGQTz (ORCPT ); Thu, 7 Oct 2021 12:19:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633623481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=blEAPOI+nF0owA6gNBYFWO1A41DzHlnw6VWPwMJ/+zM=; b=LLyjASjQynccLDiarNREi2sQAC9DThB4k1qYJ5skg1i4+5ygvRuqHc2jDG/er8iJlzTDA3 pffKrZiKJ/JIoJHJNiCqbZsCJSAranyl6PISiiRnWuuH9Ld64la1aTmyxlX/8g7/qP3yHz HZAMyXk7EzPRtkv3ECsehGTguqp0G2c= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-598-iLckXYHBNYa9VkLlk5M-hw-1; Thu, 07 Oct 2021 12:17:59 -0400 X-MC-Unique: iLckXYHBNYa9VkLlk5M-hw-1 Received: by mail-wr1-f71.google.com with SMTP id y12-20020a056000168c00b00160da4de2c7so2032442wrd.5 for ; Thu, 07 Oct 2021 09:17:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=blEAPOI+nF0owA6gNBYFWO1A41DzHlnw6VWPwMJ/+zM=; b=5CUcFXyWJGspzKYiiR9Hns3JH/dlHZ9wu61Mx2kdzLE6jpC1THXlToyv9l3fL+gkfg 2EmYEV8Ddy5CByN5vU9bmpFXK49veL1dX4PmVlUh2hVD0wV1aoi8nPjJaxeaQHSTwozT bqzytHNO0G40Y7c96lMt1RgBqrIlK+ARA5uVo0L+JyvNWR5IGFAogsj0IM8v+uUJitA5 jyKA8LG0TrRFYklTASE/gVEFlo7s5+5cLK5DSNsMNpSgs+R4JyP/Nqnra31ZrO/w9fiH X1VdmdF00LLhSzXfaBtgzwnixirge04x7HtrkgVPt83YULONRzcVM+AhAehsaXoLqfGe Q2zw== X-Gm-Message-State: AOAM531AfGVgzF559eeOQh6U8cncAjMl/Dw+4akEFCgvLsSWJWba+J5I AwHEONciex6HqL0Xvh4YExSHX7GBZLHwCaTjo5MiNrZ21qqG+QvfqNoA4h1cAJQOpHGdiDzNgaY QIXZe75+R+FEhly2Fd1E/Wah2 X-Received: by 2002:a5d:59ae:: with SMTP id p14mr6853075wrr.278.1633623477615; Thu, 07 Oct 2021 09:17:57 -0700 (PDT) X-Received: by 2002:a5d:59ae:: with SMTP id p14mr6853057wrr.278.1633623477478; Thu, 07 Oct 2021 09:17:57 -0700 (PDT) Received: from work-vm (cpc109025-salf6-2-0-cust480.10-2.cable.virginm.net. [82.30.61.225]) by smtp.gmail.com with ESMTPSA id k17sm9320224wmj.0.2021.10.07.09.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 09:17:56 -0700 (PDT) Date: Thu, 7 Oct 2021 17:17:54 +0100 From: "Dr. David Alan Gilbert" To: Dave Hansen Cc: Dov Murik , linux-efi@vger.kernel.org, Borislav Petkov , Ashish Kalra , Brijesh Singh , Tom Lendacky , Ard Biesheuvel , James Morris , "Serge E. Hallyn" , Andi Kleen , Greg KH , Andrew Scull , James Bottomley , Tobin Feldman-Fitzthum , Jim Cadden , Daniele Buono , linux-coco@lists.linux.dev, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] virt: Add sev_secret module to expose confidential computing secrets Message-ID: References: <20211007061838.1381129-1-dovmurik@linux.ibm.com> <20211007061838.1381129-5-dovmurik@linux.ibm.com> <7e2a4595-3f9c-6d65-34e3-af7c1d6da196@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e2a4595-3f9c-6d65-34e3-af7c1d6da196@intel.com> User-Agent: Mutt/2.0.7 (2021-05-04) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen (dave.hansen@intel.com) wrote: > On 10/6/21 11:18 PM, Dov Murik wrote: > > +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