Skip to content

Commit

Permalink
crypto: qce - Add MAC failed error checking
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Thara Gopinath <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
tharagopinath authored and herbertx committed May 14, 2021
1 parent b7c3635 commit a9ca8ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/crypto/qce/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a9ca8ea

Please sign in to comment.