From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Jerry Snitselaar <jsnitsel@redhat.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-integrity@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
Peter Huewe <peterhuewe@gmx.de>
Subject: Re: [PATCH v2 0/5] tpm_tis: fix interrupts (again)
Date: Sun, 18 Oct 2020 08:34:18 +0300 [thread overview]
Message-ID: <20201018053418.GA4598@linux.intel.com> (raw)
In-Reply-To: <20201013012354.GB41176@linux.intel.com>
On Tue, Oct 13, 2020 at 04:23:54AM +0300, Jarkko Sakkinen wrote:
> On Sun, Oct 11, 2020 at 10:39:07PM -0700, Jerry Snitselaar wrote:
> >
> > James Bottomley @ 2020-10-01 11:09 MST:
> >
> > > The current state of the TIS TPM is that interrupts have been globally
> > > disabled by various changes. The problems we got reported the last
> > > time they were enabled was interrupt storms. With my own TIS TPM,
> > > I've found that this is caused because my TPM doesn't do legacy
> > > cycles, The TIS spec (chapter 6.1 "Locality Usage Per Register")
> > > requires any TIS TPM without legacy cycles not to act on any write to
> > > an interrupt register unless the locality is enabled. This means if
> > > an interrupt fires after we relinquish the locality, the TPM_EOI in
> > > the interrupt routine is ineffective meaning the same interrupt
> > > triggers over and over again. This problem also means we can have
> > > trouble setting up interrupts on TIS TPMs because the current init
> > > code does the setup before the locality is claimed for the first time.
> > >
> > > James
> > >
> >
> >
> > I tested initially with the following commits reverted:
> >
> > aa4a63dd9816 tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's" | 2020-01-06 | (Stefan Berger)
> > dda8b2af395b tpm: Revert "tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts" | 2020-01-06 | (Stefan Berger)
> >
> > The laptop doesn't become unusable, but I lose the trackpad and get the following:
> >
> > [ 3.070501] irq 31: nobody cared (try booting with the "irqpoll" option)
> > [ 3.070504] CPU: 2 PID: 251 Comm: rngd Not tainted 5.8.13-201.local.fc32.x86_64 #1
> > [ 3.070504] Hardware name: LENOVO 20NYS7K90F/20NYS7K90F, BIOS N2JET83W (1.61 ) 11/22/2019
> > [ 3.070505] Call Trace:
> > [ 3.070511] dump_stack+0x6b/0x88
> > [ 3.070514] __report_bad_irq+0x35/0xa7
> > [ 3.070516] note_interrupt.cold+0xb/0x6a
> > [ 3.070518] handle_irq_event+0x88/0x8a
> > [ 3.070519] handle_fasteoi_irq+0x78/0x1c0
> > [ 3.070522] common_interrupt+0x68/0x140
> > [ 3.070524] ? asm_common_interrupt+0x8/0x40
> > [ 3.070525] asm_common_interrupt+0x1e/0x40
> > [ 3.070527] RIP: 0033:0x7f2eea3249b5
> > [ 3.070529] Code: e0 48 c1 e8 3c 83 e0 01 48 31 45 f0 48 8b 45 e0 48 c1 e8 37 83 e0 01 48 31 45 f0 48 8b 45 e0 48 c1 e8 1e 83 e0 01 48 31 45 f0 <48> 8b 45 e0 48 c1 e8 1b 83 e0 01 48 31 45 f0 48 8b 45 e0 48 c1 e8
> > [ 3.070529] RSP: 002b:00007f2ee3ffebc0 EFLAGS: 00000202
> > [ 3.070530] RAX: 0000000000000001 RBX: 000000000000000a RCX: 000000000000002e
> > [ 3.070531] RDX: 0463400000000000 RSI: 0000000000000000 RDI: 0000000000000001
> > [ 3.070532] RBP: 00007f2ee3ffec10 R08: 0000000000000000 R09: 0000000000000035
> > [ 3.070532] R10: 00007ffde716f080 R11: 00007ffde716f080 R12: 00007f2edc004c00
> > [ 3.070533] R13: 00007ffde700a54f R14: 00007f2ee3ffed10 R15: 00005598a41e3680
> > [ 3.070534] handlers:
> > [ 3.070537] [<000000007b6f3232>] tis_int_handler
> > [ 3.070538] Disabling IRQ #31
> > ...
> > [ 14.956342] irq 16: nobody cared (try booting with the "irqpoll" option)
> > [ 14.956344] CPU: 0 PID: 1013 Comm: rngd Not tainted 5.8.13-201.local.fc32.x86_64 #1
> > [ 14.956344] Hardware name: LENOVO 20NYS7K90F/20NYS7K90F, BIOS N2JET83W (1.61 ) 11/22/2019
> > [ 14.956345] Call Trace:
> > [ 14.956350] dump_stack+0x6b/0x88
> > [ 14.956353] __report_bad_irq+0x35/0xa7
> > [ 14.956354] note_interrupt.cold+0xb/0x6a
> > [ 14.956355] handle_irq_event+0x88/0x8a
> > [ 14.956356] handle_fasteoi_irq+0x78/0x1c0
> > [ 14.956358] common_interrupt+0x68/0x140
> > [ 14.956360] ? asm_common_interrupt+0x8/0x40
> > [ 14.956361] asm_common_interrupt+0x1e/0x40
> > [ 14.956362] RIP: 0033:0x7fcaff4399d3
> > [ 14.956363] Code: e0 48 c1 e8 1e 83 e0 01 48 31 45 f0 48 8b 45 e0 48 c1 e8 1b 83 e0 01 48 31 45 f0 48 8b 45 e0 48 c1 e8 16 83 e0 01 48 31 45 f0 <48> d1 65 e0 48 8b 45 f0 48 31 45 e0 83 45 d4 01 83 7d d4 40 0f 86
> > [ 14.956364] RSP: 002b:00007fcafe544bc0 EFLAGS: 00000246
> > [ 14.956364] RAX: 0000000000000000 RBX: 000000000000000a RCX: 0000000000000026
> > [ 14.956365] RDX: 000df20000000000 RSI: 0000000000000000 RDI: 0000000000000001
> > [ 14.956365] RBP: 00007fcafe544c10 R08: 0000000000000000 R09: 0000000000000035
> > [ 14.956366] R10: 00007ffc30bd2080 R11: 00007ffc30bd2080 R12: 00007fcaf0004c00
> > [ 14.956366] R13: 00007fcaf0004c00 R14: 00007fcaf0000b60 R15: 0000560216fcf0f2
> > [ 14.956367] handlers:
> > [ 14.956370] [<0000000024c0571e>] i801_isr [i2c_i801]
> > [ 14.956371] Disabling IRQ #16
> >
> > /proc/interrupts shows:
> >
> > 16: 100000 0 0 0 0 0 0 0 IR-IO-APIC 16-fasteoi i801_smbus
> > 31: 0 0 100000 0 0 0 0 0 IR-IO-APIC 31-fasteoi tpm0
> >
> >
> > I also get this behavior with your patchset applied. If I boot with
> > tpm_tis.interrupts=0 it behaves. The thought from Hans is to look at
> > the dmi info and key off the vendor being Lenovo and bios date to
> > decide if interrupts should be disabled. Since Dan ran also into this
> > with something internal at Intel I don't know if that will be
> > sufficient.
> >
> > I hope to look over this patchset tomorrow.
> >
> > Regards,
> > Jerry
>
> I'm sorry, I received this email only after pulling the latest with fdm.
So, this is the main blocker to take these patches.
/Jarkko
next prev parent reply other threads:[~2020-10-18 5:34 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 18:09 [PATCH v2 0/5] tpm_tis: fix interrupts (again) James Bottomley
2020-10-01 18:09 ` [PATCH v2 1/5] tpm_tis: Fix check_locality for correct locality acquisition James Bottomley
2020-10-05 15:34 ` Jarkko Sakkinen
2020-10-05 19:00 ` James Bottomley
2020-10-05 20:32 ` Jarkko Sakkinen
2020-10-19 23:16 ` Jerry Snitselaar
2020-10-24 12:07 ` Jarkko Sakkinen
2020-10-30 12:13 ` Jarkko Sakkinen
2020-10-01 18:09 ` [PATCH v2 2/5] tpm_tis: Clean up locality release James Bottomley
2020-10-05 17:02 ` Jarkko Sakkinen
2020-10-05 19:05 ` James Bottomley
2020-10-05 20:34 ` Jarkko Sakkinen
2020-10-05 17:03 ` Jarkko Sakkinen
2020-10-19 23:17 ` Jerry Snitselaar
2020-10-24 12:10 ` Jarkko Sakkinen
2020-10-30 12:17 ` Jarkko Sakkinen
2020-10-30 15:47 ` James Bottomley
2020-10-30 21:52 ` Jarkko Sakkinen
2020-10-01 18:09 ` [PATCH v2 3/5] tpm_tis: Fix interrupts for TIS TPMs without legacy cycles James Bottomley
2020-10-05 17:05 ` Jarkko Sakkinen
2020-10-20 0:14 ` Jerry Snitselaar
2020-10-24 12:15 ` Jarkko Sakkinen
2020-10-30 12:18 ` Jarkko Sakkinen
2020-10-30 16:06 ` Jerry Snitselaar
2020-11-03 4:16 ` Jarkko Sakkinen
2020-12-01 18:12 ` Jerry Snitselaar
2020-12-01 19:49 ` Jerry Snitselaar
2020-12-01 21:06 ` James Bottomley
2020-12-01 21:47 ` Jerry Snitselaar
2020-10-01 18:09 ` [PATCH v2 4/5] tpm_tis: fix IRQ probing James Bottomley
2020-10-05 17:05 ` Jarkko Sakkinen
2020-10-19 23:41 ` Jerry Snitselaar
2020-10-24 12:17 ` Jarkko Sakkinen
2020-10-30 12:43 ` Jarkko Sakkinen
2020-10-30 15:49 ` James Bottomley
2020-10-30 16:11 ` Jerry Snitselaar
2020-11-03 4:43 ` Jarkko Sakkinen
2020-11-03 23:00 ` Jerry Snitselaar
2020-11-04 0:31 ` Jarkko Sakkinen
2020-11-03 4:17 ` Jarkko Sakkinen
2020-11-06 15:32 ` Jarkko Sakkinen
2020-11-06 16:21 ` James Bottomley
2020-11-06 22:07 ` Jarkko Sakkinen
2020-10-01 18:09 ` [PATCH v2 5/5] Revert "tpm: Revert "tpm_tis_core: Turn on the TPM before probing IRQ's"" James Bottomley
2020-10-19 20:23 ` Jerry Snitselaar
2020-10-19 22:54 ` James Bottomley
2020-10-19 23:40 ` Jerry Snitselaar
2020-10-12 5:39 ` [PATCH v2 0/5] tpm_tis: fix interrupts (again) Jerry Snitselaar
2020-10-13 1:23 ` Jarkko Sakkinen
2020-10-18 5:34 ` Jarkko Sakkinen [this message]
2020-10-13 1:17 ` Jarkko Sakkinen
2020-10-13 15:15 ` Jerry Snitselaar
2020-10-13 15:24 ` James Bottomley
2020-10-13 16:05 ` Jerry Snitselaar
2020-10-14 15:03 ` Hans de Goede
2020-10-14 15:23 ` James Bottomley
2020-10-14 16:04 ` Hans de Goede
2020-10-14 16:34 ` Jerry Snitselaar
2020-10-14 16:46 ` Hans de Goede
2020-10-14 17:01 ` Jerry Snitselaar
2020-10-14 17:04 ` Jerry Snitselaar
2020-10-14 20:58 ` Jerry Snitselaar
2020-10-15 7:38 ` Hans de Goede
2020-10-18 21:09 ` Jarkko Sakkinen
2020-10-15 15:36 ` James Bottomley
2020-10-15 18:48 ` Jerry Snitselaar
2020-10-15 18:57 ` James Bottomley
2020-10-15 19:16 ` Jerry Snitselaar
2020-10-14 16:49 ` James Bottomley
2020-10-18 21:05 ` Jarkko Sakkinen
2020-10-20 23:10 ` Jerry Snitselaar
2020-10-24 12:20 ` Jarkko Sakkinen
2020-10-26 18:29 ` Jerry Snitselaar
2020-10-27 17:14 ` 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=20201018053418.GA4598@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jgg@ziepe.ca \
--cc=jsnitsel@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).