<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/fuse, branch v3.9</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.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-03-04T03:36:31Z</updated>
<entry>
<title>fs: Limit sys_mount to only request filesystem modules.</title>
<updated>2013-03-04T03:36:31Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2013-03-03T03:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f78e0351394052e1a6293e175825eb5c7869507'/>
<id>urn:sha1:7f78e0351394052e1a6293e175825eb5c7869507</id>
<content type='text'>
Modify the request_module to prefix the file system type with "fs-"
and add aliases to all of the filesystems that can be built as modules
to match.

A common practice is to build all of the kernel code and leave code
that is not commonly needed as modules, with the result that many
users are exposed to any bug anywhere in the kernel.

Looking for filesystems with a fs- prefix limits the pool of possible
modules that can be loaded by mount to just filesystems trivially
making things safer with no real cost.

Using aliases means user space can control the policy of which
filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
with blacklist and alias directives.  Allowing simple, safe,
well understood work-arounds to known problematic software.

This also addresses a rare but unfortunate problem where the filesystem
name is not the same as it's module name and module auto-loading
would not work.  While writing this patch I saw a handful of such
cases.  The most significant being autofs that lives in the module
autofs4.

This is relevant to user namespaces because we can reach the request
module in get_fs_type() without having any special permissions, and
people get uncomfortable when a user specified string (in this case
the filesystem type) goes all of the way to request_module.

After having looked at this issue I don't think there is any
particular reason to perform any filtering or permission checks beyond
making it clear in the module request that we want a filesystem
module.  The common pattern in the kernel is to call request_module()
without regards to the users permissions.  In general all a filesystem
module does once loaded is call register_filesystem() and go to sleep.
Which means there is not much attack surface exposed by loading a
filesytem module unless the filesystem is mounted.  In a user
namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
which most filesystems do not set today.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Reported-by: Kees Cook &lt;keescook@google.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>more file_inode() open-coded instances</title>
<updated>2013-02-27T21:59:05Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-02-27T21:59:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6131ffaa1f091415b7a24abb01f033d9c0a727f4'/>
<id>urn:sha1:6131ffaa1f091415b7a24abb01f033d9c0a727f4</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2013-02-27T04:16:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-27T04:16:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d895cb1af15c04c522a25c79cc429076987c089b'/>
<id>urn:sha1:d895cb1af15c04c522a25c79cc429076987c089b</id>
<content type='text'>
Pull vfs pile (part one) from Al Viro:
 "Assorted stuff - cleaning namei.c up a bit, fixing -&gt;d_name/-&gt;d_parent
  locking violations, etc.

  The most visible changes here are death of FS_REVAL_DOT (replaced with
  "has -&gt;d_weak_revalidate()") and a new helper getting from struct file
  to inode.  Some bits of preparation to xattr method interface changes.

  Misc patches by various people sent this cycle *and* ocfs2 fixes from
  several cycles ago that should've been upstream right then.

  PS: the next vfs pile will be xattr stuff."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
  saner proc_get_inode() calling conventions
  proc: avoid extra pde_put() in proc_fill_super()
  fs: change return values from -EACCES to -EPERM
  fs/exec.c: make bprm_mm_init() static
  ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
  ocfs2: fix possible use-after-free with AIO
  ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
  get_empty_filp()/alloc_file() leave both -&gt;f_pos and -&gt;f_version zero
  target: writev() on single-element vector is pointless
  export kernel_write(), convert open-coded instances
  fs: encode_fh: return FILEID_INVALID if invalid fid_type
  kill f_vfsmnt
  vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
  nfsd: handle vfs_getattr errors in acl protocol
  switch vfs_getattr() to struct path
  default SET_PERSONALITY() in linux/elf.h
  ceph: prepopulate inodes only when request is aborted
  d_hash_and_lookup(): export, switch open-coded instances
  9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
  9p: split dropping the acls from v9fs_set_create_acl()
  ...
