From: Sabrina Dubroca <sd@queasysnail.net>
To: Wilfred Mallawa <wilfred.opensource@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, corbet@lwn.net,
john.fastabend@gmail.com, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
alistair.francis@wdc.com, dlemoal@kernel.org,
Wilfred Mallawa <wilfred.mallawa@wdc.com>
Subject: Re: [PATCH v3] net/tls: support maximum record size limit
Date: Thu, 4 Sep 2025 11:54:03 +0200 [thread overview]
Message-ID: <aLlhuyBQ8C610qv-@krikkit> (raw)
In-Reply-To: <aLgVCGbq0b6PJXbY@krikkit>
2025-09-03, 12:14:32 +0200, Sabrina Dubroca wrote:
> 2025-09-03, 11:47:57 +1000, Wilfred Mallawa wrote:
> Pushing out the pending "too big" record at the time we set
> tx_record_size_limit would likely make the peer close the connection
> (because it's already told us to limit our TX size), so I guess we'd
> have to split the pending record into tx_record_size_limit chunks
> before we start processing the new message (either directly at
> setsockopt(TLS_INFO_TX_RECORD_SIZE_LIM) time, or the next send/etc
> call). The final push during socket closing, and maybe some more
> codepaths that deal with ctx->open_rec, would also have to do that.
>
> I think additional selftests for
> send(MSG_MORE), TLS_INFO_TX_RECORD_SIZE_LIM, send
> and
> send(MSG_MORE), TLS_INFO_TX_RECORD_SIZE_LIM, close
> verifying the received record sizes would make sense, since it's a bit
> tricky to get that right.
Hmm, after thinking about this a bit more, maybe we don't need to
care? There could be more records larger than the new limit already
pushed out to TCP but not received by the peer, and we can't do
anything about those.
I suspect it's not a problem in practice because of what the TLS
exchange between the peers setting up this extension looks like? (ie,
there should never be an open record at this stage - unless userspace
delays doing this setsockopt after getting the message from the peer,
but then maybe we can call that a buggy userspace)
--
Sabrina
next prev parent reply other threads:[~2025-09-04 9:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 1:47 [PATCH v3] net/tls: support maximum record size limit Wilfred Mallawa
2025-09-03 10:14 ` Sabrina Dubroca
2025-09-04 9:54 ` Sabrina Dubroca [this message]
2025-09-18 0:52 ` Wilfred Mallawa
2025-09-03 22:51 ` Jakub Kicinski
2025-09-04 23:41 ` Wilfred Mallawa
2025-09-04 10:10 ` Sabrina Dubroca
2025-09-04 13:33 ` Jakub Kicinski
2025-09-18 1:42 ` Wilfred Mallawa
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=aLlhuyBQ8C610qv-@krikkit \
--to=sd@queasysnail.net \
--cc=alistair.francis@wdc.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dlemoal@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wilfred.mallawa@wdc.com \
--cc=wilfred.opensource@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).