-
Notifications
You must be signed in to change notification settings - Fork 792
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
[manuf] Finalize {Creator,Owner}SwCfg at end of perso flow #24783
[manuf] Finalize {Creator,Owner}SwCfg at end of perso flow #24783
Conversation
This calculates the measurement of the OTP partitions in `ft_personalize` and pass them to `dice_uds_tbs_cert_build()`. This change is necessary because the CreatorSwCfg and OwnerSwCfg might not be fully provisioned to the OTP when building the UDS certification. By calculating the final measurements in `ft_personalize`, we can get the values of unprovisioned field from the OTP image to ensure the correct values are used in the certificate generation process. Signed-off-by: Anthony Chen <[email protected]>
b5f7fa4
to
96cff1c
Compare
96cff1c
to
7f994b6
Compare
This modifies the perso flow to complete the provisioning of the CreatorSwCfg and OwnerSwCfg OTP partitions at the end of the process. This ensures that the perso firmware can be reentrant in case of unexpected resets during personalization. Previously, these partitions were provisioned earlier in the flow. However, since we are going to bind the perso firmware with `CREATOR_SW_CFG_MANUF_STATE`, we need to ensure that this field is provisioned as late as possible. Since CreatorSwCfg and OwnerSwCfg partitions are now not fully provisioned in the OTP during the UDS certificate generation process, overwrite the fields that are not provisioned until the end of personalization process with the values from the OTP image. At the end of perso flow, compare the OTP measurement used during certificate generation with the digest stored in the OTP. Ensure that the UDS certificate was generated using the correct OTP values. Signed-off-by: Anthony Chen <[email protected]>
7f994b6
to
1404534
Compare
The failed test runs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @anthonychen1251 , LGTM!
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin earlgrey_1.0.0
git worktree add -d .worktree/backport-24783-to-earlgrey_1.0.0 origin/earlgrey_1.0.0
cd .worktree/backport-24783-to-earlgrey_1.0.0
git switch --create backport-24783-to-earlgrey_1.0.0
git cherry-pick -x dbd0a4a1a8cadb88d6800552b4908e27409030e3 1404534e9ca1949acc6bd443c824af22f40377f2 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin earlgrey_1.0.0
git worktree add -d .worktree/backport-24783-to-earlgrey_1.0.0 origin/earlgrey_1.0.0
cd .worktree/backport-24783-to-earlgrey_1.0.0
git switch --create backport-24783-to-earlgrey_1.0.0
git cherry-pick -x dbd0a4a1a8cadb88d6800552b4908e27409030e3 1404534e9ca1949acc6bd443c824af22f40377f2 |
Successfully created backport PR for |
This PR has two commits that:
Move the calculation of OTP measurement from
dice_uds_tbs_cert_build
toft_personalize
Modify the perso flow to complete the provisioning of the
CreatorSwCfg
andOwnerSwCfg
OTP partitions at the end of the process.This PR addresses #24610 partially.