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

Update the SNP predicted measurement tool #4803

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

conradgrobler
Copy link
Collaborator

@conradgrobler conradgrobler commented Feb 14, 2024

The SNP measurement prediction tool is outdated, since we no-longer preload the kernel into memory before boot. We also have more unmeasured pages configured and need to support additional vCPUs at startup.

With these updates the tool once again predicts that correct measurement in the AMD SEV-SNP attestation report.

Exmaple hex representation of an attestation report running with 2 vCPUs on AMD SEV-SNP:

02000000000000000000030000000000000000000000000000000000000000000000000000000000
0000000000000000000000000100000003000000000014d101000000000000000000000000000000
271f735e9368e74f04c92b3bdab5b468ae1405b2b8ad89c11cf8335378142fba0000000000000000
0000000000000000000000000000000000000000000000005f150e289cc75c525939c89ed242131b
7be08be075a7e658efe39542ca0c12005766e90b133da18d1a1d517253f691a80000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
de7d8afa69717ab323fc7bb32fae625ed6804daf37138246936d8c03c53be229ffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffff03000000000014d10000000000000000
00000000000000000000000000000000bc4e89307cec07b7ce106a2d0a09bf8c3283d068461dafa5
02be0fc0b72efdbb7fad1078f59d3f2ed7c3f09189472701509acd1a5d91c9156212d1c65851bcfa
03000000000014d1103701001037010003000000000014d100000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000049dafb5d387f71be
0c2e7869309cd3e85a58cc6c6c49eaf05857509c9ac0605d7eb25bc3c41901a1b61d0c720e7abd68
000000000000000000000000000000000000000000000000524cb73e9d9ba975bbb43124cea3dd88
57936d70f50602e3671dd6f7424906bd3bd515627d27325096a9760132b0d6310000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000

The measurement starts with the first non-zero bytes on line 4.

Example output from running cargo run --package=snp_measurement -- --vcpu-count=2 with the same Stage 0 binary:

Attestation Measurement: 5f150e289cc75c525939c89ed242131b7be08be075a7e658efe39542ca0c12005766e90b133da18d1a1d517253f691a8

@conradgrobler conradgrobler merged commit 4734201 into project-oak:main Feb 20, 2024
17 checks passed
@conradgrobler conradgrobler deleted the stage0-predict branch February 20, 2024 13:19
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