mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 15:41:36 +00:00
9592eef7c1
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>
22 lines
821 B
Makefile
22 lines
821 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Cryptographic API
|
|
#
|
|
|
|
obj-$(CONFIG_CRYPTO_SHA1_S390) += sha1_s390.o sha_common.o
|
|
obj-$(CONFIG_CRYPTO_SHA256_S390) += sha256_s390.o sha_common.o
|
|
obj-$(CONFIG_CRYPTO_SHA512_S390) += sha512_s390.o sha_common.o
|
|
obj-$(CONFIG_CRYPTO_SHA3_256_S390) += sha3_256_s390.o sha_common.o
|
|
obj-$(CONFIG_CRYPTO_SHA3_512_S390) += sha3_512_s390.o sha_common.o
|
|
obj-$(CONFIG_CRYPTO_DES_S390) += des_s390.o
|
|
obj-$(CONFIG_CRYPTO_AES_S390) += aes_s390.o
|
|
obj-$(CONFIG_CRYPTO_PAES_S390) += paes_s390.o
|
|
obj-$(CONFIG_CRYPTO_CHACHA_S390) += chacha_s390.o
|
|
obj-$(CONFIG_S390_PRNG) += prng.o
|
|
obj-$(CONFIG_CRYPTO_GHASH_S390) += ghash_s390.o
|
|
obj-$(CONFIG_CRYPTO_CRC32_S390) += crc32-vx_s390.o
|
|
obj-y += arch_random.o
|
|
|
|
crc32-vx_s390-y := crc32-vx.o crc32le-vx.o crc32be-vx.o
|
|
chacha_s390-y := chacha-glue.o chacha-s390.o
|