<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ecryptfs, branch v3.18</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.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-10-23T22:14:39Z</updated>
<entry>
<title>fs: limit filesystem stacking depth</title>
<updated>2014-10-23T22:14:39Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2014-10-23T22:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69c433ed2ecd2d3264efd7afec4439524b319121'/>
<id>urn:sha1:69c433ed2ecd2d3264efd7afec4439524b319121</id>
<content type='text'>
Add a simple read-only counter to super_block that indicates how deep this
is in the stack of filesystems.  Previously ecryptfs was the only stackable
filesystem and it explicitly disallowed multiple layers of itself.

Overlayfs, however, can be stacked recursively and also may be stacked
on top of ecryptfs or vice versa.

To limit the kernel stack usage we must limit the depth of the
filesystem stack.  Initially the limit is set to 2.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2014-10-13T09:28:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-10-13T09:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=77c688ac87183537ed0fb84ec2cb8fa8ec97c458'/>
<id>urn:sha1:77c688ac87183537ed0fb84ec2cb8fa8ec97c458</id>
<content type='text'>
Pull vfs updates from Al Viro:
 "The big thing in this pile is Eric's unmount-on-rmdir series; we
  finally have everything we need for that.  The final piece of prereqs
  is delayed mntput() - now filesystem shutdown always happens on
  shallow stack.

  Other than that, we have several new primitives for iov_iter (Matt
  Wilcox, culled from his XIP-related series) pushing the conversion to
  -&gt;read_iter()/ -&gt;write_iter() a bit more, a bunch of fs/dcache.c
  cleanups and fixes (including the external name refcounting, which
  gives consistent behaviour of d_move() wrt procfs symlinks for long
  and short names alike) and assorted cleanups and fixes all over the
  place.

  This is just the first pile; there's a lot of stuff from various
  people that ought to go in this window.  Starting with
  unionmount/overlayfs mess...  ;-/"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (60 commits)
  fs/file_table.c: Update alloc_file() comment
  vfs: Deduplicate code shared by xattr system calls operating on paths
  reiserfs: remove pointless forward declaration of struct nameidata
  don't need that forward declaration of struct nameidata in dcache.h anymore
  take dname_external() into fs/dcache.c
  let path_init() failures treated the same way as subsequent link_path_walk()
  fix misuses of f_count() in ppp and netlink
  ncpfs: use list_for_each_entry() for d_subdirs walk
  vfs: move getname() from callers to do_mount()
  gfs2_atomic_open(): skip lookups on hashed dentry
  [infiniband] remove pointless assignments
  gadgetfs: saner API for gadgetfs_create_file()
  f_fs: saner API for ffs_sb_create_file()
  jfs: don't hash direct inode
  [s390] remove pointless assignment of -&gt;f_op in vmlogrdr -&gt;open()
  ecryptfs: -&gt;f_op is never NULL
  android: -&gt;f_op is never NULL
  nouveau: __iomem misannotations
  missing annotation in fs/file.c
  fs: namespace: suppress 'may be used uninitialized' warnings
  ...
</content>
</entry>
<entry>
<title>Merge tag 'ecryptfs-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs</title>
<updated>2014-10-11T12:01:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-10-11T12:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eca9fdf32dd48976eab18d310acb0b8d4cc9bf26'/>
<id>urn:sha1:eca9fdf32dd48976eab18d310acb0b8d4cc9bf26</id>
<content type='text'>
Pull eCryptfs updates from Tyler Hicks:
 "Minor code cleanups and a fix for when eCryptfs metadata is stored in
  xattrs"

* tag 'ecryptfs-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  ecryptfs: remove unneeded buggy code in ecryptfs_do_create()
  ecryptfs: avoid to access NULL pointer when write metadata in xattr
  ecryptfs: remove unnecessary break after goto
  ecryptfs: Remove unnecessary include of syscall.h in keystore.c
  fs/ecryptfs/messaging.c: remove null test before kfree
  ecryptfs: Drop cast
  Use %pd in eCryptFS
</content>
</entry>
<entry>
<title>ecryptfs: -&gt;f_op is never NULL</title>
<updated>2014-10-09T06:39:12Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-09-02T21:31:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2e3f5d5f4620bb6568bc559f712ce80222e20cb'/>
<id>urn:sha1:c2e3f5d5f4620bb6568bc559f712ce80222e20cb</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ecryptfs: remove unneeded buggy code in ecryptfs_do_create()</title>
<updated>2014-10-06T21:54:50Z</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2014-09-22T20:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f9e2bf008a1b143973a01b52320eb66c20ac6ab'/>
<id>urn:sha1:0f9e2bf008a1b143973a01b52320eb66c20ac6ab</id>
<content type='text'>
There is a bug in error handling of lock_parent() in ecryptfs_do_create():
lock_parent() acquries mutex even if dget_parent() fails, so mutex should be unlocked anyway.

But dget_parent() does not fail, so the patch just removes unneeded buggy code.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: avoid to access NULL pointer when write metadata in xattr</title>
<updated>2014-10-06T04:51:43Z</updated>
<author>
<name>Chao Yu</name>
<email>chao2.yu@samsung.com</email>
</author>
<published>2014-07-24T09:25:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35425ea2492175fd39f6116481fe98b2b3ddd4ca'/>
<id>urn:sha1:35425ea2492175fd39f6116481fe98b2b3ddd4ca</id>
<content type='text'>
Christopher Head 2014-06-28 05:26:20 UTC described:
"I tried to reproduce this on 3.12.21. Instead, when I do "echo hello &gt; foo"
in an ecryptfs mount with ecryptfs_xattr specified, I get a kernel crash:

BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [&lt;ffffffff8110eb39&gt;] fsstack_copy_attr_all+0x2/0x61
PGD d7840067 PUD b2c3c067 PMD 0
Oops: 0002 [#1] SMP
Modules linked in: nvidia(PO)
CPU: 3 PID: 3566 Comm: bash Tainted: P           O 3.12.21-gentoo-r1 #2
Hardware name: ASUSTek Computer Inc. G60JX/G60JX, BIOS 206 03/15/2010
task: ffff8801948944c0 ti: ffff8800bad70000 task.ti: ffff8800bad70000
RIP: 0010:[&lt;ffffffff8110eb39&gt;]  [&lt;ffffffff8110eb39&gt;] fsstack_copy_attr_all+0x2/0x61
RSP: 0018:ffff8800bad71c10  EFLAGS: 00010246
RAX: 00000000000181a4 RBX: ffff880198648480 RCX: 0000000000000000
RDX: 0000000000000004 RSI: ffff880172010450 RDI: 0000000000000000
RBP: ffff880198490e40 R08: 0000000000000000 R09: 0000000000000000
R10: ffff880172010450 R11: ffffea0002c51e80 R12: 0000000000002000
R13: 000000000000001a R14: 0000000000000000 R15: ffff880198490e40
FS:  00007ff224caa700(0000) GS:ffff88019fcc0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000bb07f000 CR4: 00000000000007e0
Stack:
ffffffff811826e8 ffff8800a39d8000 0000000000000000 000000000000001a
ffff8800a01d0000 ffff8800a39d8000 ffffffff81185fd5 ffffffff81082c2c
00000001a39d8000 53d0abbc98490e40 0000000000000037 ffff8800a39d8220
Call Trace:
[&lt;ffffffff811826e8&gt;] ? ecryptfs_setxattr+0x40/0x52
[&lt;ffffffff81185fd5&gt;] ? ecryptfs_write_metadata+0x1b3/0x223
[&lt;ffffffff81082c2c&gt;] ? should_resched+0x5/0x23
[&lt;ffffffff8118322b&gt;] ? ecryptfs_initialize_file+0xaf/0xd4
[&lt;ffffffff81183344&gt;] ? ecryptfs_create+0xf4/0x142
[&lt;ffffffff810f8c0d&gt;] ? vfs_create+0x48/0x71
[&lt;ffffffff810f9c86&gt;] ? do_last.isra.68+0x559/0x952
[&lt;ffffffff810f7ce7&gt;] ? link_path_walk+0xbd/0x458
[&lt;ffffffff810fa2a3&gt;] ? path_openat+0x224/0x472
[&lt;ffffffff810fa7bd&gt;] ? do_filp_open+0x2b/0x6f
[&lt;ffffffff81103606&gt;] ? __alloc_fd+0xd6/0xe7
[&lt;ffffffff810ee6ab&gt;] ? do_sys_open+0x65/0xe9
[&lt;ffffffff8157d022&gt;] ? system_call_fastpath+0x16/0x1b
RIP  [&lt;ffffffff8110eb39&gt;] fsstack_copy_attr_all+0x2/0x61
RSP &lt;ffff8800bad71c10&gt;
CR2: 0000000000000000
---[ end trace df9dba5f1ddb8565 ]---"

If we create a file when we mount with ecryptfs_xattr_metadata option, we will
encounter a crash in this path:
-&gt;ecryptfs_create
  -&gt;ecryptfs_initialize_file
    -&gt;ecryptfs_write_metadata
      -&gt;ecryptfs_write_metadata_to_xattr
        -&gt;ecryptfs_setxattr
          -&gt;fsstack_copy_attr_all
It's because our dentry-&gt;d_inode used in fsstack_copy_attr_all is NULL, and it
will be initialized when ecryptfs_initialize_file finish.

So we should skip copying attr from lower inode when the value of -&gt;d_inode is
invalid.

Signed-off-by: Chao Yu &lt;chao2.yu@samsung.com&gt;
Cc: stable@vger.kernel.org # v3.2+: b59db43 eCryptfs: Prevent file create race condition
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: remove unnecessary break after goto</title>
<updated>2014-07-14T19:29:11Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-07-08T16:30:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04ec5f5c0022ee941615e304bc75853fe1bc94ba'/>
<id>urn:sha1:04ec5f5c0022ee941615e304bc75853fe1bc94ba</id>
<content type='text'>
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: ecryptfs@vger.kernel.org
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Remove unnecessary include of syscall.h in keystore.c</title>
<updated>2014-07-03T21:38:23Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2014-06-19T01:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27199b15e4f027e24969f6644ce4ff414c7e6cba'/>
<id>urn:sha1:27199b15e4f027e24969f6644ce4ff414c7e6cba</id>
<content type='text'>
There's no reason to include syscalls.h in keystore.c. Remove it.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>fs/ecryptfs/messaging.c: remove null test before kfree</title>
<updated>2014-07-03T21:38:09Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-06-16T18:06:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3db593e8af0a7361037a2abbe8910d4e44041d89'/>
<id>urn:sha1:3db593e8af0a7361037a2abbe8910d4e44041d89</id>
<content type='text'>
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: ecryptfs@vger.kernel.org
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
<entry>
<title>ecryptfs: Drop cast</title>
<updated>2014-07-03T21:37:56Z</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-06-26T19:41:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4cf3ba4f34819170fee43532f729e2fc6aa9a76'/>
<id>urn:sha1:c4cf3ba4f34819170fee43532f729e2fc6aa9a76</id>
<content type='text'>
This patch does away with cast on void * and the if as it is unnecessary.

The following Coccinelle semantic patch was used for making the change:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)-&gt;f
|
- (T *)
  e
)

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
</content>
</entry>
</feed>
