New issue
Advanced search Search tips

Issue 777686 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 801767

Blocking:
issue 801748


Participants' hotlists:
TPM-Userland-Performance
Cros-Hwsec-Ready


Sign in to add a comment

attestation/tpm2 performance: don't check tpm readiness for attestation preparedness

Project Member Reported by apronin@chromium.org, Oct 24 2017

Issue description

The first thing IsPreparedForAttestation currently does is checking if tpm is ready. Only then it checks the attestation database status. That optimization leads to the opposite effects - checking the tpm status leads to a trip to tpm_managerd, which can bock there waiting for a long tpm operation.
1) Avoid, if possible, checking the tpm readiness status in IsPreparedForAttestation - rely on the database state. [Needs to be confirmed that it will not lead to wrong results in corner cases.]
2) Cache, if possible, the tpm readiness status and request only when change is possible (see also issue 777679).
 
There is a WIP CL for this issue: https://crrev.com/c/731858
Blockedon: 801767
Components: OS>Systems>Security
Owner: ----
Status: Available (was: Assigned)
Labels: TPM-Userland-Performance Cros-Hwsec-Ready
Owner: zuan@chromium.org
Status: Assigned (was: Available)
I'll give it a try.
Blocking: 801748
Description: Show this description
Status: Started (was: Assigned)
cl uploaded at crrev/c/1352015
Just a note, I've considered about changing the behavior of AttestationService::GetStatusTask() (which calls IsPreparedForEnrollment()) so that the prepared_for_enrollment variable of that API remains the same to the outside. However, I did not do so, because I've searched around for users of our APIs, and the existing ones aren't affected by this change.

Sign in to add a comment