All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenXiaoSong <chenxiaosong.chenxiaosong@linux.dev>
To: chenxiaosong.chenxiaosong@linux.dev, sfrench@samba.org,
	smfrench@gmail.com, linkinjeon@kernel.org, linkinjeon@samba.org,
	pc@manguebit.org, ronniesahlberg@gmail.com,
	sprasad@microsoft.com, tom@talpey.com, bharathsm@microsoft.com,
	senozhatsky@chromium.org, dhowells@redhat.com
Cc: linux-cifs@vger.kernel.org
Subject: Re: [PATCH RFC v3 2/3] smb/server: fix minimum SMB2 PDU size
Date: Sat, 20 Dec 2025 11:25:47 +0800	[thread overview]
Message-ID: <1534b209-eedc-4cc7-bf7b-ea98dfbed4b2@linux.dev> (raw)
In-Reply-To: <20251219235419.338880-3-chenxiaosong.chenxiaosong@linux.dev>

Hi Namjae,

Thank you for reviewing patch 01 and 03. I will update the patches 
according to your suggestions.

Do you have any suggestions for this patch 02?

Thanks,
ChenXiaoSong.

On 12/20/25 7:54 AM, chenxiaosong.chenxiaosong@linux.dev wrote:
> From: ChenXiaoSong <chenxiaosong@kylinos.cn>
> 
> The minimum SMB2 PDU size should be updated to the size of
> `struct smb2_pdu`.
> 
> Suggested-by: David Howells <dhowells@redhat.com>
> Suggested-by: Namjae Jeon <linkinjeon@kernel.org>
> Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
> ---
>   fs/smb/server/connection.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/smb/server/connection.c b/fs/smb/server/connection.c
> index f372486ebcc5..4a8eb4fef763 100644
> --- a/fs/smb/server/connection.c
> +++ b/fs/smb/server/connection.c
> @@ -296,7 +296,7 @@ bool ksmbd_conn_alive(struct ksmbd_conn *conn)
>   }
>   
>   #define SMB1_MIN_SUPPORTED_PDU_SIZE (sizeof(struct smb_pdu))
> -#define SMB2_MIN_SUPPORTED_HEADER_SIZE (sizeof(struct smb2_hdr) + 4)
> +#define SMB2_MIN_SUPPORTED_PDU_SIZE (sizeof(struct smb2_pdu))
>   
>   /**
>    * ksmbd_conn_handler_loop() - session thread to listen on new smb requests
> @@ -396,7 +396,7 @@ int ksmbd_conn_handler_loop(void *p)
>   
>   		if (((struct smb2_hdr *)smb2_get_msg(conn->request_buf))->ProtocolId ==
>   		    SMB2_PROTO_NUMBER) {
> -			if (pdu_size < SMB2_MIN_SUPPORTED_HEADER_SIZE)
> +			if (pdu_size < SMB2_MIN_SUPPORTED_PDU_SIZE)
>   				break;
>   		}
>   


  reply	other threads:[~2025-12-20  3:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 23:54 [PATCH RFC v3 0/3] smb: fix minimum PDU size chenxiaosong.chenxiaosong
2025-12-19 23:54 ` [PATCH RFC v3 1/3] smb/server: fix minimum SMB1 " chenxiaosong.chenxiaosong
2025-12-20  2:14   ` Namjae Jeon
2025-12-19 23:54 ` [PATCH RFC v3 2/3] smb/server: fix minimum SMB2 " chenxiaosong.chenxiaosong
2025-12-20  3:25   ` ChenXiaoSong [this message]
2025-12-19 23:54 ` [PATCH RFC v3 3/3] smb: use sizeof() to get __SMB2_HEADER_STRUCTURE_SIZE chenxiaosong.chenxiaosong
2025-12-20  2:17   ` Namjae Jeon
2025-12-20  8:47     ` David Howells
2025-12-20  8:58       ` ChenXiaoSong

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=1534b209-eedc-4cc7-bf7b-ea98dfbed4b2@linux.dev \
    --to=chenxiaosong.chenxiaosong@linux.dev \
    --cc=bharathsm@microsoft.com \
    --cc=dhowells@redhat.com \
    --cc=linkinjeon@kernel.org \
    --cc=linkinjeon@samba.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pc@manguebit.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.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.