Hi,

There is an issue in function (was_last_boot_error(void)).
In begin_launch() , there is a was_last_boot_error().In was_last_boot_error() , 
there is a read_tb_error_code().
When read_tb_error_code() runs successfully and the value of parameter error is 
TB_ERR_NONE,the was_last_boot_error()
will return true.This results in displaying "TBOOT: last boot has error" in 
tboot log.

Here is a patch against 1.9.5 which corrects the problem:
---------------------------------------------------------------------------
diff -urNp a/tboot/common/tb_error.c b/tboot/common/tb_error.c 
--- a/tboot/common/tb_error.c   2017-01-12 22:20:13.000000000 -0500
+++ b/tboot/common/tb_error.c   2017-01-16 00:39:14.000000000 -0500
@@ -193,7 +193,7 @@ bool was_last_boot_error(void)
 
     /* check TB_LAUNCH_ERR_IDX */
     if ( read_tb_error_code(&error) ) {
-        if ( error != TB_ERR_FIXED )
+        if ( error != TB_ERR_FIXED && error != TB_ERR_NONE )
             return true;
     }

Thanks
Wangyi
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to