Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15575841rwd; Sun, 25 Jun 2023 20:54:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4M7P+jOwRd0TbR2ML7nGERo2ELWW6Fa4HDLmwM0JLKA4pzBjRlWW49lpFKl5DoFL1qwzYC X-Received: by 2002:a17:907:a41e:b0:989:2368:20d9 with SMTP id sg30-20020a170907a41e00b00989236820d9mr17167210ejc.75.1687751677485; Sun, 25 Jun 2023 20:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687751677; cv=none; d=google.com; s=arc-20160816; b=Swm6JTFyuwHPvFXp2zuk5dt/bKNb97iLtEYst3ZC7jXTCJ3hEItcTM55FKlU+YuYkQ b//YiSZeaO0u1caM1cKn2PKfzVq5QGcmnnBeFXZjzA7P8lF5+MT0mkO4Tz7m3Caq5EBI s+3jZHhMHlse5P1BqdS32Ku6VWBNoS/SqZEmIXbSaBwDZ3OQ5LD8vbTVeJdzPINAnaVs VgphJU7Lv4zgzqm8mfZjg3amzj1bS57txB1PBxrO2tvVQgp1QG2bjFgrq47gaBz4HtAt SqlTQIV1CpLQ7YR3zKy9GAdNvrjh0WIuF7lgkNq8EogkD4UGV+WH6GyvbCM9jfUh7mTI MRNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=p/pZz8LXm9uoEvdUK63hIOsDYiHEv/7Z2ilT8FEhO7Y=; fh=daKVTOM0qiGoeZcOqfpgphfCXQCCy4YoYwqP2IerS4A=; b=vRcCkesJOUG+cp35VlkaiZrTN9bCe5gIUzIhwLsv+W5nVb8wGAx4wNGm6oTYJz5Vbb dBhyIwcR6o6KgAnsNtcM4HVtCFEguPdNzf0uoJsCOSSlZ2Yz+dzmiG21h1ZUmoHwRYzL aVza06P9cuh+cVIViLGRhzsOLOsW++Jqh96kTtRTxjdPEipIQgLrcjtMydWjV0XhbxNB +Iv1KAgyty29PhHZwXqNOscNHxF+sTZ72g2UEJGQiOsR9Kw+rBNLCdfHZznKd8une1gW C3XvRQgRLy0ToEPYd3nijmyV5HkqFAXG6rb5bbcmNSgHnfa3ZOpgiM1HPOnSf29r4VaU xLZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AUXsvY3u; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a1709061cc200b0098e1c7a62bbsi1703418ejh.96.2023.06.25.20.54.13; Sun, 25 Jun 2023 20:54:37 -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=@intel.com header.s=Intel header.b=AUXsvY3u; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229864AbjFZDHi (ORCPT + 99 others); Sun, 25 Jun 2023 23:07:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjFZDHe (ORCPT ); Sun, 25 Jun 2023 23:07:34 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14EE2133; Sun, 25 Jun 2023 20:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687748854; x=1719284854; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=vfwCfFpazuFdAYa86uv5p39Z9QwI0hlOweK8Ngh06zU=; b=AUXsvY3u/2EOPg1WNGTNzDlN+LphvCbTvoLmy7pRYftPJI19BHNW2GHQ AKX06iWm3UYeBs65Pn8kNvhr38vXr6gApIDPwNpaqeUnEDKIrSdsdRygs pk7ttkZJl9cBBObb1k1x41ZuBYwlwhLIpQP/DhllxjsmCNP+O3+8YM9or 7784IhYloLmsbmtMJ3/nHqAOF4gc1y/0mci2LWMe1AYfw5Psz5qlZid6N LYc8AiQKzx1YGVYgbOBMeBP7gCjP62qwBUYeZE+t7Z2mG+IK5rPonnG7s 8iBMXz53sAs7KaL2nD3ou97Gv3oMkYVenqjDGcA28Acp5gDuW6+zUVkJZ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="341499759" X-IronPort-AV: E=Sophos;i="6.01,158,1684825200"; d="scan'208";a="341499759" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 20:07:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="710083086" X-IronPort-AV: E=Sophos;i="6.01,158,1684825200"; d="scan'208";a="710083086" Received: from dbkinder-mobl.amr.corp.intel.com (HELO [10.212.241.20]) ([10.212.241.20]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 20:07:33 -0700 Message-ID: Date: Sun, 25 Jun 2023 20:07:32 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCH v3 0/3] TDX Guest Quote generation support To: Dan Williams , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan , Jonathan Corbet Cc: "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Wander Lairson Costa , Erdem Aktas , Dionna Amalie Glaze , Chong Cai , Qinkun Bao , Guorui Yu , Du Fan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org References: <64966b842becf_142af8294a5@dwillia2-xfh.jf.intel.com.notmuch> Content-Language: en-US From: Sathyanarayanan Kuppuswamy In-Reply-To: <64966b842becf_142af8294a5@dwillia2-xfh.jf.intel.com.notmuch> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 6/23/23 9:05 PM, Dan Williams wrote: > Kuppuswamy Sathyanarayanan wrote: >> Hi All, >> >> In TDX guest, the attestation process is used to verify the TDX guest >> trustworthiness to other entities before provisioning secrets to the >> guest. >> >> The TDX guest attestation process consists of two steps: >> >> 1. TDREPORT generation >> 2. Quote generation. >> >> The First step (TDREPORT generation) involves getting the TDX guest >> measurement data in the format of TDREPORT which is further used to >> validate the authenticity of the TDX guest. The second step involves >> sending the TDREPORT to a Quoting Enclave (QE) server to generate a >> remotely verifiable Quote. TDREPORT by design can only be verified on >> the local platform. To support remote verification of the TDREPORT, >> TDX leverages Intel SGX Quoting Enclave to verify the TDREPORT >> locally and convert it to a remotely verifiable Quote. Although >> attestation software can use communication methods like TCP/IP or >> vsock to send the TDREPORT to QE, not all platforms support these >> communication models. So TDX GHCI specification [1] defines a method >> for Quote generation via hypercalls. Please check the discussion from >> Google [2] and Alibaba [3] which clarifies the need for hypercall based >> Quote generation support. This patch set adds this support. >> >> Support for TDREPORT generation already exists in the TDX guest driver. >> This patchset extends the same driver to add the Quote generation >> support. > > I missed that the TDREPORT ioctl() and this character device are already > upstream. The TDREPORT ioctl() if it is only needed for quote generation > seems a waste because it just retrieves a blob that needs to be turned > around and injected back into the kernel to generate a quote. Although the end goal is to generate the quote, the method the user chooses to achieve it may differ for a variety of reasons. In this case, we're trying to support the use case where the user will use methods like TCP/IP or vsock to generate the Quote. They can use the GET_REPORT IOCTL to get the TDREPORT and send it to the quoting enclave via the above-mentioned methods.  TDVMCALL-based quote generation is intended for users who, for a variety of security reasons, do not wish to use the methods described above. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer