The EINTR is not passed up, and leaves bad data in the cache as if
ecryptfs thought the files were not encrypted.  This is what causes the
short writes.  Getting an strace is quite difficult, but this time I
succeeded:

lstat("include/asm-ia64/ia64_int.h", {st_mode=S_IFREG|0664, st_size=12288, 
...}) = 0
lstat("include/asm-ia64/init.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0
lstat("include/asm-ia64/init.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0
lstat("include/asm-ia64/iocap.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0
lstat("include/asm-ia64/iocap.h", {st_mode=S_IFREG|0664, st_size=12288, ...}) = 0
lstat("include/asm-ia64/linux-null/README.origin", {st_mode=S_IFREG|0664, 
st_size=12288, ...}) = 0
lstat("include/asm-ia64/linux-null/README.origin", {st_mode=S_IFREG|0664, 
st_size=12288, ...}) = 0
lstat("include/asm-ia64/ia64_int.h", {st_mode=S_IFREG|0664, st_size=12288, 
...}) = 0
open("include/asm-ia64/ia64_int.h", O_RDONLY) = 3
read(3, "#ifndef _ASM_IA64_INT_H\n#define "..., 12288) = 2139
read(3, "", 10149)                      = 0

$ uname -a
Linux yakj.usersys.redhat.com 3.1.0-7.fc16.x86_64 #1 SMP Tue Nov 1 21:10:48 UTC 
2011 x86_64 x86_64 x86_64 GNU/Linux

$ dmesg | tail -4
[162849.845909] ecryptfs_decrypt_page: Error attempting to read lower page; rc 
= [-4]
[162849.845913] ecryptfs_readpage: Error decrypting page; rc = [-4]
[162849.845923] ecryptfs_decrypt_page: Error attempting to read lower page; rc 
= [-4]
[162849.845925] ecryptfs_readpage: Error decrypting page; rc = [-4]

-4 being EINTR.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/509180

Title:
  ecryptfs sometimes seems to add trailing garbage to encrypted files

To manage notifications about this bug go to:
https://bugs.launchpad.net/ecryptfs/+bug/509180/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to