From: Eric Biggers Date: Sun, 22 Oct 2023 08:10:52 +0000 (-0700) Subject: crypto: gcm - stop using alignmask of ahash X-Git-Tag: v6.7-rc1~91^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33fe2fb763a84152a297e97b144bbda19fde67e4;p=thirdparty%2Fkernel%2Flinux.git crypto: gcm - stop using alignmask of ahash Now that the alignmask for ahash and shash algorithms is always 0, simplify crypto_gcm_create_common() accordingly. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu --- diff --git a/crypto/gcm.c b/crypto/gcm.c index 91ce6e0e2afc1..84f7c23d14e48 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -629,8 +629,7 @@ static int crypto_gcm_create_common(struct crypto_template *tmpl, inst->alg.base.cra_priority = (ghash->base.cra_priority + ctr->base.cra_priority) / 2; inst->alg.base.cra_blocksize = 1; - inst->alg.base.cra_alignmask = ghash->base.cra_alignmask | - ctr->base.cra_alignmask; + inst->alg.base.cra_alignmask = ctr->base.cra_alignmask; inst->alg.base.cra_ctxsize = sizeof(struct crypto_gcm_ctx); inst->alg.ivsize = GCM_AES_IV_SIZE; inst->alg.chunksize = ctr->chunksize;