Skip to contentSkip to conversation

vTPM Manager

DISCUSSION Sebastian Biedermann 3 participants 5 messages Aug 22, 2011 – Sep 7, 2011

lore
Share & tools
lore
#0 lore raw

Dear List,

I have a problem installing the vTPM extension for Xen.
I selected the option vTPM Manager (=y) in the Config.mk before compiling the xen-tools, but there is always the same error during the compilation in every xen version which I have tried:

gcc -Werror -g3 -I. -D_GNU_SOURCE -DLOGGING_MODULES="(BITMASK(VTPM_LOG_TCS)|BITMASK(VTPM_LOG_VTSP)|BITMASK(VTPM_LOG_VTPM))" -I../../../tools/vtpm_manager/crypto -I../../../tools/vtpm_manager/util -I../../../tools/vtpm_manager/tcs -I../../../tools/vtpm_manager/manager -c -o sym_crypto.o sym_crypto.c
cc1: warnings being treated as errors
sym_crypto.c: In function âCrypto_symcrypto_initkeyâ:
sym_crypto.c:71:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_genkeyâ:
sym_crypto.c:94:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_encryptâ:
sym_crypto.c:134:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_decryptâ:
sym_crypto.c:165:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c:172:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
make[5]: *** [sym_crypto.o] Fehler 1
make[5]: *** Warte auf noch nicht beendete Prozesse...
make[5]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager/crypto'
make[4]: *** [subdir-install-crypto] Fehler 2
make[4]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager'
make[3]: *** [subdirs-install] Fehler 2
make[3]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager'
make[2]: *** [subdir-install-vtpm_manager] Fehler 2
make[2]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools'
make[1]: *** [subdirs-install] Fehler 2
make[1]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools'
make: *** [install-tools] Fehler 2

Any suggestions? What is wrong? Thanks for help!

Signature · 1 line
Sebastian
#1 lore raw
Quoted 6 lines · Sebastian Biedermann

Dear List,

I have a problem installing the vTPM extension for Xen.
I selected the option vTPM Manager (=y) in the Config.mk before compiling the xen-tools, but there is always the same error during the compilation in every xen version which I have tried:

I haven't seen anyone using or maintaining the vtpm stuff for ages now. I expect it has bitrotted something rotten (if you'll excuse the pun). I'm afraid this may mean you need to dig into the code.

(For future reference it is useful to reproduce build errors with LANG=C before posting to the lists)

Quoted 9 lines

gcc -Werror -g3 -I. -D_GNU_SOURCE

(quoted diff) +0 -4
-DLOGGING_MODULES="(BITMASK(VTPM_LOG_TCS)|BITMASK(VTPM_LOG_VTSP)|BITMASK(VTPM_LOG_VTPM))" 
-I../../../tools/vtpm_manager/crypto -I../../../tools/vtpm_manager/util 
-I../../../tools/vtpm_manager/tcs -I../../../tools/vtpm_manager/manager 
-c -o sym_crypto.o sym_crypto.c

cc1: warnings being treated as errors
sym_crypto.c: In function âCrypto_symcrypto_initkeyâ:
sym_crypto.c:71:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ

This appears to be from the TPMTRYRETURN macro in
tools/vtpm_manager/util/tcg.h which is:
// Try command c. If it fails, print error message, set status to actual return code. Goto abort

#define TPMTRYRETURN(c) do { status = c; \
                             if (status != TPM_SUCCESS) { \
                               fprintf(stderr, "ERROR in %s at %s:%i code: %s.\n", __func__, __FILE__, __LINE__, tpm_get_error_name(status)); \
                               goto abort_egress; \
                             } \
                        } while(0)    

argument 6 is "tpm_get_error_name(status)" which is defined as const char* tpm_get_error_name (TPM_RESULT code);
in tools/vtpm_manager/util/log.h.

