All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [tpm2] ERROR: Failed to initialize tcti context: 0x1
@ 2017-09-22 12:24 Javier Martinez Canillas
  0 siblings, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2017-09-22 12:24 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

On 09/22/2017 11:26 AM, Javier Martinez Canillas wrote:
> On 09/22/2017 02:25 AM, Stuart Yoder wrote:
> 
> The only thing that I can think of is that your tpm2-tools were not built with
> TCTI abrmd support. This may happen if you built tpm2-tools before tpm2-abrmd,
> since tpm2-tools' configure script check for the TCTI abrmd header and libs.
> 
> Can you please check if configure said: "checking for TCTI_TABRMD... yes" and
> if your tools binaries are dynamically linked against the TCTI tabrmd library?
> 
> $ ldd $(which tpm2_pcrlist) | grep libtcti-tabrmd
>         libtcti-tabrmd.so.0 => /lib64/libtcti-tabrmd.so.0 (0x00007f3adf9a8000)
> 

Also, make sure you make clean before since there are some ifdefery magic to
choose the default TCTI used.

You can force using a specific TCTI with the common options or environment
variables, i.e:

$ tpm2_pcrlist -L sha1:7 -T abrmd

Best regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat

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

* Re: [tpm2] ERROR: Failed to initialize tcti context: 0x1
@ 2017-09-22 17:24 Javier Martinez Canillas
  0 siblings, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2017-09-22 17:24 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

Hello Stuart,

On 09/22/2017 05:23 PM, Stuart Yoder wrote:

[snip]

>>
>> Can you please check if configure said: "checking for TCTI_TABRMD... yes" and
>> if your tools binaries are dynamically linked against the TCTI tabrmd library?
>>
>> $ ldd $(which tpm2_pcrlist) | grep libtcti-tabrmd
>>          libtcti-tabrmd.so.0 => /lib64/libtcti-tabrmd.so.0 (0x00007f3adf9a8000)
> 
> The tools were not linked against libtcti-tabrmd, after reconfiguring, doing a
> clean, and rebuilding, it now is working.
>

Great, I'm glad that you solved your issue!
 
> Thanks!

You are welcome.

> Stuart
> 

Best regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat

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

* Re: [tpm2] ERROR: Failed to initialize tcti context: 0x1
@ 2017-09-22 15:23 Stuart Yoder
  0 siblings, 0 replies; 7+ messages in thread
From: Stuart Yoder @ 2017-09-22 15:23 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 2431 bytes --]



On 9/22/17 4:26 AM, Javier Martinez Canillas wrote:
> On 09/22/2017 02:25 AM, Stuart Yoder wrote:
>>
>>
>> On 9/21/17 6:42 PM, Javier Martinez Canillas wrote:
>>> Hello Stuart,
>>>
>>> On 09/21/2017 11:48 PM, Stuart Yoder wrote:
>>>> I'm trying to build/test tpm2-tools and am running into an issue.  This is on
>>>> an Ubuntu 16.04 machine and I know the tpm is alive and functioning
>>>> because the distro tpm2-tools package worked.  That's an older codebase, so I
>>>> wanted to build everything from source.
>>>>
>>>> So I've successfully built:  tpm2-tss, tpm2-tools, tpm2-abrmd.
>>>>
>>>> I followed the build/install instructions here:
>>>> https://github.com/01org/tpm2-abrmd/issues/92
>>>> ...which seem to follow what is recommended in INSTALL.md.
>>>>
>>>
>>> Since your distro is Ubuntu, and you want to use the tabrmd resource manager and
>>> the simulator, I would double check your steps with the ones made by the Travis
>>> CI, since it does the same that you want:
>>>
>>> https://github.com/01org/tpm2-tools/blob/master/.travis.yml#L51
>>>
>>> If you find any divergence between what's done there and the INSTALL file, please
>>> file an issue.
>>>    
>>>> I start tpm2-abrmd like this:
>>>> sudo -u tss tpm2-abrmd --tcti=device &
>>>>
>>>
>>> I think the problem is that you are using --tcti=device (and so telling the RM
>>> to access the TPM device directly). But IIUC you want to use the simulator, so
>>> instead need to do:
>>
>> Actually, I do want to use the physical TPM device.  As a diagnostic step I
>> built --with-simulatorbin to see what happened.  But, I would like to see
>> the hardware device work.
>>
> 
> Ah, sorry. I misunderstood your issue.
> 
> The only thing that I can think of is that your tpm2-tools were not built with
> TCTI abrmd support. This may happen if you built tpm2-tools before tpm2-abrmd,
> since tpm2-tools' configure script check for the TCTI abrmd header and libs.
> 
> Can you please check if configure said: "checking for TCTI_TABRMD... yes" and
> if your tools binaries are dynamically linked against the TCTI tabrmd library?
> 
> $ ldd $(which tpm2_pcrlist) | grep libtcti-tabrmd
>          libtcti-tabrmd.so.0 => /lib64/libtcti-tabrmd.so.0 (0x00007f3adf9a8000)

