From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve1eur01on0116.outbound.protection.outlook.com ([104.47.1.116]:45712 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754068AbcGZCH4 (ORCPT ); Mon, 25 Jul 2016 22:07:56 -0400 Date: Mon, 25 Jul 2016 19:07:36 -0700 From: Andrew Vagin To: "Eric W. Biederman" CC: Andrey Vagin , LKML , James Bottomley , Serge Hallyn , Linux API , Linux Containers , Alexander Viro , "criu@openvz.org" , linux-fsdevel , "Michael Kerrisk (man-pages)" Subject: Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces Message-ID: <20160726020735.GB23617@outlook.office365.com> References: <1468520419-28220-1-git-send-email-avagin@openvz.org> <87poq3liyq.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Disposition: inline In-Reply-To: <87poq3liyq.fsf@x220.int.ebiederm.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Jul 24, 2016 at 12:10:21AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Hello, > > > > I forgot to add --cc-cover for git send-email, so everyone who is in > > Cc got only a cover letter. All messages were sent in mail lists. > > > > Sorry for inconvenience. > > Mostly the code looked sensible. But I had a couple of issues. > Resend this in September (when the merge window is closed and I am back > from vacation) and I will give this a thorough review and get this > merged. Or possibly next week if Linus releases another -rc Eric, thank you for the detailed comments. I will rework this series and send it after the merge window. > > > On Thu, Jul 14, 2016 at 11:20 AM, Andrey Vagin wrote: > >> 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" > >> Cc: James Bottomley > >> Cc: "Michael Kerrisk (man-pages)" > >> Cc: "W. Trevor King" > >> Cc: Alexander Viro > >> Cc: Serge Hallyn > > > Eric