mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: algboss - optimize registration of internal algorithms
Since algboss always skips testing of algorithms with the CRYPTO_ALG_INTERNAL flag, there is no need to go through the dance of creating the test kthread, which creates a lot of overhead. Instead, we can just directly finish the algorithm registration, like is now done when self-tests are disabled entirely. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -278,7 +278,8 @@ static struct crypto_larval *crypto_alloc_test_larval(struct crypto_alg *alg)
|
||||
struct crypto_larval *larval;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER) ||
|
||||
IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS))
|
||||
IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) ||
|
||||
(alg->cra_flags & CRYPTO_ALG_INTERNAL))
|
||||
return NULL; /* No self-test needed */
|
||||
|
||||
larval = crypto_larval_alloc(alg->cra_name,
|
||||
|
||||
Reference in New Issue
Block a user