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

[Xen-changelog] [xen master] vtpmmgr: Store hardware TPM Locality



commit d426026701b3a74bbd2776a5c45c265e7775773e
Author:     Jason Andryuk <andryuk@xxxxxxxx>
AuthorDate: Mon Apr 21 13:22:59 2014 -0400
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Apr 23 11:57:53 2014 +0100

    vtpmmgr: Store hardware TPM Locality
    
    The TPM locality must be specified when using TPM_PCR_INFO_LONG for
    TPM_Seal.  Store the locality so it can be provided later.
    
    Signed-off-by: Jason Andryuk <andryuk@xxxxxxxx>
    Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---
 stubdom/vtpmmgr/init.c    |    4 +++-
 stubdom/vtpmmgr/vtpmmgr.h |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c
index 89643e7..c35ab8f 100644
--- a/stubdom/vtpmmgr/init.c
+++ b/stubdom/vtpmmgr/init.c
@@ -69,7 +69,8 @@ const TPM_AUTHDATA WELLKNOWN_AUTH = {0x00, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0
 
 struct vtpm_globals vtpm_globals = {
    .tpm_fd = -1,
-   .oiap = { .AuthHandle = 0 }
+   .oiap = { .AuthHandle = 0 },
+   .hw_locality = 0
 };
 
 static int tpm_entropy_source(void* dummy, unsigned char* data, size_t len, 
size_t* olen) {
@@ -436,6 +437,7 @@ TPM_RESULT vtpmmgr_init(int argc, char** argv) {
             }
             vtpm_globals.tpm_fd = tpm_tis_open(tpm);
             tpm_tis_request_locality(tpm, opts.tpmlocality);
+            vtpm_globals.hw_locality = opts.tpmlocality;
          }
          break;
       case TPMDRV_TPMFRONT:
diff --git a/stubdom/vtpmmgr/vtpmmgr.h b/stubdom/vtpmmgr/vtpmmgr.h
index cf2b962..68edd4c 100644
--- a/stubdom/vtpmmgr/vtpmmgr.h
+++ b/stubdom/vtpmmgr/vtpmmgr.h
@@ -57,6 +57,8 @@ struct vtpm_globals {
 
    entropy_context     entropy;
    ctr_drbg_context    ctr_drbg;
+
+   int hw_locality;
 };
 
 struct tpm_opaque {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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