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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190129192941.GB14305@linux.intel.com>
Date:   Tue, 29 Jan 2019 21:29:41 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     Roberto Sassu <roberto.sassu@...wei.com>
Cc:     zohar@...ux.ibm.com, david.safford@...com, monty.wiseman@...com,
        matthewgarrett@...gle.com, linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, keyrings@...r.kernel.org,
        silviu.vlasceanu@...wei.com
Subject: Re: [PATCH v8 1/7] tpm: dynamically allocate the allocated_banks
 array

On Thu, Jan 24, 2019 at 04:49:04PM +0100, Roberto Sassu wrote:
> +	chip->allocated_banks = kcalloc(1, sizeof(*chip->allocated_banks),
> +					GFP_KERNEL);
> +	if (!chip->allocated_banks) {
> +		rc = -ENOMEM;
> +		goto out;
> +	}
> +
> +	chip->allocated_banks[0] = TPM2_ALG_SHA1;
> +	chip->nr_allocated_banks = 1;

Everything else looks nice in this patch except this.

You always branch for TPM 1.2, and it will always have just SHA1. This
is unnecessary.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