cifs-utils: Correct max string lengths
Subsystems (2)
PATCH 1/1 cifs-utils: Correct max string lengths
From: Scott Lovenberg <[email protected]>
The max size of the username, domain, password and share name strings are now consistent with the kernel and Microsoft's documentation.
--- AUTHORS | 2 ++ mount.cifs.c | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-)
AUTHORS +2 -0
@@ -5,5 +5,7 @@ Shirish Pargaonkar <[email protected]> Suresh Jayaraman <[email protected]> Pavel Shilovsky <[email protected]> Igor Druzhinin <[email protected]> +Scott Lovenberg <[email protected]> + ...and others.
mount.cifs.c +18 -9
@@ -83,22 +83,31 @@/* max length of mtab options */ #define MTAB_OPTIONS_LEN 220 -/* -* Maximum length of "share" portion of a UNC. I have no idea if this is at -* all valid. According to MSDN, the typical max length of any component is -* 255, so use that here. +/* +* Max share name, username, password and domain sizes match the kernel's +* allowances for these string sizes which in turn match Microsoft's +* documentation. */ -#define MAX_SHARE_LEN 256 -/* max length of username (somewhat made up here) */ -#define MAX_USERNAME_SIZE 32 +/* Max length of the share name portion of a UNC. According to Microsoft +* this is correct for Windows 2000/XP. */ +#define MAX_SHARE_LEN 80 + +/* Max user name length. */ +#define MAX_USERNAME_SIZE 256 + +/* Max domain size. */ +#define MAX_DOMAIN_SIZE 256 + +/* Max password size. */ +#define MOUNT_PASSWD_SIZE 512 + +#ifndef SAFE_FREE #define SAFE_FREE (x) do { if ((x) != NULL) {free(x); x = NULL; } } while (0)#endif -#define MOUNT_PASSWD_SIZE 128 -#define MAX_DOMAIN_SIZE 64/* * mount.cifs has been the subject of many "security" bugs that have arisen
Signature · 1 line
1.8.1.4
A message that is not in the archive (sent off-list or not yet received): 1374269172-4964-1-git-send-email-scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
MAX_SHARE_NAME of 80 is not correct. I verified that Samba supports much longer (see below), but also found some hits on other servers
with longer limits when searching for this. Windows CLI does appear
to limit to 80 only in the NET SHARE command (also note that maximum UNC path is probably limited by MAX_PATH to 32768 characters)
Quoted 71 lines · On Fri, Jul 19, 2013 at 4:26 PM, <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@publi…
From: Scott Lovenberg <[email protected]>
The max size of the username, domain, password and share name strings are now consistent with the kernel and Microsoft's documentation.
Signed-off-by Scott Lovenberg <[email protected]>--- AUTHORS | 2 ++ mount.cifs.c | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-)AUTHORS +2
-0@@ -5,5 +5,7 @@ Shirish Pargaonkar <[email protected]> Suresh Jayaraman <[email protected]> Pavel Shilovsky <[email protected]> Igor Druzhinin <[email protected]> +Scott Lovenberg <[email protected]> + ...and others.mount.cifs.c +18
-10@@ -83,22 +83,31 @@/* max length of mtab options */ #define MTAB_OPTIONS_LEN 220 -/* -* Maximum length of "share" portion of a UNC. I have no idea if this is at -* all valid. According to MSDN, the typical max length of any component is -* 255, so use that here. +/* +* Max share name, username, password and domain sizes match the kernel's +* allowances for these string sizes which in turn match Microsoft's +* documentation. */ -#define MAX_SHARE_LEN 256 -/* max length of username (somewhat made up here) */ -#define MAX_USERNAME_SIZE 32 +/* Max length of the share name portion of a UNC. According to Microsoft +* this is correct for Windows 2000/XP. */ +#define MAX_SHARE_LEN 80 + +/* Max user name length. */ +#define MAX_USERNAME_SIZE 256 + +/* Max domain size. */ +#define MAX_DOMAIN_SIZE 256 + +/* Max password size. */ +#define MOUNT_PASSWD_SIZE 512 + +#ifndef SAFE_FREE #define SAFE_FREE (x) do { if ((x) != NULL) {free(x); x = NULL; } } while (0)#endif -#define MOUNT_PASSWD_SIZE 128 -#define MAX_DOMAIN_SIZE 64/* * mount.cifs has been the subject of many "security" bugs that have arisen -- 1.8.1.4
Signature · 3 lines
Thanks, Steve
A message that is not in the archive (sent off-list or not yet received): CAH2r5msAt8ZuXYdNzufB3BOah7f2ywyi3EgbS14ahESWe1BMRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
To Samba server - note very long share name (other servers also support this)
steven@steven-GA-970A-DS3:~$ smbclient -L //localhost Enter steven's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.0pre1-GIT-e3f5e47]
Sharename Type Comment --------- ---- ------- BREALLYLONGSHARENAME0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Disk Long name test Directories
Quoted 85 lines · Steve French
MAX_SHARE_NAMEof 80 is not correct. I verified that Samba supports much longer (see below), but also found some hits on other servers
with longer limits when searching for this. Windows CLI does appear
to limit to 80 only in the NET SHARE command (also note that maximum UNC path is probably limited byMAX_PATHto 32768 characters)Quoted 69 lines · On Fri, Jul 19, 2013 at 4:26 PM, <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@publi…
From: Scott Lovenberg <[email protected]>
The max size of the username, domain, password and share name strings are now consistent with the kernel and Microsoft's documentation.
Signed-off-by Scott Lovenberg <[email protected]>--- AUTHORS | 2 ++ mount.cifs.c | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-)AUTHORS +2
-0@@ -5,5 +5,7 @@ Shirish Pargaonkar <[email protected]> Suresh Jayaraman <[email protected]> Pavel Shilovsky <[email protected]> Igor Druzhinin <[email protected]> +Scott Lovenberg <[email protected]> + ...and others.mount.cifs.c +18
-10@@ -83,22 +83,31 @@/* max length of mtab options */ #define MTAB_OPTIONS_LEN 220 -/* -* Maximum length of "share" portion of a UNC. I have no idea if this is at -* all valid. According to MSDN, the typical max length of any component is -* 255, so use that here. +/* +* Max share name, username, password and domain sizes match the kernel's +* allowances for these string sizes which in turn match Microsoft's +* documentation. */ -#define MAX_SHARE_LEN 256 -/* max length of username (somewhat made up here) */ -#define MAX_USERNAME_SIZE 32 +/* Max length of the share name portion of a UNC. According to Microsoft +* this is correct for Windows 2000/XP. */ +#define MAX_SHARE_LEN 80 + +/* Max user name length. */ +#define MAX_USERNAME_SIZE 256 + +/* Max domain size. */ +#define MAX_DOMAIN_SIZE 256 + +/* Max password size. */ +#define MOUNT_PASSWD_SIZE 512 + +#ifndef SAFE_FREE #define SAFE_FREE (x) do { if ((x) != NULL) {free(x); x = NULL; } } while (0)#endif -#define MOUNT_PASSWD_SIZE 128 -#define MAX_DOMAIN_SIZE 64/* * mount.cifs has been the subject of many "security" bugs that have arisen -- Quoted 2 lines
1.8.1.4
--
Thanks,Steve
Signature · 3 lines
Thanks, Steve
Quoted 5 lines · Steve French
MAX_SHARE_NAMEof 80 is not correct. I verified that Samba supports much longer (see below), but also found some hits on other servers
with longer limits when searching for this. Windows CLI does appear
to limit to 80 only in the NET SHARE command (also note that maximum UNC path is probably limited byMAX_PATHto 32768 characters)
That appears to be correct. The full length of the path is the ultimate limit. How would you like to handle this?
Quoted 79 lines · On Fri, Jul 19, 2013 at 4:26 PM, <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@publi…
Quoted 70 lines
From: Scott Lovenberg <[email protected]>
The max size of the username, domain, password and share name strings are now consistent with the kernel and Microsoft's documentation.
Signed-off-by Scott Lovenberg <[email protected]>---
AUTHORS | 2 ++mount.cifs.c| 27 ++++++++++++++++++---------2 files changed, 20 insertions(+), 9 deletions(-)AUTHORS +0
-0@@ -5,5 +5,7 @@ Shirish Pargaonkar <[email protected]>Suresh Jayaraman <[email protected]> Pavel Shilovsky <[email protected]> Igor Druzhinin <[email protected]>
AUTHORS +2
-0+Scott Lovenberg <[email protected]> +...and others.
mount.cifs.c +18
-10@@ -83,22 +83,31 @@/* max length of mtab options */ #define MTAB_OPTIONS_LEN 220 -/* -* Maximum length of "share" portion of a UNC. I have no idea if this is at -* all valid. According to MSDN, the typical max length of any component is -* 255, so use that here. +/* +* Max share name, username, password and domain sizes match the kernel's +* allowances for these string sizes which in turn match Microsoft's +* documentation. */ -#define MAX_SHARE_LEN 256 -/* max length of username (somewhat made up here) */ -#define MAX_USERNAME_SIZE 32 +/* Max length of the share name portion of a UNC. According to Microsoft +* this is correct for Windows 2000/XP. */ +#define MAX_SHARE_LEN 80 + +/* Max user name length. */ +#define MAX_USERNAME_SIZE 256 + +/* Max domain size. */ +#define MAX_DOMAIN_SIZE 256 + +/* Max password size. */ +#define MOUNT_PASSWD_SIZE 512 + +#ifndef SAFE_FREE #define SAFE_FREE (x) do { if ((x) != NULL) {free(x); x = NULL; } } while (0)#endif -#define MOUNT_PASSWD_SIZE 128 -#define MAX_DOMAIN_SIZE 64/* * mount.cifs has been the subject of many "security" bugs that have arisen -- 1.8.1.4
Signature · 3 lines
Thanks, Steve
Leaving Max share length at 256 is fine with me
Quoted 97 lines · Scott Lovenberg
Quoted 5 lines · Steve French
MAX_SHARE_NAMEof 80 is not correct. I verified that Samba supports much longer (see below), but also found some hits on other servers
with longer limits when searching for this. Windows CLI does appear
to limit to 80 only in the NET SHARE command (also note that maximum UNC path is probably limited byMAX_PATHto 32768 characters)That appears to be correct. The full length of the path is the ultimate limit. How would you like to handle this?
Quoted 33 lines · On Fri, Jul 19, 2013 at 4:26 PM, <[email protected]> wrote:
Quoted 31 lines
From: Scott Lovenberg <[email protected]>
The max size of the username, domain, password and share name strings are now consistent with the kernel and Microsoft's documentation.
Signed-off-by Scott Lovenberg <[email protected]>---
AUTHORS | 2 ++mount.cifs.c| 27 ++++++++++++++++++---------2 files changed, 20 insertions(+), 9 deletions(-)AUTHORS +0
-0@@ -5,5 +5,7 @@ Shirish Pargaonkar <[email protected]>Suresh Jayaraman <[email protected]>
Pavel Shilovsky <[email protected]>
Igor Druzhinin <[email protected]>AUTHORS +2
-0+Scott Lovenberg <[email protected]> +...and others.
mount.cifs.c +0
-0@@ -83,22 +83,31 @@/* max length of mtab options */ #define MTAB_OPTIONS_LEN 220Quoted 2 lines
mount.cifs.c line 87
Quoted 2 lines
mount.cifs.c +0
-2-/* -* Maximum length of "share" portion of a UNC. I have no idea if this is at
Quoted 1 line
mount.cifs.c line 88
Quoted 1 line
mount.cifs.c +0
-1-* all valid. According to MSDN, the typical max length of any component is
Quoted 3 lines
mount.cifs.c
Quoted 3 lines
mount.cifs.c +2
-1-* 255, so use that here. +/* +* Max share name, username, password and domain sizes match the kernel's
Quoted 8 lines
mount.cifs.c
Quoted 8 lines
mount.cifs.c +3
-3+* allowances for these string sizes which in turn match Microsoft's +* documentation. */ -#define MAX_SHARE_LEN 256 -/* max length of username (somewhat made up here) */ -#define MAX_USERNAME_SIZE 32 +/* Max length of the share name portion of a UNC. According to Microsoft
Quoted 14 lines
Quoted 14 lines
mount.cifs.c +13
-0+* this is correct for Windows 2000/XP. */ +#define MAX_SHARE_LEN 80 + +/* Max user name length. */ +#define MAX_USERNAME_SIZE 256 + +/* Max domain size. */ +#define MAX_DOMAIN_SIZE 256 + +/* Max password size. */ +#define MOUNT_PASSWD_SIZE 512 + +Quoted 2 lines
mount.cifs.c line 108
Quoted 2 lines
mount.cifs.c +0
-0#ifndef SAFE_FREE #define SAFE_FREE (x) do { if ((x) != NULL) {free(x); x = NULL; } }while (0)
Quoted 7 lines
mount.cifs.c
Quoted 7 lines
mount.cifs.c +0
-2#endif -#define MOUNT_PASSWD_SIZE 128 -#define MAX_DOMAIN_SIZE 64/* * mount.cifs has been the subject of many "security" bugs that have arisen
Quoted 9 lines
Quoted 2 lines
--
1.8.1.4--
Thanks,Steve
Quoted 2 lines · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Quoted 90 lines · Scott Lovenberg
Quoted 89 lines · Steve French
Quoted 6 lines
MAX_SHARE_NAMEof 80 is not correct. I verified that Samba supports much longer (see below), but also found some hits on other servers
with longer limits when searching for this. Windows CLI does appear
to limit to 80 only in the NET SHARE command (also note that maximum UNC path is probably limited byMAX_PATHto 32768 characters)That appears to be correct. The full length of the path is the ultimate limit. How would you like to handle this?
Quoted 79 lines · On Fri, Jul 19, 2013 at 4:26 PM, <[email protected]> wrote:
Quoted 69 lines
From: Scott Lovenberg <[email protected]>
The max size of the username, domain, password and share name strings are now consistent with the kernel and Microsoft's documentation.
Signed-off-by Scott Lovenberg <[email protected]>---
AUTHORS | 2 ++mount.cifs.c| 27 ++++++++++++++++++---------2 files changed, 20 insertions(+), 9 deletions(-)AUTHORS +0
-0@@ -5,5 +5,7 @@ Shirish Pargaonkar <[email protected]>Suresh Jayaraman <[email protected]>
Pavel Shilovsky <[email protected]>
Igor Druzhinin <[email protected]>AUTHORS +2
-0+Scott Lovenberg <[email protected]> +...and others.
mount.cifs.c +18
-10@@ -83,22 +83,31 @@/* max length of mtab options */ #define MTAB_OPTIONS_LEN 220 -/* -* Maximum length of "share" portion of a UNC. I have no idea if this is at -* all valid. According to MSDN, the typical max length of any component is -* 255, so use that here. +/* +* Max share name, username, password and domain sizes match the kernel's +* allowances for these string sizes which in turn match Microsoft's +* documentation. */ -#define MAX_SHARE_LEN 256 -/* max length of username (somewhat made up here) */ -#define MAX_USERNAME_SIZE 32 +/* Max length of the share name portion of a UNC. According to Microsoft +* this is correct for Windows 2000/XP. */ +#define MAX_SHARE_LEN 80 + +/* Max user name length. */ +#define MAX_USERNAME_SIZE 256 + +/* Max domain size. */ +#define MAX_DOMAIN_SIZE 256 + +/* Max password size. */ +#define MOUNT_PASSWD_SIZE 512 + +#ifndef SAFE_FREE #define SAFE_FREE (x) do { if ((x) != NULL) {free(x); x = NULL; } } while (0)#endif -#define MOUNT_PASSWD_SIZE 128 -#define MAX_DOMAIN_SIZE 64/* * mount.cifs has been the subject of many "security" bugs that have arisen -- Quoted 1 line
1.8.1.4
--
Thanks,Steve
A message that is not in the archive (sent off-list or not yet received): 8FB3EB95-C367-4DE7-935C-37C7295F7D53-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 6 lines · On Fri, 19 Jul 2013 22:44:22 -0400 Scott Lovenberg…
Quoted 2 lines · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Yes, I think that would make sense. Scott, I assume you'll send a v2 of this patch that preserves the share length at 256?
Once that's done, the ideal thing here would be to move these definitions in the kernel to a separate header file that lives under include/linux. Then we could have autoconf in cifs-utils look for that header and use the #defines from that instead if it's present.
That way we won't be so reliant on keeping the kernel and cifs-utils in sync...
Quoted 90 lines
Quoted 90 lines · Scott Lovenberg
Quoted 89 lines · Steve French
Quoted 6 lines
MAX_SHARE_NAMEof 80 is not correct. I verified that Samba supports much longer (see below), but also found some hits on other servers
with longer limits when searching for this. Windows CLI does appear
to limit to 80 only in the NET SHARE command (also note that maximum UNC path is probably limited byMAX_PATHto 32768 characters)That appears to be correct. The full length of the path is the ultimate limit. How would you like to handle this?
Quoted 79 lines · On Fri, Jul 19, 2013 at 4:26 PM, <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@publi…
Quoted 69 lines
From: Scott Lovenberg <[email protected]>
The max size of the username, domain, password and share name strings are now consistent with the kernel and Microsoft's documentation.
Signed-off-by Scott Lovenberg <[email protected]>---
AUTHORS | 2 ++mount.cifs.c| 27 ++++++++++++++++++---------2 files changed, 20 insertions(+), 9 deletions(-)AUTHORS +0
-0@@ -5,5 +5,7 @@ Shirish Pargaonkar <[email protected]>Suresh Jayaraman <[email protected]> Pavel Shilovsky <[email protected]> Igor Druzhinin <[email protected]>
AUTHORS +2
-0+Scott Lovenberg <[email protected]> +...and others.
mount.cifs.c +18
-10@@ -83,22 +83,31 @@/* max length of mtab options */ #define MTAB_OPTIONS_LEN 220 -/* -* Maximum length of "share" portion of a UNC. I have no idea if this is at -* all valid. According to MSDN, the typical max length of any component is -* 255, so use that here. +/* +* Max share name, username, password and domain sizes match the kernel's +* allowances for these string sizes which in turn match Microsoft's +* documentation. */ -#define MAX_SHARE_LEN 256 -/* max length of username (somewhat made up here) */ -#define MAX_USERNAME_SIZE 32 +/* Max length of the share name portion of a UNC. According to Microsoft +* this is correct for Windows 2000/XP. */ +#define MAX_SHARE_LEN 80 + +/* Max user name length. */ +#define MAX_USERNAME_SIZE 256 + +/* Max domain size. */ +#define MAX_DOMAIN_SIZE 256 + +/* Max password size. */ +#define MOUNT_PASSWD_SIZE 512 + +#ifndef SAFE_FREE #define SAFE_FREE (x) do { if ((x) != NULL) {free(x); x = NULL; } } while (0)#endif -#define MOUNT_PASSWD_SIZE 128 -#define MAX_DOMAIN_SIZE 64/* * mount.cifs has been the subject of many "security" bugs that have arisen -- Quoted 1 line
1.8.1.4
--
Thanks,Steve
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20130720064344.42d73b04-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org
Sent from my iPod
Quoted 11 lines · Jeff Layton
Quoted 4 lines · On Fri, 19 Jul 2013 22:44:22 -0400 Scott Lovenberg…
Quoted 1 line · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Yes, I think that would make sense. Scott, I assume you'll send a v2 of this patch that preserves the share length at 256?
Quoted 7 lines
Once that's done, the ideal thing here would be to move these definitions in the kernel to a separate header file that lives under
include/linux. Then we could have autoconf in cifs-utils look for that header and use the #defines from that instead if it's present.That way we won't be so reliant on keeping the kernel and cifs-utils in sync...
Yeah. I'll respin and send tomorrow. I have a wedding to attend this afternoon. Using autoconf would be terrific and I'm completely on board with that idea.
Quoted 2 lines
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 6D61AEAF-9EE2-4F99-BA76-F186A76312E0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 22 lines · Scott Lovenberg
Sent from my iPod
Quoted 16 lines · Jeff Layton
Quoted 4 lines · On Fri, 19 Jul 2013 22:44:22 -0400 Scott Lovenberg…
Quoted 1 line · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Yes, I think that would make sense. Scott, I assume you'll send a v2 of this patch that preserves the share length at 256?
Once that's done, the ideal thing here would be to move these definitions in the kernel to a separate header file that lives under
include/linux. Then we could have autoconf in cifs-utils look for that header and use the #defines from that instead if it's present.
Quoted 5 lines
Quoted 2 lines
That way we won't be so reliant on keeping the kernel and cifs-utils in sync...
Yeah. I'll respin and send tomorrow. I have a wedding to attend this afternoon. Using autoconf would be terrific and I'm completely on board with that idea.
Is it better to let the new header file in "include/uapi/linux" ? It belongs to the interface between user mode and kernel mode.
Quoted 4 lines
Quoted 2 lines
Signature · 1 line
Jeff Layton <[email protected]>
Thanks.
Signature · 1 line
Chen Gang
Quoted 23 lines · On Mon, 22 Jul 2013 09:38:17 +0800 Chen Gang <[email protected]> wrote:
Quoted 22 lines · Scott Lovenberg
Sent from my iPod
Quoted 16 lines · Jeff Layton
Quoted 4 lines · On Fri, 19 Jul 2013 22:44:22 -0400 Scott Lovenberg <[email protected]>…
Quoted 1 line · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Yes, I think that would make sense. Scott, I assume you'll send a v2 of this patch that preserves the share length at 256?
Once that's done, the ideal thing here would be to move these definitions in the kernel to a separate header file that lives under
include/linux. Then we could have autoconf in cifs-utils look for that header and use the #defines from that instead if it's present.
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
That way we won't be so reliant on keeping the kernel and cifs-utils in sync...
Yeah. I'll respin and send tomorrow. I have a wedding to attend this afternoon. Using autoconf would be terrific and I'm completely on board with that idea.
Is it better to let the new header file in "
include/uapi/linux" ? It belongs to the interface between user mode and kernel mode.
That's more of a long-term fix. We'll still need to build cifs-utils against kernel headers that don't contain that header file, so fixing the lengths here is needed anyway.
Once this patch goes in, adding a header in include/uapi/linux that holds these lengths (and any others that the mount helper and cifs.ko need to share) would be helpful. Then we could simply look for that file at autoconf time, and conditionally include it if it exists.
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20130722065317.11cd4ffd-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org
Quoted 40 lines · Jeff Layton
Quoted 23 lines · On Mon, 22 Jul 2013 09:38:17 +0800 Chen Gang…
Quoted 22 lines · Scott Lovenberg
Sent from my iPod
Quoted 16 lines · Jeff Layton
Quoted 4 lines · On Fri, 19 Jul 2013 22:44:22 -0400 Scott Lovenberg…
Quoted 1 line · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Yes, I think that would make sense. Scott, I assume you'll send a v2 of this patch that preserves the share length at 256?
Once that's done, the ideal thing here would be to move these definitions in the kernel to a separate header file that lives under
include/linux. Then we could have autoconf in cifs-utils look for that header and use the #defines from that instead if it's present.Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
That way we won't be so reliant on keeping the kernel and cifs-utils in sync...
Yeah. I'll respin and send tomorrow. I have a wedding to attend this afternoon. Using autoconf would be terrific and I'm completely on board with that idea.
Is it better to let the new header file in "
include/uapi/linux" ? It belongs to the interface between user mode and kernel mode.That's more of a long-term fix. We'll still need to build cifs-utils against kernel headers that don't contain that header file, so fixing the lengths here is needed anyway.
Quoted 7 lines
Once this patch goes in, adding a header in
include/uapi/linuxthat holds these lengths (and any others that the mount helper and cifs.ko need to share) would be helpful. Then we could simply look for that file at autoconf time, and conditionally include it if it exists.--
Jeff Layton <[email protected]>
Since we're doing that we might as well standardize on the variable names. Should we just make the mount helper use the same variable names as the kernel to avoid confusion? That will be an external change (ie, changing a non-static variable) if anyone linked to the mount helper (doubtful, but possible) and it will break their code.
--
Peace and Blessings,
-Scott.
A message that is not in the archive (sent off-list or not yet received): CAFB9KM1XE0hw5yFjyL0DP_6MHCYgXqtKPySTgWV1xpX+J9f6Jg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 50 lines · On Mon, 22 Jul 2013 11:07:47 -0400 Scott Lovenberg…
Quoted 40 lines · Jeff Layton
Quoted 23 lines · On Mon, 22 Jul 2013 09:38:17 +0800 Chen Gang…
Quoted 22 lines · Scott Lovenberg
Sent from my iPod
Quoted 16 lines · Jeff Layton
Quoted 4 lines · On Fri, 19 Jul 2013 22:44:22 -0400 Scott Lovenberg…
Quoted 1 line · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Yes, I think that would make sense. Scott, I assume you'll send a v2 of this patch that preserves the share length at 256?
Once that's done, the ideal thing here would be to move these definitions in the kernel to a separate header file that lives under
include/linux. Then we could have autoconf in cifs-utils look for that header and use the #defines from that instead if it's present.Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
That way we won't be so reliant on keeping the kernel and cifs-utils in sync...
Yeah. I'll respin and send tomorrow. I have a wedding to attend this afternoon. Using autoconf would be terrific and I'm completely on board with that idea.
Is it better to let the new header file in "
include/uapi/linux" ? It belongs to the interface between user mode and kernel mode.That's more of a long-term fix. We'll still need to build cifs-utils against kernel headers that don't contain that header file, so fixing the lengths here is needed anyway.
Quoted 7 lines
Once this patch goes in, adding a header in
include/uapi/linuxthat holds these lengths (and any others that the mount helper and cifs.ko need to share) would be helpful. Then we could simply look for that file at autoconf time, and conditionally include it if it exists.--
Jeff Layton <[email protected]>
Quoted 6 lines
Since we're doing that we might as well standardize on the variable names. Should we just make the mount helper use the same variable names as the kernel to avoid confusion? That will be an external change (ie, changing a non-static variable) if anyone linked to the mount helper (doubtful, but possible) and it will break their code.
The variable names aren't terribly important, so I wouldn't go making any sort of change like that for "cleanup". What matters here is the names of the preprocessor constants. Those will need to be unified between userland and kernel in order to make such a scheme work.
Signature · 1 line
Jeff Layton <[email protected]>
A message that is not in the archive (sent off-list or not yet received): 20130722111258.1ac02e22-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org
Quoted 60 lines · Jeff Layton
Quoted 50 lines · On Mon, 22 Jul 2013 11:07:47 -0400 Scott Lovenberg…
Quoted 40 lines · Jeff Layton
Quoted 23 lines · On Mon, 22 Jul 2013 09:38:17 +0800 Chen Gang…
Quoted 22 lines · Scott Lovenberg
Sent from my iPod
Quoted 16 lines · Jeff Layton
Quoted 4 lines · On Fri, 19 Jul 2013 22:44:22 -0400 Scott Lovenberg…
Quoted 1 line · Steve French
Leaving Max share length at 256 is fine with me
Works for me. Should this be fixed kernel side?
Yes, I think that would make sense. Scott, I assume you'll send a v2 of this patch that preserves the share length at 256?
Once that's done, the ideal thing here would be to move these definitions in the kernel to a separate header file that lives under
include/linux. Then we could have autoconf in cifs-utils look for that header and use the #defines from that instead if it's present.Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
That way we won't be so reliant on keeping the kernel and cifs-utils in sync...
Yeah. I'll respin and send tomorrow. I have a wedding to attend this afternoon. Using autoconf would be terrific and I'm completely on board with that idea.
Is it better to let the new header file in "
include/uapi/linux" ? It belongs to the interface between user mode and kernel mode.That's more of a long-term fix. We'll still need to build cifs-utils against kernel headers that don't contain that header file, so fixing the lengths here is needed anyway.
Quoted 7 lines
Once this patch goes in, adding a header in
include/uapi/linuxthat holds these lengths (and any others that the mount helper and cifs.ko need to share) would be helpful. Then we could simply look for that file at autoconf time, and conditionally include it if it exists.--
Jeff Layton <[email protected]>Quoted 6 lines
Since we're doing that we might as well standardize on the variable names. Should we just make the mount helper use the same variable names as the kernel to avoid confusion? That will be an external change (ie, changing a non-static variable) if anyone linked to the mount helper (doubtful, but possible) and it will break their code.
Quoted 7 lines
The variable names aren't terribly important, so I wouldn't go making any sort of change like that for "cleanup". What matters here is the names of the preprocessor constants. Those will need to be unified between userland and kernel in order to make such a scheme work.
--
Jeff Layton <[email protected]>
Sorry, I articulated that terribly. I was referring to the preprocessor constants such that we can just wrap our current definitions in #ifndef/#endif. We're on the same page.
--
Peace and Blessings,
-Scott.