linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
@ 2019-11-12 20:27 Stefan Berger
  2019-11-14 16:41 ` Jarkko Sakkinen
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Berger @ 2019-11-12 20:27 UTC (permalink / raw)
  To: linux-integrity, jsnitsel, jarkko.sakkinen
  Cc: linux-kernel, linux-security-module, Stefan Berger

From: Stefan Berger <stefanb@linux.ibm.com>

Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
This move handles error conditions better that may arise if anything
before fails in tpm_tis_probe_irq_single.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
 drivers/char/tpm/tpm_tis_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 8af2cee1a762..6b6605890c7d 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -790,6 +790,7 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
 		return rc;
 
 	priv->irq_tested = false;
+	chip->flags |= TPM_CHIP_FLAG_IRQ;
 
 	/* Generate an interrupt by having the core call through to
 	 * tpm_tis_send
@@ -1060,7 +1061,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 		}
 
 		tpm_chip_start(chip);
-		chip->flags |= TPM_CHIP_FLAG_IRQ;
 		if (irq) {
 			tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
 						 irq);
-- 
2.14.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-12 20:27 [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single Stefan Berger
@ 2019-11-14 16:41 ` Jarkko Sakkinen
  2019-11-14 16:44   ` Jarkko Sakkinen
  0 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2019-11-14 16:41 UTC (permalink / raw)
  To: Stefan Berger
  Cc: linux-integrity, jsnitsel, linux-kernel, linux-security-module,
	Stefan Berger

On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
> From: Stefan Berger <stefanb@linux.ibm.com>
> 
> Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
> tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
> This move handles error conditions better that may arise if anything
> before fails in tpm_tis_probe_irq_single.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>

What about just changing the condition?

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-14 16:41 ` Jarkko Sakkinen
@ 2019-11-14 16:44   ` Jarkko Sakkinen
  2019-11-16 14:32     ` Stefan Berger
  0 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2019-11-14 16:44 UTC (permalink / raw)
  To: Stefan Berger
  Cc: linux-integrity, jsnitsel, linux-kernel, linux-security-module,
	Stefan Berger

On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
> On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
> > From: Stefan Berger <stefanb@linux.ibm.com>
> > 
> > Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
> > tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
> > This move handles error conditions better that may arise if anything
> > before fails in tpm_tis_probe_irq_single.
> > 
> > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
> 
> What about just changing the condition?

Also cannot take this since it is not a bug (no fixes tag).

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-14 16:44   ` Jarkko Sakkinen
@ 2019-11-16 14:32     ` Stefan Berger
  2019-11-17 18:08       ` Jerry Snitselaar
                         ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Stefan Berger @ 2019-11-16 14:32 UTC (permalink / raw)
  To: Jarkko Sakkinen, Stefan Berger
  Cc: linux-integrity, jsnitsel, linux-kernel, linux-security-module

On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
> On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
>> On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
>>> From: Stefan Berger <stefanb@linux.ibm.com>
>>>
>>> Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
>>> tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
>>> This move handles error conditions better that may arise if anything
>>> before fails in tpm_tis_probe_irq_single.
>>>
>>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>>> Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
>> What about just changing the condition?
> Also cannot take this since it is not a bug (no fixes tag).

I'll repost but will wait until Jerry has tested it on that machine.

    Stefan


>
> /Jarkko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-16 14:32     ` Stefan Berger
@ 2019-11-17 18:08       ` Jerry Snitselaar
  2019-11-18 17:59       ` Jarkko Sakkinen
  2019-11-21 18:49       ` Jerry Snitselaar
  2 siblings, 0 replies; 11+ messages in thread
From: Jerry Snitselaar @ 2019-11-17 18:08 UTC (permalink / raw)
  To: Stefan Berger
  Cc: Jarkko Sakkinen, Stefan Berger, linux-integrity, linux-kernel,
	linux-security-module

On Sat Nov 16 19, Stefan Berger wrote:
>On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
>>On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
>>>On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
>>>>From: Stefan Berger <stefanb@linux.ibm.com>
>>>>
>>>>Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
>>>>tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
>>>>This move handles error conditions better that may arise if anything
>>>>before fails in tpm_tis_probe_irq_single.
>>>>
>>>>Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>>>>Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
>>>What about just changing the condition?
>>Also cannot take this since it is not a bug (no fixes tag).
>
>I'll repost but will wait until Jerry has tested it on that machine.
>
>   Stefan
>

Sorry, I'm still waiting to hear back from the reporter, and logistics
for some reason has been silent on my request so far.

>
>>
>>/Jarkko
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-16 14:32     ` Stefan Berger
  2019-11-17 18:08       ` Jerry Snitselaar
@ 2019-11-18 17:59       ` Jarkko Sakkinen
  2019-11-21 18:49       ` Jerry Snitselaar
  2 siblings, 0 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2019-11-18 17:59 UTC (permalink / raw)
  To: Stefan Berger
  Cc: Stefan Berger, linux-integrity, jsnitsel, linux-kernel,
	linux-security-module

On Sat, Nov 16, 2019 at 09:32:06AM -0500, Stefan Berger wrote:
> On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
> > On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
> > > On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
> > > > From: Stefan Berger <stefanb@linux.ibm.com>
> > > > 
> > > > Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
> > > > tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
> > > > This move handles error conditions better that may arise if anything
> > > > before fails in tpm_tis_probe_irq_single.
> > > > 
> > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > > Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
> > > What about just changing the condition?
> > Also cannot take this since it is not a bug (no fixes tag).
> 
> I'll repost but will wait until Jerry has tested it on that machine.

OK, great, thank you.

This is really needs some reasoning on why this was the right way to
fix the issue. In addition, a source code comment might make sense.

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-16 14:32     ` Stefan Berger
  2019-11-17 18:08       ` Jerry Snitselaar
  2019-11-18 17:59       ` Jarkko Sakkinen
@ 2019-11-21 18:49       ` Jerry Snitselaar
  2019-11-27 21:11         ` Jarkko Sakkinen
  2 siblings, 1 reply; 11+ messages in thread
From: Jerry Snitselaar @ 2019-11-21 18:49 UTC (permalink / raw)
  To: Stefan Berger
  Cc: Jarkko Sakkinen, Stefan Berger, linux-integrity, linux-kernel,
	linux-security-module

On Sat Nov 16 19, Stefan Berger wrote:
>On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
>>On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
>>>On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
>>>>From: Stefan Berger <stefanb@linux.ibm.com>
>>>>
>>>>Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
>>>>tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
>>>>This move handles error conditions better that may arise if anything
>>>>before fails in tpm_tis_probe_irq_single.
>>>>
>>>>Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>>>>Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
>>>What about just changing the condition?
>>Also cannot take this since it is not a bug (no fixes tag).
>
>I'll repost but will wait until Jerry has tested it on that machine.
>
>   Stefan
>
>
>>
>>/Jarkko
>
>

