Re: [tpmdd-devel] [PATCH 0/4] Add support for TPM2 log reported via ACPI table

2017-03-29 Thread Nayna


On 03/29/2017 01:13 PM, Petr Vandrovec wrote:
> Hi Peter,
>
> This series of 4 patches adds support for handling TPM2
> log when it is reported through ACPI TPM2 table, as
> described in latest TPM ACPI draft (Version 1.2, Revision 8,
> from February 27th, 2017).
>
> I've tested patch on x86 only - I do not have PPC64 system
> with TPM, and handling of endianness between tpm1_eventlog.c
> and tpm2_eventlog.c seems inconsistent: tpm1_eventlog.c uses
> be32_to_cpu() for all log fields on PPC64, while
> tpm2_eventlog.c uses log uses native endianness.  If it
> is intentional, and PPC64 has TPM1 logs in big endian

Yes, in case of ppc64, the tpm1 code logs are in big endian format.

> while TPM2 logs in native endianness, then 3rd patch
> needs to be amended.
>
> Four patches split task of improving TPM2 support into following
> subtasks:
>
>
> 1. Add log start/length fields to TPM2 table
>
> This patch adds 1.2 rev 8 structures to TPM2 table, and
> modifies tpm_tis and tpm_crb to use
> offsetofend(tpm2, field_accessed) rather than sizeof(tpm2)
> to verify that TPM2 table is big enough.
>
>
> 2. Read TCG log from TPM2 table
>
> This patch modifies tpm_acpi code to read log start/length
> from TPM2 table similar way it does so from TCPA table.
>
>
> 3. Autodetect TCG event log version
>
> This patch modifies tpm1_eventlog to make decision whether
> to use TPM1 or TPM2 format based on log content, rather
> than from chip version: on x86 there is dozen of firmwares
> that use TPM1 log with TPM2 chip.

Do you mean firmware support TPM1 log as only SHA1 log format and not 
crypto agile log with only SHA1 ?

Thanks & Regards,
- Nayna

>
> Other part of the change is to validate content of specid
> event to make sure kernel does not crash when faced with
> specid event that claims there is 2^32-1 hashes in the
> event list.
>
>
> 4. Improve handling of TPM2 event logs
>
> Current code does not report any error when digest's hash
> is not listed in specid event, or if event reports 2^32-1
> digests (which is BIOS bug), or if event has more than
> 3 digests (that is kernel bug).  Instead it will try to
> vmalloc() all available memory when event log is read by
> userspace application.
>
> This patch updates code so that it can handle arbitrary
> number of digests, as long as they are all described
> in specid event, and stops parsing as soon as any malformed
> event is detected.
>
>
> Let me know if there are any improvements I can make to
> this patch series.
>
> Thanks,
> Petr Vandrovec
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> tpmdd-devel mailing list
> tpmdd-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
>


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel


[tpmdd-devel] [PATCH 2/4] tpm: introduce tpm2_pcr_algo_to_crypto() and tpm2_pcr_algo_from_crypto()

2017-03-29 Thread Roberto Sassu
Introduce these functions to convert between TPM and crypto algorithm IDs.

Signed-off-by: Roberto Sassu 
---
 drivers/char/tpm/tpm-interface.c | 51 
 drivers/char/tpm/tpm.h   | 11 -
 drivers/char/tpm/tpm2-cmd.c  | 42 +
 include/linux/tpm.h  | 22 +
 4 files changed, 84 insertions(+), 42 deletions(-)

diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index bd2128e..0b6cb87 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -328,6 +328,57 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip 
*chip,
 }
 EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
 
