public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Harald Freudenberger <freude@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Ingo Franzki <ifranzki@linux.ibm.com>,
	Juergen Christ <jchrist@linux.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [PATCH] s390/archrandom: simplify back to earlier design
Date: Mon, 20 Jun 2022 13:03:19 +0200	[thread overview]
Message-ID: <YrBT97lARo2QAWVF@zx2c4.com> (raw)
In-Reply-To: <1e6dd1baa9a5d7a665917793e2df785c@linux.ibm.com>

Hi Harald,

On Mon, Jun 20, 2022 at 12:54:11PM +0200, Harald Freudenberger wrote:
> Hi Jason, I've been on vacation and now seen your s390 arch random 
> rework.
> Your assumption is right. The hw TRNG we have on the s390 platform is
> relatively expensive and I had to learn that directly calling the TRNG
> as part of an arch_get_random_{long,int} is not the right way. As we
> also have a NIST 800-90A conform PRNG in hardware, I used it as some
> kind of caching the TRNG random data.

Indeed that's what I saw. I actually think this kind of caching is
undesirable from an rng perspective too, since it essentially means we
have two software rngs, with different lifetimes and semantics on key
duration. So getting rid of that seems like a benefit.

> With all the changes in random.c there is no need to provide any
> arch_get_random_{long,int}() implementation any more.
> However, the arch_get_random_seed functions should provide TRNG
> values to random.c and so I'll have a close look onto your changes.

Right, that's what my patch does.

> Thanks for your patches, I'll come back with some feedback.

Thanks, looking forward. Please be sure to read v3 of the bunch I sent
(rather than this v1 you're replying to here):
https://lore.kernel.org/lkml/20220610222023.378448-1-Jason@zx2c4.com/

Jason

      reply	other threads:[~2022-06-20 11:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 11:10 [PATCH] s390/archrandom: simplify back to earlier design Jason A. Donenfeld
2022-06-10 22:13 ` [PATCH v2] s390/archrandom: simplify back to earlier design and initialize earlier Jason A. Donenfeld
2022-06-10 22:20   ` [PATCH v3] " Jason A. Donenfeld
2022-06-22 12:10     ` Harald Freudenberger
2022-06-20 10:54 ` [PATCH] s390/archrandom: simplify back to earlier design Harald Freudenberger
2022-06-20 11:03   ` Jason A. Donenfeld [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=YrBT97lARo2QAWVF@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=freude@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=ifranzki@linux.ibm.com \
    --cc=jchrist@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=stable@vger.kernel.org \
    /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