Skip to contentSkip to conversation

Can't list directories with kernel 4.4.14 and ecryptfs

DISCUSSION Henry Jensen 3 participants 11 messages Jun 27, 2016 – Jul 1, 2016 Ecrypt file system

lore
Share & tools
lore
#0 lore raw

Greetings,

I'm using ecryptfs with Slackware current and kernel 4.4.14. In kernel 4.4.14 was a patch introduced which make it impossilble to list the contents of a directory.[0]

The mount itself works, but listing a directory results in an error "wrong medium type". Showing the contents and the file itself (presumed the name of the file is known) works.

Example:

henry@subnote:~$ ecryptfs-mount-private 
henry@subnote:~$ echo "foo bar" >Private/foobar
henry@subnote:~$ ls -l Private/foobar
-rw-r--r-- 1 henry users 8 Jun 27 18:13 Private/foobar
henry@subnote:~$ cat Private/foobar
foo bar
henry@subnote:~$ ls Private/
ls: cannot open directory 'Private/': Wrong medium type
henry@subnote:~$ cat Private/foo*  
cat: 'Private/foo*': No such file or directory
henry@subnote:~$ ls .Private/      
ECRYPTFS_FNEK_ENCRYPTED.FWZL6yY3cgf9JkRRDnGzSkFOIUQir-xo2KY6u52Ft53bpb4SnqMhgeIIl---

Output of dmesg:

[  946.181961] Error opening lower file for lower_dentry [0xffff88008d532180] and lower_mnt [0xffff8800bbf90f20]; rc = [-124]
[  946.181973] ecryptfs_open: Error attempting to initialize the lower file for the dentry with name [/]; rc = [-124]

See also [1]
[0] https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.14
[1] http://www.linuxquestions.org/questions/slackware-14/can%27t-access-ecryptfs-with-kernel-4-4-14-a-4175583163/

Regards,
Henry

#1 lore raw
Quoted 9 lines · Henry Jensen

Greetings,

I'm using ecryptfs with Slackware current and kernel 4.4.14. In kernel 4.4.14 was a patch introduced which make it impossilble to list the contents of a directory.[0]

The mount itself works, but listing a directory results in an error "wrong medium type". Showing the contents and the file itself (presumed the name of the file is known) works.

Hi Henry - sorry for the trouble. What filesystem are you mounting eCryptfs on top of?

Tyler

Quoted 35 lines

Example:

henry@subnote:~$ ecryptfs-mount-private 
henry@subnote:~$ echo "foo bar" >Private/foobar
henry@subnote:~$ ls -l Private/foobar
-rw-r--r-- 1 henry users 8 Jun 27 18:13 Private/foobar
henry@subnote:~$ cat Private/foobar
foo bar
henry@subnote:~$ ls Private/
ls: cannot open directory 'Private/': Wrong medium type
henry@subnote:~$ cat Private/foo*  
cat: 'Private/foo*': No such file or directory
henry@subnote:~$ ls .Private/      
ECRYPTFS_FNEK_ENCRYPTED.FWZL6yY3cgf9JkRRDnGzSkFOIUQir-xo2KY6u52Ft53bpb4SnqMhgeIIl---

Output of dmesg:

[  946.181961] Error opening lower file for lower_dentry [0xffff88008d532180] and lower_mnt [0xffff8800bbf90f20]; rc = [-124]
[  946.181973] ecryptfs_open: Error attempting to initialize the lower file for the dentry with name [/]; rc = [-124]

See also [1]
[0] https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.14
[1] http://www.linuxquestions.org/questions/slackware-14/can%27t-access-ecryptfs-with-kernel-4-4-14-a-4175583163/

Regards,
Henry
--
To unsubscribe from this list: send the line "unsubscribe ecryptfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi Tyler,

Am 27. Juni 2016 21:19:08 MESZ, schrieb Tyler Hicks <[email protected]>:

Quoted 8 lines · Henry Jensen
Quoted 3 lines

Greetings,

I'm using ecryptfs with Slackware current and kernel 4.4.14. In

kernel

Quoted 3 lines

4.4.14 was a patch introduced which make it impossilble to list the contents of a directory.[0]

Quoted 7 lines
Quoted 2 lines

The mount itself works, but listing a directory results in an error "wrong medium type". Showing the contents and the file itself

(presumed

Quoted 1 line

the name of the file is known) works.

Hi Henry - sorry for the trouble. What filesystem are you mounting eCryptfs on top of?

I use ext4. With 'ecryptfs-mount-private' $HOME/.Private is mounted on $HOME/Private.

ecryptfs worked perfectly until I upgraded to kernel 4.4.14. I tested it on another machine with Slackware64 and a 64bit kernel now - same result.

Regards,
Henry

#3 lore raw
Quoted 16 lines · Henry Jensen

Hi Tyler,

Am 27. Juni 2016 21:19:08 MESZ, schrieb Tyler Hicks <[email protected]>:

Quoted 13 lines · Henry Jensen
Quoted 3 lines

Greetings,

I'm using ecryptfs with Slackware current and kernel 4.4.14. In

kernel

Quoted 5 lines

4.4.14 was a patch introduced which make it impossilble to list the contents of a directory.[0]

The mount itself works, but listing a directory results in an error "wrong medium type". Showing the contents and the file itself

(presumed

Quoted 1 line

the name of the file is known) works.

Quoted 7 lines
Quoted 2 lines

Hi Henry - sorry for the trouble. What filesystem are you mounting eCryptfs on top of?

I use ext4. With 'ecryptfs-mount-private' $HOME/.Private is mounted on $HOME/Private.

ecryptfs worked perfectly until I upgraded to kernel 4.4.14. I tested it on another machine with Slackware64 and a 64bit kernel now - same result.

Thanks. The backported version of the patch needs to be adjusted. I'll try to get a patch out the stable list tomorrow.

Tyler

Quoted 9 lines

Regards,
Henry

--
To unsubscribe from this list: send the line "unsubscribe ecryptfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 21 lines · Tyler Hicks
Quoted 20 lines · Henry Jensen

Hi Tyler,

Am 27. Juni 2016 21:19:08 MESZ, schrieb Tyler Hicks <[email protected]>:

Quoted 15 lines · Henry Jensen
Quoted 3 lines

Greetings,

I'm using ecryptfs with Slackware current and kernel 4.4.14. In

kernel

Quoted 5 lines

4.4.14 was a patch introduced which make it impossilble to list the contents of a directory.[0]

The mount itself works, but listing a directory results in an error "wrong medium type". Showing the contents and the file itself

(presumed

Quoted 1 line

the name of the file is known) works.

Hi Henry - sorry for the trouble. What filesystem are you mounting eCryptfs on top of?

Quoted 6 lines
Quoted 3 lines

I use ext4. With 'ecryptfs-mount-private' $HOME/.Private is mounted on $HOME/Private.

ecryptfs worked perfectly until I upgraded to kernel 4.4.14. I tested it on another machine with Slackware64 and a 64bit kernel now - same result.

Thanks. The backported version of the patch needs to be adjusted. I'll try to get a patch out the stable list tomorrow.

I've sent a fix to the stable list (and cc'ed the ecryptfs list). I tested on 4.4.y and 3.18.y on ext{2,3,4}, btrfs, and xfs. It should fix the regression that you hit.

Tyler

Quoted 14 lines

Tyler

Quoted 9 lines

Regards,
Henry

--
To unsubscribe from this list: send the line "unsubscribe ecryptfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

Hello Tyler

Quoted 6 lines · On Tue, 28 Jun 2016 23:36:23 -0500 Tyler Hicks <[email protected]> wrote:
Quoted 2 lines

Thanks. The backported version of the patch needs to be adjusted. I'll try to get a patch out the stable list tomorrow.