</content>
</entry>
<entry>
<title>fs: encode_fh: return FILEID_INVALID if invalid fid_type</title>
<updated>2013-02-26T07:46:10Z</updated>
<author>
<name>Namjae Jeon</name>
<email>namjae.jeon@samsung.com</email>
</author>
<published>2013-02-17T06:48:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94e07a7590ae855bae0536c42b3086fadc7c83a8'/>
<id>urn:sha1:94e07a7590ae855bae0536c42b3086fadc7c83a8</id>
<content type='text'>
This patch is a follow up on below patch:

[PATCH] exportfs: add FILEID_INVALID to indicate invalid fid_type
commit: 216b6cbdcbd86b1db0754d58886b466ae31f5a63

Signed-off-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Signed-off-by: Vivek Trivedi &lt;t.vivek@samsung.com&gt;
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Acked-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: file_inode(file)</title>
<updated>2013-02-23T04:31:31Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-01-23T22:07:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=496ad9aa8ef448058e36ca7a787c61f2e63f0f54'/>
<id>urn:sha1:496ad9aa8ef448058e36ca7a787c61f2e63f0f54</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fuse: allow control of adaptive readdirplus use</title>
<updated>2013-02-07T13:25:44Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2013-02-06T22:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=634734b63ac39e137a1c623ba74f3e062b6577db'/>
<id>urn:sha1:634734b63ac39e137a1c623ba74f3e062b6577db</id>
<content type='text'>
For some filesystems (e.g. GlusterFS), the cost of performing a
normal readdir and readdirplus are identical.  Since adaptively
using readdirplus has no benefit for those systems, give
users/filesystems the option to control adaptive readdirplus use.

v2 of this patch incorporates Miklos's suggestion to simplify the code,
as well as improving consistency of macro names and documentation.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: send poll events</title>
<updated>2013-02-04T15:14:32Z</updated>
<author>
<name>Enke Chen</name>
<email>enkechen@yahoo.com</email>
</author>
<published>2013-02-04T15:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0415d291022543d83ee799e9ffee08d856bca6e8'/>
<id>urn:sha1:0415d291022543d83ee799e9ffee08d856bca6e8</id>
<content type='text'>
commit 626cf23660 "poll: add poll_requested_events()..." enabled us to send the
requested events to the filesystem.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: don't WARN when nlink is zero</title>
<updated>2013-02-04T14:57:42Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2013-02-04T14:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dfca7cebc2679f3d129f8e680a8f199a7ad16e38'/>
<id>urn:sha1:dfca7cebc2679f3d129f8e680a8f199a7ad16e38</id>
<content type='text'>
drop_nlink() warns if nlink is already zero.  This is triggerable by a buggy
userspace filesystem.  The cure, I think, is worse than the disease so disable
the warning.

Reported-by: Tero Roponen &lt;tero.roponen@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>fuse: avoid out-of-scope stack access</title>
<updated>2013-02-04T14:22:23Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2013-02-04T13:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a4e922c3db06f7da27e072729e047185c2fba66'/>
<id>urn:sha1:6a4e922c3db06f7da27e072729e047185c2fba66</id>
<content type='text'>
The all pointers within fuse_req must point to valid memory once
fuse_force_forget() returns.

This bug appeared in "fuse: implement NFS-like readdirplus support"
and was never in any official Linux release.

I tested the fuse_force_forget() code path by injecting to fake -ENOMEM and
verified the FORGET operation was called properly in userspace.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>FUSE: Adapt readdirplus to application usage patterns</title>
<updated>2013-01-31T16:08:11Z</updated>
<author>
<name>Feng Shuo</name>
<email>steve.shuo.feng@gmail.com</email>
</author>
<published>2013-01-15T03:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4582a4ab2a0e7218449fb2e895d0aae9ea753c94'/>
<id>urn:sha1:4582a4ab2a0e7218449fb2e895d0aae9ea753c94</id>
<content type='text'>
Use the same adaptive readdirplus mechanism as NFS:

http://permalink.gmane.org/gmane.linux.nfs/49299

If the user space implementation wants to disable readdirplus
temporarily, it could just return ENOTSUPP. Then kernel will
recall it with readdir.

Signed-off-by: Feng Shuo &lt;steve.shuo.feng@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
</feed>
