From: "H. Peter Anvin" <hpa@zytor.com>
To: Kent Yoder <key@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net,
m.selhorst@sirrix.com, safford@us.ibm.com
Subject: Re: [PATCH 1/2] tpm: Move tpm_get_random api into the TPM device driver
Date: Thu, 26 Jul 2012 17:10:44 -0700 [thread overview]
Message-ID: <5011DC84.6010003@zytor.com> (raw)
In-Reply-To: <1339094834.21398.4.camel@key-ThinkPad-W510>
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@linux.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.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2012-07-27 0:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 18:42 [PATCH 0/2] Move the tpm_get_random api and add an hwrng driver for it Kent Yoder
2012-06-07 18:47 ` [PATCH 1/2] tpm: Move tpm_get_random api into the TPM device driver Kent Yoder
2012-06-08 19:13 ` David Safford
2012-07-26 22:12 ` H. Peter Anvin
2012-07-27 14:49 ` Kent Yoder
2012-07-27 15:07 ` H. Peter Anvin
2012-07-27 0:10 ` H. Peter Anvin [this message]
2012-07-27 14:51 ` Kent Yoder
2012-06-07 18:47 ` [PATCH 2/2] hw_random: add support for the TPM chip as a hardware RNG source Kent Yoder
2012-06-08 19:13 ` David Safford
2012-07-26 21:58 ` H. Peter Anvin
2012-07-26 22:28 ` H. Peter Anvin
2012-06-08 19:13 ` [PATCH 0/2] Move the tpm_get_random api and add an hwrng driver for it David Safford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5011DC84.6010003@zytor.com \
--to=hpa@zytor.com \
--cc=key@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.selhorst@sirrix.com \
--cc=safford@us.ibm.com \
--cc=tpmdd-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.