Hi,
There is no module images name when the latest tboot is used in Centos 7.2.
In Centos 7.2, it seems that grub2 does not pass boot image name to tboot.
When loading module images in Centos 7.2, the tboot shows "TBOOT: checking if 
module  is an SINIT for this platform..." in tboot log.
But in Centos 6.5, grub does pass boot image name to tboot.
When loading module images in Centos 6.5, the tboot shows "TBOOT: checking if 
module /initramfs-2.6.32-431.el6.x86_64.img is an SINIT 
for this platform..." in tboot log.

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

Here is a patch against 1.9.5 which corrects the problem:
---------------------------------------------------------------------------
diff -r 2ec88c2dd07b -r db1ec0303bbd tboot/common/loader.c
--- a/tboot/common/loader.c     Fri Feb 17 03:55:19 2017 -0800
+++ b/tboot/common/loader.c     Sun Mar 12 00:12:27 2017 -0500
@@ -1722,10 +1722,14 @@
 
     for ( unsigned int i = get_module_count(lctx) - 1; i > 0; i-- ) {
         module_t *m = get_module(lctx, i);
-        if (lctx->type == 1)
+        if (lctx->type == 1 && strlen((const char *)m->string) != 0)
             printk(TBOOT_DETA
                    "checking if module %s is an SINIT for this platform...\n",
                    (const char *)m->string);
+       else
+            printk(TBOOT_DETA
+                   "checking if module %d is an SINIT for this platform...\n",
+                   i);
         if (lctx->type == 2)
             printk(TBOOT_DETA
                    "checking if module %s is an SINIT for this platform...\n",

Thanks,
Wangyi
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to