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

content_changed implementation #2816

Open
rw8896 opened this issue Aug 21, 2024 · 5 comments
Open

content_changed implementation #2816

rw8896 opened this issue Aug 21, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@rw8896
Copy link
Contributor

rw8896 commented Aug 21, 2024

uint8_t *content_changed,

Hi,

I have a question about content_changed implementation.
The integrator will need the knowledge about measurement logs in current L2 contents as a basis to check if there is any measurement changed. But the function didn't seem to be able to provide such information.
Is there a design/mechanism for integrators to acquire the information from libspdm?

@steven-bellock
Copy link
Contributor

The Integrator needs to monitor request_attribute and the SignatureRequested bit, since content_change can only be asserted when a signature is requested. So it keeps track of measurements when SignatureRequested is not set, and does a comparison when SignatureRequested is set.

@steven-bellock steven-bellock added the question Further information is requested label Aug 21, 2024
@rw8896
Copy link
Contributor Author

rw8896 commented Aug 21, 2024

Thanks and I think that works for normal scenario. But as "Any communication between Requester and Responder other than a GET_MEASUREMENTS request or response re-initializes L1/L2 computation to null .", the integrator seems not able to know if L1/L2 has been re-inited?

@steven-bellock
Copy link
Contributor

Yes, that looks like it's an issue. The state of the l1/l2 transcript is stored in the spdm_context but it is currently not public. We would need to provide a public function to query the transcript state. @jyao1 does that sound good?

@steven-bellock steven-bellock added bug Something isn't working and removed question Further information is requested labels Aug 21, 2024
@rw8896
Copy link
Contributor Author

rw8896 commented Aug 22, 2024

I feel a callback function to notify L1/L2 was reset might be easier for integrators to track the measurement.
Maybe provide a callback function for transcript state change (similar to connection state callback)?

@steven-bellock steven-bellock self-assigned this Aug 26, 2024
@steven-bellock
Copy link
Contributor

I will draw up the two approaches and we can see which ones looks the best: callback versus querying the transcript from the spdm_context.

@steven-bellock steven-bellock added stable For upcoming stable release and removed stable For upcoming stable release labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants