<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs/ecryptfs_kernel.h, branch v3.6</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.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-08-02T17:56:34Z</updated>
<entry>
<title>Merge tag 'ecryptfs-3.6-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs</title>
<updated>2012-08-02T17:56:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-08-02T17:56:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=410fc4ce8a373a3c35c73ac2c7c29f2bac6400bf'/>
<id>urn:sha1:410fc4ce8a373a3c35c73ac2c7c29f2bac6400bf</id>
<content type='text'>
Pull ecryptfs fixes from Tyler Hicks:
 - Fixes a bug when the lower filesystem mount options include 'acl',
   but the eCryptfs mount options do not
 - Cleanups in the messaging code
 - Better handling of empty files in the lower filesystem to improve
   usability.  Failed file creations are now cleaned up and empty lower
   files are converted into eCryptfs during open().
 - The write-through cache changes are being reverted due to bugs that
   are not easy to fix.  Stability outweighs the performance
   enhancements here.
 - Improvement to the mount code to catch unsupported ciphers specified
   in the mount options

* tag 'ecryptfs-3.6-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  eCryptfs: check for eCryptfs cipher support at mount
  eCryptfs: Revert to a writethrough cache model
  eCryptfs: Initialize empty lower files when opening them
  eCryptfs: Unlink lower inode when ecryptfs_create() fails
  eCryptfs: Make all miscdev functions use daemon ptr in file private_data
  eCryptfs: Remove unused messaging declarations and function
  eCryptfs: Copy up POSIX ACL and read-only flags from lower mount
</content>
</entry>
<entry>
<title>ecryptfs: don't reinvent the wheels, please - use struct completion</title>
<updated>2012-07-22T20:01:02Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-06-25T07:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b8b487114c95ef6db5fef708ef69bfb5209014e'/>
<id>urn:sha1:3b8b487114c95ef6db5fef708ef69bfb5209014e</id>
<content type='text'>
... and keep the sodding requests on stack - they are small enough.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Initialize empty lower files when opening them</title>
<updated>2012-07-08T17:51:45Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-06-21T06:50:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e3ccaa9761200952cc269b1f4b7d7bb77a5e071b'/>
<id>urn:sha1:e3ccaa9761200952cc269b1f4b7d7bb77a5e071b</id>
<content type='text'>
Historically, eCryptfs has only initialized lower files in the
ecryptfs_create() path. Lower file initialization is the act of writing
the cryptographic metadata from the inode's crypt_stat to the header of
the file. The ecryptfs_open() path already expects that metadata to be
in the header of the file.

A number of users have reported empty lower files in beneath their
eCryptfs mounts. Most of the causes for those empty files being left
around have been addressed, but the presence of empty files causes
problems due to the lack of proper cryptographic metadata.

To transparently solve this problem, this patch initializes empty lower
files in the ecryptfs_open() error path. If the metadata is unreadable
due to the lower inode size being 0, plaintext passthrough support is
not in use, and the metadata is stored in the header of the file (as
opposed to the user.ecryptfs extended attribute), the lower file will be
initialized.

The number of nested conditionals in ecryptfs_open() was getting out of
hand, so a helper function was created. To avoid the same nested
conditional problem, the conditional logic was reversed inside of the
helper function.

https://launchpad.net/bugs/911507

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Cc: John Johansen &lt;john.johansen@canonical.com&gt;
Cc: Colin Ian King &lt;colin.king@canonical.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Make all miscdev functions use daemon ptr in file private_data</title>
<updated>2012-07-08T17:51:44Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-06-11T16:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ecaf55db6dcf4dd25e1ef8d5eb6068e3286a20f'/>
<id>urn:sha1:2ecaf55db6dcf4dd25e1ef8d5eb6068e3286a20f</id>
<content type='text'>
Now that a pointer to a valid struct ecryptfs_daemon is stored in the
private_data of an opened /dev/ecryptfs file, the remaining miscdev
functions can utilize the pointer rather than looking up the
ecryptfs_daemon at the beginning of each operation.

The security model of /dev/ecryptfs is simplified a little bit with this
patch. Upon opening /dev/ecryptfs, a per-user ecryptfs_daemon is
registered. Another daemon cannot be registered for that user until the
last file reference is released. During the lifetime of the
ecryptfs_daemon, access checks are not performed on the /dev/ecryptfs
operations because it is assumed that the application securely handles
the opened file descriptor and does not unintentionally leak it to
processes that are not trusted.

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Cc: Sasha Levin &lt;levinsasha928@gmail.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Remove unused messaging declarations and function</title>
<updated>2012-07-08T17:51:43Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-06-11T16:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=566968866555a19d0a78e0bfa845cd249a7eeae2'/>
<id>urn:sha1:566968866555a19d0a78e0bfa845cd249a7eeae2</id>
<content type='text'>
These are no longer needed.

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Cc: Sasha Levin &lt;levinsasha928@gmail.com&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: Replace miscdev read/write magic numbers</title>
<updated>2012-01-25T20:43:40Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2012-01-14T15:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48399c0b0e6172888a2e2e36df1595ab1e049ba8'/>
<id>urn:sha1:48399c0b0e6172888a2e2e36df1595ab1e049ba8</id>
<content type='text'>
ecryptfs_miscdev_read() and ecryptfs_miscdev_write() contained many
magic numbers for specifying packet header field sizes and offsets. This
patch defines those values and replaces the magic values.

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>eCryptfs: Prevent file create race condition</title>
<updated>2011-11-23T21:39:38Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2011-11-21T23:31:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b59db43ad4434519feb338eacb01d77eb50825c5'/>
<id>urn:sha1:b59db43ad4434519feb338eacb01d77eb50825c5</id>
<content type='text'>
The file creation path prematurely called d_instantiate() and
unlock_new_inode() before the eCryptfs inode info was fully
allocated and initialized and before the eCryptfs metadata was written
to the lower file.

This could result in race conditions in subsequent file and inode
operations leading to unexpected error conditions or a null pointer
dereference while attempting to use the unallocated memory.

https://launchpad.net/bugs/813146

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>treewide: use __printf not __attribute__((format(printf,...)))</title>
<updated>2011-11-01T00:30:54Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-11-01T00:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9075fa968a0a4347aef35e235e2995c0e57dddd'/>
<id>urn:sha1:b9075fa968a0a4347aef35e235e2995c0e57dddd</id>
<content type='text'>
Standardize the style for compiler based printf format verification.
Standardized the location of __printf too.

Done via script and a little typing.

$ grep -rPl --include=*.[ch] -w "__attribute__" * | \
  grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
  xargs perl -n -i -e 'local $/; while (&lt;&gt;) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

[akpm@linux-foundation.org: revert arch bits]
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill@shutemov.name&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>eCryptfs: added support for the encrypted key type</title>
<updated>2011-06-27T13:11:21Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2011-06-27T11:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1252cc3b232e582e887623dc5f70979418caaaa2'/>
<id>urn:sha1:1252cc3b232e582e887623dc5f70979418caaaa2</id>
<content type='text'>
The function ecryptfs_keyring_auth_tok_for_sig() has been modified in order
to search keys of both 'user' and 'encrypted' types.

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