<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs/ecryptfs/read_write.c, branch stable/3.4.y</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F3.4.y</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F3.4.y'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-02-16T22:06:27Z</updated>
<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.stealer.net/cgit.cgi/user/sven/linux.git/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: 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.stealer.net/cgit.cgi/user/sven/linux.git/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: 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.stealer.net/cgit.cgi/user/sven/linux.git/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.stealer.net/cgit.cgi/user/sven/linux.git/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>
<entry>
<title>eCryptfs: Return error when lower file pointer is NULL</title>
<updated>2011-08-09T18:42:45Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-08-05T03:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f61500e000eedc0c7a0201200a7f00ba5529c002'/>
<id>urn:sha1:f61500e000eedc0c7a0201200a7f00ba5529c002</id>
<content type='text'>
When an eCryptfs inode's lower file has been closed, and the pointer has
been set to NULL, return an error when trying to do a lower read or
write rather than calling BUG().

https://bugzilla.kernel.org/show_bug.cgi?id=37292

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Cc: &lt;stable@kernel.org&gt;
</content>
</entry>
<entry>
<title>ecryptfs: modify write path to encrypt page in writepage</title>
<updated>2011-03-28T06:47:45Z</updated>
<author>
<name>Thieu Le</name>
<email>thieule@chromium.org</email>
</author>
<published>2011-03-09T00:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=57db4e8d73ef2b5e94a3f412108dff2576670a8a'/>
<id>urn:sha1:57db4e8d73ef2b5e94a3f412108dff2576670a8a</id>
<content type='text'>
Change the write path to encrypt the data only when the page is written to
disk in ecryptfs_writepage. Previously, ecryptfs encrypts the page in
ecryptfs_write_end which means that if there are multiple write requests to
the same page, ecryptfs ends up re-encrypting that page over and over again.
This patch minimizes the number of encryptions needed.

Signed-off-by: Thieu Le &lt;thieule@chromium.org&gt;
[tyhicks: Changed NULL .drop_inode sop pointer to generic_drop_inode]
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>switch ecryptfs_write() to struct inode *, kill on-stack fake files</title>
<updated>2010-05-21T22:31:28Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-05-21T15:09:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=48c1e44aceca577aa35be509714bd9ec4b4c3837'/>
<id>urn:sha1:48c1e44aceca577aa35be509714bd9ec4b4c3837</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>switch ecryptfs_get_locked_page() to struct inode *</title>
<updated>2010-05-21T22:31:28Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2010-05-21T15:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=02bd97997a07a89cb9311c7f00864cfc785c37f9'/>
<id>urn:sha1:02bd97997a07a89cb9311c7f00864cfc785c37f9</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&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.stealer.net/cgit.cgi/user/sven/linux.git/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: Fix data corruption when using ecryptfs_passthrough</title>
<updated>2009-04-22T08:54:13Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-04-13T20:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=13a791b4e63eb0537a7f804a340d6527485983b4'/>
<id>urn:sha1:13a791b4e63eb0537a7f804a340d6527485983b4</id>
<content type='text'>
ecryptfs_passthrough is a mount option that allows eCryptfs to allow
data to be written to non-eCryptfs files in the lower filesystem.  The
passthrough option was causing data corruption due to it not always
being treated as a non-eCryptfs file.

The first 8 bytes of an eCryptfs file contains the decrypted file size.
This value was being written to the non-eCryptfs files, too.  Also,
extra 0x00 characters were being written to make the file size a
multiple of PAGE_CACHE_SIZE.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
</feed>
