LWN: Comments on "Filesystem UID mapping for user namespaces: yet another shiftfs" https://lwn.net/Articles/812504/ This is a special feed containing comments posted to the individual LWN article titled "Filesystem UID mapping for user namespaces: yet another shiftfs". en-us Thu, 02 Oct 2025 00:28:38 +0000 Thu, 02 Oct 2025 00:28:38 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812862/ https://lwn.net/Articles/812862/ helsleym <div class="FormattedComment"> Seems to me that not exposing the FSID is a big advantage of the other approaches. Keeping them an internal detail of the kernel that userspace need not be concerned with and expecting userspace to deal with (bind) mounts instead -- as it already does -- seems conceptually simpler to me in addition to the already-mentioned flexibility advantages.<br> </div> Wed, 19 Feb 2020 18:00:14 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812783/ https://lwn.net/Articles/812783/ jejb <div class="FormattedComment"> Since I wasn't present for all the discussions, I'm not entirely sure this is what was discussed. However, I do think putting the unpacker in a user namespace is how this is supposed to work. As you say this avoids all the chown dances. This also starts deprivileging pieces of kubernetes as well which people are finally starting to agree is a good thing.<br> </div> Wed, 19 Feb 2020 03:01:30 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812776/ https://lwn.net/Articles/812776/ roc <div class="FormattedComment"> How would an in-kernel container ID help here?<br> </div> Tue, 18 Feb 2020 19:53:27 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812766/ https://lwn.net/Articles/812766/ dezgeg <div class="FormattedComment"> <font class="QuotedText">&gt; Also, if this is container related, presumably we’d rather not leave container cruft behind on files in a file system that is just being temporarily used.</font><br> <p> Yes, this is a good point. Also, what would happen if two different containers need to share the same filesystem from host. Or how would one give a read-only filesystem to a container.<br> </div> Tue, 18 Feb 2020 16:11:22 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812764/ https://lwn.net/Articles/812764/ vgoyal <div class="FormattedComment"> I am wondering why is it being called shiftfs equivalent. IIUC, on disk UID is not container UID. That's going to be translated UID. I thought with shiftfs, container created files showed on disk with container UID. Shiftfs also solved the issue of not having to do chmod. This patchset will still require doing a chmod (until and unless images have been pulled from inside the user namespace). Am I missing something.<br> </div> Tue, 18 Feb 2020 16:09:39 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812724/ https://lwn.net/Articles/812724/ jejb <div class="FormattedComment"> <font class="QuotedText">&gt; this one involves a theoretically simpler approach that makes almost no changes to the kernel's filesystem layer at all.</font><br> <p> The diffstat doesn't entirely support that:<br> <p> fs/attr.c | 23 +-<br> fs/devpts/inode.c | 7 +-<br> fs/exec.c | 25 +-<br> fs/inode.c | 7 +-<br> fs/namei.c | 36 +-<br> fs/open.c | 16 +-<br> fs/posix_acl.c | 17 +-<br> fs/proc/array.c | 5 +-<br> fs/proc/base.c | 34 ++<br> fs/stat.c | 48 +-<br> <br> This is pretty much in-line with the vfs changes all the other solutions needed to add the missing mappings<br> </div> Tue, 18 Feb 2020 15:28:54 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812723/ https://lwn.net/Articles/812723/ Paf <div class="FormattedComment"> Sure, but why add another?<br> <p> Also, if this is container related, presumably we’d rather not leave container cruft behind on files in a file system that is just being temporarily used.<br> </div> Tue, 18 Feb 2020 14:11:25 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812715/ https://lwn.net/Articles/812715/ snajpa <div class="FormattedComment"> So, another +1 for User namespace awkwardness...<br> <p> So you see, it would still be a bad idea to have in kernel container id, lol.<br> <p> Let's continue on rather with this madness and keep smiling, like everything is just ok :-D<br> </div> Tue, 18 Feb 2020 12:02:21 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812705/ https://lwn.net/Articles/812705/ edomaur <div class="FormattedComment"> It would be slower but you probably can. However you will still need to implement the container UID perspective somewhere : in the SELinux case, you need to add a whole bunch of hooks in the process and filesystem management parts in the kernel, so it would probably be something quite intrusive too.<br> </div> Tue, 18 Feb 2020 09:13:17 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812696/ https://lwn.net/Articles/812696/ dezgeg <div class="FormattedComment"> Don't you already get one per file when using something like SELinux?<br> </div> Tue, 18 Feb 2020 08:12:41 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812686/ https://lwn.net/Articles/812686/ willy <div class="FormattedComment"> You want to add an xattr to every file? They're not free, you know<br> </div> Tue, 18 Feb 2020 00:50:56 +0000 Filesystem UID mapping for user namespaces: yet another shiftfs https://lwn.net/Articles/812684/ https://lwn.net/Articles/812684/ tau <div class="FormattedComment"> I wonder why a container-local UID can't be stored in an xattr instead.<br> </div> Tue, 18 Feb 2020 00:21:36 +0000