Skip to contentSkip to conversation

Possible issue with tpm_crb runtime PM

DISCUSSION Jarkko Sakkinen 2 participants 8 messages Sep 20, 2016 – Sep 28, 2016 7 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi

I get this (probably every time) when I do rmmod:

[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the TPM

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

/Jarkko

------------------------------------------------------------------------------

#2 lore raw
In reply to a message not in the archive
Quoted 6 lines

Hi

I get this (probably every time) when I do rmmod:

Quoted 7 lines
[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the TPM

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

Can you produce the full log?
Tomas

------------------------------------------------------------------------------

#4 lore raw
In reply to a message not in the archive
Quoted 8 lines · Tomas
Quoted 8 lines

Hi

I get this (probably every time) when I do rmmod:

[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the TPM
Quoted 7 lines
Quoted 5 lines

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

Can you produce the full log?

I just compiled kernel from the 'next' branch and it doesn't have this issue. If you want, I can recompile the kernel but that's the only error message that is emitted and it is obviously emitted by tpm2_shutdown(). This is a Skylake m7-6Y75 machine that I use for ad-hoc testing (runs Ubuntu 16.04 LTS, usually I test kernel with buildroot initramfs) of TPM and SGX.

Quoted 1 line

Tomas

/Jarkko

------------------------------------------------------------------------------

#6 lore raw
In reply to a message not in the archive
Quoted 15 lines · Tomas
Quoted 14 lines
Quoted 13 lines

Hi

I get this (probably every time) when I do rmmod:

[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the TPM

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

Quoted 7 lines
Quoted 1 line

Can you produce the full log?

I just compiled kernel from the 'next' branch and it doesn't have this issue. If you want, I can recompile the kernel but that's the only error message that is emitted and it is obviously emitted by tpm2_shutdown().
This is a Skylake m7-6Y75 machine that I use for ad-hoc testing (runs Ubuntu 16.04 LTS, usually I test kernel with buildroot initramfs) of TPM and SGX.

If you can just revert the last patch, so the device will be always up, see if this helps? Thanks
Tomas

------------------------------------------------------------------------------

#8 lore raw
In reply to a message not in the archive
Quoted 17 lines · Tomas
Quoted 17 lines · Tomas
Quoted 15 lines
Quoted 6 lines

Hi

I get this (probably every time) when I do rmmod:

Quoted 7 lines
[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the TPM

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

Can you produce the full log?

Quoted 7 lines
Quoted 5 lines

I just compiled kernel from the 'next' branch and it doesn't have this issue. If you want, I can recompile the kernel but that's the only error message that is emitted and it is obviously emitted by tpm2_shutdown().
This is a Skylake m7-6Y75 machine that I use for ad-hoc testing (runs Ubuntu 16.04 LTS, usually I test kernel with buildroot initramfs) of TPM and SGX.

If you can just revert the last patch, so the device will be always up, see if this helps?

This error does not occur with

0c22db435bf7 ("tpm/tpm_crb: open code the crb_init into acpi_add")

/Jarkko

------------------------------------------------------------------------------

#10 lore raw
In reply to a message not in the archive
Quoted 28 lines · Tomas
Quoted 13 lines
Quoted 13 lines · Tomas
Quoted 12 lines
Quoted 12 lines

Hi

I get this (probably every time) when I do rmmod:

[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the

TPM

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

Can you produce the full log?

I just compiled kernel from the 'next' branch and it doesn't have this issue. If you want, I can recompile the kernel but that's the only error message that is emitted and it is obviously emitted by

tpm2_shutdown().

Quoted 4 lines
Quoted 3 lines

This is a Skylake m7-6Y75 machine that I use for ad-hoc testing (runs Ubuntu
16.04 LTS, usually I test kernel with buildroot initramfs) of TPM and SGX.

Quoted 7 lines
Quoted 1 line

If you can just revert the last patch, so the device will be always up, see if

this helps?

This error does not occur with

0c22db435bf7 ("tpm/tpm_crb: open code the crb_init into acpi_add")

Okay, can you apply the my original patch with pm_rurntime_put_sync ? Thanks

------------------------------------------------------------------------------

#12 lore raw
In reply to a message not in the archive
Quoted 29 lines · Tomas
Quoted 29 lines · Tomas
Quoted 13 lines
Quoted 13 lines · Tomas
Quoted 12 lines
Quoted 12 lines

Hi

I get this (probably every time) when I do rmmod:

[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the

TPM

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

Can you produce the full log?

I just compiled kernel from the 'next' branch and it doesn't have this issue. If you want, I can recompile the kernel but that's the only error message that is emitted and it is obviously emitted by

tpm2_shutdown().

Quoted 5 lines
Quoted 3 lines

This is a Skylake m7-6Y75 machine that I use for ad-hoc testing (runs Ubuntu
16.04 LTS, usually I test kernel with buildroot initramfs) of TPM and SGX.

If you can just revert the last patch, so the device will be always up, see if

Quoted 8 lines
Quoted 6 lines

this helps?

This error does not occur with

0c22db435bf7 ("tpm/tpm_crb: open code the crb_init into acpi_add")

Okay, can you apply the my original patch with pm_rurntime_put_sync ? Thanks

The same error still happens with pm_runtime_put_sync().

/Jarkko

------------------------------------------------------------------------------

#14 lore raw
In reply to a message not in the archive
Quoted 32 lines · Jarkko Sakkinen
Quoted 31 lines · Tomas
Quoted 31 lines · Tomas
Quoted 13 lines
Quoted 13 lines · Tomas
Quoted 12 lines
Quoted 12 lines

Hi

I get this (probably every time) when I do rmmod:

[ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the

TPM

That is probably caused by failing TPM2_Shutdown. My guess is that runtime PM patches cause this.

Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I'll verify that the problem does not occur with the next branch, which does not include runtime PM patches.

Can you produce the full log?

I just compiled kernel from the 'next' branch and it doesn't have this issue. If you want, I can recompile the kernel but that's the only error message that is emitted and it is obviously emitted by

tpm2_shutdown().

Quoted 5 lines
Quoted 3 lines

This is a Skylake m7-6Y75 machine that I use for ad-hoc testing (runs Ubuntu
16.04 LTS, usually I test kernel with buildroot initramfs) of TPM and SGX.

If you can just revert the last patch, so the device will be always up, see if

this helps?

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

This error does not occur with

0c22db435bf7 ("tpm/tpm_crb: open code the crb_init into acpi_add")

Okay, can you apply the my original patch with pm_rurntime_put_sync ? Thanks

The same error still happens with pm_runtime_put_sync().

Now that I replied the patches the problem does not occur anymore. So it should be ready for 4.10. I guess the problem was really this. Probably put callback was delayed. If we change this behaviour it's better to do as a separate commit with its own test cycle.

/Jarkko

------------------------------------------------------------------------------