View Issue Details

IDProjectCategoryView StatusLast Update
0007369CentOS-7CentOS-7-Pluspublic2015-10-19 00:13
Reporterensc 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version7.0-1406 
Target VersionFixed in Version 
Summary0007369: RFE: please enable ecryptfs kernel module
DescriptionRHEL7 removed support for ecryptfs. Migration guide suggests dm-crypt but this is unsuitable for many tasks which do not work with block encryption (e.g. encrypting files in the cloud, or encrypting files on NFS/CIFS shares).

Unfortunately, ecryptfs requires a kernel module which is not contained in the default and -plus kernel. So, it would be nice when the plus kernel enables this fs module.
TagsNo tags attached.
abrt_hash
URL

Activities

toracat

toracat

2014-07-13 17:01

manager   ~0020419

Last edited: 2014-07-13 17:10

View 2 revisions

I will attempt to enable it in the next kernel update:

# CONFIG_ECRYPT_FS is not set

(File systems -> Miscellaneous filesystems)

toracat

toracat

2014-07-31 11:59

manager   ~0020559

The latest kernel-plus (3.10.0-123.4.4.el7.centos.plus) has the requested feature enabled.
derkuci

derkuci

2015-07-02 20:07

reporter   ~0023557

I have the latest (3.10.0-229.7.2.el7.centos.plus) installed but don't see ecryptfs under /lib/modules/3.10.0-229.7.2.el7.centos.plus.x86_64/kernel/fs/
derkuci

derkuci

2015-07-02 20:18

reporter   ~0023558

This page (http://kozlex.blogspot.com/2015/05/building-ecryptfs-on-redhat-7_19.html) has a partial fix for the "has no member named" issues.
toracat

toracat

2015-07-02 21:33

manager   ~0023559

Thanks for reporting this. I will also look into the bug fix you have referenced.
toracat

toracat

2015-07-02 21:50

manager   ~0023560

Patch file uploaded.

--- a/fs/ecryptfs/main.c 2015-03-06 13:45:38.000000000 -0800
+++ b/fs/ecryptfs/main.c 2015-07-02 14:46:37.000000000 -0700
@@ -567,10 +567,10 @@ static struct dentry *ecryptfs_mount(str
        s->s_maxbytes = path.dentry->d_sb->s_maxbytes;
        s->s_blocksize = path.dentry->d_sb->s_blocksize;
        s->s_magic = ECRYPTFS_SUPER_MAGIC;
- s->s_stack_depth = path.dentry->d_sb->s_stack_depth + 1;
+ s_stack_depth = get_s_stack_depth(path.dentry->d_sb);

        rc = -EINVAL;
- if (s->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
+ if ( *s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
                pr_err("eCryptfs: maximum fs stacking depth exceeded\n");
                goto out_free;
        }
toracat

toracat

2015-08-06 06:04

manager  

centos-linux-3.10-fix-ecryptfs-error-bug7369.patch (1,205 bytes)
https://bugs.centos.org/view.php?id=7369
http://kozlex.blogspot.com/2015/05/building-ecryptfs-on-redhat-7_19.html

To fix ecryptfs and build it in the kernel follow is the partial fix:
This is a fix that will not be proposed to upstream cause it is not 
compatible with other kernels; instead it is a patch to make ecryptfs 
work on Rhel7 only.

--- a/fs/ecryptfs/main.c	2015-03-06 13:45:38.000000000 -0800
+++ b/fs/ecryptfs/main.c	2015-07-02 14:46:37.000000000 -0700
@@ -500,6 +500,7 @@ static struct dentry *ecryptfs_mount(str
 	struct path path;
 	uid_t check_ruid;
 	int rc;
+	int *s_stack_depth;
 
 	sbi = kmem_cache_zalloc(ecryptfs_sb_info_cache, GFP_KERNEL);
 	if (!sbi) {
@@ -567,10 +568,10 @@ static struct dentry *ecryptfs_mount(str
 	s->s_maxbytes = path.dentry->d_sb->s_maxbytes;
 	s->s_blocksize = path.dentry->d_sb->s_blocksize;
 	s->s_magic = ECRYPTFS_SUPER_MAGIC;
-	s->s_stack_depth = path.dentry->d_sb->s_stack_depth + 1;
+	s_stack_depth = get_s_stack_depth(path.dentry->d_sb);
 
 	rc = -EINVAL;
-	if (s->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
+	if ( *s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
 		pr_err("eCryptfs: maximum fs stacking depth exceeded\n");
 		goto out_free;
 	}
toracat

toracat

2015-08-06 06:06

manager   ~0023787

The actual patch uploaded: centos-linux-3.10-fix-ecryptfs-error-bug7369.patch
toracat

toracat

2015-08-06 15:48

manager   ~0023796

kernel-3.10.0-229.11.1.el7 is out. The plus kernel now has CONFIG_ECRYPT_FS enabled with the patch in this bug report.

Issue History

Date Modified Username Field Change
2014-07-13 16:45 ensc New Issue
2014-07-13 17:01 toracat Note Added: 0020419
2014-07-13 17:01 toracat Status new => assigned
2014-07-13 17:10 toracat Note Edited: 0020419 View Revisions
2014-07-31 11:59 toracat Note Added: 0020559
2015-07-02 20:07 derkuci Note Added: 0023557
2015-07-02 20:18 derkuci Note Added: 0023558
2015-07-02 21:33 toracat Note Added: 0023559
2015-07-02 21:50 toracat File Added: ecryptfs.patch
2015-07-02 21:50 toracat Note Added: 0023560
2015-08-06 06:04 toracat File Added: centos-linux-3.10-fix-ecryptfs-error-bug7369.patch
2015-08-06 06:05 toracat File Deleted: ecryptfs.patch
2015-08-06 06:06 toracat Note Added: 0023787
2015-08-06 15:48 toracat Note Added: 0023796
2015-10-19 00:13 toracat Status assigned => resolved
2015-10-19 00:13 toracat Resolution open => fixed