From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161404AbcBQUZI (ORCPT ); Wed, 17 Feb 2016 15:25:08 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:48663 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161057AbcBQUZE (ORCPT ); Wed, 17 Feb 2016 15:25:04 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Mateusz Guzik Cc: Zhao Lei , containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20160216142608.GA16757@mguzik> Date: Wed, 17 Feb 2016 14:15:24 -0600 In-Reply-To: <20160216142608.GA16757@mguzik> (Mateusz Guzik's message of "Tue, 16 Feb 2016 15:26:09 +0100") Message-ID: <87k2m33xgj.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-AID: U2FsdGVkX18QOVzMPa3uormE1YBV37X1pYjw48kEAjc= X-SA-Exim-Connect-IP: 67.3.245.179 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.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 * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Mateusz Guzik X-Spam-Relay-Country: X-Spam-Timing: total 327 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.2 (1.0%), b_tie_ro: 2.3 (0.7%), parse: 1.01 (0.3%), extract_message_metadata: 3.9 (1.2%), get_uri_detail_list: 1.87 (0.6%), tests_pri_-1000: 3.2 (1.0%), tests_pri_-950: 1.17 (0.4%), tests_pri_-900: 0.94 (0.3%), tests_pri_-400: 21 (6.4%), check_bayes: 20 (6.1%), b_tokenize: 4.7 (1.4%), b_tok_get_all: 8 (2.3%), b_comp_prob: 1.74 (0.5%), b_tok_touch_all: 2.5 (0.8%), b_finish: 0.62 (0.2%), tests_pri_0: 278 (85.0%), check_dkim_signature: 0.45 (0.1%), check_dkim_adsp: 2.9 (0.9%), tests_pri_500: 3.6 (1.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] Make core_pattern support namespace 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 in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mateusz Guzik writes: > On Tue, Feb 16, 2016 at 07:33:39PM +0800, Zhao Lei wrote: >> Currently, each container shared one copy of coredump setting >> with the host system, if host system changed the setting, each >> running containers will be affected. >> >> Moreover, it is not easy to let each container keeping their own >> coredump setting. >> >> We can use some workaround as pipe program to make the second >> requirement possible, but it is not simple, and both host and >> container are limited to set to fixed pipe program. >> In one word, for host running contailer, we can't change core_pattern >> anymore. >> To make the problem more hard, if a host running more than one >> container product, each product will try to snatch the global >> coredump setting to fit their own requirement. >> >> For container based on namespace design, it is good to allow >> each container keeping their own coredump setting. >> >> It will bring us following benefit: >> 1: Each container can change their own coredump setting >> based on operation on /proc/sys/kernel/core_pattern >> 2: Coredump setting changed in host will not affect >> running containers. >> 3: Support both case of "putting coredump in guest" and >> "putting curedump in host". >> >> Each namespace-based software(lxc, docker, ..) can use this function >> to custom their dump setting. >> >> And this function makes each continer working as separate system, >> it fit for design goal of namespace. >> > > Sorry if this is a false alarm, I don't have easy means to test it, but > is not this an immediate privilege escalation? It is. This is why we do not currently have a per namespace setting. Solving the user mode helper problem is technically a fair amount of work, if not theoretically challenging. Eric