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

From: Chuck Lever

Date: Wed Sep 30 2026 - 10:45:09 EST




On Wed, Sep 30, 2026, at 2:47 AM, Sabrina Dubroca wrote:
> 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?

History: I stopped working on that since Jakub seemed to think the
fixes were not worth the trouble, and my objective is to get kTLS
and its kernel consumers in shape to support KeyUpdate.

If you think cleaning up and reposting an old series would be
received well, I can take it up again. (And forgive me, but can
you send along a lore URL so I'm sure I'm working on the correct
one?)


--
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)