Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18506105rwd; Tue, 27 Jun 2023 18:50:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fORLvPwELNKBrPy319d6Wp70021+iTKCrmnHXqegoCwyP/dmNWVPuPVCYdX0unjC2L0gM X-Received: by 2002:a05:6a20:5488:b0:127:5d58:a7e1 with SMTP id i8-20020a056a20548800b001275d58a7e1mr8194710pzk.52.1687917031966; Tue, 27 Jun 2023 18:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687917031; cv=none; d=google.com; s=arc-20160816; b=qMwdMzuIi6Ag/O9I9ze4HImSu7ZtHp9k+laE7WO/RiIlactbXApwuZMyDdbHaPfRvG MEOsIPQANEk+pltLwMeQwhSm/nP9HUlT9kTpdDRFqh7//vUBuFQVsloSGi1T9JhA3Y85 d2Q13Cyv5scTzMwfXISns/qAWzHGsttB2zzvLc9Z9wfmRXs8nLFAX+/iqKbBIpZ8F8q0 rCPnytVgi7fKUqGcEWW3jYs8BAFoKKaJJ8p4Ma0r4UDPGilIAGOGZNPD6r/vThKWqGgy LN4pB6uu9m8Ze+JqTyJ7T7P9owlWD8GWrWAADHo1AfRgcXBYQ+WuUJjCgxdaIZQq5uL2 6dQw== 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=76q3czNHBGF97J8zUfgBzI1kFFF4VkjgowoEBA/iOwY=; fh=esh7J4+kQ95ViyktoiqUbRRnaq1mq/v1srgwATsbMT4=; b=u9QgbkYeVbrFUWw9Rm272P+EOnuHMGORykmeMsnsQUqz6+bHXOF2rPIAolvfkjZqPy fQxjyi5DKpWVR6e4NME/FKg0Bw0tDZagmn0EWCAqi5xSe2h2iS34zluv9DJTYVmjGM0q fqWaOX8y6Fxjh4BO/cCG+f88eOqRZsiKBBYvPMaJmuv5ypp5WgkbA23s/jNLElrK6Ukr 3bFeB0WK1QNoXIerQ9xfBA1pcrvVMqx6oRhlhg4YxagxEMyyXMheP8HnHEPpqOx3eLBc fXpF7jnQK799UQVH2JSPBaoZjEATDbUc4Crv3SzsQOVFQVFMGAjpEsmmu0cGyRrBYJQl jBOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=y26X29gq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a170902ce8400b001b03eebfe25si8304595plg.465.2023.06.27.18.50.17; Tue, 27 Jun 2023 18:50:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=y26X29gq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229549AbjF1BgX (ORCPT + 99 others); Tue, 27 Jun 2023 21:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjF1BgW (ORCPT ); Tue, 27 Jun 2023 21:36:22 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F9871737 for ; Tue, 27 Jun 2023 18:36:20 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-401d1d967beso153181cf.0 for ; Tue, 27 Jun 2023 18:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687916179; x=1690508179; 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=76q3czNHBGF97J8zUfgBzI1kFFF4VkjgowoEBA/iOwY=; b=y26X29gqmEGqKXrFtZryTyXDzQ9ewY6D9loFvzylkwQasUaA3rhMju6tAIXM45FOCP EiMe0MCGmWBUFKrsCbSYBusOLFWu0jf2ch1nvHU2ezj0YlibSSfCAj3pkfhCVHzE1K7H Z7NtUDgJupEmpBLcz2JwUP0Ew4wYs1sF5cUDLma1QWvlN3N/adRlgN+tfnFyRaGsxpnh SbXxUiJzn2QLtTTP3iL+pFTRkz2lk8L1MKva4dy/j5S7MgRwhh1nEATI68dFDXZfdONG FhiCx9DGJTIiGbbLlNXJi17Unkk3M74ZWytzQwiWvh1eVm0Sq9lBTa4tZoll5SdOHuaw 8eCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687916179; x=1690508179; 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=76q3czNHBGF97J8zUfgBzI1kFFF4VkjgowoEBA/iOwY=; b=hLm1ymTF3w911Fjztpxt7PalO1KLKxR/w3vOyft9wE2Z0YLf/doWNmRTK00FBODcWG ICJXyEoJHCUFlJr8bZLbw36JdPVMIkcYPwVfqK0HiNljGM0q2n0JzkWyrXXTcOOHWIho CJYuryr8Nx/SaxsYPIq6FTujUnDULu2SwGCvaan/ZsyEP2zrEXTuzeV7pniFI204h0SM aw6iXZgMovA0ADG9yDtGOWJUlyvLyQCuAZ1saiQ4LCFg2khB7VX/HqAOgVnqZaWdln1y EBqaSnp/2rBGPapRPQZdHUQ06rscEx80P12KU94qrq3ec4OirUURYgX4KeynVgbPM+H9 nxag== X-Gm-Message-State: AC+VfDyGYLGK+0u4/h2Z+D9TsgFbz5zpbftiQ9j+IB/XXqoKuBHl+znP owuMeTNwATta5SrbvJ/pHwn0yhdAwPMATHW1/7B18A== X-Received: by 2002:ac8:5710:0:b0:3ef:343b:fe7e with SMTP id 16-20020ac85710000000b003ef343bfe7emr130387qtw.2.1687916179378; Tue, 27 Jun 2023 18:36:19 -0700 (PDT) MIME-Version: 1.0 References: <972e1d5c5ec53e2757fb17a586558c5385e987dd.1684048511.git.sathyanarayanan.kuppuswamy@linux.intel.com> <64876bf6c30e2_1433ac29415@dwillia2-xfh.jf.intel.com.notmuch> <64961c3baf8ce_142af829436@dwillia2-xfh.jf.intel.com.notmuch> <9437b176-e15a-3cec-e5cb-68ff57dbc25c@linux.intel.com> <649b7a9b69cb6_11e68529473@dwillia2-xfh.jf.intel.com.notmuch> In-Reply-To: <649b7a9b69cb6_11e68529473@dwillia2-xfh.jf.intel.com.notmuch> From: Dionna Amalie Glaze Date: Tue, 27 Jun 2023 18:36:07 -0700 Message-ID: Subject: Re: [PATCH v3 3/3] selftests/tdx: Test GetQuote TDX attestation feature To: Dan Williams Cc: Sathyanarayanan Kuppuswamy , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan , Jonathan Corbet , "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Wander Lairson Costa , Erdem Aktas , Chong Cai , Qinkun Bao , Guorui Yu , Du Fan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, dhowells@redhat.com, brijesh.singh@amd.com, atishp@rivosinc.com, gregkh@linuxfoundation.org, linux-coco@lists.linux.dev, joey.gouly@arm.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham 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 Tue, Jun 27, 2023 at 5:13=E2=80=AFPM Dan Williams wrote: > [..] > > > > The VMPL-based separation that will house the supervisor module known > > as SVSM can have protocols that implement a TPM command interface, or > > an RTMR-extension interface, and will also need to have an > > SVSM-specific protocol attestation report format to keep the secure > > chain of custody apparent. We'd have different formats and protocols > > in the kernel, at least, to speak to each technology. > > That's where I hope the line can be drawn, i.e. that all of this vendor > differentiation really only matters inside the kernel in the end. > > > I'm not sure it's worth the trouble of papering over all the... 3-4 > > technologies with similar but still weirdly different formats and ways > > of doing things with an abstracted attestation ABI, especially since > > the output all has to be interpreted in an architecture-specific way > > anyway. > > This is where I need help. Can you identify where the following > assertion falls over: > > "The minimum viable key-server is one that can generically validate a > blob with an ECDSA signature". > > I.e. the fact that SEV and TDX send different length blobs is less > important than validating that signature. > > If it is always the case that specific fields in the blob need to be > decoded then yes, that weakens the assertion. However, maybe that means > that kernel code parses the blob and conveys that parsed info along with > vendor attestation payload all signed by a Linux key. I.e. still allow > for a unified output format + signed vendor blob and provide a path to > keep all the vendor specific handling internal to the kernel. > All the specific fields of the blob have to be decoded and subjected to an acceptance policy. That policy will most always be different across different platforms and VM owners. I wrote all of github.com/google/go-sev-guest, including the verification and validation logic, and it's going to get more complicated, and the sources of the data that provide validators with notions of what values can be trusted will be varied. The formats are not standardized. The Confidential Computing Consortium should be working toward that, but it's a slow process. There's IETF RATS. There's in-toto.io attestations. There's Azure's JWT thing. There's a signed serialized protocol buffer that I've decided is what Google is going to produce while we figure out all the "right" formats to use. There will be factions and absolute gridlock for multiple years if we require solidifying an abstraction for the kernel to manage all this logic before passing a report on to user space. Now, not only are the field contents important, the certificates of the keys that signed the report are important. Each platform has its own special x509v3 extensions and key hierarchy to express what parts of the report should be what value if signed by this key, and in TDX's case there are extra endpoints that you need to query to determine if there's an active CVE on the associated TCB version. This is how they avoid adding every cpu's key to the leaf certificate's CRL. You really shouldn't be putting attestation validation logic in the kernel. It belongs outside of the VM entirely with the party that will only release access keys to the VM if it can prove it's running the software it claims, on the platform it claims. I think Windows puts a remote procedure call in their guest attestation driver to the Azure attestation service, and that is an anti-pattern in my mind. > > ARM's Confidential Computing Realm Management Extensions (RME) seems > > to be going along the lines of a runtime measurement register model > > with their hardware enforced security. The number of registers isn't > > prescribed in the spec. > > > > +Joey Gouly +linux-coco@lists.linux.dev as far as RME is concerned, do > > you know who would be best to weigh in on this discussion of a unified > > attestation model? --=20 -Dionna Glaze, PhD (she/her)