All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamezawa Hiroyuki <kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
To: "Eric W. Biederman"
	<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
	Dongsheng Yang
	<yangds.fnst-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Cc: Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [Propose] Isolate core_pattern in mnt namespace.
Date: Mon, 21 Dec 2015 08:58:50 +0900	[thread overview]
Message-ID: <567740BA.9070307@jp.fujitsu.com> (raw)
In-Reply-To: <87fuyx1mfn.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>

On 2015/12/20 18:47, Eric W. Biederman wrote:
> Dongsheng Yang <yangds.fnst-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


WARNING: multiple messages have this Message-ID (diff)
From: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
	containers@lists.linux-foundation.org,
	LKML <linux-kernel@vger.kernel.org>,
	cgroups@vger.kernel.org
Subject: Re: [Propose] Isolate core_pattern in mnt namespace.
Date: Mon, 21 Dec 2015 08:58:50 +0900	[thread overview]
Message-ID: <567740BA.9070307@jp.fujitsu.com> (raw)
In-Reply-To: <87fuyx1mfn.fsf@x220.int.ebiederm.org>

On 2015/12/20 18:47, Eric W. Biederman wrote:
> Dongsheng Yang <yangds.fnst@cn.fujitsu.com> 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/
> 



  parent reply	other threads:[~2015-12-20 23:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 11:23 [Propose] Isolate core_pattern in mnt namespace Dongsheng Yang
2015-12-17 11:23 ` Dongsheng Yang
     [not found] ` <56729B3D.1040502-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2015-12-20  2:14   ` Dongsheng Yang
2015-12-20  2:14     ` Dongsheng Yang
     [not found]     ` <56760F05.3020308-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2015-12-20  2:37       ` Al Viro
2015-12-20  2:37         ` Al Viro
     [not found]         ` <20151220023712.GT20997-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2015-12-20  2:47           ` Dongsheng Yang
2015-12-20  2:47             ` Dongsheng Yang
     [not found]             ` <567616D6.6060202-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2015-12-20  9:47               ` Eric W. Biederman
2015-12-20  9:47               ` Eric W. Biederman
2015-12-20  9:47                 ` Eric W. Biederman
     [not found]                 ` <87fuyx1mfn.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2015-12-20 23:58                   ` Kamezawa Hiroyuki
2015-12-20 23:58                   ` Kamezawa Hiroyuki [this message]
2015-12-20 23:58                     ` Kamezawa Hiroyuki
2015-12-21  6:15                   ` Dongsheng Yang
2015-12-21  6:15                     ` Dongsheng Yang
     [not found]                     ` <567798EC.1040304-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2015-12-21 21:52                       ` Eric W. Biederman
2015-12-21 21:52                         ` Eric W. Biederman
2015-12-22  3:12                         ` Kamezawa Hiroyuki
     [not found]                           ` <5678BFA3.9090608-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2015-12-23  3:13                             ` Dongsheng Yang
2015-12-23  3:13                               ` Dongsheng Yang
2015-12-23  3:13                             ` Dongsheng Yang
     [not found]                         ` <87twnbzcz8.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2015-12-22  3:12                           ` Kamezawa Hiroyuki
2015-12-23  3:12                           ` Dongsheng Yang
2015-12-23  3:12                             ` Dongsheng Yang
2015-12-23  3:12                             ` Dongsheng Yang
     [not found]                             ` <567A1120.3070204-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2015-12-23 16:36                               ` Eric W. Biederman
2015-12-23 16:36                                 ` Eric W. Biederman
2015-12-23 16:36                                 ` Eric W. Biederman
     [not found]                                 ` <8760zpxgte.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-01-05  6:28                                   ` Dongsheng Yang
2016-01-05  6:28                                     ` Dongsheng Yang
     [not found]                                     ` <568B629E.5010806-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2016-01-05  7:58                                       ` Eric W. Biederman
2016-01-05  7:58                                         ` Eric W. Biederman
2016-01-05  6:28                                   ` Dongsheng Yang
2015-12-21  6:15                   ` Dongsheng Yang
2015-12-20  2:47           ` Dongsheng Yang
  -- strict thread matches above, loose matches on Subject: below --
2015-12-17 11:23 Dongsheng Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=567740BA.9070307@jp.fujitsu.com \
    --to=kamezawa.hiroyu-+cum20s59erqfuhtdcdx3a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    --cc=yangds.fnst-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.