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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the quote here is empty, the attester side
error
info cannot be exposed to users when using CoCo. The verifier side will face error "base64 decode failed". If we can ensure the behavior here is only caused by misconfiguration of host side we can also raise an error to indicate "TSM provider returned an empty quote, please ensure the host side QGS is configured correctly".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently checking if Qemu is just handling this case wrong. I'd think the same could also happen due to other reasons too where Qemu only sees
qemu-system-x86_64: Failed to connect to '2:4050': Connection reset by peer
(which is what I get in my test setup with no QGS running).In the mean time, perhaps we could also look to the verifier side to return meaningful error if the evidence is missing mandatory fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Anyway, both attester and verifier side should raise error if no quote is included. For attester the error would be finally exposed to kata-agent and thus host side containerd making the deployer know something wrong with host side stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a bit of research and it looks the kernel has an issue of not handling the errors correctly. There's even a dedicated error code for
TDX_VP_GET_QUOTE_QGS_UNAVAILABLE
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How this error can be caught by AA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking to submit the kernel fix which is something like:
Which then shows up as an error normally, like in my test case with
evidence_getter
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!