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

[xen staging] vtpmmgr: Flush all transient keys



commit 746d20b112ace151b19f06bd5e1fb3d695d8982e
Author:     Jason Andryuk <jandryuk@xxxxxxxxx>
AuthorDate: Thu May 6 09:59:17 2021 -0400
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon May 10 14:49:01 2021 +0100

    vtpmmgr: Flush all transient keys
    
    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>
    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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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