Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-13 Thread Jarkko Sakkinen
On Tue, Nov 13, 2018 at 02:34:39PM +0100, Roberto Sassu wrote: > On 11/8/2018 2:46 PM, Jarkko Sakkinen wrote: > > Orrayn Tue, Nov 06, 2018 at 04:01:54PM +0100, Roberto Sassu wrote: > > > This patch removes the hard-coded limit of the active_banks array size. > > > It stores in the tpm_chip structur

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-13 Thread Roberto Sassu
Adding in CC Monty and Dave. On 11/8/2018 2:46 PM, Jarkko Sakkinen wrote: Orrayn Tue, Nov 06, 2018 at 04:01:54PM +0100, Roberto Sassu wrote: This patch removes the hard-coded limit of the active_banks array size. It stores in the tpm_chip structure the number of active PCR banks, determined in

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-13 Thread Roberto Sassu
On 11/8/2018 2:46 PM, Jarkko Sakkinen wrote: Orrayn Tue, Nov 06, 2018 at 04:01:54PM +0100, Roberto Sassu wrote: This patch removes the hard-coded limit of the active_banks array size. It stores in the tpm_chip structure the number of active PCR banks, determined in tpm2_get_pcr_allocation(), and

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Jarkko Sakkinen
On Thu, Nov 08, 2018 at 10:29:53AM -0500, Mimi Zohar wrote: > On Thu, 2018-11-08 at 17:21 +0200, Jarkko Sakkinen wrote: > > On Thu, Nov 08, 2018 at 07:20:51PM +0530, Nayna Jain wrote: > > > Based on a discussion with Ken, the count in the TPML_PCR_SELECTION > > > returns > > > the number of possib

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Mimi Zohar
On Thu, 2018-11-08 at 17:21 +0200, Jarkko Sakkinen wrote: > On Thu, Nov 08, 2018 at 07:20:51PM +0530, Nayna Jain wrote: > > Based on a discussion with Ken, the count in the TPML_PCR_SELECTION returns > > the number of possible algorithms supported. In the example below, two > > possible algorithms

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Jarkko Sakkinen
On Thu, Nov 08, 2018 at 03:24:46PM +0100, Roberto Sassu wrote: > Should I include the patch for tpm_pcr_extend() in this patch set, even > if the set fixes the digest size issue? Just add some note to the cover letter. Makes sense here to have a prequel patch for that because otherwise the impleme

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Jarkko Sakkinen
On Thu, Nov 08, 2018 at 07:20:51PM +0530, Nayna Jain wrote: > Based on a discussion with Ken, the count in the TPML_PCR_SELECTION returns > the number of possible algorithms supported. In the example below, two > possible algorithms - SHA1 and SHA256 - are returned. > > # /usr/local/bin/tssgetcapa

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Roberto Sassu
On 11/8/2018 2:50 PM, Nayna Jain wrote: On 11/07/2018 03:11 PM, Roberto Sassu wrote: On 11/7/2018 7:14 AM, Nayna Jain wrote: On 11/06/2018 08:31 PM, Roberto Sassu wrote: This patch removes the hard-coded limit of the active_banks array size. The hard-coded limit in static array active_b

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Roberto Sassu
On 11/8/2018 2:46 PM, Jarkko Sakkinen wrote: Orrayn Tue, Nov 06, 2018 at 04:01:54PM +0100, Roberto Sassu wrote: This patch removes the hard-coded limit of the active_banks array size. It stores in the tpm_chip structure the number of active PCR banks, determined in tpm2_get_pcr_allocation(), and

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Nayna Jain
On 11/07/2018 03:11 PM, Roberto Sassu wrote: On 11/7/2018 7:14 AM, Nayna Jain wrote: On 11/06/2018 08:31 PM, Roberto Sassu wrote: This patch removes the hard-coded limit of the active_banks array size. The hard-coded limit in static array active_banks[] represents the maximum possible

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-08 Thread Jarkko Sakkinen
Orrayn Tue, Nov 06, 2018 at 04:01:54PM +0100, Roberto Sassu wrote: > This patch removes the hard-coded limit of the active_banks array size. > It stores in the tpm_chip structure the number of active PCR banks, > determined in tpm2_get_pcr_allocation(), and replaces the static array > with a pointe

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-07 Thread Mimi Zohar
On Wed, 2018-11-07 at 11:44 +0530, Nayna Jain wrote: > On 11/06/2018 08:31 PM, Roberto Sassu wrote: > > @@ -878,11 +877,14 @@ static ssize_t tpm2_get_pcr_allocation(struct > > tpm_chip *chip) > > if (rc) > > goto out; > > > > - count = be32_to_cpup( > > + chip->nr_active_bank

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-07 Thread Roberto Sassu
On 11/7/2018 7:14 AM, Nayna Jain wrote: On 11/06/2018 08:31 PM, Roberto Sassu wrote: This patch removes the hard-coded limit of the active_banks array size. The hard-coded limit in static array active_banks[] represents the maximum possible banks. A TPM might have three banks, but only on

Re: [PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-06 Thread Nayna Jain
On 11/06/2018 08:31 PM, Roberto Sassu wrote: This patch removes the hard-coded limit of the active_banks array size. The hard-coded limit in static array active_banks[] represents the maximum possible banks. A TPM might have three banks, but only one bank may be active. To confirm my und

[PATCH v4 1/6] tpm: dynamically allocate active_banks array

2018-11-06 Thread Roberto Sassu
This patch removes the hard-coded limit of the active_banks array size. It stores in the tpm_chip structure the number of active PCR banks, determined in tpm2_get_pcr_allocation(), and replaces the static array with a pointer to a dynamically allocated array. As a consequence of the introduction o