Skip to contentSkip to conversation

stubdom vtpm build failure in staging

DISCUSSION Olaf Hering 5 participants 25 messages Jan 28, 2015 – Mar 13, 2015

lore
Share & tools
lore
#0 lore raw

Current staging fails in the install-stubdom target:

...

[  488s] tpm2_types.h:86: error: redefinition of typedef 'BYTE'
[  488s] tcg.h:404: error: previous declaration of 'BYTE' was here
[  488s] tpm2_types.h:87: error: redefinition of typedef 'BOOL'
[  488s] tcg.h:405: error: previous declaration of 'BOOL' was here
[  488s] tpm2_types.h:89: error: redefinition of typedef 'UINT16'
[  488s] tcg.h:406: error: previous declaration of 'UINT16' was here
[  488s] tpm2_types.h:90: error: redefinition of typedef 'UINT32'
[  488s] tcg.h:407: error: previous declaration of 'UINT32' was here
[  488s] tpm2_types.h:91: error: redefinition of typedef 'UINT64'
[  488s] tcg.h:408: error: previous declaration of 'UINT64' was here
[  488s] tpm2_types.h:219: error: redefinition of typedef 'TPM_HANDLE'
[  488s] tcg.h:413: error: previous declaration of 'TPM_HANDLE' was here
[  488s] tpm2_types.h:236: error: redefinition of typedef 'TPM_ALGORITHM_ID'
[  488s] tcg.h:425: error: previous declaration of 'TPM_ALGORITHM_ID' was here
[  488s] tpm2_types.h:285: error: redefinition of typedef 'TPMI_RH_HIERARCHY_AUTH'
[  488s] tpm2_types.h:264: error: previous declaration of 'TPMI_RH_HIERARCHY_AUTH' was here
[  488s] tpm2_types.h:307: error: redefinition of typedef 'TPM_ALG_ID'
[  488s] tpm2_types.h:306: error: previous declaration of 'TPM_ALG_ID' was here
[  488s] make[2]: Entering directory `/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/ioemu'
[  488s] make[2]: *** [vtpmmgr.o] Error 1

....

This happens with openSUSE 11.4 and SLES11 with xen_hg_changeset Wed Jan 28 13:28:46 2015 +0000 hg: 30230:e44b74f5a177

Last successful build was:
xen_hg_changeset Wed Jan 28 09:59:46 2015 +0000 hg: 30213:242d3c94e590

Olaf

#1 lore raw

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Thanks
Quan

Quoted 42 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, January 28, 2015 11:09 PM
To: [email protected]
Cc: Xu, Quan
Subject: stubdom vtpm build failure in staging

Current staging fails in the install-stubdom target:

...
[ 488s] tpm2_types.h:86: error: redefinition of typedef 'BYTE'
[ 488s] tcg.h:404: error: previous declaration of 'BYTE' was here [ 488s] tpm2_types.h:87: error: redefinition of typedef 'BOOL'
[ 488s] tcg.h:405: error: previous declaration of 'BOOL' was here [ 488s] tpm2_types.h:89: error: redefinition of typedef 'UINT16'
[ 488s] tcg.h:406: error: previous declaration of 'UINT16' was here [ 488s] tpm2_types.h:90: error: redefinition of typedef 'UINT32'
[ 488s] tcg.h:407: error: previous declaration of 'UINT32' was here [ 488s] tpm2_types.h:91: error: redefinition of typedef 'UINT64'
[ 488s] tcg.h:408: error: previous declaration of 'UINT64' was here [ 488s] tpm2_types.h:219: error: redefinition of typedef 'TPM_HANDLE'

[  488s] tcg.h:413: error: previous declaration of 'TPM_HANDLE' was here
[  488s] tpm2_types.h:236: error: redefinition of typedef 'TPM_ALGORITHM_ID'
[  488s] tcg.h:425: error: previous declaration of 'TPM_ALGORITHM_ID' was here
[  488s] tpm2_types.h:285: error: redefinition of typedef

'TPMI_RH_HIERARCHY_AUTH'
[ 488s] tpm2_types.h:264: error: previous declaration of 'TPMI_RH_HIERARCHY_AUTH' was here [ 488s] tpm2_types.h:307: error:
redefinition of typedef 'TPM_ALG_ID'
[ 488s] tpm2_types.h:306: error: previous declaration of 'TPM_ALG_ID' was here [ 488s] make[2]: Entering directory `/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/ioemu' [ 488s] make[2]: *** [vtpmmgr.o] Error 1 ....

This happens with openSUSE 11.4 and SLES11 with xen_hg_changeset Wed Jan 28 13:28:46 2015 +0000 hg: 30230:e44b74f5a177

Last successful build was:
xen_hg_changeset Wed Jan 28 09:59:46 2015 +0000 hg: 30213:242d3c94e590

Olaf

#2 lore raw
Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n '/;/{s@^.* @@;s@;@@p}'`
# do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the same file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)
 create mode 100644 stubdom/vtpmmgr/odd_types.h
stubdom/vtpmmgr/odd_types.h new file +11 -0
new file mode 100644
index 0000000..d72da9b
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h +1 -8
index 7321ec6..cac1bbc 100644
@@ -401,16 +401,10 @@
 
 
 // *************************** TYPEDEFS *********************************
-typedef unsigned char BYTE;
-typedef unsigned char BOOL;
-typedef uint16_t UINT16;
-typedef uint32_t UINT32;
-typedef uint64_t UINT64;
-
+#include "odd_types.h"
 typedef UINT32 TPM_RESULT;
 typedef UINT32 TPM_PCRINDEX;
 typedef UINT32 TPM_DIRINDEX;
-typedef UINT32 TPM_HANDLE;
 typedef TPM_HANDLE TPM_AUTHHANDLE;
 typedef TPM_HANDLE TCPA_HASHHANDLE;
 typedef TPM_HANDLE TCPA_HMACHANDLE;
@@ -422,7 +416,6 @@ typedef UINT32 TPM_COMMAND_CODE;
 typedef UINT16 TPM_PROTOCOL_ID;
 typedef BYTE TPM_AUTH_DATA_USAGE;
 typedef UINT16 TPM_ENTITY_TYPE;
-typedef UINT32 TPM_ALGORITHM_ID;
 typedef UINT16 TPM_KEY_USAGE;
 typedef UINT16 TPM_STARTUP_TYPE;
 typedef UINT32 TPM_CAPABILITY_AREA;
stubdom/vtpmmgr/tpm2_types.h +1 -10
index ac2830d..63564cd 100644
@@ -83,12 +83,8 @@
 #define    MAX_ECC_KEY_BYTES    ((MAX_ECC_KEY_BITS + 7) / 8)
 
 
-typedef unsigned char BYTE;
-typedef unsigned char BOOL;
+#include "odd_types.h"
 typedef uint8_t       UINT8;
-typedef uint16_t      UINT16;
-typedef uint32_t      UINT32;
-typedef uint64_t      UINT64;
 
 // TPM2 command code
 
@@ -216,7 +212,6 @@ typedef UINT16 TPM_ST;
 
 
 // TPM Handle types
-typedef UINT32 TPM_HANDLE;
 typedef UINT8 TPM_HT;
 
 
@@ -233,7 +228,6 @@ typedef UINT32 TPM_RH;
 #define    TPM_RH_LAST           (TPM_RH)(0x4000000C)
 
 // Table 4 -- DocumentationClarity Types <I/O>
-typedef UINT32    TPM_ALGORITHM_ID;
 typedef UINT32    TPM_MODIFIER_INDICATOR;
 typedef UINT32    TPM_SESSION_OFFSET;
 typedef UINT16    TPM_KEY_SIZE;
@@ -261,8 +255,6 @@ typedef BYTE TPMA_LOCALITY;
 // Table 37 -- TPMI_YES_NO Type <I/O>
 typedef BYTE TPMI_YES_NO;
 
-typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
-
 // Table 38 -- TPMI_DH_OBJECT Type <I/O>
 typedef TPM_HANDLE TPMI_DH_OBJECT;
 
@@ -304,7 +296,6 @@ typedef TPM_HANDLE TPMI_RH_LOCKOUT;
 
 // Table 7 -- TPM_ALG_ID
 typedef UINT16 TPM_ALG_ID;
-typedef UINT16 TPM_ALG_ID;
 
 #define    TPM2_ALG_ERROR             (TPM_ALG_ID)(0x0000) // a: ; D:
 #define    TPM2_ALG_FIRST             (TPM_ALG_ID)(0x0001) // a: ; D:

Olaf

#3 lore raw

Sorry for that. Read the other thread of email, it looks that some maintainers are working for this issue. And I am working for 'Xen stubdom vTPM for HVM virtual machine' v4 patches. There are a lot of modifications.

I will be out of office from Feb. 16th to Feb. 26th for Chinese New Year. I plan to summit v4 patches Before Feb. 16, and fix this issue after Feb. 26th.

--Quan

Quoted 137 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 11:21 PM
To: Xu, Quan
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n '/;/{s@^.*
@@;s@;@@p}'` # do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v
stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the same file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)  create mode 100644

