<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/ecryptfs/ecryptfs_kernel.h, branch v2.6.24</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ecryptfs: clean up page flag handling</title>
<updated>2007-10-16T16:43:12+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=16a72c455a67bb23eed7292a31c6ba17729e78e6'/>
<id>16a72c455a67bb23eed7292a31c6ba17729e78e6</id>
<content type='text'>
The functions that eventually call down to ecryptfs_read_lower(),
ecryptfs_decrypt_page(), and ecryptfs_copy_up_encrypted_with_header()
should have the responsibility of managing the page Uptodate
status. This patch gets rid of some of the ugliness that resulted from
trying to push some of the page flag setting too far down the stack.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The functions that eventually call down to ecryptfs_read_lower(),
ecryptfs_decrypt_page(), and ecryptfs_copy_up_encrypted_with_header()
should have the responsibility of managing the page Uptodate
status. This patch gets rid of some of the ugliness that resulted from
trying to push some of the page flag setting too far down the stack.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: remove unused functions and kmem_cache</title>
<updated>2007-10-16T16:43:12+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b6c1d8fcbadeb9bb4c3dbca57a007629d0483544'/>
<id>b6c1d8fcbadeb9bb4c3dbca57a007629d0483544</id>
<content type='text'>
The switch to read_write.c routines and the persistent file make a number of
functions unnecessary.  This patch removes them.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The switch to read_write.c routines and the persistent file make a number of
functions unnecessary.  This patch removes them.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: update metadata read/write functions</title>
<updated>2007-10-16T16:43:12+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d7cdc5febf9f2664755002c3a2f84bd348389fe9'/>
<id>d7cdc5febf9f2664755002c3a2f84bd348389fe9</id>
<content type='text'>
Update the metadata read/write functions and grow_file() to use the
read_write.c routines.  Do not open another lower file; use the persistent
lower file instead.  Provide a separate function for
crypto.c::ecryptfs_read_xattr_region() to get to the lower xattr without
having to go through the eCryptfs getxattr.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the metadata read/write functions and grow_file() to use the
read_write.c routines.  Do not open another lower file; use the persistent
lower file instead.  Provide a separate function for
crypto.c::ecryptfs_read_xattr_region() to get to the lower xattr without
having to go through the eCryptfs getxattr.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: replace encrypt, decrypt, and inode size write</title>
<updated>2007-10-16T16:43:12+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0216f7f7921759211e48e8b940eae29f0fe43902'/>
<id>0216f7f7921759211e48e8b940eae29f0fe43902</id>
<content type='text'>
Replace page encryption and decryption routines and inode size write routine
with versions that utilize the read_write.c functions.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace page encryption and decryption routines and inode size write routine
with versions that utilize the read_write.c functions.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: read_write.c routines</title>
<updated>2007-10-16T16:43:12+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=da0102a10aed2244d8fc34f289e81e502622b81e'/>
<id>da0102a10aed2244d8fc34f289e81e502622b81e</id>
<content type='text'>
Add a set of functions through which all I/O to lower files is consolidated.
This patch adds a new inode_info reference to a persistent lower file for each
eCryptfs inode; another patch later in this series will set that up.  This
persistent lower file is what the read_write.c functions use to call
vfs_read() and vfs_write() on the lower filesystem, so even when reads and
writes come in through aops-&gt;readpage and aops-&gt;writepage, we can satisfy them
without resorting to direct access to the lower inode's address space.
Several function declarations are going to be changing with this patchset.
For now, in order to keep from breaking the build, I am putting dummy
parameters in for those functions.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a set of functions through which all I/O to lower files is consolidated.
This patch adds a new inode_info reference to a persistent lower file for each
eCryptfs inode; another patch later in this series will set that up.  This
persistent lower file is what the read_write.c functions use to call
vfs_read() and vfs_write() on the lower filesystem, so even when reads and
writes come in through aops-&gt;readpage and aops-&gt;writepage, we can satisfy them
without resorting to direct access to the lower inode's address space.
Several function declarations are going to be changing with this patchset.
For now, in order to keep from breaking the build, I am putting dummy
parameters in for those functions.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: remove header_extent_size</title>
<updated>2007-10-16T16:43:12+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=45eaab79678b9e27e08f0cf250eb2df9d6a48df0'/>
<id>45eaab79678b9e27e08f0cf250eb2df9d6a48df0</id>
<content type='text'>
There is no point to keeping a separate header_extent_size and an extent_size.
 The total size of the header can always be represented as some multiple of
the regular data extent size.

[randy.dunlap@oracle.com: ecryptfs: fix printk format warning]
Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no point to keeping a separate header_extent_size and an extent_size.
 The total size of the header can always be represented as some multiple of
the regular data extent size.

[randy.dunlap@oracle.com: ecryptfs: fix printk format warning]
Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: make needlessly global symbols static</title>
<updated>2007-10-16T16:43:11+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cd9d67dfd2b4db5fdbf9dfa69e202b8571f1db20'/>
<id>cd9d67dfd2b4db5fdbf9dfa69e202b8571f1db20</id>
<content type='text'>
Andrew Morton wrote:
&gt; Please check that all the newly-added global symbols do indeed need
&gt; to be global.

Change symbols in keystore.c and crypto.o to static if they do not
need to be global.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Andrew Morton wrote:
&gt; Please check that all the newly-added global symbols do indeed need
&gt; to be global.

