All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
	Jerry Snitselaar <jsnitsel@redhat.com>,
	Matthew Garrett <mjg59@google.com>,
	linux-integrity <linux-integrity@vger.kernel.org>,
	James Bottomley <James.Bottomley@hansenpartnership.com>
Subject: Re: Recent tpm_tis IRQ handling changes are causing kernel backtraces
Date: Mon, 31 May 2021 10:24:05 +0200	[thread overview]
Message-ID: <df7bcbfa-1706-1b8f-f32e-01c2d5e4ac7c@redhat.com> (raw)
In-Reply-To: <20210531043616.u3v25qzkkrik5apq@kernel.org>

Hi,

On 5/31/21 6:36 AM, Jarkko Sakkinen wrote:
> On Thu, May 27, 2021 at 05:27:49PM +0200, Hans de Goede wrote:
>> This is from:
>> https://retrace.fedoraproject.org/faf/reports/74723/  (public)
> 
> I wonder if this occurs only with O_NONBLOCK.
> 
> Any chances to get the output of
> 
>   sudo tools/testing/selftests/tpm2/test_smoke.sh
> 
> ?
> 
> It's obvious that there is some sort of bug, but it's not yet obvious that
> this bug is connected to the locality issue yet, as in this case locality
> is successfully reserved by tpm_try_get_ops() in tpm_dev_async_work()
> (driver/chars/tpm/tpm-dev-common.c).

As mentioned I've asked the user to try with tpm_tis.interrupts=0 and see
if that makes a difference. I got a reply that the user only hit this
once and that this is not (easily) reproducible :|

"looks like a spurious problem that may already be solved."

I did get permission to open up the bug (make it public) so if you want
more info it is probably easiest if you interact directly with the
reporter here:

https://bugzilla.redhat.com/show_bug.cgi?id=1964974

If you don't already have a bugzilla.redhat.com account, creating one
is super easy, you only need to enter your email address and pick a
password.


>> The second backtrace is from:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1964735  (private)
>> https://retrace.fedoraproject.org/faf/reports/38209/ (public)
> 
> This must have a successful tpm_try_get_ops() for ima_tpm_chip
> (map_tpm_chip == tpm_default_chip()).
> 
> Would also be interesting to see the status code, i.e. TPM_STS_0
> register value, but these are completely lacking the warning
> message, and the warning message apparently does not have the
> information printed.
> 
> I'll send a patch that updates the warning, and also retract
> of using WARN() given panic-on-warn is commonly set [*]. It's
> not right thing to do to torn down the machine because of invalid
> status code.
> 
> So, I'll fix that by instead:
> 
>   dev_err_once(&chip->dev, "invalid status: 0x%02x\n", status);
>   dump_stack();
> 
> Should be visible enough to get notified, and provides the important
> stack dump to quickly find possible impairment of tpm_try_get_ops(),
> and also contains the missing status code printout.

Sounds good, thanks.

>> Note there is public bugzilla, with dmesg with the same backtrace
>> (on the same laptop), but then with 5.12.5 here:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1963712
>>
>> There are also 2 interesting comments on the public bugzilla:
>>
>> "updated to linux kernel 5.12.5 performed 
>> sudo shutdown -r now"
>>
>> "I installed Fedora 34 UEFI from USB on a Dell XPS 13 Developer Edition"
>>
>> So it seems this is happening on the "Dell XPS 13 Developer
>> Edition".
>>
>> I've also checked the BIOS versions involved in the 2 different
>> bugs and 1964735 has "BIOS 1.2.5 12/10/2020" where as
>> 1963712 has "BIOS 2.2.0 04/06/2021" so this seems to be
>> independent of the BIOS version.
>>
>> ###
>>
>> Interestingly enough the first backtrace is also happening on a:
>> "Dell Inc. XPS 13 9310/0MRT12, BIOS 2.2.0 04/06/2021"
>>
>> So it seems that at least with 5.12.6 (which has the last 2 fixes)
>> all reports are about the XPS 13 9310. I wonder if there is an
>> issue with the TPM interrupt line on the XPS 13 9310; I've asked the
>> reporters to try adding tpm_tis.interrupts=0 to their kernel commandline.
> 
> This is helpful for sure that these all are happening on matching hardware.

Ack, I'm still waiting to hear back from reporters of the second
backtrace, wrt tpm_tis.interrupts=0.

I've marked a couple of reports of the second backtrace as duplicates of:
https://bugzilla.redhat.com/show_bug.cgi?id=1963712

So all reporters of this are now following this public bug, so if you want
to reach out to them with questions that is probably the easiest way.

Regards,

Hans


  parent reply	other threads:[~2021-05-31  8:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 13:09 Recent tpm_tis IRQ handling changes are causing kernel backtraces Hans de Goede
2021-03-16 15:34 ` Hans de Goede
2021-03-16 19:18   ` Jarkko Sakkinen
2021-05-08  9:07     ` Hans de Goede
2021-05-10 17:25       ` Jarkko Sakkinen
2021-05-11  8:37         ` Hans de Goede
2021-05-11 23:48           ` Jarkko Sakkinen
2021-05-26 19:03           ` Hans de Goede
2021-05-27 14:00             ` Jarkko Sakkinen
2021-05-27 15:27               ` Hans de Goede
     [not found]                 ` <20210531043616.u3v25qzkkrik5apq@kernel.org>
2021-05-31  8:24                   ` Hans de Goede [this message]
2021-06-01 18:02                     ` Jarkko Sakkinen
2021-06-01 16:04                   ` Hans de Goede
2021-06-01 18:03                     ` Jarkko Sakkinen
2021-06-14 13:33                     ` Hans de Goede
2021-06-15 13:01                       ` Jarkko Sakkinen
2021-06-15 13:59                         ` Hans de Goede
2021-06-23 13:37                           ` Jarkko Sakkinen
2021-06-21 12:04                       ` Hans de Goede
2021-06-23 13:40                         ` Jarkko Sakkinen
2021-06-23 13:54                           ` Hans de Goede
2021-06-29 18:04                             ` Recent tpm_tis IRQ handling changes are causing kernel backtraces] Jarkko Sakkinen
2021-06-29 19:14                               ` Hans de Goede
2021-06-29 22:05                                 ` Jarkko Sakkinen
2021-06-30 12:47                                   ` Hans de Goede
2021-06-30 13:36                                     ` Hans de Goede
2021-07-09 18:44                                       ` Jarkko Sakkinen
2021-07-17 16:10                                         ` Hans de Goede
2021-07-27  2:50                                           ` Jarkko Sakkinen

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=df7bcbfa-1706-1b8f-f32e-01c2d5e4ac7c@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=jarkko@kernel.org \
    --cc=jsnitsel@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=mjg59@google.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.