Re: [PATCH net] tls: skip empty data records in tls_sw_splice_read()
From: Qingfang Deng
Date: Wed Sep 30 2026 - 01:50:22 EST
On 2026/9/30 13:29, netdev-bot+sinfo@xxxxxxxxxx wrote:
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
Quoting Sashiko's reply:
When an application invokes splice() on a TLS 1.3 socket and a 0-length record arrives, rxm->full_len is 0, making chunk 0. net/tls/tls_sw.c:tls_sw_splice_read() { ... chunk = min_t(unsigned int, rxm->full_len, len); copied = skb_splice_bits(skb, sk, rxm->offset, pipe, chunk, flags); if (copied < 0) goto splice_requeue; if (copied < rxm->full_len) { rxm->offset += copied; rxm->full_len -= copied; goto splice_requeue; } consume_skb(skb); splice_read_end: tls_rx_reader_unlock(sk, ctx); return copied ? : err; } Because copied is 0, the copied < rxm->full_len check fails, the SKB is consumed, and the function returns 0. Returning 0 from a splice operation signals End-of-File to userspace, which would erroneously drop the live connection.
Best regards,