struct crypto_aead *tfm;
        int err = 0;
 
-       tfm = crypto_alloc_aead(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       tfm = crypto_alloc_aead(driver, type, mask);
        if (IS_ERR(tfm)) {
                printk(KERN_ERR "alg: aead: Failed to load transform for %s: "
                       "%ld\n", driver, PTR_ERR(tfm));
        struct crypto_cipher *tfm;
        int err = 0;
 
-       tfm = crypto_alloc_cipher(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       tfm = crypto_alloc_cipher(driver, type, mask);
        if (IS_ERR(tfm)) {
                printk(KERN_ERR "alg: cipher: Failed to load transform for "
                       "%s: %ld\n", driver, PTR_ERR(tfm));
        struct crypto_skcipher *tfm;
        int err = 0;
 
-       tfm = crypto_alloc_skcipher(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       tfm = crypto_alloc_skcipher(driver, type, mask);
        if (IS_ERR(tfm)) {
                printk(KERN_ERR "alg: skcipher: Failed to load transform for "
                       "%s: %ld\n", driver, PTR_ERR(tfm));
        struct crypto_ahash *tfm;
        int err;
 
-       tfm = crypto_alloc_ahash(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       tfm = crypto_alloc_ahash(driver, type, mask);
        if (IS_ERR(tfm)) {
                printk(KERN_ERR "alg: hash: Failed to load transform for %s: "
                       "%ld\n", driver, PTR_ERR(tfm));
        if (err)
                goto out;
 
-       tfm = crypto_alloc_shash(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       tfm = crypto_alloc_shash(driver, type, mask);
        if (IS_ERR(tfm)) {
                printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: "
                       "%ld\n", driver, PTR_ERR(tfm));
        struct crypto_rng *rng;
        int err;
 
-       rng = crypto_alloc_rng(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       rng = crypto_alloc_rng(driver, type, mask);
        if (IS_ERR(rng)) {
                printk(KERN_ERR "alg: cprng: Failed to load transform for %s: "
                       "%ld\n", driver, PTR_ERR(rng));
        if (!buf)
                return -ENOMEM;
 
-       drng = crypto_alloc_rng(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       drng = crypto_alloc_rng(driver, type, mask);
        if (IS_ERR(drng)) {
                printk(KERN_ERR "alg: drbg: could not allocate DRNG handle for "
                       "%s\n", driver);
        struct crypto_kpp *tfm;
        int err = 0;
 
-       tfm = crypto_alloc_kpp(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       tfm = crypto_alloc_kpp(driver, type, mask);
        if (IS_ERR(tfm)) {
                pr_err("alg: kpp: Failed to load tfm for %s: %ld\n",
                       driver, PTR_ERR(tfm));
        struct crypto_akcipher *tfm;
        int err = 0;
 
-       tfm = crypto_alloc_akcipher(driver, type | CRYPTO_ALG_INTERNAL, mask);
+       tfm = crypto_alloc_akcipher(driver, type, mask);
        if (IS_ERR(tfm)) {
                pr_err("alg: akcipher: Failed to load tfm for %s: %ld\n",
                       driver, PTR_ERR(tfm));
 /* Please keep this list sorted by algorithm name. */
 static const struct alg_test_desc alg_test_descs[] = {
        {
-               .alg = "__cbc-cast5-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__cbc-cast6-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__cbc-serpent-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__cbc-serpent-avx2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__cbc-serpent-sse2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__cbc-twofish-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-aes-aesni",
-               .test = alg_test_null,
-               .fips_allowed = 1,
-       }, {
-               .alg = "__driver-cbc-camellia-aesni",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-camellia-aesni-avx2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-cast5-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-cast6-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-serpent-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-serpent-avx2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-serpent-sse2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-cbc-twofish-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-aes-aesni",
-               .test = alg_test_null,
-               .fips_allowed = 1,
-       }, {
-               .alg = "__driver-ecb-camellia-aesni",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-camellia-aesni-avx2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-cast5-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-cast6-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-serpent-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-serpent-avx2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-serpent-sse2",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-ecb-twofish-avx",
-               .test = alg_test_null,
-       }, {
-               .alg = "__driver-gcm-aes-aesni",
-               .test = alg_test_null,
-               .fips_allowed = 1,
-       }, {
-               .alg = "__ghash-pclmulqdqni",
-               .test = alg_test_null,
-               .fips_allowed = 1,
-       }, {
                .alg = "ansi_cprng",
                .test = alg_test_cprng,
                .suite = {
                                .count = CRCT10DIF_TEST_VECTORS
                        }
                }
-       }, {
-               .alg = "cryptd(__driver-cbc-aes-aesni)",
-               .test = alg_test_null,
-               .fips_allowed = 1,
-       }, {
-               .alg = "cryptd(__driver-cbc-camellia-aesni)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-cbc-camellia-aesni-avx2)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-cbc-serpent-avx2)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-aes-aesni)",
-               .test = alg_test_null,
-               .fips_allowed = 1,
-       }, {
-               .alg = "cryptd(__driver-ecb-camellia-aesni)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-camellia-aesni-avx2)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-cast5-avx)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-cast6-avx)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-serpent-avx)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-serpent-avx2)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-serpent-sse2)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-ecb-twofish-avx)",
-               .test = alg_test_null,
-       }, {
-               .alg = "cryptd(__driver-gcm-aes-aesni)",
-               .test = alg_test_null,
-               .fips_allowed = 1,
-       }, {
-               .alg = "cryptd(__ghash-pclmulqdqni)",
-               .test = alg_test_null,
-               .fips_allowed = 1,
        }, {
                .alg = "ctr(aes)",
                .test = alg_test_skcipher,
                .alg = "drbg_pr_sha512",
                .fips_allowed = 1,
                .test = alg_test_null,
-       }, {
-               .alg = "ecb(__aes-aesni)",
-               .test = alg_test_null,
-               .fips_allowed = 1,
        }, {
                .alg = "ecb(aes)",
                .test = alg_test_skcipher,