Skip to content

Conversation

@pamaury
Copy link
Contributor

@pamaury pamaury commented Nov 20, 2025

Backport #25984.

Note: several conflicts due to the fact that #26427 was applied after #25984 on earlgrey_1.0.0 but backported to master in #27133 already

@pamaury pamaury requested review from a team and cfrantz as code owners November 20, 2025 20:00
@pamaury pamaury requested review from engdoreis, jwnrt and timothytrippel and removed request for a team November 20, 2025 20:00
@pamaury pamaury force-pushed the backport_25984 branch 3 times, most recently from 6888d95 to d0aef9f Compare November 20, 2025 23:22
Copy link
Contributor

@jwnrt jwnrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the backport but have some concerns about the use of kHardenedBoolFalse in a pointer.

static rom_error_t rom_verify_immutable_section(
rom_error_t verify_result, const manifest_t *manifest,
uintptr_t *imm_section_entry_point) {
*imm_section_entry_point = kHardenedBoolFalse;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely comfortable with using a sentinal value in the middle of a pointer, although I don't think that the current value of kHardenedBoolFalse is a valid address.

I would prefer to have a separate valid boolean outside of the address if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cfrantz ping

Add tests that check if a valid signed ROM_EXT with an invalid immutable
section can boot.  The correct behavior is that the ROM should determine
that the immutable section is invalid and try the other slot.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit f17d30f)
1. Refactor immutable section verification into a separate function.
2. When booting, examine the immutable section and fail the boot with an
   error if the immutable section is invalid.  If the failure occurs in
   the primary slot, the ROM should attempt to boot the secondary slot.

Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit 1561505)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants