RFC namespace enter through hijack
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | namespace enter: introduce do_fork_task()arch/ arch/ include/ +7 more | +93 | 0 replies | |
| 2/2 | namespace enter: introduce sys_hijack (v3)arch/ arch/ include/ +4 more | +68 | 6 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC] [PATCH 0/2] namespace enter through hijack
This patchset implements namespace entering by forcing a task in the target namespace to clone itself. This has some advantages over just replacing a random task's namespace pointers to the target ones. In particular
1. If switching pid namespaces, the stack of upids is automatically correctly generated.
2. Security context is inherited from the target task. Assuming a security module which labels data based on the task security context, like selinux, this may prevent severe mislabeling of container data by an inadvertant host system administrator action. Whether that works or not will still depend on the policy and the task cloned.
While this version takes a pid of a process to clone (for convenience of prototyping) we may prefer to use a ns_container name and choose one of it's tasks, to prevent pid wraparound.
Tested and 'works for me', but at the moment I'm just sending this out for discussion.
Alternatives to this include bind_ns()+switch_ns() by Cedric and the ns_container namespace entering enhancements I've previously sent.
thanks,
-serge