Backport 27119 ([rescue,opentitanlib,test] Rescue command disability test)#29319
Merged
pamaury merged 4 commits intolowRISC:masterfrom Feb 19, 2026
Merged
Backport 27119 ([rescue,opentitanlib,test] Rescue command disability test)#29319pamaury merged 4 commits intolowRISC:masterfrom
pamaury merged 4 commits intolowRISC:masterfrom
Conversation
6c2fc96 to
8b14e37
Compare
timothytrippel
approved these changes
Feb 19, 2026
cfrantz
approved these changes
Feb 19, 2026
When UartConsole::wait_for was changed in 275806e, a subtle behaviour change was introduced in the set_mode function which previously returned the full context on error: mode: {mode} error: {error} but after the change, only returns the error: error: {error} Unfortunately, some rescue tests expect to have the full context so this commit restores the old behavour. Signed-off-by: Amaury Pouly <amaury.pouly@opentitan.org>
The rescue mode validation logic was updated to immediately return bad mode if a prior error occurred and the selected service exclusively supports either upload or download operations in the DFU implementation. This change ensures that `opentitantool` receives an error when sending a disallowed command for uni-directional services. However, for services supporting both upload and download, the `opentitantool` might not receive an error for a disallowed command depending on the owner configuration (e.g., when only upload or download is permitted). Signed-off-by: Anthony Chen <antchen@google.com> (cherry picked from commit a140bc0)
This adds the `empty` function in BootSvc for creating the Empty boot service request and updates the Rescue trait. Signed-off-by: Anthony Chen <antchen@google.com> (cherry picked from commit 54ff8f5)
This introduces a new test to verify rescue command disabilities. It uses the owner block binary if provided; otherwise, it captures the owner page 0 Base64 data from the UART console. The test analyzes the owner block to identify disallowed rescue commands and then attempts to execute each of them. This ensures that the device correctly enforces the configured restrictions. The testing approach differs slightly between rescue protocols: - XMODEM: The test directly examines the result of the rescue operation to confirm if a command was disallowed by the device. - DFU: Due to the potential for the rescue operation result to be inconclusive, the test primarily relies on analyzing device logs to determine if a command was rejected. Only when informative device logs are absent will the test fall back to checking the rescue operation result. Signed-off-by: Anthony Chen <antchen@google.com> (cherry picked from commit 0fe7506)
769300b to
0f89fb3
Compare
Contributor
Author
|
CI failures are unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #27119 and add another commit to revert a subtle behaviour change introduced in #28783