Commit 5e4b8c1f authored by Herbert Xu's avatar Herbert Xu

crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag

This patch removes the CRYPTO_ALG_AEAD_NEW flag now that everyone
has been converted.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b0d955ba
...@@ -280,7 +280,6 @@ static struct aead_alg ccm_aes_alg = { ...@@ -280,7 +280,6 @@ static struct aead_alg ccm_aes_alg = {
.base = { .base = {
.cra_name = "ccm(aes)", .cra_name = "ccm(aes)",
.cra_driver_name = "ccm-aes-ce", .cra_driver_name = "ccm-aes-ce",
.cra_flags = CRYPTO_ALG_AEAD_NEW,
.cra_priority = 300, .cra_priority = 300,
.cra_blocksize = 1, .cra_blocksize = 1,
.cra_ctxsize = sizeof(struct crypto_aes_ctx), .cra_ctxsize = sizeof(struct crypto_aes_ctx),
......
...@@ -1437,8 +1437,7 @@ static struct aead_alg aesni_aead_algs[] = { { ...@@ -1437,8 +1437,7 @@ static struct aead_alg aesni_aead_algs[] = { {
.cra_name = "rfc4106(gcm(aes))", .cra_name = "rfc4106(gcm(aes))",
.cra_driver_name = "rfc4106-gcm-aesni", .cra_driver_name = "rfc4106-gcm-aesni",
.cra_priority = 400, .cra_priority = 400,
.cra_flags = CRYPTO_ALG_ASYNC | .cra_flags = CRYPTO_ALG_ASYNC,
CRYPTO_ALG_AEAD_NEW,
.cra_blocksize = 1, .cra_blocksize = 1,
.cra_ctxsize = sizeof(struct cryptd_aead *), .cra_ctxsize = sizeof(struct cryptd_aead *),
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
......
...@@ -204,8 +204,7 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, ...@@ -204,8 +204,7 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return ERR_CAST(algt); return ERR_CAST(algt);
if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask & ~CRYPTO_ALG_AEAD_NEW)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
name = crypto_attr_alg_name(tb[1]); name = crypto_attr_alg_name(tb[1]);
...@@ -245,8 +244,7 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, ...@@ -245,8 +244,7 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
CRYPTO_MAX_ALG_NAME) CRYPTO_MAX_ALG_NAME)
goto err_drop_alg; goto err_drop_alg;
inst->alg.base.cra_flags = alg->base.cra_flags & inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC;
(CRYPTO_ALG_ASYNC | CRYPTO_ALG_AEAD_NEW);
inst->alg.base.cra_priority = alg->base.cra_priority; inst->alg.base.cra_priority = alg->base.cra_priority;
inst->alg.base.cra_blocksize = alg->base.cra_blocksize; inst->alg.base.cra_blocksize = alg->base.cra_blocksize;
inst->alg.base.cra_alignmask = alg->base.cra_alignmask; inst->alg.base.cra_alignmask = alg->base.cra_alignmask;
......
...@@ -514,8 +514,7 @@ static struct proto_ops algif_aead_ops = { ...@@ -514,8 +514,7 @@ static struct proto_ops algif_aead_ops = {
static void *aead_bind(const char *name, u32 type, u32 mask) static void *aead_bind(const char *name, u32 type, u32 mask)
{ {
return crypto_alloc_aead(name, type | CRYPTO_ALG_AEAD_NEW, return crypto_alloc_aead(name, type, mask);
mask | CRYPTO_ALG_AEAD_NEW);
} }
static void aead_release(void *private) static void aead_release(void *private)
......
...@@ -393,8 +393,7 @@ static int crypto_authenc_create(struct crypto_template *tmpl, ...@@ -393,8 +393,7 @@ static int crypto_authenc_create(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
auth = ahash_attr_alg(tb[1], CRYPTO_ALG_TYPE_HASH, auth = ahash_attr_alg(tb[1], CRYPTO_ALG_TYPE_HASH,
...@@ -445,7 +444,6 @@ static int crypto_authenc_create(struct crypto_template *tmpl, ...@@ -445,7 +444,6 @@ static int crypto_authenc_create(struct crypto_template *tmpl,
goto err_drop_enc; goto err_drop_enc;
inst->alg.base.cra_flags = enc->cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_flags = enc->cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = enc->cra_priority * 10 + inst->alg.base.cra_priority = enc->cra_priority * 10 +
auth_base->cra_priority; auth_base->cra_priority;
inst->alg.base.cra_blocksize = enc->cra_blocksize; inst->alg.base.cra_blocksize = enc->cra_blocksize;
......
...@@ -409,8 +409,7 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl, ...@@ -409,8 +409,7 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
auth = ahash_attr_alg(tb[1], CRYPTO_ALG_TYPE_HASH, auth = ahash_attr_alg(tb[1], CRYPTO_ALG_TYPE_HASH,
...@@ -458,7 +457,6 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl, ...@@ -458,7 +457,6 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl,
goto err_drop_enc; goto err_drop_enc;
inst->alg.base.cra_flags = enc->cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_flags = enc->cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = enc->cra_priority * 10 + inst->alg.base.cra_priority = enc->cra_priority * 10 +
auth_base->cra_priority; auth_base->cra_priority;
inst->alg.base.cra_blocksize = enc->cra_blocksize; inst->alg.base.cra_blocksize = enc->cra_blocksize;
......
...@@ -518,8 +518,7 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl, ...@@ -518,8 +518,7 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
cipher = crypto_alg_mod_lookup(cipher_name, CRYPTO_ALG_TYPE_CIPHER, cipher = crypto_alg_mod_lookup(cipher_name, CRYPTO_ALG_TYPE_CIPHER,
...@@ -571,7 +570,6 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl, ...@@ -571,7 +570,6 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl,
memcpy(inst->alg.base.cra_name, full_name, CRYPTO_MAX_ALG_NAME); memcpy(inst->alg.base.cra_name, full_name, CRYPTO_MAX_ALG_NAME);
inst->alg.base.cra_flags = ctr->cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_flags = ctr->cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = (cipher->cra_priority + inst->alg.base.cra_priority = (cipher->cra_priority +
ctr->cra_priority) / 2; ctr->cra_priority) / 2;
inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_blocksize = 1;
...@@ -820,8 +818,7 @@ static int crypto_rfc4309_create(struct crypto_template *tmpl, ...@@ -820,8 +818,7 @@ static int crypto_rfc4309_create(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
ccm_name = crypto_attr_alg_name(tb[1]); ccm_name = crypto_attr_alg_name(tb[1]);
...@@ -861,7 +858,6 @@ static int crypto_rfc4309_create(struct crypto_template *tmpl, ...@@ -861,7 +858,6 @@ static int crypto_rfc4309_create(struct crypto_template *tmpl,
goto out_drop_alg; goto out_drop_alg;
inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = alg->base.cra_priority; inst->alg.base.cra_priority = alg->base.cra_priority;
inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_blocksize = 1;
inst->alg.base.cra_alignmask = alg->base.cra_alignmask; inst->alg.base.cra_alignmask = alg->base.cra_alignmask;
......
...@@ -585,8 +585,7 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb, ...@@ -585,8 +585,7 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
chacha_name = crypto_attr_alg_name(tb[1]); chacha_name = crypto_attr_alg_name(tb[1]);
...@@ -644,7 +643,6 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb, ...@@ -644,7 +643,6 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb,
inst->alg.base.cra_flags = (chacha->cra_flags | poly->cra_flags) & inst->alg.base.cra_flags = (chacha->cra_flags | poly->cra_flags) &
CRYPTO_ALG_ASYNC; CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = (chacha->cra_priority + inst->alg.base.cra_priority = (chacha->cra_priority +
poly->cra_priority) / 2; poly->cra_priority) / 2;
inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_blocksize = 1;
......
...@@ -177,8 +177,8 @@ static inline void cryptd_check_internal(struct rtattr **tb, u32 *type, ...@@ -177,8 +177,8 @@ static inline void cryptd_check_internal(struct rtattr **tb, u32 *type,
if (IS_ERR(algt)) if (IS_ERR(algt))
return; return;
*type |= algt->type & (CRYPTO_ALG_INTERNAL | CRYPTO_ALG_AEAD_NEW); *type |= algt->type & CRYPTO_ALG_INTERNAL;
*mask |= algt->mask & (CRYPTO_ALG_INTERNAL | CRYPTO_ALG_AEAD_NEW); *mask |= algt->mask & CRYPTO_ALG_INTERNAL;
} }
static int cryptd_blkcipher_setkey(struct crypto_ablkcipher *parent, static int cryptd_blkcipher_setkey(struct crypto_ablkcipher *parent,
...@@ -805,9 +805,7 @@ static int cryptd_create_aead(struct crypto_template *tmpl, ...@@ -805,9 +805,7 @@ static int cryptd_create_aead(struct crypto_template *tmpl,
goto out_drop_aead; goto out_drop_aead;
inst->alg.base.cra_flags = CRYPTO_ALG_ASYNC | inst->alg.base.cra_flags = CRYPTO_ALG_ASYNC |
(alg->base.cra_flags & (alg->base.cra_flags & CRYPTO_ALG_INTERNAL);
(CRYPTO_ALG_INTERNAL |
CRYPTO_ALG_AEAD_NEW));
inst->alg.base.cra_ctxsize = sizeof(struct cryptd_aead_ctx); inst->alg.base.cra_ctxsize = sizeof(struct cryptd_aead_ctx);
inst->alg.ivsize = crypto_aead_alg_ivsize(alg); inst->alg.ivsize = crypto_aead_alg_ivsize(alg);
......
...@@ -634,8 +634,7 @@ static int crypto_gcm_create_common(struct crypto_template *tmpl, ...@@ -634,8 +634,7 @@ static int crypto_gcm_create_common(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
ghash_alg = crypto_find_alg(ghash_name, &crypto_ahash_type, ghash_alg = crypto_find_alg(ghash_name, &crypto_ahash_type,
...@@ -690,7 +689,6 @@ static int crypto_gcm_create_common(struct crypto_template *tmpl, ...@@ -690,7 +689,6 @@ static int crypto_gcm_create_common(struct crypto_template *tmpl,
inst->alg.base.cra_flags = (ghash->base.cra_flags | ctr->cra_flags) & inst->alg.base.cra_flags = (ghash->base.cra_flags | ctr->cra_flags) &
CRYPTO_ALG_ASYNC; CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = (ghash->base.cra_priority + inst->alg.base.cra_priority = (ghash->base.cra_priority +
ctr->cra_priority) / 2; ctr->cra_priority) / 2;
inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_blocksize = 1;
...@@ -935,8 +933,7 @@ static int crypto_rfc4106_create(struct crypto_template *tmpl, ...@@ -935,8 +933,7 @@ static int crypto_rfc4106_create(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
ccm_name = crypto_attr_alg_name(tb[1]); ccm_name = crypto_attr_alg_name(tb[1]);
...@@ -976,7 +973,6 @@ static int crypto_rfc4106_create(struct crypto_template *tmpl, ...@@ -976,7 +973,6 @@ static int crypto_rfc4106_create(struct crypto_template *tmpl,
goto out_drop_alg; goto out_drop_alg;
inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = alg->base.cra_priority; inst->alg.base.cra_priority = alg->base.cra_priority;
inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_blocksize = 1;
inst->alg.base.cra_alignmask = alg->base.cra_alignmask; inst->alg.base.cra_alignmask = alg->base.cra_alignmask;
...@@ -1175,8 +1171,7 @@ static int crypto_rfc4543_create(struct crypto_template *tmpl, ...@@ -1175,8 +1171,7 @@ static int crypto_rfc4543_create(struct crypto_template *tmpl,
if (IS_ERR(algt)) if (IS_ERR(algt))
return PTR_ERR(algt); return PTR_ERR(algt);
if ((algt->type ^ (CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_AEAD_NEW)) & if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
algt->mask)
return -EINVAL; return -EINVAL;
ccm_name = crypto_attr_alg_name(tb[1]); ccm_name = crypto_attr_alg_name(tb[1]);
...@@ -1217,7 +1212,6 @@ static int crypto_rfc4543_create(struct crypto_template *tmpl, ...@@ -1217,7 +1212,6 @@ static int crypto_rfc4543_create(struct crypto_template *tmpl,
goto out_drop_alg; goto out_drop_alg;
inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
inst->alg.base.cra_priority = alg->base.cra_priority; inst->alg.base.cra_priority = alg->base.cra_priority;
inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_blocksize = 1;
inst->alg.base.cra_alignmask = alg->base.cra_alignmask; inst->alg.base.cra_alignmask = alg->base.cra_alignmask;
......
...@@ -295,9 +295,7 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb, ...@@ -295,9 +295,7 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb,
ctx = aead_instance_ctx(inst); ctx = aead_instance_ctx(inst);
crypto_set_aead_spawn(&ctx->spawn, aead_crypto_instance(inst)); crypto_set_aead_spawn(&ctx->spawn, aead_crypto_instance(inst));
err = crypto_grab_aead(&ctx->spawn, name, err = crypto_grab_aead(&ctx->spawn, name, 0, 0);
algt->type & CRYPTO_ALG_AEAD_NEW,
algt->mask & CRYPTO_ALG_AEAD_NEW);
if (err) if (err)
goto out_free_inst; goto out_free_inst;
...@@ -307,7 +305,6 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb, ...@@ -307,7 +305,6 @@ static int pcrypt_create_aead(struct crypto_template *tmpl, struct rtattr **tb,
goto out_drop_aead; goto out_drop_aead;
inst->alg.base.cra_flags = CRYPTO_ALG_ASYNC; inst->alg.base.cra_flags = CRYPTO_ALG_ASYNC;
inst->alg.base.cra_flags |= alg->base.cra_flags & CRYPTO_ALG_AEAD_NEW;
inst->alg.ivsize = crypto_aead_alg_ivsize(alg); inst->alg.ivsize = crypto_aead_alg_ivsize(alg);
inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg); inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg);
......
...@@ -344,12 +344,7 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs, ...@@ -344,12 +344,7 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs,
goto out_nosg; goto out_nosg;
sgout = &sg[9]; sgout = &sg[9];
tfm = crypto_alloc_aead(algo, CRYPTO_ALG_AEAD_NEW, tfm = crypto_alloc_aead(algo, 0, 0);
CRYPTO_ALG_AEAD_NEW);
if (PTR_ERR(tfm) == -ENOENT) {
aad_size -= 8;
tfm = crypto_alloc_aead(algo, 0, CRYPTO_ALG_AEAD_NEW);
}
if (IS_ERR(tfm)) { if (IS_ERR(tfm)) {
pr_err("alg: aead: Failed to load transform for %s: %ld\n", algo, pr_err("alg: aead: Failed to load transform for %s: %ld\n", algo,
......
...@@ -4359,8 +4359,7 @@ static void caam_aead_alg_init(struct caam_aead_alg *t_alg) ...@@ -4359,8 +4359,7 @@ static void caam_aead_alg_init(struct caam_aead_alg *t_alg)
alg->base.cra_module = THIS_MODULE; alg->base.cra_module = THIS_MODULE;
alg->base.cra_priority = CAAM_CRA_PRIORITY; alg->base.cra_priority = CAAM_CRA_PRIORITY;
alg->base.cra_ctxsize = sizeof(struct caam_ctx); alg->base.cra_ctxsize = sizeof(struct caam_ctx);
alg->base.cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY | alg->base.cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY;
CRYPTO_ALG_AEAD_NEW;
alg->init = caam_aead_init; alg->init = caam_aead_init;
alg->exit = caam_aead_exit; alg->exit = caam_aead_exit;
......
...@@ -1451,7 +1451,6 @@ static int __init ixp_module_init(void) ...@@ -1451,7 +1451,6 @@ static int __init ixp_module_init(void)
/* authenc */ /* authenc */
cra->base.cra_flags = CRYPTO_ALG_KERN_DRIVER_ONLY | cra->base.cra_flags = CRYPTO_ALG_KERN_DRIVER_ONLY |
CRYPTO_ALG_AEAD_NEW |
CRYPTO_ALG_ASYNC; CRYPTO_ALG_ASYNC;
cra->setkey = aead_setkey; cra->setkey = aead_setkey;
cra->setauthsize = aead_setauthsize; cra->setauthsize = aead_setauthsize;
......
...@@ -559,8 +559,7 @@ struct aead_alg nx_ccm_aes_alg = { ...@@ -559,8 +559,7 @@ struct aead_alg nx_ccm_aes_alg = {
.cra_name = "ccm(aes)", .cra_name = "ccm(aes)",
.cra_driver_name = "ccm-aes-nx", .cra_driver_name = "ccm-aes-nx",
.cra_priority = 300, .cra_priority = 300,
.cra_flags = CRYPTO_ALG_NEED_FALLBACK | .cra_flags = CRYPTO_ALG_NEED_FALLBACK,
CRYPTO_ALG_AEAD_NEW,
.cra_blocksize = 1, .cra_blocksize = 1,
.cra_ctxsize = sizeof(struct nx_crypto_ctx), .cra_ctxsize = sizeof(struct nx_crypto_ctx),
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
...@@ -580,8 +579,7 @@ struct aead_alg nx_ccm4309_aes_alg = { ...@@ -580,8 +579,7 @@ struct aead_alg nx_ccm4309_aes_alg = {
.cra_name = "rfc4309(ccm(aes))", .cra_name = "rfc4309(ccm(aes))",
.cra_driver_name = "rfc4309-ccm-aes-nx", .cra_driver_name = "rfc4309-ccm-aes-nx",
.cra_priority = 300, .cra_priority = 300,
.cra_flags = CRYPTO_ALG_NEED_FALLBACK | .cra_flags = CRYPTO_ALG_NEED_FALLBACK,
CRYPTO_ALG_AEAD_NEW,
.cra_blocksize = 1, .cra_blocksize = 1,
.cra_ctxsize = sizeof(struct nx_crypto_ctx), .cra_ctxsize = sizeof(struct nx_crypto_ctx),
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
......
...@@ -490,7 +490,6 @@ struct aead_alg nx_gcm_aes_alg = { ...@@ -490,7 +490,6 @@ struct aead_alg nx_gcm_aes_alg = {
.base = { .base = {
.cra_name = "gcm(aes)", .cra_name = "gcm(aes)",
.cra_driver_name = "gcm-aes-nx", .cra_driver_name = "gcm-aes-nx",
.cra_flags = CRYPTO_ALG_AEAD_NEW,
.cra_priority = 300, .cra_priority = 300,
.cra_blocksize = 1, .cra_blocksize = 1,
.cra_ctxsize = sizeof(struct nx_crypto_ctx), .cra_ctxsize = sizeof(struct nx_crypto_ctx),
...@@ -509,7 +508,6 @@ struct aead_alg nx_gcm4106_aes_alg = { ...@@ -509,7 +508,6 @@ struct aead_alg nx_gcm4106_aes_alg = {
.base = { .base = {
.cra_name = "rfc4106(gcm(aes))", .cra_name = "rfc4106(gcm(aes))",
.cra_driver_name = "rfc4106-gcm-aes-nx", .cra_driver_name = "rfc4106-gcm-aes-nx",
.cra_flags = CRYPTO_ALG_AEAD_NEW,
.cra_priority = 300, .cra_priority = 300,
.cra_blocksize = 1, .cra_blocksize = 1,
.cra_ctxsize = sizeof(struct nx_crypto_ctx), .cra_ctxsize = sizeof(struct nx_crypto_ctx),
......
...@@ -1738,7 +1738,6 @@ static int spacc_probe(struct platform_device *pdev) ...@@ -1738,7 +1738,6 @@ static int spacc_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&engine->registered_aeads); INIT_LIST_HEAD(&engine->registered_aeads);
for (i = 0; i < engine->num_aeads; ++i) { for (i = 0; i < engine->num_aeads; ++i) {
engine->aeads[i].engine = engine; engine->aeads[i].engine = engine;
engine->aeads[i].alg.base.cra_flags |= CRYPTO_ALG_AEAD_NEW;
err = crypto_register_aead(&engine->aeads[i].alg); err = crypto_register_aead(&engine->aeads[i].alg);
if (!err) { if (!err) {
list_add_tail(&engine->aeads[i].entry, list_add_tail(&engine->aeads[i].entry,
......
...@@ -1109,7 +1109,7 @@ static struct aead_alg qat_aeads[] = { { ...@@ -1109,7 +1109,7 @@ static struct aead_alg qat_aeads[] = { {
.cra_name = "authenc(hmac(sha1),cbc(aes))", .cra_name = "authenc(hmac(sha1),cbc(aes))",
.cra_driver_name = "qat_aes_cbc_hmac_sha1", .cra_driver_name = "qat_aes_cbc_hmac_sha1",
.cra_priority = 4001, .cra_priority = 4001,
.cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_AEAD_NEW, .cra_flags = CRYPTO_ALG_ASYNC,
.cra_blocksize = AES_BLOCK_SIZE, .cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct qat_alg_aead_ctx), .cra_ctxsize = sizeof(struct qat_alg_aead_ctx),
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
...@@ -1126,7 +1126,7 @@ static struct aead_alg qat_aeads[] = { { ...@@ -1126,7 +1126,7 @@ static struct aead_alg qat_aeads[] = { {
.cra_name = "authenc(hmac(sha256),cbc(aes))", .cra_name = "authenc(hmac(sha256),cbc(aes))",
.cra_driver_name = "qat_aes_cbc_hmac_sha256", .cra_driver_name = "qat_aes_cbc_hmac_sha256",
.cra_priority = 4001, .cra_priority = 4001,
.cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_AEAD_NEW, .cra_flags = CRYPTO_ALG_ASYNC,
.cra_blocksize = AES_BLOCK_SIZE, .cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct qat_alg_aead_ctx), .cra_ctxsize = sizeof(struct qat_alg_aead_ctx),
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
...@@ -1143,7 +1143,7 @@ static struct aead_alg qat_aeads[] = { { ...@@ -1143,7 +1143,7 @@ static struct aead_alg qat_aeads[] = { {
.cra_name = "authenc(hmac(sha512),cbc(aes))", .cra_name = "authenc(hmac(sha512),cbc(aes))",
.cra_driver_name = "qat_aes_cbc_hmac_sha512", .cra_driver_name = "qat_aes_cbc_hmac_sha512",
.cra_priority = 4001, .cra_priority = 4001,
.cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_AEAD_NEW, .cra_flags = CRYPTO_ALG_ASYNC,
.cra_blocksize = AES_BLOCK_SIZE, .cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct qat_alg_aead_ctx), .cra_ctxsize = sizeof(struct qat_alg_aead_ctx),
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
...@@ -1197,7 +1197,7 @@ int qat_algs_register(void) ...@@ -1197,7 +1197,7 @@ int qat_algs_register(void)
goto unlock; goto unlock;
for (i = 0; i < ARRAY_SIZE(qat_aeads); i++) for (i = 0; i < ARRAY_SIZE(qat_aeads); i++)
qat_aeads[i].base.cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_AEAD_NEW; qat_aeads[i].base.cra_flags = CRYPTO_ALG_ASYNC;
ret = crypto_register_aeads(qat_aeads, ARRAY_SIZE(qat_aeads)); ret = crypto_register_aeads(qat_aeads, ARRAY_SIZE(qat_aeads));
if (ret) if (ret)
......
...@@ -2730,7 +2730,6 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, ...@@ -2730,7 +2730,6 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
break; break;
case CRYPTO_ALG_TYPE_AEAD: case CRYPTO_ALG_TYPE_AEAD:
alg = &t_alg->algt.alg.aead.base; alg = &t_alg->algt.alg.aead.base;
alg->cra_flags |= CRYPTO_ALG_AEAD_NEW;
t_alg->algt.alg.aead.init = talitos_cra_init_aead; t_alg->algt.alg.aead.init = talitos_cra_init_aead;
t_alg->algt.alg.aead.setkey = aead_setkey; t_alg->algt.alg.aead.setkey = aead_setkey;
t_alg->algt.alg.aead.encrypt = aead_encrypt; t_alg->algt.alg.aead.encrypt = aead_encrypt;
......
...@@ -101,12 +101,6 @@ ...@@ -101,12 +101,6 @@
*/ */
#define CRYPTO_ALG_INTERNAL 0x00002000 #define CRYPTO_ALG_INTERNAL 0x00002000
/*
* Temporary flag used to prevent legacy AEAD implementations from
* being used by user-space.
*/
#define CRYPTO_ALG_AEAD_NEW 0x00004000
/* /*
* Transform masks and values (for crt_flags). * Transform masks and values (for crt_flags).
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment