Skip to content

Conversation

@hyperfinitism
Copy link
Contributor

The hyperv feature requires serde support for (de)serialising the AttestationReport struct. However, since the sev crate refactored its SNP types to gate Serialize/Deserialize behind the serde feature, building with --features hyperv now fails due to missing serde implementations.

This PR updates Cargo.toml (and Cargo.lock) and fixes hyperv/mod.rs so that enabling the hyperv feature automatically enables the serde feature on the sev crate.

Fixes #134

@DGonzalezVillal
Copy link
Member

Hello @hyperfinitism , I apologize for this very late review. I have had to step into other responsibilities for some time, I'm trying to improve my communication with the VirTEE community.

Quick question, where does hyperv have to use SERDE? It can't use the new parsing library in SEV?

I would rather not have add that feature unless absolutely necessary

@hyperfinitism
Copy link
Contributor Author

Thank you for taking the time to review this. No worries at all.

hyperv currently relies on serde::Deserialise at

snpguest/src/hyperv/mod.rs

Lines 129 to 130 in 7705faf

AttestationReport::from_bytes(report_bytes)
.context("Unable to convert HCL report bytes to AttestationReport")

From my reading of the code, it should not be particularly difficult to refactor this part to avoid using serde, if that is preferred.

I think there are two reasonable ways to fix:

  • Update this PR to remove the serde dependency and adjust the PR title accordingly.
  • Close this PR and instead submit a separate PR that supersedes this PR.

I am happy to proceed in whichever way you prefer.

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.

Error compiling v0.10.0

3 participants