Skip to contentSkip to conversation

cifs: Better dependencies

PATCH Applied Jean Delvare 3 participants 6 messages Jan 25, 2017 – Feb 1, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover cifs: Better dependencies

Hi all,

This is my attempt to fix and improve the dependencies of cifs.

[PATCH 1/3] cifs: Simplify SMB2 and SMB311 dependencies [PATCH 2/3] cifs: Only select the required crypto modules [PATCH 3/3] cifs: Add soft dependencies

I already sent this patch series one year ago, but did not get any reply, so I am trying again.

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
#1 lore raw

PATCH 1/3 cifs: Simplify SMB2 and SMB311 dependencies

* CIFS_SMB2 depends on CIFS, which depends on INET and selects NLS. So these dependencies do not need to be repeated for CIFS_SMB2.
* CIFS_SMB311 depends on CIFS_SMB2, which depends on INET. So this dependency doesn't need to be repeated for CIFS_SMB311.

---
 fs/cifs/Kconfig |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/cifs/Kconfig +2 -3
@@ -169,8 +169,7 @@ config CIFS_NFSD_EXPORT
 
 config CIFS_SMB2
 	bool "SMB2 and SMB3 network file system support"
-	depends on CIFS && INET
-	select NLS
+	depends on CIFS
 	select KEYS
 	select FSCACHE
 	select DNS_RESOLVER
@@ -194,7 +193,7 @@ config CIFS_SMB2
 
 config CIFS_SMB311
 	bool "SMB3.1.1 network file system support (Experimental)"
-	depends on CIFS_SMB2 && INET
+	depends on CIFS_SMB2
 
 	help
 	  This enables experimental support for the newest, SMB3.1.1, dialect.
Signature · 2 lines
Jean Delvare
SUSE L3 Support
#2 lore raw

PATCH 2/3 cifs: Only select the required crypto modules

In reply to Jean Delvare

The sha256 and cmac crypto modules are only needed for SMB2+, so move the select statements to config CIFS_SMB2. Also select CRYPTO_AES there as SMB2+ needs it.

---
 fs/cifs/Kconfig |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fs/cifs/Kconfig +3 -2
@@ -9,8 +9,6 @@ config CIFS
 	select CRYPTO_ARC4
 	select CRYPTO_ECB
 	select CRYPTO_DES
-	select CRYPTO_SHA256
-	select CRYPTO_CMAC
 	help
 	  This is the client VFS module for the Common Internet File System
 	  (CIFS) protocol which is the successor to the Server Message Block
@@ -173,6 +171,9 @@ config CIFS_SMB2
 	select KEYS
 	select FSCACHE
 	select DNS_RESOLVER
+	select CRYPTO_AES
+	select CRYPTO_SHA256
+	select CRYPTO_CMAC
 
 	help
 	  This enables support for the Server Message Block version 2
Signature · 2 lines
Jean Delvare
SUSE L3 Support
#3 lore raw

PATCH 3/3 cifs: Add soft dependencies

In reply to Jean Delvare

List soft dependencies of cifs so that mkinitrd and dracut can include the required helper modules.

---
 fs/cifs/cifsfs.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
fs/cifs/cifsfs.c +12 -0
@@ -1365,5 +1365,17 @@ MODULE_DESCRIPTION
     ("VFS to access servers complying with the SNIA CIFS Specification "
      "e.g. Samba and Windows");
 MODULE_VERSION(CIFS_VERSION);
+MODULE_SOFTDEP("pre: arc4");
+MODULE_SOFTDEP("pre: des");
+MODULE_SOFTDEP("pre: ecb");
+MODULE_SOFTDEP("pre: hmac");
+MODULE_SOFTDEP("pre: md4");
+MODULE_SOFTDEP("pre: md5");
+MODULE_SOFTDEP("pre: nls");
+#ifdef CONFIG_CIFS_SMB2
+MODULE_SOFTDEP("pre: aes");
+MODULE_SOFTDEP("pre: cmac");
+MODULE_SOFTDEP("pre: sha256");
+#endif /* CONFIG_CIFS_SMB2 */
 module_init(init_cifs)
 module_exit(exit_cifs)
Signature · 2 lines
Jean Delvare
SUSE L3 Support
Reviewed-by on the v1 series
#4 lore raw
In reply to Jean Delvare

2017-01-25 7:06 GMT-08:00 Jean Delvare <[email protected]>:

Quoted 11 lines

Hi all,

This is my attempt to fix and improve the dependencies of cifs.

[PATCH 1/3] cifs: Simplify SMB2 and SMB311 dependencies [PATCH 2/3] cifs: Only select the required crypto modules [PATCH 3/3] cifs: Add soft dependencies

I already sent this patch series one year ago, but did not get any reply, so I am trying again.

Quoted 8 lines

Thanks,
--
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Looks good.

Signature · 2 lines
Best regards,
Pavel Shilovsky
Applied
#5 lore raw

Merged into cifs-2.6.git for-next

Thanks - this is helpful

Quoted 32 lines · Pavel Shilovsky

2017-01-25 7:06 GMT-08:00 Jean Delvare <[email protected]>:

Quoted 11 lines

Hi all,

This is my attempt to fix and improve the dependencies of cifs.

[PATCH 1/3] cifs: Simplify SMB2 and SMB311 dependencies [PATCH 2/3] cifs: Only select the required crypto modules [PATCH 3/3] cifs: Add soft dependencies

I already sent this patch series one year ago, but did not get any reply, so I am trying again.

Quoted 8 lines

Thanks,
--
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Looks good.

--
Best regards,
Pavel Shilovsky
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Thanks,

Steve