<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/ecryptfs/super.c, branch v2.6.32.4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ecryptfs: Remove unneeded locking that triggers lockdep false positives</title>
<updated>2009-09-23T14:10:30+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@digitalvampire.org</email>
</author>
<published>2009-07-14T20:32:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=05dafedb906425fe935199f4c92700d87285e3e9'/>
<id>05dafedb906425fe935199f4c92700d87285e3e9</id>
<content type='text'>
In ecryptfs_destroy_inode(), inode_info-&gt;lower_file_mutex is locked,
and just after the mutex is unlocked, the code does:

 	kmem_cache_free(ecryptfs_inode_info_cache, inode_info);

This means that if another context could possibly try to take the same
mutex as ecryptfs_destroy_inode(), then it could end up getting the
mutex just before the data structure containing the mutex is freed.
So any such use would be an obvious use-after-free bug (catchable with
slab poisoning or mutex debugging), and therefore the locking in
ecryptfs_destroy_inode() is not needed and can be dropped.

Similarly, in ecryptfs_destroy_crypt_stat(), crypt_stat-&gt;keysig_list_mutex
is locked, and then the mutex is unlocked just before the code does:

 	memset(crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat));

Therefore taking this mutex is similarly not necessary.

Removing this locking fixes false-positive lockdep reports such as the
following (and they are false-positives for exactly the same reason
that the locking is not needed):

