Re: [PATCH RESEND v2 15/18] fuse: Add support for pid namespaces

From
Seth Forshee <hidden>
Date
2016-03-09 14:17:41
Also in
dm-devel, linux-bcache, linux-fsdevel, lkml, selinux
Reply to
Miklos Szeredi, 2016-03-09
On Wed, Mar 09, 2016 at 11:53:17AM +0100, Miklos Szeredi wrote:
On Mon, Jan 04, 2016 at 12:03:54PM -0600, Seth Forshee wrote:
quoted
If the userspace process servicing fuse requests is running in
a pid namespace then pids passed via the fuse fd need to be
translated relative to that namespace. Capture the pid namespace
in use when the filesystem is mounted and use this for pid
translation.

Since no use case currently exists for changing namespaces all
translations are done relative to the pid namespace in use when
/dev/fuse is opened.
The above doesn't match what the patch does.

 - FUSE captures namespace at mount time

 - CUSE captures namespace at /dev/cuse open
Possibly an earlier version of the patch worked that way and I forgot to
update the description after it change. Anyway, I'll fix it.
quoted
 Mounting or /dev/fuse IO from another
namespace will return errors.

Requests from processes whose pid cannot be translated into the
target namespace are not permitted, except for requests
allocated via fuse_get_req_nofail_nopages. For no-fail requests
in.h.pid will be 0 if the pid translation fails.

File locking changes based on previous work done by Eric
Biederman.

Signed-off-by: Seth Forshee <redacted>
Signed-off-by: Miklos Szeredi <redacted>
Not sure how my SOB got on this patch, use this instead:

Acked-by: Miklos Szeredi <redacted>
My memory is that you had sent a patch as a proposed alternative to one
of my earlier patches, and I squashed the two together and added your
SOB at that point. I'll change it.

Thanks,
Seth
Thread (33 messages) 33 messages, 2 authors, last reply 2016-03-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help