stubdom/vtpmmgr/odd_types.h

stubdom/vtpmmgr/odd_types.h new file +11 -0
new file mode 100644 index 0000000..d72da9b
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h index renamed from stubdom/vtpmmgr/tcg.h +0 -0

7321ec6..cac1bbc 100644

stubdom/vtpmmgr/tcg.h +1 -3
@@ -401,16 +401,10 @@
 
 
 // *************************** TYPEDEFS
 ********************************* -typedef unsigned char BYTE;
-typedef unsigned char BOOL; -typedef uint16_t UINT16; -typedef uint32_t
 UINT32; -typedef uint64_t UINT64;
-
+#include "odd_types.h"
 typedef UINT32 TPM_RESULT;
 typedef UINT32 TPM_PCRINDEX;
 typedef UINT32 TPM_DIRINDEX;
-typedef UINT32 TPM_HANDLE;
 typedef TPM_HANDLE TPM_AUTHHANDLE;
 typedef TPM_HANDLE TCPA_HASHHANDLE;
 typedef TPM_HANDLE TCPA_HMACHANDLE;
@@ -422,7 +416,6 @@ typedef UINT32 TPM_COMMAND_CODE;  typedef
 UINT16 TPM_PROTOCOL_ID;  typedef BYTE TPM_AUTH_DATA_USAGE;
 typedef UINT16 TPM_ENTITY_TYPE; -typedef UINT32 TPM_ALGORITHM_ID;
 typedef UINT16 TPM_KEY_USAGE;  typedef UINT16 TPM_STARTUP_TYPE;

typedef UINT32 TPM_CAPABILITY_AREA; diff --git a/stubdom/vtpmmgr/tpm2_types.h b/stubdom/vtpmmgr/tpm2_types.h index ac2830d..63564cd 100644

stubdom/vtpmmgr/tpm2_types.h +1 -10
@@ -83,12 +83,8 @@
 #define    MAX_ECC_KEY_BYTES    ((MAX_ECC_KEY_BITS + 7) / 8)
 
 
-typedef unsigned char BYTE;
-typedef unsigned char BOOL;
+#include "odd_types.h"
 typedef uint8_t       UINT8;
-typedef uint16_t      UINT16;
-typedef uint32_t      UINT32;
-typedef uint64_t      UINT64;
 
 // TPM2 command code
 
@@ -216,7 +212,6 @@ typedef UINT16 TPM_ST;
 
 
 // TPM Handle types
-typedef UINT32 TPM_HANDLE;
 typedef UINT8 TPM_HT;
 
 
@@ -233,7 +228,6 @@ typedef UINT32 TPM_RH;
 #define    TPM_RH_LAST           (TPM_RH)(0x4000000C)
 
 // Table 4 -- DocumentationClarity Types <I/O>
-typedef UINT32    TPM_ALGORITHM_ID;
 typedef UINT32    TPM_MODIFIER_INDICATOR;
 typedef UINT32    TPM_SESSION_OFFSET;
 typedef UINT16    TPM_KEY_SIZE;
@@ -261,8 +255,6 @@ typedef BYTE TPMA_LOCALITY;  // Table 37 --
 TPMI_YES_NO Type <I/O>  typedef BYTE TPMI_YES_NO;
 
-typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
-
 // Table 38 -- TPMI_DH_OBJECT Type <I/O>  typedef TPM_HANDLE
 TPMI_DH_OBJECT;
 
@@ -304,7 +296,6 @@ typedef TPM_HANDLE TPMI_RH_LOCKOUT;
 
 // Table 7 -- TPM_ALG_ID
 typedef UINT16 TPM_ALG_ID;
-typedef UINT16 TPM_ALG_ID;
 
 #define    TPM2_ALG_ERROR             (TPM_ALG_ID)(0x0000) // a: ; D:
 #define    TPM2_ALG_FIRST             (TPM_ALG_ID)(0x0001) // a: ; D:

Olaf

#4 lore raw
Quoted 88 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Xu, Quan
Sent: Friday, February 13, 2015 12:57 AM
To: Olaf Hering
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Sorry for that. Read the other thread of email, it looks that some maintainers are working for this issue.
And I am working for 'Xen stubdom vTPM for HVM virtual machine' v4 patches. There are a lot of modifications.

I will be out of office from Feb. 16th to Feb. 26th for Chinese New Year. I plan to summit v4 patches Before Feb. 16, and fix this issue after Feb. 26th.

--Quan

Quoted 67 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 11:21 PM
To: Xu, Quan
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n '/;/{s@^.*
@@;s@;@@p}'` # do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v
stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the same file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)  create mode

100644 stubdom/vtpmmgr/odd_types.h

stubdom/vtpmmgr/odd_types.h new file +11 -0
new file mode 100644 index 0000000..d72da9b
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h index renamed from stubdom/vtpmmgr/tcg.h +0 -0

7321ec6..cac1bbc 100644

stubdom/vtpmmgr/tcg.h +0 -0
@@ -401,16 +401,10 @@
 
 
Quoted 6 lines

stubdom/vtpmmgr/tcg.h line 406

Quoted 6 lines
stubdom/vtpmmgr/tcg.h +1 -2
 // *************************** TYPEDEFS
 ********************************* -typedef unsigned char BYTE;
-typedef unsigned char BOOL; -typedef uint16_t UINT16; -typedef
 uint32_t UINT32; -typedef uint64_t UINT64;
-
+#include "odd_types.h"

I think it is just for gcc backward compatibility. IMHO, That does seem pretty strange. cc Daniel who is the maintainer of vTPM / XSM.

-Quan

Quoted 70 lines

stubdom/vtpmmgr/tcg.h typedef UINT32 TPM_COMMAND_CODE; typedef · line 416

Quoted 9 lines
stubdom/vtpmmgr/tcg.h +0 -1
 typedef UINT32 TPM_RESULT;
 typedef UINT32 TPM_PCRINDEX;
 typedef UINT32 TPM_DIRINDEX;
-typedef UINT32 TPM_HANDLE;
 typedef TPM_HANDLE TPM_AUTHHANDLE;
 typedef TPM_HANDLE TCPA_HASHHANDLE;
 typedef TPM_HANDLE TCPA_HMACHANDLE;
@@ -422,7 +416,6 @@ typedef UINT32 TPM_COMMAND_CODE;  typedef
 UINT16 TPM_PROTOCOL_ID;  typedef BYTE TPM_AUTH_DATA_USAGE;

typedef

Quoted 2 lines

UINT16 TPM_ENTITY_TYPE; -typedef UINT32 TPM_ALGORITHM_ID; typedef UINT16 TPM_KEY_USAGE; typedef UINT16 TPM_STARTUP_TYPE; typedef

UINT32

Quoted 43 lines

TPM_CAPABILITY_AREA; diff --git a/stubdom/vtpmmgr/tpm2_types.h b/stubdom/vtpmmgr/tpm2_types.h index ac2830d..63564cd 100644

stubdom/vtpmmgr/tpm2_types.h +1 -9
@@ -83,12 +83,8 @@
 #define    MAX_ECC_KEY_BYTES    ((MAX_ECC_KEY_BITS + 7) / 8)
 
 
-typedef unsigned char BYTE;
-typedef unsigned char BOOL;
+#include "odd_types.h"
 typedef uint8_t       UINT8;
-typedef uint16_t      UINT16;
-typedef uint32_t      UINT32;
-typedef uint64_t      UINT64;
 
 // TPM2 command code
 
@@ -216,7 +212,6 @@ typedef UINT16 TPM_ST;
 
 
 // TPM Handle types
