TPM2 (Trusted Platform Module) userspace development
 help / color / mirror / Atom feed
From: Tadeusz Struk <tstruk at gmail.com>
To: tpm2@lists.01.org
Subject: [tpm2] Re: tpm2_flushcontext stuck
Date: Mon, 20 Dec 2021 10:57:26 -0800	[thread overview]
Message-ID: <964b6c7d-f045-c93a-d260-363c79eee8fb@gmail.com> (raw)
In-Reply-To: 4055fbd2-3816-6458-f874-ebd194e588b1@sit.fraunhofer.de

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

On 12/19/21 04:17, Juergen Repp wrote:
> Am 18.12.21 um 20:34 schrieb Han:
>> I probably missed it,  how can I specify to make sure /dev/tpm0 is used, and not /dev/tpmrm0 ?  Is it in some configurations?
>>
> You can use the TPM without resource manager with:
> 
> tpm2_createprimary  -Tdevice:/dev/tpm0 -C o -g sha256 -G ecc -c primary.ctx
> tpm2_getcap handles-transient -Tdevice:/dev/tpm0
> tpm2_flushcontext -Tdevice:/dev/tpm0 0x80000000

The problem is that when /dev/tpm0 is used it just sends a request straight to
the tpm and the tpm responds with a valid error message, which it then passed 
back to tcti. In case of /dev/tpmrm0 the RM tries to first load the none 
existing object 0x80000000 from its cash, but since it cannot find it just
returns an error code -22 (EINVAL) and nothing gets send to the tpm.
The tpm_dev_async_work() handler needs to be modified to handle such error cases
as well. I will send a fix for this.

Thanks,
--
Tadeusz

             reply	other threads:[~2021-12-20 18:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 18:57 Tadeusz Struk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-29 21:31 [tpm2] Re: tpm2_flushcontext stuck Han
2022-03-29 21:04 Tadeusz Struk
2022-03-29 20:01 Roberts, William C
2022-03-24 19:08 Tadeusz Struk
2021-12-21 14:40 Roberts, William C
2021-12-20 22:06 Juergen Repp
2021-12-20 20:04 Kenneth Goldman
2021-12-20 19:13 Han
2021-12-19 12:17 Juergen Repp
2021-12-18 19:34 Han
2021-12-18 19:33 Han
2021-12-18 14:11 Juergen Repp
2021-12-18 13:54 Juergen Repp
2021-12-17 23:58 Han
2021-12-17 20:51 Roberts, William C
2021-12-17 20:10 Kenneth Goldman
2021-12-17 20:04 Han
2021-12-17 18:29 Roberts, William C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=964b6c7d-f045-c93a-d260-363c79eee8fb@gmail.com \
    --to=tpm2@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox