Skip to contentSkip to conversation

NFS: NFS_V4 and NFSD_V4 should depend on SUNRPC_GSS

PATCH In review Chuck Lever 2 participants 4 messages Mar 14, 2008 – Mar 17, 2008 2 messages not in the archive

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

PATCH 5/5 NFS: NFS_V4 and NFSD_V4 should depend on SUNRPC_GSS

There is a guideline in Documentation/kbuild/kconfig-language.txt that states "In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies." Both CONFIG_NFS_V4 and CONFIG_NFSD_V4 select RPCSEC_GSS_KRB5, which is visible, and has dependencies.

For the sake of addressing the kconfig-language recommendation, "select RPCSEC_GSS_KRB5" to "select SUNRPC_GSS".

The server side requires it to build properly, and the client side has it to provide support for loading GSS capabilities, which RFC 3530 makes mandatory for NFS version 4.

---

 fs/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/Kconfig +2 -2
index bbc8e52..28b7ba5 100644
@@ -1628,7 +1628,7 @@ config NFS_V3_ACL
 config NFS_V4
 	bool "NFS client support for NFS version 4 (EXPERIMENTAL)"
 	depends on NFS_FS && EXPERIMENTAL
-	select RPCSEC_GSS_KRB5
+	select SUNRPC_GSS
 	help
 	  This option enables support for version 4 of the NFS protocol 
 	  (RFC 3530) in the kernel's NFS client.
@@ -1719,7 +1719,7 @@ config NFSD_V4
 	bool "NFS server support for NFS version 4 (EXPERIMENTAL)"
 	depends on NFSD && PROC_FS && EXPERIMENTAL
 	select NFSD_V3
-	select RPCSEC_GSS_KRB5
+	select SUNRPC_GSS
 	help
 	  This option enables support in your system's NFS server for
 	  version 4 of the NFS protocol (RFC 3530).

A message that is not in the archive (sent off-list or not yet received): 20080314181525.29889.35370.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org

#2 lore raw
Quoted 33 lines · Chuck Lever

There is a guideline in Documentation/kbuild/kconfig-language.txt that states "In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies." Both CONFIG_NFS_V4 and CONFIG_NFSD_V4 select RPCSEC_GSS_KRB5, which is visible, and has dependencies.

For the sake of addressing the kconfig-language recommendation, "select RPCSEC_GSS_KRB5" to "select SUNRPC_GSS".

The server side requires it to build properly, and the client side has it to provide support for loading GSS capabilities, which RFC 3530 makes mandatory for NFS version 4.

---

 fs/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/Kconfig +1 -1
index bbc8e52..28b7ba5 100644
@@ -1628,7 +1628,7 @@ config NFS_V3_ACL
 config NFS_V4
 	bool "NFS client support for NFS version 4 (EXPERIMENTAL)"
 	depends on NFS_FS && EXPERIMENTAL
-	select RPCSEC_GSS_KRB5
+	select SUNRPC_GSS
 	help
 	  This option enables support for version 4 of the NFS protocol 
 	  (RFC 3530) in the kernel's NFS client.

fs/Kconfig config NFSD_V4 · line 1725

Quoted 8 lines
fs/Kconfig +1 -1
@@ -1719,7 +1719,7 @@ config NFSD_V4
 	bool "NFS server support for NFS version 4 (EXPERIMENTAL)"
 	depends on NFSD && PROC_FS && EXPERIMENTAL
 	select NFSD_V3
-	select RPCSEC_GSS_KRB5
+	select SUNRPC_GSS
 	help
 	  This option enables support in your system's NFS server for
 	  version 4 of the NFS protocol (RFC 3530).

NACK. Selecting SUNRPC_GSS is _not_ equivalent to what we have today. Currently, if you select NFSv4, it will force compilation of the KerberosV mechanism too. AFAICS, this patch regresses that behaviour.

Trond

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com

A message that is not in the archive (sent off-list or not yet received): 1205769601.11303.10.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org

