linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] eCryptfs: fix compile error
@ 2011-07-29 16:51 Roberto Sassu
  2011-07-29 17:09 ` Tyler Hicks
  0 siblings, 1 reply; 3+ messages in thread
From: Roberto Sassu @ 2011-07-29 16:51 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-kernel, tyhicks, kirkland, ecryptfs-devel, hilld,
	Roberto Sassu

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

This patch fixes the compile error reported at the address:

https://bugzilla.kernel.org/show_bug.cgi?id=40292

The problem arises when compiling eCryptfs as built-in and the 'encrypted'
key type as a module. The patch enables the 'encrypted' key type support
for eCryptfs only when both components are compiled as built-in, both as
modules or eCryptfs as a module and the 'encrypted' key type as built-in.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Reported-by: David Hill <hilld@binarystorm.net>
---
 fs/ecryptfs/ecryptfs_kernel.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index b36c557..a2da660 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -79,7 +79,9 @@ struct ecryptfs_page_crypt_context {
 	} param;
 };
 
-#if defined(CONFIG_ENCRYPTED_KEYS) || defined(CONFIG_ENCRYPTED_KEYS_MODULE)
+#if (defined(CONFIG_ECRYPT_FS) && defined(CONFIG_ENCRYPTED_KEYS)) || \
+	(defined(CONFIG_ECRYPT_FS_MODULE) && \
+	(defined(CONFIG_ENCRYPTED_KEYS) || defined(CONFIG_ENCRYPTED_KEYS_MODULE)))
 static inline struct ecryptfs_auth_tok *
 ecryptfs_get_encrypted_key_payload_data(struct key *key)
 {
-- 
1.7.6


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2061 bytes --]

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

* Re: [PATCH] eCryptfs: fix compile error
  2011-07-29 16:51 [PATCH] eCryptfs: fix compile error Roberto Sassu
@ 2011-07-29 17:09 ` Tyler Hicks
  2011-08-01 11:31   ` Roberto Sassu
  0 siblings, 1 reply; 3+ messages in thread
From: Tyler Hicks @ 2011-07-29 17:09 UTC (permalink / raw)
  To: Roberto Sassu
  Cc: linux-fsdevel, linux-kernel, kirkland, ecryptfs-devel, hilld

On Fri Jul 29, 2011 at 06:51:04PM +0200, Roberto Sassu <roberto.sassu@polito.it> wrote:
> This patch fixes the compile error reported at the address:
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=40292
> 
> The problem arises when compiling eCryptfs as built-in and the 'encrypted'
> key type as a module. The patch enables the 'encrypted' key type support
> for eCryptfs only when both components are compiled as built-in, both as
> modules or eCryptfs as a module and the 'encrypted' key type as built-in.
> 
> Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
> Reported-by: David Hill <hilld@binarystorm.net>
> ---
>  fs/ecryptfs/ecryptfs_kernel.h |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
> index b36c557..a2da660 100644
> --- a/fs/ecryptfs/ecryptfs_kernel.h
> +++ b/fs/ecryptfs/ecryptfs_kernel.h
> @@ -79,7 +79,9 @@ struct ecryptfs_page_crypt_context {
>  	} param;
>  };
> 
> -#if defined(CONFIG_ENCRYPTED_KEYS) || defined(CONFIG_ENCRYPTED_KEYS_MODULE)
> +#if (defined(CONFIG_ECRYPT_FS) && defined(CONFIG_ENCRYPTED_KEYS)) || \
> +	(defined(CONFIG_ECRYPT_FS_MODULE) && \
> +	(defined(CONFIG_ENCRYPTED_KEYS) || defined(CONFIG_ENCRYPTED_KEYS_MODULE)))

Thanks for the patch, Roberto.

Shouldn't this be handled in the Kconfig? It seems like it would be
better to force the encrypted key type to be built-in if eCryptfs is
configured to be built-in.

With this patch, a user could have CONFIG_ENCRYPTED_KEYS=m and
CONFIG_ECRYPT_FS=y, but still hit potentially confusing error conditions
when trying to use encrypted key support with eCryptfs.

Tyler

>  static inline struct ecryptfs_auth_tok *
>  ecryptfs_get_encrypted_key_payload_data(struct key *key)
>  {
> -- 
> 1.7.6
> 

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

* Re: [PATCH] eCryptfs: fix compile error
  2011-07-29 17:09 ` Tyler Hicks
@ 2011-08-01 11:31   ` Roberto Sassu
  0 siblings, 0 replies; 3+ messages in thread
From: Roberto Sassu @ 2011-08-01 11:31 UTC (permalink / raw)
  To: Tyler Hicks; +Cc: linux-fsdevel, linux-kernel, kirkland, ecryptfs-devel, hilld

On Friday, July 29, 2011 07:09:32 PM Tyler Hicks wrote:
> On Fri Jul 29, 2011 at 06:51:04PM +0200, Roberto Sassu 
<roberto.sassu@polito.it> wrote:
> > This patch fixes the compile error reported at the address:
> > 
> > https://bugzilla.kernel.org/show_bug.cgi?id=40292
> > 
> > The problem arises when compiling eCryptfs as built-in and the
> > 'encrypted' key type as a module. The patch enables the 'encrypted' key
> > type support for eCryptfs only when both components are compiled as
> > built-in, both as modules or eCryptfs as a module and the 'encrypted'
> > key type as built-in.
> > 
> > Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
> > Reported-by: David Hill <hilld@binarystorm.net>
> > ---
> > 
> >  fs/ecryptfs/ecryptfs_kernel.h |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> > 
> > diff --git a/fs/ecryptfs/ecryptfs_kernel.h
> > b/fs/ecryptfs/ecryptfs_kernel.h index b36c557..a2da660 100644
> > --- a/fs/ecryptfs/ecryptfs_kernel.h
> > +++ b/fs/ecryptfs/ecryptfs_kernel.h
> > @@ -79,7 +79,9 @@ struct ecryptfs_page_crypt_context {
> > 
> >  	} param;
> >  
> >  };
> > 
> > -#if defined(CONFIG_ENCRYPTED_KEYS) ||
> > defined(CONFIG_ENCRYPTED_KEYS_MODULE) +#if (defined(CONFIG_ECRYPT_FS) &&
> > defined(CONFIG_ENCRYPTED_KEYS)) || \ +	(defined(CONFIG_ECRYPT_FS_MODULE)
> > && \
> > +	(defined(CONFIG_ENCRYPTED_KEYS) ||
> > defined(CONFIG_ENCRYPTED_KEYS_MODULE)))
> 
> Thanks for the patch, Roberto.
> 
> Shouldn't this be handled in the Kconfig? It seems like it would be
> better to force the encrypted key type to be built-in if eCryptfs is
> configured to be built-in.
> 
> With this patch, a user could have CONFIG_ENCRYPTED_KEYS=m and
> CONFIG_ECRYPT_FS=y, but still hit potentially confusing error conditions
> when trying to use encrypted key support with eCryptfs.
> 

Hi Tyler

thanks for comments. I'm posting the new version
of the patch which modifies only the Kconfig file of
eCryptfs.

Roberto Sassu


> Tyler
> 
> >  static inline struct ecryptfs_auth_tok *
> >  ecryptfs_get_encrypted_key_payload_data(struct key *key)
> >  {

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

end of thread, other threads:[~2011-08-01 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-29 16:51 [PATCH] eCryptfs: fix compile error Roberto Sassu
2011-07-29 17:09 ` Tyler Hicks
2011-08-01 11:31   ` Roberto Sassu

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