I've sent a fix to the stable list (and cc'ed the ecryptfs list). I tested on 4.4.y and 3.18.y on ext{2,3,4}, btrfs, and xfs. It should fix the regression that you hit.

Sorry, the patch did not work for me. I am still getting error "Wrong medium type" wwhen accessing directories.

Regards,

Henry

#6 lore raw
Quoted 8 lines · Henry Jensen

Hello Tyler

Quoted 3 lines · On Tue, 28 Jun 2016 23:36:23 -0500 Tyler Hicks <[email protected]> wrote:
Quoted 2 lines

Thanks. The backported version of the patch needs to be adjusted. I'll try to get a patch out the stable list tomorrow.

Quoted 8 lines
Quoted 3 lines

I've sent a fix to the stable list (and cc'ed the ecryptfs list). I tested on 4.4.y and 3.18.y on ext{2,3,4}, btrfs, and xfs. It should fix the regression that you hit.

Sorry, the patch did not work for me. I am still getting error "Wrong medium type" wwhen accessing directories.

Hi Henry - Can you please double check that you're running the patched kernel? I only ask that because I have a pretty high degree of confidence that the patch fixes the issue due to the amount of testing that I performed. I'm in the middle of rebuilding the linux-stable 4.4.y kernel with that patch applied on top to retest. If you could double check your environment in the meantime, I'd appreciate it.

If it turns out that you're still hitting the bug, I'll need reproducer instructions as my tests don't seem to be sufficient. Thank you!

Tyler

Quoted 5 lines

Regards,

Henry

#7 lore raw

Hi Tyler,

hold on, I think I ran into the same issue as the guys from Manjaro, see

https://forum.manjaro.org/t/kenel-4-4-14-lts-has-issues-with-ecryptfs-on-testing-29-june-2016/5001/9

and

https://github.com/manjaro/packages-core/commit/ff5431986233877dba816e77debe0bf1eacf6628

tl;dr - the patch was malformed. Will check again with correct formatted patch.

Regards,

Henry

Am 1. Juli 2016 23:06:56 MESZ, schrieb Tyler Hicks <[email protected]>:

Quoted 38 lines · Henry Jensen
Quoted 6 lines

Hello Tyler

Quoted 1 line · On Tue, 28 Jun 2016 23:36:23 -0500 Tyler Hicks <[email protected]> wrote:
Quoted 1 line

Thanks. The backported version of the patch needs to be adjusted.

I'll

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

try to get a patch out the stable list tomorrow.

I've sent a fix to the stable list (and cc'ed the ecryptfs list). I tested on 4.4.y and 3.18.y on ext{2,3,4}, btrfs, and xfs. It should

fix

Quoted 6 lines
Quoted 1 line

the regression that you hit.

Sorry, the patch did not work for me. I am still getting error "Wrong medium type" wwhen accessing directories.

Hi Henry - Can you please double check that you're running the patched kernel? I only ask that because I have a pretty high degree of confidence that the patch fixes the issue due to the amount of testing that I performed. I'm in the middle of rebuilding the linux-stable 4.4.y
kernel with that patch applied on top to retest. If you could double check your environment in the meantime, I'd appreciate it.

If it turns out that you're still hitting the bug, I'll need reproducer instructions as my tests don't seem to be sufficient. Thank you!

Tyler

Quoted 5 lines

Regards,

Henry

#8 lore raw

My automated tests all pass. I was about to move onto manual testing but I'll hold off until I hear back from you.

Tyler

Quoted 61 lines · Henry Jensen

Hi Tyler,

hold on, I think I ran into the same issue as the guys from Manjaro, see

https://forum.manjaro.org/t/kenel-4-4-14-lts-has-issues-with-ecryptfs-on-testing-29-june-2016/5001/9

and

https://github.com/manjaro/packages-core/commit/ff5431986233877dba816e77debe0bf1eacf6628

