tpmdd-devel Archive on lore.kernel.org
 help / color / Atom feed
* tpm device not showing up in /dev anymore
@ 2017-08-28 11:28 Laurent Bigonville
       [not found] ` <f9526f55-df96-64fc-a4d6-877ce04e7156-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: Laurent Bigonville @ 2017-08-28 11:28 UTC (permalink / raw)
  To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello,

Since the version 4.12 (I also tested with 4.13-rc5) of the kernel, the 
tpm device is not showing up in /dev/. In dmesg I can see the following 
lines:

> [    1.772153] tpm_tis 00:06: 1.2 TPM (device-id 0x6871, rev-id 1)
> [    1.788106] tpm tpm0: tpm_transmit: tpm_send: error -5
> [    1.788146] tpm tpm0: A TPM error (-5) occurred attempting to 
> determine the timeouts
> [    1.788194] tpm_tis: probe of 00:06 failed with error -5
> [    1.796865] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
> [   10.085245] tpm_inf_pnp 00:06: Found TPM with ID IFX0102

If I'm reverting to 4.11, everything is working fine.

An idea how to troubleshoot this?

Regards,

Laurent Bigonville


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: tpm device not showing up in /dev anymore
@ 2017-09-06  5:09 Jerry Snitselaar
  0 siblings, 0 replies; 23+ messages in thread
From: Jerry Snitselaar @ 2017-09-06  5:09 UTC (permalink / raw)
  To: Jarkko Sakkinen, Laurent Bigonville
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1.1: Type: text/plain, Size: 4653 bytes --]

I haven't had a chance to dive into more. My wife had surgery on Friday and I've been tied up with that. My thought is to dump a couple registers and look at the state when it hits this. Was hoping to poke at it tomorrow, but back at the hospital tonight so it might be a couple more days before I have a chance. It should have locality when it hits that point, but wondering if it doesn't. 


Sent via the Samsung Galaxy S® 6, an AT&T 4G LTE smartphone
-------- Original message --------From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Date: 9/5/17  9:06 PM  (GMT-07:00) To: Laurent Bigonville <bigon@debian.org> Cc: Jerry Snitselaar <jsnitsel@redhat.com>, Alexander.Steffen@infineon.com, tpmdd-devel@lists.sourceforge.net Subject: Re: [tpmdd-devel] tpm device not showing up in /dev anymore 
On Fri, Sep 01, 2017 at 02:10:18PM +0200, Laurent Bigonville wrote:
> Le 31/08/17 à 18:40, Jerry Snitselaar a écrit :
> > On Thu Aug 31 17, Alexander.Steffen@infineon.com wrote:
> > > > Le 29/08/17 à 18:35, Laurent Bigonville a écrit :
> > > > > Le 29/08/17 à 18:00, Alexander.Steffen@infineon.com a écrit :
> > > > >>> An idea how to troubleshoot this?
> > > > >> Can you run git bisect on the changes between 4.11 and 4.12, so that
> > > > >> we find the offending commit? It is probably sufficient to limit the
> > > > >> search to commits that touch something in drivers/char/tpm.
> > > > >
> > > > > I'll try and keep you posted.
> > > > 
> > > > OK I've been able to bisect the problem and the bad commit is:
> > > > 
> > > > e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3 is the first bad commit
> > > > commit e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3
> > > > Author: Jerry Snitselaar <jsnitsel@redhat.com>
> > > > Date:   Mon Mar 27 08:46:04 2017 -0700
> > > > 
> > > >      tpm_tis: convert to using locality callbacks
> > > > 
> > > >      This patch converts tpm_tis to use of the new tpm class ops
> > > >      request_locality, and relinquish_locality.
> > > > 
> > > >      With the move to using the callbacks, release_locality is
> > > > changed so
> > > >      that we now release the locality even if there is no
> > > > request pending.
> > > > 
> > > >      This required some changes to the tpm_tis_core_init code path to
> > > >      make sure locality is requested when needed:
> > > > 
> > > >        - tpm2_probe code path will end up calling
> > > > request/release through
> > > >          callbacks, so request_locality prior to tpm2_probe not needed.
> > > > 
> > > >        - probe_itpm makes calls to tpm_tis_send_data which no
> > > > longer calls
> > > >          request_locality, so add request_locality prior to
> > > > tpm_tis_send_data
> > > >          calls. Also drop release_locality call in middleof
> > > > probe_itpm, and
> > > >          keep locality until release_locality called at end of
> > > > probe_itpm.
> > > > 
> > > >      Cc: Peter Huewe <peterhuewe@gmx.de>
> > > >      Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > >      Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> > > >      Cc: Marcel Selhorst <tpmdd@selhorst.net>
> > > >      Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
> > > >      Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > >      Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > >      Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > > 
> > > > :040000 040000 70234365da69959d47076ebb40c8d17f520c3e44
> > > > 72f21b446e45ea1003de75902b0553deb99157fd M    drivers
> > > > 
> > > 
> > > I've looked again at the code in question, but could not find
> > > anything that is obviously wrong there. Locality is now
> > > requested/released at slightly different points in the process than
> > > before, but that's it. It does not seem to cause problems with the
> > > majority of TPMs, since you are the first to report any, so maybe it
> > > is a quirk that only affects this device.
> > > 
> > > Perhaps Jerry can help, since this is his change?
> > > 
> > > Alexander
> > 
> > Getting some caffeine in me, and starting to take a look. Adding
> > Jarkko as well since this might involve the general locality changes.
> > 
> > Laurent, if I send you a patch with some debugging code added, would
> > you be able to run it on that system? I wasn't running into issues
> > on the system I had with a 1.2 device, but I no longer have access
> > to it. I'll see if I can find one in our labs and reproduce it there.
> 
> Yes I should be able to do that

Any findings?

/Jarkko

[-- Attachment #1.2: Type: text/html, Size: 6691 bytes --]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>I haven't had a chance to dive into more. My wife had surgery on Friday and I've been tied up with that. My thought is to dump a couple registers and look at the state when it hits this. Was hoping to poke at it tomorrow, but back at the hospital tonight so it might be a couple more days before I have a chance. It should have locality when it hits that point, but wondering if it doesn't.&nbsp;</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><div style="font-size:85%;color:#575757" dir="auto">Sent via the Samsung Galaxy S® 6, an AT&amp;T 4G LTE smartphone</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt; </div><div>Date: 9/5/17  9:06 PM  (GMT-07:00) </div><div>To: Laurent Bigonville &lt;bigon@debian.org&gt; </div><div>Cc: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;, Alexander.Steffen@infineon.com, tpmdd-devel@lists.sourceforge.net </div><div>Subject: Re: [tpmdd-devel] tpm device not showing up in /dev anymore </div><div><br></div></div>On Fri, Sep 01, 2017 at 02:10:18PM +0200, Laurent Bigonville wrote:<br>&gt; Le 31/08/17 à 18:40, Jerry Snitselaar a écrit&nbsp;:<br>&gt; &gt; On Thu Aug 31 17, Alexander.Steffen@infineon.com wrote:<br>&gt; &gt; &gt; &gt; Le 29/08/17 à 18:35, Laurent Bigonville a écrit&nbsp;:<br>&gt; &gt; &gt; &gt; &gt; Le 29/08/17 à 18:00, Alexander.Steffen@infineon.com a écrit&nbsp;:<br>&gt; &gt; &gt; &gt; &gt;&gt;&gt; An idea how to troubleshoot this?<br>&gt; &gt; &gt; &gt; &gt;&gt; Can you run git bisect on the changes between 4.11 and 4.12, so that<br>&gt; &gt; &gt; &gt; &gt;&gt; we find the offending commit? It is probably sufficient to limit the<br>&gt; &gt; &gt; &gt; &gt;&gt; search to commits that touch something in drivers/char/tpm.<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; I'll try and keep you posted.<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; OK I've been able to bisect the problem and the bad commit is:<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3 is the first bad commit<br>&gt; &gt; &gt; &gt; commit e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3<br>&gt; &gt; &gt; &gt; Author: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;<br>&gt; &gt; &gt; &gt; Date:&nbsp;&nbsp; Mon Mar 27 08:46:04 2017 -0700<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; tpm_tis: convert to using locality callbacks<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; This patch converts tpm_tis to use of the new tpm class ops<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; request_locality, and relinquish_locality.<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; With the move to using the callbacks, release_locality is<br>&gt; &gt; &gt; &gt; changed so<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; that we now release the locality even if there is no<br>&gt; &gt; &gt; &gt; request pending.<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; This required some changes to the tpm_tis_core_init code path to<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; make sure locality is requested when needed:<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - tpm2_probe code path will end up calling<br>&gt; &gt; &gt; &gt; request/release through<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callbacks, so request_locality prior to tpm2_probe not needed.<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - probe_itpm makes calls to tpm_tis_send_data which no<br>&gt; &gt; &gt; &gt; longer calls<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; request_locality, so add request_locality prior to<br>&gt; &gt; &gt; &gt; tpm_tis_send_data<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calls. Also drop release_locality call in middleof<br>&gt; &gt; &gt; &gt; probe_itpm, and<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keep locality until release_locality called at end of<br>&gt; &gt; &gt; &gt; probe_itpm.<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Cc: Peter Huewe &lt;peterhuewe@gmx.de&gt;<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Cc: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Cc: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Cc: Marcel Selhorst &lt;tpmdd@selhorst.net&gt;<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Signed-off-by: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Reviewed-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Tested-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;<br>&gt; &gt; &gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp; Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; &gt; :040000 040000 70234365da69959d47076ebb40c8d17f520c3e44<br>&gt; &gt; &gt; &gt; 72f21b446e45ea1003de75902b0553deb99157fd M&nbsp;&nbsp;&nbsp; drivers<br>&gt; &gt; &gt; &gt; <br>&gt; &gt; &gt; <br>&gt; &gt; &gt; I've looked again at the code in question, but could not find<br>&gt; &gt; &gt; anything that is obviously wrong there. Locality is now<br>&gt; &gt; &gt; requested/released at slightly different points in the process than<br>&gt; &gt; &gt; before, but that's it. It does not seem to cause problems with the<br>&gt; &gt; &gt; majority of TPMs, since you are the first to report any, so maybe it<br>&gt; &gt; &gt; is a quirk that only affects this device.<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Perhaps Jerry can help, since this is his change?<br>&gt; &gt; &gt; <br>&gt; &gt; &gt; Alexander<br>&gt; &gt; <br>&gt; &gt; Getting some caffeine in me, and starting to take a look. Adding<br>&gt; &gt; Jarkko as well since this might involve the general locality changes.<br>&gt; &gt; <br>&gt; &gt; Laurent, if I send you a patch with some debugging code added, would<br>&gt; &gt; you be able to run it on that system? I wasn't running into issues<br>&gt; &gt; on the system I had with a 1.2 device, but I no longer have access<br>&gt; &gt; to it. I'll see if I can find one in our labs and reproduce it there.<br>&gt; <br>&gt; Yes I should be able to do that<br><br>Any findings?<br><br>/Jarkko<br></body></html>

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

[-- Attachment #3: Type: text/plain, Size: 192 bytes --]

_______________________________________________
tpmdd-devel mailing list
tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

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

end of thread, back to index

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 11:28 tpm device not showing up in /dev anymore Laurent Bigonville
     [not found] ` <f9526f55-df96-64fc-a4d6-877ce04e7156-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2017-08-29 16:00   ` Alexander.Steffen-d0qZbvYSIPpWk0Htik3J/w
     [not found]     ` <dcad0104c46d4d5f88e642862bdb42c2-nFblLGNE8XKJSz+rYg/bSJowlv4uC7bZ@public.gmane.org>
2017-08-29 16:35       ` Laurent Bigonville
     [not found]         ` <47c4300b-8701-79a6-1c58-3a5853f4c5e3-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2017-08-29 17:39           ` Peter Huewe
2017-08-29 18:55           ` Laurent Bigonville
     [not found]             ` <595efb25-8d87-f39d-037f-9c9a98462339-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2017-08-31 12:10               ` Alexander.Steffen-d0qZbvYSIPpWk0Htik3J/w
     [not found]                 ` <857106e4bb864bb8a68b1381fffc8f50-nFblLGNE8XKJSz+rYg/bSJowlv4uC7bZ@public.gmane.org>
2017-08-31 16:40                   ` Jerry Snitselaar
2017-09-01 12:10                     ` Laurent Bigonville
     [not found]                       ` <0d9be244-ace0-030d-6ff9-c4e94c63b7e9-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2017-09-06  4:05                         ` Jarkko Sakkinen
     [not found]                           ` <20170906040555.fqedhmo5277sd6fq-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-14  8:13                             ` Jerry Snitselaar
2017-10-21  8:53                               ` Laurent Bigonville
     [not found]                                 ` <b63b765d-2477-d9fe-9d80-c2ea7e582bce-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2017-10-23 13:23                                   ` Jarkko Sakkinen
     [not found]                                     ` <20171023132346.jbqgokwv3ah2oqjo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-23 13:45                                       ` Jerry Snitselaar
