Hi! tls_sw_recvmsg() had been modified to cater better to async decrypt. Partially read records now live on the rx_list. Data is copied from this list before the old do {} while loop, and the not included correctly in deciding whether to sleep or not and lowat threshold handling. These modifications, unfortunately, added some bugs.
First patch fixes lowat - we need to calculate the threshold early and make sure all copied data is compared to the threshold, not just the freshly decrypted data. Third patch fixes sleep - if data is picked up from rx_list and no flags are set, we should not put the process to sleep, but rather return the partial read. Patches 2 and 4 add test cases for these bugs, both will cause a sleep and test timeout before the fix. Jakub Kicinski (4): net/tls: fix lowat calculation if some data came from previous record selftests/tls: test for lowat overshoot with multiple records net/tls: fix no wakeup on partial reads selftests/tls: add test for sleeping even though there is data net/tls/tls_sw.c | 19 +++++++----------- tools/testing/selftests/net/tls.c | 33 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 12 deletions(-) -- 2.21.0