linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kgold@linux.vnet.ibm.com (Ken Goldman)
To: linux-security-module@vger.kernel.org
Subject: Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount
Date: Fri, 11 Aug 2017 17:54:19 -0400	[thread overview]
Message-ID: <b8693dd5-7c28-f8f0-fa27-1f204ef7e64c@linux.vnet.ibm.com> (raw)
In-Reply-To: <trinity-56ff4f3f-5e08-4aac-9353-a7b88fe91f01-1502311387207@3c-app-gmx-bs76>

On 8/9/2017 4:43 PM, Peter Huewe wrote:
> 
> Yes that's bad, especially with current msleep(5) is actually
> msleep(20). However, please also keep in mind SPI tpms show a much
> higher burst count value,  (255) our I2C TPM SLB9645 even shows
> something in the range of 1k. :)

One of our platforms has a TPM 1.2 with an 8 byte FIFO and a static 
burst count.  This is where we're debugging.

>> Would another solution be to reduce the burst count poll and sleep
>> to, e.g., 100 usec or even 10 usec? This would probably help
>> greatly, but till not incur the wait states that triggered the
>> NACK.
>
> If you use sleep it's not guaranteed that you wakeup after exactly xx
> specified amount of time. Just that you sleep at least xx amount of
> time. Otherwise you would have to do delay/busywaiting.

Understood.  However, if the DD maintainers will not accept ignoring 
burstCount, would a short sleep (e.g., 10 usec) be acceptable.

If so, we can benchmark it.

> Imho the best option is to figure out whether any vendor can
> determine the "FIFO flush time" i.e. how much time does it take to
> empty the fifo and fillup the burstcount and use this on the lower
> bound of an usleep range. I don't think tpms are in the range of < 10
> us...
> 
> @Ken: Maybe can you check in DDWG?

I asked this week.

Nuvoton, ST Micro, and Infineon confirmed that the TPM empties a byte 
from the FIFO in under 1 usec.  So, even with a static burst count, the 
entire FIFO would empty in under 10 usec.

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-08-11 21:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 11:46 [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Nayna Jain
2017-08-07 11:52 ` Peter Huewe
2017-08-07 14:25   ` Nayna
2017-08-08 21:50     ` Jarkko Sakkinen
2017-08-08 19:11   ` Jarkko Sakkinen
2017-08-09 20:23     ` [tpmdd-devel] " Ken Goldman
2017-08-09 20:43       ` Aw: " Peter Huewe
2017-08-11 21:54         ` Ken Goldman [this message]
     [not found]           ` <20170814101046.5hqrkaqmfvl7ugwj@linux.intel.com>
2017-08-16 19:51             ` Ken Goldman
2017-08-09 20:25     ` Ken Goldman
2017-08-09 21:00       ` Aw: " Peter Huewe
2017-08-11 11:14         ` Jarkko Sakkinen
2017-08-11 15:30           ` Mimi Zohar
2017-08-14 10:51             ` Jarkko Sakkinen
2017-08-14 10:56               ` Jarkko Sakkinen
2017-08-14 12:03                 ` Mimi Zohar
2017-08-15  6:08                   ` Jarkko Sakkinen
2017-08-14 12:12                 ` Mimi Zohar
2017-08-15  6:09                   ` Jarkko Sakkinen
2017-08-11 21:32         ` Aw: " Ken Goldman
2017-08-13 23:53           ` msuchanek
2017-08-15 22:02             ` Ken Goldman
2017-08-16 10:24               ` Michal Suchánek
2017-08-11 21:42       ` [Linux-ima-devel] " Ken Goldman
2017-08-08 19:07 ` Jarkko Sakkinen

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=b8693dd5-7c28-f8f0-fa27-1f204ef7e64c@linux.vnet.ibm.com \
    --to=kgold@linux.vnet.ibm.com \
    --cc=linux-security-module@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).