Patch "crypto: omap-sham - fix digcnt register handling with export/import" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    crypto: omap-sham - fix digcnt register handling with export/import

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     crypto-omap-sham-fix-digcnt-register-handling-with-e.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a855ece137c39a1aa66fa786f3a19fff1b1b8713
Author: Tero Kristo <t-kristo@xxxxxx>
Date:   Mon Sep 7 10:56:24 2020 +0300

    crypto: omap-sham - fix digcnt register handling with export/import
    
    [ Upstream commit 3faf757bad75f3fc1b2736f0431e295a073a7423 ]
    
    Running export/import for hashes in peculiar order (mostly done by
    openssl) can mess up the internal book keeping of the OMAP SHA core.
    Fix by forcibly writing the correct DIGCNT back to hardware. This issue
    was noticed while transitioning to openssl 1.1 support.
    
    Fixes: 0d373d603202 ("crypto: omap-sham - Add OMAP4/AM33XX SHAM Support")
    Signed-off-by: Tero Kristo <t-kristo@xxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index aba5db3c0588f..d7c0c982ba433 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -453,6 +453,9 @@ static void omap_sham_write_ctrl_omap4(struct omap_sham_dev *dd, size_t length,
 	struct omap_sham_reqctx *ctx = ahash_request_ctx(dd->req);
 	u32 val, mask;
 
+	if (likely(ctx->digcnt))
+		omap_sham_write(dd, SHA_REG_DIGCNT(dd), ctx->digcnt);
+
 	/*
 	 * Setting ALGO_CONST only for the first iteration and
 	 * CLOSE_HASH only for the last one. Note that flags mode bits



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux