Hi,

There is an expression and output format problem.
Firstly,number of algorithms should be %d instead of %08X,it will be more 
readable.
Secondly,log expression is not accurate.Tpm2.0 supports three algorithms,as 
follows:
TBOOT: TPM: supported bank count = 3
TBOOT: TPM: bank alg = 00000004
TBOOT: TPM: bank alg = 0000000b
TBOOT: TPM: bank alg = 00000012
But tboot code supports two algorithms at present. So "printk(TBOOT_INFO"TPM: 
supported alg count = %08X\n", ti->alg_count);" 
should be changed to "printk(TBOOT_INFO"tboot: supported alg count = %d\n", 
ti->alg_count);".

Signed-off-by: Shi Wangyi<shiwan...@gohighsec.com>

diff -r 2ec88c2dd07b -r c79d9a0558c0 tboot/common/tpm_20.c
--- a/tboot/common/tpm_20.c     Fri Feb 17 03:55:19 2017 -0800
+++ b/tboot/common/tpm_20.c     Sun Apr 02 09:58:00 2017 -0400
@@ -2319,9 +2319,9 @@
             ti->alg_count++;
         }
     }
-    printk(TBOOT_INFO"TPM: supported alg count = %08X\n", ti->alg_count);
+    printk(TBOOT_INFO"tboot: supported alg count = %d\n", ti->alg_count);
     for (unsigned int i=0; i<ti->alg_count; i++)
-        printk(TBOOT_INFO"\t\t %08X\n", ti->algs[i]);
+        printk(TBOOT_INFO"tboot: hash alg = %08X\n", ti->algs[i]);
 
     if (handle2048 != 0)
         goto out;


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

Reply via email to