Netdev List
 help / color / mirror / Atom feed
From: "Chuck Lever" <cel@kernel.org>
To: netdev-bot+sashiko@kernel.org
Cc: john.fastabend@gmail.com, kuba@kernel.org, sd@queasysnail.net,
	davem@davemloft.net, pabeni@redhat.com, horms@kernel.org,
	davejwatson@fb.com, shuah@kernel.org, qingfang.deng@linux.dev,
	edumazet@kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v2 5/8] tls: consume empty data records in tls_sw_recvmsg()
Date: Tue, 06 Oct 2026 11:47:32 -0400	[thread overview]
Message-ID: <578d77f7-7d4d-412f-964d-e6e94180221a@slotpi15m67> (raw)
In-Reply-To: <179124254665.434549.12245680127262431659@kernel.org>

On Mon, Oct 05, 2026, netdev-bot+sashiko@kernel.org wrote:
> > +		if (!chunk && control == TLS_RECORD_TYPE_DATA) {
> > +			if (!darg.zc)
> > +				consume_skb(darg.skb);
> > +
> > +			/* An empty record still marks a boundary. */
> > +			msg->msg_flags |= MSG_EOR;
> > +			continue;
> > +		}
>
> [Severity: High]
> This keeps empty records off rx_list. Does the receive loop still fail to
> make progress on them, though?

It does, and this patch does not change that. Before it, every arm
of the loop reached "decrypted += chunk" and "len -= chunk" with
chunk == 0 and went around again. The patch stops the peek and
async arms from queueing those records on rx_list and leaves the
loop's bounds alone.

The patch description cites the loop to explain why rx_list grows,
and I can see it reads as a claim that the patch bounds the loop.
I'll reword it in v3.


> In-kernel MSG_DONTWAIT callers never receive a signal, so they cannot use
> this exit. One example is svc_tcp_sock_recvmsg() in net/sunrpc/svcsock.c:

True, and also true before this series.


> should the empty-record branch break out once decrypted + copied >= target?

Returning bytes already copied instead of waiting out a run of
empty records is reasonable, and I'll look at it for v3. With
nothing copied, a blocking reader has no return value that is not
EOF or an error, so that case keeps looping until a record with
data, a signal, or the end of the run.


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

  reply	other threads:[~2026-10-06 15:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 22:41 [PATCH net-next v2 0/8] net/tls: Receive-path fixes for zero-length data records Chuck Lever
2026-10-01 22:41 ` [PATCH net-next v2 1/8] tls: bound consecutive no-data records in tls_sw_read_sock() Chuck Lever
2026-10-05 23:22   ` netdev-bot+sashiko
2026-10-06 15:44     ` Chuck Lever
2026-10-01 22:41 ` [PATCH net-next v2 2/8] tls: check for a pending signal after an empty record Chuck Lever
2026-10-05 23:22   ` netdev-bot+sashiko
2026-10-06 15:45     ` Chuck Lever
2026-10-01 22:41 ` [PATCH net-next v2 3/8] tls: consume empty data records in tls_sw_splice_read() Chuck Lever
2026-10-05 23:22   ` netdev-bot+sashiko
2026-10-06 15:45     ` Chuck Lever
2026-10-01 22:41 ` [PATCH net-next v2 4/8] tls: honor O_NONBLOCK " Chuck Lever
2026-10-05 23:22   ` netdev-bot+sashiko
2026-10-06 15:46     ` Chuck Lever
2026-10-01 22:41 ` [PATCH net-next v2 5/8] tls: consume empty data records in tls_sw_recvmsg() Chuck Lever
2026-10-05 23:22   ` netdev-bot+sashiko
2026-10-06 15:47     ` Chuck Lever [this message]
2026-10-01 22:41 ` [PATCH net-next v2 6/8] selftests: tls: add peek and splice coverage for zero-length records Chuck Lever
2026-10-05 23:22   ` netdev-bot+sashiko
2026-10-01 22:41 ` [PATCH net-next v2 7/8] selftests: tls: skip the zero_len tests when TLS is unavailable Chuck Lever
2026-10-05 23:22   ` netdev-bot+sashiko
2026-10-01 22:41 ` [PATCH net-next v2 8/8] selftests: tls: cover splice on a nonblocking socket Chuck Lever
2026-10-01 22:45 ` [PATCH net-next v2 0/8] net/tls: Receive-path fixes for zero-length data records netdev-bot+sinfo
2026-10-02 15:30   ` Chuck Lever
2026-10-04  6:36 ` Qingfang Deng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=578d77f7-7d4d-412f-964d-e6e94180221a@slotpi15m67 \
    --to=cel@kernel.org \
    --cc=davejwatson@fb.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qingfang.deng@linux.dev \
    --cc=sd@queasysnail.net \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox