netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Wilfred Mallawa <wilfred.opensource@gmail.com>,
	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 08:47:12 +0200	[thread overview]
Message-ID: <1bc0eb81-3ccf-479e-924d-f0672daf5fab@suse.de> (raw)
In-Reply-To: <90cc9b71e356a94e593b66614bbb28a542ca204c.camel@gmail.com>

On 8/21/25 08:18, Wilfred Mallawa wrote:
> 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.
> 
I guess, no reason, just an oversight.

>> 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?
> 
Yes, you are right.

Cheers,
Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich

      reply	other threads:[~2025-08-21  6:47 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
2025-08-21  6:47       ` Hannes Reinecke [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=1bc0eb81-3ccf-479e-924d-f0672daf5fab@suse.de \
    --to=hare@suse.de \
    --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=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 \
    --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).