From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Thara Gopinath <thara.gopinath@linaro.org>
Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
ebiggers@google.com, ardb@kernel.org, sivaprak@codeaurora.org,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [Patch v2 1/7] crypto: qce: common: Add MAC failed error checking
Date: Sun, 18 Apr 2021 22:02:11 -0500 [thread overview]
Message-ID: <20210419030211.GI1538589@yoga> (raw)
In-Reply-To: <20210417132503.1401128-2-thara.gopinath@linaro.org>
On Sat 17 Apr 08:24 CDT 2021, Thara Gopinath wrote:
> MAC_FAILED gets set in the status register if authenthication fails
> for ccm algorithms(during decryption). Add support to catch and flag
> this error.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
> ---
>
> v1->v2:
> - Split the error checking for -ENXIO and -EBADMSG into if-else clause
> so that the code is more readable as per Bjorn's review comment.
>
> drivers/crypto/qce/common.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/crypto/qce/common.c b/drivers/crypto/qce/common.c
> index dceb9579d87a..dd76175d5c62 100644
> --- a/drivers/crypto/qce/common.c
> +++ b/drivers/crypto/qce/common.c
> @@ -419,6 +419,8 @@ int qce_check_status(struct qce_device *qce, u32 *status)
> */
> if (*status & STATUS_ERRORS || !(*status & BIT(OPERATION_DONE_SHIFT)))
> ret = -ENXIO;
> + else if (*status & BIT(MAC_FAILED_SHIFT))
> + ret = -EBADMSG;
>
> return ret;
> }
> --
> 2.25.1
>
next prev parent reply other threads:[~2021-04-19 3:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-17 13:24 [Patch v2 0/7] Add support for AEAD algorithms in Qualcomm Crypto Engine driver Thara Gopinath
2021-04-17 13:24 ` [Patch v2 1/7] crypto: qce: common: Add MAC failed error checking Thara Gopinath
2021-04-19 3:02 ` Bjorn Andersson [this message]
2021-04-17 13:24 ` [Patch v2 2/7] crypto: qce: common: Make result dump optional Thara Gopinath
2021-04-17 13:24 ` [Patch v2 3/7] crypto: qce: Add mode for rfc4309 Thara Gopinath
2021-04-19 3:03 ` Bjorn Andersson
2021-04-17 13:25 ` [Patch v2 4/7] crypto: qce: Add support for AEAD algorithms Thara Gopinath
2021-04-17 13:25 ` [Patch v2 5/7] crypto: qce: common: Clean up qce_auth_cfg Thara Gopinath
2021-04-17 13:25 ` [Patch v2 6/7] crypto: qce: common: Add support for AEAD algorithms Thara Gopinath
2021-04-17 15:38 ` kernel test robot
2021-04-19 3:16 ` Bjorn Andersson
2021-04-17 13:25 ` [Patch v2 7/7] crypto: qce: aead: Schedule fallback algorithm 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=20210419030211.GI1538589@yoga \
--to=bjorn.andersson@linaro.org \
--cc=ardb@kernel.org \
--cc=davem@davemloft.net \
--cc=ebiggers@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sivaprak@codeaurora.org \
--cc=thara.gopinath@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).