<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/orangefs/devorangefs-req.c, branch v4.9</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge branch 'misc' into for-next</title>
<updated>2016-09-28T18:50:46+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-09-28T18:50:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b78b11985a36bfe768add17ffb70bbaf9d8d7627'/>
<id>b78b11985a36bfe768add17ffb70bbaf9d8d7627</id>
<content type='text'>
Pull in an OrangeFS branch containing miscellaneous improvements.

- clean up debugfs globals
- remove dead code in sysfs
- reorganize duplicated sysfs attribute structs
- consolidate sysfs show and store functions
- remove duplicated sysfs_ops structures
- describe organization of sysfs
- make devreq_mutex static
- g_orangefs_stats -&gt; orangefs_stats for consistency
- rename most remaining global variables
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull in an OrangeFS branch containing miscellaneous improvements.

- clean up debugfs globals
- remove dead code in sysfs
- reorganize duplicated sysfs attribute structs
- consolidate sysfs show and store functions
- remove duplicated sysfs_ops structures
- describe organization of sysfs
- make devreq_mutex static
- g_orangefs_stats -&gt; orangefs_stats for consistency
- rename most remaining global variables
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: rename most remaining global variables</title>
<updated>2016-08-16T15:41:24+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-08-16T15:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1d503617884ed43af1c03685e73ce23f155d3fa4'/>
<id>1d503617884ed43af1c03685e73ce23f155d3fa4</id>
<content type='text'>
Only op_timeout_secs, slot_timeout_secs, and hash_table_size are left
because they are exposed as module parameters. All other global
variables have the orangefs_ prefix.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only op_timeout_secs, slot_timeout_secs, and hash_table_size are left
because they are exposed as module parameters. All other global
variables have the orangefs_ prefix.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: make devreq_mutex static</title>
<updated>2016-08-15T19:21:16+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-08-15T19:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a0fe051592f1d31db491bb6cdcc87f512c5b6eaa'/>
<id>a0fe051592f1d31db491bb6cdcc87f512c5b6eaa</id>
<content type='text'>
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: clean up debugfs globals</title>
<updated>2016-08-15T15:38:36+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-08-15T15:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=44f4641073f132429e1e9a53412600206e8f7d06'/>
<id>44f4641073f132429e1e9a53412600206e8f7d06</id>
<content type='text'>
Mostly this is moving code into orangefs-debugfs.c so that globals turn
into static globals.

Then gossip_debug_mask is renamed orangefs_gossip_debug_mask but keeps
global visibility, so it can be used from a macro.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly this is moving code into orangefs-debugfs.c so that globals turn
into static globals.

Then gossip_debug_mask is renamed orangefs_gossip_debug_mask but keeps
global visibility, so it can be used from a macro.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: add features op</title>
<updated>2016-08-12T19:12:54+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-08-12T16:02:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=482664ddba81b3a5404fd083bb9697dfffc0b6a4'/>
<id>482664ddba81b3a5404fd083bb9697dfffc0b6a4</id>
<content type='text'>
This is a new userspace operation, which will be done if the client-core
version is greater than or equal to 2.9.6. This will provide a way to
implement optional features and to determine which features are
supported by the client-core. If the client-core version is older than
2.9.6, no optional features are supported and the op will not be done.

The intent is to allow protocol extensions without relying on the
client-core's current behavior of ignoring what it doesn't understand.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a new userspace operation, which will be done if the client-core
version is greater than or equal to 2.9.6. This will provide a way to
implement optional features and to determine which features are
supported by the client-core. If the client-core version is older than
2.9.6, no optional features are supported and the op will not be done.

The intent is to allow protocol extensions without relying on the
client-core's current behavior of ignoring what it doesn't understand.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: record userspace version for feature compatbility</title>
<updated>2016-08-09T20:25:51+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-08-09T19:59:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f2ee3b759593c184f1249e03d613a84b4b69db2b'/>
<id>f2ee3b759593c184f1249e03d613a84b4b69db2b</id>
<content type='text'>
The client reports its version to the kernel on startup. We already test
that it is above the minimum version. Now we record it in a global
variable so code elsewhere can consult it before making a request the
client may not understand.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The client reports its version to the kernel on startup. We already test
that it is above the minimum version. Now we record it in a global
variable so code elsewhere can consult it before making a request the
client may not understand.

Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: fix namespace handling</title>
<updated>2016-07-05T19:47:43+00:00</updated>
<author>
<name>Jann Horn</name>
<email>jannh@google.com</email>
</author>
<published>2016-06-24T23:51:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=78fee0b6846f27872321338db6afe280f059ae99'/>
<id>78fee0b6846f27872321338db6afe280f059ae99</id>
<content type='text'>
In orangefs_inode_getxattr(), an fsuid is written to dmesg. The kuid is
converted to a userspace uid via from_kuid(current_user_ns(), [...]), but
since dmesg is global, init_user_ns should be used here instead.