=================================
[ INFO: inconsistent lock state ]
2.6.31-2-generic #14~rbd3
---------------------------------
inconsistent {RECLAIM_FS-ON-W} -&gt; {IN-RECLAIM_FS-W} usage.
kswapd0/323 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;inode_info-&gt;lower_file_mutex){+.+.?.}, at: [&lt;ffffffff81210d34&gt;] ecryptfs_destroy_inode+0x34/0x100
{RECLAIM_FS-ON-W} state was registered at:
  [&lt;ffffffff8108c02c&gt;] mark_held_locks+0x6c/0xa0
  [&lt;ffffffff8108c10f&gt;] lockdep_trace_alloc+0xaf/0xe0
  [&lt;ffffffff81125a51&gt;] kmem_cache_alloc+0x41/0x1a0
  [&lt;ffffffff8113117a&gt;] get_empty_filp+0x7a/0x1a0
  [&lt;ffffffff8112dd46&gt;] dentry_open+0x36/0xc0
  [&lt;ffffffff8121a36c&gt;] ecryptfs_privileged_open+0x5c/0x2e0
  [&lt;ffffffff81210283&gt;] ecryptfs_init_persistent_file+0xa3/0xe0
  [&lt;ffffffff8120e838&gt;] ecryptfs_lookup_and_interpose_lower+0x278/0x380
  [&lt;ffffffff8120f97a&gt;] ecryptfs_lookup+0x12a/0x250
  [&lt;ffffffff8113930a&gt;] real_lookup+0xea/0x160
  [&lt;ffffffff8113afc8&gt;] do_lookup+0xb8/0xf0
  [&lt;ffffffff8113b518&gt;] __link_path_walk+0x518/0x870
  [&lt;ffffffff8113bd9c&gt;] path_walk+0x5c/0xc0
  [&lt;ffffffff8113be5b&gt;] do_path_lookup+0x5b/0xa0
  [&lt;ffffffff8113bfe7&gt;] user_path_at+0x57/0xa0
  [&lt;ffffffff811340dc&gt;] vfs_fstatat+0x3c/0x80
  [&lt;ffffffff8113424b&gt;] vfs_stat+0x1b/0x20
  [&lt;ffffffff81134274&gt;] sys_newstat+0x24/0x50
  [&lt;ffffffff81013132&gt;] system_call_fastpath+0x16/0x1b
  [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
irq event stamp: 7811
hardirqs last  enabled at (7811): [&lt;ffffffff810c037f&gt;] call_rcu+0x5f/0x90
hardirqs last disabled at (7810): [&lt;ffffffff810c0353&gt;] call_rcu+0x33/0x90
softirqs last  enabled at (3764): [&lt;ffffffff810631da&gt;] __do_softirq+0x14a/0x220
softirqs last disabled at (3751): [&lt;ffffffff8101440c&gt;] call_softirq+0x1c/0x30

other info that might help us debug this:
2 locks held by kswapd0/323:
 #0:  (shrinker_rwsem){++++..}, at: [&lt;ffffffff810f67ed&gt;] shrink_slab+0x3d/0x190
 #1:  (&amp;type-&gt;s_umount_key#35){.+.+..}, at: [&lt;ffffffff811429a1&gt;] prune_dcache+0xd1/0x1b0

stack backtrace:
Pid: 323, comm: kswapd0 Tainted: G         C 2.6.31-2-generic #14~rbd3
Call Trace:
 [&lt;ffffffff8108ad6c&gt;] print_usage_bug+0x18c/0x1a0
 [&lt;ffffffff8108aff0&gt;] ? check_usage_forwards+0x0/0xc0
 [&lt;ffffffff8108bac2&gt;] mark_lock_irq+0xf2/0x280
 [&lt;ffffffff8108bd87&gt;] mark_lock+0x137/0x1d0
 [&lt;ffffffff81164710&gt;] ? fsnotify_clear_marks_by_inode+0x30/0xf0
 [&lt;ffffffff8108bee6&gt;] mark_irqflags+0xc6/0x1a0
 [&lt;ffffffff8108d337&gt;] __lock_acquire+0x287/0x430
 [&lt;ffffffff8108d585&gt;] lock_acquire+0xa5/0x150
 [&lt;ffffffff81210d34&gt;] ? ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff8108d2e7&gt;] ? __lock_acquire+0x237/0x430
 [&lt;ffffffff815526ad&gt;] __mutex_lock_common+0x4d/0x3d0
 [&lt;ffffffff81210d34&gt;] ? ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff81164710&gt;] ? fsnotify_clear_marks_by_inode+0x30/0xf0
 [&lt;ffffffff81210d34&gt;] ? ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff8129a91e&gt;] ? _raw_spin_unlock+0x5e/0xb0
 [&lt;ffffffff81552b36&gt;] mutex_lock_nested+0x46/0x60
 [&lt;ffffffff81210d34&gt;] ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff81145d27&gt;] destroy_inode+0x87/0xd0
 [&lt;ffffffff81146b4c&gt;] generic_delete_inode+0x12c/0x1a0
 [&lt;ffffffff81145832&gt;] iput+0x62/0x70
 [&lt;ffffffff811423c8&gt;] dentry_iput+0x98/0x110
 [&lt;ffffffff81142550&gt;] d_kill+0x50/0x80
 [&lt;ffffffff81142623&gt;] prune_one_dentry+0xa3/0xc0
 [&lt;ffffffff811428b1&gt;] __shrink_dcache_sb+0x271/0x290
 [&lt;ffffffff811429d9&gt;] prune_dcache+0x109/0x1b0
 [&lt;ffffffff81142abf&gt;] shrink_dcache_memory+0x3f/0x50
 [&lt;ffffffff810f68dd&gt;] shrink_slab+0x12d/0x190
 [&lt;ffffffff810f9377&gt;] balance_pgdat+0x4d7/0x640
 [&lt;ffffffff8104c4c0&gt;] ? finish_task_switch+0x40/0x150
 [&lt;ffffffff810f63c0&gt;] ? isolate_pages_global+0x0/0x60
 [&lt;ffffffff810f95f7&gt;] kswapd+0x117/0x170
 [&lt;ffffffff810777a0&gt;] ? autoremove_wake_function+0x0/0x40
 [&lt;ffffffff810f94e0&gt;] ? kswapd+0x0/0x170
 [&lt;ffffffff810773be&gt;] kthread+0x9e/0xb0
 [&lt;ffffffff8101430a&gt;] child_rip+0xa/0x20
 [&lt;ffffffff81013c90&gt;] ? restore_args+0x0/0x30
 [&lt;ffffffff81077320&gt;] ? kthread+0x0/0xb0
 [&lt;ffffffff81014300&gt;] ? child_rip+0x0/0x20

