Patch "tls: rx: fix return value for async crypto" has been added to the 6.2-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

    tls: rx: fix return value for async crypto

to the 6.2-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:
     tls-rx-fix-return-value-for-async-crypto.patch
and it can be found in the queue-6.2 subdirectory.

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



commit 1f11618a16786ffb9e5821c0cac58a301daa7069
Author: Jakub Kicinski <kuba@xxxxxxxxxx>
Date:   Mon Feb 27 10:12:01 2023 -0800

    tls: rx: fix return value for async crypto
    
    [ Upstream commit 4d42cd6bc2ac1b9be50ade13771daec90c9d18b1 ]
    
    Gaurav reports that TLS Rx is broken with async crypto
    accelerators. The commit under fixes missed updating
    the retval byte counting logic when updating how records
    are stored. Even tho both before and after the change
    'decrypted' was updated inside the main loop, it was
    completely overwritten when processing the async
    completions. Now that the rx_list only holds
    non-zero-copy records we need to add, not overwrite.
    
    Reported-and-bisected-by: Gaurav Jain <gaurav.jain@xxxxxxx>
    Fixes: cbbdee9918a2 ("tls: rx: async: don't put async zc on the list")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217064
    Tested-by: Gaurav Jain <gaurav.jain@xxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230227181201.1793772-1-kuba@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 38dcd9b401027..992092aeebad9 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2114,7 +2114,7 @@ int tls_sw_recvmsg(struct sock *sk,
 		else
 			err = process_rx_list(ctx, msg, &control, 0,
 					      async_copy_bytes, is_peek);
-		decrypted = max(err, 0);
+		decrypted += max(err, 0);
 	}
 
 	copied += decrypted;



[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