1 From e7ed6473c2c8c4e45dd861bfa06e96189b11d8db Mon Sep 17 00:00:00 2001
2 From: Herbert Xu <herbert@gondor.apana.org.au>
3 Date: Mon, 6 Nov 2023 18:00:08 +0800
4 Subject: [PATCH] crypto: jitterentropy - Hide esoteric Kconfig options under
7 As JITTERENTROPY is selected by default if you enable the CRYPTO
8 API, any Kconfig options added there will show up for every single
9 user. Hide the esoteric options under EXPERT as well as FIPS so
10 that only distro makers will see them.
12 Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
13 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
14 Reviewed-by: Stephan Mueller <smueller@chronox.de>
15 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 crypto/Kconfig | 28 +++++++++++++++++++++++++---
18 1 file changed, 25 insertions(+), 3 deletions(-)
22 @@ -1297,10 +1297,12 @@ config CRYPTO_JITTERENTROPY
24 See https://www.chronox.de/jent/
26 +if CRYPTO_JITTERENTROPY
27 +if CRYPTO_FIPS && EXPERT
30 prompt "CPU Jitter RNG Memory Size"
31 default CRYPTO_JITTERENTROPY_MEMSIZE_2
32 - depends on CRYPTO_JITTERENTROPY
34 The Jitter RNG measures the execution time of memory accesses.
35 Multiple consecutive memory accesses are performed. If the memory
36 @@ -1344,7 +1346,6 @@ config CRYPTO_JITTERENTROPY_OSR
37 int "CPU Jitter RNG Oversampling Rate"
40 - depends on CRYPTO_JITTERENTROPY
42 The Jitter RNG allows the specification of an oversampling rate (OSR).
43 The Jitter RNG operation requires a fixed amount of timing
44 @@ -1359,7 +1360,6 @@ config CRYPTO_JITTERENTROPY_OSR
46 config CRYPTO_JITTERENTROPY_TESTINTERFACE
47 bool "CPU Jitter RNG Test Interface"
48 - depends on CRYPTO_JITTERENTROPY
50 The test interface allows a privileged process to capture
51 the raw unconditioned high resolution time stamp noise that
52 @@ -1377,6 +1377,28 @@ config CRYPTO_JITTERENTROPY_TESTINTERFAC
56 +endif # if CRYPTO_FIPS && EXPERT
58 +if !(CRYPTO_FIPS && EXPERT)
60 +config CRYPTO_JITTERENTROPY_MEMORY_BLOCKS
64 +config CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE
68 +config CRYPTO_JITTERENTROPY_OSR
72 +config CRYPTO_JITTERENTROPY_TESTINTERFACE
75 +endif # if !(CRYPTO_FIPS && EXPERT)
76 +endif # if CRYPTO_JITTERENTROPY
78 config CRYPTO_KDF800108_CTR