Signed-off-by: Roland Dreier &lt;roland@digitalvampire.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In ecryptfs_destroy_inode(), inode_info-&gt;lower_file_mutex is locked,
and just after the mutex is unlocked, the code does:

 	kmem_cache_free(ecryptfs_inode_info_cache, inode_info);

This means that if another context could possibly try to take the same
mutex as ecryptfs_destroy_inode(), then it could end up getting the
mutex just before the data structure containing the mutex is freed.
So any such use would be an obvious use-after-free bug (catchable with
slab poisoning or mutex debugging), and therefore the locking in
ecryptfs_destroy_inode() is not needed and can be dropped.

Similarly, in ecryptfs_destroy_crypt_stat(), crypt_stat-&gt;keysig_list_mutex
is locked, and then the mutex is unlocked just before the code does:

 	memset(crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat));

Therefore taking this mutex is similarly not necessary.

Removing this locking fixes false-positive lockdep reports such as the
following (and they are false-positives for exactly the same reason
that the locking is not needed):

=================================
[ INFO: inconsistent lock state ]
2.6.31-2-generic #14~rbd3
---------------------------------
inconsistent {RECLAIM_FS-ON-W} -&gt; {IN-RECLAIM_FS-W} usage.
kswapd0/323 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;inode_info-&gt;lower_file_mutex){+.+.?.}, at: [&lt;ffffffff81210d34&gt;] ecryptfs_destroy_inode+0x34/0x100
{RECLAIM_FS-ON-W} state was registered at:
  [&lt;ffffffff8108c02c&gt;] mark_held_locks+0x6c/0xa0
  [&lt;ffffffff8108c10f&gt;] lockdep_trace_alloc+0xaf/0xe0
  [&lt;ffffffff81125a51&gt;] kmem_cache_alloc+0x41/0x1a0
  [&lt;ffffffff8113117a&gt;] get_empty_filp+0x7a/0x1a0
  [&lt;ffffffff8112dd46&gt;] dentry_open+0x36/0xc0
  [&lt;ffffffff8121a36c&gt;] ecryptfs_privileged_open+0x5c/0x2e0
  [&lt;ffffffff81210283&gt;] ecryptfs_init_persistent_file+0xa3/0xe0
  [&lt;ffffffff8120e838&gt;] ecryptfs_lookup_and_interpose_lower+0x278/0x380
  [&lt;ffffffff8120f97a&gt;] ecryptfs_lookup+0x12a/0x250
  [&lt;ffffffff8113930a&gt;] real_lookup+0xea/0x160
  [&lt;ffffffff8113afc8&gt;] do_lookup+0xb8/0xf0
  [&lt;ffffffff8113b518&gt;] __link_path_walk+0x518/0x870
  [&lt;ffffffff8113bd9c&gt;] path_walk+0x5c/0xc0
  [&lt;ffffffff8113be5b&gt;] do_path_lookup+0x5b/0xa0
  [&lt;ffffffff8113bfe7&gt;] user_path_at+0x57/0xa0
  [&lt;ffffffff811340dc&gt;] vfs_fstatat+0x3c/0x80
  [&lt;ffffffff8113424b&gt;] vfs_stat+0x1b/0x20
  [&lt;ffffffff81134274&gt;] sys_newstat+0x24/0x50
  [&lt;ffffffff81013132&gt;] system_call_fastpath+0x16/0x1b
  [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
irq event stamp: 7811
hardirqs last  enabled at (7811): [&lt;ffffffff810c037f&gt;] call_rcu+0x5f/0x90
hardirqs last disabled at (7810): [&lt;ffffffff810c0353&gt;] call_rcu+0x33/0x90
softirqs last  enabled at (3764): [&lt;ffffffff810631da&gt;] __do_softirq+0x14a/0x220
softirqs last disabled at (3751): [&lt;ffffffff8101440c&gt;] call_softirq+0x1c/0x30

other info that might help us debug this:
2 locks held by kswapd0/323:
 #0:  (shrinker_rwsem){++++..}, at: [&lt;ffffffff810f67ed&gt;] shrink_slab+0x3d/0x190
 #1:  (&amp;type-&gt;s_umount_key#35){.+.+..}, at: [&lt;ffffffff811429a1&gt;] prune_dcache+0xd1/0x1b0

stack backtrace:
Pid: 323, comm: kswapd0 Tainted: G         C 2.6.31-2-generic #14~rbd3
Call Trace:
 [&lt;ffffffff8108ad6c&gt;] print_usage_bug+0x18c/0x1a0
 [&lt;ffffffff8108aff0&gt;] ? check_usage_forwards+0x0/0xc0
 [&lt;ffffffff8108bac2&gt;] mark_lock_irq+0xf2/0x280
 [&lt;ffffffff8108bd87&gt;] mark_lock+0x137/0x1d0
 [&lt;ffffffff81164710&gt;] ? fsnotify_clear_marks_by_inode+0x30/0xf0
 [&lt;ffffffff8108bee6&gt;] mark_irqflags+0xc6/0x1a0
 [&lt;ffffffff8108d337&gt;] __lock_acquire+0x287/0x430
 [&lt;ffffffff8108d585&gt;] lock_acquire+0xa5/0x150
 [&lt;ffffffff81210d34&gt;] ? ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff8108d2e7&gt;] ? __lock_acquire+0x237/0x430
 [&lt;ffffffff815526ad&gt;] __mutex_lock_common+0x4d/0x3d0
 [&lt;ffffffff81210d34&gt;] ? ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff81164710&gt;] ? fsnotify_clear_marks_by_inode+0x30/0xf0
 [&lt;ffffffff81210d34&gt;] ? ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff8129a91e&gt;] ? _raw_spin_unlock+0x5e/0xb0
 [&lt;ffffffff81552b36&gt;] mutex_lock_nested+0x46/0x60
 [&lt;ffffffff81210d34&gt;] ecryptfs_destroy_inode+0x34/0x100
 [&lt;ffffffff81145d27&gt;] destroy_inode+0x87/0xd0
 [&lt;ffffffff81146b4c&gt;] generic_delete_inode+0x12c/0x1a0
 [&lt;ffffffff81145832&gt;] iput+0x62/0x70
 [&lt;ffffffff811423c8&gt;] dentry_iput+0x98/0x110
 [&lt;ffffffff81142550&gt;] d_kill+0x50/0x80
 [&lt;ffffffff81142623&gt;] prune_one_dentry+0xa3/0xc0
 [&lt;ffffffff811428b1&gt;] __shrink_dcache_sb+0x271/0x290
 [&lt;ffffffff811429d9&gt;] prune_dcache+0x109/0x1b0
 [&lt;ffffffff81142abf&gt;] shrink_dcache_memory+0x3f/0x50
 [&lt;ffffffff810f68dd&gt;] shrink_slab+0x12d/0x190
 [&lt;ffffffff810f9377&gt;] balance_pgdat+0x4d7/0x640
 [&lt;ffffffff8104c4c0&gt;] ? finish_task_switch+0x40/0x150
 [&lt;ffffffff810f63c0&gt;] ? isolate_pages_global+0x0/0x60
 [&lt;ffffffff810f95f7&gt;] kswapd+0x117/0x170
 [&lt;ffffffff810777a0&gt;] ? autoremove_wake_function+0x0/0x40
 [&lt;ffffffff810f94e0&gt;] ? kswapd+0x0/0x170
 [&lt;ffffffff810773be&gt;] kthread+0x9e/0xb0
 [&lt;ffffffff8101430a&gt;] child_rip+0xa/0x20
 [&lt;ffffffff81013c90&gt;] ? restore_args+0x0/0x30
 [&lt;ffffffff81077320&gt;] ? kthread+0x0/0xb0
 [&lt;ffffffff81014300&gt;] ? child_rip+0x0/0x20

