Patch "crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()" has been added to the 5.15-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: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()

to the 5.15-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-sun8i-ss-fix-a-test-in-sun8i_ss_setup_ivs.patch
and it can be found in the queue-5.15 subdirectory.

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



commit b96cd8468ec5b7b52e8070477a3b7f2303dc4ea0
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Mon Apr 17 22:25:09 2023 +0200

    crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()
    
    [ Upstream commit 8fd91151ebcb21b3f2f2bf158ac6092192550b2b ]
    
    SS_ENCRYPTION is (0 << 7 = 0), so the test can never be true.
    Use a direct comparison to SS_ENCRYPTION instead.
    
    The same king of test is already done the same way in sun8i_ss_run_task().
    
    Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
index 005eefecfdf59..0cc8cafdde27c 100644
--- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
@@ -132,7 +132,7 @@ static int sun8i_ss_setup_ivs(struct skcipher_request *areq)
 		}
 		rctx->p_iv[i] = a;
 		/* we need to setup all others IVs only in the decrypt way */
-		if (rctx->op_dir & SS_ENCRYPTION)
+		if (rctx->op_dir == SS_ENCRYPTION)
 			return 0;
 		todo = min(len, sg_dma_len(sg));
 		len -= todo;



[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