[v2,0/2] Fix TPM 1.2 resume

Message ID 20230502011558.10743-1-jarkko@kernel.org
Headers
Series Fix TPM 1.2 resume |

Message

Jarkko Sakkinen May 2, 2023, 1:15 a.m. UTC
  During TPM 1.2 resume, the first PCR read operation used inside
tpm1_do_selftest() fails. Fix the bugs preventing resume from working.

v2:
* Added Jerry's reviewed-by's.
* Rebased to 865fdb08197e ("Merge tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input").
* Mirrored patches to linux-next.

Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jerry Snitselaar <jsnitsel@redhat.com>

Link: https://lore.kernel.org/linux-integrity/CS6UJMSTVA4L.FRQ5VL1I1EF4@suppilovahvero/T/#m236d62184229cc035605143fde10933bcde60065
Jarkko Sakkinen (2):
  tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume
  tpm: Prevent hwrng from activating during resume

 drivers/char/tpm/tpm-chip.c      |  4 +++
 drivers/char/tpm/tpm-interface.c | 10 ++++++++
 drivers/char/tpm/tpm_tis_core.c  | 43 ++++++++++++++------------------
 include/linux/tpm.h              |  1 +
 4 files changed, 34 insertions(+), 24 deletions(-)
  

Comments

Vlastimil Babka May 2, 2023, 7:37 a.m. UTC | #1
On 5/2/23 03:15, Jarkko Sakkinen wrote:
> During TPM 1.2 resume, the first PCR read operation used inside
> tpm1_do_selftest() fails. Fix the bugs preventing resume from working.

Thanks for fixing this, unfortunately I can no longer test the fix as I've
got a new laptop since when I was hitting the bug on the older one.

Vlastimil

> v2:
> * Added Jerry's reviewed-by's.
> * Rebased to 865fdb08197e ("Merge tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input").
> * Mirrored patches to linux-next.
> 
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: Jason A. Donenfeld <Jason@zx2c4.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Jerry Snitselaar <jsnitsel@redhat.com>
> 
> Link: https://lore.kernel.org/linux-integrity/CS6UJMSTVA4L.FRQ5VL1I1EF4@suppilovahvero/T/#m236d62184229cc035605143fde10933bcde60065
> Jarkko Sakkinen (2):
>   tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume
>   tpm: Prevent hwrng from activating during resume
> 
>  drivers/char/tpm/tpm-chip.c      |  4 +++
>  drivers/char/tpm/tpm-interface.c | 10 ++++++++
>  drivers/char/tpm/tpm_tis_core.c  | 43 ++++++++++++++------------------
>  include/linux/tpm.h              |  1 +
>  4 files changed, 34 insertions(+), 24 deletions(-)
>
  
Jarkko Sakkinen May 10, 2023, 10:06 p.m. UTC | #2
On Tue May 2, 2023 at 10:37 AM EEST, Vlastimil Babka wrote:
> On 5/2/23 03:15, Jarkko Sakkinen wrote:
> > During TPM 1.2 resume, the first PCR read operation used inside
> > tpm1_do_selftest() fails. Fix the bugs preventing resume from working.
>
> Thanks for fixing this, unfortunately I can no longer test the fix as I've
> got a new laptop since when I was hitting the bug on the older one.

I don't think these fixed make things worse, and I could reproduce
the bug locally, so I'll put them to my PR :-)

BR, Jarkko