Re: [PATCH v8 1/1] smb: move FILE_SYSTEM_ATTRIBUTE_INFO to common/fscc.h
From: ChenXiaoSong
Date: Sun Nov 16 2025 - 19:09:37 EST
And in the following part of the SMB2_QFS_attr() function, it also seems
that we should change it to `memcpy(..., min_t(..., min_len))`.
```c
SMB2_QFS_attr()
{
...
if (level == FS_ATTRIBUTE_INFORMATION)
memcpy(&tcon->fsAttrInfo, offset
+ (char *)rsp, min_t(unsigned int,
rsp_len, max_len));
...
}
```
Thanks,
ChenXiaoSong.
On 11/17/25 7:47 AM, ChenXiaoSong wrote:
Yes, we should also add MAX_FS_NAME_LEN here. This was my mistake.
Thanks,
ChenXiaoSong.
On 11/17/25 7:00 AM, Namjae Jeon wrote:
On Sun, Nov 16, 2025 at 3:53 PM <chenxiaosong.chenxiaosong@xxxxxxxxx>
wrote:
From: ChenXiaoSong <chenxiaosong@xxxxxxxxxx>
Modify the following places:
- struct filesystem_attribute_info -> FILE_SYSTEM_ATTRIBUTE_INFO
- Remove MIN_FS_ATTR_INFO_SIZE definition
- Introduce MAX_FS_NAME_LEN
- max_len of FileFsAttributeInformation ->
sizeof(FILE_SYSTEM_ATTRIBUTE_INFO) + MAX_FS_NAME_LEN
- min_len of FileFsAttributeInformation ->
sizeof(FILE_SYSTEM_ATTRIBUTE_INFO)
Then move FILE_SYSTEM_ATTRIBUTE_INFO to common header file.
Suggested-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>
Signed-off-by: ChenXiaoSong <chenxiaosong@xxxxxxxxxx>
Did you check if it is being used here too?
cifssmb.c:4866: sizeof(FILE_SYSTEM_ATTRIBUTE_INFO));