* [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common
@ 2022-03-26 17:55 Steve French
2022-03-26 17:59 ` Steve French
0 siblings, 1 reply; 6+ messages in thread
From: Steve French @ 2022-03-26 17:55 UTC (permalink / raw)
To: Namjae Jeon, CIFS
[-- Attachment #1: Type: text/plain, Size: 339 bytes --]
Move defines for ioctl protocol header and various size to smbfs_common
The definitions for the ioctl SMB3 request and response as well
as length of various fields defined in the protocol documentation
were duplicated in fs/ksmbd and fs/cifs. Move these to the common
code in fs/smbfs_common/smb2pdu.h
See attached
--
Thanks,
Steve
[-- Attachment #2: 0001-smb3-move-defines-for-ioctl-protocol-header-and-vari.patch --]
[-- Type: text/x-patch, Size: 11240 bytes --]
From 8f039079be3a813dd39b0e61d8738f80ba9ed3aa Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Sat, 26 Mar 2022 12:47:57 -0500
Subject: [PATCH] smb3: move defines for ioctl protocol header and various size
to smbfs_common
The definitions for the ioctl SMB3 request and response as well
as length of various fields defined in the protocol documentation
were duplicated in fs/ksmbd and fs/cifs. Move these to the common
code in fs/smbfs_common/smb2pdu.h
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/cifsglob.h | 6 ---
fs/cifs/cifspdu.h | 12 ------
fs/cifs/smb2glob.h | 11 -----
fs/cifs/smb2pdu.h | 41 -------------------
fs/ksmbd/smb2pdu.c | 6 +--
fs/ksmbd/smb2pdu.h | 70 -------------------------------
fs/smbfs_common/smb2pdu.h | 86 +++++++++++++++++++++++++++++++++++++++
7 files changed, 89 insertions(+), 143 deletions(-)
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 48b343d03430..ad3cd6053f4e 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -852,13 +852,7 @@ compare_mid(__u16 mid, const struct smb_hdr *smb)
#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
#define CIFS_MAX_RFC1002_RSIZE ((1<<17) - 1 - sizeof(READ_RSP) + 4)
-/*
- * The default wsize is 1M. find_get_pages seems to return a maximum of 256
- * pages in a single call. With PAGE_SIZE == 4k, this means we can fill
- * a single wsize request with a single call.
- */
#define CIFS_DEFAULT_IOSIZE (1024 * 1024)
-#define SMB3_DEFAULT_IOSIZE (4 * 1024 * 1024)
/*
* Windows only supports a max of 60kb reads and 65535 byte writes. Default to
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index 68b9a436af4b..f214cbeb2a36 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -123,18 +123,6 @@
*/
#define CIFS_SESS_KEY_SIZE (16)
-/*
- * Size of the smb3 signing key
- */
-#define SMB3_SIGN_KEY_SIZE (16)
-
-/*
- * Size of the smb3 encryption/decryption key storage.
- * This size is big enough to store any cipher key types.
- */
-#define SMB3_ENC_DEC_KEY_SIZE (32)
-
-#define CIFS_CLIENT_CHALLENGE_SIZE (8)
#define CIFS_SERVER_CHALLENGE_SIZE (8)
#define CIFS_HMAC_MD5_HASH_SIZE (16)
#define CIFS_CPHTXT_SIZE (16)
diff --git a/fs/cifs/smb2glob.h b/fs/cifs/smb2glob.h
index 4125fd113cfb..82e916ad167c 100644
--- a/fs/cifs/smb2glob.h
+++ b/fs/cifs/smb2glob.h
@@ -41,15 +41,4 @@
#define END_OF_CHAIN 4
#define RELATED_REQUEST 8
-#define SMB2_SIGNATURE_SIZE (16)
-#define SMB2_NTLMV2_SESSKEY_SIZE (16)
-#define SMB2_HMACSHA256_SIZE (32)
-#define SMB2_CMACAES_SIZE (16)
-#define SMB3_SIGNKEY_SIZE (16)
-#define SMB3_GCM128_CRYPTKEY_SIZE (16)
-#define SMB3_GCM256_CRYPTKEY_SIZE (32)
-
-/* Maximum buffer size value we can send with 1 credit */
-#define SMB2_MAX_BUFFER_SIZE 65536
-
#endif /* _SMB2_GLOB_H */
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 9aa2ab8ca5ae..162f1be886fe 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -141,13 +141,6 @@ struct create_durable {
} Data;
} __packed;
-struct create_posix {
- struct create_context ccontext;
- __u8 Name[16];
- __le32 Mode;
- __u32 Reserved;
-} __packed;
-
/* See MS-SMB2 2.2.13.2.11 */
/* Flags */
#define SMB2_DHANDLE_FLAG_PERSISTENT 0x00000002
@@ -428,40 +421,6 @@ struct duplicate_extents_to_file {
*/
#define SMB2_IOCTL_IOV_SIZE 2
-struct smb2_ioctl_req {
- struct smb2_hdr hdr;
- __le16 StructureSize; /* Must be 57 */
- __u16 Reserved;
- __le32 CtlCode;
- __u64 PersistentFileId; /* opaque endianness */
- __u64 VolatileFileId; /* opaque endianness */
- __le32 InputOffset;
- __le32 InputCount;
- __le32 MaxInputResponse;
- __le32 OutputOffset;
- __le32 OutputCount;
- __le32 MaxOutputResponse;
- __le32 Flags;
- __u32 Reserved2;
- __u8 Buffer[];
-} __packed;
-
-struct smb2_ioctl_rsp {
- struct smb2_hdr hdr;
- __le16 StructureSize; /* Must be 57 */
- __u16 Reserved;
- __le32 CtlCode;
- __u64 PersistentFileId; /* opaque endianness */
- __u64 VolatileFileId; /* opaque endianness */
- __le32 InputOffset;
- __le32 InputCount;
- __le32 OutputOffset;
- __le32 OutputCount;
- __le32 Flags;
- __u32 Reserved2;
- /* char * buffer[] */
-} __packed;
-
#define SMB2_LOCKFLAG_SHARED_LOCK 0x0001
#define SMB2_LOCKFLAG_EXCLUSIVE_LOCK 0x0002
#define SMB2_LOCKFLAG_UNLOCK 0x0004
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index 5440d61cea9f..e7eb835648f8 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -7581,7 +7581,7 @@ int smb2_ioctl(struct ksmbd_work *work)
goto out;
}
- cnt_code = le32_to_cpu(req->CntCode);
+ cnt_code = le32_to_cpu(req->CtlCode);
ret = smb2_calc_max_out_buf_len(work, 48,
le32_to_cpu(req->MaxOutputResponse));
if (ret < 0) {
@@ -7687,7 +7687,7 @@ int smb2_ioctl(struct ksmbd_work *work)
rsp->PersistentFileId = req->PersistentFileId;
fsctl_copychunk(work,
(struct copychunk_ioctl_req *)&req->Buffer[0],
- le32_to_cpu(req->CntCode),
+ le32_to_cpu(req->CtlCode),
le32_to_cpu(req->InputCount),
req->VolatileFileId,
req->PersistentFileId,
@@ -7841,7 +7841,7 @@ int smb2_ioctl(struct ksmbd_work *work)
goto out;
}
- rsp->CntCode = cpu_to_le32(cnt_code);
+ rsp->CtlCode = cpu_to_le32(cnt_code);
rsp->InputCount = cpu_to_le32(0);
rsp->InputOffset = cpu_to_le32(112);
rsp->OutputOffset = cpu_to_le32(112);
diff --git a/fs/ksmbd/smb2pdu.h b/fs/ksmbd/smb2pdu.h
index bf1f82d8596d..fd05d3a1eda1 100644
--- a/fs/ksmbd/smb2pdu.h
+++ b/fs/ksmbd/smb2pdu.h
@@ -16,42 +16,13 @@
#define FILE_CREATED 0x00000002
#define FILE_OVERWRITTEN 0x00000003
-/*
- * Size of the session key (crypto key encrypted with the password
- */
-#define SMB2_NTLMV2_SESSKEY_SIZE 16
-#define SMB2_SIGNATURE_SIZE 16
-#define SMB2_HMACSHA256_SIZE 32
-#define SMB2_CMACAES_SIZE 16
-#define SMB3_GCM128_CRYPTKEY_SIZE 16
-#define SMB3_GCM256_CRYPTKEY_SIZE 32
-
-/*
- * Size of the smb3 encryption/decryption keys
- */
-#define SMB3_ENC_DEC_KEY_SIZE 32
-
-/*
- * Size of the smb3 signing key
- */
-#define SMB3_SIGN_KEY_SIZE 16
-
-#define CIFS_CLIENT_CHALLENGE_SIZE 8
-#define SMB_SERVER_CHALLENGE_SIZE 8
-
/* SMB2 Max Credits */
#define SMB2_MAX_CREDITS 8192
-/* Maximum buffer size value we can send with 1 credit */
-#define SMB2_MAX_BUFFER_SIZE 65536
-
-#define NUMBER_OF_SMB2_COMMANDS 0x0013
-
/* BB FIXME - analyze following length BB */
#define MAX_SMB2_HDR_SIZE 0x78 /* 4 len + 64 hdr + (2*24 wct) + 2 bct + 2 pad */
#define SMB21_DEFAULT_IOSIZE (1024 * 1024)
-#define SMB3_DEFAULT_IOSIZE (4 * 1024 * 1024)
#define SMB3_DEFAULT_TRANS_SIZE (1024 * 1024)
#define SMB3_MIN_IOSIZE (64 * 1024)
#define SMB3_MAX_IOSIZE (8 * 1024 * 1024)
@@ -149,13 +120,6 @@ struct create_alloc_size_req {
__le64 AllocationSize;
} __packed;
-struct create_posix {
- struct create_context ccontext;
- __u8 Name[16];
- __le32 Mode;
- __u32 Reserved;
-} __packed;
-
struct create_durable_rsp {
struct create_context ccontext;
__u8 Name[8];
@@ -213,40 +177,6 @@ struct duplicate_extents_to_file {
__le64 ByteCount; /* Bytes to be copied */
} __packed;
-struct smb2_ioctl_req {
- struct smb2_hdr hdr;
- __le16 StructureSize; /* Must be 57 */
- __le16 Reserved; /* offset from start of SMB2 header to write data */
- __le32 CntCode;
- __u64 PersistentFileId;
- __u64 VolatileFileId;
- __le32 InputOffset; /* Reserved MBZ */
- __le32 InputCount;
- __le32 MaxInputResponse;
- __le32 OutputOffset;
- __le32 OutputCount;
- __le32 MaxOutputResponse;
- __le32 Flags;
- __le32 Reserved2;
- __u8 Buffer[1];
-} __packed;
-
-struct smb2_ioctl_rsp {
- struct smb2_hdr hdr;
- __le16 StructureSize; /* Must be 49 */
- __le16 Reserved; /* offset from start of SMB2 header to write data */
- __le32 CntCode;
- __u64 PersistentFileId;
- __u64 VolatileFileId;
- __le32 InputOffset; /* Reserved MBZ */
- __le32 InputCount;
- __le32 OutputOffset;
- __le32 OutputCount;
- __le32 Flags;
- __le32 Reserved2;
- __u8 Buffer[1];
-} __packed;
-
struct validate_negotiate_info_req {
__le32 Capabilities;
__u8 Guid[SMB2_CLIENT_GUID_SIZE];
diff --git a/fs/smbfs_common/smb2pdu.h b/fs/smbfs_common/smb2pdu.h
index c21ecc4806f1..d270c76050b1 100644
--- a/fs/smbfs_common/smb2pdu.h
+++ b/fs/smbfs_common/smb2pdu.h
@@ -60,6 +60,40 @@
#define NUMBER_OF_SMB2_COMMANDS 0x0013
+/*
+ * Size of the session key (crypto key encrypted with the password
+ */
+#define SMB2_NTLMV2_SESSKEY_SIZE 16
+#define SMB2_SIGNATURE_SIZE 16
+#define SMB2_HMACSHA256_SIZE 32
+#define SMB2_CMACAES_SIZE 16
+#define SMB3_GCM128_CRYPTKEY_SIZE 16
+#define SMB3_GCM256_CRYPTKEY_SIZE 32
+
+/*
+ * Size of the smb3 encryption/decryption keys
+ * This size is big enough to store any cipher key types.
+ */
+#define SMB3_ENC_DEC_KEY_SIZE 32
+
+/*
+ * Size of the smb3 signing key
+ */
+#define SMB3_SIGN_KEY_SIZE 16
+
+#define CIFS_CLIENT_CHALLENGE_SIZE 8
+
+/* Maximum buffer size value we can send with 1 credit */
+#define SMB2_MAX_BUFFER_SIZE 65536
+
+/*
+ * The default wsize is 1M for SMB2 (and for some CIFS cases).
+ * find_get_pages seems to return a maximum of 256
+ * pages in a single call. With PAGE_SIZE == 4k, this means we can
+ * fill a single wsize request with a single call.
+ */
+#define SMB3_DEFAULT_IOSIZE (4 * 1024 * 1024)
+
/*
* SMB2 Header Definition
*
@@ -88,6 +122,15 @@
#define SMB2_FLAGS_DFS_OPERATIONS cpu_to_le32(0x10000000)
#define SMB2_FLAGS_REPLAY_OPERATION cpu_to_le32(0x20000000) /* SMB3 & up */
+/*
+ * Definitions for SMB2 Protocol Data Units (network frames)
+ *
+ * See MS-SMB2.PDF specification for protocol details.
+ * The Naming convention is the lower case version of the SMB2
+ * command code name for the struct. Note that structures must be packed.
+ *
+ */
+
/* See MS-SMB2 section 2.2.1 */
struct smb2_hdr {
__le32 ProtocolId; /* 0xFE 'S' 'M' 'B' */
@@ -997,6 +1040,13 @@ struct smb2_create_rsp {
__u8 Buffer[1];
} __packed;
+struct create_posix {
+ struct create_context ccontext;
+ __u8 Name[16];
+ __le32 Mode;
+ __u32 Reserved;
+} __packed;
+
#define SMB2_LEASE_NONE_LE cpu_to_le32(0x00)
#define SMB2_LEASE_READ_CACHING_LE cpu_to_le32(0x01)
#define SMB2_LEASE_HANDLE_CACHING_LE cpu_to_le32(0x02)
@@ -1036,6 +1086,42 @@ struct create_lease_v2 {
__u8 Pad[4];
} __packed;
+/* See MS-SMB2 2.2.31 and 2.2.32 */
+struct smb2_ioctl_req {
+ struct smb2_hdr hdr;
+ __le16 StructureSize; /* Must be 57 */
+ __le16 Reserved; /* offset from start of SMB2 header to write data */
+ __le32 CtlCode;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
+ __le32 InputOffset; /* Reserved MBZ */
+ __le32 InputCount;
+ __le32 MaxInputResponse;
+ __le32 OutputOffset;
+ __le32 OutputCount;
+ __le32 MaxOutputResponse;
+ __le32 Flags;
+ __le32 Reserved2;
+ __u8 Buffer[];
+} __packed;
+
+struct smb2_ioctl_rsp {
+ struct smb2_hdr hdr;
+ __le16 StructureSize; /* Must be 49 */
+ __le16 Reserved;
+ __le32 CtlCode;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
+ __le32 InputOffset; /* Reserved MBZ */
+ __le32 InputCount;
+ __le32 OutputOffset;
+ __le32 OutputCount;
+ __le32 Flags;
+ __le32 Reserved2;
+ __u8 Buffer[0];
+} __packed;
+
+
/* Possible InfoType values */
#define SMB2_O_INFO_FILE 0x01
#define SMB2_O_INFO_FILESYSTEM 0x02
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common
2022-03-26 17:55 [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common Steve French
@ 2022-03-26 17:59 ` Steve French
2022-03-27 0:52 ` Namjae Jeon
0 siblings, 1 reply; 6+ messages in thread
From: Steve French @ 2022-03-26 17:59 UTC (permalink / raw)
To: Namjae Jeon, CIFS
Updated the patch slightly to replace define that had Buffer[0] with Buffer[]
On Sat, Mar 26, 2022 at 12:55 PM Steve French <smfrench@gmail.com> wrote:
>
> Move defines for ioctl protocol header and various size to smbfs_common
>
> The definitions for the ioctl SMB3 request and response as well
> as length of various fields defined in the protocol documentation
> were duplicated in fs/ksmbd and fs/cifs. Move these to the common
> code in fs/smbfs_common/smb2pdu.h
>
> See attached
>
>
> --
> Thanks,
>
> Steve
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common
2022-03-26 17:59 ` Steve French
@ 2022-03-27 0:52 ` Namjae Jeon
2022-03-27 2:29 ` Steve French
0 siblings, 1 reply; 6+ messages in thread
From: Namjae Jeon @ 2022-03-27 0:52 UTC (permalink / raw)
To: Steve French; +Cc: CIFS
2022-03-27 2:59 GMT+09:00, Steve French <smfrench@gmail.com>:
> Updated the patch slightly to replace define that had Buffer[0] with
> Buffer[]
Minor nit, We can remove multiple blank lines in the patch.
CHECK: Please don't use multiple blank lines
#390: FILE: fs/smbfs_common/smb2pdu.h:1124:
+
+
Otherwise, Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Thanks!
>
> On Sat, Mar 26, 2022 at 12:55 PM Steve French <smfrench@gmail.com> wrote:
>>
>> Move defines for ioctl protocol header and various size to smbfs_common
>>
>> The definitions for the ioctl SMB3 request and response as well
>> as length of various fields defined in the protocol documentation
>> were duplicated in fs/ksmbd and fs/cifs. Move these to the common
>> code in fs/smbfs_common/smb2pdu.h
>>
>> See attached
>>
>>
>> --
>> Thanks,
>>
>> Steve
>
>
>
> --
> Thanks,
>
> Steve
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common
2022-03-27 0:52 ` Namjae Jeon
@ 2022-03-27 2:29 ` Steve French
2022-03-27 3:30 ` Namjae Jeon
0 siblings, 1 reply; 6+ messages in thread
From: Steve French @ 2022-03-27 2:29 UTC (permalink / raw)
To: Namjae Jeon; +Cc: CIFS
I think this was removed in the next patch (I don't see the warning,
but presumably it is the blank line before the #endif at the end of
the file?)
On Sat, Mar 26, 2022 at 7:52 PM Namjae Jeon <linkinjeon@kernel.org> wrote:
>
> 2022-03-27 2:59 GMT+09:00, Steve French <smfrench@gmail.com>:
> > Updated the patch slightly to replace define that had Buffer[0] with
> > Buffer[]
> Minor nit, We can remove multiple blank lines in the patch.
>
> CHECK: Please don't use multiple blank lines
> #390: FILE: fs/smbfs_common/smb2pdu.h:1124:
> +
> +
>
> Otherwise, Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
>
> Thanks!
> >
> > On Sat, Mar 26, 2022 at 12:55 PM Steve French <smfrench@gmail.com> wrote:
> >>
> >> Move defines for ioctl protocol header and various size to smbfs_common
> >>
> >> The definitions for the ioctl SMB3 request and response as well
> >> as length of various fields defined in the protocol documentation
> >> were duplicated in fs/ksmbd and fs/cifs. Move these to the common
> >> code in fs/smbfs_common/smb2pdu.h
> >>
> >> See attached
> >>
> >>
> >> --
> >> Thanks,
> >>
> >> Steve
> >
> >
> >
> > --
> > Thanks,
> >
> > Steve
> >
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common
2022-03-27 2:29 ` Steve French
@ 2022-03-27 3:30 ` Namjae Jeon
2022-03-27 4:10 ` Steve French
0 siblings, 1 reply; 6+ messages in thread
From: Namjae Jeon @ 2022-03-27 3:30 UTC (permalink / raw)
To: Steve French; +Cc: CIFS
2022-03-27 11:29 GMT+09:00, Steve French <smfrench@gmail.com>:
> I think this was removed in the next patch (I don't see the warning,
> but presumably it is the blank line before the #endif at the end of
> the file?)
The change below is adding 2 blank lines.
+struct smb2_ioctl_rsp {
+ struct smb2_hdr hdr;
+ __le16 StructureSize; /* Must be 49 */
+ __le16 Reserved;
+ __le32 CtlCode;
+ __u64 PersistentFileId;
+ __u64 VolatileFileId;
+ __le32 InputOffset; /* Reserved MBZ */
+ __le32 InputCount;
+ __le32 OutputOffset;
+ __le32 OutputCount;
+ __le32 Flags;
+ __le32 Reserved2;
+ __u8 Buffer[];
+} __packed;
+
+
/* Possible InfoType values */
Thanks!
>
> On Sat, Mar 26, 2022 at 7:52 PM Namjae Jeon <linkinjeon@kernel.org> wrote:
>>
>> 2022-03-27 2:59 GMT+09:00, Steve French <smfrench@gmail.com>:
>> > Updated the patch slightly to replace define that had Buffer[0] with
>> > Buffer[]
>> Minor nit, We can remove multiple blank lines in the patch.
>>
>> CHECK: Please don't use multiple blank lines
>> #390: FILE: fs/smbfs_common/smb2pdu.h:1124:
>> +
>> +
>>
>> Otherwise, Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
>>
>> Thanks!
>> >
>> > On Sat, Mar 26, 2022 at 12:55 PM Steve French <smfrench@gmail.com>
>> > wrote:
>> >>
>> >> Move defines for ioctl protocol header and various size to
>> >> smbfs_common
>> >>
>> >> The definitions for the ioctl SMB3 request and response as well
>> >> as length of various fields defined in the protocol documentation
>> >> were duplicated in fs/ksmbd and fs/cifs. Move these to the common
>> >> code in fs/smbfs_common/smb2pdu.h
>> >>
>> >> See attached
>> >>
>> >>
>> >> --
>> >> Thanks,
>> >>
>> >> Steve
>> >
>> >
>> >
>> > --
>> > Thanks,
>> >
>> > Steve
>> >
>
>
>
> --
> Thanks,
>
> Steve
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common
2022-03-27 3:30 ` Namjae Jeon
@ 2022-03-27 4:10 ` Steve French
0 siblings, 0 replies; 6+ messages in thread
From: Steve French @ 2022-03-27 4:10 UTC (permalink / raw)
To: Namjae Jeon; +Cc: CIFS
ok - fixed it (removed 2nd blank line) in the following patch (patch 2)
On Sat, Mar 26, 2022 at 10:30 PM Namjae Jeon <linkinjeon@kernel.org> wrote:
>
> 2022-03-27 11:29 GMT+09:00, Steve French <smfrench@gmail.com>:
> > I think this was removed in the next patch (I don't see the warning,
> > but presumably it is the blank line before the #endif at the end of
> > the file?)
>
> The change below is adding 2 blank lines.
>
> +struct smb2_ioctl_rsp {
> + struct smb2_hdr hdr;
> + __le16 StructureSize; /* Must be 49 */
> + __le16 Reserved;
> + __le32 CtlCode;
> + __u64 PersistentFileId;
> + __u64 VolatileFileId;
> + __le32 InputOffset; /* Reserved MBZ */
> + __le32 InputCount;
> + __le32 OutputOffset;
> + __le32 OutputCount;
> + __le32 Flags;
> + __le32 Reserved2;
> + __u8 Buffer[];
> +} __packed;
> +
> +
> /* Possible InfoType values */
>
> Thanks!
>
> >
> > On Sat, Mar 26, 2022 at 7:52 PM Namjae Jeon <linkinjeon@kernel.org> wrote:
> >>
> >> 2022-03-27 2:59 GMT+09:00, Steve French <smfrench@gmail.com>:
> >> > Updated the patch slightly to replace define that had Buffer[0] with
> >> > Buffer[]
> >> Minor nit, We can remove multiple blank lines in the patch.
> >>
> >> CHECK: Please don't use multiple blank lines
> >> #390: FILE: fs/smbfs_common/smb2pdu.h:1124:
> >> +
> >> +
> >>
> >> Otherwise, Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
> >>
> >> Thanks!
> >> >
> >> > On Sat, Mar 26, 2022 at 12:55 PM Steve French <smfrench@gmail.com>
> >> > wrote:
> >> >>
> >> >> Move defines for ioctl protocol header and various size to
> >> >> smbfs_common
> >> >>
> >> >> The definitions for the ioctl SMB3 request and response as well
> >> >> as length of various fields defined in the protocol documentation
> >> >> were duplicated in fs/ksmbd and fs/cifs. Move these to the common
> >> >> code in fs/smbfs_common/smb2pdu.h
> >> >>
> >> >> See attached
> >> >>
> >> >>
> >> >> --
> >> >> Thanks,
> >> >>
> >> >> Steve
> >> >
> >> >
> >> >
> >> > --
> >> > Thanks,
> >> >
> >> > Steve
> >> >
> >
> >
> >
> > --
> > Thanks,
> >
> > Steve
> >
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-27 4:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-26 17:55 [PATCH][SMB3] move more protocol header definitions to fs/smbfs_common Steve French
2022-03-26 17:59 ` Steve French
2022-03-27 0:52 ` Namjae Jeon
2022-03-27 2:29 ` Steve French
2022-03-27 3:30 ` Namjae Jeon
2022-03-27 4:10 ` Steve French
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.