linux/arch/s390/crypto
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
..
aes_s390.c s390/crypto: fix scatterwalk_unmap() callers in AES-GCM 2022-05-25 11:46:02 +02:00
arch_random.c s390/archrandom: simplify back to earlier design and initialize earlier 2022-06-30 19:40:36 +02:00
chacha-glue.c crypto: s390 - add crypto library interface for ChaCha20 2022-05-13 17:24:49 +08:00
chacha-s390.h s390/crypto: add SIMD implementation for ChaCha20 2021-12-06 14:42:24 +01:00
chacha-s390.S s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01:00
crc32-vx.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
crc32be-vx.S s390/crc32-vx: couple of typo fixes 2021-03-24 16:06:19 +01:00
crc32le-vx.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
des_s390.c s390/crypto: fix typos in comments 2022-05-06 20:45:13 +02:00
ghash_s390.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
Makefile random: remove CONFIG_ARCH_RANDOM 2022-07-18 15:03:37 +02:00
paes_s390.c s390/crypto: improve retry logic in case of master key change 2021-01-27 13:00:48 +01:00
prng.c s390/crypto: fix typos in comments 2022-05-06 20:45:13 +02:00
sha1_s390.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha3_256_s390.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha3_512_s390.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha256_s390.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha512_s390.c crypto: s390/sha512 - Use macros instead of direct IV numbers 2021-12-31 18:10:55 +11:00
sha_common.c s390/crypto: Fix unsigned variable compared with zero 2019-11-20 12:58:12 +01:00
sha.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00