From: Michael Ellerman <mpe@ellerman.id.au>
To: Paul Mackerras <paulus@samba.org>, linuxppc-dev@ozlabs.org
Cc: tytso@mit.edu, herbert@gondor.apana.org.au, mpm@selenic.com,
hpa@linux.intel.com, keescook@chromium.org
Subject: Re: [v2] powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_*
Date: Mon, 3 Aug 2015 11:35:03 +1000 (AEST) [thread overview]
Message-ID: <20150803013503.7A0E61402D7@ozlabs.org> (raw)
In-Reply-To: <20150717101143.GD5916@iris.ozlabs.ibm.com>
On Fri, 2015-17-07 at 10:11:43 UTC, Paul Mackerras wrote:
> The hardware RNG on POWER8 and POWER7+ can be relatively slow, since
> it can only supply one 64-bit value per microsecond. Currently we
> read it in arch_get_random_long(), but that slows down reading from
> /dev/urandom since the code in random.c calls arch_get_random_long()
> for every longword read from /dev/urandom.
>
> Since the hardware RNG supplies high-quality entropy on every read, it
> matches the semantics of arch_get_random_seed_long() better than those
> of arch_get_random_long(). Therefore this commit makes the code use
> the POWER8/7+ hardware RNG only for arch_get_random_seed_{long,int}
> and not for arch_get_random_{long,int}.
>
> This won't affect any other PowerPC-based platforms because none of
> them currently support a hardware RNG. To make it clear that the
> ppc_md function pointer is used for arch_get_random_seed_*, we rename
> it from get_random_long to get_random_seed.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/01c9348c7620ec650aae
cheers
prev parent reply other threads:[~2015-08-03 1:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 10:11 [PATCH v2] powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* Paul Mackerras
2015-08-03 1:35 ` Michael Ellerman [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=20150803013503.7A0E61402D7@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@linux.intel.com \
--cc=keescook@chromium.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpm@selenic.com \
--cc=paulus@samba.org \
--cc=tytso@mit.edu \
/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).