lkml.org 
[lkml]   [2022]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [REGRESSION] suspend to ram fails in 6.2-rc1 due to tpm errors
On Thu, Dec 29, 2022 at 05:03:44AM +0100, Jason A. Donenfeld wrote:
> I recall seeing something pretty similar to this report with the
> selftest as well. Basically, the call to tpm1_do_selftest can race with
> the call to tpm1_get_random, presumably because tpm1_get_random doesn't
> do any locking on its own. So it might be a good idea to make sure that
> tpm1_get_random() isn't running before tpm1_do_selftest() or any other
> TPM commands run.

The other locking angle is that tpm1_pm_suspend() should wait for
tpm1_get_random() to finish or cancel tpm1_get_random(), if that's not
already happening. IIRC, the selftest gets tripped up when it's
triggered on resume due to an already in-flight tpm1_get_random() from
prior to sleep, that never completed.

\
 
 \ /
  Last update: 2023-03-26 23:22    [W:0.176 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site