On Wed, Jun 01, 2022 at 05:05:08AM +0300, Jarkko Sakkinen wrote: > On Mon, 2022-05-30 at 17:26 +0200, Marten Lindahl wrote: > > On Mon, Apr 25, 2022 at 05:52:04PM +0200, Mårten Lindahl wrote: > > > On Mon, Apr 25, 2022 at 04:03:33PM +0200, Jarkko Sakkinen wrote: > > > > On Mon, 2022-04-25 at 12:25 +0200, Mårten Lindahl wrote: > > > > > 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. > > > > > > > > > > Signed-off-by: Mårten Lindahl <marten.lindahl@xxxxxxxx> > > > > > > > > Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx> > > > > > > > > I think this should actually have the fixes tag. It's a regression, > > > > right? I can add it. > > > > Hi Jarkko! > > > > Just curious. I can't see this patch was added to linux-next. Was I > > expected to do something more to it? > > No it's just me failing to do my job properly. I'll pick this and > make a 2nd pull request v5.19. Apologies. I revisited the patch, and it does not look right to me. If tpm2_get_cc_attrs_tbl() fails, there's no way to deduce from that "fact" that the TPM response was TPM_RC_FAILURE. BR, Jarkko