And, if it is a problem, isn't the proper solution to push tpm init earlier - which, in the replay case, seems to automatically solve any issues because any further measurement is done at the time the stage is loaded?

Pushing TPM init into the bootblock causes practical issues on many platforms with bootblock size restrictions, and the benefit is questionable. We'd still have to measure the bootblock itself retroactively after all, so I don't think doing the same for the verstage really makes a big difference. Like you mentioned this is what the existing solution already does too, so I don't think anyone really has a concern with that (the concern rather seems to be between verstage and ramstage, but as mentioned when CONFIG_VBOOT is on we still start extending hashes in verstage with this patch). There's also always CONFIG_SEPARATE_VERSTAGE=n to close this gap if desired.

Since it already seems to be hard enough to get consensus on this patch as is, I'd like to keep the discussions focused on what this patch does vs. the previous implementation (hopefully we can come to agree that it doesn't reduce any security guarantees, and merge it). Let's leave concerns that the currently implementation doesn't solve either for another time.

View Change

To view, visit change 35077. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1fb376b4a8b98baffaee4d574937797bba1f8aee
Gerrit-Change-Number: 35077
Gerrit-PatchSet: 70
Gerrit-Owner: Bill XIE <persmule@hardenedlinux.org>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Bill XIE <persmule@hardenedlinux.org>
Gerrit-Reviewer: David Guckian <david.guckian@intel.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks@eltan.com>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Gerrit-Reviewer: Vanessa Eusebio <vanessa.f.eusebio@intel.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh@siemens.com>
Gerrit-Reviewer: Wim Vervoorn <wvervoorn@eltan.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Joel Kitching <kitching@google.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-CC: Shawn C <citypw@hardenedlinux.org>
Gerrit-Comment-Date: Wed, 25 Mar 2020 22:18:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment