lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54e552fa-9f20-60e4-5ac9-38c567243737@huawei.com>
Date:   Thu, 13 Dec 2018 09:14:23 +0100
From:   Roberto Sassu <roberto.sassu@...wei.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
CC:     <zohar@...ux.ibm.com>, <david.safford@...com>,
        <monty.wiseman@...com>, <linux-integrity@...r.kernel.org>,
        <linux-security-module@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <silviu.vlasceanu@...wei.com>,
        Nayna Jain <nayna@...ux.ibm.com>
Subject: Re: [PATCH v6 1/7] tpm: dynamically allocate the allocated_banks
 array

On 12/12/2018 7:32 PM, Jarkko Sakkinen wrote:
> On Thu, Dec 06, 2018 at 06:56:33PM +0100, Roberto Sassu wrote:
>> 2 PCR selections
>>      hash TPM_ALG_SHA1
>>      TPMS_PCR_SELECTION length 3
>>      ff ff ff
>>      hash TPM_ALG_SHA256
>>      TPMS_PCR_SELECTION length 3
>>      00 00 00
>>
>> The pcr_select fields - "ff ff ff" and "00 00 00" - are bit masks for
>> the enabled PCRs. The SHA1 bank is enabled for all PCRs (0-23), while
>> the SHA256 bank is not enabled.
> 
> Uh, thanks. Can you add a note to the commit message?

Ok.


>>>
>>> /* Check that at least some of the PCRs have been allocated. This is
>>>    * required because CAP_PCRS ...
>>>    */
>>> if (memchr_inv(pcr_selection.pcr_select, 0, pcr_selection.size_of_select))
>>> 	nr_allocated_banks++;
>>>
>>> [yeah, comment would be awesome about CAP_PCRS. Did not finish up the
>>> comment because I don't know the answer]
>>>
>>> In addition, it would be consistent to call the local variable also
>>> nr_allocated_banks (not nr_alloc_banks).
>>
>> Unfortunately, I exceed the limit of characters per line.
> 
> Not sure what you mean?

---
-		chip->allocated_banks[nr_alloc_banks] = hash_alg;
+		chip->allocated_banks[nr_alloc_banks].alg_id = hash_alg;
---

If I use nr_allocated_banks, the line above (see patch 5/7) exceeds the
limit of 80 characters.

Roberto


> /Jarkko
> 

-- 
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Bo PENG, Jian LI, Yanli SHI

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