Re: [PATCH v3 1/5] tpm: change the end marker of the active_banks array to zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >>> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> >>> index 1a803b0cf980..f7fc4b5ee239 100644
> >>> --- a/drivers/char/tpm/tpm-interface.c
> >>> +++ b/drivers/char/tpm/tpm-interface.c
> >>> @@ -1051,7 +1051,7 @@ int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash)
> >>>   		memset(digest_list, 0, sizeof(digest_list));
> >>>   
> >>>   		for (i = 0; i < ARRAY_SIZE(chip->active_banks) &&
> >>> -			    chip->active_banks[i] != TPM2_ALG_ERROR; i++) {
> >>> +			    chip->active_banks[i]; i++) {
> >>>   			digest_list[i].alg_id = chip->active_banks[i];
> >>>   			memcpy(digest_list[i].digest, hash, TPM_DIGEST_SIZE);
> >>>   			count++;
> > 
> > The fourth patch further updates this code.  Please move those changes
> > to this first patch.  No need to touch the same code in both places.
> 
> alg_id is introduced in patch 4/5. It cannot be moved here.

Thanks, I missed that.

Mimi 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux