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

Initial draft for message logging #1164

Merged
merged 9 commits into from
Sep 1, 2022

Conversation

steven-bellock
Copy link
Contributor

This commit is to solicit feedback on the API (spdm_requester_lib.h) and backend design. Currently only supports

  • GET_MEASUREMENTS / MEASUREMENTS
  • Non-wrapping writes that don't clamp.

I am not sure how this will be tested.

Signed-off-by: Steven Bellock [email protected]

This commit is to solicit feedback on the API (spdm_requester_lib.h) and backend design. Currently only supports
* GET_MEASUREMENTS / MEASUREMENTS
* Non-wrapping writes that don't clamp.

I am not sure how this will be tested.

Signed-off-by: Steven Bellock <[email protected]>
@steven-bellock
Copy link
Contributor Author

@PrithviAPai @vbodired Please review the API in spdm_requester_lib.h.

@jyao1
Copy link
Member

jyao1 commented Aug 26, 2022

I am not sure how this will be tested.

My recommendation is to add unit_test. Just use get_measurement.
The test case can pre-calculate the expected L1L2 and compare the returned L1L2.

* Change msg_log.buffer_size to msg_log.max_buffer_size.
* Change msg_log.offset to msg_log.buffer_size.
* Implement new function libspdm_append_msg_log

Signed-off-by: Steven Bellock <[email protected]>
Signed-off-by: Steven Bellock <[email protected]>
@steven-bellock
Copy link
Contributor Author

Need to add VCA support as well.

And add message logging to VCA to support 1.2 measurement log.

Signed-off-by: Steven Bellock <[email protected]>
Signed-off-by: Steven Bellock <[email protected]>
And disable message logging at end of test case.

Signed-off-by: Steven Bellock <[email protected]>
And change LIBSPDM_MSG_LOG_STATUS_CLAMP to LIBSPDM_MSG_LOG_STATUS_BUFFER_FULL.

Signed-off-by: Steven Bellock <[email protected]>
@steven-bellock steven-bellock marked this pull request as ready for review August 31, 2022 15:41
@steven-bellock
Copy link
Contributor Author

steven-bellock commented Aug 31, 2022

@jyao1 @taprinz I've marked this ready for review. I decided to leave off the wrapping behavior until someone requests it, so right now when the buffer is full then it will stop writing to it. It currently only logs VCA and GET_MEASUREMENTS but that can be expanded. I'll have a follow-up pull request that includes more tests.

@jyao1 jyao1 merged commit ce16edb into DMTF:main Sep 1, 2022
@jyao1
Copy link
Member

jyao1 commented Sep 12, 2022

Ref: #1049
Ref: #929

@steven-bellock steven-bellock deleted the measurement_logging branch October 3, 2022 16:14
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.

3 participants