From: Heiko Carstens <hca@linux.ibm.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, Borislav Petkov <bp@suse.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH] random: discourage use of archrandom outside of rng
Date: Mon, 25 Jul 2022 13:33:25 +0200 [thread overview]
Message-ID: <Yt5/hRD3V0eSzDWb@osiris> (raw)
In-Reply-To: <20220725111038.720624-1-Jason@zx2c4.com>
On Mon, Jul 25, 2022 at 01:10:38PM +0200, Jason A. Donenfeld wrote:
> Borislav pointed out during the review of "random: handle archrandom
> with multiple longs" that people might actually use this function, which
> might not be good because the function has surprising semantics. This of
> course was also the case before that patch, and indeed RDSEED-like
> functions across architectures often behave surprisingly, failing often.
> While random.c has been written specifically to work with that behavior,
> not much else is well equipped for that.
>
> So add a comment suggesting that this is not for general consumption.
> Fortunately, nobody uses this for general consumption anyway, and people
> who try quickly find themselves in trouble. But adding this comment out
> of an abundance of caution was nonetheless suggested, and it at least
> means there will be easier justification for cleaning up potential
> misuses of the function later.
>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Suggested-by: Borislav Petkov <bp@suse.de>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> arch/arm64/include/asm/archrandom.h | 13 +++++++++++++
> arch/powerpc/include/asm/archrandom.h | 8 ++++++++
> arch/s390/include/asm/archrandom.h | 8 ++++++++
> arch/um/include/asm/archrandom.h | 8 ++++++++
> arch/x86/include/asm/archrandom.h | 9 ++++++---
> include/asm-generic/archrandom.h | 8 ++++++++
> 6 files changed, 51 insertions(+), 3 deletions(-)
For s390:
Acked-by: Heiko Carstens <hca@linux.ibm.com>
next prev parent reply other threads:[~2022-07-25 11:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 11:24 [PATCH] random: handle archrandom in plural words Jason A. Donenfeld
2022-07-17 11:43 ` Jason A. Donenfeld
2022-07-17 20:03 ` [PATCH v2] " Jason A. Donenfeld
2022-07-18 6:31 ` Michael Ellerman
2022-07-18 6:46 ` Gabriel Paubert
2022-07-20 3:03 ` Michael Ellerman
2022-07-19 12:42 ` Mark Rutland
2022-07-19 12:46 ` Jason A. Donenfeld
2022-07-19 13:02 ` [PATCH v3] random: handle archrandom with multiple longs Jason A. Donenfeld
2022-07-19 13:17 ` Mark Rutland
2022-07-19 13:48 ` Catalin Marinas
2022-07-22 12:06 ` Heiko Carstens
2022-07-24 22:47 ` Jason A. Donenfeld
2022-07-25 9:19 ` Borislav Petkov
2022-07-25 9:26 ` Jason A. Donenfeld
2022-07-25 9:36 ` David Laight
2022-07-25 9:37 ` Jason A. Donenfeld
2022-07-25 11:10 ` [PATCH] random: discourage use of archrandom outside of rng Jason A. Donenfeld
2022-07-25 11:25 ` Borislav Petkov
2022-07-25 11:33 ` Heiko Carstens [this message]
2022-07-25 13:02 ` Mark Rutland
2022-07-25 11:25 ` [PATCH v3] random: handle archrandom with multiple longs Borislav Petkov
2022-08-01 14:46 ` Harald Freudenberger
2022-08-01 14:50 ` Jason A. Donenfeld
2022-07-22 8:08 ` [PATCH v2] random: handle archrandom in plural words Holger Dengler
2022-07-22 11:22 ` Jason A. Donenfeld
2022-08-03 12:01 ` Holger Dengler
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=Yt5/hRD3V0eSzDWb@osiris \
--to=hca@linux.ibm.com \
--cc=Jason@zx2c4.com \
--cc=bp@suse.de \
--cc=catalin.marinas@arm.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mpe@ellerman.id.au \
/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