public inbox for kernel-tls-handshake@lists.linux.dev
 help / color / mirror / Atom feed
From: Wilfred Mallawa <wilfred.opensource@gmail.com>
To: Simon Horman <horms@kernel.org>
Cc: chuck.lever@oracle.com, kernel-tls-handshake@lists.linux.dev,
	"David S . Miller" <davem@davemloft.net>,
	donald.hunter@gmail.com, edumazet@google.com, hare@kernel.org,
	 Jakub Kicinski	 <kuba@kernel.org>,
	john.fastabend@gmail.com, linux-kernel@vger.kernel.org,
	 netdev@vger.kernel.org, pabeni@redhat.com,
	Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH] net/tls: allow limiting maximum record size
Date: Tue, 02 Sep 2025 07:46:55 +1000	[thread overview]
Message-ID: <7d71d5d3c708451372d2cd0580951997ccc4b883.camel@gmail.com> (raw)
In-Reply-To: <20250901164355.GM15473@horms.kernel.org>

On Mon, 2025-09-01 at 17:44 +0100, Simon Horman wrote:
> 
[snip]
> 
> > diff --git a/Documentation/netlink/specs/handshake.yaml
> > b/Documentation/netlink/specs/handshake.yaml
> > index 95c3fade7a8d..0dbe5d0c8507 100644
> > --- a/Documentation/netlink/specs/handshake.yaml
> > +++ b/Documentation/netlink/specs/handshake.yaml
> > @@ -87,6 +87,9 @@ attribute-sets:
> >          name: remote-auth
> >          type: u32
> >          multi-attr: true
> > +      -
> > +          name: record-size-limit
> > +          type: u32
> 
> nit: This indentation is not consistent with the existing spec.
> 
> >  
> >  operations:
> >    list:
> 
> And I believe you are missing the following hunk:
> 
> @@ -126,6 +126,7 @@ operations:
>              - status
>              - sockfd
>              - remote-auth
> +            - record-size-limit
> 
>  mcast-groups:
>    list:
> 
> ...
Ah good catch thanks!
> 
> > diff --git a/net/handshake/genl.c b/net/handshake/genl.c
> > index f55d14d7b726..fb8962ae7131 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_MAX] = {
> 
> Although it's necessary to update this file in patches,
> it is automatically generated using: make -C tools/net/ynl/
> 
> Accordingly, although the meaning is the same, the line above should
> be:
> 
> static const struct nla_policy
> handshake_done_nl_policy[HANDSHAKE_A_DONE_RECORD_SIZE_LIMIT + 1] = {
> 
> >  	[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_MAX,
> 
> And this one should be:
> 
> 		.maxattr        =
> HANDSHAKE_A_DONE_RECORD_SIZE_LIMIT,
> 
> >  		.flags		= GENL_CMD_CAP_DO,
> >  	},
> >  };
Okay did not know I could "make -C tools/net/ynl/" to generate this.
Will use that going forward. Thanks for the feedback!

Regards,
Wilfred


  reply	other threads:[~2025-09-01 21:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  5:36 [PATCH] net/tls: allow limiting maximum record size Wilfred Mallawa
2025-09-01 16:44 ` Simon Horman
2025-09-01 21:46   ` Wilfred Mallawa [this message]
2025-09-01 18:39 ` Jakub Kicinski
2025-09-01 18:47   ` Chuck Lever
2025-09-02  3:30   ` 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=7d71d5d3c708451372d2cd0580951997ccc4b883.camel@gmail.com \
    --to=wilfred.opensource@gmail.com \
    --cc=chuck.lever@oracle.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=hare@kernel.org \
    --cc=hare@suse.de \
    --cc=horms@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox