MigTD: add retry for quote generation#754
Draft
haitaohuang wants to merge 3 commits intointel:mainfrom
Draft
Conversation
jyao1
reviewed
Mar 18, 2026
src/migtd/src/quote.rs
Outdated
| const INITIAL_DELAY_MS: u64 = 5000; | ||
|
|
||
| /// Maximum number of attempts before giving up | ||
| const MAX_ATTEMPTS: u32 = 9; // Total wait time up to ~21 minutes with 5s initial delay |
Contributor
There was a problem hiding this comment.
@bodzhang , please review this and ensure 21 minutes is OK.
Contributor
Author
There was a problem hiding this comment.
shortened to 2.5 min after checking more data
jyao1
reviewed
Mar 18, 2026
453a490 to
4e48b13
Compare
Contributor
Author
|
cargo deny failure due to a new advisory just issued today not related to PR changes |
4e48b13 to
c9a2bb6
Compare
Add new quote module (src/migtd/src/quote.rs) that centralizes TD quote generation with exponential backoff retry (5s initial, up to 5 retries). This handles the race where an impactless security update invalidates a TD REPORT generated before the update then sent for quote generation. Replace direct attestation::get_quote + tdcall_report calls with quote::get_quote_with_retry in three call sites: - mig_policy.rs: local TCB info initialization - ratls/server_client.rs: RA-TLS quote generation - spdm/mod.rs: SPDM quote generation, also changed error return to MigrationAttestationError for failed quote generation, consistent with RA-TLS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Also flush log area in more VMCALL handlers so all logs read in time Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Adds a new 'Mock Quote Retry' test that exercises the quote retry logic by enabling mock_quote_retry feature. The test verifies: - Migration completes successfully after 8 simulated quote failures - Both source and destination logs contain exactly 8 retry failures and at least 1 success message Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
c9a2bb6 to
2bdfb27
Compare
Contributor
Author
|
Change draft to do more investigation |
Contributor
It is resolved in recent commit. |
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.
Add new quote module (src/migtd/src/quote.rs) that centralizes TD quote generation with exponential backoff retry (5s initial, up to 9 attempts). This handles the race where an impactless security update invalidates a TD REPORT generated before the update then sent for quote generation.
Replace direct attestation::get_quote + tdcall_report calls with quote::get_quote_with_retry in three call sites: