-
Notifications
You must be signed in to change notification settings - Fork 59
Platform Status Fix #302
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
Platform Status Fix #302
Conversation
9a01981 to
7b53420
Compare
src/firmware/linux/host/ioctl.rs
Outdated
|
|
||
| #[cfg(feature = "snp")] | ||
| use crate::firmware::host::SnpPlatformStatus; | ||
| use SnpPlatformStatus; |
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.
| use SnpPlatformStatus; | |
| use super::types::SnpPlatformStatus; |
I think that would be the path? Try referring to the full path of SnpPlatformStatus.
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.
Yeah, isn't this imported in line 6. Can probably remove this
7b53420 to
c869945
Compare
DGonzalezVillal
left a comment
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.
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.
src/firmware/linux/host/ioctl.rs
Outdated
|
|
||
| #[cfg(feature = "snp")] | ||
| use crate::firmware::host::SnpPlatformStatus; | ||
| use SnpPlatformStatus; |
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.
Yeah, isn't this imported in line 6. Can probably remove this
src/lib.rs
Outdated
| Turin, | ||
| } | ||
|
|
||
| #[cfg(all(not(test), feature = "snp"))] |
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.
What is the reason for not(test) being specified?
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 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
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.
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")]
5b3cc64 to
20e8a2e
Compare
|
How flexible is this? As I understand, Turin can use older attestation report versions. Is the same true with platform status? |
A separate one is fine with me. |
Any underlying structure which has a |
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. |
|
@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>
20e8a2e to
57b8184
Compare
tylerfanelli
left a comment
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.
LGTM, thanks!
DGonzalezVillal
left a comment
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.
LGTM
Adding logic to parse bytes from kernel for different tcb versions.