Skip to contentSkip to conversation

add user namespace

PATCH Al Boldi 2 participants 3 messages Jul 15, 2006 – Jul 17, 2006 VFS

lore
Share & tools
lore

Al Boldi

author
#0 lore raw
Quoted 6 lines · Trond Myklebust
Quoted 4 lines · Eric W. Biederman

I hope the confusion has passed for Trond. My impression was he figured this was per process data so it didn't make sense any where near a filesystem, and the superblock was the last place it should be.

Quoted 8 lines

You are still using the wrong abstraction. Data that is not global to the entire machine has absolutely _no_ place being put into the superblock. It doesn't matter if it is process-specific, container-specific or whatever-else-specific, it will still be vetoed.

If your real problem is uid/gid mapping on top of generic filesystems, then have you looked into the *BSD solution of using a stackable filesystem (i.e. umapfs)?

A stackable FS is really overkill here, when all that is needed is a simple mapping. An easy solution would be, to allow for perMount Handlers via hooks into the VFS, as was suggested in the '[RFC] VFS: FS CoW using redirection' thread.

Thanks!

--
Al

#1 lore raw
Quoted 9 lines · Al Boldi
Quoted 6 lines · Trond Myklebust
Quoted 1 line · Eric W. Biederman

I hope the confusion has passed for Trond. My impression was he figured this was per process data so it didn't make sense any where near a filesystem, and the superblock was the last place it should be.

You are still using the wrong abstraction. Data that is not global to the entire machine has absolutely _no_ place being put into the superblock. It doesn't matter if it is process-specific, container-specific or whatever-else-specific, it will still be vetoed.

If your real problem is uid/gid mapping on top of generic filesystems, then have you looked into the *BSD solution of using a stackable filesystem (i.e. umapfs)?

A stackable FS is really overkill here, when all that is needed is a simple mapping. An easy solution would be, to allow for perMount Handlers via hooks into the VFS, as was suggested in the '[RFC] VFS: FS CoW using redirection' thread.

IMHO a UID mapping is completely the wrong solution for this. The problem is the the subject (the process) and object (the filesystem) place different meanings on different UIDs, in other words their UIDs are in different namespaces. The result is that you should tag that filesystem (vfsmount, really) with a different namespace tag and fix the namespace system to properly handle cross-namespace permissions, not forcibly graft on some fragile mapping system. By using the keyring system for foreign-namespace UID permissions the actual permissions fall out quite nicely.

Cheers,
Kyle Moffett

author
#2 lore raw
Quoted 17 lines · Kyle Moffett
Quoted 16 lines · Al Boldi
Quoted 14 lines · Trond Myklebust
Quoted 4 lines · Eric W. Biederman

I hope the confusion has passed for Trond. My impression was he figured this was per process data so it didn't make sense any where near a filesystem, and the superblock was the last place it should be.

You are still using the wrong abstraction. Data that is not global to the entire machine has absolutely _no_ place being put into the superblock. It doesn't matter if it is process-specific, container- specific or whatever-else-specific, it will still be vetoed.

If your real problem is uid/gid mapping on top of generic filesystems, then have you looked into the *BSD solution of using a stackable filesystem (i.e. umapfs)?

Quoted 6 lines
Quoted 4 lines

A stackable FS is really overkill here, when all that is needed is a simple mapping. An easy solution would be, to allow for perMount Handlers via hooks into the VFS, as was suggested in the '[RFC]
VFS: FS CoW using redirection' thread.

IMHO a UID mapping is completely the wrong solution for this.

Sure, maybe it is, but if it were needed, why would I implement it using an extra VFS below the VFS?

Quoted 6 lines

The problem is the subject (the process) and object (the filesystem) place different meanings on different UIDs, in other words their UIDs are in different namespaces. The result is that you should tag that filesystem (vfsmount, really) with a different namespace tag and fix the namespace system to properly handle cross-namespace permissions, not forcibly graft on some fragile mapping system.

Grafting is probably the wrong way to implement this too, so what I suggest is to have the VFS provide hooks (aka plug-ins) for perMount Handlers, which would relieve developers from the need to either merge their requirements with the VFS, or introduce a subVFS. This would imply more freedom, while at the same time reducing overhead.

Quoted 3 lines

By using the
keyring system for foreign-namespace UID permissions the actual permissions fall out quite nicely.

Maybe it is, for this specific situation.

Thanks!

--
Al