Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1524613

Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd
Date 2016-11-17 18:50 +0100
Message-ID <sEyYW-3Mb-47@gated-at.bofh.it> (permalink)
References <sqjn3-2WV-9@gated-at.bofh.it> <sqjn4-2WV-33@gated-at.bofh.it> <sCbDr-7T1-3@gated-at.bofh.it> <sCu3n-31f-3@gated-at.bofh.it> <sEtwd-b3-15@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-12 01:10 +0100
  Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-15 00:50 +0100
    Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Nayna <nayna@linux.vnet.ibm.com> - 2016-11-24 14:50 +0100
      Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-25 09:20 +0100
  Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Nayna <nayna@linux.vnet.ibm.com> - 2016-11-17 13:00 +0100
    Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-17 18:50 +0100
      Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Nayna <nayna@linux.vnet.ibm.com> - 2016-11-18 13:20 +0100
        Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-18 17:20 +0100
          Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Nayna <nayna@linux.vnet.ibm.com> - 2016-11-22 10:10 +0100
            Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to  tpm2_getcap_cmd Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-11-22 12:10 +0100

csiph-web