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

Libcaliptra fixes for checksum on uninitialized buffers and missing DPE structs #1620

Merged

Conversation

nquarton
Copy link
Contributor

No description provided.

@nquarton nquarton changed the title Adding missing libcalitpra dpe command structs Adding missing libcaliptra dpe command structs Jul 25, 2024
@nquarton nquarton force-pushed the libcaliptra_dpe_cmd_resp_unions_fix branch 3 times, most recently from f110b2a to 80d4eaf Compare July 26, 2024 00:03
@nquarton nquarton force-pushed the libcaliptra_dpe_cmd_resp_unions_fix branch from 80d4eaf to 799bdbd Compare July 26, 2024 18:20
@nquarton nquarton marked this pull request as ready for review July 26, 2024 18:44
jhand2
jhand2 previously approved these changes Jul 26, 2024
jlmahowa-amd
jlmahowa-amd previously approved these changes Jul 26, 2024
@nquarton nquarton marked this pull request as draft July 26, 2024 23:34
@nquarton
Copy link
Contributor Author

Changing back to draft since I have a related issue I am looking into

@nquarton nquarton dismissed stale reviews from jlmahowa-amd and jhand2 via fecc0f3 July 27, 2024 00:02
@nquarton nquarton force-pushed the libcaliptra_dpe_cmd_resp_unions_fix branch 2 times, most recently from fecc0f3 to 848976e Compare July 29, 2024 22:15
@nquarton nquarton changed the title Adding missing libcaliptra dpe command structs Libcaliptra fixes for checksum on uninitialized buffers and missing DPE structs Jul 29, 2024
@nquarton
Copy link
Contributor Author

This updates and adds a few DPE structs as well as fixes 2 bugs exposed by uninitialized command and response buffers:

  1. The checksum field in the command request may be populated before calculating the checksum. This would get overwritten, but the new checksum value would be incorrect. This is resolved by simply setting the checksum field to 0 before calculating.
  2. The response checksum was calculated over the whole response buffer instead of just the received data. Garbage in the untouched part of the buffer would change the checksum. The actual number of bytes read is recorded and propagated to the checksum calculation now.

@nquarton nquarton force-pushed the libcaliptra_dpe_cmd_resp_unions_fix branch from dd9b124 to 852ff19 Compare August 1, 2024 15:09
@nquarton nquarton marked this pull request as ready for review August 1, 2024 15:30
jlmahowa-amd
jlmahowa-amd previously approved these changes Aug 2, 2024
@nquarton nquarton force-pushed the libcaliptra_dpe_cmd_resp_unions_fix branch from 852ff19 to a6ca5be Compare August 23, 2024 18:50
jhand2
jhand2 previously approved these changes Aug 23, 2024
- Fixes to checksum calculations for uninitialized cmd and resp buffers
- Adding missing dpe command structs
@jhand2 jhand2 force-pushed the libcaliptra_dpe_cmd_resp_unions_fix branch from b7d65ed to 8bcce59 Compare August 23, 2024 23:12
@jhand2 jhand2 enabled auto-merge (rebase) August 23, 2024 23:12
@jhand2 jhand2 merged commit ef83a0d into chipsalliance:main Aug 26, 2024
10 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.

4 participants