This is a "char *" as the %s requires and not an "int" like the message is complaining. If the prototype for tpm_get_error_name were missing it would default to returning int but I'm pretty sure gcc would way something if this were the case -- but you could maybe try adding

	#include "log.h"

to sym_crypto.c right above the include of tcg.h?

Ian.

Quoted 27 lines

sym_crypto.c: In function âCrypto_symcrypto_genkeyâ:
sym_crypto.c:94:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_encryptâ:
sym_crypto.c:134:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_decryptâ:
sym_crypto.c:165:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c:172:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
make[5]: *** [sym_crypto.o] Fehler 1
make[5]: *** Warte auf noch nicht beendete Prozesse... make[5]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager/crypto'
make[4]: *** [subdir-install-crypto] Fehler 2
make[4]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[3]: *** [subdirs-install] Fehler 2
make[3]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[2]: *** [subdir-install-vtpm_manager] Fehler 2
make[2]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools' make[1]: *** [subdirs-install] Fehler 2
make[1]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools'
make: *** [install-tools] Fehler 2

Any suggestions? What is wrong? Thanks for help!

#2 lore raw

You can also try to use my updated vtpm manager patches which fixes a lot of bugs. I haven't tried them on the latest xen unstable but they worked with xen at the time they were submitted. They have not been accepted by the developers yet. You should be able to find my earlier posts in the mailing list archives

Quoted 71 lines · Ian Campbell
Quoted 6 lines · Sebastian Biedermann

Dear List,

I have a problem installing the vTPM extension for Xen.
I selected the option vTPM Manager (=y) in the Config.mk before compiling the xen-tools, but there is always the same error during the compilation in every xen version which I have tried:

I haven't seen anyone using or maintaining the vtpm stuff for ages now. I expect it has bitrotted something rotten (if you'll excuse the pun). I'm afraid this may mean you need to dig into the code.

(For future reference it is useful to reproduce build errors with LANG=C before posting to the lists)

Quoted 9 lines

gcc -Werror -g3 -I. -D_GNU_SOURCE

(quoted diff) +0 -4
-DLOGGING_MODULES="(BITMASK(VTPM_LOG_TCS)|BITMASK(VTPM_LOG_VTSP)|BITMASK(VTPM_LOG_VTPM))" 
-I../../../tools/vtpm_manager/crypto -I../../../tools/vtpm_manager/util 
-I../../../tools/vtpm_manager/tcs -I../../../tools/vtpm_manager/manager 
-c -o sym_crypto.o sym_crypto.c

cc1: warnings being treated as errors
sym_crypto.c: In function âCrypto_symcrypto_initkeyâ:
sym_crypto.c:71:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ

This appears to be from the TPMTRYRETURN macro in
tools/vtpm_manager/util/tcg.h which is:
// Try command c. If it fails, print error message, set status to actual return code. Goto abort

#define TPMTRYRETURN(c) do { status = c; \
                             if (status != TPM_SUCCESS) { \
                               fprintf(stderr, "ERROR in %s at %s:%i code: %s.\n", __func__, __FILE__, __LINE__, tpm_get_error_name(status)); \
                               goto abort_egress; \
                             } \
                        } while(0)    

argument 6 is "tpm_get_error_name(status)" which is defined as const char* tpm_get_error_name (TPM_RESULT code);
in tools/vtpm_manager/util/log.h.

This is a "char *" as the %s requires and not an "int" like the message is complaining. If the prototype for tpm_get_error_name were missing it would default to returning int but I'm pretty sure gcc would way something if this were the case -- but you could maybe try adding

	#include "log.h"

to sym_crypto.c right above the include of tcg.h?

Ian.

Quoted 25 lines

sym_crypto.c: In function âCrypto_symcrypto_genkeyâ:
sym_crypto.c:94:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_encryptâ:
sym_crypto.c:134:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_decryptâ:
sym_crypto.c:165:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c:172:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
make[5]: *** [sym_crypto.o] Fehler 1
make[5]: *** Warte auf noch nicht beendete Prozesse... make[5]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager/crypto'
make[4]: *** [subdir-install-crypto] Fehler 2
make[4]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[3]: *** [subdirs-install] Fehler 2
make[3]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[2]: *** [subdir-install-vtpm_manager] Fehler 2
make[2]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools' make[1]: *** [subdirs-install] Fehler 2
make[1]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools'
make: *** [install-tools] Fehler 2

