All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenXiaoSong <chenxiaosong@chenxiaosong.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: senozhatsky@chromium.org, tom@talpey.com,
	atteh.mailbox@gmail.com, chenxiaosong@kylinos.cn,
	Mobin Aydinfar <mobin@mobintestserver.ir>,
	linux-cifs@vger.kernel.org
Subject: Re: [PATCH 2/3] ksmbd: fix partial normalized name responses
Date: Mon, 14 Sep 2026 10:52:02 +0800	[thread overview]
Message-ID: <8360c969-33f5-4d96-a44d-c6fcb7a8a41f@chenxiaosong.com> (raw)
In-Reply-To: <ebb45fdd-76f0-4d92-9899-13ecdaea555c@chenxiaosong.com>

If needed, I would be happy to help send v2.

And it would be better to use FILE_NAME_INFORMATION_SIZE (should be 
changed to 8) instead of FILE_ALTERNATE_NAME_INFORMATION_SIZE.

```
smb2_get_info_file()
{
...
	case FILE_ALTERNATE_NAME_INFORMATION:
         case FILE_NORMALIZED_NAME_INFORMATION:
                 fixed_len = FILE_NAME_INFORMATION_SIZE; // 8
...
}
```

On 9/14/26 10:38, ChenXiaoSong wrote:
> Hi Namjae,
> 
> According to MS-FSA 2.1.5.12.30: https://learn.microsoft.com/en-us/ 
> openspecs/windows_protocols/ms-fsa/3d5c68f8-fbc5-4f94-a51d-3600a319fd45
> 
>    Set AvailableNameLength to BlockAlignTruncate((OutputBufferSize - 
> FieldOffset(FILE_NAME_INFORMATION.FileName)), 2).
> 
> It seems that the following changes are also needed:
> ```
> smb2_get_info_file()
> {
>          unsigned int req_output_len = le32_to_cpu(req- 
>  >OutputBufferLength);
> ...
>          case FILE_NORMALIZED_NAME_INFORMATION:
>                  fixed_len = FILE_NORMALIZED_NAME_INFORMATION_SIZE;
>                  req_output_len = round_down(req_output_len, 2);
>                  break;
> ...
>          rc = buffer_check_err(req_output_len, fixed_len, rsp);
> }
> ```
> 
> By the way, it seems that `struct smb2_file_alt_name_info` should be 
> renamed to `struct smb2_file_name_info`, since both 
> FILE_ALTERNATE_NAME_INFORMATION and FILE_NORMALIZED_NAME_INFORMATION use 
> this structure. See:
> - MS-FSA 2.1.5.12.4 FileAlternateNameInformation: https:// 
> learn.microsoft.com/en-us/openspecs/windows_protocols/ms- 
> fsa/5051d021-8d06-4b7e-94e3-55b118193427
> - MS-FSA 2.1.5.12.30 FileNormalizedNameInformation: https:// 
> learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fsa/3d5c68f8- 
> fbc5-4f94-a51d-3600a319fd45

-- 
ChenXiaoSong <chenxiaosong@chenxiaosong.com>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en


  reply	other threads:[~2026-09-14  2:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13 11:35 [PATCH 2/3] ksmbd: fix partial normalized name responses Namjae Jeon
2026-09-13 15:45 ` ChenXiaoSong
2026-09-14  1:18   ` Namjae Jeon
2026-09-14  2:38 ` ChenXiaoSong
2026-09-14  2:52   ` ChenXiaoSong [this message]
2026-09-14  3:38   ` Namjae Jeon
2026-09-14  4:26     ` ChenXiaoSong
2026-09-14 13:49       ` Namjae Jeon

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=8360c969-33f5-4d96-a44d-c6fcb7a8a41f@chenxiaosong.com \
    --to=chenxiaosong@chenxiaosong.com \
    --cc=atteh.mailbox@gmail.com \
    --cc=chenxiaosong@kylinos.cn \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=mobin@mobintestserver.ir \
    --cc=senozhatsky@chromium.org \
    --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.