linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fscrypto: remove unneeded Kconfig dependencies
@ 2016-10-24 20:17 Eric Biggers
  2016-10-24 20:41 ` Richard Weinberger
  2016-11-26 20:10 ` Theodore Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Biggers @ 2016-10-24 20:17 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-ext4, linux-f2fs-devel, tytso, jaegeuk, richard,
	Eric Biggers

SHA256 and ENCRYPTED_KEYS are not needed.  CTR shouldn't be needed
either, but I left it for now because it was intentionally added by
commit 71dea01ea2ed ("ext4 crypto: require CONFIG_CRYPTO_CTR if ext4
encryption is enabled").  So it sounds like there may be a dependency
problem elsewhere, which I have not been able to identify specifically,
that must be solved before CTR can be removed.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/crypto/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/crypto/Kconfig b/fs/crypto/Kconfig
index 92348fa..f514978 100644
--- a/fs/crypto/Kconfig
+++ b/fs/crypto/Kconfig
@@ -8,9 +8,7 @@ config FS_ENCRYPTION
 	select CRYPTO_XTS
 	select CRYPTO_CTS
 	select CRYPTO_CTR
-	select CRYPTO_SHA256
 	select KEYS
-	select ENCRYPTED_KEYS
 	help
 	  Enable encryption of files and directories.  This
 	  feature is similar to ecryptfs, but it is more memory
-- 
2.8.0.rc3.226.g39d4020


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

* Re: [PATCH] fscrypto: remove unneeded Kconfig dependencies
  2016-10-24 20:17 [PATCH] fscrypto: remove unneeded Kconfig dependencies Eric Biggers
@ 2016-10-24 20:41 ` Richard Weinberger
  2016-10-24 21:17   ` Eric Biggers
  2016-11-26 20:10 ` Theodore Ts'o
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2016-10-24 20:41 UTC (permalink / raw)
  To: Eric Biggers, linux-fsdevel; +Cc: linux-ext4, linux-f2fs-devel, tytso, jaegeuk

On 24.10.2016 22:17, Eric Biggers wrote:
> SHA256 and ENCRYPTED_KEYS are not needed.  CTR shouldn't be needed
> either, but I left it for now because it was intentionally added by
> commit 71dea01ea2ed ("ext4 crypto: require CONFIG_CRYPTO_CTR if ext4
> encryption is enabled").  So it sounds like there may be a dependency
> problem elsewhere, which I have not been able to identify specifically,
> that must be solved before CTR can be removed.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Reviewed-by: Richard Weinberger <richard@nod.at>

FWIW, Strictly speaking we could also get rid of the dependency on BLOCK.
Only very few functions in fs/crypto/crypto.c use block specific functions,
these could be placed in a different file.
The use case would be very small systems with UBIFS and encrypted files.
i.e. kexec() style bootloaders.

Thanks,
//richard

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

* Re: [PATCH] fscrypto: remove unneeded Kconfig dependencies
  2016-10-24 20:41 ` Richard Weinberger
@ 2016-10-24 21:17   ` Eric Biggers
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Biggers @ 2016-10-24 21:17 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-fsdevel, linux-ext4, linux-f2fs-devel, tytso, jaegeuk

On Mon, Oct 24, 2016 at 10:41:08PM +0200, Richard Weinberger wrote:
> FWIW, Strictly speaking we could also get rid of the dependency on BLOCK.
> Only very few functions in fs/crypto/crypto.c use block specific functions,
> these could be placed in a different file.
> The use case would be very small systems with UBIFS and encrypted files.
> i.e. kexec() style bootloaders.
> 
> Thanks,
> //richard

Yes, that makes sense if UBIFS is going to be using the code too.  Feel free to
propose a patch.  As I understand it, the assumption would be that if a
filesystem needs the block-specific functions in fs/crypto/, then it itself
would necessarily already depend on CONFIG_BLOCK.  It should work to just
conditionally compile the block-specific functions based on CONFIG_BLOCK, either
via #ifdefs or by having a separate file like fs/crypto/block.c and putting
'fscrypto-$(CONFIG_BLOCK) += block.o' in fs/crypto/Makefile.  The separate file
sounds preferable.

Eric

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

* Re: [PATCH] fscrypto: remove unneeded Kconfig dependencies
  2016-10-24 20:17 [PATCH] fscrypto: remove unneeded Kconfig dependencies Eric Biggers
  2016-10-24 20:41 ` Richard Weinberger
@ 2016-11-26 20:10 ` Theodore Ts'o
  1 sibling, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2016-11-26 20:10 UTC (permalink / raw)
  To: Eric Biggers
  Cc: linux-fsdevel, linux-ext4, linux-f2fs-devel, jaegeuk, richard

On Mon, Oct 24, 2016 at 01:17:06PM -0700, Eric Biggers wrote:
> SHA256 and ENCRYPTED_KEYS are not needed.  CTR shouldn't be needed
> either, but I left it for now because it was intentionally added by
> commit 71dea01ea2ed ("ext4 crypto: require CONFIG_CRYPTO_CTR if ext4
> encryption is enabled").  So it sounds like there may be a dependency
> problem elsewhere, which I have not been able to identify specifically,
> that must be solved before CTR can be removed.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Applied, thanks.

				- Ted

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

end of thread, other threads:[~2016-11-26 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 20:17 [PATCH] fscrypto: remove unneeded Kconfig dependencies Eric Biggers
2016-10-24 20:41 ` Richard Weinberger
2016-10-24 21:17   ` Eric Biggers
2016-11-26 20:10 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).