[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YsUuiSP1VW1ok69g@kroah.com>
Date: Wed, 6 Jul 2022 08:41:13 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>,
linux-arm-kernel@...ts.infradead.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>,
Heiko Carstens <hca@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2] random: remove CONFIG_ARCH_RANDOM
On Wed, Jul 06, 2022 at 02:32:25AM +0200, Jason A. Donenfeld wrote:
> When RDRAND was introduced, there was much discussion on whether it
> should be trusted and how the kernel should handle that. Initially, two
> mechanisms cropped up, CONFIG_ARCH_RANDOM, a compile time switch, and
> "nordrand", a boot-time switch.
>
> Later the thinking evolved. With a properly designed RNG, using RDRAND
> values alone won't harm anything, even if the outputs are malicious.
> Rather, the issue is whether those values are being *trusted* to be good
> or not. And so a new set of options were introduced as the real
> ones that people use -- CONFIG_RANDOM_TRUST_CPU and "random.trust_cpu".
> With these options, RDRAND is used, but it's not always credited. So in
> the worst case, it does nothing, and in the best case, maybe it helps.
>
> Along the way, CONFIG_ARCH_RANDOM's meaning got sort of pulled into the
> center and became something certain platforms force-select.
>
> The old options don't really help with much, and it's a bit odd to have
> special handling for these instructions when the kernel can deal fine
> with the existence or untrusted existence or broken existence or
> non-existence of that CPU capability.
>
> So this commit simplifies things down to the two options that are
> actually used, and removes the confusing old ones that aren't used or
> useful. It leaves "nordrand" for now, as the removal of that will take a
> different route.
>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: Heiko Carstens <hca@...ux.ibm.com>
> Cc: Alexander Gordeev <agordeev@...ux.ibm.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---
> arch/arm64/Kconfig | 8 --------
> arch/arm64/include/asm/archrandom.h | 10 ----------
> arch/arm64/kernel/cpufeature.c | 2 --
> arch/powerpc/Kconfig | 3 ---
> arch/powerpc/include/asm/archrandom.h | 3 ---
> arch/powerpc/include/asm/machdep.h | 2 --
> arch/powerpc/platforms/microwatt/Kconfig | 1 -
> arch/powerpc/platforms/powernv/Kconfig | 1 -
> arch/powerpc/platforms/pseries/Kconfig | 1 -
> arch/s390/Kconfig | 15 ---------------
> arch/s390/configs/zfcpdump_defconfig | 1 -
> arch/s390/crypto/Makefile | 2 +-
> arch/s390/include/asm/archrandom.h | 3 ---
> arch/x86/Kconfig | 9 ---------
> arch/x86/include/asm/archrandom.h | 10 +---------
> arch/x86/kernel/cpu/rdrand.c | 2 --
> drivers/char/Kconfig | 1 -
> drivers/char/hw_random/s390-trng.c | 9 ---------
> include/linux/random.h | 9 +--------
> .../selftests/wireguard/qemu/kernel.config | 1 -
> 20 files changed, 3 insertions(+), 90 deletions(-)
Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists