Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp3081950rdb; Mon, 4 Dec 2023 16:49:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8rDse5ZzMWzKhH8eV44IQ9nrIgiZa9/dkb8bLkUomSN9AfNKaUXB515u/z1c8lk5BEIxe X-Received: by 2002:a05:6358:6f06:b0:16e:2876:5eed with SMTP id r6-20020a0563586f0600b0016e28765eedmr4325199rwn.15.1701737355552; Mon, 04 Dec 2023 16:49:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701737355; cv=none; d=google.com; s=arc-20160816; b=ywMcT0izRZXN7w4dhje9B9SQzrYR20XSAy+uaDrWOI3kEtdSBuDguwXTPmfumvXVD9 vPI6waTTzPt3g0OpXgzPPtrikLpcuI/Uozn+to1OzgGdx/qKkVKX+JET/J5UJhj3G56n 8Z/Y/LArg9q7PAw4SKLveKo6eMLIdbTfOcwbLoTKUsHOz6ZLFGmeRhVxOyI5L1JjG0wE E+i5w/9qjsrFnhhHTm5I/zn33Y3gXWMk4Mw0J//t5xMLKphfRvPHeXMSWb7eSM9LAZH1 k8z8enwBMyj9tVhC6CU/cPc4G+3UBaaLBdaAahc2nTSxHmGPXOfLRHqIGURjtuLOjz+e rgLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=lxuWs5WeL5blIKEEZ0dpXLc7B+HhRdY1WEpcCPigzSk=; fh=Gja1l53NHGWw3VKCV8W+Bva9i36Wcy6254Az0jXKXgI=; b=CeYdKqSlpYrPmDJJw8O13crws4/w8oMtUvWgR/NUrO5kAl8KQGYpX1RZCU2t3Tk8uA OOcZ7ZKT5TWKxQ48Gjn9YpmZ5liPZwyYmM8Efo3GqOyRI6ZMEvaJnbZ6WWeNCmsvjrFJ 2ebwrvqtMpAmpJakriA6mElKZ3LdmLCxuUiqJPzCPHRuODCkhug6wUQLp/NbtLP6+gWm hhjz7AV0TzUtXC0rqWPjaT4GHStbv7B24nVftE90M1bHfm/6KgI1U3kxj2xpgF1k8I0j NnQgKrBxOBrALX17d99tk/J5k2CkNzpZvpY8L8WomXhZ0Wr5bXnTejqRRki0hBCMOrgZ d2Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=epvSBOT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id v15-20020a17090a898f00b00286550aeb78si6812669pjn.102.2023.12.04.16.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 16:49:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=epvSBOT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 44FA88096DAB; Mon, 4 Dec 2023 16:49:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231627AbjLEAsm (ORCPT + 99 others); Mon, 4 Dec 2023 19:48:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbjLEAsl (ORCPT ); Mon, 4 Dec 2023 19:48:41 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BC69FF for ; Mon, 4 Dec 2023 16:48:47 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-548ae9a5eeaso2688a12.1 for ; Mon, 04 Dec 2023 16:48:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701737326; x=1702342126; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lxuWs5WeL5blIKEEZ0dpXLc7B+HhRdY1WEpcCPigzSk=; b=epvSBOT0gn0MixcpX3Jf1psGnK3p7vARTDuqdNOnID89p679gSFF0wqqp3MFZQnNmR onToYadGWvkagcbb+aiM85ALR22+KpTlk0jiJRMw0M47/hWVb9sd3962hWTeL6e1zlpR q0yAVEiLrSTbCZxVHmwDMU7KVGN5B7EwUVnCSVP4fKjz75qMGUo3lOj1DnOSENzfh14W Sp/QiHS3V/jpkDB6jGCm684fZzSBmO59vUTyG5w9eFSyYEzqGS1U2CvxlWtzwThB8EVp cYMVLrptM0uTa501ksqp4PV09lpT4gcnO58V6w6+ZZ9IcG0yrhWso0p+VyhRN7ox+Ef9 Gm8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701737326; x=1702342126; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lxuWs5WeL5blIKEEZ0dpXLc7B+HhRdY1WEpcCPigzSk=; b=r8pNLpRBl266JjvPvjPgyDfkMg97MLUqnC+Eye/5qQjyzfavnpc6UVqP2tFppI9En7 UFORd02fIKvrGbAJG01xcQ6MKtE+lHHNWwLJldzB973XfvxzF93MufPgRsj4C+D6Pw6q pm3RvUuSpwfq4Pd3pT+NOYKy+Q0n6aTeQIrTUo6HSF7wOROhGTmVJRfRs7/G94HJfHue CmKEdBRWop7LojYtb2BeUU6cHDZN2hhSkVn5vbVlQUjl3JcPEMj9g14cHt2l1KqbnP2/ QtzpMFsnO/mVojRpHtefmA6zuKIi1OkCWu/SH/YdtEb7Kvep50KM42jZ4n6i8gU/NP8k atBg== X-Gm-Message-State: AOJu0YzIGJnC0IHfg5L4b+m5hvxNaoWgIgolP1HF4ZulHxxFrW861Bb2 PnpmUke8L7nUsQezQu1REjV8MuOdjNmn40uJ6fY1fg== X-Received: by 2002:a50:bb48:0:b0:54b:bf08:a95f with SMTP id y66-20020a50bb48000000b0054bbf08a95fmr474310ede.6.1701737325590; Mon, 04 Dec 2023 16:48:45 -0800 (PST) MIME-Version: 1.0 References: <20231016132819.1002933-1-michael.roth@amd.com> <20231016132819.1002933-49-michael.roth@amd.com> <20231110220756.7hhiy36jc6jiu7nm@amd.com> <656e6f0aa1c5_4568a29451@dwillia2-xfh.jf.intel.com.notmuch> In-Reply-To: <656e6f0aa1c5_4568a29451@dwillia2-xfh.jf.intel.com.notmuch> From: Dionna Amalie Glaze Date: Mon, 4 Dec 2023 16:48:34 -0800 Message-ID: Subject: Re: [PATCH v10 48/50] KVM: SEV: Provide support for SNP_GUEST_REQUEST NAE event To: Dan Williams Cc: Sean Christopherson , Michael Roth , Alexey Kardashevskiy , kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, jroedel@suse.de, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, vkuznets@redhat.com, jmattson@google.com, luto@kernel.org, dave.hansen@linux.intel.com, slp@redhat.com, pgonda@google.com, peterz@infradead.org, srinivas.pandruvada@linux.intel.com, rientjes@google.com, dovmurik@linux.ibm.com, tobin@ibm.com, bp@alien8.de, vbabka@suse.cz, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, jarkko@kernel.org, ashish.kalra@amd.com, nikunj.dadhania@amd.com, pankaj.gupta@amd.com, liam.merwick@oracle.com, zhi.a.wang@intel.com, Brijesh Singh , dan.middleton@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 04 Dec 2023 16:49:12 -0800 (PST) On Mon, Dec 4, 2023 at 4:30=E2=80=AFPM Dan Williams wrote: > > [ add Dan Middleton for his awareness ] > > Dionna Amalie Glaze wrote: > > > > So we're sort of complicating the more common case to support a mor= e niche > > > > one (as far as userspace is concerned anyway; as far as kernel goes= , your > > > > approach is certainly simplest :)). > > > > > > > > Instead, maybe a compromise is warranted so the requirements on use= rspace > > > > side are less complicated for a more basic deployment: > > > > > > > > 1) If /dev/sev is used to set a global certificate, then that wil= l be > > > > used unconditionally by KVM, protected by simple dumb mutex du= ring > > > > usage/update. > > > > 2) If /dev/sev is not used to set the global certificate is the v= alue > > > > is NULL, we assume userspace wants full responsibility for man= aging > > > > certificates and exit to userspace to request the certs in the= manner > > > > you suggested. > > > > > > > > Sean, Dionna, would this cover your concerns and address the certif= icate > > > > update use-case? > > > > > > Honestly, no. I see zero reason for the kernel to be involved. IIUC= , there's no > > > privileged operations that require kernel intervention, which means t= hat shoving > > > a global cert into /dev/sev is using the CCP driver as middleman. Ju= st use a > > > userspace daemon. I have a very hard time believing that passing aro= und large-ish > > > blobs of data in userspace isn't already a solved problem. > > > > ping sathyanarayanan.kuppuswamy@linux.intel.com and +Dan Williams > > Apologies Dionna, I missed this earlier. > No worries, I've been sick anyway. > > > > I think for a uniform experience for all coco technologies, we need > > someone from Intel to weigh in on supporting auxblob through a similar > > vmexit. Whereas the quoting enclave gets its PCK cert installed by the > > host, something like the firmware's SBOM [1] could be delivered in > > auxblob. The proposal to embed the compressed SBOM binary in a coff > > section of the UEFI doesn't get it communicated to user space, so this > > is a good place to get that info about the expected TDMR in. The SBOM > > proposal itself would need additional modeling in the coRIM profile to > > have extra coco-specific measurements or we need to find some other > > method of getting this info bundled with the attestation report. > > SBOM looks different than the SEV use case of @auxblob to convey a > certificate chain. The SEV use case has a GUID table in which we're allowed to provide more than just the VCEK certificate chain. I'm using it to deliver a UEFI endorsement document as well. > > Are you asking for @auxblob to be SBOM on TDX and a certchain on SEV, or > unifying the @auxblob format on SBOM? Given SEV is both certchain and SBOM and TDX doesn't need a certchain in auxblob, I'd just be looking at delivering SBOM in auxblob for TDX. It's probably better to have something extensible though, like SEV's GUID table format. We may want to provide cached TDI RIMs too, for example. > > > My own plan for SEV-SNP was to have a bespoke signed measurement of > > the UEFI in the GUID table, but that doesn't extend to TDX. If we're > > looking more at an industry alignment on coRIM for SBOM formats (yes > > please), then it'd be great to start getting that kind of info plumbed > > to the user in a uniform way that doesn't have to rely on servers > > providing the endorsements. > > > > [1] https://uefi.org/blog/firmware-sbom-proposal > > Honestly my first reaction for this ABI would be for a new file under > /sys/firmware/efi/efivars or similar. For UEFI specifically that could make sense, yes. Not everyone has been mounting efivars, so it's been a bit of an uphill battle for that one. Still there's the matter of cached TDI RIMs. NVIDIA would have everyone send attestation requests to their servers every quote request in the NRAS architecture, but we're looking at other ways to provide reliable attestation without a third party service, albeit with slightly different security properties. --=20 -Dionna Glaze, PhD (she/her)