From: Wilfred Mallawa <wilfred.opensource@gmail.com>
To: Hannes Reinecke <hare@suse.de>,
chuck.lever@oracle.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
donald.hunter@gmail.com, borisp@nvidia.com,
john.fastabend@gmail.com
Cc: alistair.francis@wdc.com, dlemoal@kernel.org,
kernel-tls-handshake@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC v2 1/1] net/tls: allow limiting maximum record size
Date: Thu, 21 Aug 2025 16:18:25 +1000 [thread overview]
Message-ID: <90cc9b71e356a94e593b66614bbb28a542ca204c.camel@gmail.com> (raw)
In-Reply-To: <a9ea0abf-1f11-4760-80b8-6a688e020093@suse.de>
On Mon, 2025-08-18 at 08:31 +0200, Hannes Reinecke wrote:
>
[snip]
> > --- a/include/uapi/linux/handshake.h
> > +++ b/include/uapi/linux/handshake.h
> > @@ -54,6 +54,7 @@ enum {
> > HANDSHAKE_A_DONE_STATUS = 1,
> > HANDSHAKE_A_DONE_SOCKFD,
> > HANDSHAKE_A_DONE_REMOTE_AUTH,
> > + HANDSHAKE_A_DONE_RECORD_SIZE_LIMIT,
> >
> > __HANDSHAKE_A_DONE_MAX,
> > HANDSHAKE_A_DONE_MAX = (__HANDSHAKE_A_DONE_MAX - 1)
> > diff --git a/net/handshake/genl.c b/net/handshake/genl.c
> > index f55d14d7b726..44c43ce18361 100644
> > --- a/net/handshake/genl.c
> > +++ b/net/handshake/genl.c
> > @@ -16,10 +16,11 @@ static const struct nla_policy
> > handshake_accept_nl_policy[HANDSHAKE_A_ACCEPT_HAN
> > };
> >
> > /* HANDSHAKE_CMD_DONE - do */
> > -static const struct nla_policy
> > handshake_done_nl_policy[HANDSHAKE_A_DONE_REMOTE_AUTH + 1] = {
> > +static const struct nla_policy
> > handshake_done_nl_policy[HANDSHAKE_A_DONE_RECORD_SIZE_LIMIT + 1] =
> > {
>
Hey Hannes,
I did consider using HANDSHAKE_A_DONE_MAX, but wasn't sure if the
existing convention is there for some reason. But I can switch over if
you think that is best.
> Shouldn't that be 'HANDSHAKE_A_DONE_MAX'?
>
> > [HANDSHAKE_A_DONE_STATUS] = { .type = NLA_U32, },
> > [HANDSHAKE_A_DONE_SOCKFD] = { .type = NLA_S32, },
> > [HANDSHAKE_A_DONE_REMOTE_AUTH] = { .type = NLA_U32, },
> > + [HANDSHAKE_A_DONE_RECORD_SIZE_LIMIT] = { .type = NLA_U32,
> > },
> > };
> >
> > /* Ops table for handshake */
> > @@ -35,7 +36,7 @@ static const struct genl_split_ops
> > handshake_nl_ops[] = {
> > .cmd = HANDSHAKE_CMD_DONE,
> > .doit = handshake_nl_done_doit,
> > .policy =
> > handshake_done_nl_policy,
> > - .maxattr = HANDSHAKE_A_DONE_REMOTE_AUTH,
> > + .maxattr =
> > HANDSHAKE_A_DONE_RECORD_SIZE_LIMIT,
>
> HANDSHAKE_A_DONE_MAX - 1?
Shouldn't it be `HANDSHAKE_A_DONE_MAX`? Unless the existing
`HANDSHAKE_A_DONE_REMOTE_AUTH` is incorrect?
Thanks for the review!
Regards,
Wilfred
>
next prev parent reply other threads:[~2025-08-21 6:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 7:23 [RFC v2 0/1] net/tls: add support for limiting the max record size Wilfred Mallawa
2025-08-08 7:24 ` [RFC v2 1/1] net/tls: allow limiting maximum " Wilfred Mallawa
2025-08-18 6:31 ` Hannes Reinecke
2025-08-21 6:18 ` Wilfred Mallawa [this message]
2025-08-21 6:47 ` Hannes Reinecke
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=90cc9b71e356a94e593b66614bbb28a542ca204c.camel@gmail.com \
--to=wilfred.opensource@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=borisp@nvidia.com \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=dlemoal@kernel.org \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=hare@suse.de \
--cc=john.fastabend@gmail.com \
--cc=kernel-tls-handshake@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.