Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: api - Disable boot-test-finished if algapi is a module

The boot-test-finished toggle is only necessary if algapi
is built into the kernel. Do not include this code if it is a module.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+10 -4
+3
crypto/algapi.c
··· 1056 1056 1057 1057 static void __init crypto_start_tests(void) 1058 1058 { 1059 + if (!IS_BUILTIN(CONFIG_CRYPTO_ALGAPI)) 1060 + return; 1061 + 1059 1062 if (IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS)) 1060 1063 return; 1061 1064
+2 -2
crypto/api.c
··· 31 31 BLOCKING_NOTIFIER_HEAD(crypto_chain); 32 32 EXPORT_SYMBOL_GPL(crypto_chain); 33 33 34 - #ifndef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS 34 + #if IS_BUILTIN(CONFIG_CRYPTO_ALGAPI) && \ 35 + !IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) 35 36 DEFINE_STATIC_KEY_FALSE(__crypto_boot_test_finished); 36 - EXPORT_SYMBOL_GPL(__crypto_boot_test_finished); 37 37 #endif 38 38 39 39 static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg);
+5 -2
crypto/internal.h
··· 66 66 67 67 int alg_test(const char *driver, const char *alg, u32 type, u32 mask); 68 68 69 - #ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS 69 + #if !IS_BUILTIN(CONFIG_CRYPTO_ALGAPI) || \ 70 + IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) 70 71 static inline bool crypto_boot_test_finished(void) 71 72 { 72 73 return true; ··· 85 84 { 86 85 static_branch_enable(&__crypto_boot_test_finished); 87 86 } 88 - #endif /* !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS */ 87 + #endif /* !IS_BUILTIN(CONFIG_CRYPTO_ALGAPI) || 88 + * IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) 89 + */ 89 90 90 91 #ifdef CONFIG_PROC_FS 91 92 void __init crypto_init_proc(void);