Repository navigation
Conversation
|
@chrisccoulson @valentindavid, would either of you be able to review this when you have a chance? |
71236d4 to
ef00edc
Compare
|
Hi @ebrig , thank you for this PR. Could you please send the BIOS measurement of your platform ( Could you please also agree on the Canonical contributor licence agreement? |
|
I implemented this PR on my AMD Thinkpad x13 g3. Works well. |
|
@ebrig could you continue this PR? Or would it be ok if I took over via a new PR? |
|
Thanks, @frederic-hoerni. I’ve signed the Canonical contributor licence agreement. Attached is a gzip-compressed copy of the requested raw SHA-256 of the uncompressed log:
@ironhalik, thank you for testing this on the AMD ThinkPad X13 Gen 3. Yes, I’m continuing this PR, so there’s no need to open a replacement PR. The PR is ready for continued review. Please let me know if any additional logs, tests, or changes would help. |
|
@ebrig looks better than my change. Works well on my hardware (Thinkpad P14s Gen 6 AMD) |
|
@frederic-hoerni @ebrig the vendor PCR2 event after separator is a |
|
@ebrig, could you please rebase your branch on top of |
|
I feel like those should be detected not from reading the event log, but from the preinstall checks in Also do we know how the measurement of TSME configuration looks like? It would be better to verify the value in the checks, and generate the expected value from the policy generation. |
ef00edc to
1cb4ec8
Compare
|
Addressed. The preinstall checks now derive the TSME state and HP DMA measurement configuration from sysfs, validate the corresponding event data and digests, and use those independently detected values for profile generation. Linux does not currently expose the HSTI bit that indicates whether TSME measurement is supported, so the TSME event is validated when present, but its presence cannot be required. I also verified on the affected hardware that the generated PCR2 and PCR7 values match the live TPM. |
Validate AMD TSME event data and HP pre-boot DMA configuration events, and derive their profile extensions from explicit platform configuration rather than copying event-log digests.
Detect TSME and HP DMA measurement configuration from sysfs, require the HP event when configured, validate event payloads and digests, and carry the independently detected values into automatic PCR profile generation.
1cb4ec8 to
a435b8f
Compare
|
@valentindavid I’ve rebased this on current master and updated the implementation in response to your September 15 feedback. Would you be able to take another look when you have a chance? |
Summary
Some AMD firmware measures TSME configuration during pre-OS boot, including after the PCR2
EV_SEPARATORor in PCR7. With the relevant HP BIOS settings enabled, firmware also measures the SVM and pre-boot DMA protection configuration in PCR7. Without these measurements, generated EFI PCR profiles can diverge from the TPM values and prevent a resealed key from unlocking normally.This change:
hp-bioscfg, rather than taking the expected values from the event log;The Linux
ccpdriver does not expose the HSTI bit indicating whether TSME measurement is supported. The TSME event is therefore validated when present, but its presence cannot be required from the available platform information.Hardware validation
Tested on an HP ZBook Ultra G1a 14 inch Mobile Workstation PC with BIOS X89 01.05.07 (2026-05-05), using:
After resealing with the patched package, TPM-passphrase unlock succeeded across a reboot. After the September 15 changes, generated PCR2 and PCR7 values were checked against the live TPM on the affected hardware.
Tests on rebased branch
GOTOOLCHAIN=go1.23.12 ./run-tests --no-expensive-cryptsetup-tests(WSL; passed; TPM simulator tests were not enabled and expensive cryptsetup tests were disabled)GOTOOLCHAIN=go1.23.12 go test -count=1 ./efi ./efi/preinstall ./internal/efi(WSL)GOTOOLCHAIN=go1.23.12 go build ./...(WSL)GOTOOLCHAIN=go1.23.12 go vet ./efi ./efi/preinstall ./internal/efi(WSL)