Skip to content

Conversation

@shahs-ais
Copy link
Contributor

These changes align with the tpm2 recipe versions used in meta-security, along with tpm2 script modifications corresponding to these new versions.

@shahs-ais
Copy link
Contributor Author

The changes in commit 8da6c75 are a copy-paste from meta-security (see commit message) while the others are my modifications

@dpsmith
Copy link
Member

dpsmith commented Jun 27, 2025

HUGE stop right there. A much bigger discussion must be had about reverting/downgrading to rsa from ecc.

@shahs-ais
Copy link
Contributor Author

HUGE stop right there. A much bigger discussion must be had about reverting/downgrading to rsa from ecc.

It was originally using RSA - I had updated it to ECC with my initial change as it improved the timing of taking TPM ownership, but Chris and I agreed offline that it would have to be revealuated later and I should revert it to RSA for now

Copy link
Contributor

@crogers1 crogers1 left a comment

Choose a reason for hiding this comment

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

Few comments from me. The other thing I'm interested in is if forward sealing worked with the library and API updates. Forward sealing is important because when upgrading the platform, we don't need to boot into an untrusted state to generate a new set of measurements.

seal-system -f


SUMMARY_initramfs-module-tpm2 = "initramfs support for tpm2"
RDEPENDS_initramfs-module-tpm2 = "${PN}-base initramfs-module-bootfs tpm2-tools-initrd"
RDEPENDS_initramfs-module-tpm2 = "${PN}-base initramfs-module-bootfs tpm2-tools tpm2-tss"
Copy link
Contributor

Choose a reason for hiding this comment

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

The only downside here is this brings in all the files in both tpm2-tools and tpm2-tss which greatly increases the size of initrd. The early initramfs only needs to be able to list the pcrs and extend pcr 15. I still think it's worthwhile to define tpm2-tools-initrd and only include the two binaries we need. If we have to eventually .bbappend the tpm2-tools recipe in the future if we incorporate meta-security, that costs virtually nothing.

Copy link
Member

Choose a reason for hiding this comment

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

i would recommend naming the package tpm2-tools-pcr, and later we can add any other pcr related utils in it that we might need.

@jandryuk
Copy link
Contributor

jandryuk commented Jun 27, 2025 via email

Copy link
Member

@dpsmith dpsmith left a comment

Choose a reason for hiding this comment

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

Don't add the bits just to drop them in the next commit. Just squash this commit with the first one and drop all the abrmd changes.

Copy link
Member

@dpsmith dpsmith left a comment

Choose a reason for hiding this comment

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

Please don't do delta commits, this commit is doing nothing but correcting changes you should have done in the prior commits, creating unnecessary churn in the history. Split this up and move the changes back to the respective commits where it belongs.

@shahs-ais shahs-ais force-pushed the shahs/UprevTpm2 branch 4 times, most recently from 33b8ff8 to 46eaf45 Compare July 24, 2025 18:47
Copy link
Member

@dpsmith dpsmith left a comment

Choose a reason for hiding this comment

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

Much better, if @crogers1 can confirm an independent build of this commit, then it should be ready to go in.

@shahs-ais
Copy link
Contributor Author

Much better, if @crogers1 can confirm an independent build of this commit, then it should be ready to go in.

Thanks, there is also a minor change in the installer I forgot to add you on (fixes one of the TPM commands to align with the new version) - adding you now. As for this PR, I would not merge it yet as I have been having some issues yesterday/today with tpm2_run not executing correctly after the minimal dependency change (tpm2-tss-pcr) causing measured launch to fail. I have an idea of what's going on and will likely push a change for this tomorrow.

@shahs-ais
Copy link
Contributor Author

PR is updated and should be good to go, once Chris does the final review.

@crogers1
Copy link
Contributor

crogers1 commented Aug 6, 2025

Custom build running here: https://openxt.ainfosec.com/buildbot/#/builders/22/builds/97

It includes the installer.git PR as well.

@dpsmith
Copy link
Member

dpsmith commented Aug 7, 2025

@shahs-ais, I merged the varstore wget PR, rebase this PR,then @crogers1 can kick off the builder to confirm a clean build.

Deleting old versions of tpm2 tools and tss and replacing with kirkstone implementation in meta-security (commit b9cf9cd639bc8d1b4828eb0bd012b71486d35176), unmodified in this commit
Using direct TPM access (device rather than abrmd TCTI) for now while investigating how to get abrmd working - this aligns with our previous implementation but would like to investigate getting abrmd to work to align with current meta-security impl more closely in the future
These changes align with the uprev to tpm2-tools v5.7 and tpm2-tss v3.2.3, including command line utilities updates and changes in output format of CLI calls - the underlying functionality remains unchanged from the previous version. initramfs recipe was updated to include new dependency with this uprev on tss2 libs.
New tpm2-tools version supports forward sealing, and is implemented here. Conforms to new output format (tpm2_policypcr uses a '=' separator, so convert the ':' used in seal-system). Accounts for systems that may have the extra 'Calling EFI Application from Boot Option' string extended into PCR bank 4.
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.

4 participants