Quoted 8 lines
Quoted 2 lines

Any suggestions? What is wrong? Thanks for help!

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 5 lines · Matthew Fioravante

You can also try to use my updated vtpm manager patches which fixes a lot of bugs. I haven't tried them on the latest xen unstable but they worked with xen at the time they were submitted. They have not been accepted by the developers yet. You should be able to find my earlier posts in the mailing list archives

These seem to have fallen through the cracks. Would you mind rebasing and resubmitting?

Ian.

Quoted 83 lines · Ian Campbell
Quoted 79 lines · Sebastian Biedermann
Quoted 6 lines

Dear List,

I have a problem installing the vTPM extension for Xen.
I selected the option vTPM Manager (=y) in the Config.mk before compiling the xen-tools, but there is always the same error during the compilation in every xen version which I have tried:

I haven't seen anyone using or maintaining the vtpm stuff for ages now. I expect it has bitrotted something rotten (if you'll excuse the pun). I'm afraid this may mean you need to dig into the code.

(For future reference it is useful to reproduce build errors with LANG=C before posting to the lists)

Quoted 9 lines

gcc -Werror -g3 -I. -D_GNU_SOURCE

(quoted diff) +0 -4
-DLOGGING_MODULES="(BITMASK(VTPM_LOG_TCS)|BITMASK(VTPM_LOG_VTSP)|BITMASK(VTPM_LOG_VTPM))" 
-I../../../tools/vtpm_manager/crypto -I../../../tools/vtpm_manager/util 
-I../../../tools/vtpm_manager/tcs -I../../../tools/vtpm_manager/manager 
-c -o sym_crypto.o sym_crypto.c

cc1: warnings being treated as errors
sym_crypto.c: In function âCrypto_symcrypto_initkeyâ:
sym_crypto.c:71:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ

This appears to be from the TPMTRYRETURN macro in
tools/vtpm_manager/util/tcg.h which is:
// Try command c. If it fails, print error message, set status to actual return code. Goto abort

#define TPMTRYRETURN(c) do { status = c; \
                             if (status != TPM_SUCCESS) { \
                               fprintf(stderr, "ERROR in %s at %s:%i code: %s.\n", __func__, __FILE__, __LINE__, tpm_get_error_name(status)); \
                               goto abort_egress; \
                             } \
                        } while(0)    

argument 6 is "tpm_get_error_name(status)" which is defined as const char* tpm_get_error_name (TPM_RESULT code);
in tools/vtpm_manager/util/log.h.

This is a "char *" as the %s requires and not an "int" like the message is complaining. If the prototype for tpm_get_error_name were missing it would default to returning int but I'm pretty sure gcc would way something if this were the case -- but you could maybe try adding

	#include "log.h"

to sym_crypto.c right above the include of tcg.h?

Ian.

Quoted 25 lines

sym_crypto.c: In function âCrypto_symcrypto_genkeyâ:
sym_crypto.c:94:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_encryptâ:
sym_crypto.c:134:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_decryptâ:
sym_crypto.c:165:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c:172:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
make[5]: *** [sym_crypto.o] Fehler 1
make[5]: *** Warte auf noch nicht beendete Prozesse... make[5]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager/crypto'
make[4]: *** [subdir-install-crypto] Fehler 2
make[4]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[3]: *** [subdirs-install] Fehler 2
make[3]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[2]: *** [subdir-install-vtpm_manager] Fehler 2
make[2]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools' make[1]: *** [subdirs-install] Fehler 2
make[1]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools'
make: *** [install-tools] Fehler 2

Quoted 2 lines

