Re: [PATCH v2 3/3] tpm: retrieve digest size of unknown algorithms with PCR read

2018-09-18 Thread Jarkko Sakkinen
On Tue, Sep 18, 2018 at 09:14:43AM +0200, Roberto Sassu wrote: > On 9/17/2018 11:16 PM, Jarkko Sakkinen wrote: > > On Mon, Sep 17, 2018 at 12:02:56PM +0200, Roberto Sassu wrote: > > > This code has the same behavior of tpm2_get_pcr_allocation(). If some > > > banks are not used, set the algorithm o

Re: [PATCH v2 3/3] tpm: retrieve digest size of unknown algorithms with PCR read

2018-09-18 Thread Roberto Sassu
On 9/17/2018 11:16 PM, Jarkko Sakkinen wrote: On Mon, Sep 17, 2018 at 12:02:56PM +0200, Roberto Sassu wrote: This code has the same behavior of tpm2_get_pcr_allocation(). If some banks are not used, set the algorithm of the first unused to TPM_ALG_ERROR. My point is that maybe it would sense t

Re: [PATCH v2 3/3] tpm: retrieve digest size of unknown algorithms with PCR read

2018-09-17 Thread Jarkko Sakkinen
On Mon, Sep 17, 2018 at 12:02:56PM +0200, Roberto Sassu wrote: > This code has the same behavior of tpm2_get_pcr_allocation(). If some > banks are not used, set the algorithm of the first unused to > TPM_ALG_ERROR. My point is that maybe it would sense to use zero for that in order to make code a

Re: [PATCH v2 3/3] tpm: retrieve digest size of unknown algorithms with PCR read

2018-09-17 Thread Roberto Sassu
On 9/16/2018 2:37 PM, Jarkko Sakkinen wrote: On Wed, Sep 05, 2018 at 01:42:02PM +0200, Roberto Sassu wrote: Currently, the TPM driver retrieves the digest size from a table mapping TPM algorithms identifiers to identifiers defined by the crypto subsystem. If the algorithm is not defined by the l