<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs, branch v3.3</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=v3.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-02-29T00:55:30Z</updated>
<entry>
<title>ecryptfs: fix printk format warning for size_t</title>
<updated>2012-02-29T00:55:30Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2012-02-29T00:31:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=164974a8f2a482f1abcb027c6d1a89dd79b14297'/>
<id>urn:sha1:164974a8f2a482f1abcb027c6d1a89dd79b14297</id>
<content type='text'>
Fix printk format warning (from Linus's suggestion):

on i386:
  fs/ecryptfs/miscdev.c:433:38: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int'

and on x86_64:
  fs/ecryptfs/miscdev.c:433:38: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'long unsigned int'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc:	Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc:	Tyler Hicks &lt;tyhicks@canonical.com&gt;
Cc:	Dustin Kirkland &lt;dustin.kirkland@gazzang.com&gt;
Cc:	ecryptfs@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ecryptfs: remove the second argument of k[un]map_atomic()</title>
<updated>2012-02-16T22:06:27Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2012-02-10T05:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=465c9343c5b746ec2325a220fa3e50cc647d2db7'/>
<id>urn:sha1:465c9343c5b746ec2325a220fa3e50cc647d2db7</id>
<content type='text'>
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Copy up lower inode attrs after setting lower xattr</title>
<updated>2012-02-16T22:06:27Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-02-07T23:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=545d680938be1e86a6c5250701ce9abaf360c495'/>
<id>urn:sha1:545d680938be1e86a6c5250701ce9abaf360c495</id>
<content type='text'>
After passing through a -&gt;setxattr() call, eCryptfs needs to copy the
inode attributes from the lower inode to the eCryptfs inode, as they
may have changed in the lower filesystem's -&gt;setxattr() path.

One example is if an extended attribute containing a POSIX Access
Control List is being set. The new ACL may cause the lower filesystem to
modify the mode of the lower inode and the eCryptfs inode would need to
be updated to reflect the new mode.

https://launchpad.net/bugs/926292

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Reported-by: Sebastien Bacher &lt;seb128@ubuntu.com&gt;
Cc: John Johansen &lt;john.johansen@canonical.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Improve statfs reporting</title>
<updated>2012-02-16T22:06:21Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2011-11-05T17:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a26620df451ad46151ad21d711ed43e963c004e'/>
<id>urn:sha1:4a26620df451ad46151ad21d711ed43e963c004e</id>
<content type='text'>
statfs() calls on eCryptfs files returned the wrong filesystem type and,
when using filename encryption, the wrong maximum filename length.

If mount-wide filename encryption is enabled, the cipher block size and
the lower filesystem's max filename length will determine the max
eCryptfs filename length. Pre-tested, known good lengths are used when
the lower filesystem's namelen is 255 and a cipher with 8 or 16 byte
block sizes is used. In other, less common cases, we fall back to a safe
rounded-down estimate when determining the eCryptfs namelen.

https://launchpad.net/bugs/885744

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Reported-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: move misleading function comments</title>
<updated>2012-01-25T23:10:53Z</updated>
<author>
<name>Li Wang</name>
<email>liwang@nudt.edu.cn</email>
</author>
<published>2012-01-25T07:40:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1589cb1a94c381579a0235ca708d9e2dca6d3a39'/>
<id>urn:sha1:1589cb1a94c381579a0235ca708d9e2dca6d3a39</id>
<content type='text'>
 The data encryption was moved from ecryptfs_write_end into
ecryptfs_writepage, this patch moves the corresponding function
comments to be consistent with the modification.

Signed-off-by: Li Wang &lt;liwang@nudt.edu.cn&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Fix oops when printing debug info in extent crypto functions</title>
<updated>2012-01-25T20:43:42Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-01-24T16:02:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58ded24f0fcb85bddb665baba75892f6ad0f4b8a'/>
<id>urn:sha1:58ded24f0fcb85bddb665baba75892f6ad0f4b8a</id>
<content type='text'>
If pages passed to the eCryptfs extent-based crypto functions are not
mapped and the module parameter ecryptfs_verbosity=1 was specified at
loading time, a NULL pointer dereference will occur.

Note that this wouldn't happen on a production system, as you wouldn't
pass ecryptfs_verbosity=1 on a production system. It leaks private
information to the system logs and is for debugging only.

The debugging info printed in these messages is no longer very useful
and rather than doing a kmap() in these debugging paths, it will be
better to simply remove the debugging paths completely.

https://launchpad.net/bugs/913651

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Reported-by: Daniel DeFreez
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Remove unused ecryptfs_read()</title>
<updated>2012-01-25T20:43:41Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-01-18T21:09:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2cb933501ebc066bf3c4b1836fd8428f8fe9863'/>
<id>urn:sha1:f2cb933501ebc066bf3c4b1836fd8428f8fe9863</id>
<content type='text'>
ecryptfs_read() has been ifdef'ed out for years now and it was
apparently unused before then. It is time to get rid of it for good.

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Check inode changes in setattr</title>
<updated>2012-01-25T20:43:41Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-01-20T02:33:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a261a03904849c3df50bd0300efb7fb3f865137d'/>
<id>urn:sha1:a261a03904849c3df50bd0300efb7fb3f865137d</id>
<content type='text'>
Most filesystems call inode_change_ok() very early in -&gt;setattr(), but
eCryptfs didn't call it at all. It allowed the lower filesystem to make
the call in its -&gt;setattr() function. Then, eCryptfs would copy the
appropriate inode attributes from the lower inode to the eCryptfs inode.

This patch changes that and actually calls inode_change_ok() on the
eCryptfs inode, fairly early in ecryptfs_setattr(). Ideally, the call
would happen earlier in ecryptfs_setattr(), but there are some possible
inode initialization steps that must happen first.

Since the call was already being made on the lower inode, the change in
functionality should be minimal, except for the case of a file extending
truncate call. In that case, inode_newsize_ok() was never being
called on the eCryptfs inode. Rather than inode_newsize_ok() catching
maximum file size errors early on, eCryptfs would encrypt zeroed pages
and write them to the lower filesystem until the lower filesystem's
write path caught the error in generic_write_checks(). This patch
introduces a new function, called ecryptfs_inode_newsize_ok(), which
checks if the new lower file size is within the appropriate limits when
the truncate operation will be growing the lower file.

In summary this change prevents eCryptfs truncate operations (and the
resulting page encryptions), which would exceed the lower filesystem
limits or FSIZE rlimits, from ever starting.

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Reviewed-by: Li Wang &lt;liwang@nudt.edu.cn&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Make truncate path killable</title>
<updated>2012-01-25T20:43:40Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-01-19T00:30:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e6f0d769017cc49207ef56996e42363ec26c1f0'/>
<id>urn:sha1:5e6f0d769017cc49207ef56996e42363ec26c1f0</id>
<content type='text'>
ecryptfs_write() handles the truncation of eCryptfs inodes. It grabs a
page, zeroes out the appropriate portions, and then encrypts the page
before writing it to the lower filesystem. It was unkillable and due to
the lack of sparse file support could result in tying up a large portion
of system resources, while encrypting pages of zeros, with no way for
the truncate operation to be stopped from userspace.

This patch adds the ability for ecryptfs_write() to detect a pending
fatal signal and return as gracefully as possible. The intent is to
leave the lower file in a useable state, while still allowing a user to
break out of the encryption loop. If a pending fatal signal is detected,
the eCryptfs inode size is updated to reflect the modified inode size
and then -EINTR is returned.

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Infinite loop due to overflow in ecryptfs_write()</title>
<updated>2012-01-25T20:43:40Z</updated>
<author>
<name>Li Wang</name>
<email>liwang@nudt.edu.cn</email>
</author>
<published>2012-01-19T01:44:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=684a3ff7e69acc7c678d1a1394fe9e757993fd34'/>
<id>urn:sha1:684a3ff7e69acc7c678d1a1394fe9e757993fd34</id>
<content type='text'>
ecryptfs_write() can enter an infinite loop when truncating a file to a
size larger than 4G. This only happens on architectures where size_t is
represented by 32 bits.

This was caused by a size_t overflow due to it incorrectly being used to
store the result of a calculation which uses potentially large values of
type loff_t.

[tyhicks@canonical.com: rewrite subject and commit message]
Signed-off-by: Li Wang &lt;liwang@nudt.edu.cn&gt;
Signed-off-by: Yunchuan Wen &lt;wenyunchuan@kylinos.com.cn&gt;
Reviewed-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
</feed>