The tools were not linked against libtcti-tabrmd, after reconfiguring, doing a
clean, and rebuilding, it now is working.

Thanks!
Stuart

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

* Re: [tpm2] ERROR: Failed to initialize tcti context: 0x1
@ 2017-09-22  9:26 Javier Martinez Canillas
  0 siblings, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2017-09-22  9:26 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]

On 09/22/2017 02:25 AM, Stuart Yoder wrote:
> 
> 
> On 9/21/17 6:42 PM, Javier Martinez Canillas wrote:
>> Hello Stuart,
>>
>> On 09/21/2017 11:48 PM, Stuart Yoder wrote:
>>> I'm trying to build/test tpm2-tools and am running into an issue.  This is on
>>> an Ubuntu 16.04 machine and I know the tpm is alive and functioning
>>> because the distro tpm2-tools package worked.  That's an older codebase, so I
>>> wanted to build everything from source.
>>>
>>> So I've successfully built:  tpm2-tss, tpm2-tools, tpm2-abrmd.
>>>
>>> I followed the build/install instructions here:
>>> https://github.com/01org/tpm2-abrmd/issues/92
>>> ...which seem to follow what is recommended in INSTALL.md.
>>>
>>
>> Since your distro is Ubuntu, and you want to use the tabrmd resource manager and
>> the simulator, I would double check your steps with the ones made by the Travis
>> CI, since it does the same that you want:
>>
>> https://github.com/01org/tpm2-tools/blob/master/.travis.yml#L51
>>
>> If you find any divergence between what's done there and the INSTALL file, please
>> file an issue.
>>   
>>> I start tpm2-abrmd like this:
>>> sudo -u tss tpm2-abrmd --tcti=device &
>>>
>>
>> I think the problem is that you are using --tcti=device (and so telling the RM
>> to access the TPM device directly). But IIUC you want to use the simulator, so
>> instead need to do:
> 
> Actually, I do want to use the physical TPM device.  As a diagnostic step I
> built --with-simulatorbin to see what happened.  But, I would like to see
> the hardware device work.
>

Ah, sorry. I misunderstood your issue.

The only thing that I can think of is that your tpm2-tools were not built with
TCTI abrmd support. This may happen if you built tpm2-tools before tpm2-abrmd,
since tpm2-tools' configure script check for the TCTI abrmd header and libs.

Can you please check if configure said: "checking for TCTI_TABRMD... yes" and
if your tools binaries are dynamically linked against the TCTI tabrmd library?

$ ldd $(which tpm2_pcrlist) | grep libtcti-tabrmd
        libtcti-tabrmd.so.0 => /lib64/libtcti-tabrmd.so.0 (0x00007f3adf9a8000)

Best regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat

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

* Re: [tpm2] ERROR: Failed to initialize tcti context: 0x1
@ 2017-09-22  0:25 Stuart Yoder
  0 siblings, 0 replies; 7+ messages in thread
From: Stuart Yoder @ 2017-09-22  0:25 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]



On 9/21/17 6:42 PM, Javier Martinez Canillas wrote:
> Hello Stuart,
> 
> On 09/21/2017 11:48 PM, Stuart Yoder wrote:
>> I'm trying to build/test tpm2-tools and am running into an issue.  This is on
>> an Ubuntu 16.04 machine and I know the tpm is alive and functioning
>> because the distro tpm2-tools package worked.  That's an older codebase, so I
>> wanted to build everything from source.
>>
>> So I've successfully built:  tpm2-tss, tpm2-tools, tpm2-abrmd.
>>
>> I followed the build/install instructions here:
>> https://github.com/01org/tpm2-abrmd/issues/92
>> ...which seem to follow what is recommended in INSTALL.md.
>>
> 
> Since your distro is Ubuntu, and you want to use the tabrmd resource manager and
> the simulator, I would double check your steps with the ones made by the Travis
> CI, since it does the same that you want:
> 
> https://github.com/01org/tpm2-tools/blob/master/.travis.yml#L51
> 
> If you find any divergence between what's done there and the INSTALL file, please
> file an issue.
>   
>> I start tpm2-abrmd like this:
>> sudo -u tss tpm2-abrmd --tcti=device &
>>
> 
> I think the problem is that you are using --tcti=device (and so telling the RM
> to access the TPM device directly). But IIUC you want to use the simulator, so
> instead need to do:

Actually, I do want to use the physical TPM device.  As a diagnostic step I
built --with-simulatorbin to see what happened.  But, I would like to see
the hardware device work.

Stuart

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

* Re: [tpm2] ERROR: Failed to initialize tcti context: 0x1
@ 2017-09-21 23:42 Javier Martinez Canillas
  0 siblings, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2017-09-21 23:42 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]

Hello Stuart,

On 09/21/2017 11:48 PM, Stuart Yoder wrote:
> I'm trying to build/test tpm2-tools and am running into an issue.  This is on
> an Ubuntu 16.04 machine and I know the tpm is alive and functioning
> because the distro tpm2-tools package worked.  That's an older codebase, so I
> wanted to build everything from source.
> 
> So I've successfully built:  tpm2-tss, tpm2-tools, tpm2-abrmd.
> 
> I followed the build/install instructions here:
> https://github.com/01org/tpm2-abrmd/issues/92
> ...which seem to follow what is recommended in INSTALL.md.
>

Since your distro is Ubuntu, and you want to use the tabrmd resource manager and
the simulator, I would double check your steps with the ones made by the Travis
CI, since it does the same that you want:

https://github.com/01org/tpm2-tools/blob/master/.travis.yml#L51

If you find any divergence between what's done there and the INSTALL file, please
file an issue.
 
> I start tpm2-abrmd like this:
> sudo -u tss tpm2-abrmd --tcti=device &
>

I think the problem is that you are using --tcti=device (and so telling the RM
to access the TPM device directly). But IIUC you want to use the simulator, so
instead need to do:

$ sudo -u tss tpm2-abrmd --tcti=socket 

> ..and it runs, but when running a command like
> tpm2_pcrlist I get this error:
> 
>    ERROR: Failed to initialize tcti context: 0x1
> 
> Also, I built abrmb with these options:
> --enable-unit --with-simulatorbin=/usr/local/bin/tpm_server
> 
> ...and ran make check.  The unit tests pass, but the
> integration tests fail.
> 
> Anything obvious I am missing?
> 
> Thanks,
> Stuart
 
Best regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat

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

* [tpm2] ERROR: Failed to initialize tcti context: 0x1
@ 2017-09-21 21:48 Stuart Yoder
  0 siblings, 0 replies; 7+ messages in thread
From: Stuart Yoder @ 2017-09-21 21:48 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

I'm trying to build/test tpm2-tools and am running into an issue.  This is on
an Ubuntu 16.04 machine and I know the tpm is alive and functioning
because the distro tpm2-tools package worked.  That's an older codebase, so I
wanted to build everything from source.

So I've successfully built:  tpm2-tss, tpm2-tools, tpm2-abrmd.

I followed the build/install instructions here:
https://github.com/01org/tpm2-abrmd/issues/92
...which seem to follow what is recommended in INSTALL.md.

I start tpm2-abrmd like this:
sudo -u tss tpm2-abrmd --tcti=device &

..and it runs, but when running a command like
tpm2_pcrlist I get this error:

   ERROR: Failed to initialize tcti context: 0x1

Also, I built abrmb with these options:
--enable-unit --with-simulatorbin=/usr/local/bin/tpm_server

...and ran make check.  The unit tests pass, but the
integration tests fail.

Anything obvious I am missing?

Thanks,
Stuart

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

end of thread, other threads:[~2017-09-22 17:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 12:24 [tpm2] ERROR: Failed to initialize tcti context: 0x1 Javier Martinez Canillas
  -- strict thread matches above, loose matches on Subject: below --
2017-09-22 17:24 Javier Martinez Canillas
2017-09-22 15:23 Stuart Yoder
2017-09-22  9:26 Javier Martinez Canillas
2017-09-22  0:25 Stuart Yoder
2017-09-21 23:42 Javier Martinez Canillas
2017-09-21 21:48 Stuart Yoder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.