It appears they still have the problem. I'm still waiting on logistics
to send me a system to debug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-21 18:49       ` Jerry Snitselaar
@ 2019-11-27 21:11         ` Jarkko Sakkinen
  2019-11-27 21:26           ` Dan Williams
  0 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2019-11-27 21:11 UTC (permalink / raw)
  To: Stefan Berger, Stefan Berger, linux-integrity, linux-kernel,
	linux-security-module, dan.j.williams

On Thu, Nov 21, 2019 at 11:49:49AM -0700, Jerry Snitselaar wrote:
> On Sat Nov 16 19, Stefan Berger wrote:
> > On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
> > > On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
> > > > On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
> > > > > From: Stefan Berger <stefanb@linux.ibm.com>
> > > > > 
> > > > > Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
> > > > > tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
> > > > > This move handles error conditions better that may arise if anything
> > > > > before fails in tpm_tis_probe_irq_single.
> > > > > 
> > > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > > > Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
> > > > What about just changing the condition?
> > > Also cannot take this since it is not a bug (no fixes tag).
> > 
> > I'll repost but will wait until Jerry has tested it on that machine.
> > 
> >    Stefan
> > 
> > 
> > > 
> > > /Jarkko
> > 
> > 
> 
> It appears they still have the problem. I'm still waiting on logistics
> to send me a system to debug.

Which hardware is guaranteed to ignite this? I can try to get test hw
for this from somewhere. Kind of looking into this blinded ATM. Dan?

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-27 21:11         ` Jarkko Sakkinen
@ 2019-11-27 21:26           ` Dan Williams
  2019-11-28  0:14             ` Jerry Snitselaar
  2019-11-29 23:26             ` Jarkko Sakkinen
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Williams @ 2019-11-27 21:26 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Stefan Berger, Stefan Berger, linux-integrity,
	Linux Kernel Mailing List, linux-security-module, jsnitsel

[ add Jerry ]

On Wed, Nov 27, 2019 at 1:11 PM Jarkko Sakkinen
<jarkko.sakkinen@linux.intel.com> wrote:
>
> On Thu, Nov 21, 2019 at 11:49:49AM -0700, Jerry Snitselaar wrote:
> > On Sat Nov 16 19, Stefan Berger wrote:
> > > On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
> > > > On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
> > > > > On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
> > > > > > From: Stefan Berger <stefanb@linux.ibm.com>
> > > > > >
> > > > > > Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
> > > > > > tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
> > > > > > This move handles error conditions better that may arise if anything
> > > > > > before fails in tpm_tis_probe_irq_single.
> > > > > >
> > > > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > > > > Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
> > > > > What about just changing the condition?
> > > > Also cannot take this since it is not a bug (no fixes tag).
> > >
> > > I'll repost but will wait until Jerry has tested it on that machine.
> > >
> > >    Stefan
> > >
> > >
> > > >
> > > > /Jarkko
> > >
> > >
> >
> > It appears they still have the problem. I'm still waiting on logistics
> > to send me a system to debug.
>
> Which hardware is guaranteed to ignite this? I can try to get test hw
> for this from somewhere. Kind of looking into this blinded ATM. Dan?

Jerry had mentioned that this was also occurring on T490s. Otherwise
I'll ping you offline about the system I saw this on internally.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-27 21:26           ` Dan Williams
@ 2019-11-28  0:14             ` Jerry Snitselaar
  2019-11-29 23:26             ` Jarkko Sakkinen
  1 sibling, 0 replies; 11+ messages in thread
From: Jerry Snitselaar @ 2019-11-28  0:14 UTC (permalink / raw)
  To: Dan Williams
  Cc: Jarkko Sakkinen, Stefan Berger, Stefan Berger, linux-integrity,
	Linux Kernel Mailing List, linux-security-module

On Wed Nov 27 19, Dan Williams wrote:
>[ add Jerry ]
>
>On Wed, Nov 27, 2019 at 1:11 PM Jarkko Sakkinen
><jarkko.sakkinen@linux.intel.com> wrote:
>>
>> On Thu, Nov 21, 2019 at 11:49:49AM -0700, Jerry Snitselaar wrote:
>> > On Sat Nov 16 19, Stefan Berger wrote:
>> > > On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
>> > > > On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
>> > > > > On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
>> > > > > > From: Stefan Berger <stefanb@linux.ibm.com>
>> > > > > >
>> > > > > > Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
>> > > > > > tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
>> > > > > > This move handles error conditions better that may arise if anything
>> > > > > > before fails in tpm_tis_probe_irq_single.
>> > > > > >
>> > > > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>> > > > > > Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
>> > > > > What about just changing the condition?
>> > > > Also cannot take this since it is not a bug (no fixes tag).
>> > >
>> > > I'll repost but will wait until Jerry has tested it on that machine.
>> > >
>> > >    Stefan
>> > >
>> > >
>> > > >
>> > > > /Jarkko
>> > >
>> > >
>> >
>> > It appears they still have the problem. I'm still waiting on logistics
>> > to send me a system to debug.
>>
>> Which hardware is guaranteed to ignite this? I can try to get test hw
>> for this from somewhere. Kind of looking into this blinded ATM. Dan?
>
>Jerry had mentioned that this was also occurring on T490s. Otherwise
>I'll ping you offline about the system I saw this on internally.
>

