Messages in this thread |  | | Date | Sat, 7 Mar 2026 14:23:58 +0900 | | From | Herbert Xu <> | | Subject | Re: [PATCH v10 2/3] crypto: ti - Add support for AES-GCM in DTHEv2 driver |
| |
On Thu, Feb 26, 2026 at 06:24:40PM +0530, T Pratham wrote: > > + src = dthe_aead_prep_src(req->src, req->assoclen, cryptlen, > + src_assoc_padbuf, src_crypt_padbuf); > + if (IS_ERR(src)) { > + ret = PTR_ERR(src); > + goto aead_prep_src_err; > + } > + > + if (req->assoclen % AES_BLOCK_SIZE) > + assoclen += AES_BLOCK_SIZE - (req->assoclen % AES_BLOCK_SIZE); > + if (cryptlen % AES_BLOCK_SIZE) > + cryptlen += AES_BLOCK_SIZE - (cryptlen % AES_BLOCK_SIZE); > + > + src_nents = sg_nents_for_len(src, assoclen + cryptlen); > + > + if (cryptlen != 0) { > + dst = dthe_aead_prep_dst(req->dst, req->assoclen, unpadded_cryptlen, > + dst_crypt_padbuf); > + if (IS_ERR(dst)) { > + ret = PTR_ERR(dst); > + goto aead_prep_dst_err; > + } > + > + dst_nents = sg_nents_for_len(dst, cryptlen); > + } > + /* Prep finished */
How does this handle the case where req->src == req->dst?
Thanks, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
|  |