Signed-off-by: Roland Dreier &lt;roland@digitalvampire.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>push BKL down into -&gt;put_super</title>
<updated>2009-06-12T01:36:07+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2009-05-05T13:40:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6cfd0148425e528b859b26e436b01f23f6926224'/>
<id>6cfd0148425e528b859b26e436b01f23f6926224</id>
<content type='text'>
Move BKL into -&gt;put_super from the only caller.  A couple of
filesystems had trivial enough -&gt;put_super (only kfree and NULLing of
s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
hugetlbfs, omfs, qnx4, shmem, all others got the full treatment.  Most
of them probably don't need it, but I'd rather sort that out individually.
Preferably after all the other BKL pushdowns in that area.

[AV: original used to move lock_super() down as well; these changes are
removed since we don't do lock_super() at all in generic_shutdown_super()
now]
[AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move BKL into -&gt;put_super from the only caller.  A couple of
filesystems had trivial enough -&gt;put_super (only kfree and NULLing of
s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
hugetlbfs, omfs, qnx4, shmem, all others got the full treatment.  Most
of them probably don't need it, but I'd rather sort that out individually.
Preferably after all the other BKL pushdowns in that area.

[AV: original used to move lock_super() down as well; these changes are
removed since we don't do lock_super() at all in generic_shutdown_super()
now]
[AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: Remove ecryptfs_unlink_sigs warnings</title>
<updated>2009-04-22T09:08:46+00:00</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-04-22T09:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e77cc8d243f9f1e1d3f0799e23cc14e837ccc8c6'/>
<id>e77cc8d243f9f1e1d3f0799e23cc14e837ccc8c6</id>
<content type='text'>
A feature was added to the eCryptfs umount helper to automatically
unlink the keys used for an eCryptfs mount from the kernel keyring upon
umount.  This patch keeps the unrecognized mount option warnings for
ecryptfs_unlink_sigs out of the logs.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A feature was added to the eCryptfs umount helper to automatically
unlink the keys used for an eCryptfs mount from the kernel keyring upon
umount.  This patch keeps the unrecognized mount option warnings for
ecryptfs_unlink_sigs out of the logs.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>eCryptfs: Print FNEK sig properly in /proc/mounts</title>
<updated>2009-04-22T08:54:13+00:00</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.vnet.ibm.com</email>
</author>
<published>2009-03-16T17:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3a5203ab3c0c31e0f1434c69e893bfb85c6e6657'/>
<id>3a5203ab3c0c31e0f1434c69e893bfb85c6e6657</id>
<content type='text'>
The filename encryption key signature is not properly displayed in
/proc/mounts.  The "ecryptfs_sig=" mount option name is displayed for
all global authentication tokens, included those for filename keys.

This patch checks the global authentication token flags to determine if
the key is a FEKEK or FNEK and prints the appropriate mount option name
before the signature.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The filename encryption key signature is not properly displayed in
/proc/mounts.  The "ecryptfs_sig=" mount option name is displayed for
all global authentication tokens, included those for filename keys.

This patch checks the global authentication token flags to determine if
the key is a FEKEK or FNEK and prints the appropriate mount option name
before the signature.

Signed-off-by: Tyler Hicks &lt;tyhicks@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ecryptfs: remove debug as mount option, and warn if set via modprobe</title>
<updated>2008-02-06T18:41:12+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2008-02-06T09:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2830bfd6cf66133c86d4a32004fd99c3de7e23bf'/>
<id>2830bfd6cf66133c86d4a32004fd99c3de7e23bf</id>
<content type='text'>
ecryptfs_debug really should not be a mount option; it is not per-mount,
but rather sets a global "ecryptfs_verbosity" variable which affects all
mounted filesysytems.  It's already settable as a module load option,
I think we can leave it at that.

Also, if set, since secret values come out in debug messages, kick
things off with a stern warning.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-by: Mike 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>
ecryptfs_debug really should not be a mount option; it is not per-mount,
but rather sets a global "ecryptfs_verbosity" variable which affects all
mounted filesysytems.  It's already settable as a module load option,
I think we can leave it at that.

Also, if set, since secret values come out in debug messages, kick
things off with a stern warning.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-by: Mike 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: make show_options reflect actual mount options</title>
<updated>2008-02-06T18:41:12+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2008-02-06T09:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=99db6e4a9764887842006a2b1aa804de6171db42'/>
<id>99db6e4a9764887842006a2b1aa804de6171db42</id>
<content type='text'>
Change ecryptfs_show_options to reflect the actual mount options in use.
Note that this does away with the "dir=" output, which is not a valid mount
option and appears to be unused.

Mount options such as "ecryptfs_verbose" and "ecryptfs_xattr_metadata" are
somewhat indeterminate for a given fs, but in any case the reported mount
options can be used in a new mount command to get the same behavior.

[akpm@linux-foundation.org: fix printk warning]
Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-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>
Change ecryptfs_show_options to reflect the actual mount options in use.
Note that this does away with the "dir=" output, which is not a valid mount
option and appears to be unused.

Mount options such as "ecryptfs_verbose" and "ecryptfs_xattr_metadata" are
somewhat indeterminate for a given fs, but in any case the reported mount
options can be used in a new mount command to get the same behavior.

[akpm@linux-foundation.org: fix printk warning]
Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Acked-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: fix dentry handling on create error, unlink, and inode destroy</title>
<updated>2008-01-09T00:10:36+00:00</updated>
<author>
<name>Michael Halcrow</name>
<email>mhalcrow@us.ibm.com</email>
</author>
<published>2008-01-08T23:33:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=caeeeecfdaeada2998eb3c29c3ebd59afb79ef06'/>
<id>caeeeecfdaeada2998eb3c29c3ebd59afb79ef06</id>
<content type='text'>
This patch corrects some erroneous dentry handling in eCryptfs.

If there is a problem creating the lower file, then there is nothing that
the persistent lower file can do to really help us.  This patch makes a
vfs_create() failure in the lower filesystem always lead to an
unconditional do_create failure in eCryptfs.

Under certain sequences of operations, the eCryptfs dentry can remain in
the dcache after an unlink.  This patch calls d_drop() on the eCryptfs
dentry to correct this.

eCryptfs has no business calling d_delete() directly on a lower
filesystem's dentry.  This patch removes the call to d_delete() on the
lower persistent file's dentry in ecryptfs_destroy_inode().

(Thanks to David Kleikamp, Eric Sandeen, and Jeff Moyer for helping
identify and resolve this issue)

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Cc: Eric Sandeen &lt;sandeen@redhat.com&gt;
Cc: Jeff Moyer &lt;jmoyer@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>
This patch corrects some erroneous dentry handling in eCryptfs.

If there is a problem creating the lower file, then there is nothing that
the persistent lower file can do to really help us.  This patch makes a
vfs_create() failure in the lower filesystem always lead to an
unconditional do_create failure in eCryptfs.

Under certain sequences of operations, the eCryptfs dentry can remain in
the dcache after an unlink.  This patch calls d_drop() on the eCryptfs
dentry to correct this.

eCryptfs has no business calling d_delete() directly on a lower
filesystem's dentry.  This patch removes the call to d_delete() on the
lower persistent file's dentry in ecryptfs_destroy_inode().

(Thanks to David Kleikamp, Eric Sandeen, and Jeff Moyer for helping
identify and resolve this issue)

Signed-off-by: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Cc: Dave Kleikamp &lt;shaggy@austin.ibm.com&gt;
Cc: Eric Sandeen &lt;sandeen@redhat.com&gt;
Cc: Jeff Moyer &lt;jmoyer@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>
<entry>
<title>eCryptfs: initialize persistent lower file on inode create</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:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=035241d30e273519195a9987e6eb56bbe2297872'/>
<id>035241d30e273519195a9987e6eb56bbe2297872</id>
<content type='text'>
Initialize persistent lower file on inode create.

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>
Initialize persistent lower file on inode create.

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: set up and destroy persistent lower file</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:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4981e081cfe2c3f4abcfa3924ebd999cdbed4914'/>
<id>4981e081cfe2c3f4abcfa3924ebd999cdbed4914</id>
<content type='text'>
This patch sets up and destroys the persistent lower file for each eCryptfs
inode.

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>
This patch sets up and destroys the persistent lower file for each eCryptfs
inode.

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.toradex.cn/cgit/linux-toradex.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>
</feed>