2017-10-23 13:48                                         ` Laurent Bigonville
2017-10-24 13:51                                         ` Jarkko Sakkinen
     [not found]                                           ` <20171024135123.uqail7olnespun4k-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-24 14:57                                             ` Jerry Snitselaar
2017-10-24 16:07                                               ` Jarkko Sakkinen
     [not found]                                                 ` <20171024160725.r6kj452jdzpkbb6o-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-11-09  0:04                                                   ` Laurent Bigonville
     [not found]                                                     ` <8f4df9a9-c8cd-832f-4c3f-5305fabab7a8-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2017-11-09 19:58                                                       ` Laurent Bigonville
     [not found]                                                         ` <0a6e4771-f871-b3ca-b5b0-26dbd9efa8b1-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2017-11-09 23:50                                                           ` Jerry Snitselaar
     [not found]                                                             ` <20171109235005.pmklfw6zkjirahfa-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2017-11-10  2:19                                                               ` Jerry Snitselaar
2017-10-25  8:04                                             ` Laurent Bigonville
2017-09-06  5:09 Jerry Snitselaar

tpmdd-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/tpmdd-devel/0 tpmdd-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tpmdd-devel tpmdd-devel/ https://lore.kernel.org/tpmdd-devel \
		tpmdd-devel@lists.sourceforge.net
	public-inbox-index tpmdd-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/net.sourceforge.lists.tpmdd-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git