All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Marten Lindahl <martenli@axis.com>
Cc: "Mårten Lindahl" <Marten.Lindahl@axis.com>,
	"Peter Huewe" <peterhuewe@gmx.de>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>, kernel <kernel@axis.com>
Subject: Re: [PATCH] tpm: Add check for Failure mode for TPM2 modules
Date: Thu, 2 Jun 2022 14:15:25 +0300	[thread overview]
Message-ID: <YpibzQBKih7QRrei@kernel.org> (raw)
In-Reply-To: <faf0156e6f735b2d7d793fbf48ae4c6a108e8eb1.camel@kernel.org>

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@axis.com>
> > > > 
> > > > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> > > > 
> > > > 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

  reply	other threads:[~2022-06-02 11:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 10:25 [PATCH] tpm: Add check for Failure mode for TPM2 modules Mårten Lindahl
2022-04-25 14:03 ` Jarkko Sakkinen
2022-04-25 15:52   ` Marten Lindahl
2022-05-06 12:00     ` Stefan Mahnke-Hartmann
2022-05-09 13:47       ` Marten Lindahl
2022-05-30 15:26     ` Marten Lindahl
2022-06-01  2:05       ` Jarkko Sakkinen
2022-06-02 11:15         ` Jarkko Sakkinen [this message]
2022-06-20 14:59           ` Marten Lindahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YpibzQBKih7QRrei@kernel.org \
    --to=jarkko@kernel.org \
    --cc=Marten.Lindahl@axis.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel@axis.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=martenli@axis.com \
    --cc=peterhuewe@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.