All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces
@ 2016-07-14 18:20 ` Andrey Vagin
  0 siblings, 0 replies; 143+ messages in thread
From: Andrey Vagin @ 2016-07-14 18:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-api, containers, criu, linux-fsdevel, Andrey Vagin,
	Eric W. Biederman, James Bottomley, Michael Kerrisk (man-pages),
	W. Trevor King, Alexander Viro, Serge Hallyn

Each namespace has an owning user namespace and now there is not way
to discover these relationships.

Pid and user namepaces are hierarchical. There is no way to discover
parent-child relationships too.

Why we may want to know relationships between namespaces?

One use would be visualization, in order to understand the running system.
Another would be to answer the question: what capability does process X have to
perform operations on a resource governed by namespace Y?

One more use-case (which usually called abnormal) is checkpoint/restart.
In CRIU we age going to dump and restore nested namespaces.

There [1] was a discussion about which interface to choose to determing
relationships between namespaces.

Eric suggested to add two ioctl-s [2]:
> Grumble, Grumble.  I think this may actually a case for creating ioctls
> for these two cases.  Now that random nsfs file descriptors are bind
> mountable the original reason for using proc files is not as pressing.
>
> One ioctl for the user namespace that owns a file descriptor.
> One ioctl for the parent namespace of a namespace file descriptor.

Here is an implementaions of these ioctl-s.

[1] https://lkml.org/lkml/2016/7/6/158
[2] https://lkml.org/lkml/2016/7/9/101

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: "W. Trevor King" <wking@tremily.us>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Serge Hallyn <serge.hallyn@canonical.com>

--
2.5.5

^ permalink raw reply	[flat|nested] 143+ messages in thread
* [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces
@ 2016-07-14 18:20 Andrey Vagin
  0 siblings, 0 replies; 143+ messages in thread
From: Andrey Vagin @ 2016-07-14 18:20 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: James Bottomley, Andrey Vagin, Serge Hallyn,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Alexander Viro, criu-GEFAQzZX7r8dnm+yROfE0A, Eric W. Biederman,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA, Michael Kerrisk (man-pages)

Each namespace has an owning user namespace and now there is not way
to discover these relationships.

Pid and user namepaces are hierarchical. There is no way to discover
parent-child relationships too.

Why we may want to know relationships between namespaces?

One use would be visualization, in order to understand the running system.
Another would be to answer the question: what capability does process X have to
perform operations on a resource governed by namespace Y?

One more use-case (which usually called abnormal) is checkpoint/restart.
In CRIU we age going to dump and restore nested namespaces.

There [1] was a discussion about which interface to choose to determing
relationships between namespaces.

Eric suggested to add two ioctl-s [2]:
> Grumble, Grumble.  I think this may actually a case for creating ioctls
> for these two cases.  Now that random nsfs file descriptors are bind
> mountable the original reason for using proc files is not as pressing.
>
> One ioctl for the user namespace that owns a file descriptor.
> One ioctl for the parent namespace of a namespace file descriptor.

Here is an implementaions of these ioctl-s.

[1] https://lkml.org/lkml/2016/7/6/158
[2] https://lkml.org/lkml/2016/7/9/101

Cc: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "W. Trevor King" <wking-vJI2gpByivqcqzYg7KEe8g@public.gmane.org>
Cc: Alexander Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
Cc: Serge Hallyn <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

--
2.5.5

^ permalink raw reply	[flat|nested] 143+ messages in thread

end of thread, other threads:[~2016-08-02  9:49 UTC | newest]

Thread overview: 143+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 18:20 [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces Andrey Vagin
2016-07-14 18:20 ` Andrey Vagin
2016-07-14 18:20 ` [PATCH 1/5] namespaces: move user_ns into ns_common Andrey Vagin
     [not found]   ` <1468520419-28220-2-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2016-07-15 12:21     ` kbuild test robot
2016-07-15 12:21       ` kbuild test robot
2016-07-14 18:20 ` [PATCH 3/5] nsfs: add ioctl to get an owning user namespace for ns file descriptor Andrey Vagin
2016-07-14 18:48   ` W. Trevor King
2016-07-14 18:48     ` W. Trevor King
     [not found]   ` <1468520419-28220-4-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2016-07-14 18:48     ` W. Trevor King
2016-07-14 22:02 ` [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces Andrey Vagin
2016-07-14 22:02   ` Andrey Vagin
2016-07-24  5:10   ` Eric W. Biederman
2016-07-24  5:10     ` Eric W. Biederman
     [not found]     ` <87poq3liyq.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-26  2:07       ` Andrew Vagin
2016-07-26  2:07         ` Andrew Vagin
     [not found]   ` <CANaxB-xw_xBUq=0uT14ANv-jfg2NsGaPy=jyDO9=yF03_7toSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-15  2:12     ` [PATCH 1/5] namespaces: move user_ns into ns_common Andrey Vagin
2016-07-15  2:12       ` Andrey Vagin
2016-07-15  2:12       ` [PATCH 4/5] nsfs: add ioctl to get a parent namespace Andrey Vagin
2016-07-15  2:12         ` Andrey Vagin
     [not found]         ` <1468548742-32136-4-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2016-07-24  5:07           ` Eric W. Biederman
2016-07-24  5:07         ` Eric W. Biederman
2016-07-24  5:07           ` Eric W. Biederman
2016-07-15  2:12       ` [PATCH 5/5] tools/testing: add a test to check nsfs ioctl-s Andrey Vagin
     [not found]       ` <1468548742-32136-1-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2016-07-15  2:12         ` [PATCH 2/5] kernel: add a helper to get an owning user namespace for a namespace Andrey Vagin
2016-07-15  2:12           ` Andrey Vagin
     [not found]           ` <1468548742-32136-2-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2016-07-24  5:03             ` Eric W. Biederman
2016-07-24 16:54             ` W. Trevor King
2016-07-24 16:54               ` W. Trevor King
2016-07-24  5:03           ` Eric W. Biederman
2016-07-24  5:03             ` Eric W. Biederman
     [not found]             ` <878twrmxu2.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-24  6:37               ` Andrew Vagin
2016-07-24  6:37                 ` Andrew Vagin
     [not found]                 ` <20160724063728.GA17810-1ViLX0X+lBJGNQ1M2rI3KwRV3xvJKrda@public.gmane.org>
2016-07-24 14:30                   ` Eric W. Biederman
2016-07-24 14:30                 ` Eric W. Biederman
2016-07-24 14:30                   ` Eric W. Biederman
     [not found]                   ` <87shuzglck.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-24 17:05                     ` W. Trevor King
2016-07-24 17:05                       ` W. Trevor King
2016-07-15  2:12         ` [PATCH 3/5] nsfs: add ioctl to get an owning user namespace for ns file descriptor Andrey Vagin
2016-07-15  2:12           ` Andrey Vagin
2016-07-15  2:12         ` [PATCH 4/5] nsfs: add ioctl to get a parent namespace Andrey Vagin
2016-07-15  2:12         ` [PATCH 5/5] tools/testing: add a test to check nsfs ioctl-s Andrey Vagin
2016-07-16  8:21         ` [PATCH 1/5] namespaces: move user_ns into ns_common kbuild test robot
2016-07-16  8:21           ` kbuild test robot
2016-07-23 23:07         ` kbuild test robot
2016-07-23 23:07           ` kbuild test robot
2016-07-24  5:00         ` Eric W. Biederman
2016-07-24  5:00       ` Eric W. Biederman
2016-07-24  5:00         ` Eric W. Biederman
2016-07-24  5:54         ` Andrew Vagin
2016-07-24  5:54           ` Andrew Vagin
     [not found]         ` <87k2gbmy02.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-24  5:54           ` Andrew Vagin
2016-07-24  5:54             ` Andrew Vagin
2016-07-24  5:54           ` Andrew Vagin
2016-07-24  5:54             ` Andrew Vagin
2016-07-24  5:54         ` Andrew Vagin
2016-07-24  5:54           ` Andrew Vagin
2016-07-24  5:10     ` [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces Eric W. Biederman
2016-07-21 14:41 ` Michael Kerrisk (man-pages)
2016-07-21 14:41   ` Michael Kerrisk (man-pages)
     [not found]   ` <c9bdaf3d-ec93-d754-81ac-9f524a0d0954-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-21 21:06     ` Andrew Vagin
2016-07-21 21:06       ` Andrew Vagin
2016-07-21 21:06       ` Andrew Vagin
     [not found]       ` <20160721210650.GA10989-1ViLX0X+lBJGNQ1M2rI3KwRV3xvJKrda@public.gmane.org>
2016-07-22  6:48         ` Michael Kerrisk (man-pages)
     [not found]           ` <1515f5f2-5a49-fcab-61f4-8b627d3ba3e2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-22 18:25             ` Andrey Vagin
2016-07-22 18:25               ` Andrey Vagin
2016-07-25 11:47               ` Michael Kerrisk (man-pages)
2016-07-25 11:47                 ` Michael Kerrisk (man-pages)
     [not found]                 ` <e2811bf1-4b86-e115-bcdb-301d6f2546eb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-25 13:18                   ` Eric W. Biederman
2016-07-25 13:18                     ` Eric W. Biederman
     [not found]                     ` <87lh0pg8jx.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-25 14:46                       ` Michael Kerrisk (man-pages)
2016-07-25 14:46                         ` Michael Kerrisk (man-pages)
     [not found]                         ` <44ca0e41-dc92-45b1-2a6c-c41a048a072d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-25 14:54                           ` Serge E. Hallyn
2016-07-25 14:59                           ` Eric W. Biederman
2016-07-25 14:59                             ` Eric W. Biederman
     [not found]                             ` <87r3ahepb4.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-26  2:54                               ` Andrew Vagin
2016-07-26  2:54                                 ` Andrew Vagin
2016-07-26  8:03                                 ` Michael Kerrisk (man-pages)
2016-07-26  8:03                                   ` Michael Kerrisk (man-pages)
     [not found]                                   ` <3390535b-0660-757f-aeba-c03d936b3485-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-26 18:25                                     ` Andrew Vagin
2016-07-26 18:25                                       ` Andrew Vagin
2016-07-26 18:32                                       ` W. Trevor King
2016-07-26 18:32                                         ` W. Trevor King
     [not found]                                         ` <20160726183224.GN24913-q4NCUed9G3sTnwFZoN752g@public.gmane.org>
2016-07-26 19:11                                           ` Andrew Vagin
2016-07-26 19:11                                             ` Andrew Vagin
     [not found]                                       ` <20160726182524.GA328-1ViLX0X+lBJGNQ1M2rI3KwRV3xvJKrda@public.gmane.org>
2016-07-26 18:32                                         ` W. Trevor King
2016-07-26 19:17                                         ` Michael Kerrisk (man-pages)
2016-07-26 19:17                                       ` Michael Kerrisk (man-pages)
     [not found]                                         ` <CAKgNAkjmOu+vfiMDyeYQkkf7wQBH9PVmJ4nH2CTg43GrN-k7eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-26 20:39                                           ` Andrew Vagin
2016-07-26 20:39                                             ` Andrew Vagin
2016-07-28 10:45                                             ` Michael Kerrisk (man-pages)
2016-07-28 10:45                                               ` Michael Kerrisk (man-pages)
     [not found]                                               ` <ca0787a3-b270-e962-46d1-7e63c9335a55-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-28 12:56                                                 ` Eric W. Biederman
2016-07-28 12:56                                                   ` Eric W. Biederman
2016-07-28 19:00                                                   ` Michael Kerrisk (man-pages)
2016-07-29 18:05                                                     ` Eric W. Biederman
2016-07-29 18:05                                                       ` Eric W. Biederman
     [not found]                                                       ` <87h9b8e2v7.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-31 21:31                                                         ` Michael Kerrisk (man-pages)
2016-07-31 21:31                                                           ` Michael Kerrisk (man-pages)
2016-08-01 23:01                                                         ` Andrew Vagin
2016-08-01 23:01                                                           ` Andrew Vagin
     [not found]                                                     ` <40e35f1a-10e6-b7a5-936e-a09f008be0d0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-29 18:05                                                       ` Eric W. Biederman
     [not found]                                                   ` <87popxkjjp.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-28 19:00                                                     ` Michael Kerrisk (man-pages)
     [not found]                                             ` <20160726203955.GA9415-1ViLX0X+lBJGNQ1M2rI3KwRV3xvJKrda@public.gmane.org>
2016-07-28 10:45                                               ` Michael Kerrisk (man-pages)
     [not found]                                 ` <20160726025455.GC26206-1ViLX0X+lBJGNQ1M2rI3KwRV3xvJKrda@public.gmane.org>
2016-07-26  8:03                                   ` Michael Kerrisk (man-pages)
2016-07-26 19:38                                   ` Eric W. Biederman
2016-07-26 19:38                                     ` Eric W. Biederman
2016-07-25 14:54                         ` Serge E. Hallyn
2016-07-25 14:54                           ` Serge E. Hallyn
2016-07-25 15:17                           ` Eric W. Biederman
2016-07-25 15:17                             ` Eric W. Biederman
     [not found]                           ` <20160725145445.GA19879-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2016-07-25 15:17                             ` Eric W. Biederman
     [not found]               ` <CANaxB-w8H8Wo8FmtmBBZTpJX-ZDGRQx0rbm9E5c9WbduQ_Ukmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-25 11:47                 ` Michael Kerrisk (man-pages)
     [not found] ` <1468520419-28220-1-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2016-07-14 18:20   ` [PATCH 1/5] namespaces: move user_ns into ns_common Andrey Vagin
2016-07-14 18:20   ` [PATCH 2/5] kernel: add a helper to get an owning user namespace for a namespace Andrey Vagin
2016-07-14 18:20     ` Andrey Vagin
     [not found]     ` <1468520419-28220-3-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2016-07-14 19:07       ` W. Trevor King
2016-07-14 19:07         ` W. Trevor King
2016-07-14 18:20   ` [PATCH 3/5] nsfs: add ioctl to get an owning user namespace for ns file descriptor Andrey Vagin
2016-07-14 18:20   ` [PATCH 4/5] nsfs: add ioctl to get a parent namespace Andrey Vagin
2016-07-14 18:20     ` Andrey Vagin
2016-07-14 18:20   ` [PATCH 5/5] tools/testing: add a test to check nsfs ioctl-s Andrey Vagin
2016-07-14 18:20     ` Andrey Vagin
2016-07-14 22:02   ` [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces Andrey Vagin
2016-07-21 14:41   ` Michael Kerrisk (man-pages)
2016-07-23 21:14   ` W. Trevor King
2016-07-23 21:14     ` W. Trevor King
     [not found]     ` <20160723211414.GA25371-q4NCUed9G3sTnwFZoN752g@public.gmane.org>
2016-07-23 21:38       ` James Bottomley
2016-07-23 21:38         ` James Bottomley
     [not found]         ` <1469309936.2332.35.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2016-07-23 21:58           ` W. Trevor King
2016-07-23 21:58         ` W. Trevor King
2016-07-23 21:58           ` W. Trevor King
2016-07-23 21:56           ` Eric W. Biederman
2016-07-23 21:56             ` Eric W. Biederman
     [not found]             ` <87mvl8nhlv.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-23 22:34               ` W. Trevor King
2016-07-23 22:34                 ` W. Trevor King
     [not found]                 ` <20160723223448.GP24913-q4NCUed9G3sTnwFZoN752g@public.gmane.org>
2016-07-24  4:51                   ` Eric W. Biederman
2016-07-24  4:51                     ` Eric W. Biederman
     [not found]           ` <20160723215802.GO24913-q4NCUed9G3sTnwFZoN752g@public.gmane.org>
2016-07-23 21:56             ` Eric W. Biederman
2016-08-01 18:20   ` Alban Crequy
2016-08-01 18:20     ` Alban Crequy
     [not found]     ` <CAMXgnP6j+rTeb5XJgoPV20y8puGyVm=9O9gdg9Sah4DuF5qm9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-01 23:32       ` Andrew Vagin
2016-08-01 23:32         ` Andrew Vagin
2016-07-14 18:20 Andrey Vagin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.