-typedef UINT32 TPM_HANDLE;
 typedef UINT8 TPM_HT;
 
 
@@ -233,7 +228,6 @@ typedef UINT32 TPM_RH;
 #define    TPM_RH_LAST           (TPM_RH)(0x4000000C)
 
 // Table 4 -- DocumentationClarity Types <I/O>
-typedef UINT32    TPM_ALGORITHM_ID;
 typedef UINT32    TPM_MODIFIER_INDICATOR;
 typedef UINT32    TPM_SESSION_OFFSET;
 typedef UINT16    TPM_KEY_SIZE;
@@ -261,8 +255,6 @@ typedef BYTE TPMA_LOCALITY;  // Table 37 --
 TPMI_YES_NO Type <I/O>  typedef BYTE TPMI_YES_NO;
 
-typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
-
 // Table 38 -- TPMI_DH_OBJECT Type <I/O>  typedef TPM_HANDLE
 TPMI_DH_OBJECT;
 

stubdom/vtpmmgr/tpm2_types.h typedef TPM_HANDLE TPMI_RH_LOCKOUT; · line 300

Quoted 6 lines
stubdom/vtpmmgr/tpm2_types.h +0 -1
@@ -304,7 +296,6 @@ typedef TPM_HANDLE TPMI_RH_LOCKOUT;
 
 // Table 7 -- TPM_ALG_ID
 typedef UINT16 TPM_ALG_ID;
-typedef UINT16 TPM_ALG_ID;
 
 #define    TPM2_ALG_ERROR             (TPM_ALG_ID)(0x0000) // a: ;

D:

Quoted 3 lines
stubdom/vtpmmgr/tpm2_types.h +0 -0
 #define    TPM2_ALG_FIRST             (TPM_ALG_ID)(0x0001) // a: ; D:

Olaf

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

#5 lore raw
Quoted 96 lines · Quan
Quoted 87 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Xu, Quan
Sent: Friday, February 13, 2015 12:57 AM
To: Olaf Hering
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Sorry for that. Read the other thread of email, it looks that some maintainers are working for this issue.
And I am working for 'Xen stubdom vTPM for HVM virtual machine' v4 patches. There are a lot of modifications.

I will be out of office from Feb. 16th to Feb. 26th for Chinese New Year. I plan to summit v4 patches Before Feb. 16, and fix this issue after Feb. 26th.

--Quan

Quoted 66 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 11:21 PM
To: Xu, Quan
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n '/;/{s@^.*
@@;s@;@@p}'` # do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v
stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the same file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)  create mode

100644 stubdom/vtpmmgr/odd_types.h

stubdom/vtpmmgr/odd_types.h new file +11 -0
new file mode 100644 index 0000000..d72da9b
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h index renamed from stubdom/vtpmmgr/tcg.h +0 -0

7321ec6..cac1bbc 100644

stubdom/vtpmmgr/tcg.h +0 -0
@@ -401,16 +401,10 @@
 
 
Quoted 6 lines

stubdom/vtpmmgr/tcg.h line 406

Quoted 6 lines
stubdom/vtpmmgr/tcg.h +1 -2
 // *************************** TYPEDEFS
 ********************************* -typedef unsigned char BYTE;
-typedef unsigned char BOOL; -typedef uint16_t UINT16; -typedef
 uint32_t UINT32; -typedef uint64_t UINT64;
-
+#include "odd_types.h"

I think it is just for gcc backward compatibility. IMHO, That does seem pretty strange. cc Daniel who is the maintainer of vTPM / XSM.

Quoted 1 line

-Quan

Redefining an identifier in the same scope is violation of the C spec.

Newer GCC tolerates bad code which redundantly declares identifiers, but even newer GCC will still emit a diagnostic in -pedantic mode.

This build breakage needs fixing, and not just in the name of backwards compatibility.

~Andrew

#6 lore raw
Quoted 115 lines

-----Original Message-----
From: Andrew Cooper [mailto:[email protected]]
Sent: Friday, February 13, 2015 1:40 AM
To: Xu, Quan; Olaf Hering
Cc: Daniel De Graaf; [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 10 lines · Quan
Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Xu, Quan
Sent: Friday, February 13, 2015 12:57 AM
To: Olaf Hering
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 3 lines
Quoted 3 lines

Sorry for that. Read the other thread of email, it looks that some maintainers are working for this issue.
And I am working for 'Xen stubdom vTPM for HVM virtual machine' v4

patches.

Quoted 4 lines
Quoted 4 lines

There are a lot of modifications.

I will be out of office from Feb. 16th to Feb. 26th for Chinese New Year. I plan to summit v4 patches Before Feb. 16, and fix this issue after Feb.

26th.

Quoted 35 lines
Quoted 35 lines

--Quan

Quoted 31 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 11:21 PM
To: Xu, Quan
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n
'/;/{s@^.* @@;s@;@@p}'` # do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v
stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

Quoted 1 line
Quoted 1 line
Quoted 1 line

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the

same

Quoted 35 lines
Quoted 35 lines
Quoted 35 lines

file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)  create mode

100644 stubdom/vtpmmgr/odd_types.h

(quoted diff) +0 -0

b/stubdom/vtpmmgr/odd_types.h new file mode 100644 index 0000000..d72da9b

stubdom/vtpmmgr/odd_types.h new file +11 -0
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h index renamed from stubdom/vtpmmgr/tcg.h +0 -0

7321ec6..cac1bbc 100644

stubdom/vtpmmgr/tcg.h +0 -0
@@ -401,16 +401,10 @@
 
 
Quoted 7 lines
Quoted 6 lines

stubdom/vtpmmgr/tcg.h line 406

Quoted 6 lines
stubdom/vtpmmgr/tcg.h +1 -2
 // *************************** TYPEDEFS
 ********************************* -typedef unsigned char BYTE;
-typedef unsigned char BOOL; -typedef uint16_t UINT16; -typedef
 uint32_t UINT32; -typedef uint64_t UINT64;
-
+#include "odd_types.h"

I think it is just for gcc backward compatibility. IMHO, That does seem pretty

strange.

Quoted 3 lines

cc Daniel who is the maintainer of vTPM / XSM.

-Quan

Redefining an identifier in the same scope is violation of the C spec.

Quoted 7 lines

Newer GCC tolerates bad code which redundantly declares identifiers, but even newer GCC will still emit a diagnostic in -pedantic mode.

This build breakage needs fixing, and not just in the name of backwards compatibility.

~Andrew

Thanks Andrew.
I will fix this build breakage after Feb. 26th.
I try to redefine tpm2_types.h, deleting 'UINT16, UINT32 ..' and changing 'TPM_HANDLE ...' to ' TPM2_HANDLE ..', Or, could you give some advice? Thanks.

-Quan

#7 lore raw
Quoted 2 lines · Quan

I try to redefine tpm2_types.h, deleting 'UINT16, UINT32 ..' and changing 'TPM_HANDLE ...' to ' TPM2_HANDLE ..', Or, could you give some advice? Thanks.

Perhaps make stubdom/vtpmmgr/types.h with these and use it for both?

Or switch to the standard uint.._t types in that whole subtree, but perhaps some of this code is important from elsewhere in which case I can see why you wouldn't want to do that.

Ian.

#8 lore raw
Quoted 9 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Wednesday, February 25, 2015 9:54 PM
To: Xu, Quan
Cc: Andrew Cooper; Olaf Hering; Daniel De Graaf; [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 7 lines
Quoted 2 lines · Quan

I try to redefine tpm2_types.h, deleting 'UINT16, UINT32 ..' and changing 'TPM_HANDLE ...' to ' TPM2_HANDLE ..', Or, could you give some

advice? Thanks.

Perhaps make stubdom/vtpmmgr/types.h with these and use it for both?

Agree, I will try it. I came back to office today.

Quoted 4 lines

Or switch to the standard uint.._t types in that whole subtree, but perhaps some of this code is important from elsewhere in which case I can see why you wouldn't want to do that.

I am afraid that this modification still doesn't pass old gcc.

Quoted 2 lines

Ian.

BTW, update the status of 'Xen stubdom vTPM for HVM virtual machine' patches. I planned to submit these serious of patch before Feb. 16th, but a tricky bug and Chinese New Year vacation make me put off submitting these patches. Now I have fixed it and am wrapping up these patches.

-Quan

#9 lore raw
Quoted 10 lines · Quan
Quoted 10 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Wednesday, February 25, 2015 9:54 PM
To: Xu, Quan
Cc: Andrew Cooper; Olaf Hering; Daniel De Graaf; [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

On Fri, 2015-02-13 at 02:07 +0000, Xu, Quan wrote:

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

I try to redefine tpm2_types.h, deleting 'UINT16, UINT32 ..' and changing 'TPM_HANDLE ...' to ' TPM2_HANDLE ..', Or, could you give some

advice? Thanks.

Perhaps make stubdom/vtpmmgr/types.h with these and use it for both?

Agree, I will try it. I came back to office today.

Still no news on this? I see you've already sent out a bunch more vtpm features, FTR I shan't be considering them until this issue with the previous bunch of stuff is resolved. Regressions should take priority over new stuff.

In fact I'm considering reverting the original patch which caused this build failure.

Ian.

#10 lore raw
Quoted 31 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Wednesday, March 11, 2015 6:51 PM
To: Xu, Quan
Cc: Wei Liu; Stefano Stabellini; Daniel De Graaf; Olaf Hering; Andrew Cooper; [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 11 lines · Quan
Quoted 11 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Wednesday, February 25, 2015 9:54 PM
To: Xu, Quan
Cc: Andrew Cooper; Olaf Hering; Daniel De Graaf; [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

On Fri, 2015-02-13 at 02:07 +0000, Xu, Quan wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

I try to redefine tpm2_types.h, deleting 'UINT16, UINT32 ..' and changing 'TPM_HANDLE ...' to ' TPM2_HANDLE ..', Or, could you give some

advice? Thanks.

Perhaps make stubdom/vtpmmgr/types.h with these and use it for both?

Agree, I will try it. I came back to office today.

Quoted 7 lines

Still no news on this? I see you've already sent out a bunch more vtpm features, FTR I shan't be considering them until this issue with the previous bunch of stuff is resolved. Regressions should take priority over new stuff.

In fact I'm considering reverting the original patch which caused this build failure.

Ian.

I am still testing and fixing it. Sorry for that, I am not a full time open source developer.

Quan

#11 lore raw
Quoted 2 lines · Quan

I am still testing and fixing it. Sorry for that, I am not a full time open source developer.

Regardless, you are expect to fix things which you broke in a timely manner, otherwise in the future I will just have to be more proactive about reverting changes.

Certainly fixing things needs to take precedence over submissions of new functionality.

Ian.

#12 lore raw
In reply to Olaf Hering

Olaf,
Could you share me this patch description? Then I can sign off:

..

(1)
-- /dev/null
+++ b/stubdom/vtpmmgr/common_types.h
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif

[...]

(2)
Change from TPM_HANDLE to TPM2_HANDLE
Change from TPM_ALGORITHM_ID to TPM2_ALGORITHM_ID

(3)
Delete redundant TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID.

-Quan

Quoted 137 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 11:21 PM
To: Xu, Quan
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n '/;/{s@^.*
@@;s@;@@p}'` # do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v
stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the same file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)  create mode 100644