In copy_attributes_from_inode(), op_alloc() and fill_default_sys_attrs(),
upcall structures are populated with uids/gids that have been mapped into
the caller's namespace. However, those upcall structures are read by
another process (the userspace filesystem driver), and that process might
be running in another namespace. This effectively lets any user spoof its
uid and gid as seen by the userspace filesystem driver.

To fix the second issue, I just construct the opcall structures with
init_user_ns uids/gids and require the filesystem server to run in the
init namespace. Since orangefs is full of global state anyway (as the error
message in DUMP_DEVICE_ERROR explains, there can only be one userspace
orangefs filesystem driver at once), that shouldn't be a problem.

[
Why does orangefs even exist in the kernel if everything does upcalls into
userspace? What does orangefs do that couldn't be done with the FUSE
interface? If there is no good answer to those questions, I'd prefer to see
orangefs kicked out of the kernel. Can that be done for something that
shipped in a release?

According to commit f7ab093f74bf ("Orangefs: kernel client part 1"), they
even already have a FUSE daemon, and the only rational reason (apart from
"but most of our users report preferring to use our kernel module instead")
given for not wanting to use FUSE is one "in-the-works" feature that could
probably be integated into FUSE instead.
]

This patch has been compile-tested.

Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In orangefs_inode_getxattr(), an fsuid is written to dmesg. The kuid is
converted to a userspace uid via from_kuid(current_user_ns(), [...]), but
since dmesg is global, init_user_ns should be used here instead.

In copy_attributes_from_inode(), op_alloc() and fill_default_sys_attrs(),
upcall structures are populated with uids/gids that have been mapped into
the caller's namespace. However, those upcall structures are read by
another process (the userspace filesystem driver), and that process might
be running in another namespace. This effectively lets any user spoof its
uid and gid as seen by the userspace filesystem driver.

To fix the second issue, I just construct the opcall structures with
init_user_ns uids/gids and require the filesystem server to run in the
init namespace. Since orangefs is full of global state anyway (as the error
message in DUMP_DEVICE_ERROR explains, there can only be one userspace
orangefs filesystem driver at once), that shouldn't be a problem.

[
Why does orangefs even exist in the kernel if everything does upcalls into
userspace? What does orangefs do that couldn't be done with the FUSE
interface? If there is no good answer to those questions, I'd prefer to see
orangefs kicked out of the kernel. Can that be done for something that
shipped in a release?

According to commit f7ab093f74bf ("Orangefs: kernel client part 1"), they
even already have a FUSE daemon, and the only rational reason (apart from
"but most of our users report preferring to use our kernel module instead")
given for not wanting to use FUSE is one "in-the-works" feature that could
probably be integated into FUSE instead.
]

This patch has been compile-tested.

Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: fix orangefs_superblock locking</title>
<updated>2016-03-26T11:22:00+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-03-25T23:56:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=45996492e5c85aa0ac93a95d1b2d1ed56851c865'/>
<id>45996492e5c85aa0ac93a95d1b2d1ed56851c865</id>
<content type='text'>
* switch orangefs_remount() to taking ORANGEFS_SB(sb) instead of sb
* remove from the list _before_ orangefs_unmount() - request_mutex
in the latter will make sure that nothing observed in the loop in
ORANGEFS_DEV_REMOUNT_ALL handling will get freed until the end
of loop
* on removal, keep the forward pointer and zero the back one.  That
way we can drop and regain the spinlock in the loop body (again,
ORANGEFS_DEV_REMOUNT_ALL one) and still be able to get to the
rest of the list.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* switch orangefs_remount() to taking ORANGEFS_SB(sb) instead of sb
* remove from the list _before_ orangefs_unmount() - request_mutex
in the latter will make sure that nothing observed in the loop in
ORANGEFS_DEV_REMOUNT_ALL handling will get freed until the end
of loop
* on removal, keep the forward pointer and zero the back one.  That
way we can drop and regain the spinlock in the loop body (again,
ORANGEFS_DEV_REMOUNT_ALL one) and still be able to get to the
rest of the list.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Orangefs: Extra sanity insurance on buffer before using string functions on it.</title>
<updated>2016-03-14T19:48:28+00:00</updated>
<author>
<name>Mike Marshall</name>
<email>hubcap@omnibond.com</email>
</author>
<published>2016-03-14T19:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=53f57fef43f5b9586c7a78acdeae27e206eae48b'/>
<id>53f57fef43f5b9586c7a78acdeae27e206eae48b</id>
<content type='text'>
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>orangefs: make fs_mount_pending static</title>
<updated>2016-03-09T18:26:39+00:00</updated>
<author>
<name>Martin Brandenburg</name>
<email>martin@omnibond.com</email>
</author>
<published>2016-03-05T18:17:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=acfcbaf1925f2dc5c46c61de69d756dec92a2ff8'/>
<id>acfcbaf1925f2dc5c46c61de69d756dec92a2ff8</id>
<content type='text'>
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Brandenburg &lt;martin@omnibond.com&gt;
Signed-off-by: Mike Marshall &lt;hubcap@omnibond.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
