All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: u-boot@lists.denx.de
Subject: [PATCH v2 6/6] crypto/fsl: add RNG support
Date: Wed, 17 Jun 2020 22:55:23 +0200	[thread overview]
Message-ID: <fcca5736847f0ddb384b676f15bd1e56@walle.cc> (raw)
In-Reply-To: <c823196e-d9a1-bc20-0555-ea0cbc5c5163@nxp.com>

Am 2020-06-17 22:09, schrieb Horia Geant?:
> On 6/4/2020 6:48 PM, Michael Walle wrote:
>> +static int caam_rng_read(struct udevice *dev, void *data, size_t len)
>> +{
>> +	struct caam_rng_platdata *pdata = dev_get_platdata(dev);
>> +	u8 *buffer = data;
>> +	size_t size;
>> +	int ret;
>> +
>> +	while (len) {
>> +		ret = caam_rng_read_one(pdata);
>> +		if (ret)
>> +			return ret;
>> +
>> +		size = min(len, (size_t)CAAM_RNG_MAX_FIFO_STORE_SIZE);
>> +
>> +		memcpy(buffer, pdata->data, len);
> size instead of len.

nice catch.

Thanks for the review!

-michael

      reply	other threads:[~2020-06-17 20:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 15:46 [PATCH v2 0/6] crypto/fsl: add RNG support Michael Walle
2020-06-04 15:46 ` [PATCH v2 1/6] crypto/fsl: make SEC%u status line consistent Michael Walle
2020-06-16 14:02   ` Horia Geantă
2020-06-04 15:46 ` [PATCH v2 2/6] crypto/fsl: export caam_get_era() Michael Walle
2020-06-04 15:46 ` [PATCH v2 3/6] crypto/fsl: support newer SEC modules Michael Walle
2020-06-04 15:46 ` [PATCH v2 4/6] crypto/fsl: don't regenerate secure keys Michael Walle
2020-06-17 18:03   ` Horia Geantă
2020-06-17 20:25     ` Michael Walle
2020-06-04 15:46 ` [PATCH v2 5/6] crypto/fsl: instantiate the RNG with prediciton resistance Michael Walle
2020-06-04 16:16   ` Michael Walle
2020-06-17 19:15   ` Horia Geantă
2020-06-17 20:48     ` Michael Walle
2020-06-19 16:37       ` Horia Geantă
2020-06-19 16:54         ` Horia Geantă
2020-06-19 19:02           ` Michael Walle
2020-06-22 14:30             ` Horia Geantă
2020-06-04 15:46 ` [PATCH v2 6/6] crypto/fsl: add RNG support Michael Walle
2020-06-17 20:09   ` Horia Geantă
2020-06-17 20:55     ` Michael Walle [this message]

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=fcca5736847f0ddb384b676f15bd1e56@walle.cc \
    --to=michael@walle.cc \
    --cc=u-boot@lists.denx.de \
    /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.