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: Fri, 27 Jul 2012 08:07:16 -0700 [thread overview]
Message-ID: <5012AEA4.2030803@zytor.com> (raw)
In-Reply-To: <20120727144959.GA22046@linux.vnet.ibm.com>
On 07/27/2012 07:49 AM, Kent Yoder wrote:
>>
>>> case Opt_new:
>>> - ret = my_get_random(payload->key, payload->key_len);
>>> + ret = tpm_get_random(TPM_ANY_NUM, payload->key,
>>> + &payload->key_len);
>>
>> payload->key_len is unsigned int, not size_t; this causes an
>> overwrite of blob_len on 64-bit platforms.
>
> Good catch.
>
It generated a compiler warning, so that one was trivial to spot.
-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 15:08 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 [this message]
2012-07-27 0:10 ` H. Peter Anvin
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=5012AEA4.2030803@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox