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

Handle variable report_data index sizes #62

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

mkulke
Copy link
Member

@mkulke mkulke commented Oct 25, 2024

Handle variable report_data index sizes

fixes #61

A caller of get_report_with_report_data() might provide report_data of varying sizes. We need to verify the size of the allocated nv index that holds the report data and recreate it if necessary.

How to use

Should introduce no breaking change, run the integration test on CVM hardware to confirm. Can be built locally and then copied over:

cargo test --all --features integration_test --no-run
...
scp target/debug/deps/integration_tests-... azureuser@...:
ssh azureuser@...
sudo ./integration_tests-... --test-threads 1

Testing done

Integration tests have been added to test this on CVM hardware.

@mkulke mkulke requested a review from jepio October 25, 2024 15:45
@mkulke mkulke force-pushed the mkulke/handle-varying-report_data-len branch 3 times, most recently from cede6b9 to e5adc5b Compare October 25, 2024 15:59
jepio
jepio previously approved these changes Nov 18, 2024
az-cvm-vtpm/src/vtpm/mod.rs Outdated Show resolved Hide resolved
fixes kinvolk#61

A caller of `get_report_with_report_data()` might provide report_data of
varying sizes. We need to verify the size of the allocated nv index that
holds the report data and recreate it if necessary.

Integration tests have been added to test this on CVM hardware.

Signed-off-by: Magnus Kulke <[email protected]>
@mkulke mkulke force-pushed the mkulke/handle-varying-report_data-len branch from e5adc5b to 0f528c4 Compare November 18, 2024 12:18
@mkulke mkulke requested a review from jepio November 18, 2024 12:19
@mkulke mkulke merged commit 2bef60b into kinvolk:main Nov 18, 2024
1 check passed
@mkulke mkulke deleted the mkulke/handle-varying-report_data-len branch November 18, 2024 12:54
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.

write_nv_index size issue
2 participants