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

Add dynamic image measurement #95

Merged
merged 2 commits into from
Jul 31, 2024
Merged

Add dynamic image measurement #95

merged 2 commits into from
Jul 31, 2024

Conversation

alistair23
Copy link
Collaborator

Add a command line argument for responders to enable dynamic image measurement. This allows us to more accuratly model a real respnoder.

At startup we spawn two threads to hash the "kernel" and the application. We currently join them before running the responder, we actually only need to do this before generating the measurement, but there isn't a nice way to do that from the libspdm Rust library. I thought of a closure callback, but it's all a bit messy so the current approach will do for now.

libspdm_fill_measurement_image_hash_block() will now dynamically use a type of image block based on the init status of the Lazy DYN_IMAGE_MEASURE.

@alistair23 alistair23 requested a review from twilfredo July 30, 2024 06:28
@alistair23
Copy link
Collaborator Author

I feel like this is overlay complicated, but it's hard to integrate it with the C libspdm callbacks and the Rust libspdm crate

@alistair23 alistair23 force-pushed the alistair/hash-operation branch from 13331c9 to ce3f597 Compare July 30, 2024 06:38
@alistair23
Copy link
Collaborator Author

#96 should be merged first to fix the CI first

Copy link
Collaborator

@twilfredo twilfredo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! left some suggestions

src/libspdm/spdm.rs Outdated Show resolved Hide resolved
src/libspdm/spdm.rs Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/libspdm/spdm.rs Outdated Show resolved Hide resolved
src/libspdm/spdm.rs Outdated Show resolved Hide resolved
src/libspdm/spdm.rs Show resolved Hide resolved
@alistair23 alistair23 force-pushed the alistair/hash-operation branch 2 times, most recently from b3b5028 to 6931c2c Compare July 31, 2024 00:01
Copy link
Collaborator

@twilfredo twilfredo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, left some comments

src/libspdm/spdm.rs Outdated Show resolved Hide resolved
src/libspdm/spdm.rs Outdated Show resolved Hide resolved
src/libspdm/spdm.rs Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
twilfredo and others added 2 commits July 31, 2024 10:41
Add a command line argument for responders to enable dynamic image
measurement. This allows us to more accuratly model a real respnoder.

At startup we spawn two threads to hash the "kernel" and the
application. We currently join them before running the responder, we
actually only need to do this before generating the measurement, but
there isn't a nice way to do that from the libspdm Rust library. I
thought of a closure callback, but it's all a bit messy so the current
approach will do for now.

`libspdm_fill_measurement_image_hash_block()` will now dynamically use a
type of image block based on the init status of the `Lazy`
`DYN_IMAGE_MEASURE`.

Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
…cate_to_nvm

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
@alistair23 alistair23 force-pushed the alistair/hash-operation branch from 6931c2c to 9bc31eb Compare July 31, 2024 00:42
@twilfredo twilfredo merged commit 946a62f into master Jul 31, 2024
2 checks passed
@twilfredo twilfredo deleted the alistair/hash-operation branch July 31, 2024 00:50
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.

2 participants