From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Nayna <nayna@linux.vnet.ibm.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
"moderated list:TPM DEVICE DRIVER"
<tpmdd-devel@lists.sourceforge.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd
Date: Thu, 17 Nov 2016 09:42:41 -0800 [thread overview]
Message-ID: <20161117174241.wvyd7g5lj4ibfnry@intel.com> (raw)
In-Reply-To: <582D998C.40605@linux.vnet.ibm.com>
On Thu, Nov 17, 2016 at 05:20:36PM +0530, Nayna wrote:
> I tested this for capability TPM2_CAP_PCRS. It seems TPM2_CAP_PCRS
> capability always returns full PCR allocation, and more_data as 0, So, I
> think the idea of looping over based on more_data may not work for this
> capability.
You can always request one value at a time until there's no more.
If you request N values, depending on the hardware, the hardware returns
to you anything from 1 to N values. If you implement a function that
requests N values in the command, you *must* handle the case where
moreData is 1 even if the hardware you are testing that never happens.
That's the reason why I would start with a function that you request one
property of one capability and optimize it in future if it doesn't scale
for some workload.
Do you have a workload where it doesn't scale?
/Jarkko
next prev parent reply other threads:[~2016-11-17 17:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-09 10:14 [PATCH RFC 0/2] Generalize tpm2_get_tpm_pt to tpm2_get_cap Jarkko Sakkinen
2016-10-09 10:14 ` [PATCH RFC 1/2] tpm: move TPM 2.0 command and response constants to tpm2-cmd.c Jarkko Sakkinen
2016-10-09 10:14 ` [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd Jarkko Sakkinen
2016-11-11 4:21 ` [tpmdd-devel] " Nayna
2016-11-12 0:02 ` Jarkko Sakkinen
2016-11-14 23:48 ` Jarkko Sakkinen
2016-11-24 13:42 ` Nayna
2016-11-25 8:09 ` Jarkko Sakkinen
2016-11-17 11:50 ` Nayna
2016-11-17 17:42 ` Jarkko Sakkinen [this message]
2016-11-18 12:12 ` Nayna
2016-11-18 16:13 ` Jarkko Sakkinen
2016-11-22 9:08 ` Nayna
2016-11-22 11:03 ` Jarkko Sakkinen
2016-11-04 7:28 ` [PATCH RFC 0/2] Generalize tpm2_get_tpm_pt to tpm2_get_cap Jarkko Sakkinen
2016-11-11 4:42 ` Nayna
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=20161117174241.wvyd7g5lj4ibfnry@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nayna@linux.vnet.ibm.com \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®