Mårten Lindahl 863ed94c58 tpm: Add check for Failure mode for TPM2 modules
In commit 0aa698787aa2 ("tpm: Add Upgrade/Reduced mode support for
TPM2 modules") it was said that:

"If the TPM is in Failure mode, it will successfully respond to both
tpm2_do_selftest() and tpm2_startup() calls. Although, will fail to
answer to tpm2_get_cc_attrs_tbl(). Use this fact to conclude that TPM
is in Failure mode."

But a check was never added in the commit when calling
tpm2_get_cc_attrs_tbl() to conclude that the TPM is in Failure mode.
This commit corrects this by adding a check.

Fixes: 0aa698787aa2 ("tpm: Add Upgrade/Reduced mode support for TPM2 modules")
Cc: stable@vger.kernel.org # v5.17+
Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2022-08-03 23:56:20 +03:00
..
2022-08-02 08:10:10 -07:00
2022-08-02 13:46:35 -07:00
2022-07-29 19:58:52 +02:00
2022-06-28 06:33:15 -06:00
2022-08-02 19:34:45 -07:00
2022-08-02 11:07:04 -07:00
2022-08-02 08:10:10 -07:00
2022-08-02 13:46:35 -07:00
2022-07-17 07:52:46 -07:00
2022-08-02 08:29:18 -07:00
2022-06-02 15:23:54 -07:00
2022-08-02 14:38:59 -07:00
2022-06-28 06:33:15 -06:00
2022-08-02 11:12:25 -07:00
2022-08-03 10:35:43 -07:00
2022-08-02 19:34:45 -07:00
2022-08-02 13:46:35 -07:00
2022-08-02 13:46:35 -07:00
2022-08-02 13:46:35 -07:00
2022-06-02 15:23:54 -07:00
2022-07-29 19:58:52 +02:00
2022-07-29 13:41:18 +02:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-08-02 13:46:35 -07:00
2022-08-02 13:46:35 -07:00
2022-06-03 11:48:47 -07:00
2022-08-02 08:10:10 -07:00
2022-08-02 10:55:04 -07:00
2022-05-11 08:29:11 +03:00
2022-08-02 13:46:35 -07:00
2022-08-02 08:10:10 -07:00
2022-08-02 13:46:35 -07:00
2022-07-29 19:58:52 +02:00
2022-08-02 19:34:45 -07:00
2022-08-03 10:35:43 -07:00
2022-06-05 09:25:12 -07:00
2022-06-05 09:25:12 -07:00