stubdom/vtpmmgr/odd_types.h

stubdom/vtpmmgr/odd_types.h new file +11 -0
new file mode 100644 index 0000000..d72da9b
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h index renamed from stubdom/vtpmmgr/tcg.h +0 -0

7321ec6..cac1bbc 100644

stubdom/vtpmmgr/tcg.h +1 -3
@@ -401,16 +401,10 @@
 
 
 // *************************** TYPEDEFS
 ********************************* -typedef unsigned char BYTE;
-typedef unsigned char BOOL; -typedef uint16_t UINT16; -typedef uint32_t
 UINT32; -typedef uint64_t UINT64;
-
+#include "odd_types.h"
 typedef UINT32 TPM_RESULT;
 typedef UINT32 TPM_PCRINDEX;
 typedef UINT32 TPM_DIRINDEX;
-typedef UINT32 TPM_HANDLE;
 typedef TPM_HANDLE TPM_AUTHHANDLE;
 typedef TPM_HANDLE TCPA_HASHHANDLE;
 typedef TPM_HANDLE TCPA_HMACHANDLE;
@@ -422,7 +416,6 @@ typedef UINT32 TPM_COMMAND_CODE;  typedef
 UINT16 TPM_PROTOCOL_ID;  typedef BYTE TPM_AUTH_DATA_USAGE;
 typedef UINT16 TPM_ENTITY_TYPE; -typedef UINT32 TPM_ALGORITHM_ID;
 typedef UINT16 TPM_KEY_USAGE;  typedef UINT16 TPM_STARTUP_TYPE;

typedef UINT32 TPM_CAPABILITY_AREA; diff --git a/stubdom/vtpmmgr/tpm2_types.h b/stubdom/vtpmmgr/tpm2_types.h index ac2830d..63564cd 100644

stubdom/vtpmmgr/tpm2_types.h +1 -10
@@ -83,12 +83,8 @@
 #define    MAX_ECC_KEY_BYTES    ((MAX_ECC_KEY_BITS + 7) / 8)
 
 
-typedef unsigned char BYTE;
-typedef unsigned char BOOL;
+#include "odd_types.h"
 typedef uint8_t       UINT8;
-typedef uint16_t      UINT16;
-typedef uint32_t      UINT32;
-typedef uint64_t      UINT64;
 
 // TPM2 command code
 
@@ -216,7 +212,6 @@ typedef UINT16 TPM_ST;
 
 
 // TPM Handle types
-typedef UINT32 TPM_HANDLE;
 typedef UINT8 TPM_HT;
 
 
@@ -233,7 +228,6 @@ typedef UINT32 TPM_RH;
 #define    TPM_RH_LAST           (TPM_RH)(0x4000000C)
 
 // Table 4 -- DocumentationClarity Types <I/O>
-typedef UINT32    TPM_ALGORITHM_ID;
 typedef UINT32    TPM_MODIFIER_INDICATOR;
 typedef UINT32    TPM_SESSION_OFFSET;
 typedef UINT16    TPM_KEY_SIZE;
@@ -261,8 +255,6 @@ typedef BYTE TPMA_LOCALITY;  // Table 37 --
 TPMI_YES_NO Type <I/O>  typedef BYTE TPMI_YES_NO;
 
-typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
-
 // Table 38 -- TPMI_DH_OBJECT Type <I/O>  typedef TPM_HANDLE
 TPMI_DH_OBJECT;
 
@@ -304,7 +296,6 @@ typedef TPM_HANDLE TPMI_RH_LOCKOUT;
 
 // Table 7 -- TPM_ALG_ID
 typedef UINT16 TPM_ALG_ID;
-typedef UINT16 TPM_ALG_ID;
 
 #define    TPM2_ALG_ERROR             (TPM_ALG_ID)(0x0000) // a: ; D:
 #define    TPM2_ALG_FIRST             (TPM_ALG_ID)(0x0001) // a: ; D:

Olaf

#13 lore raw
Quoted 2 lines · Quan

Olaf,
Could you share me this patch description? Then I can sign off:

I'm not sure what you are asking for. My hack doesnt have a desription other than "attempt to fix build".
Do you perhaps mean I should respin my change with common_types.h as filename?

Olaf

Quoted 171 lines

..

(1)
-- /dev/null
+++ b/stubdom/vtpmmgr/common_types.h

stubdom/vtpmmgr/odd_types.h new file +10 -0
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
 
[...]

(2)
Change from TPM_HANDLE to TPM2_HANDLE
Change from TPM_ALGORITHM_ID to TPM2_ALGORITHM_ID

(3)
Delete redundant TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID.

-Quan

Quoted 137 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 11:21 PM
To: Xu, Quan
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n '/;/{s@^.*
@@;s@;@@p}'` # do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v
stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the same file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)  create mode 100644

stubdom/vtpmmgr/odd_types.h

stubdom/vtpmmgr/odd_types.h new file +11 -0
new file mode 100644 index 0000000..d72da9b
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h index renamed from stubdom/vtpmmgr/tcg.h +0 -0

7321ec6..cac1bbc 100644

stubdom/vtpmmgr/tcg.h +1 -3
@@ -401,16 +401,10 @@
 
 
 // *************************** TYPEDEFS
 ********************************* -typedef unsigned char BYTE;
-typedef unsigned char BOOL; -typedef uint16_t UINT16; -typedef uint32_t
 UINT32; -typedef uint64_t UINT64;
-
+#include "odd_types.h"
 typedef UINT32 TPM_RESULT;
 typedef UINT32 TPM_PCRINDEX;
 typedef UINT32 TPM_DIRINDEX;
-typedef UINT32 TPM_HANDLE;
 typedef TPM_HANDLE TPM_AUTHHANDLE;
 typedef TPM_HANDLE TCPA_HASHHANDLE;
 typedef TPM_HANDLE TCPA_HMACHANDLE;
@@ -422,7 +416,6 @@ typedef UINT32 TPM_COMMAND_CODE;  typedef
 UINT16 TPM_PROTOCOL_ID;  typedef BYTE TPM_AUTH_DATA_USAGE;
 typedef UINT16 TPM_ENTITY_TYPE; -typedef UINT32 TPM_ALGORITHM_ID;
 typedef UINT16 TPM_KEY_USAGE;  typedef UINT16 TPM_STARTUP_TYPE;

typedef UINT32 TPM_CAPABILITY_AREA; diff --git a/stubdom/vtpmmgr/tpm2_types.h b/stubdom/vtpmmgr/tpm2_types.h index ac2830d..63564cd 100644

stubdom/vtpmmgr/tpm2_types.h +1 -10
@@ -83,12 +83,8 @@
 #define    MAX_ECC_KEY_BYTES    ((MAX_ECC_KEY_BITS + 7) / 8)
 
 
-typedef unsigned char BYTE;
-typedef unsigned char BOOL;
+#include "odd_types.h"
 typedef uint8_t       UINT8;
-typedef uint16_t      UINT16;
-typedef uint32_t      UINT32;
-typedef uint64_t      UINT64;
 
 // TPM2 command code
 
@@ -216,7 +212,6 @@ typedef UINT16 TPM_ST;
 
 
 // TPM Handle types
-typedef UINT32 TPM_HANDLE;
 typedef UINT8 TPM_HT;
 
 
@@ -233,7 +228,6 @@ typedef UINT32 TPM_RH;
 #define    TPM_RH_LAST           (TPM_RH)(0x4000000C)
 
 // Table 4 -- DocumentationClarity Types <I/O>
-typedef UINT32    TPM_ALGORITHM_ID;
 typedef UINT32    TPM_MODIFIER_INDICATOR;
 typedef UINT32    TPM_SESSION_OFFSET;
 typedef UINT16    TPM_KEY_SIZE;
@@ -261,8 +255,6 @@ typedef BYTE TPMA_LOCALITY;  // Table 37 --
 TPMI_YES_NO Type <I/O>  typedef BYTE TPMI_YES_NO;
 
-typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
-
 // Table 38 -- TPMI_DH_OBJECT Type <I/O>  typedef TPM_HANDLE
 TPMI_DH_OBJECT;
 
@@ -304,7 +296,6 @@ typedef TPM_HANDLE TPMI_RH_LOCKOUT;
 
 // Table 7 -- TPM_ALG_ID
 typedef UINT16 TPM_ALG_ID;
-typedef UINT16 TPM_ALG_ID;
 
 #define    TPM2_ALG_ERROR             (TPM_ALG_ID)(0x0000) // a: ; D:
 #define    TPM2_ALG_FIRST             (TPM_ALG_ID)(0x0001) // a: ; D:

Olaf

#14 lore raw
Quoted 14 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Friday, March 13, 2015 9:30 PM
To: Xu, Quan
Cc: [email protected]; Ian Campbell; Daniel De Graaf
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 2 lines · Quan

Olaf,
Could you share me this patch description? Then I can sign off:

Quoted 7 lines

I'm not sure what you are asking for. My hack doesnt have a desription other than "attempt to fix build".
Do you perhaps mean I should respin my change with common_types.h as filename?

Olaf

Description for this patch, could I descript 'fix stubdom vtpm build failure in staging'? I prefer common_types.h to odd_types.h. Anyway, I should send out this patch.

Quan

Quoted 175 lines
Quoted 101 lines

(1)
-- /dev/null
+++ b/stubdom/vtpmmgr/common_types.h

stubdom/vtpmmgr/odd_types.h new file +10 -0
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
 
[...]

(2)
Change from TPM_HANDLE to TPM2_HANDLE
Change from TPM_ALGORITHM_ID to TPM2_ALGORITHM_ID

(3)
Delete redundant TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID.

-Quan

