All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in
@ 2025-08-03 21:21 Eric Biggers
  2025-08-04 11:54 ` Jeff Layton
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Biggers @ 2025-08-03 21:21 UTC (permalink / raw)
  To: Chuck Lever, Jeff Layton, linux-nfs
  Cc: NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey, Eric Biggers

Now that nfsd is accessing SHA-256 via the library API instead of via
crypto_shash, there is a direct symbol dependency on the SHA-256 code
and there is no benefit to be gained from forcing it to be built-in.
Therefore, select CRYPTO_LIB_SHA256 from NFSD (conditional on NFSD_V4)
instead of from NFSD_V4, so that it can be 'm' if NFSD is 'm'.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 fs/nfsd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
index 879e0b104d1c8..e134dce45e350 100644
--- a/fs/nfsd/Kconfig
+++ b/fs/nfsd/Kconfig
@@ -3,10 +3,11 @@ config NFSD
 	tristate "NFS server support"
 	depends on INET
 	depends on FILE_LOCKING
 	depends on FSNOTIFY
 	select CRC32
+	select CRYPTO_LIB_SHA256 if NFSD_V4
 	select LOCKD
 	select SUNRPC
 	select EXPORTFS
 	select NFS_COMMON
 	select NFS_ACL_SUPPORT if NFSD_V2_ACL
@@ -75,11 +76,10 @@ config NFSD_V4
 	bool "NFS server support for NFS version 4"
 	depends on NFSD && PROC_FS
 	select FS_POSIX_ACL
 	select RPCSEC_GSS_KRB5
 	select CRYPTO
-	select CRYPTO_LIB_SHA256
 	select CRYPTO_MD5
 	select GRACE_PERIOD
 	select NFS_V4_2_SSC_HELPER if NFS_V4_2
 	help
 	  This option enables support in your system's NFS server for

base-commit: 186f3edfdd41f2ae87fc40a9ccba52a3bf930994
-- 
2.50.1


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

* Re: [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in
  2025-08-03 21:21 [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in Eric Biggers
@ 2025-08-04 11:54 ` Jeff Layton
  2025-09-04  2:29 ` Eric Biggers
  2025-09-05 14:28 ` Chuck Lever
  2 siblings, 0 replies; 5+ messages in thread
From: Jeff Layton @ 2025-08-04 11:54 UTC (permalink / raw)
  To: Eric Biggers, Chuck Lever, linux-nfs
  Cc: NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey

On Sun, 2025-08-03 at 14:21 -0700, Eric Biggers wrote:
> Now that nfsd is accessing SHA-256 via the library API instead of via
> crypto_shash, there is a direct symbol dependency on the SHA-256 code
> and there is no benefit to be gained from forcing it to be built-in.
> Therefore, select CRYPTO_LIB_SHA256 from NFSD (conditional on NFSD_V4)
> instead of from NFSD_V4, so that it can be 'm' if NFSD is 'm'.
> 
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>  fs/nfsd/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
> index 879e0b104d1c8..e134dce45e350 100644
> --- a/fs/nfsd/Kconfig
> +++ b/fs/nfsd/Kconfig
> @@ -3,10 +3,11 @@ config NFSD
>  	tristate "NFS server support"
>  	depends on INET
>  	depends on FILE_LOCKING
>  	depends on FSNOTIFY
>  	select CRC32
> +	select CRYPTO_LIB_SHA256 if NFSD_V4
>  	select LOCKD
>  	select SUNRPC
>  	select EXPORTFS
>  	select NFS_COMMON
>  	select NFS_ACL_SUPPORT if NFSD_V2_ACL
> @@ -75,11 +76,10 @@ config NFSD_V4
>  	bool "NFS server support for NFS version 4"
>  	depends on NFSD && PROC_FS
>  	select FS_POSIX_ACL
>  	select RPCSEC_GSS_KRB5
>  	select CRYPTO
> -	select CRYPTO_LIB_SHA256
>  	select CRYPTO_MD5
>  	select GRACE_PERIOD
>  	select NFS_V4_2_SSC_HELPER if NFS_V4_2
>  	help
>  	  This option enables support in your system's NFS server for
> 
> base-commit: 186f3edfdd41f2ae87fc40a9ccba52a3bf930994

Reviewed-by: Jeff Layton <jlayton@kernel.org>

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

* Re: [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in
  2025-08-03 21:21 [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in Eric Biggers
  2025-08-04 11:54 ` Jeff Layton
@ 2025-09-04  2:29 ` Eric Biggers
  2025-09-04 13:21   ` Chuck Lever
  2025-09-05 14:28 ` Chuck Lever
  2 siblings, 1 reply; 5+ messages in thread
From: Eric Biggers @ 2025-09-04  2:29 UTC (permalink / raw)
  To: Chuck Lever, Jeff Layton, linux-nfs
  Cc: NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey

On Sun, Aug 03, 2025 at 02:21:30PM -0700, Eric Biggers wrote:
> Now that nfsd is accessing SHA-256 via the library API instead of via
> crypto_shash, there is a direct symbol dependency on the SHA-256 code
> and there is no benefit to be gained from forcing it to be built-in.
> Therefore, select CRYPTO_LIB_SHA256 from NFSD (conditional on NFSD_V4)
> instead of from NFSD_V4, so that it can be 'm' if NFSD is 'm'.
> 
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>  fs/nfsd/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks like this patch hasn't been applied yet.  Could it be taken
through the nfs tree?  Thanks,

- Eric

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

* Re: [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in
  2025-09-04  2:29 ` Eric Biggers
@ 2025-09-04 13:21   ` Chuck Lever
  0 siblings, 0 replies; 5+ messages in thread
From: Chuck Lever @ 2025-09-04 13:21 UTC (permalink / raw)
  To: Eric Biggers, Jeff Layton, linux-nfs
  Cc: NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey

On 9/3/25 10:29 PM, Eric Biggers wrote:
> On Sun, Aug 03, 2025 at 02:21:30PM -0700, Eric Biggers wrote:
>> Now that nfsd is accessing SHA-256 via the library API instead of via
>> crypto_shash, there is a direct symbol dependency on the SHA-256 code
>> and there is no benefit to be gained from forcing it to be built-in.
>> Therefore, select CRYPTO_LIB_SHA256 from NFSD (conditional on NFSD_V4)
>> instead of from NFSD_V4, so that it can be 'm' if NFSD is 'm'.
>>
>> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
>> ---
>>  fs/nfsd/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Looks like this patch hasn't been applied yet.  Could it be taken
> through the nfs tree?  Thanks,
> 
> - Eric

For some reason, I marked this patch "superceded" in patchworks so it
got lost. I can apply it today.


-- 
Chuck Lever

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

* Re: [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in
  2025-08-03 21:21 [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in Eric Biggers
  2025-08-04 11:54 ` Jeff Layton
  2025-09-04  2:29 ` Eric Biggers
@ 2025-09-05 14:28 ` Chuck Lever
  2 siblings, 0 replies; 5+ messages in thread
From: Chuck Lever @ 2025-09-05 14:28 UTC (permalink / raw)
  To: Jeff Layton, linux-nfs, Eric Biggers
  Cc: Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey

From: Chuck Lever <chuck.lever@oracle.com>

On Sun, 03 Aug 2025 14:21:30 -0700, Eric Biggers wrote:
> Now that nfsd is accessing SHA-256 via the library API instead of via
> crypto_shash, there is a direct symbol dependency on the SHA-256 code
> and there is no benefit to be gained from forcing it to be built-in.
> Therefore, select CRYPTO_LIB_SHA256 from NFSD (conditional on NFSD_V4)
> instead of from NFSD_V4, so that it can be 'm' if NFSD is 'm'.
> 
> 
> [...]

Applied to nfsd-testing, thanks!

[1/1] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in
      commit: 9c0d70a41f389ff1f15fd38fa47be5c3dd13c915

--
Chuck Lever


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

end of thread, other threads:[~2025-09-05 14:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-03 21:21 [PATCH] nfsd: Don't force CRYPTO_LIB_SHA256 to be built-in Eric Biggers
2025-08-04 11:54 ` Jeff Layton
2025-09-04  2:29 ` Eric Biggers
2025-09-04 13:21   ` Chuck Lever
2025-09-05 14:28 ` Chuck Lever

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.