Skip to content

user namespaces: introduction

Serge E. Hallyn containers 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 of 4 patches 3 repliesIn review

3 of 4 patches are in this archive. The cover letter announces 4.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
2/4containers: add CAP_NS_OVERRIDE capabilityinclude/linux/capability.h+8 -10 replies
3/4user namespaces: enforce CAP_NS_OVERRIDE for cross-namespace killkernel/signal.c+23 -00 replies
4/4user namespaces: handle user namespaces in file sigiofs/fcntl.c include/linux/fs.h+62 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] user namespaces: introduction

Here is a small patchset I've been sitting on for awhile to make signaling mostly subject to user namespaces. In particular,

1. store user_namespace in user struct
2. introduce CAP_NS_OVERRIDE
3. require CAP_NS_OVERRIDE to signal another user namespace

The first step should have been done all along. Else wouldn't a hash collision on (ns1, uid) and (ns2, uid), however unlikely, give us wrong results at uid_hash_find()?

The main remaining signaling+userns issue is of course the siginfo. Tacking a userns onto siginfo is a pain due to lifetime mgmt issues. I haven't decided whether to just catch all the callers and fake uid=0 if user namespaces aren't the same, introduce some unique non-refcounted id to represent (user,user_ns), or find some other way to deal with it.

thanks,
-serge