Re: [PATCH] tpm, tpm_tis: Acquire locality in tpm_tis_gen_interrupt() and tpm_get_timeouts()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 10, 2021 at 04:00:27PM +0200, Laurent Bigonville wrote:
> Le 10/06/21 à 14:29, Jarkko Sakkinen a écrit :
> > On Thu, Jun 10, 2021 at 01:35:47PM +0200, Laurent Bigonville wrote:
> > > # dmesg |grep -i tpm
> > > 
> > > [   13.019986] tpm_tis 00:06: 1.2 TPM (device-id 0x6871, rev-id 1)
> > > [   15.016198] tpm tpm0: tpm_try_transmit: send(): error -62
> > > [   15.016208] tpm tpm0: A TPM error (-62) occurred attempting to determine
> > > the timeouts
> > > [   15.016239] tpm_tis: probe of 00:06 failed with error -62
> > > [   15.053255] tpm_inf_pnp 00:06: Found TPM with ID IFX0102
> > If possible, can you check what happens when you apply the attached patch.
> > I'm not proposing it as a bug fix but it just simplifies the flow a lot,
> > and might help to observe something.
> > 
> With the patch on the top of HEAD of master and the patch from your branch,
> I'm getting this:
> 
> [   13.140548] tpm tpm0: invalid TPM_STS.x 0xa0, dumping stack for forensics
> [   13.140617] CPU: 4 PID: 462 Comm: systemd-udevd Tainted: G          I
> E     5.13.0-rc5+ #7
> [   13.140621] Hardware name: System manufacturer System Product Name/P6T
> DELUXE V2, BIOS 0406    04/24/2009
> [   13.140623] Call Trace:
> [   13.140628]  dump_stack+0x76/0x94
> [   13.140637]  tpm_tis_status.cold+0x19/0x20 [tpm_tis_core]
> [   13.140643]  tpm_transmit+0x15f/0x3d0 [tpm]
> [   13.140657]  tpm_transmit_cmd+0x25/0x90 [tpm]
> [   13.140666]  tpm2_probe+0xe2/0x140 [tpm]

It's weird because it's the first transaction with the TPM, not likely
to have any sort of mismatch in power gating.

I'm suspecting this:

	if (wait_startup(chip, 0) != 0) {
		rc = -ENODEV;
		goto out_err;
	}

I did not find anything from [*] stating that reading Access Register,
could cause any change in the burstCount (0xa0) but still might be worth
of testing to couple that with

	release_locality(chip, 0);

I.e. add that just after the first snippet.

[*] https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/

/Jarkko



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux