linux/drivers/char/hw_random
Jason A. Donenfeld 9592eef7c1 random: remove CONFIG_ARCH_RANDOM
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.

Simplify the situation by removing CONFIG_ARCH_RANDOM and using the
ordinary asm-generic fallback pattern instead, keeping the two options
that are actually used. For now it leaves "nordrand" for now, as the
removal of that will take a different route.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-07-18 15:03:37 +02:00
..
amd-rng.c hwrng: rename 'mod_init' & 'mod_exit' functions to be module-specific 2021-07-16 15:49:36 +08:00
arm_smccc_trng.c hwrng: Add Arm SMCCC TRNG based driver 2021-08-06 19:45:26 +08:00
atmel-rng.c hwrng: atmel - remove extra line 2022-03-03 10:46:19 +12:00
ba431-rng.c hwrng: ba431 - use devm_platform_ioremap_resource() to simplify 2021-03-19 21:59:46 +11:00
bcm2835-rng.c hwrng: bcm2835 - add reset support 2021-03-13 00:04:06 +11:00
cavium-rng-vf.c hwrng: cavium - fix NULL but dereferenced coccicheck error 2022-03-03 10:49:22 +12:00
cavium-rng.c hwrng: cavium - Check health status while reading random data 2021-11-20 15:02:07 +11:00
cctrng.c hwrng: cctrng - delete redundant printing of return value 2021-03-19 21:59:47 +11:00
cctrng.h hwrng: cctrng - introduce Arm CryptoCell driver 2020-04-16 16:49:20 +10:00
cn10k-rng.c hwrng: cn10k - Make check_rng_health() return an error code 2022-04-21 17:53:55 +08:00
core.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2022-03-21 16:02:36 -07:00
exynos-trng.c hwrng: exynos - Use pm_runtime_resume_and_get() to replace open coding 2021-06-03 20:24:04 +08:00
geode-rng.c hwrng: rename 'mod_init' & 'mod_exit' functions to be module-specific 2021-07-16 15:49:36 +08:00
hisi-rng.c hwrng: hisi - Fix W=1 unused variable warning 2020-07-09 18:25:12 +10:00
imx-rngc.c hwrng: imx-rngc - irq already prints an error 2020-11-06 14:31:15 +11:00
ingenic-rng.c crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc 2020-08-21 14:43:51 +10:00
ingenic-trng.c hwrng: ingenic - Fix a resource leak in an error handling path 2021-01-03 08:41:37 +11:00
intel-rng.c hwrng: rename 'mod_init' & 'mod_exit' functions to be module-specific 2021-07-16 15:49:36 +08:00
iproc-rng200.c hwrng: iproc-rng200 - Move enable/disable in separate function 2021-01-03 08:41:37 +11:00
ixp4xx-rng.c hwrng: ixp4xx - Make use of the helper function devm_platform_ioremap_resource() 2021-09-17 11:06:14 +08:00
Kconfig hwrng: cn10k - Enable compile testing 2022-05-06 18:16:55 +08:00
ks-sa-rng.c hwrng: ks-sa - Use pm_runtime_resume_and_get() to replace open coding 2021-06-03 20:24:04 +08:00
Makefile hwrng: mpfs - add polarfire soc hwrng support 2022-04-15 16:34:28 +08:00
meson-rng.c hwrng: meson - Improve error handling for core clock 2021-10-01 14:41:23 +08:00
mpfs-rng.c hwrng: mpfs - add polarfire soc hwrng support 2022-04-15 16:34:28 +08:00
mtk-rng.c hwrng: mtk - Force runtime pm ops for sleep ops 2021-10-08 20:02:47 +08:00
mxc-rnga.c hwrng: mxc-rnga - use semicolons rather than commas to separate statements 2020-10-02 18:02:15 +10:00
n2-asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2-drv.c hwrng: n2-drv - fix typo 2019-08-08 12:07:49 +10:00
n2rng.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nomadik-rng.c hwrng: nomadik - Change clk_disable to clk_disable_unprepare 2022-03-14 14:45:44 +12:00
npcm-rng.c hwrng: npcm - modify readl to readb 2020-10-02 18:02:13 +10:00
octeon-rng.c hwrng: octeon - Fix sparse warnings 2020-07-09 18:25:14 +10:00
omap3-rom-rng.c hwrng: omap3-rom - fix using wrong clk_disable() in omap_rom_rng_runtime_resume() 2022-05-20 13:54:45 +08:00
omap-rng.c hwrng: omap - Use pm_runtime_resume_and_get() to replace open coding 2021-06-03 20:24:04 +08:00
optee-rng.c hwrng: optee - remove redundant initialization to variable rng_size 2022-04-29 13:44:58 +08:00
pasemi-rng.c hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code 2019-10-26 02:09:56 +11:00
pic32-rng.c hwrng: pic32 - Use device-managed registration API 2021-03-13 00:04:00 +11:00
powernv-rng.c hwrng: drivers - Use device-managed registration API 2019-08-02 14:44:33 +10:00
pseries-rng.c char: hw_random: pseries-rng: Demote non-conformant kernel-doc header 2021-05-21 10:09:30 +02:00
s390-trng.c random: remove CONFIG_ARCH_RANDOM 2022-07-18 15:03:37 +02:00
st-rng.c hwrng: st - Fix W=1 unused variable warning 2020-07-09 18:25:12 +10:00
stm32-rng.c hwrng: stm32 - use semicolons rather than commas to separate statements 2020-10-02 18:02:14 +10:00
timeriomem-rng.c hwrng: timeriomem - Use device-managed registration API 2021-02-10 17:56:01 +11:00
via-rng.c hwrng: rename 'mod_init' & 'mod_exit' functions to be module-specific 2021-07-16 15:49:36 +08:00
virtio-rng.c virtio-rng: make device ready before making request 2022-06-08 08:56:03 -04:00
xgene-rng.c hwrng: xgene - Delete an error message in xgene_rng_probe() 2020-04-16 16:49:22 +10:00
xiphera-trng.c hwrng: xiphera-trng - use devm_platform_ioremap_resource() to simplify 2021-03-07 15:13:14 +11:00