+struct tpm2_hash {
+   unsigned int crypto_id;
+   unsigned int tpm_id;
+};
+
+static struct tpm2_hash tpm2_hash_map[] = {
+   {HASH_ALGO_SHA1, TPM2_ALG_SHA1},
+   {HASH_ALGO_SHA256, TPM2_ALG_SHA256},
+   {HASH_ALGO_SHA384, TPM2_ALG_SHA384},
+   {HASH_ALGO_SHA512, TPM2_ALG_SHA512},
+   {HASH_ALGO_SM3_256, TPM2_ALG_SM3_256},
+};
+
+/**
+ * tpm2_pcr_algo_to_crypto() - convert from TPM ID to crypto ID
+ * @tpm_id:TPM ID
+ *
+ * Return: crypto ID
+ */
+enum hash_algo tpm2_pcr_algo_to_crypto(enum tpm2_algorithms tpm_id)
+{
+   int i;
+
+   for (i = 0; i < ARRAY_SIZE(tpm2_hash_map); i++) {
+   if (tpm_id == tpm2_hash_map[i].tpm_id)
+   return tpm2_hash_map[i].crypto_id;
+   }
+
+   return HASH_ALGO__LAST;
+}
+EXPORT_SYMBOL_GPL(tpm2_pcr_algo_to_crypto);
+
+/**
+ * tpm2_pcr_algo_from_crypto() - convert from crypto ID to TPM ID
+ * @crypto_id: crypto ID
+ *
+ * Return: TPM ID
+ */
+enum tpm2_algorithms tpm2_pcr_algo_from_crypto(enum hash_algo crypto_id)
+{
+   int i;
+
+   for (i = 0; i < ARRAY_SIZE(tpm2_hash_map); i++) {
+   if (crypto_id == tpm2_hash_map[i].crypto_id)
+   return tpm2_hash_map[i].tpm_id;
+   }
+
+   return TPM2_ALG_ERROR;
+}
+EXPORT_SYMBOL_GPL(tpm2_pcr_algo_from_crypto);
+
 /**
  * tmp_transmit - Internal kernel interface to transmit TPM commands.
  *
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 4937b56..e20f3ae 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -95,17 +95,6 @@ enum tpm2_return_codes {
TPM2_RC_TESTING = 0x090A, /* RC_WARN */
 };
 
-enum tpm2_algorithms {
-   TPM2_ALG_ERROR  = 0x,
-   TPM2_ALG_SHA1   = 0x0004,
-   TPM2_ALG_KEYEDHASH  = 0x0008,
-   TPM2_ALG_SHA256 = 0x000B,
-   TPM2_ALG_SHA384 = 0x000C,
-   TPM2_ALG_SHA512 = 0x000D,
-   TPM2_ALG_NULL   = 0x0010,
-   TPM2_ALG_SM3_256= 0x0012,
-};
-
 enum tpm2_command_codes {
TPM2_CC_FIRST   = 0x011F,
TPM2_CC_SELF_TEST   = 0x0143,
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index f4d534c..e2ff95a 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -92,19 +92,6 @@ struct tpm2_cmd {
union tpm2_cmd_params   params;
 } __packed;
 
-struct tpm2_hash {
-   unsigned int crypto_id;
-   unsigned int tpm_id;
-};
-
-static struct tpm2_hash tpm2_hash_map[] = {
-   {HASH_ALGO_SHA1, TPM2_ALG_SHA1},
-   {HASH_ALGO_SHA256, TPM2_ALG_SHA256},
-   {HASH_ALGO_SHA384, TPM2_ALG_SHA384},
-   {HASH_ALGO_SHA512, TPM2_ALG_SHA512},
-   {HASH_ALGO_SM3_256, TPM2_ALG_SM3_256},
-};
-
 /*
  * Array with one entry per ordinal defining the maximum amount
  * of time the chip could take to return the result. The values
@@ -321,7 +308,6 @@ int tpm2_pcr_extend(struct tpm_chip *chip, int pcr_idx, u32 
count,
struct tpm2_null_auth_area auth_area;
int rc;
int i;
-   int j;
 
if (count > ARRAY_SIZE(chip->active_banks))
return -EINVAL;
@@ -346,14 +332,15 @@ int tpm2_pcr_extend(struct tpm_chip *chip, int pcr_idx, 
u32 count,
tpm_buf_append_u32(, count);
 
for (i = 0; i < count; i++) {
-   for (j = 0; j < ARRAY_SIZE(tpm2_hash_map); j++) {
-   if (digests[i].alg_id != tpm2_hash_map[j].tpm_id)
-   continue;
-   tpm_buf_append_u16(, digests[i].alg_id);
-   tpm_buf_append(, (const unsigned char
- *)[i].digest,
-  hash_digest_size[tpm2_hash_map[j].crypto_id]);
-   }
+   enum tpm2_algorithms tpm_id = digests[i].alg_id;
+   enum hash_algo crypto_id = tpm2_pcr_algo_to_crypto(tpm_id);
+
+   if (crypto_id == HASH_ALGO__LAST)
+   continue;
+
+   tpm_buf_append_u16(, digests[i].alg_id);
+   tpm_buf_append(, (const unsigned char *)[i].digest,
+  hash_digest_size[crypto_id]);
}
 
  

[tpmdd-devel] [PATCH 4/4] tpm: introduce tpm_extend_pcr_digests()

2017-03-29 Thread Roberto Sassu
Allow TPM users to provide a digest for each PCR bank,
for the extend operation.

Signed-off-by: Roberto Sassu 
---
 drivers/char/tpm/tpm-interface.c | 31 +++
 drivers/char/tpm/tpm.h   |  6 --
 include/linux/tpm.h  | 14 ++
 3 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 44e7c99..99789b2 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -876,6 +876,37 @@ int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 
*hash)
 EXPORT_SYMBOL_GPL(tpm_pcr_extend);
 
 /**
+ * tpm_pcr_extend_digests - extend pcr banks values with provided digests 
values
+ * @chip_num:  tpm idx # or ANY
+ * @pcr_idx:   pcr idx to extend
+ * @count: size of array
+ * @digests:   array of tpm2_digest structures
+ *
+ * The TPM driver should be built-in, but for whatever reason it
+ * isn't, protect against the chip disappearing, by incrementing
+ * the module usage count.
+ */
+int tpm_pcr_extend_digests(u32 chip_num, int pcr_idx, u32 count,
+  struct tpm2_digest *digests)
+{
+   struct tpm_chip *chip;
+   int rc = -ENODEV;
+
+   chip = tpm_chip_find_get(chip_num);
+   if (chip == NULL)
+   return rc;
+
+   if (!(chip->flags & TPM_CHIP_FLAG_TPM2))
+   goto out;
+
+   rc = tpm2_pcr_extend(chip, pcr_idx, count, digests);
+out:
+   tpm_put_ops(chip);
+   return rc;
+}
+EXPORT_SYMBOL_GPL(tpm_pcr_extend_digests);
+
+/**
  * tpm_pcr_algorithms - get TPM IDs of active PCR banks algorithms
  * @chip_num:  tpm idx # or ANY
  * @algorithms: array of TPM IDs
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index f15279b..e130b6d 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 
 enum tpm_const {
TPM_MINOR = 224,/* officially assigned */
@@ -373,11 +372,6 @@ struct tpm_cmd_t {
tpm_cmd_params  params;
 } __packed;
 
-struct tpm2_digest {
-   u16 alg_id;
-   u8 digest[SHA512_DIGEST_SIZE];
-} __packed;
-
 /* A string buffer type for constructing TPM commands. This is based on the
  * ideas of string buffer code in security/keys/trusted.h but is heap based
  * in order to keep the stack usage minimal.
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 6552e43..3e38112 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -22,6 +22,8 @@
 #ifndef __LINUX_TPM_H__
 #define __LINUX_TPM_H__
 
+#include 
+
 #define TPM_DIGEST_SIZE 20 /* Max TPM v1.2 PCR size */
 #define TPM_ACTIVE_BANKS_MAX 7 /* Max num of active banks for TPM 2.0 */
 
@@ -34,6 +36,11 @@ struct tpm_chip;
 struct trusted_key_payload;
 struct trusted_key_options;
 
+struct tpm2_digest {
+   u16 alg_id;
+   u8 digest[SHA512_DIGEST_SIZE];
+} __packed;
+
 enum TPM_OPS_FLAGS {
TPM_OPS_AUTO_STARTUP = BIT(0),
 };
@@ -70,6 +77,8 @@ extern enum tpm2_algorithms tpm2_pcr_algo_from_crypto(enum 
hash_algo crypto_id);
 extern int tpm_is_tpm2(u32 chip_num);
 extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf);
 extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash);
+extern int tpm_pcr_extend_digests(u32 chip_num, int pcr_idx, u32 count,
+ struct tpm2_digest *digests);
 extern int tpm_pcr_algorithms(u32 chip_num, u32 count,
  enum tpm2_algorithms *algorithms);
 extern int tpm_send(u32 chip_num, void *cmd, size_t buflen);
@@ -100,6 +109,11 @@ static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, 
u8 *res_buf) {
 static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) {
return -ENODEV;
 }
+static inline int tpm_pcr_extend_digests(u32 chip_num, int pcr_idx, u32 count,
+struct tpm2_digest *digests)
+{
+   return -ENODEV;
+}
 static inline int tpm_pcr_algorithms(u32 chip_num, u32 count,
 enum tpm2_algorithms *algorithms)
 {
-- 
2.9.3


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel


[tpmdd-devel] [PATCH 3/4] tpm: introduce tpm_pcr_algorithms()

2017-03-29 Thread Roberto Sassu
Return the algorithms supported by the TPM. The limit
(TPM_ACTIVE_BANKS_MAX) has been exported to include/linux/tpm.h.

Signed-off-by: Roberto Sassu 
---
 drivers/char/tpm/tpm-interface.c | 39 +++
 drivers/char/tpm/tpm.h   |  2 +-
 include/linux/tpm.h  |  8 
 3 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 0b6cb87..44e7c99 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -876,6 +876,45 @@ int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 
*hash)
 EXPORT_SYMBOL_GPL(tpm_pcr_extend);
 
 /**
+ * tpm_pcr_algorithms - get TPM IDs of active PCR banks algorithms
+ * @chip_num:  tpm idx # or ANY
+ * @algorithms: array of TPM IDs
+ * @algo_num: size of array
+ *
+ * Returns < 0 on error, and the number of active PCR banks on success.
+ */
+int tpm_pcr_algorithms(u32 chip_num, u32 count,
+  enum tpm2_algorithms *algorithms)
+{
+   struct tpm_chip *chip;
+   int rc = -ENODEV;
+   int i;
+
+   chip = tpm_chip_find_get(chip_num);
+   if (chip == NULL)
+   return rc;
+
+   if (!(chip->flags & TPM_CHIP_FLAG_TPM2))
+   goto out;
+
+   for (i = 0; i < ARRAY_SIZE(chip->active_banks) &&
+chip->active_banks[i] != TPM2_ALG_ERROR; i++) {
+   if (i >= count) {
+   rc = -EINVAL;
+   goto out;
+   }
+
+   algorithms[i] = chip->active_banks[i];
+   }
+
+   rc = i;
+out:
+   tpm_put_ops(chip);
+   return rc;
+}
+EXPORT_SYMBOL_GPL(tpm_pcr_algorithms);
+
+/**
  * tpm_do_selftest - have the TPM continue its selftest and wait until it
  *   can receive further commands
  * @chip: TPM chip to use
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index e20f3ae..f15279b 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -183,7 +183,7 @@ struct tpm_chip {
const struct attribute_group *groups[3];
unsigned int groups_cnt;
 
-   u16 active_banks[7];
+   u16 active_banks[TPM_ACTIVE_BANKS_MAX];
 #ifdef CONFIG_ACPI
acpi_handle acpi_dev_handle;
char ppi_version[TPM_PPI_VERSION_LEN + 1];
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 14b4a42..6552e43 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -23,6 +23,7 @@
 #define __LINUX_TPM_H__
 
 #define TPM_DIGEST_SIZE 20 /* Max TPM v1.2 PCR size */