Any suggestions? What is wrong? Thanks for help!

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw

I plan to sometime in the future. There are some adjustments that need to be made first.

Quoted 6 lines · Ian Campbell
Quoted 5 lines · Matthew Fioravante

You can also try to use my updated vtpm manager patches which fixes a lot of bugs. I haven't tried them on the latest xen unstable but they worked with xen at the time they were submitted. They have not been accepted by the developers yet. You should be able to find my earlier posts in the mailing list archives

Quoted 86 lines

These seem to have fallen through the cracks. Would you mind rebasing and resubmitting?

Ian.

Quoted 80 lines · Ian Campbell
Quoted 78 lines · Sebastian Biedermann
Quoted 6 lines

Dear List,

I have a problem installing the vTPM extension for Xen.
I selected the option vTPM Manager (=y) in the Config.mk before compiling the xen-tools, but there is always the same error during the compilation in every xen version which I have tried:

I haven't seen anyone using or maintaining the vtpm stuff for ages now. I expect it has bitrotted something rotten (if you'll excuse the pun). I'm afraid this may mean you need to dig into the code.

(For future reference it is useful to reproduce build errors with LANG=C before posting to the lists)

Quoted 9 lines

gcc -Werror -g3 -I. -D_GNU_SOURCE

(quoted diff) +0 -4
-DLOGGING_MODULES="(BITMASK(VTPM_LOG_TCS)|BITMASK(VTPM_LOG_VTSP)|BITMASK(VTPM_LOG_VTPM))" 
-I../../../tools/vtpm_manager/crypto -I../../../tools/vtpm_manager/util 
-I../../../tools/vtpm_manager/tcs -I../../../tools/vtpm_manager/manager 
-c -o sym_crypto.o sym_crypto.c

cc1: warnings being treated as errors
sym_crypto.c: In function âCrypto_symcrypto_initkeyâ:
sym_crypto.c:71:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ

This appears to be from the TPMTRYRETURN macro in
tools/vtpm_manager/util/tcg.h which is:
// Try command c. If it fails, print error message, set status to actual return code. Goto abort

#define TPMTRYRETURN(c) do { status = c; \
                             if (status != TPM_SUCCESS) { \
                               fprintf(stderr, "ERROR in %s at %s:%i code: %s.\n", __func__, __FILE__, __LINE__, tpm_get_error_name(status)); \
                               goto abort_egress; \
                             } \
                        } while(0)    

argument 6 is "tpm_get_error_name(status)" which is defined as const char* tpm_get_error_name (TPM_RESULT code);
in tools/vtpm_manager/util/log.h.

This is a "char *" as the %s requires and not an "int" like the message is complaining. If the prototype for tpm_get_error_name were missing it would default to returning int but I'm pretty sure gcc would way something if this were the case -- but you could maybe try adding

	#include "log.h"

to sym_crypto.c right above the include of tcg.h?

Ian.

Quoted 25 lines

sym_crypto.c: In function âCrypto_symcrypto_genkeyâ:
sym_crypto.c:94:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_encryptâ:
sym_crypto.c:134:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c: In function âCrypto_symcrypto_decryptâ:
sym_crypto.c:165:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
sym_crypto.c:172:3: error: format â%sâ expects type âchar *â, but argument 6 has type âintâ
make[5]: *** [sym_crypto.o] Fehler 1
make[5]: *** Warte auf noch nicht beendete Prozesse... make[5]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager/crypto'
make[4]: *** [subdir-install-crypto] Fehler 2
make[4]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[3]: *** [subdirs-install] Fehler 2
make[3]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools/vtpm_manager' make[2]: *** [subdir-install-vtpm_manager] Fehler 2
make[2]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools' make[1]: *** [subdirs-install] Fehler 2
make[1]: Verlasse Verzeichnis '/home/toor/xen-4.1.1/tools'
make: *** [install-tools] Fehler 2

Quoted 2 lines

Any suggestions? What is wrong? Thanks for help!

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel