Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 07/11] NFSD: Use "depends on" for PROC_FS dependency
@ 2008-02-11 22:12 Chuck Lever
       [not found] ` <20080211221216.1047.31922.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Chuck Lever @ 2008-02-11 22:12 UTC (permalink / raw)
  To: bfields, trond.myklebust; +Cc: linux-nfs

Recently, commit 440bcc59 added a reverse dependency to fs/Kconfig to
ensure that PROC_FS was enabled if NFSD_V4 was enabled.

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."

A quick grep around other Kconfig files reveals that no entry currently
uses "select PROC_FS" -- every one uses "depends on".  Thus CONFIG_NFSD_V4
should use "depends on PROC_FS" as well.

For SUNRPC_GSS, it's a little more complex.  Other entries can "select"
SUNRPC_GSS, as it is non-visible.  However, the guideline suggests an
entry can't "select" it if it has a dependency (such as PROC_FS).
So, we add forward dependencies on PROC_FS to RPCSEC_GSS_FOO instead.

XXX: Both CONFIG_NFSV4 and CONFIG_NFSD_V4 select RPCSEC_GSS_KRB5, which is
visible, which kconfig-language.txt also frowns upon.  The intent was to
enable at least one GSS mechanism if V4 was enabled.  Perhaps we should
make SUNRPC_GSS visible, and make the NFSv4 options visible only if
SUNRPC_GSS is enabled.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/Kconfig |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/Kconfig b/fs/Kconfig
index 0c8f85d..9ee288f 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -1662,8 +1662,6 @@ config NFSD
 	select CRYPTO_MD5 if NFSD_V4
 	select CRYPTO if NFSD_V4
 	select FS_POSIX_ACL if NFSD_V4
-	select PROC_FS if NFSD_V4
-	select PROC_FS if SUNRPC_GSS
 	help
 	  Choose Y here if you want to allow other computers to access
 	  files residing on this system using Sun's Network File System
@@ -1723,7 +1721,7 @@ config NFSD_V3_ACL
 
 config NFSD_V4
 	bool "NFS server support for NFS version 4 (EXPERIMENTAL)"
-	depends on NFSD && NFSD_V3 && EXPERIMENTAL
+	depends on NFSD && NFSD_V3 && PROC_FS && EXPERIMENTAL
 	select RPCSEC_GSS_KRB5
 	help
 	  This option enables support in your system's NFS server for
@@ -1798,7 +1796,7 @@ config SUNRPC_BIND34
 
 config RPCSEC_GSS_KRB5
 	tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
-	depends on SUNRPC && EXPERIMENTAL
+	depends on SUNRPC && PROC_FS && EXPERIMENTAL
 	select SUNRPC_GSS
 	select CRYPTO
 	select CRYPTO_MD5
@@ -1817,7 +1815,7 @@ config RPCSEC_GSS_KRB5
 
 config RPCSEC_GSS_SPKM3
 	tristate "Secure RPC: SPKM3 mechanism (EXPERIMENTAL)"
-	depends on SUNRPC && EXPERIMENTAL
+	depends on SUNRPC && PROC_FS && EXPERIMENTAL
 	select SUNRPC_GSS
 	select CRYPTO
 	select CRYPTO_MD5


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 07/11] NFSD: Use "depends on" for PROC_FS dependency
@ 2008-02-08 17:52 Chuck Lever
       [not found] ` <20080208175215.16261.39243.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Chuck Lever @ 2008-02-08 17:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-nfs

Recently a reverse dependency was added to fs/Kconfig to ensure that
PROC_FS was enabled if NFSD_V4 was enabled.

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."

A quick grep around other Kconfig files reveals that no entry currently
uses "select PROC_FS" -- every one uses "depends on".  Thus CONFIG_NFSD_V4
should use "depends on PROC_FS" as well.

For SUNRPC_GSS, it's a little more complex.  Other entries can "select"
SUNRPC_GSS, as it is non-visible.  However, the guideline suggests an
entry can't "select" it if it has a dependency (such as PROC_FS).
So, we add forward dependencies on PROC_FS to RPCSEC_GSS_FOO instead.

XXX: Both CONFIG_NFSV4 and CONFIG_NFSD_V4 select RPCSEC_GSS_KRB5, which is
visible, which kconfig-language.txt also frowns upon.  The intent was to
enable at least one GSS mechanism if V4 was enabled.  Perhaps we should
make SUNRPC_GSS visible, and make the NFSv4 options visible only if
SUNRPC_GSS is enabled.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/Kconfig |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/Kconfig b/fs/Kconfig
index 4c16789..5f00ee7 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -1662,8 +1662,6 @@ config NFSD
 	select CRYPTO_MD5 if NFSD_V4
 	select CRYPTO if NFSD_V4
 	select FS_POSIX_ACL if NFSD_V4
-	select PROC_FS if NFSD_V4
-	select PROC_FS if SUNRPC_GSS
 	help
 	  Choose Y here if you want to allow other computers to access
 	  files residing on this system using Sun's Network File System
@@ -1723,7 +1721,7 @@ config NFSD_V3_ACL
 
 config NFSD_V4
 	bool "NFS server support for NFS version 4 (EXPERIMENTAL)"
-	depends on NFSD && EXPERIMENTAL
+	depends on NFSD && PROC_FS && EXPERIMENTAL
 	select NFSD_V3
 	select RPCSEC_GSS_KRB5
 	help
@@ -1796,7 +1794,7 @@ config SUNRPC_BIND34
 
 config RPCSEC_GSS_KRB5
 	tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
-	depends on SUNRPC && EXPERIMENTAL
+	depends on SUNRPC && PROC_FS && EXPERIMENTAL
 	select SUNRPC_GSS
 	select CRYPTO
 	select CRYPTO_MD5
@@ -1815,7 +1813,7 @@ config RPCSEC_GSS_KRB5
 
 config RPCSEC_GSS_SPKM3
 	tristate "Secure RPC: SPKM3 mechanism (EXPERIMENTAL)"
-	depends on SUNRPC && EXPERIMENTAL
+	depends on SUNRPC && PROC_FS && EXPERIMENTAL
 	select SUNRPC_GSS
 	select CRYPTO
 	select CRYPTO_MD5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-02-13 21:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 22:12 [PATCH 07/11] NFSD: Use "depends on" for PROC_FS dependency Chuck Lever
     [not found] ` <20080211221216.1047.31922.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-02-12 21:23   ` J. Bruce Fields
2008-02-12 21:47     ` Trond Myklebust
     [not found]       ` <1202852836.9228.1.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-12 22:32         ` J. Bruce Fields
2008-02-12 22:57           ` Trond Myklebust
     [not found]             ` <1202857069.9228.14.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-02-13 18:22               ` Chuck Lever
2008-02-13 18:44               ` Chuck Lever
2008-02-13 21:48                 ` Trond Myklebust
2008-02-12 22:10     ` Chuck Lever
2008-02-12 22:30       ` J. Bruce Fields
2008-02-13 18:28         ` Chuck Lever
2008-02-13 18:58           ` J. Bruce Fields
  -- strict thread matches above, loose matches on Subject: below --
2008-02-08 17:52 Chuck Lever
     [not found] ` <20080208175215.16261.39243.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2008-02-08 20:22   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox