Skip to content

policy(v2): make PolicyEvaluationInfo fields mandatory#503

Closed
gaojiaqi7 wants to merge 1 commit intointel:mainfrom
gaojiaqi7:1024/policy_evaluation_data
Closed

policy(v2): make PolicyEvaluationInfo fields mandatory#503
gaojiaqi7 wants to merge 1 commit intointel:mainfrom
gaojiaqi7:1024/policy_evaluation_data

Conversation

@gaojiaqi7
Copy link
Contributor

The policy may choose not to enforce checks on these fields.

Close #478

@gaojiaqi7 gaojiaqi7 requested a review from jyao1 as a code owner October 24, 2025 06:00
@gaojiaqi7 gaojiaqi7 marked this pull request as draft October 24, 2025 07:37
@jyao1
Copy link
Contributor

jyao1 commented Oct 30, 2025

still draft?

@gaojiaqi7 gaojiaqi7 force-pushed the 1024/policy_evaluation_data branch from cd38029 to d46e0d3 Compare November 6, 2025 09:43
@gaojiaqi7 gaojiaqi7 marked this pull request as ready for review November 6, 2025 09:44
@gaojiaqi7 gaojiaqi7 force-pushed the 1024/policy_evaluation_data branch 3 times, most recently from f2d7984 to 3a0b763 Compare November 7, 2025 02:09
Comment on lines 447 to 423
relative_reference: Option<u32>,
relative_reference: u32,
Copy link
Contributor

Choose a reason for hiding this comment

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

why change this?

.get_engine_svn_by_report(&report_value)
.and_then(|migtd_svn| policy.servtd_identity.get_tcb_level_by_svn(migtd_svn))
.cloned()
.unwrap_or_default()
Copy link
Contributor

Choose a reason for hiding this comment

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

why not return None?

Comment on lines 61 to 76
pub tcb_date: Option<String>,
pub tcb_date: String,

/// The status of the TCB
pub tcb_status: Option<String>,
pub tcb_status: String,

/// The TCB evaluation data number used to track TCB revocations and updates
pub tcb_evaluation_number: Option<u32>,
pub tcb_evaluation_number: u32,

/// The FMSPC of platform
pub fmspc: Option<[u8; 6]>,
pub fmspc: [u8; 6],

/// The status of the MigTD TCB
pub migtd_tcb_status: Option<String>,
pub migtd_tcb_status: String,

/// The date of the MigTD TCB in ISO-8601 format, e.g. "2023-06-19T00:00:00Z"
pub migtd_tcb_date: Option<String>,
pub migtd_tcb_date: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove Option?

@jyao1
Copy link
Contributor

jyao1 commented Nov 11, 2025

please also fix the conflict.

@gaojiaqi7 gaojiaqi7 force-pushed the 1024/policy_evaluation_data branch from 3a0b763 to bda87ac Compare November 12, 2025 14:32
A new() constructor is added to centralize validation logic.

Conditionally requires MigTD TCB information, allowing it to be absent only when the test_disable_tcb_mapping_check feature is enabled for testing.

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
@gaojiaqi7 gaojiaqi7 force-pushed the 1024/policy_evaluation_data branch from bda87ac to 94b24e0 Compare November 13, 2025 00:43
@gaojiaqi7 gaojiaqi7 closed this Nov 13, 2025
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.

[Policy V2] Lack of error handling for tcb_evaluation_number / fsmpc = None

2 participants