2
0

260-crypto_test_dependencies.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --- a/crypto/Kconfig
  2. +++ b/crypto/Kconfig
  3. @@ -96,10 +96,10 @@ 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_AEAD2 if !CRYPTO_MANAGER_DISABLE_TESTS
  11. + select CRYPTO_HASH2 if !CRYPTO_MANAGER_DISABLE_TESTS
  12. + select CRYPTO_BLKCIPHER2 if !CRYPTO_MANAGER_DISABLE_TESTS
  13. + select CRYPTO_PCOMP2 if !CRYPTO_MANAGER_DISABLE_TESTS
  14. config CRYPTO_USER
  15. tristate "Userspace cryptographic algorithm configuration"
  16. --- a/crypto/algboss.c
  17. +++ b/crypto/algboss.c
  18. @@ -248,6 +248,9 @@ static int cryptomgr_schedule_test(struc
  19. type = alg->cra_flags;
  20. /* This piece of crap needs to disappear into per-type test hooks. */
  21. +#ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
  22. + type |= CRYPTO_ALG_TESTED;
  23. +#else
  24. if ((!((type ^ CRYPTO_ALG_TYPE_BLKCIPHER) &
  25. CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV) &&
  26. ((alg->cra_flags & CRYPTO_ALG_TYPE_MASK) ==
  27. @@ -256,6 +259,7 @@ static int cryptomgr_schedule_test(struc
  28. (!((type ^ CRYPTO_ALG_TYPE_AEAD) & CRYPTO_ALG_TYPE_MASK) &&
  29. alg->cra_type == &crypto_nivaead_type && alg->cra_aead.ivsize))
  30. type |= CRYPTO_ALG_TESTED;
  31. +#endif
  32. param->type = type;