oxidecomputer / oxidecomputer/hubris
Setting the RoT's persistent boot preference from A to B to A to B has unexpected results.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 239
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 23
Description
In drv/lpc55-update-server/src/main.rs:
let bit = cfpa[offset][0] & 1; // Reads from ACTIVE CFPA page
let new_bit = if slot == SlotId::A { 0 } else { 1 };
if bit == new_bit {
// No need to write the CFPA if it's unchanged
return Ok(());
}
This check for a redundant setting does not take the SCRATCH CFPA page into account.
Every request to change the persistent preference that is different than the active page will result in a write to the scratch page.
Every request to change the persistent preference that is the same as the active page will result in no write to the scratch page.
The caller, via MGS, will get an Ok(()) acknowledgement on every request which may not reflect reality.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in drv/lpc55-update-server/src/main.rs at the redundant-setting check shown in the issue, then trace how the active and SCRATCH CFPA pages are handled for persistent boot preference requests. Exercise the A-to-B-to-A-to-B sequence and verify that acknowledgements reflect whether the requested preference was actually written.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100