Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbbLTX7i (ORCPT ); Sun, 20 Dec 2015 18:59:38 -0500 Received: from mgwkm03.jp.fujitsu.com ([202.219.69.170]:19191 "EHLO mgwkm03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbbLTX7g (ORCPT ); Sun, 20 Dec 2015 18:59:36 -0500 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.3.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20150223 X-SHieldMailCheckerMailID: cad9d4de7ea3448083d70f33d95402c6 Subject: Re: [Propose] Isolate core_pattern in mnt namespace. To: "Eric W. Biederman" , Dongsheng Yang References: <56729B3D.1040502@cn.fujitsu.com> <56760F05.3020308@cn.fujitsu.com> <20151220023712.GT20997@ZenIV.linux.org.uk> <567616D6.6060202@cn.fujitsu.com> <87fuyx1mfn.fsf@x220.int.ebiederm.org> Cc: Al Viro , containers@lists.linux-foundation.org, LKML , cgroups@vger.kernel.org From: Kamezawa Hiroyuki Message-ID: <567740BA.9070307@jp.fujitsu.com> Date: Mon, 21 Dec 2015 08:58:50 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <87fuyx1mfn.fsf@x220.int.ebiederm.org> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2580 Lines: 69 On 2015/12/20 18:47, Eric W. Biederman wrote: > Dongsheng Yang writes: > >> On 12/20/2015 10:37 AM, Al Viro wrote: >>> On Sun, Dec 20, 2015 at 10:14:29AM +0800, Dongsheng Yang wrote: >>>> On 12/17/2015 07:23 PM, Dongsheng Yang wrote: >>>>> Hi guys, >>>>> We are working on making core dump behaviour isolated in >>>>> container. But the problem is, the /proc/sys/kernel/core_pattern >>>>> is a kernel wide setting, not belongs to a container. >>>>> >>>>> So we want to add core_pattern into mnt namespace. What >>>>> do you think about it? >>>> >>>> Hi Eric, >>>> I found your patch about "net: Implement the per network namespace >>>> sysctl infrastructure", I want to do the similar thing >>>> in mnt namespace. Is that suggested way? >>> >>> Why mnt namespace and not something else? >> >> Hi Al, >> >> Well, because core_pattern indicates the path to store core file. >> In different mnt namespace, we would like to change the path with >> different value. >> >> In addition, Let's considering other namespaces: >> UTS ns: contains informations of kernel and arch, not proper for core_pattern. >> IPC ns: communication informations, not proper for core_pattern >> PID ns: core_pattern is not related with pid >> net ns: obviousely no. >> user ns: not proper too. >> >> Then I believe it's better to do this in mnt namespace. of course, >> core_pattern is just one example. After this infrastructure finished, >> we can implement more sysctls as per-mnt if necessary, I think. >> >> Al, what do you think about this idea? > > The hard part is not the sysctl. The hard part is starting the usermode > helper, in an environment that it can deal with. The mount namespace > really provides you with no help there. > Let me ask. I think user-mode-helper shouldn be found in container's namespace. Or Do you mean running user-mode-helper out of a container ? I think if a user need to send cores to outside of a container, a file descriptor or a network end point should be able to be passed to sysctl. Thanks, -Kame > Eric > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/