+#define TPM_ACTIVE_BANKS_MAX 7 /* Max num of active banks for TPM 2.0 */
 
 /*
  * Chip num is this value or a valid tpm idx
@@ -69,6 +70,8 @@ extern enum tpm2_algorithms tpm2_pcr_algo_from_crypto(enum 
hash_algo crypto_id);
 extern int tpm_is_tpm2(u32 chip_num);
 extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf);
 extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash);
+extern int tpm_pcr_algorithms(u32 chip_num, u32 count,
+ enum tpm2_algorithms *algorithms);
 extern int tpm_send(u32 chip_num, void *cmd, size_t buflen);
 extern int tpm_get_random(u32 chip_num, u8 *data, size_t max);
 extern int tpm_seal_trusted(u32 chip_num,
@@ -97,6 +100,11 @@ static inline int tpm_pcr_read(u32 chip_num, int pcr_idx, 
u8 *res_buf) {
 static inline int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) {
return -ENODEV;
 }
+static inline int tpm_pcr_algorithms(u32 chip_num, u32 count,
+enum tpm2_algorithms *algorithms)
+{
+   return -ENODEV;
+}
 static inline int tpm_send(u32 chip_num, void *cmd, size_t buflen) {
return -ENODEV;
 }
-- 
2.9.3


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel


[tpmdd-devel] [PATCH 1/4] tpm: check whether all digests have been provided for TPM 2.0 extend

2017-03-29 Thread Roberto Sassu
TCG mandates that all PCR banks must be extended during the same operation.
tpm2_pcr_extend() will check whether all digests have been provided.

The check is necessary because tpm2_pcr_extend() will be called by a new
function, allowing callers to provide a digest for each PCR bank.

Signed-off-by: Roberto Sassu 
---
 drivers/char/tpm/tpm2-cmd.c | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 881aea9..f4d534c 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -284,6 +284,26 @@ struct tpm2_null_auth_area {
__be16  auth_size;
 } __packed;
 
+static bool tpm2_digests_all_banks(struct tpm_chip *chip, u32 count,
+  struct tpm2_digest *digests)
+{
+   int i, j;
+
+   for (i = 0; i < ARRAY_SIZE(chip->active_banks) &&
+chip->active_banks[i] != TPM2_ALG_ERROR; i++) {
+   for (j = 0; j < count; j++)
+   if (digests[j].alg_id == chip->active_banks[i])
+   break;
+   if (j == count) {
+   pr_err("missing TPM algorithm 0x%x\n",
+  chip->active_banks[i]);
+   return false;
+   }
+   }
+
+   return true;
+}
+
 /**
  * tpm2_pcr_extend() - extend a PCR value
  *
@@ -306,6 +326,9 @@ int tpm2_pcr_extend(struct tpm_chip *chip, int pcr_idx, u32 
count,
if (count > ARRAY_SIZE(chip->active_banks))
return -EINVAL;
 
+   if (!tpm2_digests_all_banks(chip, count, digests))
+   return -EINVAL;
+
rc = tpm_buf_init(, TPM2_ST_SESSIONS, TPM2_CC_PCR_EXTEND);
if (rc)
return rc;
-- 
2.9.3


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel


[tpmdd-devel] [PATCH 0/4] Add support for TPM2 log reported via ACPI table

2017-03-29 Thread Petr Vandrovec
Hi Peter,

This series of 4 patches adds support for handling TPM2
log when it is reported through ACPI TPM2 table, as
described in latest TPM ACPI draft (Version 1.2, Revision 8,
from February 27th, 2017).

I've tested patch on x86 only - I do not have PPC64 system
with TPM, and handling of endianness between tpm1_eventlog.c
and tpm2_eventlog.c seems inconsistent: tpm1_eventlog.c uses
be32_to_cpu() for all log fields on PPC64, while
tpm2_eventlog.c uses log uses native endianness.  If it
is intentional, and PPC64 has TPM1 logs in big endian
while TPM2 logs in native endianness, then 3rd patch
needs to be amended.

Four patches split task of improving TPM2 support into following
subtasks:


1. Add log start/length fields to TPM2 table

This patch adds 1.2 rev 8 structures to TPM2 table, and
modifies tpm_tis and tpm_crb to use
offsetofend(tpm2, field_accessed) rather than sizeof(tpm2)
to verify that TPM2 table is big enough.


2. Read TCG log from TPM2 table

This patch modifies tpm_acpi code to read log start/length
from TPM2 table similar way it does so from TCPA table.


3. Autodetect TCG event log version

This patch modifies tpm1_eventlog to make decision whether
to use TPM1 or TPM2 format based on log content, rather
than from chip version: on x86 there is dozen of firmwares
that use TPM1 log with TPM2 chip.

Other part of the change is to validate content of specid
event to make sure kernel does not crash when faced with
specid event that claims there is 2^32-1 hashes in the
event list.


4. Improve handling of TPM2 event logs

Current code does not report any error when digest's hash
is not listed in specid event, or if event reports 2^32-1
digests (which is BIOS bug), or if event has more than
3 digests (that is kernel bug).  Instead it will try to
vmalloc() all available memory when event log is read by
userspace application.

This patch updates code so that it can handle arbitrary
number of digests, as long as they are all described
in specid event, and stops parsing as soon as any malformed
event is detected.


Let me know if there are any improvements I can make to
this patch series.

Thanks,
Petr Vandrovec


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel