<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs/ecryptfs_kernel.h, branch v3.0.36</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/ecryptfs/ecryptfs_kernel.h?h=v3.0.36</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/ecryptfs/ecryptfs_kernel.h?h=v3.0.36'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-05-29T19:24:25Z</updated>
<entry>
<title>eCryptfs: Remove ecryptfs_header_cache_2</title>
<updated>2011-05-29T19:24:25Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-05-24T10:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3063287053bca5207e121c567b95b2b6f0bdc2c8'/>
<id>urn:sha1:3063287053bca5207e121c567b95b2b6f0bdc2c8</id>
<content type='text'>
Now that ecryptfs_lookup_interpose() is no longer using
ecryptfs_header_cache_2 to read in metadata, the kmem_cache can be
removed and the ecryptfs_header_cache_1 kmem_cache can be renamed to
ecryptfs_header_cache.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()</title>
<updated>2011-05-29T19:24:24Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-05-24T09:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=778aeb42a708d2a57e491d2cbb5a1e74f61270b9'/>
<id>urn:sha1:778aeb42a708d2a57e491d2cbb5a1e74f61270b9</id>
<content type='text'>
ecryptfs_lookup_interpose() has turned into spaghetti code over the
years. This is an effort to clean it up.

 - Shorten overly descriptive variable names such as ecryptfs_dentry
 - Simplify gotos and error paths
 - Create helper function for reading plaintext i_size from metadata

It also includes an optimization when reading i_size from the metadata.
A complete page-sized kmem_cache_alloc() was being done to read in 16
bytes of metadata. The buffer for that is now statically declared.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Fix new inode race condition</title>
<updated>2011-05-29T19:23:39Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-05-24T08:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b06b3ebf44170c90c893c6c80916db6e922b9f2'/>
<id>urn:sha1:3b06b3ebf44170c90c893c6c80916db6e922b9f2</id>
<content type='text'>
Only unlock and d_add() new inodes after the plaintext inode size has
been read from the lower filesystem. This fixes a race condition that
was sometimes seen during a multi-job kernel build in an eCryptfs mount.

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

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Reported-by: David &lt;david@unsolicited.net&gt;
Tested-by: David &lt;david@unsolicited.net&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Cleanup inode initialization code</title>
<updated>2011-05-29T17:51:17Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-05-24T07:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5ccf92037c7c6e6f28175fd245284923f939259f'/>
<id>urn:sha1:5ccf92037c7c6e6f28175fd245284923f939259f</id>
<content type='text'>
The eCryptfs inode get, initialization, and dentry interposition code
has two separate paths. One is for when dentry interposition is needed
after doing things like a mkdir in the lower filesystem and the other
is needed after a lookup. Unlocking new inodes and doing a d_add() needs
to happen at different times, depending on which type of dentry
interposing is being done.

This patch cleans up the inode get and initialization code paths and
splits them up so that the locking and d_add() differences mentioned
above can be handled appropriately in a later patch.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Tested-by: David &lt;david@unsolicited.net&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Consolidate inode functions into inode.c</title>
<updated>2011-05-29T17:49:53Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-05-24T02:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c4f790736ca8d7d86883c5aee2ba1caa15cd8da3'/>
<id>urn:sha1:c4f790736ca8d7d86883c5aee2ba1caa15cd8da3</id>
<content type='text'>
These functions should live in inode.c since their focus is on inodes
and they're primarily used by functions in inode.c.

Also does a simple cleanup of ecryptfs_inode_test() and rolls
ecryptfs_init_inode() into ecryptfs_inode_set().

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
Tested-by: David &lt;david@unsolicited.net&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Handle failed metadata read in lookup</title>
<updated>2011-04-25T23:45:06Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-03-15T19:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3aeb86ea4cd15f728147a3bd5469a205ada8c767'/>
<id>urn:sha1:3aeb86ea4cd15f728147a3bd5469a205ada8c767</id>
<content type='text'>
When failing to read the lower file's crypto metadata during a lookup,
eCryptfs must continue on without throwing an error. For example, there
may be a plaintext file in the lower mount point that the user wants to
delete through the eCryptfs mount.

If an error is encountered while reading the metadata in lookup(), the
eCryptfs inode's size could be incorrect. We must be sure to reread the
plaintext inode size from the metadata when performing an open() or
setattr(). The metadata is already being read in those paths, so this
adds minimal performance overhead.

This patch introduces a flag which will track whether or not the
plaintext inode size has been read so that an incorrect i_size can be
fixed in the open() or setattr() paths.

https://bugs.launchpad.net/bugs/509180

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Add reference counting to lower files</title>
<updated>2011-04-25T23:32:37Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2011-04-14T20:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=332ab16f830f59e7621ae8eb2c353dc135a316f6'/>
<id>urn:sha1:332ab16f830f59e7621ae8eb2c353dc135a316f6</id>
<content type='text'>
For any given lower inode, eCryptfs keeps only one lower file open and
multiplexes all eCryptfs file operations through that lower file. The
lower file was considered "persistent" and stayed open from the first
lookup through the lifetime of the inode.

This patch keeps the notion of a single, per-inode lower file, but adds
reference counting around the lower file so that it is closed when not
currently in use. If the reference count is at 0 when an operation (such
as open, create, etc.) needs to use the lower file, a new lower file is
opened. Since the file is no longer persistent, all references to the
term persistent file are changed to lower file.

Locking is added around the sections of code that opens the lower file
and assign the pointer in the inode info, as well as the code the fputs
the lower file when all eCryptfs users are done with it.

This patch is needed to fix issues, when mounted on top of the NFSv3
client, where the lower file is left silly renamed until the eCryptfs
inode is destroyed.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: verify authentication tokens before their use</title>
<updated>2011-03-28T06:49:41Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2011-03-21T15:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0e1fc5ef470cc1d157005c437a434868d59fead4'/>
<id>urn:sha1:0e1fc5ef470cc1d157005c437a434868d59fead4</id>
<content type='text'>
Authentication tokens content may change if another requestor calls the
update() method of the corresponding key. The new function
ecryptfs_verify_auth_tok_from_key() retrieves the authentication token from
the provided key and verifies if it is still valid before being used to
encrypt or decrypt an eCryptfs file.

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
[tyhicks: Minor formatting changes]
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: modified size of keysig in the ecryptfs_key_sig structure</title>
<updated>2011-03-28T06:49:40Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2011-03-21T15:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7762e230fd31fcc1abc03ba32ee957fadc8eafb4'/>
<id>urn:sha1:7762e230fd31fcc1abc03ba32ee957fadc8eafb4</id>
<content type='text'>
The size of the 'keysig' array is incremented of one byte in order to make
room for the NULL character. The 'keysig' variable is used, in the function
ecryptfs_generate_key_packet_set(), to find an authentication token with
the given signature and is printed a debug message if it cannot be
retrieved.

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: removed num_global_auth_toks from ecryptfs_mount_crypt_stat</title>
<updated>2011-03-28T06:49:39Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2011-03-21T15:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf35ca69131d5fc8febb74629d173e0731bf49c0'/>
<id>urn:sha1:cf35ca69131d5fc8febb74629d173e0731bf49c0</id>
<content type='text'>
This patch removes the 'num_global_auth_toks' field of the
ecryptfs_mount_crypt_stat structure, used to count the number of items in
the 'global_auth_tok_list' list. This variable is not needed because there
are no checks based upon it.

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