From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423306AbbEOBgk (ORCPT ); Thu, 14 May 2015 21:36:40 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:47731 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422667AbbEOBgh (ORCPT ); Thu, 14 May 2015 21:36:37 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Paul Moore Cc: Steve Grubb , Richard Guy Briggs , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-audit@redhat.com, eparis@parisplace.org, arozansk@redhat.com, serge@hallyn.com, zohar@linux.vnet.ibm.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org References: <20150512195759.GA9832@madcap2.tricolour.ca> <2918460.dpKocsKt4o@x2> <12675437.ssZNCck7zG@sifl> Date: Thu, 14 May 2015 20:31:45 -0500 In-Reply-To: <12675437.ssZNCck7zG@sifl> (Paul Moore's message of "Thu, 14 May 2015 15:19:33 -0400") Message-ID: <87bnhmbp8e.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1/vgckjqDVWcVP2qMXT7jYeRZB7MaseP0A= X-SA-Exim-Connect-IP: 67.3.205.90 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 * [sa05 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Paul Moore X-Spam-Relay-Country: X-Spam-Timing: total 1369 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.8 (0.3%), b_tie_ro: 2.6 (0.2%), parse: 0.93 (0.1%), extract_message_metadata: 7 (0.5%), get_uri_detail_list: 3.4 (0.2%), tests_pri_-1000: 4.4 (0.3%), tests_pri_-950: 1.34 (0.1%), tests_pri_-900: 1.10 (0.1%), tests_pri_-400: 25 (1.9%), check_bayes: 24 (1.8%), b_tokenize: 8 (0.6%), b_tok_get_all: 9 (0.6%), b_comp_prob: 2.8 (0.2%), b_tok_touch_all: 3.0 (0.2%), b_finish: 0.75 (0.1%), tests_pri_0: 1307 (95.4%), tests_pri_500: 7 (0.5%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH V6 05/10] audit: log creation and deletion of namespace instances X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -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 Paul Moore writes: > As Eric, and others, have stated, the container concept is a userspace idea, > not a kernel idea; the kernel only knows, and cares about, namespaces. This > is unlikely to change. > > However, as Steve points out, there is precedence for the kernel to record > userspace tokens for the sake of audit. Personally I'm not a big fan of this > in general, but I do recognize that it does satisfy a legitimate need. Think > of things like auid and the sessionid as necessary evils; audit is already > chock full of evilness I doubt one more will doom us all to hell. > > Moving forward, I'd like to see the following: > * Create a container ID token (unsigned 32-bit integer?), similar to > auid/sessionid, that is set by userspace and carried by the kernel to be used > in audit records. I'd like to see some discussion on how we manage this, e.g. > how do handle container ID inheritance, how do we handle nested containers > (setting the containerid when it is already set), do we care if multiple > different containers share the same namespace config, etc.? > Can we all live with this? If not, please suggest some alternate ideas; > simply shouting "IT'S ALL CRAP!" isn't helpful for anyone ... it may be true, > but it doesn't help us solve the problem ;) Without stopping and defining what someone means by container I think it is pretty much nonsense. Should every vsftp connection get a container every? Every chrome tab? At some of the connections per second numbers I have seen we might exhaust a 32bit number in an hour or two. Will any of that make sense to someone reading the audit logs? Without considerning that container creation is an unprivileged operation I think it is pretty much nonsense. Do I get to say I am any container I want? That would seem to invalidate the concept of userspace setting a container id. How does any of this interact with setns? AKA entering a container? I will go as far as looking at patches. If someone comes up with a mission statement about what they are actually trying to achieve and a mechanism that actually achieves that, and that allows for containers to nest we can talk about doing something like that. But for right now I just hear proposals for things that make no sense and can not possibly work. Not least because it will require modifying every program that creates a container and who knows how many of them there are. Especially since you don't need to be root. Modifying /usr/bin/unshare seems a little far out to me. Eric