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]
Date:   Sat, 6 Jul 2019 20:25:39 -0400
From:   Nayna <nayna@...ux.vnet.ibm.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        Stefan Berger <stefanb@...ux.ibm.com>,
        Nayna Jain <nayna@...ux.ibm.com>,
        linux-integrity@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Cc:     Sachin Sant <sachinp@...ux.vnet.ibm.com>,
        George Wilson <gcwilson@...ux.ibm.com>,
        linux-kernel@...r.kernel.org, Mimi Zohar <zohar@...ux.ibm.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Peter Huewe <peterhuewe@....de>,
        Michal Suchanek <msuchanek@...e.de>
Subject: Re: [PATCH] tpm: fixes uninitialized allocated banks for IBM vtpm
 driver



On 07/05/2019 01:50 PM, Jarkko Sakkinen wrote:
> On Fri, 2019-07-05 at 11:32 -0400, Nayna wrote:
>> I am not sure of the purpose of tpm_stop_chip(), so I have left it as it
>> is. Jarkko, what do you think about the change ?
> Stefan right. Your does not work, or will randomly work or not work
> depending on the chip.
>
> You need to turn the TPM on with tpm_chip_start() and turn it off with
> tpm_chip_stop() once you are done. This is done in tpm_chip_register()
> before calling tpm_auto_startup().
>
> TPM power management was once in tpm_transmit() but not anymore after my
> patch set that removed nested tpm_transmit() calls.
>
> While you're on it please take into account my earlier feedback.
>
> Also, short summary could be "tpm: tpm_ibm_vtpm: Fix unallocated banks"
>
> Some oddballs in your patch that I have to ask.
>
> if (chip->flags & TPM_CHIP_FLAG_TPM2) {
> 	rc = tpm2_get_pcr_allocation(chip);
> 	if (rc)
> 		goto out;
> }
>
> chip->allocated_banks = kcalloc(1, sizeof(*chip->allocated_banks),
> 		GFP_KERNEL);
> if (!chip->allocated_banks) {
> 	rc = -ENOMEM;
> 	goto out;
> }
>
> Why you don't return on site and instead jump somewhere? Also the
> 2nd line for kcalloc() is misaligned.
>
> out:
> 	if (rc < 0)
> 		rc = -ENODEV;
>
> This will cause a new regression i.e. you let TPM error codes
> through.
>
> To summarize this patch fixes one regression and introduces two
> completely new ones...

Thanks Jarkko. I just now posted the v2 version that includes your and 
Stefan's feedbacks.

Thanks & Regards,
        - Nayna

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