All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: "Xu, Quan" <quan.xu@intel.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: stubdom vtpm build failure in staging
Date: Wed, 11 Feb 2015 16:20:41 +0100	[thread overview]
Message-ID: <20150211152040.GA29204@aepfle.de> (raw)
In-Reply-To: <945CA011AD5F084CBEA3E851C0AB28890E87DF4A@SHSMSX101.ccr.corp.intel.com>

On Wed, Jan 28, Xu, Quan wrote:

> 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

diff --git a/stubdom/vtpmmgr/odd_types.h b/stubdom/vtpmmgr/odd_types.h
new file mode 100644
index 0000000..d72da9b
--- /dev/null
+++ b/stubdom/vtpmmgr/odd_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
+
diff --git a/stubdom/vtpmmgr/tcg.h b/stubdom/vtpmmgr/tcg.h
index 7321ec6..cac1bbc 100644
--- a/stubdom/vtpmmgr/tcg.h
+++ b/stubdom/vtpmmgr/tcg.h
@@ -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
--- a/stubdom/vtpmmgr/tpm2_types.h
+++ b/stubdom/vtpmmgr/tpm2_types.h
@@ -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

  reply	other threads:[~2015-02-11 15:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 15:08 stubdom vtpm build failure in staging Olaf Hering
2015-01-28 15:13 ` Xu, Quan
2015-02-11 15:20   ` Olaf Hering [this message]
2015-02-12 16:56     ` Xu, Quan
2015-02-12 17:24       ` Xu, Quan
2015-02-12 17:40         ` Andrew Cooper
2015-02-13  2:07           ` Xu, Quan
2015-02-25 13:54             ` Ian Campbell
2015-02-27 15:07               ` Xu, Quan
2015-03-11 10:51                 ` Ian Campbell
2015-03-12  1:46                   ` Xu, Quan
2015-03-12  9:42                     ` Ian Campbell
2015-03-12 15:44     ` Xu, Quan
2015-03-13 13:30       ` Olaf Hering
2015-03-13 15:39         ` Xu, Quan
2015-01-28 15:24 ` Ian Campbell
2015-01-29  7:34   ` Xu, Quan
2015-01-29  8:27     ` Olaf Hering
2015-01-29  9:22       ` Xu, Quan
2015-01-29  9:36         ` Olaf Hering
2015-01-29 10:27           ` Olaf Hering
2015-01-29 10:46             ` Ian Campbell
2015-01-30  8:09               ` Olaf Hering
2015-01-30 10:39                 ` Ian Campbell
2015-01-30 11:03               ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150211152040.GA29204@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=quan.xu@intel.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.