linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@fungible.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mips: allow firmware to pass RNG seed to kernel
Date: Thu, 6 Oct 2022 13:28:20 +0200	[thread overview]
Message-ID: <e1a64ab1-1e6f-0551-9bb4-7866c422fb81@fungible.com> (raw)
In-Reply-To: <CAHmME9pbVUxTJrF-2XRHsz07P127TyvEWbDL38hi2YdRry+pAQ@mail.gmail.com>

On 4/10/22 00:30, Jason A. Donenfeld wrote:
> Hi Philippe,
> 
> On Tue, Oct 4, 2022 at 12:07 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>> +       add_bootloader_randomness(rng_seed, len);
>>
>> So we call char/random code with len=0. Is it safe?
>> Maybe simply safer to check len before calling hex2bin?
> 
> add_bootloader_randomness() is safe for all input sizes, and is
> written to be callable with len=0 and have no effect. So this function
> should be good as-is; there's no need to special case an unlikely
> instance that's already handled by add_bootloader_randomness().

OK, thanks for the clarification.

Phil.

      reply	other threads:[~2022-10-06 11:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 14:01 [PATCH] mips: allow firmware to pass RNG seed to kernel Jason A. Donenfeld
2022-10-01 16:09 ` Thomas Bogendoerfer
2022-10-03 22:07 ` Philippe Mathieu-Daudé
2022-10-03 22:30   ` Jason A. Donenfeld
2022-10-06 11:28     ` Philippe Mathieu-Daudé [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=e1a64ab1-1e6f-0551-9bb4-7866c422fb81@fungible.com \
    --to=philmd@fungible.com \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).