<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/fs/fuse/cuse.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-02-13T12:15:14Z</updated>
<entry>
<title>fuse: clean up aborted</title>
<updated>2019-02-13T12:15:14Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2019-01-24T09:40:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=eb98e3bdf3aa7b15b40c65063ea935f953f60c6b'/>
<id>urn:sha1:eb98e3bdf3aa7b15b40c65063ea935f953f60c6b</id>
<content type='text'>
The only caller that needs fc-&gt;aborted set is fuse_conn_abort_write().
Setting fc-&gt;aborted is now racy (fuse_abort_conn() may already be in
progress or finished) but there's no reason to care.

Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: Add fuse_inode argument to fuse_prepare_release()</title>
<updated>2019-02-13T12:15:13Z</updated>
<author>
<name>Kirill Tkhai</name>
<email>ktkhai@virtuozzo.com</email>
</author>
<published>2018-11-09T10:33:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ebf84d0c7220c7c9b904c405e61175d2a50cfb39'/>
<id>urn:sha1:ebf84d0c7220c7c9b904c405e61175d2a50cfb39</id>
<content type='text'>
Here is preparation for next patches, which introduce new fi-&gt;lock for
protection of ff-&gt;write_entry linked into fi-&gt;write_files.

This patch just passes new argument to the function.

Signed-off-by: Kirill Tkhai &lt;ktkhai@virtuozzo.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: Support fuse filesystems outside of init_user_ns</title>
<updated>2018-03-20T16:11:44Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2018-02-21T17:18:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8cb08329b0809453722bc12aa912be34355bcb66'/>
<id>urn:sha1:8cb08329b0809453722bc12aa912be34355bcb66</id>
<content type='text'>
In order to support mounts from namespaces other than init_user_ns, fuse
must translate uids and gids to/from the userns of the process servicing
requests on /dev/fuse. This patch does that, with a couple of restrictions
on the namespace:

 - The userns for the fuse connection is fixed to the namespace
   from which /dev/fuse is opened.

 - The namespace must be the same as s_user_ns.

These restrictions simplify the implementation by avoiding the need to pass
around userns references and by allowing fuse to rely on the checks in
setattr_prepare for ownership changes.  Either restriction could be relaxed
in the future if needed.

For cuse the userns used is the opener of /dev/cuse.  Semantically the cuse
support does not appear safe for unprivileged users.  Practically the
permissions on /dev/cuse only make it accessible to the global root user.
If something slips through the cracks in a user namespace the only users
who will be able to use the cuse device are those users mapped into the
user namespace.

Translation in the posix acl is updated to use the uuser namespace of the
filesystem.  Avoiding cases which might bypass this translation is handled
in a following change.

This change is stronlgy based on a similar change from Seth Forshee and
Dongsu Park.

Cc: Seth Forshee &lt;seth.forshee@canonical.com&gt;
Cc: Dongsu Park &lt;dongsu@kinvolk.io&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: return -ECONNABORTED on /dev/fuse read after abort</title>
<updated>2018-03-20T16:11:44Z</updated>
<author>
<name>Szymon Lukasz</name>
<email>noh4hss@gmail.com</email>
</author>
<published>2017-11-09T20:23:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b7008b226f3de811d4ac34238e9cf670f7c9fe7'/>
<id>urn:sha1:3b7008b226f3de811d4ac34238e9cf670f7c9fe7</id>
<content type='text'>
Currently the userspace has no way of knowing whether the fuse
connection ended because of umount or abort via sysfs. It makes it hard
for filesystems to free the mountpoint after abort without worrying
about removing some new mount.

The patch fixes it by returning different errors when userspace reads
from /dev/fuse (-ENODEV for umount and -ECONNABORTED for abort).

Add a new capability flag FUSE_ABORT_ERROR. If set and the connection is
gone because of sysfs abort, reading from the device will return
-ECONNABORTED.

Signed-off-by: Szymon Lukasz &lt;noh4hss@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: honor iocb sync flags on write</title>
<updated>2017-09-12T14:57:53Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@redhat.com</email>
</author>
<published>2017-09-12T14:57:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e1c0eecba1a4154c35c400f1cc9a035e6246bbcd'/>
<id>urn:sha1:e1c0eecba1a4154c35c400f1cc9a035e6246bbcd</id>
<content type='text'>
If the IOCB_DSYNC flag is set a sync is not being performed by
fuse_file_write_iter.

Honor IOCB_DSYNC/IOCB_SYNC by setting O_DYSNC/O_SYNC respectively in the
flags filed of the write request.

We don't need to sync data or metadata, since fuse_perform_write() does
write-through and the filesystem is responsible for updating file times.

Original patch by Vitaly Zolotusky.

Reported-by: Nate Clark &lt;nate@neworld.us&gt;
Cc: Vitaly Zolotusky &lt;vitaly@unitc.com&gt;.
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>fuse: Add reference counting for fuse_io_priv</title>
<updated>2016-03-14T14:02:51Z</updated>
<author>
<name>Seth Forshee</name>
<email>seth.forshee@canonical.com</email>
</author>
<published>2016-03-11T16:35:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=744742d692e37ad5c20630e57d526c8f2e2fe3c9'/>
<id>urn:sha1:744742d692e37ad5c20630e57d526c8f2e2fe3c9</id>
<content type='text'>
The 'reqs' member of fuse_io_priv serves two purposes. First is to track
the number of oustanding async requests to the server and to signal that
the io request is completed. The second is to be a reference count on the
structure to know when it can be freed.

For sync io requests these purposes can be at odds.  fuse_direct_IO() wants
to block until the request is done, and since the signal is sent when
'reqs' reaches 0 it cannot keep a reference to the object. Yet it needs to
use the object after the userspace server has completed processing
requests. This leads to some handshaking and special casing that it
needlessly complicated and responsible for at least one race condition.

It's much cleaner and safer to maintain a separate reference count for the
object lifecycle and to let 'reqs' just be a count of outstanding requests
to the userspace server. Then we can know for sure when it is safe to free
the object without any handshaking or special cases.

The catch here is that most of the time these objects are stack allocated
and should not be freed. Initializing these objects with a single reference
that is never released prevents accidental attempts to free the objects.

Fixes: 9d5722b7777e ("fuse: handle synchronous iocbs internally")
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Seth Forshee &lt;seth.forshee@canonical.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>cuse: fix memory leak</title>
<updated>2015-11-10T09:32:36Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>miklos@szeredi.hu</email>
</author>
<published>2015-11-10T09:32:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2c5816b4beccc8ba709144539f6fdd764f8fa49c'/>
<id>urn:sha1:2c5816b4beccc8ba709144539f6fdd764f8fa49c</id>
<content type='text'>
The problem is that fuse_dev_alloc() acquires an extra reference to cc.fc,
and the original ref count is never dropped.

Reported-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
Fixes: cc080e9e9be1 ("fuse: introduce per-instance fuse_dev structure")
Cc: &lt;stable@vger.kernel.org&gt; # v4.2+
</content>
</entry>
<entry>
<title>fuse: introduce per-instance fuse_dev structure</title>
<updated>2015-07-01T14:26:08Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2015-07-01T14:26:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cc080e9e9be16ccf26135d366d7d2b65209f1d56'/>
<id>urn:sha1:cc080e9e9be16ccf26135d366d7d2b65209f1d56</id>
<content type='text'>
Allow fuse device clones to refer to be distinguished.  This patch just
adds the infrastructure by associating a separate "struct fuse_dev" with
each clone.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Reviewed-by: Ashish Samant &lt;ashish.samant@oracle.com&gt;
</content>
</entry>
<entry>
<title>fuse: duplicate -&gt;connected in iqueue</title>
<updated>2015-07-01T14:26:01Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2015-07-01T14:26:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e16714d8756dc1237a66994e139b61feebcf707a'/>
<id>urn:sha1:e16714d8756dc1237a66994e139b61feebcf707a</id>
<content type='text'>
This will allow checking -&gt;connected just with the input queue lock.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Reviewed-by: Ashish Samant &lt;ashish.samant@oracle.com&gt;
</content>
</entry>
<entry>
<title>make new_sync_{read,write}() static</title>
<updated>2015-04-12T02:29:40Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-04-03T19:41:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5d5d568975307877e9195f5305f4240e506a2807'/>
<id>urn:sha1:5d5d568975307877e9195f5305f4240e506a2807</id>
<content type='text'>
All places outside of core VFS that checked -&gt;read and -&gt;write for being NULL or
called the methods directly are gone now, so NULL {read,write} with non-NULL
{read,write}_iter will do the right thing in all cases.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
