All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thara Gopinath <thara.gopinath@linaro.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, bjorn.andersson@linaro.org,
	ebiggers@google.com, ardb@kernel.org, sivaprak@codeaurora.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] crypto: qce: Add support for AEAD algorithms
Date: Tue, 16 Mar 2021 22:09:41 -0400	[thread overview]
Message-ID: <69c608d4-5dff-b33b-e112-2b2603ecfd27@linaro.org> (raw)
In-Reply-To: <20210312130150.GA17238@gondor.apana.org.au>



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

  reply	other threads:[~2021-03-17  2:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 18:27 [PATCH 0/7] Add support for AEAD algorithms in Qualcomm Crypto Engine driver Thara Gopinath
2021-02-25 18:27 ` [PATCH 1/7] crypto: qce: common: Add MAC failed error checking Thara Gopinath
2021-04-05 17:36   ` Bjorn Andersson
2021-04-13 19:28     ` Thara Gopinath
2021-02-25 18:27 ` [PATCH 2/7] crypto: qce: common: Make result dump optional Thara Gopinath
2021-04-05 22:23   ` Bjorn Andersson
2021-02-25 18:27 ` [PATCH 3/7] crypto: qce: Add mode for rfc4309 Thara Gopinath
2021-04-05 22:32   ` Bjorn Andersson
2021-04-13 19:30     ` Thara Gopinath
2021-04-13 20:38       ` Bjorn Andersson
2021-02-25 18:27 ` [PATCH 4/7] crypto: qce: Add support for AEAD algorithms Thara Gopinath
2021-03-12 13:01   ` Herbert Xu
2021-03-17  2:09     ` Thara Gopinath [this message]
2021-02-25 18:27 ` [PATCH 5/7] crypto: qce: common: Clean up qce_auth_cfg Thara Gopinath
2021-02-25 18:27 ` [PATCH 6/7] crypto: qce: common: Add support for AEAD algorithms Thara Gopinath
2021-04-05 22:18   ` Bjorn Andersson
2021-04-13 21:31     ` Thara Gopinath
2021-04-13 22:20       ` Bjorn Andersson
2021-04-13 22:44         ` Thara Gopinath
2021-04-13 23:09           ` Bjorn Andersson
2021-04-17 13:31             ` Thara Gopinath
2021-04-13 22:27     ` Thara Gopinath
2021-04-13 22:33       ` Bjorn Andersson
2021-04-13 22:46         ` Thara Gopinath
2021-02-25 18:27 ` [PATCH 7/7] crypto: qce: aead: Schedule fallback algorithm Thara Gopinath
2021-03-04  5:30 ` [PATCH 0/7] Add support for AEAD algorithms in Qualcomm Crypto Engine driver Herbert Xu
2021-03-04 18:41   ` Thara Gopinath
2021-03-12 13:02     ` Herbert Xu
2021-03-17  2:08       ` Thara Gopinath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69c608d4-5dff-b33b-e112-2b2603ecfd27@linaro.org \
    --to=thara.gopinath@linaro.org \
    --cc=ardb@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sivaprak@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.