Re: [PATCH v18 3/6] tpm: Handle an exception for TPM Firmware Update mode.

From: Jarkko Sakkinen
Date: Tue Nov 02 2021 - 16:32:31 EST


On Tue, 2021-11-02 at 17:20 +0200, amirmizi6@xxxxxxxxx wrote:
> From: Amir Mizinski <amirmizi6@xxxxxxxxx>
>
> Add a condition to enable communication with the TPM while the TPM is in
> firmware update mode.
> In such a case if power was cut during the TPM firmware update, the driver
> should ignore the "selftest" command return code (TPM2_RC_UPGRADE or
> TPM2_RC_COMMAND_CODE) and skip the rest of the TPM initialization
> sequence.
>
> Suggested-by: Benoit Houyere <benoit.houyere@xxxxxx>
> Signed-off-by: Amir Mizinski <amirmizi6@xxxxxxxxx>

This is a half-baked handling of the FW upgrade mode.

There's another patch in progress that aims to do proper handling
for it:

https://lore.kernel.org/linux-integrity/20210930160241.9691-1-borysmn@xxxxxxxx/

I CC'd Borys for further comments/discussion.

/Jarkko