Re: [PATCH net] tls: skip empty data records in tls_sw_splice_read()

From: Qingfang Deng

Date: Wed Sep 30 2026 - 05:32:22 EST


On 2026/9/30 17:13, Sabrina Dubroca wrote:
2026-09-30, 13:26:36 +0800, Qingfang Deng wrote:
tls_sw_splice_read() returns 0 after receiving an empty application
record. This looks like EOF for splice(), even though the connection
remains open and more data may be available.

Consume empty application records and retry the receive path instead,
following the approach used in tls_sw_read_sock() since commit
3be28e2c9cd0 ("net/tls: Consume empty data records in tls_sw_read_sock()").
This is similar to what Chuck proposed in July:
https://lore.kernel.org/all/20260726-tls-follow-on-v1-2-99bf4cc1c729@xxxxxxxxxx

but Chuck's patch had some extra bits (handling of the "released" flag
and of signal_pending).

His series also had a selftest which should be included too
https://lore.kernel.org/all/20260726-tls-follow-on-v1-6-99bf4cc1c729@xxxxxxxxxx/

Thanks for the information. I prefer his series.


--
pw-bot: cr