260-crypto_test_dependencies.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- a/crypto/Kconfig
  2. +++ b/crypto/Kconfig
  3. @@ -119,11 +119,11 @@ config CRYPTO_MANAGER
  4. config CRYPTO_MANAGER2
  5. def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
  6. - select CRYPTO_AEAD2
  7. - select CRYPTO_HASH2
  8. - select CRYPTO_BLKCIPHER2
  9. - select CRYPTO_PCOMP2
  10. - select CRYPTO_AKCIPHER2
  11. + select CRYPTO_AEAD2 if !CRYPTO_MANAGER_DISABLE_TESTS
  12. + select CRYPTO_HASH2 if !CRYPTO_MANAGER_DISABLE_TESTS
  13. + select CRYPTO_BLKCIPHER2 if !CRYPTO_MANAGER_DISABLE_TESTS
  14. + select CRYPTO_PCOMP2 if !CRYPTO_MANAGER_DISABLE_TESTS
  15. + select CRYPTO_AKCIPHER2 if !CRYPTO_MANAGER_DISABLE_TESTS
  16. config CRYPTO_USER
  17. tristate "Userspace cryptographic algorithm configuration"
  18. --- a/crypto/algboss.c
  19. +++ b/crypto/algboss.c
  20. @@ -248,12 +248,16 @@ static int cryptomgr_schedule_test(struc
  21. type = alg->cra_flags;
  22. /* This piece of crap needs to disappear into per-type test hooks. */
  23. +#ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
  24. + type |= CRYPTO_ALG_TESTED;
  25. +#else
  26. if (!((type ^ CRYPTO_ALG_TYPE_BLKCIPHER) &
  27. CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV) &&
  28. ((alg->cra_flags & CRYPTO_ALG_TYPE_MASK) ==
  29. CRYPTO_ALG_TYPE_BLKCIPHER ? alg->cra_blkcipher.ivsize :
  30. alg->cra_ablkcipher.ivsize))
  31. type |= CRYPTO_ALG_TESTED;
  32. +#endif
  33. param->type = type;