<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs, branch v2.6.32</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.32</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.32'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-10-08T16:31:38Z</updated>
<entry>
<title>ima: ecryptfs fix imbalance message</title>
<updated>2009-10-08T16:31:38Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2009-10-05T18:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36520be8e32b49bd85a63b7b8b40cd07c3da59a5'/>
<id>urn:sha1:36520be8e32b49bd85a63b7b8b40cd07c3da59a5</id>
<content type='text'>
The unencrypted files are being measured.  Update the counters to get
rid of the ecryptfs imbalance message. (http://bugzilla.redhat.com/519737)

Reported-by: Sachin Garg
Cc: Eric Paris &lt;eparis@redhat.com&gt;
Cc: Dustin Kirkland &lt;kirkland@canonical.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: David Safford &lt;safford@watson.ibm.com&gt;
Cc: stable@kernel.org
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Remove Kconfig NET dependency and select MD5</title>
<updated>2009-10-08T16:31:36Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-09-29T07:33:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed1f21857e76a92a006e0f890a3d7f72953b1469'/>
<id>urn:sha1:ed1f21857e76a92a006e0f890a3d7f72953b1469</id>
<content type='text'>
eCryptfs no longer uses a netlink interface to communicate with
ecryptfsd, so NET is not a valid dependency anymore.

MD5 is required and must be built for eCryptfs to be of any use.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: depends on CRYPTO</title>
<updated>2009-10-08T16:21:12Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2009-09-28T20:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=664fc5a4e7d0d7f3487e5c856b79f7dac79567fd'/>
<id>urn:sha1:664fc5a4e7d0d7f3487e5c856b79f7dac79567fd</id>
<content type='text'>
ecryptfs uses crypto APIs so it should depend on CRYPTO.
Otherwise many build errors occur. [63 lines not pasted]

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Prevent lower dentry from going negative during unlink</title>
<updated>2009-09-23T14:10:34Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-09-22T17:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c2d2056647790c5034d722bd24e9d913ebca73c'/>
<id>urn:sha1:9c2d2056647790c5034d722bd24e9d913ebca73c</id>
<content type='text'>
When calling vfs_unlink() on the lower dentry, d_delete() turns the
dentry into a negative dentry when the d_count is 1.  This eventually
caused a NULL pointer deref when a read() or write() was done and the
negative dentry's d_inode was dereferenced in
ecryptfs_read_update_atime() or ecryptfs_getxattr().

Placing mutt's tmpdir in an eCryptfs mount is what initially triggered
the oops and I was able to reproduce it with the following sequence:

open("/tmp/upper/foo", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 3
link("/tmp/upper/foo", "/tmp/upper/bar") = 0
unlink("/tmp/upper/foo")                = 0
open("/tmp/upper/bar", O_RDWR|O_CREAT|O_NOFOLLOW, 0600) = 4
unlink("/tmp/upper/bar")                = 0
write(4, "eCryptfs test\n"..., 14 &lt;unfinished ...&gt;
+++ killed by SIGKILL +++

https://bugs.launchpad.net/ecryptfs/+bug/387073

Reported-by: Loïc Minier &lt;loic.minier@canonical.com&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Dave Kleikamp &lt;shaggy@linux.vnet.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Propagate vfs_read and vfs_write return codes</title>
<updated>2009-09-23T14:10:34Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-09-17T00:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96a7b9c2f5df899f302ade45cf17ad753fe130fd'/>
<id>urn:sha1:96a7b9c2f5df899f302ade45cf17ad753fe130fd</id>
<content type='text'>
Errors returned from vfs_read() and vfs_write() calls to the lower
filesystem were being masked as -EINVAL.  This caused some confusion to
users who saw EINVAL instead of ENOSPC when the disk was full, for
instance.

Also, the actual bytes read or written were not accessible by callers to
ecryptfs_read_lower() and ecryptfs_write_lower(), which may be useful in
some cases.  This patch updates the error handling logic where those
functions are called in order to accept positive return codes indicating
success.

Cc: Eric Sandeen &lt;esandeen@redhat.com&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Validate global auth tok keys</title>
<updated>2009-09-23T14:10:32Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-08-26T06:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3891959846709a19f76628e33478cd85edb0e79f'/>
<id>urn:sha1:3891959846709a19f76628e33478cd85edb0e79f</id>
<content type='text'>
When searching through the global authentication tokens for a given key
signature, verify that a matching key has not been revoked and has not
expired.  This allows the `keyctl revoke` command to be properly used on
keys in use by eCryptfs.

Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Filename encryption only supports password auth tokens</title>
<updated>2009-09-23T14:10:32Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-08-21T09:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df6ad33ba1b9846bd5f0e2b9016c30c20bc2d948'/>
<id>urn:sha1:df6ad33ba1b9846bd5f0e2b9016c30c20bc2d948</id>
<content type='text'>
Returns -ENOTSUPP when attempting to use filename encryption with
something other than a password authentication token, such as a private
token from openssl.  Using filename encryption with a userspace eCryptfs
key module is a future goal.  Until then, this patch handles the
situation a little better than simply using a BUG_ON().

Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Check for O_RDONLY lower inodes when opening lower files</title>
<updated>2009-09-23T14:10:32Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-08-12T06:06:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac22ba23b659e34a5961aec8c945608e471b0d5b'/>
<id>urn:sha1:ac22ba23b659e34a5961aec8c945608e471b0d5b</id>
<content type='text'>
If the lower inode is read-only, don't attempt to open the lower file
read/write and don't hand off the open request to the privileged
eCryptfs kthread for opening it read/write.  Instead, only try an
unprivileged, read-only open of the file and give up if that fails.
This patch fixes an oops when eCryptfs is mounted on top of a read-only
mount.

Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Eric Sandeen &lt;esandeen@redhat.com&gt;
Cc: Dave Kleikamp &lt;shaggy@linux.vnet.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Handle unrecognized tag 3 cipher codes</title>
<updated>2009-09-23T14:10:31Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-08-11T05:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0105eaefa7cce8f4a941d0fc6354b250d30e745'/>
<id>urn:sha1:b0105eaefa7cce8f4a941d0fc6354b250d30e745</id>
<content type='text'>
Returns an error when an unrecognized cipher code is present in a tag 3
packet or an ecryptfs_crypt_stat cannot be initialized.  Also sets an
crypt_stat-&gt;tfm error pointer to NULL to ensure that it will not be
incorrectly freed in ecryptfs_destroy_crypt_stat().

Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: ecryptfs-devel@lists.launchpad.net
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: improved dependency checking and reporting</title>
<updated>2009-09-23T14:10:31Z</updated>
<author>
<name>Dave Hansen</name>
<email>dave@linux.vnet.ibm.com</email>
</author>
<published>2009-08-27T16:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=382684984e93039a3bbd83b04d341b0ceb831519'/>
<id>urn:sha1:382684984e93039a3bbd83b04d341b0ceb831519</id>
<content type='text'>
So, I compiled a 2.6.31-rc5 kernel with ecryptfs and loaded its module.
When it came time to mount my filesystem, I got this in dmesg, and it
refused to mount:

[93577.776637] Unable to allocate crypto cipher with name [aes]; rc = [-2]
[93577.783280] Error attempting to initialize key TFM cipher with name = [aes]; rc = [-2]
[93577.791183] Error attempting to initialize cipher with name = [aes] and key size = [32]; rc = [-2]
[93577.800113] Error parsing options; rc = [-22]

I figured from the error message that I'd either forgotten to load "aes"
or that my key size was bogus.  Neither one of those was the case.  In
fact, I was missing the CRYPTO_ECB config option and the 'ecb' module.
Unfortunately, there's no trace of 'ecb' in that error message.

I've done two things to fix this.  First, I've modified ecryptfs's
Kconfig entry to select CRYPTO_ECB and CRYPTO_CBC.  I also took CRYPTO
out of the dependencies since the 'select' will take care of it for us.

I've also modified the error messages to print a string that should
contain both 'ecb' and 'aes' in my error case.  That will give any
future users a chance of finding the right modules and Kconfig options.

I also wonder if we should:

	select CRYPTO_AES if !EMBEDDED

since I think most ecryptfs users are using AES like me.

Cc: ecryptfs-devel@lists.launchpad.net
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Dustin Kirkland &lt;kirkland@canonical.com&gt;
Signed-off-by: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
[tyhicks@linux.vnet.ibm.com: Removed extra newline, 80-char violation]
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
</feed>
