[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 07/13] vtpmmgr: Flush all transient keys


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Mon, 10 May 2021 08:19:59 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx> header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620649203; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=b5QIqmH34lMWwx9hU1HX9D4DAzXxa8mXB2e28YFf4PQ=; b=Xtw7mNBaC1gZwZppKmd5ytTPtf5wHU6moHCvBTXYLhKEbG1exG3BVtfiKwOZ368Wd8ChbMvy8brjCCwisgDTK2djiDL3GNuKF6TSRtiQB1YZygdYV/L7CnHQMHAY+IFdEQb7mRqJafiLP0aJQvSBnGvaFfA12AC6UJOMRwfwdJM=
  • Arc-seal: i=1; a=rsa-sha256; t=1620649203; cv=none; d=zohomail.com; s=zohoarc; b=houLbPScNXHc8ZZFQn6nuIWLU0m/G45nABZX3bZI81EZ4hyVPCq629AKhQJEooX9BwBvE+UWAaoz2uwOmTEpLu+uilV4pjsHr3O6ZVm71LOGhYF5Z39RnnxwdBJOkHhHSKhacyRyCjFEhGdWtTARKOktW3oquhibJI9Y5aeHurI=
  • Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, Quan Xu <quan.xu0@xxxxxxxxx>, Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
  • Delivery-date: Mon, 10 May 2021 12:20:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 5/6/21 9:59 AM, Jason Andryuk wrote:
> We're only flushing 2 transients, but there are 3 handles.  Use <= to also
> flush the third handle since TRANSIENT_LAST is inclusive
> 
> The number of transient handles/keys is hardware dependent, so this
> should query for the limit.  And assignment of handles is assumed to be
> sequential from the minimum.  That may not be guaranteed, but seems okay
> with my tpm2.
> 
> Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx>
> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
> ---
> v2 add "since TRANSIENT_LAST is inclusive" to commit message.
> ---

Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>

>  stubdom/vtpmmgr/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c
> index 56b4be85b3..4ae34a4fcb 100644
> --- a/stubdom/vtpmmgr/init.c
> +++ b/stubdom/vtpmmgr/init.c
> @@ -656,7 +656,7 @@ static TPM_RC flush_tpm2(void)
>  {
>      int i;
>  
> -    for (i = TRANSIENT_FIRST; i < TRANSIENT_LAST; i++)
> +    for (i = TRANSIENT_FIRST; i <= TRANSIENT_LAST; i++)
>           TPM2_FlushContext(i);
>  
>      return TPM_SUCCESS;
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.