lkml.org 
[lkml]   [2021]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/7] crypto: qce: Add support for AEAD algorithms
From
Date


On 3/12/21 8:01 AM, Herbert Xu wrote:
> On Thu, Feb 25, 2021 at 01:27:13PM -0500, Thara Gopinath wrote:
>>
>> +static int
>> +qce_aead_async_req_handle(struct crypto_async_request *async_req)
>> +{
>> + struct aead_request *req = aead_request_cast(async_req);
>> + struct qce_aead_reqctx *rctx = aead_request_ctx(req);
>> + struct crypto_aead *tfm = crypto_aead_reqtfm(req);
>> + struct qce_aead_ctx *ctx = crypto_tfm_ctx(async_req->tfm);
>> + struct qce_alg_template *tmpl = to_aead_tmpl(crypto_aead_reqtfm(req));
>> + struct qce_device *qce = tmpl->qce;
>> + enum dma_data_direction dir_src, dir_dst;
>> + unsigned int totallen;
>> + bool diff_dst;
>> + int ret;
>> +
>> + if (IS_CCM_RFC4309(rctx->flags)) {
>> + memset(rctx->ccm_rfc4309_iv, 0, QCE_MAX_IV_SIZE);
>> + rctx->ccm_rfc4309_iv[0] = 3;
>> + memcpy(&rctx->ccm_rfc4309_iv[1], ctx->ccm4309_salt, QCE_CCM4309_SALT_SIZE);
>> + memcpy(&rctx->ccm_rfc4309_iv[4], req->iv, 8);
>> + rctx->iv = rctx->ccm_rfc4309_iv;
>> + rctx->ivsize = AES_BLOCK_SIZE;
>> + } else {
>> + rctx->iv = req->iv;
>> + rctx->ivsize = crypto_aead_ivsize(tfm);
>> + }
>> + if (IS_CCM_RFC4309(rctx->flags))
>> + rctx->assoclen = req->assoclen - 8;
>> + else
>> + rctx->assoclen = req->assoclen;
>> +
>> + totallen = rctx->cryptlen + rctx->assoclen;
>
> This triggers a warning on totallen not being used. Please fix.

hmm.. this is strange. I could swear that I checked for warnings before
sending this out. But I will fix this. I will wait for a couple of more
days for any other comments and then spin a v2.

>
> Thanks,
>

--
Warm Regards
Thara

\
 
 \ /
  Last update: 2021-03-17 03:11    [W:0.055 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site