diff mbox series

[09/17] crypto: vmac - don't set alignmask

Message ID 20231019055343.588846-10-ebiggers@kernel.org
State New
Headers show
Series [01/17] crypto: sparc/crc32c - stop using the shash alignmask | expand

Commit Message

Eric Biggers Oct. 19, 2023, 5:53 a.m. UTC
From: Eric Biggers <ebiggers@google.com>

The vmac template is setting its alignmask to that of its underlying
'cipher'.  This doesn't actually accomplish anything useful, though, so
stop doing it.  (vmac_update() does have an alignment bug, where it
assumes u64 alignment when it shouldn't, but that bug exists both before
and after this patch.)  This is a prerequisite for removing support for
nonzero alignmasks from shash.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 crypto/vmac.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/crypto/vmac.c b/crypto/vmac.c
index 4633b2dda1e0a..0a1d8efa6c1a6 100644
--- a/crypto/vmac.c
+++ b/crypto/vmac.c
@@ -642,21 +642,20 @@  static int vmac_create(struct crypto_template *tmpl, struct rtattr **tb)
 	err = -EINVAL;
 	if (alg->cra_blocksize != VMAC_NONCEBYTES)
 		goto err_free_inst;
 
 	err = crypto_inst_setname(shash_crypto_instance(inst), tmpl->name, alg);
 	if (err)
 		goto err_free_inst;
 
 	inst->alg.base.cra_priority = alg->cra_priority;
 	inst->alg.base.cra_blocksize = alg->cra_blocksize;
-	inst->alg.base.cra_alignmask = alg->cra_alignmask;
 
 	inst->alg.base.cra_ctxsize = sizeof(struct vmac_tfm_ctx);
 	inst->alg.base.cra_init = vmac_init_tfm;
 	inst->alg.base.cra_exit = vmac_exit_tfm;
 
 	inst->alg.descsize = sizeof(struct vmac_desc_ctx);
 	inst->alg.digestsize = VMAC_TAG_LEN / 8;
 	inst->alg.init = vmac_init;
 	inst->alg.update = vmac_update;
 	inst->alg.final = vmac_final;