View Issue Details

IDProjectCategoryView StatusLast Update
0001027channel: elrepo/el7kmod-ecryptfspublic2020-07-29 10:10
Reporterjcpunk Assigned Totoracat  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Summary0001027: [RFE] ecryptfs.ko for EL7
DescriptionTurns out my ecryptfs EL7 systems are running ElRepo Kernel-LT[1].

Can the kmod be built for EL7? It requires a minor patch (see Additional Information) to build.

The ecryptfs-utils user space packages are already in EPEL7, so I'd not bother duplicating the effort on the ELRepo side.

[1]
Good job on that by the way, I've been installing nightly updates on this host with kernel-lt for about 3 years now and it has been so reliable I forgot that it wasn't the official kernel.
Additional Informationindex 7c8fe77..f6a055f 100644
--- a/ecryptfs/main.c
+++ b/ecryptfs/main.c
@@ -501,6 +501,9 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
        uid_t check_ruid;
        int rc;
 
+ /* patch to build on EL7 */
+ int *s_stack_depth;
+
        sbi = kmem_cache_zalloc(ecryptfs_sb_info_cache, GFP_KERNEL);
        if (!sbi) {
                rc = -ENOMEM;
@@ -567,10 +570,14 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
        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;
+ /* patch to build on EL7 */
+ /* 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) {
+ /* patch to build on EL7 */
+ /* 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;
        }
TagsNo tags attached.
Reported upstream

Activities

toracat

2020-07-28 12:11

administrator   ~0007100

Thanks for the patch. Thanks also for being a good customer of kernel-lt. :)

toracat

2020-07-28 16:14

administrator   ~0007101

Turns out this patch has already been applied to the kmod-ecryptfs package for el7. This and couple other patches were used to build the centosplus kernel that has ecryptfs enabled. The details are in this CentOS bug report:

https://bugs.centos.org/view.php?id=7369

All patches were used to build kmod-ecryptfs for el7.

toracat

2020-07-28 16:21

administrator   ~0007102

See also https://elrepo.org/bugs/view.php?id=674 ;-)

jcpunk

2020-07-29 07:04

reporter   ~0007104

Excellent :)

I'm not sure how my 'yum install kmod-ecryptfs' wasn't showing this package before, but it does now....

I'd say this is very free to close.

Issue History

Date Modified Username Field Change
2020-07-28 10:13 jcpunk New Issue
2020-07-28 10:13 jcpunk Status new => assigned
2020-07-28 10:13 jcpunk Assigned To => toracat
2020-07-28 12:11 toracat Note Added: 0007100
2020-07-28 16:14 toracat Note Added: 0007101
2020-07-28 16:21 toracat Note Added: 0007102
2020-07-28 16:30 toracat Category --elrepo--request-for-enhancement-- => kmod-ecryptfs
2020-07-29 07:04 jcpunk Note Added: 0007104
2020-07-29 10:10 toracat Status assigned => resolved
2020-07-29 10:10 toracat Resolution open => fixed