linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm_tis: Fix interrupt probing
@ 2019-08-20 12:25 Stefan Berger
  2019-08-21 19:15 ` Jarkko Sakkinen
  2019-08-27 13:14 ` Jarkko Sakkinen
  0 siblings, 2 replies; 9+ messages in thread
From: Stefan Berger @ 2019-08-20 12:25 UTC (permalink / raw)
  To: jarkko.sakkinen, linux-integrity
  Cc: linux-security-module, linux-kernel, Stefan Berger

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

The interrupt probing of the TPM TIS was broken since we are trying to
run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 drivers/char/tpm/tpm_tis_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index c3181ea9f271..270f43acbb77 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -980,6 +980,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 			goto out_err;
 		}
 
+		tpm_chip_start(chip);
+		chip->flags |= TPM_CHIP_FLAG_IRQ;
 		if (irq) {
 			tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
 						 irq);
@@ -989,6 +991,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 		} else {
 			tpm_tis_probe_irq(chip, intmask);
 		}
+		tpm_chip_stop(chip);
 	}
 
 	rc = tpm_chip_register(chip);
-- 
2.14.5


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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-20 12:25 [PATCH] tpm_tis: Fix interrupt probing Stefan Berger
@ 2019-08-21 19:15 ` Jarkko Sakkinen
  2019-08-27 13:14 ` Jarkko Sakkinen
  1 sibling, 0 replies; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-08-21 19:15 UTC (permalink / raw)
  To: Stefan Berger
  Cc: linux-integrity, linux-security-module, linux-kernel, Stefan Berger

On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
> From: Stefan Berger <stefanb@linux.ibm.com>
> 
> The interrupt probing of the TPM TIS was broken since we are trying to
> run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

Should have a fixes tag. I can add it. Thank you.

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-20 12:25 [PATCH] tpm_tis: Fix interrupt probing Stefan Berger
  2019-08-21 19:15 ` Jarkko Sakkinen
@ 2019-08-27 13:14 ` Jarkko Sakkinen
  2019-08-27 15:19   ` Jarkko Sakkinen
  1 sibling, 1 reply; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-08-27 13:14 UTC (permalink / raw)
  To: Stefan Berger
  Cc: linux-integrity, linux-security-module, linux-kernel, Stefan Berger

On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
> From: Stefan Berger <stefanb@linux.ibm.com>
> 
> The interrupt probing of the TPM TIS was broken since we are trying to
> run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

Need these:

Cc: linux-stable@vger.kernel.org
Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")

Thank you. I'll apply this to my tree.

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-27 13:14 ` Jarkko Sakkinen
@ 2019-08-27 15:19   ` Jarkko Sakkinen
  2019-08-27 19:34     ` Stefan Berger
  0 siblings, 1 reply; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-08-27 15:19 UTC (permalink / raw)
  To: Stefan Berger
  Cc: linux-integrity, linux-security-module, linux-kernel, Stefan Berger

On Tue, Aug 27, 2019 at 04:14:00PM +0300, Jarkko Sakkinen wrote:
> On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
> > From: Stefan Berger <stefanb@linux.ibm.com>
> > 
> > The interrupt probing of the TPM TIS was broken since we are trying to
> > run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
> > 
> > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> 
> Need these:
> 
> Cc: linux-stable@vger.kernel.org
> Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
> 
> Thank you. I'll apply this to my tree.
> 
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

The commit went in the following form:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I refined the long description as they should be written in imperative
form. I also changed it to consistently to speak about tpm_tis_core
instead of using two differing spellings (tpm_tis and TPM TIS). tpm_tis
is a different module than tpm_tis_core.

Unfortunately I had to drop the assignment statement because:

1. Generally speaking, two separate bug fixes should never reside in the
   same commit. They even need their own fixes tags in this case.
2. The commit message did not reason the assignment statement.

/Jarkko

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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-27 15:19   ` Jarkko Sakkinen
@ 2019-08-27 19:34     ` Stefan Berger
  2019-08-29 13:20       ` Jarkko Sakkinen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Berger @ 2019-08-27 19:34 UTC (permalink / raw)
  To: Jarkko Sakkinen, Stefan Berger
  Cc: linux-integrity, linux-security-module, linux-kernel

On 8/27/19 11:19 AM, Jarkko Sakkinen wrote:
> On Tue, Aug 27, 2019 at 04:14:00PM +0300, Jarkko Sakkinen wrote:
>> On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
>>> From: Stefan Berger <stefanb@linux.ibm.com>
>>>
>>> The interrupt probing of the TPM TIS was broken since we are trying to
>>> run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
>>>
>>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>> Need these:
>>
>> Cc: linux-stable@vger.kernel.org
>> Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
>>
>> Thank you. I'll apply this to my tree.
>>
>> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> The commit went in the following form:
>
> http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I saw you dropped the stetting of the IRQ flag - I needed it, otherwise 
it wouldn't execute certain code paths.


    Stefan



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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-27 19:34     ` Stefan Berger
@ 2019-08-29 13:20       ` Jarkko Sakkinen
  2019-08-29 16:10         ` Jarkko Sakkinen
  0 siblings, 1 reply; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-08-29 13:20 UTC (permalink / raw)
  To: Stefan Berger
  Cc: Stefan Berger, linux-integrity, linux-security-module, linux-kernel

On Tue, Aug 27, 2019 at 03:34:36PM -0400, Stefan Berger wrote:
> On 8/27/19 11:19 AM, Jarkko Sakkinen wrote:
> > On Tue, Aug 27, 2019 at 04:14:00PM +0300, Jarkko Sakkinen wrote:
> > > On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
> > > > From: Stefan Berger <stefanb@linux.ibm.com>
> > > > 
> > > > The interrupt probing of the TPM TIS was broken since we are trying to
> > > > run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
> > > > 
> > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > Need these:
> > > 
> > > Cc: linux-stable@vger.kernel.org
> > > Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
> > > 
> > > Thank you. I'll apply this to my tree.
> > > 
> > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > The commit went in the following form:
> > 
> > http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32
> 
> I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it
> wouldn't execute certain code paths.

I explained why I removed that part. There was no any reasoning for
it. Also, it cannot be in the same commit if it fixes a diffent
issue.


/Jarkko

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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-29 13:20       ` Jarkko Sakkinen
@ 2019-08-29 16:10         ` Jarkko Sakkinen
  2019-08-30  0:11           ` Stefan Berger
  0 siblings, 1 reply; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-08-29 16:10 UTC (permalink / raw)
  To: Stefan Berger
  Cc: Stefan Berger, linux-integrity, linux-security-module, linux-kernel

On Thu, Aug 29, 2019 at 04:20:21PM +0300, Jarkko Sakkinen wrote:
> On Tue, Aug 27, 2019 at 03:34:36PM -0400, Stefan Berger wrote:
> > On 8/27/19 11:19 AM, Jarkko Sakkinen wrote:
> > > On Tue, Aug 27, 2019 at 04:14:00PM +0300, Jarkko Sakkinen wrote:
> > > > On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
> > > > > From: Stefan Berger <stefanb@linux.ibm.com>
> > > > > 
> > > > > The interrupt probing of the TPM TIS was broken since we are trying to
> > > > > run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
> > > > > 
> > > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > > Need these:
> > > > 
> > > > Cc: linux-stable@vger.kernel.org
> > > > Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
> > > > 
> > > > Thank you. I'll apply this to my tree.
> > > > 
> > > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > The commit went in the following form:
> > > 
> > > http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32
> > 
> > I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it
> > wouldn't execute certain code paths.
> 
> I explained why I removed that part. There was no any reasoning for
> it. Also, it cannot be in the same commit if it fixes a diffent
> issue.

AFAIK they go with different fixes-tags.

/Jarkko

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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-29 16:10         ` Jarkko Sakkinen
@ 2019-08-30  0:11           ` Stefan Berger
  2019-08-30 17:00             ` Jarkko Sakkinen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Berger @ 2019-08-30  0:11 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Stefan Berger, linux-integrity, linux-security-module, linux-kernel

On 8/29/19 12:10 PM, Jarkko Sakkinen wrote:
> On Thu, Aug 29, 2019 at 04:20:21PM +0300, Jarkko Sakkinen wrote:
>> On Tue, Aug 27, 2019 at 03:34:36PM -0400, Stefan Berger wrote:
>>> On 8/27/19 11:19 AM, Jarkko Sakkinen wrote:
>>>> On Tue, Aug 27, 2019 at 04:14:00PM +0300, Jarkko Sakkinen wrote:
>>>>> On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
>>>>>> From: Stefan Berger <stefanb@linux.ibm.com>
>>>>>>
>>>>>> The interrupt probing of the TPM TIS was broken since we are trying to
>>>>>> run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
>>>>>>
>>>>>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>>>>> Need these:
>>>>>
>>>>> Cc: linux-stable@vger.kernel.org
>>>>> Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
>>>>>
>>>>> Thank you. I'll apply this to my tree.
>>>>>
>>>>> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>>>> The commit went in the following form:
>>>>
>>>> http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32
>>> I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it
>>> wouldn't execute certain code paths.
>> I explained why I removed that part. There was no any reasoning for
>> it. Also, it cannot be in the same commit if it fixes a diffent
>> issue.
> AFAIK they go with different fixes-tags.

I sent a separate patch for this. It looks like this bug goes back to 
when the TPM_CHIP_FLAG_IRQ was introduced in March 2019?!

    Stefan



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

* Re: [PATCH] tpm_tis: Fix interrupt probing
  2019-08-30  0:11           ` Stefan Berger
@ 2019-08-30 17:00             ` Jarkko Sakkinen
  0 siblings, 0 replies; 9+ messages in thread
From: Jarkko Sakkinen @ 2019-08-30 17:00 UTC (permalink / raw)
  To: Stefan Berger
  Cc: Stefan Berger, linux-integrity, linux-security-module, linux-kernel

On Thu, Aug 29, 2019 at 08:11:27PM -0400, Stefan Berger wrote:
> On 8/29/19 12:10 PM, Jarkko Sakkinen wrote:
> > On Thu, Aug 29, 2019 at 04:20:21PM +0300, Jarkko Sakkinen wrote:
> > > On Tue, Aug 27, 2019 at 03:34:36PM -0400, Stefan Berger wrote:
> > > > On 8/27/19 11:19 AM, Jarkko Sakkinen wrote:
> > > > > On Tue, Aug 27, 2019 at 04:14:00PM +0300, Jarkko Sakkinen wrote:
> > > > > > On Tue, Aug 20, 2019 at 08:25:17AM -0400, Stefan Berger wrote:
> > > > > > > From: Stefan Berger <stefanb@linux.ibm.com>
> > > > > > > 
> > > > > > > The interrupt probing of the TPM TIS was broken since we are trying to
> > > > > > > run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.
> > > > > > > 
> > > > > > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > > > > Need these:
> > > > > > 
> > > > > > Cc: linux-stable@vger.kernel.org
> > > > > > Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
> > > > > > 
> > > > > > Thank you. I'll apply this to my tree.
> > > > > > 
> > > > > > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > > > The commit went in the following form:
> > > > > 
> > > > > http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32
> > > > I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it
> > > > wouldn't execute certain code paths.
> > > I explained why I removed that part. There was no any reasoning for
> > > it. Also, it cannot be in the same commit if it fixes a diffent
> > > issue.
> > AFAIK they go with different fixes-tags.
> 
> I sent a separate patch for this. It looks like this bug goes back to when
> the TPM_CHIP_FLAG_IRQ was introduced in March 2019?!

Thank you!

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

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

end of thread, other threads:[~2019-08-30 17:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 12:25 [PATCH] tpm_tis: Fix interrupt probing Stefan Berger
2019-08-21 19:15 ` Jarkko Sakkinen
2019-08-27 13:14 ` Jarkko Sakkinen
2019-08-27 15:19   ` Jarkko Sakkinen
2019-08-27 19:34     ` Stefan Berger
2019-08-29 13:20       ` Jarkko Sakkinen
2019-08-29 16:10         ` Jarkko Sakkinen
2019-08-30  0:11           ` Stefan Berger
2019-08-30 17:00             ` 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).