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:	Fri, 27 Jul 2012 09:51:29 -0500
From:	Kent Yoder <key@...ux.vnet.ibm.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	linux-kernel@...r.kernel.org, tpmdd-devel@...ts.sourceforge.net,
	m.selhorst@...rix.com, safford@...ibm.com
Subject: Re: [PATCH 1/2] tpm: Move tpm_get_random api into the TPM device
 driver

On Thu, Jul 26, 2012 at 05:10:44PM -0700, H. Peter Anvin wrote:
> On 06/07/2012 11:47 AM, Kent Yoder wrote:
> >Move the tpm_get_random api from the trusted keys code into the TPM
> >device driver itself so that other callers can make use of it. Also,
> >change the api slightly so that the number of bytes read is returned in
> >the call, since the TPM command can potentially return fewer bytes than
> >requested.
> >
> >Signed-off-by: Kent Yoder <key@...ux.vnet.ibm.com>
> 
> I see a second problem with this patch: you don't seem to handle the
> case where you get a short return anywhere in your code.  Presumably
> this should either be considered an error condition, or you need to
> create a private wrapper which can loop and make additional
> requests.
> 
> As it is if you get a short return you simply proceed as if you had
> gotten what you requested, since this was not an error mode
> supported by the old code.

Right, I did notice this but didn't think I was creating a regression
so I left it.  I'll add both a loop and then error out if that fails.

Thanks,
Kent

> 
> 	-hpa
> 
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