Skip to content

nsproxy: attach to multiple namespaces

Christian Brauner linux-api lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 6 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nsproxy: add struct nssetfs/namespace.c include/linux/mnt_namespace.h include/linux/nsproxy.h +9 more+137 -362 replies
2/3nsproxy: attach to namespaces via pidfdsfs/namespace.c fs/nsfs.c include/linux/mnt_namespace.h +2 more+228 -194 replies
3/3selftests/pidfd: add pidfd setns teststools/testing/selftests/pidfd/.gitignore tools/testing/selftests/pidfd/Makefile tools/testing/selftests/pidfd/config +1 more+482 -10 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/3] nsproxy: attach to multiple namespaces

This is v3.
The permission bits have already seen some vetting which has been helpful and allowed us to drop the ns_capable_cred() patch. That's the only major change.

All selftests pass. People interested in playing with this can get it from three locations as usual (it's not yet in my for-next of course):
https://github.com/brauner/linux/tree/setns_pidfd
https://gitlab.com/brauner/linux/-/commits/setns_pidfd
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=setns_pidfd

May the Fourth be with you.
Christian

Christian Brauner (3):
nsproxy: add struct nsset
nsproxy: attach to namespaces via pidfds
selftests/pidfd: add pidfd setns tests

 fs/namespace.c                                |  15 +-
 fs/nsfs.c                                     |   7 +-
 include/linux/mnt_namespace.h                 |   2 +
 include/linux/nsproxy.h                       |  24 +
 include/linux/proc_fs.h                       |   6 +
 include/linux/proc_ns.h                       |   4 +-
 ipc/namespace.c                               |   7 +-
 kernel/cgroup/namespace.c                     |   5 +-
 kernel/nsproxy.c                              | 306 ++++++++++-
 kernel/pid_namespace.c                        |   5 +-
 kernel/time/namespace.c                       |   5 +-
 kernel/user_namespace.c                       |   8 +-
 kernel/utsname.c                              |   5 +-
 net/core/net_namespace.c                      |   5 +-
 tools/testing/selftests/pidfd/.gitignore      |   1 +
 tools/testing/selftests/pidfd/Makefile        |   3 +-
 tools/testing/selftests/pidfd/config          |   6 +
 .../selftests/pidfd/pidfd_setns_test.c        | 473 ++++++++++++++++++
 18 files changed, 839 insertions(+), 48 deletions(-)
 create mode 100644 tools/testing/selftests/pidfd/config
 create mode 100644 tools/testing/selftests/pidfd/pidfd_setns_test.c

base-commit: ae83d0b416db002fe95601e7f97f64b59514d936

Signature · 1 line
2.26.2