Change symbols in keystore.c and crypto.o to static if they do not
need to be global.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: comments for some structs</title>
<updated>2007-10-16T16:43:11+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6c6f57f3bee1e3c3d31b08a0161c435bfaeb77eb'/>
<id>6c6f57f3bee1e3c3d31b08a0161c435bfaeb77eb</id>
<content type='text'>
Andrew Morton wrote:
&gt; &gt; +struct ecryptfs_global_auth_tok {
&gt; &gt; +#define ECRYPTFS_AUTH_TOK_INVALID 0x00000001
&gt; &gt; +     u32 flags;
&gt; &gt; +     struct list_head mount_crypt_stat_list;
&gt; &gt; +     struct key *global_auth_tok_key;
&gt; &gt; +     struct ecryptfs_auth_tok *global_auth_tok;
&gt; &gt; +     unsigned char sig[ECRYPTFS_SIG_SIZE_HEX + 1];
&gt; &gt; +};
&gt; &gt; +
&gt; &gt; +struct ecryptfs_key_tfm {
&gt; &gt; +     struct crypto_blkcipher *key_tfm;
&gt; &gt; +     size_t key_size;
&gt; &gt; +     struct mutex key_tfm_mutex;
&gt; &gt; +     struct list_head key_tfm_list;
&gt; &gt; +     unsigned char cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1];
&gt; &gt; +};
&gt;
&gt; Please consider commenting your struct fields carefully: it's a
&gt; great way to help other to understand your code.

Add some comments to the ecryptfs_global_auth_tok and ecryptfs_key_tfm
structs to make their functions more easily ascertained.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Andrew Morton wrote:
&gt; &gt; +struct ecryptfs_global_auth_tok {
&gt; &gt; +#define ECRYPTFS_AUTH_TOK_INVALID 0x00000001
&gt; &gt; +     u32 flags;
&gt; &gt; +     struct list_head mount_crypt_stat_list;
&gt; &gt; +     struct key *global_auth_tok_key;
&gt; &gt; +     struct ecryptfs_auth_tok *global_auth_tok;
&gt; &gt; +     unsigned char sig[ECRYPTFS_SIG_SIZE_HEX + 1];
&gt; &gt; +};
&gt; &gt; +
&gt; &gt; +struct ecryptfs_key_tfm {
&gt; &gt; +     struct crypto_blkcipher *key_tfm;
&gt; &gt; +     size_t key_size;
&gt; &gt; +     struct mutex key_tfm_mutex;
&gt; &gt; +     struct list_head key_tfm_list;
&gt; &gt; +     unsigned char cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE + 1];
&gt; &gt; +};
&gt;
&gt; Please consider commenting your struct fields carefully: it's a
&gt; great way to help other to understand your code.

Add some comments to the ecryptfs_global_auth_tok and ecryptfs_key_tfm
structs to make their functions more easily ascertained.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: grammatical fix (destruct to destroy)</title>
<updated>2007-10-16T16:43:11+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:28:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fcd12835666b059b95613778819eb3ae9bc73642'/>
<id>fcd12835666b059b95613778819eb3ae9bc73642</id>
<content type='text'>
Andrew Morton wrote:
&gt; &gt; +int ecryptfs_destruct_crypto(void)
&gt;
&gt; ecryptfs_destroy_crypto would be more grammatically correct ;)

Grammatical fix for some function names.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Andrew Morton wrote:
&gt; &gt; +int ecryptfs_destruct_crypto(void)
&gt;
&gt; ecryptfs_destroy_crypto would be more grammatically correct ;)

Grammatical fix for some function names.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: add key list structure; search keyring</title>
<updated>2007-10-16T16:43:10+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2007-10-16T08:27:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f4aad16adfb8f0a2d666fdf8af4bd0dff2ce75e4'/>
<id>f4aad16adfb8f0a2d666fdf8af4bd0dff2ce75e4</id>
<content type='text'>
Add support structures for handling multiple keys.  The list in crypt_stat
contains the key identifiers for all of the keys that should be used for
encrypting each file's File Encryption Key (FEK).  For now, each inode
inherits this list from the mount-wide crypt_stat struct, via the
ecryptfs_copy_mount_wide_sigs_to_inode_sigs() function.

This patch also removes the global key tfm from the mount-wide crypt_stat
struct, instead keeping a list of tfm's meant for dealing with the various
inode FEK's.  eCryptfs will now search the user's keyring for FEK's parsed
from the existing file metadata, so the user can make keys available at any
time before or after mounting.

Now that multiple FEK packets can be written to the file metadata, we need to
be more meticulous about size limits.  The updates to the code for writing out
packets to the file metadata makes sizes and limits more explicit, uniformly
expressed, and (hopefully) easier to follow.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: "Serge E. Hallyn" &lt;serge@hallyn.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support structures for handling multiple keys.  The list in crypt_stat
contains the key identifiers for all of the keys that should be used for
encrypting each file's File Encryption Key (FEK).  For now, each inode
inherits this list from the mount-wide crypt_stat struct, via the
ecryptfs_copy_mount_wide_sigs_to_inode_sigs() function.

This patch also removes the global key tfm from the mount-wide crypt_stat
struct, instead keeping a list of tfm's meant for dealing with the various
inode FEK's.  eCryptfs will now search the user's keyring for FEK's parsed
from the existing file metadata, so the user can make keys available at any
time before or after mounting.

Now that multiple FEK packets can be written to the file metadata, we need to
be more meticulous about size limits.  The updates to the code for writing out
packets to the file metadata makes sizes and limits more explicit, uniformly
expressed, and (hopefully) easier to follow.

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: "Serge E. Hallyn" &lt;serge@hallyn.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
