Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move DeriveContext(recursive) returned handle to NEW_CONTEXT_HANDLE #342

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dpe/src/commands/derive_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,11 @@ impl CommandExecution for DeriveContextCmd {
..tmp_context
};

// No child context created so handle is unmeaningful
// Return new handle in new_context_handle
Ok(Response::DeriveContext(DeriveContextResp {
handle: ContextHandle::default(),
parent_handle: dpe.contexts[parent_idx].handle,
handle: dpe.contexts[parent_idx].handle,
// Should be ignored since retain_parent cannot be true
parent_handle: ContextHandle::default(),
resp_hdr: ResponseHdr::new(DpeErrorCode::NoError),
}))
} else {
Expand Down
2 changes: 1 addition & 1 deletion verification/testing/deriveContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func TestDeriveContextRecursiveOnDerivedContexts(d client.TestDPEInstance, c cli
if err != nil {
t.Fatalf("[FATAL]: Could not set TCI value: %v", err)
}
childHandle = &resp.ParentContextHandle
childHandle = &resp.NewContextHandle

childHandle, childTcbInfo, err = getTcbInfoForHandle(c, childHandle)
if err != nil {
Expand Down
Loading