diff options
author | Thara Gopinath <thara.gopinath@linaro.org> | 2021-04-29 18:07:01 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-05-14 14:07:55 +0300 |
commit | a9ca8eacb3204208863b9175baae8ac7ee6b2a64 (patch) | |
tree | f4a10d42c5d023894ab00f2a9ef94096239f6426 /drivers | |
parent | b7c3635e56d6561436af59b9876faa7cc8389644 (diff) | |
download | linux-a9ca8eacb3204208863b9175baae8ac7ee6b2a64.tar.xz |
crypto: qce - Add MAC failed error checking
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>
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/qce/common.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |