Skip to content

Fix: update-server issues inverted erase-range when an image end is slot/block-aligned - #2771

Open
imlvts wants to merge 1 commit into
oxidecomputer:masterfrom
imlvts:fix-finish-full-slot-erase
Open

imlvts wants to merge 1 commit into
oxidecomputer:masterfrom
imlvts:fix-finish-full-slot-erase

Conversation

@imlvts

@imlvts imlvts commented Nov 10, 2026 •

Copy link
Copy Markdown

When flash_erase_range gets called with empty or inverted range, it calls start_erase_range with invalid range.
This happens when finish_image_update or switch_default_boot_image end writing exactly at page boundary and call flash_erase_range with an empty range.
Check for inverted range in flash_erase_range and return early

@imlvts
imlvts force-pushed the fix-finish-full-slot-erase branch 3 times, most recently from 814fc07 to 1e7cec4 Compare November 10, 2026 03:46
@imlvts imlvts changed the title Fix: update-server finish_image_update erasing a wrong block Fix: update-server finish_image_update causing erase-inverted-range Nov 10, 2026
…lot-aligned

When `flash_erase_range` gets called with empty or inverted range,
it calls `start_erase_range` with invalid range.

This happens when `finish_image_update` or `switch_default_boot_image`
end writing exactly at page boundary and call `flash_erase_range`
with an empty range.

Check for inverted range in `flash_erase_range` and return early.
@imlvts imlvts changed the title Fix: update-server finish_image_update causing erase-inverted-range Fix: update-server issues inverted erase-range when an image end is slot-aligned Nov 12, 2026
@imlvts imlvts changed the title Fix: update-server issues inverted erase-range when an image end is slot-aligned Fix: update-server issues inverted erase-range when an image end is slot/block-aligned Nov 12, 2026
@imlvts
imlvts force-pushed the fix-finish-full-slot-erase branch from 1e7cec4 to 5f71f18 Compare November 13, 2026 11:06

This branch has not been deployed

No deployments
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.

1 participant