diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-26 10:49:48 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-09-03 03:49:39 +0000 |
| commit | 726f096f905c8e2ad2ac0035355fc2b4ed2718fe (patch) | |
| tree | 5d2104db9b9183065eda18c1f122b118dedd86ba /source/Target/ThreadPlanPython.cpp | |
| parent | d5aa8022da56c5188e9f2c7068d95009ff2019be (diff) | |
tpm20: Validate suspend and resume commands
The internal TPM2_Shutdown and TPM2_Startup paths ignored both transport
failures and the TPM response. Suspend could therefore enter S3 without
saved TPM state, while resume could restart entropy harvesting after a
failed state restoration.
Build both commands through one helper, validate their response framing
and TPM return codes, and propagate failures. Retry the standard RETRY
and TESTING responses with bounded exponential backoff. Accept
TPM_RC_INITIALIZE from Startup because firmware may already have started
the TPM during resume.
Do not enter S3 after an unsuccessful state save, and do not restart the
entropy task when TPM state restoration failed. If Shutdown fails after
the entropy task was drained, requeue it before returning so an aborted
suspend does not permanently stop harvesting.
Reviewed by: kevans
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59195
Diffstat (limited to 'source/Target/ThreadPlanPython.cpp')
0 files changed, 0 insertions, 0 deletions
