Hello
I start using FIH library and I doubt that it can solve following fault injection :
Here are 2 tests function being placed by linker very closed from each other to make possible
to jump from test_1 start address to test_2 start address with a fault injection.
fih_int test_1(void)
{
fih_int fih_rc = FIH_FAILURE;
fih_rc = fih_int_encode(TFM_PLAT_ERR_SUCCESS);
FIH_RET(fih_rc);
}
fih_int test_2(void)
{
fih_int fih_rc = FIH_FAILURE;
fih_rc = fih_int_encode(TFM_PLAT_ERR_SUCCESS);
FIH_RET(fih_rc);
}
Is the following able to detect that code return from test_2 instead of test_1 after such fault ?
FIH_CALL(test_1());
if (fih_not_eq(fih_rc, fih_int_encode(TFM_HAL_SUCCESS))) {
tfm_core_panic();
}
Best regards
Michel