-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modules/mcuboot/nrf53_hooks: fix boot_image_check_hook() #12846
Conversation
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
boot_image_check_hook() implementation shall return fih_ret value type. The function should return FIH_BOOT_HOOK_REGULAR instead of BOOT_HOOK_REGULAR. If the Fault Injection Hardening (FIH) is enabled then fih_int type is different than fih_ret type. Also BOOT_HOOK_REGULAR and FIH_BOOT_HOOK_REGULAR are not the same things. Signed-off-by: Andrzej Puzdrowski <[email protected]>
314925f
to
afdb83a
Compare
PR Rebased - CI issues were related to platform which are not affected by this patch, so probably it must have been fixed aside. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally - fixed
@nvlsianpu please get changelog update and/or known issue update requested in #12657 |
Not really reviewing code. In case of potential need to update rel notes or known issues, we have a PR open for both. Please add such needs as comments in respective PRs. |
Removed from the 2.5.0 scope - agreed to have known issues update: #12657 (review) |
boot_image_check_hook() implementation shall return fih_ret value type. The function should return FIH_BOOT_HOOK_REGULAR instead of BOOT_HOOK_REGULAR.
If the Fault Injection Hardening (FIH) is enabled then fih_int type is different than fih_ret type. Also BOOT_HOOK_REGULAR and FIH_BOOT_HOOK_REGULAR are not the same things.
ref. NCSDK-24203
Consequence of this is that when FIH is enabled, the standard boot_image_check() call is never performed by the mcuboot (for real images) and subsequent checks gets BOOT_HOOK_REGULAR as its results. In mcuboot loader.c this prematurely cause identification of invalid image.