From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751962AbcGXFX2 (ORCPT ); Sun, 24 Jul 2016 01:23:28 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:58124 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbcGXFX0 (ORCPT ); Sun, 24 Jul 2016 01:23:26 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Andrey Vagin Cc: LKML , James Bottomley , Serge Hallyn , Linux API , Linux Containers , Alexander Viro , "criu\@openvz.org" , linux-fsdevel , "Michael Kerrisk \(man-pages\)" References: <1468520419-28220-1-git-send-email-avagin@openvz.org> Date: Sun, 24 Jul 2016 00:10:21 -0500 In-Reply-To: (Andrey Vagin's message of "Thu, 14 Jul 2016 15:02:53 -0700") Message-ID: <87poq3liyq.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1bRBsk-00060e-U7;;;mid=<87poq3liyq.fsf@x220.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=67.3.204.119;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/KPE9usNMsjb2ZK9N38L32dGFgWN1FlqU= X-SA-Exim-Connect-IP: 67.3.204.119 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Andrey Vagin X-Spam-Relay-Country: X-Spam-Timing: total 4004 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 5 (0.1%), b_tie_ro: 3.6 (0.1%), parse: 1.24 (0.0%), extract_message_metadata: 29 (0.7%), get_uri_detail_list: 3.4 (0.1%), tests_pri_-1000: 13 (0.3%), tests_pri_-950: 1.11 (0.0%), tests_pri_-900: 0.91 (0.0%), tests_pri_-400: 33 (0.8%), check_bayes: 31 (0.8%), b_tokenize: 9 (0.2%), b_tok_get_all: 10 (0.2%), b_comp_prob: 3.0 (0.1%), b_tok_touch_all: 3.8 (0.1%), b_finish: 0.92 (0.0%), tests_pri_0: 222 (5.5%), check_dkim_signature: 0.48 (0.0%), check_dkim_adsp: 4.1 (0.1%), tests_pri_500: 3695 (92.3%), poll_dns_idle: 3685 (92.0%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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