[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yt59lUGcUdgU1VDZ@zn.tnic>
Date: Mon, 25 Jul 2022 13:25:09 +0200
From: Borislav Petkov <bp@...e.de>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: linux-kernel@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
Catalin Marinas <catalin.marinas@....com>,
Mark Rutland <mark.rutland@....com>,
Michael Ellerman <mpe@...erman.id.au>,
Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH] random: discourage use of archrandom outside of rng
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@...e.de>
> Cc: Heiko Carstens <hca@...ux.ibm.com>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Johannes Berg <johannes@...solutions.net>
> Suggested-by: Borislav Petkov <bp@...e.de>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.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(-)
Acked-by: Borislav Petkov <bp@...e.de>
Thx.
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
(HRB 36809, AG Nürnberg)
Powered by blists - more mailing lists