From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: question about setting TPM_CHIP_FLAG_IRQ in tpm_tis_core_init
Date: Thu, 14 Nov 2019 18:48:41 +0200 [thread overview]
Message-ID: <20191114164841.GD9528@linux.intel.com> (raw)
In-Reply-To: <50290fc8-4d22-3eb5-c930-079f8b819a8e@linux.ibm.com>
On Tue, Nov 12, 2019 at 03:30:51PM -0500, Stefan Berger wrote:
> On 11/12/19 3:17 PM, Jerry Snitselaar wrote:
> > On Tue Nov 12 19, Jarkko Sakkinen wrote:
> > > On Mon, Nov 11, 2019 at 08:36:37PM -0700, Jerry Snitselaar wrote:
> > > > Question about 1ea32c83c699 ("tpm_tis_core: Set TPM_CHIP_FLAG_IRQ
> > > > before probing for interrupts"). Doesn't tpm_tis_send set this flag,
> > > > and setting it here in tpm_tis_core_init short circuits what
> > > > tpm_tis_send was doing before? There is a bug report of an interrupt
> > > > storm from a tpm on a t490s laptop with the Fedora 31 kernel (5.3),
> > > > and I'm wondering if this change could cause that. Before they got the
> > > > warning about interrupts not working, and using polling instead.
> > >
> > > Looks like it. Stefan?
> > >
> > > /Jarkko
> > >
> >
> > Stefan is right about the condition check at the beginning of
> > tpm_tis_send.
> >
> > if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || priv->irq_tested)
> > return tpm_tis_send_main(chip, buf, len);
> >
> > Before his change it would've gone straight to calling
> > tpm_tis_send_main instead of jumping down and doing the irq test, due
> > to the flag not being set. With his change it should now skip this
> > tpm_tis_send_main call when tpm_tis_gen_interrupt is called, and then
> > after that time through tpm_tis_send priv->irq_tested will be set, and
> > the flag should be set as to whether or not irqs were working.
> >
> > I should hopefully have access to a t490s in a few days so I can look at
> > it,
> > and try to figure out what is happening.
> >
> I hope the t490s is an outlier. Give the patch I just posted a try.
First I must be first that it is the best way to fix the bug. Also,
it did not have fixes tag.
/Jarkko
prev parent reply other threads:[~2019-11-14 16:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 3:36 question about setting TPM_CHIP_FLAG_IRQ in tpm_tis_core_init Jerry Snitselaar
2019-11-12 13:28 ` Stefan Berger
2019-11-12 14:24 ` Jerry Snitselaar
2019-11-12 15:35 ` Stefan Berger
2019-11-12 20:17 ` Jarkko Sakkinen
2019-11-15 19:14 ` Jerry Snitselaar
2019-11-12 20:07 ` Jarkko Sakkinen
2019-11-12 20:17 ` Jerry Snitselaar
2019-11-12 20:30 ` Stefan Berger
2019-11-14 16:48 ` Jarkko Sakkinen [this message]
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=20191114164841.GD9528@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stefanb@linux.ibm.com \
/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.