Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp300117pxb; Fri, 22 Apr 2022 00:42:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5z/6jyjV+NDqTx/XZnb78tXTlnwNmWwYm6vT9fGm7ZCv9DvLpmCIqhtTcf9VCk0mtorSI X-Received: by 2002:a05:6402:1e89:b0:423:e004:bf61 with SMTP id f9-20020a0564021e8900b00423e004bf61mr3486742edf.14.1650613362177; Fri, 22 Apr 2022 00:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650613362; cv=none; d=google.com; s=arc-20160816; b=YfWKOgTlAUOk2B+eCQ2KEO8/JeptmIekizYzc6Wd0lNy5l9BSgaRZNO3pnrNcFTBWA 3+EVMDowqSvTG4MixJFlq8wTD9PX64OtOJkmpA/4KcPZxQfelnX+1DYG347V70PzKKqp FarNg4zfaPoe7qfo9Gs6su+uCDH756vi5If+Nfn8GA4CUtR/fwFjGdeAOGDPRAHzzLFM +TkXE4GA3xik/TQERgxeivdAz7HBAAS2CIB+ScJ/zteXzBDeBqkh9HDZGzxtJlZTHUII oNM/StU+kDyM29Ko5GkQiL0I/VNDUGNzJiMDicOJs79HCIPtowCat/XOUOyB4W9qLxnq dqoA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=AABT5htDdMk1lTchILKE7w7PX24i9Q7wLrdzGptIQM0=; b=dwCdJQ+EIO3wC3h+BikVEoYSgi5fVnjjZBpgGT+M73V9sT2DmRAYM9zH+apfW/mOZp 2apFHMRX638UiZD/4/BwktIqxr6jJgOOPnWg73+nuiOzcJ3FJfLEDnPOGMsgYY1Bg8Jo nwQ818hTJ9K7wrqHSUyzQpPhwCX+SnU73xq/Imc6qyaZL/zazfCPfzZWMaaAn7h+sLOn iEIlxuq7EIhtNbxzmGOwZUDbMI3B1qfHJH7BS6SbHOG6BUf6O871QtG3BCOz5Uabu/9x w0qlpmxRaS/rb1ndgM8eLSImbmLKP/iUZ0bP/6llr4Zyve3dbXWCRaqcRwgdFVH5ulhO FPNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CGW8trYZ; 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 dz10-20020a0564021d4a00b00423f685da98si6333844edb.444.2022.04.22.00.42.18; Fri, 22 Apr 2022 00:42:42 -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=CGW8trYZ; 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 S242661AbiDTB3a (ORCPT + 99 others); Tue, 19 Apr 2022 21:29:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232010AbiDTB33 (ORCPT ); Tue, 19 Apr 2022 21:29:29 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 378AD23BC4; Tue, 19 Apr 2022 18:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650418005; x=1681954005; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=mbBwslPLaoBfylvW/dhJ1OLBSlP7qYZg3Cvd31qjORE=; b=CGW8trYZ7koQ47kn2LlAg7TkxqunsCuFhU7JYFAjDdaBz3in7He7YYGz GfOlp5+lHQFlk7N5slDxiYDdAxRp63TkJ3qY9FEpw4YlnMnzjCaZDCS7v JZK41CI20P4OcnG+l7T9NLi4Aj9nmjGmO34zstVUtvjgdhgCnxM85BdDq +nLSwP4XsnxvX66ICG+Qug2ELP6OMSThtW9I5szLe1dnx/GvRUESjIKCA LWwTwJyAtTMCqvxFYUcXYTpuG/oV1aFqS6ZrxPxm2ECY3NEnwGI2B2wU+ fAg4sn9OO2E1qpsXkqBx2Y10KqpM8lyNqnjqRejlxypsFR6umooMUV2RA A==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="244495224" X-IronPort-AV: E=Sophos;i="5.90,274,1643702400"; d="scan'208";a="244495224" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 18:26:44 -0700 X-IronPort-AV: E=Sophos;i="5.90,274,1643702400"; d="scan'208";a="561918375" Received: from ktuv-desk2.amr.corp.intel.com (HELO [10.212.227.192]) ([10.212.227.192]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 18:26:43 -0700 Message-ID: Date: Tue, 19 Apr 2022 18:26:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.7.0 Subject: Re: [PATCH v3 4/4] platform/x86: intel_tdx_attest: Add TDX Guest attestation interface driver Content-Language: en-US To: Isaku Yamahata Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Hans de Goede , Mark Gross , "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org References: <20220415220109.282834-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220415220109.282834-5-sathyanarayanan.kuppuswamy@linux.intel.com> <20220420012032.GA2224031@ls.amr.corp.intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: <20220420012032.GA2224031@ls.amr.corp.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.1 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 4/19/22 6:20 PM, Isaku Yamahata wrote: > If timeout occurs, the state of adev->tdquote_buf is unknown. It's not safe > to continue to using adev->tdquote_buf. VMM would continue to processing > getquote request with this buffer. What if TDX_CMD_GEN_QUOTE is issued again, > and tdquote_buf is re-used? This part is not clearly discussed in the specification. May be spec should define some reasonable timeout and teardown details. Regarding not using this buffer again, what happens if we de-allocate it on timeout and the host still updates it? -- Sathyanarayanan Kuppuswamy Linux Kernel Developer