OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7c3635
)
crypto: qce - Add MAC failed error checking
author
Thara Gopinath
<thara.gopinath@linaro.org>
Thu, 29 Apr 2021 15:07:01 +0000
(11:07 -0400)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Fri, 14 May 2021 11:07:55 +0000
(19:07 +0800)
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>
drivers/crypto/qce/common.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/qce/common.c
b/drivers/crypto/qce/common.c
index
dceb957
..
dd76175
100644
(file)
--- 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;
}