From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757295AbcGJUmU (ORCPT ); Sun, 10 Jul 2016 16:42:20 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:44457 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757207AbcGJUmS (ORCPT ); Sun, 10 Jul 2016 16:42:18 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Andrew Vagin Cc: "W. Trevor King" , , Linux API , Containers , lkml , James Bottomley , "Michael Kerrisk \(man-pages\)" , "Serge E. Hallyn" References: <87r3b7pxja.fsf@x220.int.ebiederm.org> <20160706141348.GB20728@mail.hallyn.com> <20160707133631.GA2994@mail.hallyn.com> <1467903712.2347.16.camel@HansenPartnership.com> <20160709031528.GA25507@odin.tremily.us> <87ziprmrln.fsf@x220.int.ebiederm.org> <20160710053609.GB4868@outlook.office365.com> Date: Sun, 10 Jul 2016 15:29:47 -0500 In-Reply-To: <20160710053609.GB4868@outlook.office365.com> (Andrew Vagin's message of "Sat, 9 Jul 2016 22:36:11 -0700") Message-ID: <87furhjkxw.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=1bMLYL-0001dX-HX;;;mid=<87furhjkxw.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=67.3.204.119;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX191MBEip6iciUFafdDQ8ly8PevyO24tbMA= 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 * 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 * [sa01 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa01 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Andrew Vagin X-Spam-Relay-Country: X-Spam-Timing: total 685 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 3.9 (0.6%), b_tie_ro: 2.8 (0.4%), parse: 1.25 (0.2%), extract_message_metadata: 34 (4.9%), get_uri_detail_list: 3.1 (0.4%), tests_pri_-1000: 13 (1.9%), tests_pri_-950: 1.98 (0.3%), tests_pri_-900: 1.63 (0.2%), tests_pri_-400: 36 (5.2%), check_bayes: 34 (5.0%), b_tokenize: 12 (1.8%), b_tok_get_all: 10 (1.4%), b_comp_prob: 4.9 (0.7%), b_tok_touch_all: 3.1 (0.5%), b_finish: 0.87 (0.1%), tests_pri_0: 582 (85.0%), check_dkim_signature: 0.82 (0.1%), check_dkim_adsp: 4.2 (0.6%), tests_pri_500: 6 (0.9%), rewrite_mail: 0.00 (0.0%) Subject: Re: [CRIU] Introspecting userns relationships to other 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 in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Vagin writes: > On Fri, Jul 08, 2016 at 10:13:08PM -0500, Eric W. Biederman wrote: >> "W. Trevor King" writes: >> >> > On Thu, Jul 07, 2016 at 08:01:52AM -0700, James Bottomley wrote: >> >> In theory, we could get nsfs to show this information as an option >> >> (just add a show_options entry to the superblock ops), but the >> >> problem is that although each namespace has a parent user_ns, >> >> there's no way to get it without digging in the namespace specific >> >> structure. Probably we should restructure to move it into >> >> ns_common, then we could display it (and enforce all namespaces >> >> having owning user_ns) but it would be a reasonably large (but >> >> mechanical) change. >> > >> > It sounds like everyone is either positive or or neutral on this >> > groundwork, even if we haven't decided if/how to expose the >> > information to userspace. I'm happy to work up a patch while the rest >> > of the discussion continues. I'm also happy to let someone else work >> > up the patch, if anyone else is chomping at the bit ;). >> >> I am dubious on moving all of the user namespace members into ns_common. >> >> I would happy to be proved wrong but I suspect in the cases where we >> actually use that user namespace the code will become uglier. Making >> the ordinary uses uglier to make a rare corner case nicer is the wrong >> trade off. >> >> But feel free to try it is certainly worth doing if it doesn't make the >> code that uses the user namespaces uglier. > > If it's interesting for someone, I have this patch in my tree > https://github.com/avagin/linux-task-diag/commit/63b32df68ae8d3a3842bae42bbcae3468db76d85 > > I can't say that it makes something uglier. I have only skimmed things but overall it looks better than I had feared. At the same time I really really don't like losing the parent pointer in the user namespace case. That is seriously obfuscating. Eric