Quoted 68 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 11:21 PM
To: Xu, Quan
Cc: [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Thanks, I will check and fix it tomorrow. It is 23:12 PM Pacific time now.

Any progress?
These typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers do not cope with current staging:

# for i in `grep -w typedef stubdom/vtpmmgr/tcg.h | sed -n
'/;/{s@^.* @@;s@;@@p}'` # do
#         if test -n "`git grep -wn $i|grep -w typedef|grep -v
stubdom/vtpmmgr/tcg.h`"
#         then
#                 echo $i
#         fi
# done

BYTE
BOOL
UINT16
UINT32
UINT64
TPM_HANDLE
TPM_ALGORITHM_ID

TPMI_RH_HIERARCHY_AUTH and TPM_ALG_ID are defined twice in the same file.

This change works for me:

---
 stubdom/vtpmmgr/odd_types.h  | 11 +++++++++++
 stubdom/vtpmmgr/tcg.h        |  9 +--------
 stubdom/vtpmmgr/tpm2_types.h | 11 +----------
 3 files changed, 13 insertions(+), 18 deletions(-)  create mode

100644 stubdom/vtpmmgr/odd_types.h

(quoted diff) +0 -0

b/stubdom/vtpmmgr/odd_types.h new file mode 100644 index 0000000..d72da9b

stubdom/vtpmmgr/odd_types.h new file +11 -0
@@ -0,0 +1,11 @@
+#ifndef VTPM_ODD_TYPES
+#define VTPM_ODD_TYPES 1
+typedef unsigned char BYTE;
+typedef unsigned char BOOL;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef UINT32 TPM_HANDLE;
+typedef UINT32 TPM_ALGORITHM_ID;
+#endif
+
stubdom/vtpmmgr/tcg.h index renamed from stubdom/vtpmmgr/tcg.h +0 -0

7321ec6..cac1bbc 100644

stubdom/vtpmmgr/tcg.h +0 -0
@@ -401,16 +401,10 @@
 
 
Quoted 15 lines
Quoted 12 lines
stubdom/vtpmmgr/tcg.h +1 -3
 // *************************** TYPEDEFS
 ********************************* -typedef unsigned char BYTE;
-typedef unsigned char BOOL; -typedef uint16_t UINT16; -typedef
 uint32_t UINT32; -typedef uint64_t UINT64;
-
+#include "odd_types.h"
 typedef UINT32 TPM_RESULT;
 typedef UINT32 TPM_PCRINDEX;
 typedef UINT32 TPM_DIRINDEX;
-typedef UINT32 TPM_HANDLE;
 typedef TPM_HANDLE TPM_AUTHHANDLE;
 typedef TPM_HANDLE TCPA_HASHHANDLE;  typedef TPM_HANDLE
Quoted 3 lines

TCPA_HMACHANDLE; @@ -422,7 +416,6 @@ typedef UINT32 TPM_COMMAND_CODE; typedef
UINT16 TPM_PROTOCOL_ID; typedef BYTE TPM_AUTH_DATA_USAGE;

typedef

Quoted 4 lines
Quoted 4 lines

UINT16 TPM_ENTITY_TYPE; -typedef UINT32 TPM_ALGORITHM_ID; typedef UINT16 TPM_KEY_USAGE; typedef UINT16 TPM_STARTUP_TYPE; typedef UINT32 TPM_CAPABILITY_AREA; diff --git a/stubdom/vtpmmgr/tpm2_types.h b/stubdom/vtpmmgr/tpm2_types.h

index

Quoted 41 lines
Quoted 41 lines

ac2830d..63564cd 100644

stubdom/vtpmmgr/tpm2_types.h +1 -9
@@ -83,12 +83,8 @@
 #define    MAX_ECC_KEY_BYTES    ((MAX_ECC_KEY_BITS + 7) / 8)
 
 
-typedef unsigned char BYTE;
-typedef unsigned char BOOL;
+#include "odd_types.h"
 typedef uint8_t       UINT8;
-typedef uint16_t      UINT16;
-typedef uint32_t      UINT32;
-typedef uint64_t      UINT64;
 
 // TPM2 command code
 
@@ -216,7 +212,6 @@ typedef UINT16 TPM_ST;
 
 
 // TPM Handle types
-typedef UINT32 TPM_HANDLE;
 typedef UINT8 TPM_HT;
 
 
@@ -233,7 +228,6 @@ typedef UINT32 TPM_RH;
 #define    TPM_RH_LAST           (TPM_RH)(0x4000000C)
 
 // Table 4 -- DocumentationClarity Types <I/O>
-typedef UINT32    TPM_ALGORITHM_ID;
 typedef UINT32    TPM_MODIFIER_INDICATOR;
 typedef UINT32    TPM_SESSION_OFFSET;
 typedef UINT16    TPM_KEY_SIZE;
@@ -261,8 +255,6 @@ typedef BYTE TPMA_LOCALITY;  // Table 37 --
 TPMI_YES_NO Type <I/O>  typedef BYTE TPMI_YES_NO;
 
-typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
-
 // Table 38 -- TPMI_DH_OBJECT Type <I/O>  typedef TPM_HANDLE
 TPMI_DH_OBJECT;
 
Quoted 7 lines

stubdom/vtpmmgr/tpm2_types.h typedef TPM_HANDLE TPMI_RH_LOCKOUT; · line 300

Quoted 7 lines
stubdom/vtpmmgr/tpm2_types.h +0 -1
@@ -304,7 +296,6 @@ typedef TPM_HANDLE TPMI_RH_LOCKOUT;
 
 // Table 7 -- TPM_ALG_ID
 typedef UINT16 TPM_ALG_ID;
-typedef UINT16 TPM_ALG_ID;
 
 #define    TPM2_ALG_ERROR             (TPM_ALG_ID)(0x0000) // a: ;

D:

Quoted 1 line

stubdom/vtpmmgr/tpm2_types.h typedef TPM_HANDLE TPMI_RH_LOCKOUT; · line 301

Quoted 1 line
stubdom/vtpmmgr/tpm2_types.h +0 -0
 #define    TPM2_ALG_FIRST             (TPM_ALG_ID)(0x0001) // a: ;

D:

Quoted 2 lines
Quoted 2 lines

Olaf

#15 lore raw
In reply to Olaf Hering
Quoted 15 lines · Olaf Hering

Current staging fails in the install-stubdom target:

...

[  488s] tpm2_types.h:86: error: redefinition of typedef 'BYTE'
[  488s] tcg.h:404: error: previous declaration of 'BYTE' was here
[  488s] tpm2_types.h:87: error: redefinition of typedef 'BOOL'
[  488s] tcg.h:405: error: previous declaration of 'BOOL' was here
[  488s] tpm2_types.h:89: error: redefinition of typedef 'UINT16'
[  488s] tcg.h:406: error: previous declaration of 'UINT16' was here
[  488s] tpm2_types.h:90: error: redefinition of typedef 'UINT32'
[  488s] tcg.h:407: error: previous declaration of 'UINT32' was here
[  488s] tpm2_types.h:91: error: redefinition of typedef 'UINT64'
[  488s] tcg.h:408: error: previous declaration of 'UINT64' was here
[  488s] tpm2_types.h:219: error: redefinition of typedef 'TPM_HANDLE'
[  488s] tcg.h:413: error: previous declaration of 'TPM_HANDLE' was here
Quoted 8 lines
[  488s] tpm2_types.h:236: error: redefinition of typedef 'TPM_ALGORITHM_ID'
[  488s] tcg.h:425: error: previous declaration of 'TPM_ALGORITHM_ID' was here
[  488s] tpm2_types.h:285: error: redefinition of typedef 'TPMI_RH_HIERARCHY_AUTH'
[  488s] tpm2_types.h:264: error: previous declaration of 'TPMI_RH_HIERARCHY_AUTH' was here
[  488s] tpm2_types.h:307: error: redefinition of typedef 'TPM_ALG_ID'
[  488s] tpm2_types.h:306: error: previous declaration of 'TPM_ALG_ID' was here
[  488s] make[2]: Entering directory `/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/ioemu'
[  488s] make[2]: *** [vtpmmgr.o] Error 1

I didn't see this on my pre-commit builds, which are debug=y, but I don't see anything in the code where debug= would make a difference.

Do you perhaps have a CFLAG override in force which is making the compiler more pedantic about these things?

Ian.

Quoted 14 lines

....

This happens with openSUSE 11.4 and SLES11 with xen_hg_changeset Wed Jan 28 13:28:46 2015 +0000 hg: 30230:e44b74f5a177

Last successful build was:
xen_hg_changeset Wed Jan 28 09:59:46 2015 +0000 hg: 30213:242d3c94e590

Olaf

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

#16 lore raw
Quoted 38 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Wednesday, January 28, 2015 11:25 PM
To: Olaf Hering
Cc: [email protected]; Xu, Quan
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 16 lines · Olaf Hering

Current staging fails in the install-stubdom target:

...
[ 488s] tpm2_types.h:86: error: redefinition of typedef 'BYTE' [ 488s] tcg.h:404: error: previous declaration of 'BYTE' was here [ 488s] tpm2_types.h:87: error: redefinition of typedef 'BOOL' [ 488s] tcg.h:405: error: previous declaration of 'BOOL' was here [ 488s] tpm2_types.h:89: error: redefinition of typedef 'UINT16' [ 488s] tcg.h:406: error: previous declaration of 'UINT16' was here [ 488s] tpm2_types.h:90: error: redefinition of typedef 'UINT32' [ 488s] tcg.h:407: error: previous declaration of 'UINT32' was here [ 488s] tpm2_types.h:91: error: redefinition of typedef 'UINT64' [ 488s] tcg.h:408: error: previous declaration of 'UINT64' was here [ 488s] tpm2_types.h:219: error: redefinition of typedef 'TPM_HANDLE' [ 488s] tcg.h:413: error: previous declaration of 'TPM_HANDLE' was here [ 488s] tpm2_types.h:236: error: redefinition of typedef

'TPM_ALGORITHM_ID'

Quoted 2 lines

[ 488s] tcg.h:425: error: previous declaration of 'TPM_ALGORITHM_ID' was here [ 488s] tpm2_types.h:285: error: redefinition of typedef

'TPMI_RH_HIERARCHY_AUTH'

Quoted 2 lines

[ 488s] tpm2_types.h:264: error: previous declaration of 'TPMI_RH_HIERARCHY_AUTH' was here [ 488s] tpm2_types.h:307: error:

redefinition of typedef 'TPM_ALG_ID'

Quoted 2 lines

[ 488s] tpm2_types.h:306: error: previous declaration of 'TPM_ALG_ID' was here [ 488s] make[2]: Entering directory

`/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/ioemu'

Quoted 1 line

[ 488s] make[2]: *** [vtpmmgr.o] Error 1

Quoted 7 lines

I didn't see this on my pre-commit builds, which are debug=y, but I don't see anything in the code where debug= would make a difference.

Do you perhaps have a CFLAG override in force which is making the compiler more pedantic about these things?

Ian.

Ian,
I have verified the staging branch, the vTPM is working on TPM 2.0, building / working well.
The GIT commit ID is 39798e95a954eec660a3f5f21489c30ef78daf6d. The host is Ubuntu 12.10. thanks.

Olaf,
Could you share more about your environment setting? If I miss something.
BTW, I verified with GIT clone source code. Could you do it based on GIT source code? Thanks.

Also you can share me how to build Xen upon openSUSE 11.4, if it is available. I have never Build xen on opensuse 11.4. I didn't know what packages should be installed. then I can also Follow it.

-Quan

Quoted 16 lines
Quoted 15 lines

....

This happens with openSUSE 11.4 and SLES11 with xen_hg_changeset Wed

Jan 28 13:28:46 2015 +0000 hg: 30230:e44b74f5a177

Last successful build was:
xen_hg_changeset Wed Jan 28 09:59:46 2015 +0000 hg: 30213:242d3c94e590

Olaf

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

#17 lore raw
Quoted 3 lines · Quan

Could you share more about your environment setting? If I miss something.
BTW, I verified with GIT clone source code. Could you do it based on GIT source code? Thanks.

They are identical within the xen.spec.
https://build.opensuse.org/package/show/home:olh:xen-unstable/xen-unstable

Quoted 3 lines

Also you can share me how to build Xen upon openSUSE 11.4, if it is available. I have never Build xen on opensuse 11.4. I didn't know what packages should be installed. then I can also Follow it.

It builds in 13.1 and later, but fails with 11.4 and SLE11.

I will check if I can spot the difference between old and new environment.

Olaf

#18 lore raw
Quoted 25 lines

-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Thursday, January 29, 2015 4:27 PM
To: Xu, Quan
Cc: Ian Campbell; [email protected]
Subject: Re: [Xen-devel] stubdom vtpm build failure in staging

Quoted 1 line · Quan

Could you share more about your environment setting? If I miss

something.

Quoted 1 line

BTW, I verified with GIT clone source code. Could you do it based on GIT source

code?

Quoted 1 line

Thanks.

They are identical within the xen.spec.
https://build.opensuse.org/package/show/home:olh:xen-unstable/xen-unstabl
e

Quoted 3 lines

Also you can share me how to build Xen upon openSUSE 11.4, if it is available. I have never Build xen on opensuse 11.4. I didn't know what packages should be installed. then I can also Follow it.

Quoted 5 lines

It builds in 13.1 and later, but fails with 11.4 and SLE11.

I will check if I can spot the difference between old and new environment.

Olaf

Thanks Olaf.
Maybe the root cause is the old GCC version in SLE_11_SP3/ openSUSE_11.4, or a CFLAG issue as Ian mentioned to. I can also build a SLE_11_SP3 virtual machine to check it in next week.

-Quan

#19 lore raw
Quoted 3 lines · Quan

Maybe the root cause is the old GCC version in SLE_11_SP3/ openSUSE_11.4, or a CFLAG issue as Ian mentioned to. I can also build a SLE_11_SP3 virtual machine to check it in next week.

The CFLAGS are identical, except two -W flags:

13.1 2015-01-29 10:26:08.420669902 +0100 renamed from 11.4 2015-01-29 10:26:05.604625966 +0100 +3 -1
@@ -14,6 +14,8 @@ cc
 -Wall
 -Wstrict-prototypes
 -Wdeclaration-after-statement
+-Wno-unused-but-set-variable
+-Wno-unused-local-typedefs
 
 
 -fno-stack-protector
@@ -49,7 +51,7 @@ __sun__
 -isystem
 /BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include
 -isystem
-/usr/lib64/gcc/x86_64-suse-linux/4.5/include
+/usr/lib64/gcc/x86_64-suse-linux/4.8/include
 -isystem
 /BUILD/xen-4.6.30230/non-dbg/stubdom/lwip-x86_64/src/include
 -isystem

Looks like old gcc can not handle two typedefs?

cc -mno-red-zone -O1 -fno-omit-frame-pointer -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -fno-stack-protector -fno-exceptions -Werror -Iutil -Icrypto -Itcs -Wno-declaration-after-statement -Wno-unused-label -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../tools/xenstore/include -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/x86 -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mi
ni-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib64/gcc/x86_64-suse-linux/4.5/include -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/lwip-x86_64/src/include -isystem /usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/lwip-x86_64/src/include/ipv4 -I/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include -I/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../xen/include -c -o vtpmmgr.o vtpmmgr.c --save-temps

bax:/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/vtpmmgr> grep -Ewn '(include|BYTE)' *.i
7:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 1 3 4 8:# 45 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 23:# 71 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 26:# 87 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 29:# 101 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 32:# 119 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 35:# 133 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 38:# 163 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 53:# 217 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 64:# 235 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 66:# 247 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdint.h" 3 4 70:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/tpmback.h" 1 3 4 71:# 37 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/tpmback.h" 3 4 72:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/tpmif.h" 1 3 4
73:# 37 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/tpmif.h" 3 4
74:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 1 3 4
75:# 31 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
76:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 1 3 4
77:# 30 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
78:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen-compat.h" 1 3 4
79:# 31 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 2 3 4
82:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 1 3 4
83:# 27 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
84:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/../xen.h" 1 3 4
85:# 28 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 2 3 4
86:# 65 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
87:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen-x86_64.h" 1 3 4
88:# 127 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen-x86_64.h" 3 4
94:# 144 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen-x86_64.h" 3 4 140:# 66 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 2 3 4
145:# 113 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
147:# 143 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
158:# 167 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
162:# 182 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
180:# 208 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
210:# 255 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../arch-x86/xen.h" 3 4
216:# 34 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 2 3 4
217:# 42 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
231:# 408 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
256:# 493 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
258:# 534 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
265:# 550 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
272:# 565 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
274:# 575 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
293:# 618 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
306:# 641 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
309:# 675 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
326:# 728 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
360:# 790 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
372:# 809 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../xen.h" 3 4
426:# 32 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 2 3 4
427:# 114 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
429:# 131 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
442:# 319 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
444:# 338 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
458:# 363 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
469:# 383 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
497:# 419 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
508:# 454 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
526:# 479 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
537:# 501 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/../grant_table.h" 3 4
548:# 38 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/tpmif.h" 2 3 4
577:# 94 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/tpmif.h" 3 4
584:# 121 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/tpmif.h" 3 4
596:# 38 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/tpmback.h" 2 3 4 597:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/xenbus.h" 1 3 4
598:# 36 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/io/xenbus.h" 3 4
632:# 39 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/tpmback.h" 2 3 4 633:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/types.h" 1 3 4 634:# 22 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/types.h" 3 4 635:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
636:# 149 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 3 4
638:# 211 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 3 4
640:# 323 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 3 4
642:# 23 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/types.h" 2 3 4 643:# 34 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/types.h" 3 4 649:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix/limits.h" 1 3 4 653:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/x86/mini-os/arch_limits.h" 1 3 4 654:# 5 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix/limits.h" 2 3 4 655:# 40 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/types.h" 2 3 4 656:# 67 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/types.h" 3 4 658:# 40 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/tpmback.h" 2 3 4 659:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/include/xen/xen.h" 1 3 4
660:# 41 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/tpmback.h" 2 3 4 725:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix/unistd.h" 1 3 4 729:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/unistd.h" 1 3 4 733:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/unistd.h" 1 3 4 741:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/_ansi.h" 1 3 4 742:# 15 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/_ansi.h" 3 4 743:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/newlib.h" 1 3 4 744:# 16 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/_ansi.h" 2 3 4 745:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/config.h" 1 3 4 749:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/ieeefp.h" 1 3 4 750:# 5 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/config.h" 2 3 4 751:# 17 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/_ansi.h" 2 3 4 752:# 9 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/unistd.h" 2 3 4 753:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 1 3 4 754:# 25 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 3 4 755:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_types.h" 1 3 4 762:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_default_types.h" 1 3 4 763:# 26 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_default_types.h" 3 4 766:# 36 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_default_types.h" 3 4 769:# 46 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_default_types.h" 3 4 772:# 58 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_default_types.h" 3 4 775:# 76 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_default_types.h" 3 4 778:# 93 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_default_types.h" 3 4 781:# 8 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/_types.h" 2 3 4 782:# 26 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 2 3 4 783:# 61 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 3 4 784:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/_types.h" 1 3 4 785:# 13 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/_types.h" 3 4 786:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/sys/lock.h" 1 3 4
794:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/waittypes.h" 1 3 4 798:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/list.h" 1 3 4 799:# 5 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/waittypes.h" 2 3 4 811:# 9 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/sys/lock.h" 2 3 4
847:# 14 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/_types.h" 2 3 4 852:# 28 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/_types.h" 3 4 874:# 60 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/_types.h" 3 4 882:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
883:# 352 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 3 4
885:# 68 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/_types.h" 2 3 4 907:# 62 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 2 3 4 915:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
916:# 70 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 2 3 4 917:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/types.h" 1 3 4 918:# 19 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/types.h" 3 4 923:# 71 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 2 3 4 924:# 92 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 3 4 967:# 162 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 3 4 979:# 186 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 3 4 986:# 213 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 3 4 998:# 244 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 3 4 1011:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/features.h" 1 3 4 1012:# 257 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/types.h" 2 3 4 1013:# 10 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/unistd.h" 2 3 4 1017:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
1018:# 14 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/unistd.h" 2 3 4 1114:# 117 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/unistd.h" 3 4 1186:# 232 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/unistd.h" 3 4 1189:# 5 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/unistd.h" 2 3 4 1190:# 5 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix/unistd.h" 2 3 4 1202:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 1 3 4 1203:# 29 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1204:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/_ansi.h" 1 3 4 1205:# 30 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 2 3 4 1210:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
1211:# 35 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 2 3 4 1214:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stdarg.h" 1 3 4
1215:# 40 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stdarg.h" 3 4
1217:# 38 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 2 3 4 1225:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 1 3 4 1226:# 24 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1228:# 37 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1272:# 89 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1280:# 105 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1285:# 158 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1333:# 259 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1344:# 291 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1354:# 564 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1431:# 796 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/reent.h" 3 4 1444:# 46 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 2 3 4 1450:# 59 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1457:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/stdio.h" 1 3 4 1458:# 66 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 2 3 4 1459:# 170 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1591:# 310 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1608:# 335 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1743:# 494 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1746:# 509 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1780:# 669 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h" 3 4 1783:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/string.h" 1 3 4 1784:# 14 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/string.h" 3 4 1785:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
1786:# 15 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/string.h" 2 3 4 1851:# 102 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/string.h" 3 4 1852:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/sys/string.h" 1 3 4 1853:# 103 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/string.h" 2 3 4 1857:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix/stdlib.h" 1 3 4 1861:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdlib.h" 1 3 4 1862:# 14 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdlib.h" 3 4 1863:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
1864:# 15 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdlib.h" 2 3 4 1867:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/machine/stdlib.h" 1 3 4 1868:# 18 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdlib.h" 2 3 4 1870:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/alloca.h" 1 3 4 1871:# 20 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdlib.h" 2 3 4 1898:# 57 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdlib.h" 3 4 2038:# 5 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/posix/stdlib.h" 2 3 4 2042:# 1 "/usr/lib64/gcc/x86_64-suse-linux/4.5/include/stddef.h" 1 3 4
2047:typedef unsigned char BYTE;
2066:typedef BYTE TPM_AUTH_DATA_USAGE;
2079:typedef BYTE TPM_AUTHDATA[20];
2082:typedef BYTE TPM_PAYLOAD_TYPE;

2094:  BYTE major;
2095:  BYTE minor;
2096:  BYTE revMajor;
2097:  BYTE revMinor;
2106:   BYTE errataRev;
2107:   BYTE tpmVendorID[4];
2109:   BYTE* vendorSpecific;

2118: BYTE digest[20];
2128: BYTE nonce[20];
2135: BYTE* IV;
2142: BYTE* data;
2156: BYTE* exponent;
2196: BYTE* key;

2220:   BYTE* pcrSelect;
2234:   BYTE localityAtCreation;
2235:   BYTE localityAtRelease;
2286:  BYTE* encData;
2306:  BYTE* payloadData;
2321:  BYTE* encData;
2341:  BYTE* encData;

2373:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/../extras/mini-os/include/mini-os/tpmback.h" 1 3 4 2375:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 1 3 4 2376:# 32 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 3 4 2377:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/config.h" 1 3 4 2378:# 33 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 2 3 4 2380:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 1 3 4 2381:# 45 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2393:# 67 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2395:# 76 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2405:# 94 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2408:# 106 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2410:# 116 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2413:# 126 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2430:# 153 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/sha4.h" 3 4 2441:# 35 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 2 3 4 2442:# 64 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 3 4 2477:# 110 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 3 4 2481:# 121 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 3 4 2483:# 132 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 3 4 2485:# 143 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/entropy.h" 3 4 2489:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 1 3 4 2490:# 32 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2491:# 1 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 1 3 4 2492:# 41 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 3 4 2500:# 62 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 3 4 2502:# 73 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 3 4 2504:# 85 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 3 4 2509:# 104 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 3 4 2516:# 129 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 3 4 2524:# 158 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/aes.h" 3 4 2538:# 33 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 2 3 4 2539:# 60 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2559:# 97 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2565:# 112 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2568:# 122 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2571:# 132 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2574:# 145 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2577:# 155 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2580:# 173 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2584:# 190 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2587:# 202 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2589:# 214 "/usr/src/packages/BUILD/xen-4.6.30230/non-dbg/stubdom/cross-root-x86_64/x86_64-xen-elf/include/polarssl/ctr_drbg.h" 3 4 2610:typedef unsigned char BYTE;
2660:typedef BYTE TPMA_SESSION;
2661:typedef BYTE TPMA_LOCALITY;
2664:typedef BYTE TPMI_YES_NO;

2734:    BYTE sha1[20];
2737:    BYTE sha256[32];
2744:    BYTE buffer[sizeof(TPMU_HA)];
2767:    BYTE name[sizeof(TPMT_HA)];
2772:    BYTE pcrSelect[((24 +7)/8)];
2779:    BYTE pcrSelect[((24 +7)/8)];
2850:    BYTE buffer[((128 + 7) / 8)];
2861:    BYTE buffer[128];
3028:    BYTE buffer[((2048 + 7) / 8)];
3037:    BYTE buffer[((2048 + 7) / 8)/2];
3043:    BYTE buffer[((256 + 7) / 8)];
3189:    BYTE buffer[sizeof(_PRIVATE)];
#20 lore raw
Quoted 1 line · Olaf Hering

Looks like old gcc can not handle two typedefs?

Yes, this fails already:

typedef unsigned char BYTE;
typedef unsigned char BYTE;
void f(int *v) { *v *= *v; }

t.c:2:23: error: redefinition of typedef 'BYTE' t.c:1:23: note: previous declaration of 'BYTE' was here

Olaf

#21 lore raw
Quoted 4 lines · Olaf Hering
Quoted 1 line · Olaf Hering

Looks like old gcc can not handle two typedefs?

Quoted 8 lines

Yes, this fails already:

typedef unsigned char BYTE;
typedef unsigned char BYTE;
void f(int *v) { *v *= *v; }

t.c:2:23: error: redefinition of typedef 'BYTE' t.c:1:23: note: previous declaration of 'BYTE' was here

This compiles for me on Debian with gcc 4.7.2-5.

I'm honestly not sure what the C standard says about duplicate but identical typedefs -- Ian?

Ian.

#22 lore raw
Quoted 1 line · Ian Campbell

This compiles for me on Debian with gcc 4.7.2-5.

Same here.

Quoted 2 lines

I'm honestly not sure what the C standard says about duplicate but identical typedefs -- Ian?

How would that matter now? ;-) Old gcc can not deal with it, the commits cause a regression for gcc-4.5 and older.

Olaf

#23 lore raw
Quoted 11 lines · Olaf Hering
Quoted 1 line · Ian Campbell

This compiles for me on Debian with gcc 4.7.2-5.

Same here.

Quoted 2 lines

I'm honestly not sure what the C standard says about duplicate but identical typedefs -- Ian?

How would that matter now? ;-) Old gcc can not deal with it, the commits cause a regression for gcc-4.5 and older.

If it is allowed then strictly speaking a bug in gcc-4.5 and older has caused a regression with C compliant code. In some cases we might then argue that people should fix their compiler, I doubt that will be needed in this case, but it is an option.

Anyway, in more practical terms right now this might have an impact on how invasive a fix we would be prepared to accept. In particular if the current code is valid then we might want to make the fix conditional on the gcc version so that we can eventually drop it. If the current code is invalid then the first fix is to make it valid and see if that also helps with the older gcc.

Ian.

#24 lore raw
In reply to Ian Campbell
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 29.01.15 at 11:46, <[email protected]> wrote:
Quoted 10 lines · Olaf Hering
Quoted 1 line · Olaf Hering

Looks like old gcc can not handle two typedefs?

Yes, this fails already:

typedef unsigned char BYTE;
typedef unsigned char BYTE;
void f(int *v) { *v *= *v; }

Quoted 7 lines
Quoted 2 lines

t.c:2:23: error: redefinition of typedef 'BYTE' t.c:1:23: note: previous declaration of 'BYTE' was here

This compiles for me on Debian with gcc 4.7.2-5.

I'm honestly not sure what the C standard says about duplicate but identical typedefs -- Ian?

I'm not Ian, but anyway: Under "Declarations", the standard says "If an identifier has no linkage, there shall be no more than one declaration of the identifier (in a declarator or type specifier) with the same scope and in the same name space, except for tags as specified in ..." Clearly typedef-s have no linkage, so it's at best a courtesy of some compiler versions to not choke on redundant typedef-s. And with -Wpedantic even gcc 4.9.2 issues a warning.

Jan