--- zzzz-none-000/linux-4.4.60/crypto/algboss.c 2017-04-08 07:53:53.000000000 +0000 +++ wasp-540e-714/linux-4.4.60/crypto/algboss.c 2019-07-03 09:21:34.000000000 +0000 @@ -22,6 +22,7 @@ #include #include #include +#include #include "internal.h" @@ -218,7 +219,7 @@ goto skiptest; #endif - if (type & CRYPTO_ALG_TESTED) + if ((type & CRYPTO_ALG_TESTED) || !fips_enabled) goto skiptest; err = alg_test(param->driver, param->alg, type, CRYPTO_ALG_TESTED); @@ -247,14 +248,6 @@ memcpy(param->alg, alg->cra_name, sizeof(param->alg)); type = alg->cra_flags; - /* This piece of crap needs to disappear into per-type test hooks. */ - if (!((type ^ CRYPTO_ALG_TYPE_BLKCIPHER) & - CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV) && - ((alg->cra_flags & CRYPTO_ALG_TYPE_MASK) == - CRYPTO_ALG_TYPE_BLKCIPHER ? alg->cra_blkcipher.ivsize : - alg->cra_ablkcipher.ivsize)) - type |= CRYPTO_ALG_TESTED; - param->type = type; thread = kthread_run(cryptomgr_test, param, "cryptomgr_test");