I've been trying for about 3 weeks now to get one of the laptops from
logistics here, but unfortunately they have been silent. Pinged one
of their email addresses today to see if they could respond to the
ticket, so hopefully next week I will have something.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single
  2019-11-27 21:26           ` Dan Williams
  2019-11-28  0:14             ` Jerry Snitselaar
@ 2019-11-29 23:26             ` Jarkko Sakkinen
  1 sibling, 0 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2019-11-29 23:26 UTC (permalink / raw)
  To: Dan Williams
  Cc: Stefan Berger, Stefan Berger, linux-integrity,
	Linux Kernel Mailing List, linux-security-module, jsnitsel

On Wed, Nov 27, 2019 at 01:26:07PM -0800, Dan Williams wrote:
> [ add Jerry ]
> 
> On Wed, Nov 27, 2019 at 1:11 PM Jarkko Sakkinen
> <jarkko.sakkinen@linux.intel.com> wrote:
> >
> > On Thu, Nov 21, 2019 at 11:49:49AM -0700, Jerry Snitselaar wrote:
> > > On Sat Nov 16 19, Stefan Berger wrote:
> > > > On 11/14/19 11:44 AM, Jarkko Sakkinen wrote:
> > > > > On Thu, Nov 14, 2019 at 06:41:51PM +0200, Jarkko Sakkinen wrote:
> > > > > > On Tue, Nov 12, 2019 at 03:27:25PM -0500, Stefan Berger wrote:
> > > > > > > From: Stefan Berger <stefanb@linux.ibm.com>
> > > > > > >
> > > > > > > Move the setting of the TPM_CHIP_FLAG_IRQ for irq probing into
> > > > > > > tpm_tis_probe_irq_single before calling tpm_tis_gen_interrupt.
> > > > > > > This move handles error conditions better that may arise if anything
> > > > > > > before fails in tpm_tis_probe_irq_single.
> > > > > > >
> > > > > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > > > > > Suggested-by: Jerry Snitselaar <jsnitsel@redhat.com>
> > > > > > What about just changing the condition?
> > > > > Also cannot take this since it is not a bug (no fixes tag).
> > > >
> > > > I'll repost but will wait until Jerry has tested it on that machine.
> > > >
> > > >    Stefan
> > > >
> > > >
> > > > >
> > > > > /Jarkko
> > > >
> > > >
> > >
> > > It appears they still have the problem. I'm still waiting on logistics
> > > to send me a system to debug.
> >
> > Which hardware is guaranteed to ignite this? I can try to get test hw
> > for this from somewhere. Kind of looking into this blinded ATM. Dan?
> 
> Jerry had mentioned that this was also occurring on T490s. Otherwise
> I'll ping you offline about the system I saw this on internally.

I'll see if I can get my hands on T490 or T490s or something with
equivalent hardware.

/Jarkko

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-11-29 23:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 20:27 [PATCH] tpm_tis: Move setting of TPM_CHIP_FLAG_IRQ into tpm_tis_probe_irq_single Stefan Berger
2019-11-14 16:41 ` Jarkko Sakkinen
2019-11-14 16:44   ` Jarkko Sakkinen
2019-11-16 14:32     ` Stefan Berger
2019-11-17 18:08       ` Jerry Snitselaar
2019-11-18 17:59       ` Jarkko Sakkinen
2019-11-21 18:49       ` Jerry Snitselaar
2019-11-27 21:11         ` Jarkko Sakkinen
2019-11-27 21:26           ` Dan Williams
2019-11-28  0:14             ` Jerry Snitselaar
2019-11-29 23:26             ` Jarkko Sakkinen

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).