From: Sabrina Dubroca <sd@queasysnail.net>
To: Wilfred Mallawa <wilfred.mallawa@wdc.com>,
"kuba@kernel.org" <kuba@kernel.org>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"edumazet@google.com" <edumazet@google.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"horms@kernel.org" <horms@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] net/tls: support maximum record size limit
Date: Sun, 28 Sep 2025 23:44:47 +0200 [thread overview]
Message-ID: <aNmsTxyg75HHkmIJ@krikkit> (raw)
In-Reply-To: <bfc1bab9a8f2f51e19ba4fd57a6b8bdf69683d42.camel@wdc.com>
2025-09-25, 23:37:09 +0000, Wilfred Mallawa wrote:
> On Thu, 2025-09-25 at 23:29 +0200, Sabrina Dubroca wrote:
> > 2025-09-25, 05:39:14 +0000, Wilfred Mallawa wrote:
> > > On Wed, 2025-09-24 at 19:50 +0200, Sabrina Dubroca wrote:
> > > > > @@ -1111,6 +1180,11 @@ static int tls_get_info(struct sock *sk,
> > > > > struct sk_buff *skb, bool net_admin)
> > > > > goto nla_failure;
> > > > > }
> > > > >
> > > > > + err = nla_put_u16(skb, TLS_INFO_TX_RECORD_SIZE_LIM,
> > > > > + ctx->tx_record_size_limit);
> > > >
> > > > I'm not sure here: if we do the +1 adjustment we'd be consistent
> > > > with
> > > > the value reported by getsockopt, but OTOH users may get confused
> > > > about seeing a value larger than TLS_MAX_PAYLOAD_SIZE.
> > > Makes sense to keep the behaviour the same as getsockopt() right?
> > > So
> > > add the +1 changes here based on version (same as getsockopt()). In
> > > which case, it should never exceed TLS_MAX_PAYLOAD_SIZE.
> >
> > The max value for 1.3 is TLS_MAX_PAYLOAD_SIZE+1 (after adjustment),
> > since it's the max value that will be accepted by setsockopt (after
> > passing the "value - 1 > TLS_MAX_PAYLOAD_SIZE" check). And it's the
> > value most users will see since it's the default.
>
> Ah I see what you mean. In regards to "but OTOH users may get confused
> about seeing a value larger than TLS_MAX_PAYLOAD_SIZE.", do you think
> it's sufficient to document TLS_MAX_PAYLOAD_SIZE and specify that for
> TLS 1.3 this doesn't include the ContentType byte?
I guess it will have to do. Otherwise, unless someone has another
idea, we're back to the discussion on v3 (ie setting the actual
payload size instead of the record limit).
--
Sabrina
prev parent reply other threads:[~2025-09-28 21:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 5:32 [PATCH v4 1/2] net/tls: support maximum record size limit Wilfred Mallawa
2025-09-23 5:32 ` [PATCH v4 2/2] selftests: tls: add tls record_size_limit test Wilfred Mallawa
2025-09-24 17:50 ` Sabrina Dubroca
2025-09-25 5:16 ` Wilfred Mallawa
2025-09-24 17:03 ` [PATCH v4 1/2] net/tls: support maximum record size limit Simon Horman
2025-09-25 5:19 ` Wilfred Mallawa
2025-09-24 17:50 ` Sabrina Dubroca
2025-09-25 5:39 ` Wilfred Mallawa
2025-09-25 21:29 ` Sabrina Dubroca
2025-09-25 23:37 ` Wilfred Mallawa
2025-09-28 21:44 ` Sabrina Dubroca [this message]
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=aNmsTxyg75HHkmIJ@krikkit \
--to=sd@queasysnail.net \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--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=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=wilfred.mallawa@wdc.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).