Skip to content

Conversation

@ajcaldelas
Copy link
Contributor

Adding logic to parse bytes from kernel for different tcb versions.

@ajcaldelas ajcaldelas force-pushed the platform_status_fix branch 6 times, most recently from 9a01981 to 7b53420 Compare April 22, 2025 19:15
@ajcaldelas ajcaldelas requested a review from tylerfanelli April 22, 2025 19:15

#[cfg(feature = "snp")]
use crate::firmware::host::SnpPlatformStatus;
use SnpPlatformStatus;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
use SnpPlatformStatus;
use super::types::SnpPlatformStatus;

I think that would be the path? Try referring to the full path of SnpPlatformStatus.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, isn't this imported in line 6. Can probably remove this

@ajcaldelas ajcaldelas force-pushed the platform_status_fix branch from 7b53420 to c869945 Compare April 23, 2025 18:04
Copy link
Member

@DGonzalezVillal DGonzalezVillal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the one thing Tyler pointed out.

@larrydewey @tylerfanelli The Platform Status struct is outdated (missing fields). I don't know if you guys want to address it in this PR or fix it in a separate one.


#[cfg(feature = "snp")]
use crate::firmware::host::SnpPlatformStatus;
use SnpPlatformStatus;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, isn't this imported in line 6. Can probably remove this

src/lib.rs Outdated
Turin,
}

#[cfg(all(not(test), feature = "snp"))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for not(test) being specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following isn't not(test) being specified with the additonal requirement that the snp is enabled?

I added this because with having only not(test) caused pipeline errors when the no-feature flag was enabled

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand, not(test) indicates that this won't be included if cargo test is being run. I think this can just be:

#[cfg(feature = "snp")]

@ajcaldelas ajcaldelas force-pushed the platform_status_fix branch 7 times, most recently from 5b3cc64 to 20e8a2e Compare April 28, 2025 22:12
larrydewey
larrydewey previously approved these changes Apr 29, 2025
@tylerfanelli
Copy link
Member

How flexible is this? As I understand, Turin can use older attestation report versions. Is the same true with platform status?

@tylerfanelli
Copy link
Member

@larrydewey @tylerfanelli The Platform Status struct is outdated (missing fields). I don't know if you guys want to address it in this PR or fix it in a separate one.

A separate one is fine with me.

@larrydewey
Copy link
Contributor

How flexible is this? As I understand, Turin can use older attestation report versions. Is the same true with platform status?

Any underlying structure which has a TCB_VERSION will need to understand how to format properly for the various versions.

@DGonzalezVillal
Copy link
Member

@larrydewey @tylerfanelli The Platform Status struct is outdated (missing fields). I don't know if you guys want to address it in this PR or fix it in a separate one.

A separate one is fine with me.

We ended up throwing it in this one. This PR essentially fixed the TCB bug and updated the SnpPlatformStatus to have the missing data fields.

@DGonzalezVillal
Copy link
Member

@ajcaldelas If you could modify the commit message to be a little more descriptive of all the work we did, that would be appreciated.

Adding logic to parse bytes from kernel for different tcb versions
and updating the SnpPlatformStatus to include missing data fields

Signed-off-by: ajcaldelas <alan.caldelas@amd.com>
Copy link
Member

@tylerfanelli tylerfanelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@DGonzalezVillal DGonzalezVillal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DGonzalezVillal DGonzalezVillal merged commit 5bc0f68 into virtee:main Apr 30, 2025
123 checks passed
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.

5 participants