tl;dr - the patch was malformed. Will check again with correct formatted patch.

Regards,

Henry

Am 1. Juli 2016 23:06:56 MESZ, schrieb Tyler Hicks <[email protected]>:

Quoted 28 lines · Henry Jensen
Quoted 6 lines

Hello Tyler

Quoted 1 line · On Tue, 28 Jun 2016 23:36:23 -0500 Tyler Hicks <[email protected]> wrote:
Quoted 1 line

Thanks. The backported version of the patch needs to be adjusted.

I'll

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

try to get a patch out the stable list tomorrow.

I've sent a fix to the stable list (and cc'ed the ecryptfs list). I tested on 4.4.y and 3.18.y on ext{2,3,4}, btrfs, and xfs. It should

fix

Quoted 6 lines
Quoted 1 line

the regression that you hit.

Sorry, the patch did not work for me. I am still getting error "Wrong medium type" wwhen accessing directories.

Hi Henry - Can you please double check that you're running the patched kernel? I only ask that because I have a pretty high degree of confidence that the patch fixes the issue due to the amount of testing that I performed. I'm in the middle of rebuilding the linux-stable 4.4.y
kernel with that patch applied on top to retest. If you could double check your environment in the meantime, I'd appreciate it.

Quoted 10 lines

If it turns out that you're still hitting the bug, I'll need reproducer instructions as my tests don't seem to be sufficient. Thank you!

Tyler

Quoted 5 lines

Regards,

Henry

--
To unsubscribe from this list: send the line "unsubscribe ecryptfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw
In reply to Henry Jensen

Hello,

I confirmed it - for some reason the patch I used and was distributed by Slackware and Manjaro was malformatted (@@ was transformed into <at> <at>). I applied the corrected patch and it worked - ecryptfs is working normally again, as expected.

Regards,

Henry

Quoted 55 lines · On Fri, 01 Jul 2016 23:16:46 +0200 Henry Jensen <[email protected]> wrote:

Hi Tyler,

hold on, I think I ran into the same issue as the guys from Manjaro, see

https://forum.manjaro.org/t/kenel-4-4-14-lts-has-issues-with-ecryptfs-on-testing-29-june-2016/5001/9

and

https://github.com/manjaro/packages-core/commit/ff5431986233877dba816e77debe0bf1eacf6628

tl;dr - the patch was malformed. Will check again with correct formatted patch.

Regards,

Henry

Am 1. Juli 2016 23:06:56 MESZ, schrieb Tyler Hicks <[email protected]>:

Quoted 38 lines · Henry Jensen
Quoted 6 lines

Hello Tyler

Quoted 1 line · On Tue, 28 Jun 2016 23:36:23 -0500 Tyler Hicks <[email protected]> wrote:
Quoted 1 line

Thanks. The backported version of the patch needs to be adjusted.

I'll

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

try to get a patch out the stable list tomorrow.

I've sent a fix to the stable list (and cc'ed the ecryptfs list). I tested on 4.4.y and 3.18.y on ext{2,3,4}, btrfs, and xfs. It should

fix

Quoted 6 lines
Quoted 1 line

the regression that you hit.

Sorry, the patch did not work for me. I am still getting error "Wrong medium type" wwhen accessing directories.

Hi Henry - Can you please double check that you're running the patched kernel? I only ask that because I have a pretty high degree of confidence that the patch fixes the issue due to the amount of testing that I performed. I'm in the middle of rebuilding the linux-stable 4.4.y
kernel with that patch applied on top to retest. If you could double check your environment in the meantime, I'd appreciate it.

If it turns out that you're still hitting the bug, I'll need reproducer instructions as my tests don't seem to be sufficient. Thank you!

Tyler

Quoted 5 lines

Regards,

Henry

#10 lore raw
In reply to Henry Jensen

I'm using BTRFS under, but same environment, when I upgraded to 4.4.14, ecryptfs broke with the exact same response. Running Slackware64 (-current tree)