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

Measure payload only when EXTENDMR is not set #618

Conversation

gaojiaqi7
Copy link
Member

Fixes #617

@gaojiaqi7 gaojiaqi7 force-pushed the 1103/measure_payload_conditionally branch from 38e73d5 to 7e9a3c5 Compare November 3, 2023 01:18
@@ -234,7 +234,7 @@ pub fn default_metadata_sections(payload_type: PayloadType) -> MetadataSections
memory_address: TD_SHIM_PAYLOAD_BASE as u64,
memory_data_size: TD_SHIM_PAYLOAD_SIZE as u64,
r#type: TDX_METADATA_SECTION_TYPE_PAYLOAD,
attributes: 0,
attributes: 3,
Copy link
Member

Choose a reason for hiding this comment

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

why need to change this?

When `MR.EXTEND` is set to `1`, payload section will be extended to
MRTD, otherwise it will be measured and extended to RTMR[1] by
td-shim.

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

The PR doesn't work for me. (Maybe I'm doing something wrong?)

Please see #617 (comment)

Payload should not be measured by td-shim if the `EXTENDMR` is set
in metadata attribute.

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
@gaojiaqi7 gaojiaqi7 force-pushed the 1103/measure_payload_conditionally branch from 84505d4 to 5c71692 Compare November 6, 2023 15:01
Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

The latest changes work fine, thanks!

@jyao1 jyao1 merged commit 8623615 into confidential-containers:main Nov 8, 2023
17 checks passed
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.

ELF payload: what goes into MRTD and RTMRs?
3 participants