[PATCH v2 1/4] userns: introduce capability bounding set for user namespaces

Jarkko Sakkinen jarkko at kernel.org
Thu Nov 19 20:14:16 UTC 2026


On Thu, Nov 19, 2026 at 07:19:53PM +0000, Hallgrimur H. Gunnarsson wrote:
> On Thu, Nov 19, 2026 at 05:05:26PM +0200, Jarkko Sakkinen wrote:
> > On Thu, Nov 19, 2026 at 10:42:05AM +0000, Hallgrimur H. Gunnarsson wrote:
> > >  static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns)
> > 
> > I read the diff through but this led me to dead end. Cannot find this
> > function from anywhere. I look the changes again once this is sorted
> > out becaus this is interesting.
> > 
> > I wanted to look at the call site to understand how cap_bset gets set,
> > which is not now possible but I do get the gist and agree with it.
> 
> Thanks for taking a look. The series is based on v7.4-rc1 and
> set_cred_user_ns() lives in kernel/user_namespace.c, where it is called
> from create_user_ns() and userns_install(). ns->cap_bset itself is
> initialized in create_user_ns() right before calling set_cred_user_ns().
> 
> > I'd figure getting this relates to my rootns patches (perhas). One key
> > mechanism for me resolving the unprivileged in my use case is
> > MOVE_MOUNT_T_MNTNS [1], which is orthogonal but just pointing out
> > the problem space.
> 
> From a quick look, they appear complementary. Being able to do more
> setup operations from the outside generally aligns with bounding
> capabilities inside the user namespace.
> 
> > I read through https://lwn.net/Articles/978846/ to understand the topic
> > overall. Just mentionining as a possible addition to the cover letter
> > (not a priority/necessity).
> 
> That LWN article is actually linked in the cover letter as [2].
> 
> > Hope these help and can be kept in the loop :-)
> 
> Will do, I'll keep you CC'd on future revisions.

Thank you.

Br, Jarkko



More information about the Linux-security-module-archive mailing list