#4 lore raw
Quoted 36 lines · Trond Myklebust
Quoted 35 lines · Chuck Lever

There is a guideline in Documentation/kbuild/kconfig-language.txt that states "In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies." Both CONFIG_NFS_V4 and CONFIG_NFSD_V4 select RPCSEC_GSS_KRB5, which is visible, and has dependencies.

For the sake of addressing the kconfig-language recommendation, "select RPCSEC_GSS_KRB5" to "select SUNRPC_GSS".

The server side requires it to build properly, and the client side has it to provide support for loading GSS capabilities, which RFC 3530 makes mandatory for NFS version 4.

---

 fs/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/Kconfig +1 -1
index bbc8e52..28b7ba5 100644
@@ -1628,7 +1628,7 @@ config NFS_V3_ACL
 config NFS_V4
 	bool "NFS client support for NFS version 4 (EXPERIMENTAL)"
 	depends on NFS_FS && EXPERIMENTAL
-	select RPCSEC_GSS_KRB5
+	select SUNRPC_GSS
 	help
 	  This option enables support for version 4 of the NFS protocol
 	  (RFC 3530) in the kernel's NFS client.
@@ -1719,7 +1719,7 @@ config NFSD_V4
 	bool "NFS server support for NFS version 4 (EXPERIMENTAL)"
 	depends on NFSD && PROC_FS && EXPERIMENTAL
Quoted 8 lines

fs/Kconfig config NFSD_V4 · line 1725

Quoted 6 lines
fs/Kconfig +1 -1
 	select NFSD_V3
-	select RPCSEC_GSS_KRB5
+	select SUNRPC_GSS
 	help
 	  This option enables support in your system's NFS server for
 	  version 4 of the NFS protocol (RFC 3530).

NACK.

A little discussion first would be more friendly.

Quoted 3 lines

Selecting SUNRPC_GSS is _not_ equivalent to what we have today. Currently, if you select NFSv4, it will force compilation of the KerberosV mechanism too. AFAICS, this patch regresses that behaviour.

Enforcing that behavior breaks the rules of Kconfig.

The purpose of Kconfig is to allow the kernel to build correctly. The resulting configuration does not have to make sense from a run-time perspective.

Normally the way this sort of thing is handled is that a note is left in the help text that says "Oh, and you will find enabling Kerberos V support useful since the spec requires it." Adding a "default m && (NFSV4 || NFSD_V4)" or something like that under Kerberos GSS might work as well.

But the point is, what I'm removing is not a build dependency; what I'm replacing it with is a build dependency.

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com

#5 lore raw
Quoted 6 lines · Chuck Lever
Quoted 3 lines

Selecting SUNRPC_GSS is _not_ equivalent to what we have today. Currently, if you select NFSv4, it will force compilation of the KerberosV mechanism too. AFAICS, this patch regresses that behaviour.

Enforcing that behavior breaks the rules of Kconfig.

The current _implementation_ may break the rules, but the behaviour is definitely correct and should not be changed.

Quoted 3 lines

The purpose of Kconfig is to allow the kernel to build correctly. The resulting configuration does not have to make sense from a run- time perspective.

While Kconfig may allow it, that still doesn't make it a good policy.

Quoted 5 lines

Normally the way this sort of thing is handled is that a note is left in the help text that says "Oh, and you will find enabling Kerberos V support useful since the spec requires it." Adding a "default m && (NFSV4 || NFSD_V4)" or something like that under Kerberos GSS might work as well.

config RPCSEC_GSS_KRB5

	tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
	depends on SUNRPC && EXPERIMENTAL
	default y if (NFS_V4 && NFS_FS=y) || (NFSD_V4 && NFSD=y)
	default m if (NFS_V4 && NFS_FS=m) || (NFSD_V4 && NFSD=m)
	select ...
Quoted 2 lines

But the point is, what I'm removing is not a build dependency; what I'm replacing it with is a build dependency.

See above. "It compiles but doesn't run" isn't acceptable.

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com