lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKYAXd9SJ_92si7_wt=hLm9RZmrVm2oZZqNOPFDGvPZzMzkAYA@mail.gmail.com>
Date: Mon, 20 Oct 2025 13:52:12 +0900
From: Namjae Jeon <linkinjeon@...nel.org>
To: chenxiaosong.chenxiaosong@...ux.dev
Cc: stfrench@...rosoft.com, metze@...ba.org, pali@...nel.org, 
	smfrench@...il.com, sfrench@...ba.org, senozhatsky@...omium.org, 
	tom@...pey.com, pc@...guebit.org, ronniesahlberg@...il.com, 
	sprasad@...rosoft.com, bharathsm@...rosoft.com, christophe.jaillet@...adoo.fr, 
	zhangguodong@...inos.cn, linux-cifs@...r.kernel.org, 
	linux-kernel@...r.kernel.org, ChenXiaoSong <chenxiaosong@...inos.cn>
Subject: Re: [PATCH v3 07/22] smb: move some duplicate definitions to common/smb2pdu.h

On Tue, Oct 14, 2025 at 4:21 PM <chenxiaosong.chenxiaosong@...ux.dev> wrote:
>
> From: ZhangGuoDong <zhangguodong@...inos.cn>
>
> In order to maintain the code more easily, move duplicate definitions to
> new common header file.
>
> Co-developed-by: ChenXiaoSong <chenxiaosong@...inos.cn>
> Signed-off-by: ChenXiaoSong <chenxiaosong@...inos.cn>
> Signed-off-by: ZhangGuoDong <zhangguodong@...inos.cn>
> ---
>  fs/smb/client/smb2pdu.h | 24 +++---------------------
>  fs/smb/common/smb2pdu.h | 24 ++++++++++++++++++++++++
>  fs/smb/server/smb2pdu.c |  8 ++++----
>  fs/smb/server/smb2pdu.h | 17 -----------------
>  4 files changed, 31 insertions(+), 42 deletions(-)
>
> diff --git a/fs/smb/client/smb2pdu.h b/fs/smb/client/smb2pdu.h
> index 101024f8f725..c013560bcfa1 100644
> --- a/fs/smb/client/smb2pdu.h
> +++ b/fs/smb/client/smb2pdu.h
> @@ -135,11 +135,9 @@ struct share_redirect_error_context_rsp {
>
>
>  /* See MS-SMB2 2.2.13.2.11 */
> -/* Flags */
> -#define SMB2_DHANDLE_FLAG_PERSISTENT   0x00000002
>  struct durable_context_v2 {
>         __le32 Timeout;
> -       __le32 Flags;
> +       __le32 Flags; /* see SMB2_DHANDLE_FLAG_PERSISTENT */
>         __u64 Reserved;
>         __u8 CreateGuid[16];
>  } __packed;
> @@ -157,13 +155,13 @@ struct durable_reconnect_context_v2 {
>                 __u64 VolatileFileId;
>         } Fid;
>         __u8 CreateGuid[16];
> -       __le32 Flags; /* see above DHANDLE_FLAG_PERSISTENT */
> +       __le32 Flags; /* see SMB2_DHANDLE_FLAG_PERSISTENT */
>  } __packed;
>
>  /* See MS-SMB2 2.2.14.2.12 */
>  struct durable_reconnect_context_v2_rsp {
>         __le32 Timeout;
> -       __le32 Flags; /* see above DHANDLE_FLAG_PERSISTENT */
> +       __le32 Flags; /* see SMB2_DHANDLE_FLAG_PERSISTENT */
>  } __packed;
>
>  struct create_durable_handle_reconnect_v2 {
> @@ -263,22 +261,6 @@ struct network_resiliency_req {
>  } __packed;
>  /* There is no buffer for the response ie no struct network_resiliency_rsp */
>
> -#define RSS_CAPABLE    cpu_to_le32(0x00000001)
> -#define RDMA_CAPABLE   cpu_to_le32(0x00000002)
> -
> -#define INTERNETWORK   cpu_to_le16(0x0002)
> -#define INTERNETWORKV6 cpu_to_le16(0x0017)
> -
> -struct network_interface_info_ioctl_rsp {
> -       __le32 Next; /* next interface. zero if this is last one */
> -       __le32 IfIndex;
> -       __le32 Capability; /* RSS or RDMA Capable */
> -       __le32 Reserved;
> -       __le64 LinkSpeed;
> -       __le16 Family;
> -       __u8 Buffer[126];
> -} __packed;
> -
>  struct iface_info_ipv4 {
>         __be16 Port;
>         __be32 IPv4Address;
> diff --git a/fs/smb/common/smb2pdu.h b/fs/smb/common/smb2pdu.h
> index f79a5165a7cc..25e8ece283c4 100644
> --- a/fs/smb/common/smb2pdu.h
> +++ b/fs/smb/common/smb2pdu.h
> @@ -1290,6 +1290,10 @@ struct create_mxac_req {
>         __le64 Timestamp;
>  } __packed;
>
> +/* See MS-SMB2 2.2.13.2.11 and MS-SMB2 2.2.13.2.12 and MS-SMB2 2.2.14.2.12 */
> +/* Flags */
> +#define SMB2_DHANDLE_FLAG_PERSISTENT   0x00000002
I prefer moving it when the durable handle structures are moved to
/common later.
Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