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

From: Sabrina Dubroca

Date: Wed Sep 30 2026 - 05:56:08 EST


2026-09-30, 17:24:18 +0800, Qingfang Deng wrote:
> 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.

Let's see if he has the time/interest to continue work on this (since
he didn't send a v2, I'm guessing not).

Chuck, do you want to pick up that TLS fixes series again, or would
you rather let Qingfang finish off the "splice vs empty record"
patch+selftest based on what you had sent?

--
Sabrina