Re: TPM selftest failure in 4.15

Ken Goldman
2018-02-08T17:27:06Z

On 2/1/2018 12:40 PM, Jason Gunthorpe wrote:

>
> But if a selftest returns TPM2_RC_TESTING I would expect the next
> command to also fail with a testing in progress code? At least by the
> spec..

It will return that code if the command requires an untested function.
For FIPS, the code is returned if there is any untested function.

Commands that don't require testable functions will succeed.

> The point of invoking selftest is to get to a state where future TPM
> commands will succeed, so returning immediately on RC_TESTING seems
> wrong?

Blocking vs. non-blocking is a TPM vendor implementation option.

Re., "seems wrong", the PC Client TPM changed the requirement, so that
a guaranteed non-blocking option is available.

~~
2. On receipt of TPM2_SelfTest(fullTest == YES), the TPM SHALL perform a
full self-test and return the result when all tests are complete.
~~

Of course, at some layer, the device drive is still polling, either for
a success code (non-blocking) or a response (blocking).