[Devel] Re: [PATCH v3 04/11] memcg: add lock to synchronize page accounting and migration

2010-10-18 Thread Daisuke Nishimura
On Mon, 18 Oct 2010 17:39:37 -0700 Greg Thelen wrote: > From: KAMEZAWA Hiroyuki > > From: KAMEZAWA Hiroyuki > > Introduce a new bit spin lock, PCG_MOVE_LOCK, to synchronize > the page accounting and migration code. This reworks the > locking scheme of _update_stat() and _move_account() by >

[Devel] Re: [PATCH v3 03/11] memcg: create extensible page stat update routines

2010-10-18 Thread Daisuke Nishimura
On Mon, 18 Oct 2010 17:39:36 -0700 Greg Thelen wrote: > Replace usage of the mem_cgroup_update_file_mapped() memcg > statistic update routine with two new routines: > * mem_cgroup_inc_page_stat() > * mem_cgroup_dec_page_stat() > > As before, only the file_mapped statistic is managed. However, >

[Devel] [RFC][PATCH 2/2] memcg: move_account optimization by reduce locks (Re: [PATCH v3 04/11] memcg: add lock to synchronize page accounting and migration

2010-10-18 Thread KAMEZAWA Hiroyuki
From: KAMEZAWA Hiroyuki reduce lock at account moving. a patch "memcg: add lock to synchronize page accounting and migration" add a new lock and make locking cost twice. This patch is for reducing the cost. At moving charges by scanning page table, we do all jobs under pte_lock. This means we n

[Devel] [RFC][PATCH 1/2] memcg: move_account optimization by reduct put, get page (Re: [PATCH v3 04/11] memcg: add lock to synchronize page accounting and migration

2010-10-18 Thread KAMEZAWA Hiroyuki
On Tue, 19 Oct 2010 09:45:12 +0900 KAMEZAWA Hiroyuki wrote: > On Mon, 18 Oct 2010 17:39:37 -0700 > Greg Thelen wrote: > > > Performance Impact: moving a 8G anon process. > > > > Before: > > real0m0.792s > > user0m0.000s > > sys 0m0.780s > > > > After: > > real0

[Devel] Re: [PATCH v3 01/11] memcg: add page_cgroup flags for dirty page tracking

2010-10-18 Thread Daisuke Nishimura
On Mon, 18 Oct 2010 17:39:34 -0700 Greg Thelen wrote: > Add additional flags to page_cgroup to track dirty pages > within a mem_cgroup. > > Signed-off-by: KAMEZAWA Hiroyuki > Signed-off-by: Andrea Righi > Signed-off-by: Greg Thelen Acked-by: Daisuke Nishimura ___

[Devel] [PATCH v3 04/11] memcg: add lock to synchronize page accounting and migration

2010-10-18 Thread Greg Thelen
From: KAMEZAWA Hiroyuki From: KAMEZAWA Hiroyuki Introduce a new bit spin lock, PCG_MOVE_LOCK, to synchronize the page accounting and migration code. This reworks the locking scheme of _update_stat() and _move_account() by adding new lock bit PCG_MOVE_LOCK, which is always taken under IRQ disab

[Devel] Re: [PATCH v3 04/11] memcg: add lock to synchronize page accounting and migration

2010-10-18 Thread Minchan Kim
On Tue, Oct 19, 2010 at 9:39 AM, Greg Thelen wrote: > From: KAMEZAWA Hiroyuki > > From: KAMEZAWA Hiroyuki > > Introduce a new bit spin lock, PCG_MOVE_LOCK, to synchronize > the page accounting and migration code.  This reworks the > locking scheme of _update_stat() and _move_account() by > addin

[Devel] Re: [PATCH v3 11/11] memcg: check memcg dirty limits in page writeback

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:44 -0700 Greg Thelen wrote: > If the current process is in a non-root memcg, then > global_dirty_limits() will consider the memcg dirty limit. > This allows different cgroups to have distinct dirty limits > which trigger direct and background writeback at different > lev

[Devel] Re: [PATCH v3 10/11] writeback: make determine_dirtyable_memory() static.

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:43 -0700 Greg Thelen wrote: > The determine_dirtyable_memory() function is not used outside of > page writeback. Make the routine static. No functional change. > Just a cleanup in preparation for a change that adds memcg dirty > limits consideration into global_dirty_l

[Devel] [PATCH v3 11/11] memcg: check memcg dirty limits in page writeback

2010-10-18 Thread Greg Thelen
If the current process is in a non-root memcg, then global_dirty_limits() will consider the memcg dirty limit. This allows different cgroups to have distinct dirty limits which trigger direct and background writeback at different levels. Signed-off-by: Andrea Righi Signed-off-by: Greg Thelen ---

[Devel] Re: [PATCH v3 09/11] memcg: add cgroupfs interface to memcg dirty limits

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:42 -0700 Greg Thelen wrote: > Add cgroupfs interface to memcg dirty page limits: > Direct write-out is controlled with: > - memory.dirty_ratio > - memory.dirty_limit_in_bytes > > Background write-out is controlled with: > - memory.dirty_background_ratio > -

[Devel] Re: [PATCH v3 08/11] memcg: CPU hotplug lockdep warning fix

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:41 -0700 Greg Thelen wrote: > From: Balbir Singh > > memcg has lockdep warnings (sleep inside rcu lock) > > From: Balbir Singh > > Recent move to get_online_cpus() ends up calling get_online_cpus() from > mem_cgroup_read_stat(). However mem_cgroup_read_stat() is cal

[Devel] [PATCH v3 05/11] memcg: add dirty page accounting infrastructure

2010-10-18 Thread Greg Thelen
Add memcg routines to track dirty, writeback, and unstable_NFS pages. These routines are not yet used by the kernel to count such pages. A later change adds kernel calls to these new routines. Signed-off-by: Greg Thelen Signed-off-by: Andrea Righi --- Changelog since v1: - Renamed "nfs"/"total_

[Devel] Re: [PATCH v3 03/11] memcg: create extensible page stat update routines

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:36 -0700 Greg Thelen wrote: > Replace usage of the mem_cgroup_update_file_mapped() memcg > statistic update routine with two new routines: > * mem_cgroup_inc_page_stat() > * mem_cgroup_dec_page_stat() > > As before, only the file_mapped statistic is managed. However, >

[Devel] Re: [PATCH v3 07/11] memcg: add dirty limits to mem_cgroup

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:40 -0700 Greg Thelen wrote: > Extend mem_cgroup to contain dirty page limits. Also add routines > allowing the kernel to query the dirty usage of a memcg. > > These interfaces not used by the kernel yet. A subsequent commit > will add kernel calls to utilize these new

[Devel] Re: [PATCH v3 06/11] memcg: add kernel calls for memcg dirty page stats

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:39 -0700 Greg Thelen wrote: > Add calls into memcg dirty page accounting. Notify memcg when pages > transition between clean, file dirty, writeback, and unstable nfs. > This allows the memory controller to maintain an accurate view of > the amount of its memory that is

[Devel] Re: [PATCH v3 05/11] memcg: add dirty page accounting infrastructure

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:38 -0700 Greg Thelen wrote: > Add memcg routines to track dirty, writeback, and unstable_NFS pages. > These routines are not yet used by the kernel to count such pages. > A later change adds kernel calls to these new routines. > > Signed-off-by: Greg Thelen > Signed-of

[Devel] Re: [PATCH v3 02/11] memcg: document cgroup dirty memory interfaces

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:35 -0700 Greg Thelen wrote: > Document cgroup dirty memory interfaces and statistics. > > Signed-off-by: Andrea Righi > Signed-off-by: Greg Thelen I think you don't need to drop Ack if you have no major changes. Acked-by: KAMEZAWA Hiroyuki

[Devel] Re: [PATCH v3 04/11] memcg: add lock to synchronize page accounting and migration

2010-10-18 Thread KAMEZAWA Hiroyuki
On Mon, 18 Oct 2010 17:39:37 -0700 Greg Thelen wrote: > Performance Impact: moving a 8G anon process. > > Before: > real0m0.792s > user0m0.000s > sys 0m0.780s > > After: > real0m0.854s > user0m0.000s > sys 0m0.842s > > This score is b

[Devel] [PATCH v3 06/11] memcg: add kernel calls for memcg dirty page stats

2010-10-18 Thread Greg Thelen
Add calls into memcg dirty page accounting. Notify memcg when pages transition between clean, file dirty, writeback, and unstable nfs. This allows the memory controller to maintain an accurate view of the amount of its memory that is dirty. Signed-off-by: Greg Thelen Signed-off-by: Andrea Righi

[Devel] [PATCH v3 03/11] memcg: create extensible page stat update routines

2010-10-18 Thread Greg Thelen
Replace usage of the mem_cgroup_update_file_mapped() memcg statistic update routine with two new routines: * mem_cgroup_inc_page_stat() * mem_cgroup_dec_page_stat() As before, only the file_mapped statistic is managed. However, these more general interfaces allow for new statistics to be more eas

[Devel] [PATCH v3 02/11] memcg: document cgroup dirty memory interfaces

2010-10-18 Thread Greg Thelen
Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi Signed-off-by: Greg Thelen --- Changelog since v1: - Renamed "nfs"/"total_nfs" to "nfs_unstable"/"total_nfs_unstable" in per cgroup memory.stat to match /proc/meminfo. - Allow [kKmMgG] suffixes for newly crea

[Devel] [PATCH v3 01/11] memcg: add page_cgroup flags for dirty page tracking

2010-10-18 Thread Greg Thelen
Add additional flags to page_cgroup to track dirty pages within a mem_cgroup. Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Andrea Righi Signed-off-by: Greg Thelen --- include/linux/page_cgroup.h | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/

[Devel] [PATCH v3 10/11] writeback: make determine_dirtyable_memory() static.

2010-10-18 Thread Greg Thelen
The determine_dirtyable_memory() function is not used outside of page writeback. Make the routine static. No functional change. Just a cleanup in preparation for a change that adds memcg dirty limits consideration into global_dirty_limits(). Signed-off-by: Andrea Righi Signed-off-by: Greg Thele

[Devel] [PATCH v3 08/11] memcg: CPU hotplug lockdep warning fix

2010-10-18 Thread Greg Thelen
From: Balbir Singh memcg has lockdep warnings (sleep inside rcu lock) From: Balbir Singh Recent move to get_online_cpus() ends up calling get_online_cpus() from mem_cgroup_read_stat(). However mem_cgroup_read_stat() is called under rcu lock. get_online_cpus() can sleep. The dirty limit patches

[Devel] [PATCH v3 09/11] memcg: add cgroupfs interface to memcg dirty limits

2010-10-18 Thread Greg Thelen
Add cgroupfs interface to memcg dirty page limits: Direct write-out is controlled with: - memory.dirty_ratio - memory.dirty_limit_in_bytes Background write-out is controlled with: - memory.dirty_background_ratio - memory.dirty_background_limit_bytes Other memcg cgroupfs files support

[Devel] [PATCH v3 07/11] memcg: add dirty limits to mem_cgroup

2010-10-18 Thread Greg Thelen
Extend mem_cgroup to contain dirty page limits. Also add routines allowing the kernel to query the dirty usage of a memcg. These interfaces not used by the kernel yet. A subsequent commit will add kernel calls to utilize these new routines. Signed-off-by: Greg Thelen Signed-off-by: Andrea Righ

[Devel] [PATCH v3 00/11] memcg: per cgroup dirty page accounting

2010-10-18 Thread Greg Thelen
Changes since v2: - Rather than disabling softirq in lock_page_cgroup(), introduce a separate lock to synchronize between memcg page accounting and migration. This only affects patch 4 of the series. Patch 4 used to disable softirq, now it introduces the new lock. Changes since v1: - Renam

[Devel] Re: [PATCH 00/10] memcg: per cgroup dirty page accounting

2010-10-18 Thread Greg Thelen
KAMEZAWA Hiroyuki writes: > On Sun, 3 Oct 2010 23:57:55 -0700 > Greg Thelen wrote: > >> Greg Thelen (10): >> memcg: add page_cgroup flags for dirty page tracking >> memcg: document cgroup dirty memory interfaces >> memcg: create extensible page stat update routines >> memcg: disable loc

[Devel] Re: [PATCH] Clear the objhash before completing restart, but delay free until later

2010-10-18 Thread Dan Smith
MH> If we postpone clearing the object hash until restart returns to MH> userspace there can be a race where the restarted tasks behave MH> differently due to the references held by the objhash. One MH> specific example of this is restarting half-closed pipes. Without MH> this patch we've got a r

[Devel] Re: Fwd: Re: lxc-performance?

2010-10-18 Thread MALATTAR
Le 12/10/2010 07:05, KAMEZAWA Hiroyuki a écrit : > On Fri, 08 Oct 2010 10:09:51 +0200 > MALATTAR wrote: > >> Le 07/10/2010 16:43, MALATTAR a écrit : >>> >>> 06.10.2010 23:41, MALATTAR ?: >>> / the container dora1,

[Devel] lxc performance?

2010-10-18 Thread MALATTAR
Hi all, I subscribed in this list recently and i have some questions about lxc performance. firstly, let me explain where i am using lxc: i am using lxc with ns3 in order to simulate adhoc network where i will test my IDS(intrusion detection system for adhoc routing protocol). i create until no

[Devel] Re: Fwd: Re: lxc-performance?

2010-10-18 Thread MALATTAR
Le 08/10/2010 18:41, Serge E. Hallyn a écrit : > Quoting MALATTAR (mouhannad.alat...@univ-fcomte.fr): >> >> Message original >> Sujet: Re: lxc-performance >> Date : Thu, 07 Oct 2010 16:56:05 +0200 >> De : MALATTAR >> Pour : MALATTAR >> >> >> >> Le 07/10

[Devel] Question about libnetfilter_queue and container

2010-10-18 Thread 周威廷
Hi every body, I'm a newbie to container use. I am going to use the libnetfilter_queue, an userspace library, to forward the packets that have been queued by the kernel packet filter, such like iptables, to userspace program but it didn't work. Do anyone else has been try this way before or had a

[Devel] Fwd: Re: lxc-performance?

2010-10-18 Thread MALATTAR
Message original Sujet: Re: lxc-performance Date : Thu, 07 Oct 2010 16:56:05 +0200 De :MALATTAR Pour : MALATTAR Le 07/10/2010 16:43, MALATTAR a écrit : > > 06.10.2010 23:41, MALATTAR ?: > >

[Devel] Re: [PATCH 08/10] memcg: add cgroupfs interface to memcg dirty limits

2010-10-18 Thread Ciju Rajan K
Greg Thelen wrote: > Add cgroupfs interface to memcg dirty page limits: > Direct write-out is controlled with: > - memory.dirty_ratio > - memory.dirty_bytes > > Background write-out is controlled with: > - memory.dirty_background_ratio > - memory.dirty_background_bytes > > Signed-off-by

[Devel] Re: [RFC][PATCH 00/10] taskstats: Enhancements for precise accounting

2010-10-18 Thread Michael Holzheu
Hello Andrew, On Thu, 2010-09-23 at 13:11 -0700, Andrew Morton wrote: > > GOALS OF THIS PATCH SET > > --- > > The intention of this patch set is to provide better support for tools like > > top. The goal is to: > > > > * provide a task snapshot mechanism where we can get a con

[Devel] Re: [ABI REVIEW][PATCH 0/8] Namespace file descriptors

2010-10-18 Thread David Lamparter
On Thu, Sep 23, 2010 at 09:32:29AM -0700, Eric W. Biederman wrote: > > At several occasions, I was left with either some runaway daemon which > > kept the namespace alive. To describe this a little more graphically: > > I found no other way than doing a > > md5sum /proc/*/net/if_inet6 | sort |

[Devel] Re: [ABI REVIEW][PATCH 0/8] Namespace file descriptors

2010-10-18 Thread Rémi Denis-Courmont
(Trimming To/Cc heavily) Hello, On Thursday 23 September 2010, Eric W. Biederman wrote: > Introduce file for manipulating namespaces and related syscalls. > files: > /proc/self/ns/ > > syscalls: > int setns(unsigned long nstype, int fd); > socketat(int nsfd, int family, int type, int protocol

[Devel] Re: [ABI REVIEW][PATCH 0/8] Namespace file descriptors

2010-10-18 Thread Andrew Lutomirski
Eric W. Biederman wrote: > Introduce file for manipulating namespaces and related syscalls. > files: > /proc/self/ns/ > > syscalls: > int setns(unsigned long nstype, int fd); > socketat(int nsfd, int family, int type, int protocol); > How does security work? Are there different kinds of fd that

[Devel] Re: [RFC][PATCH 00/10] taskstats: Enhancements for precise accounting

2010-10-18 Thread Michael Holzheu
Hello Andrew, On Fri, 2010-09-24 at 11:50 -0700, Andrew Morton wrote: > > > This is a big change! If this is done right then we're heading in the > > > direction of deprecating the longstanding way in which userspace > > > observes the state of Linux processes and we're recommending that the > >

[Devel] Re: [PATCH 7/8] net: Allow setting the network namespace by fd

2010-10-18 Thread David Lamparter
On Fri, Sep 24, 2010 at 07:51:24AM -0400, jamal wrote: > > migrating route table entries makes no sense because > > a) they refer to devices and configuration that does not exist in the > >target namespace; they only make sense within their netns context > > b) they are purely virtual and you g

[Devel] Re: [PATCH 00/10] memcg: per cgroup dirty page accounting

2010-10-18 Thread Ciju Rajan K
Greg Thelen wrote: > Balbir Singh writes: > >> * Greg Thelen [2010-10-03 23:57:55]: >> >> >>> This patch set provides the ability for each cgroup to have independent >>> dirty >>> page limits. >>> >>> Limiting dirty memory is like fixing the max amount of dirty (hard to >>> reclaim) >>>

[Devel] Re: [PATCH 03/10] memcg: create extensible page stat update routines

2010-10-18 Thread Ciju Rajan K
Greg Thelen wrote: > Ciju Rajan K writes: > > >> Greg Thelen wrote: >> >>> Replace usage of the mem_cgroup_update_file_mapped() memcg >>> statistic update routine with two new routines: >>> * mem_cgroup_inc_page_stat() >>> * mem_cgroup_dec_page_stat() >>> >>> As before, only the file_mappe

[Devel] [PATCH 1/1] cgroups: strcpy destination string overflow

2010-10-18 Thread Evgeny Kuznetsov
From: Evgeny Kuznetsov Function "strcpy" is used without check for maximum allowed source string length and could cause destination string overflow. Check for string length is added before using "strcpy". Function now is return error if source string length is more than a maximum. Signed-off-by:

[Devel] [PATCH 0/1] cgroups: strcpy destination string overflow

2010-10-18 Thread Evgeny Kuznetsov
Hi, Here is patch which fixes minor bug in /kernel/cgroup.c file. Function "strcpy" is used without check for maximum allowed source string length and could cause destination string overflow. Thanks, Best Regards, Evgeny Evgeny Kuznetsov (1): cgroups: strcpy destination string overflow kerne

[Devel] Re: [PATCH 03/10] memcg: create extensible page stat update routines

2010-10-18 Thread Ciju Rajan K
Greg Thelen wrote: > Replace usage of the mem_cgroup_update_file_mapped() memcg > statistic update routine with two new routines: > * mem_cgroup_inc_page_stat() > * mem_cgroup_dec_page_stat() > > As before, only the file_mapped statistic is managed. However, > these more general interfaces allow f

[Devel] Re: [PATCH 7/8] net: Allow setting the network namespace by fd

2010-10-18 Thread David Lamparter
On Fri, Sep 24, 2010 at 09:32:53AM -0400, jamal wrote: > On Fri, 2010-09-24 at 14:57 +0200, David Lamparter wrote: > > No. While you sure could associate routes with devices, they don't > > *functionally* reside on top of network devices. They reside on top of > > the entire IP configuration, > >

[Devel] Re: [RFC][PATCH 00/10] taskstats: Enhancements for precise accounting

2010-10-18 Thread Michael Holzheu
Hello Matt, On Thu, 2010-09-23 at 15:11 -0700, Matt Helsley wrote: > > Talk to me about namespaces, please. A lot of the new code involves > > PIDs, but PIDs are not system-wide unique. A PID is relative to a PID > > namespace. Does everything Just Work? When userspace sends a PID to > > the k

[Devel] Re: [ABI REVIEW][PATCH 0/8] Namespace file descriptors

2010-10-18 Thread David Lamparter
On Thu, Sep 23, 2010 at 01:45:04AM -0700, Eric W. Biederman wrote: > Introduce file for manipulating namespaces and related syscalls. > files: > /proc/self/ns/ As feedback from using network namespaces extensively in more or less production setups, I would like to make a request/suggestion: there

[Devel] Re: [PATCH 7/8] net: Allow setting the network namespace by fd

2010-10-18 Thread David Lamparter
On Thu, Sep 23, 2010 at 07:22:06AM -0400, jamal wrote: > On Thu, 2010-09-23 at 01:51 -0700, Eric W. Biederman wrote: > > Take advantage of the new abstraction and allow network devices > > to be placed in any network namespace that we have a fd to talk > > about. > > So ... why just netdevice? cou

[Devel] Re: [PATCH 8/8] net: Implement socketat.

2010-10-18 Thread David Lamparter
On Thu, Sep 23, 2010 at 04:34:37PM +0400, Pavel Emelyanov wrote: > On 09/23/2010 04:11 PM, jamal wrote: > > On Thu, 2010-09-23 at 15:53 +0400, Pavel Emelyanov wrote: > > > >> Why does it matter? You told, that the usage scenario was to > >> add routes to container. If I do 2 syscalls instead of 1,

[Devel] Re: [PATCH][RFC] v2 exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Will Drewry
On Mon, Sep 20, 2010 at 2:12 PM, Andi Kleen wrote: >> The pipe process needs to run in the namespaces of the process who set >> the core pattern, not in the namespaces of the dumping process. >> Otherwise it is possible to trigger a privileged process to run in a >> context where it's reality that

[Devel] Re: [PATCH 2/2] exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Will Drewry
On Mon, Sep 20, 2010 at 1:50 PM, Oleg Nesterov wrote: > On 09/17, Will Drewry wrote: >> >> On Fri, Sep 17, 2010 at 8:29 PM, Oleg Nesterov wrote: >> > >> > This looks overcomplicated to me, or I missed something. >> > >> > I do not understand why should we do this beforehand, and why we need >> >

[Devel] Re: [PATCH 2/2] exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Will Drewry
On Fri, Sep 17, 2010 at 9:34 PM, Will Drewry wrote: > On Fri, Sep 17, 2010 at 8:29 PM, Oleg Nesterov wrote: >> On 09/17, Will Drewry wrote: >>> >>> Instead, this change implements the more complex option two.  It >>> migrates the call_usermodehelper() thread into the same namespaces >>> as th

[Devel] Re: [PATCH 2/2] exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Will Drewry
On Fri, Sep 17, 2010 at 8:29 PM, Oleg Nesterov wrote: > On 09/17, Will Drewry wrote: >> >> Instead, this change implements the more complex option two.  It >> migrates the call_usermodehelper() thread into the same namespaces >> as the dumping process.  It does not assign a pid in that namespa

[Devel] Re: [PATCH 2/2] exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Neil Horman
On Fri, Sep 17, 2010 at 10:16:58AM -0500, Will Drewry wrote: > Presently, a core_pattern pipe endpoint will be run in the init > namespace. It will receive the virtual pid (task_tgid_vnr->%p) of the > core dumping process but will have no access to that processes /proc > without walking the init n

[Devel] [PATCH 2/2] exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Will Drewry
Presently, a core_pattern pipe endpoint will be run in the init namespace. It will receive the virtual pid (task_tgid_vnr->%p) of the core dumping process but will have no access to that processes /proc without walking the init namespace /proc looking through all the global pids until it finds the

[Devel] [PATCH 1/2] nsproxy: add copy_namespaces_unattached

2010-10-18 Thread Will Drewry
This changes adds copy_namespaces_unattached which provides similar behavior to copy_namespaces() for clone, but is meant for use when a new namespace needs to be derived from an existing process outside of process creation. The next patch in this series shows this function used in fs/exec.c to in

[Devel] Re: [PATCH][RFC] fs/exec.c: provide the correct process pid to the pipe helper

2010-10-18 Thread Will Drewry
On Thu, Sep 16, 2010 at 3:12 PM, Eric W. Biederman wrote: > Oleg Nesterov writes: > >> On 09/16, Will Drewry wrote: >>> >>> --- a/fs/exec.c >>> +++ b/fs/exec.c >>> @@ -1467,6 +1467,13 @@ static int format_corename(char *corename, long >>> signr) >>>      char *const out_end = corename + CORENAME

[Devel] [PATCH][RFC] fs/exec.c: provide the correct process pid to the pipe helper

2010-10-18 Thread Will Drewry
format_corename uses task_tgid_vnr to provide the numeric pid of a core-dumping process. For file-based coredumps, this is perfectly satisfactory. However, when the core_pattern contains a pipe, the substituted PID is invalid in the namespace of the core_pattern pipe helper, the init namespace.

[Devel] Re: [PATCH][RFC] fs/exec.c: provide the correct process pid to the pipe helper

2010-10-18 Thread Will Drewry
On Fri, Sep 17, 2010 at 8:26 AM, Andi Kleen wrote: > On Thu, 16 Sep 2010 13:59:59 -0500 > Will Drewry wrote: > >> format_corename uses task_tgid_vnr to provide the numeric pid of a >> core-dumping process.  For file-based coredumps, this is perfectly >> satisfactory.  However, when the core_patte

[Devel] [PATCH][RFC] v2 exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Will Drewry
Presently, a core_pattern pipe endpoint will be run in the init namespace. It will receive the virtual pid (task_tgid_vnr->%p) of the core dumping process but will have no access to that processes /proc without walking the init namespace /proc looking through all the global pids until it finds the

[Devel] Re: [PATCH 2/2] exec: move core_pattern pipe helper into the crashing namespace

2010-10-18 Thread Will Drewry
On Fri, Sep 17, 2010 at 1:15 PM, Neil Horman wrote: > On Fri, Sep 17, 2010 at 10:16:58AM -0500, Will Drewry wrote: >> Presently, a core_pattern pipe endpoint will be run in the init >> namespace.  It will receive the virtual pid (task_tgid_vnr->%p) of the >> core dumping process but will have no a