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

SPDM 1.3: Measurement Extension Log Support #86

Open
twilfredo opened this issue Jul 17, 2024 · 1 comment
Open

SPDM 1.3: Measurement Extension Log Support #86

twilfredo opened this issue Jul 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@twilfredo
Copy link
Collaborator

twilfredo commented Jul 17, 2024

As defined by SPDM 1.3 specification section 10.30.

A Responder device may create and maintain a Measurement Extension Log (MEL) to record device information such
as measurements of firmware and/or software modules loaded during the boot, firmware and/or software updates,
configurations, status of the system, and so on. To construct the MEL, when certain events occur, the Responder
appends data associated with the events to the end of the MEL. The events that cause the MEL update are specific to
and are determined by individual Responder implementations. For example, the Responder may append the digest
and version number of a firmware module to the end of the MEL when the firmware module is loaded. The MEL
grows as entries are added. At reset, the Responder may reset the MEL or preserve the MEL. If the Responder
preserves the MEL across resets, the reset events themselves may be added as new entries to the MEL. Accordingly,
the corresponding HEM should also be preserved across resets. The Responder should ensure that the MEL will not
overrun memory or wrap under normal uses.

Do we want to support this in SPDM-Utils? libspdm has LIBSPDM_ENABLE_CAPABILITY_MEL_CAP support, which means we should be able to add this to spdm-utils by implementing:

#if LIBSPDM_ENABLE_CAPABILITY_MEL_CAP
/**
 * Process the SPDM GET_MEASUREMENT_EXTENSION_LOG request and return the response.
 *
 * @param  spdm_context                  A pointer to the SPDM context.
 * @param  request_size                  size in bytes of the request data.
 * @param  request                      A pointer to the request data.
 * @param  response_size                 size in bytes of the response data.
 *                                     On input, it means the size in bytes of response data buffer.
 *                                     On output, it means the size in bytes of copied response data buffer if RETURN_SUCCESS is returned,
 *                                     and means the size in bytes of desired response data buffer if RETURN_BUFFER_TOO_SMALL is returned.
 * @param  response                     A pointer to the response data.
 **/
libspdm_return_t libspdm_get_response_measurement_extension_log(libspdm_context_t *spdm_context,
                                                                size_t request_size,
                                                                const void *request,
                                                                size_t *response_size,
                                                                void *response);
#endif /* LIBSPDM_ENABLE_CAPABILITY_MEL_CAP */

As specified here

@twilfredo twilfredo changed the title LIBSPDM_ENABLE_CAPABILITY_MEL_CAP Support SPDM 1.3: Measurement Extension Log Support Jul 17, 2024
@twilfredo twilfredo added the enhancement New feature or request label Jul 17, 2024
@alistair23
Copy link
Collaborator

I think this is worth looking into

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants