Re: [PATCH net] tls: skip empty data records in tls_sw_splice_read()
From: Sabrina Dubroca
Date: Wed Sep 30 2026 - 05:13:36 EST
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/
--
Sabrina