s/detemined/determined
Signed-off-by: Chen Hanxiao
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 586ad91..1a092e1 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2616,7 +2616,7
commit dc6c9a35b66b ("mm: account pmd page tables to the process")
add VmPMD in /proc/PID/status.
This patch add a description in proc.txt for it.
cc: Kirill A. Shutemov
Signed-off-by: Chen Hanxiao
---
v2: change description of VmPMD as Kirill's comment
Documentation/filesyste
> -Original Message-
> From: Kirill A. Shutemov [mailto:kir...@shutemov.name]
> Sent: Friday, April 24, 2015 2:33 PM
> To: Chen, Hanxiao/陈 晗霄
> Cc: Jonathan Corbet; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org;
> Kirill A. Shutemov
> Subject: Re: [P
commit dc6c9a35b66b ("mm: account pmd page tables to the process")
add VmPMD in /proc/PID/status.
This patch add a description in proc.txt for it.
cc: Kirill A. Shutemov
Signed-off-by: Chen Hanxiao
---
Documentation/filesystems/proc.txt | 1 +
1 file changed, 1 insertion(+)
di
Hi,
> -Original Message-
> From: Jonathan Corbet [mailto:cor...@lwn.net]
> Sent: Tuesday, April 21, 2015 8:14 PM
> To: Chen, Hanxiao/陈 晗霄
> Cc: Andrew Morton; Nathan Scott; linux-...@vger.kernel.org;
> linux-kernel@vger.kernel.org; Jiri Kosina
> Subject: Re: [PATCH] D
Change kernel version from 3.20 to 4.1
Signed-off-by: Chen Hanxiao
---
Documentation/filesystems/proc.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/filesystems/proc.txt
b/Documentation/filesystems/proc.txt
index c3b6b30..1cc7155 100644
--- a
> -Original Message-
> From: Andrew Morton [mailto:a...@linux-foundation.org]
> Sent: Tuesday, February 24, 2015 5:02 AM
> To: Chen, Hanxiao/陈 晗霄
> Cc: Eric W. Biederman; contain...@lists.linux-foundation.org;
> linux-kernel@vger.kernel.org; linux-...@vger.kernel
From: Nathan Scott
---
Documentation/filesystems/proc.txt | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/filesystems/proc.txt
b/Documentation/filesystems/proc.txt
index a07ba61..6d37062 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Document
depends on which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Acked-by: "Eric W. Biederman"
Tested-by: Serge Hallyn
Tested-by: Nathan Scott
Signed-off-by: Chen Hanxiao
---
v10: remov
Chen Hanxiao (1):
/proc/PID/status: show all sets of pid according to ns
Nathan Scott (1):
docs: add missing and new /proc/PID/status file entries, fix typos
Documentation/filesystems/proc.txt | 11 ---
fs/proc/array.c| 16
2 files changed, 24
> -Original Message-
> From: Chen, Hanxiao/陈 晗霄
> Sent: Wednesday, February 11, 2015 1:52 PM
>
> > -Original Message-
> > From: containers-boun...@lists.linux-foundation.org
> >
> > Chen Hanxiao (1):
> > /proc/PID/status: show all
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Chen
> Hanxiao
> Sent: Friday, February 06, 2015 6:46 PM
> To: Eric W. Biederman; Andrew Morton
> Cc: Jonathan Corbet; c
depends on which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Acked-by: "Eric W. Biederman"
Tested-by: Serge Hallyn
Tested-by: Nathan Scott
Signed-off-by: Chen Hanxiao
---
v10: remov
From: Nathan Scott
From: Nathan Scott
docs: add missing and new /proc/PID/status file entries, fix typos
Signed-off-by: Nathan Scott
---
Documentation/filesystems/proc.txt | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/filesystems/proc.txt
b/Do
Chen Hanxiao (1):
/proc/PID/status: show all sets of pid according to ns
Nathan Scott (1):
docs: add missing and new /proc/PID/status file entries, fix typos
Documentation/filesystems/proc.txt | 11 ---
fs/proc/array.c| 16
2 files changed, 24
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Chen
> Hanxiao
> Sent: Tuesday, December 23, 2014 6:21 PM
> To: Eric W. Biederman; Serge Hallyn; Andrew Morton; Pavel Emely
18102
│
┌──┐
ns4 ns5
││
1534 1600
Every pid printed in pidns_hierarchy
is the init pid of that pid ns level.
Acked-by: Richard Weinberer
Signed-of
o fielsd: NSpgid and NSsid.
v2: use a procfs text file, replacing dirs under /proc for
showing pidns hierarchy;
add two new fields: NStgid and NSpid
keep fields of Tgid and Pid unchanged for back compatibility.
Chen Hanxiao (3):
procfs: show hierarchy of pid namespace
/proc/PID/stat
Signed-off-by: Chen Hanxiao
---
Documentation/namespaces/pidns-hierarchy.txt | 51
1 file changed, 51 insertions(+)
create mode 100644 Documentation/namespaces/pidns-hierarchy.txt
diff --git a/Documentation/namespaces/pidns-hierarchy.txt
b/Documentation/namespaces
depends on which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Tested-by: Serge Hallyn
Signed-off-by: Chen Hanxiao
---
v9: rebased on 3.19-rc1
No change from v4-v8
v3: add another two fielsd: NSpgid
Use macro instead of magic number
for max user namespace level.
Acked-by: Serge E. Hallyn
Signed-off-by: Chen Hanxiao
---
kernel/user_namespace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index aa312b0..5435489
ct, easily
> >>> reviewable ways I am hoping/planning to send this to Linus ASAP.
> >>>
> >>> Eric
> >>
> >> Is there a git tree we can clone?
> >
> > I was about to ask that too.
> > Hopefully I can tomorrow find some time for testing.
>
> git pull git.kernel.org:/pub/scm/linux/kernel/git/ebiederm/user-namespace.git
> for-testing
>
> That holds my entire queue of fixes against 3.18-rc6
>
Tested on Fedora20 with libvirt 1.2.11, works fine.
Tested-by: Chen Hanxiao
Thanks,
- Chen
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Chen
> Hanxiao
> Sent: Monday, December 01, 2014 7:06 PM
> To: Eric W. Biederman; Serge Hallyn; Oleg Nesterov; Richard
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Tested-by: Serge Hallyn
Signed-off-by: Chen Hanxiao
---
No change since v3
v3: add another two fielsd: NSpgid and NSsid.
v2: add two new fields: NStgid and
Signed-off-by: Chen Hanxiao
---
Documentation/namespaces/pidns-hierarchy.txt | 51
1 file changed, 51 insertions(+)
create mode 100644 Documentation/namespaces/pidns-hierarchy.txt
diff --git a/Documentation/namespaces/pidns-hierarchy.txt
b/Documentation/namespaces
18102
│
┌──┐
ns4 ns5
││
1534 1600
Every pid printed in pidns_hierarchy
is the init pid of that pid ns level.
Acked-by: Richard Weinberer
Signed-off-by: Chen Hanxi
nder /proc for
showing pidns hierarchy;
add two new fields: NStgid and NSpid
keep fields of Tgid and Pid unchanged for back compatibility.
Chen Hanxiao (3):
procfs: show hierarchy of pid namespace
/proc/PID/status: show all sets of pid according to ns
Documentation: add docs for /proc/p
> -Original Message-
> From: Andrew Morton [mailto:a...@linux-foundation.org]
> Sent: Friday, November 21, 2014 6:21 AM
> To: Richard Weinberger
> Cc: Chen, Hanxiao/陈 晗霄; Eric W. Biederman; Serge Hallyn; Oleg Nesterov;
> contain...@lists.linux-foundation.org; linux-kern
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Chen
> Hanxiao
> Sent: Tuesday, November 18, 2014 5:30 PM
> To: Eric W. Biederman; Serge Hallyn; Oleg Nesterov; Richa
two new fields: NStgid and NSpid
keep fields of Tgid and Pid unchanged for back compatibility.
Chen Hanxiao (2):
procfs: show hierarchy of pid namespace
/proc/PID/status: show all sets of pid according to ns
fs/proc/Kconfig | 6 +
fs/proc/Makefile | 1 +
f
18102
│
┌──┐
ns4 ns5
││
1534 1600
Every pid printed in pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
v8: fix some imprope
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Tested-by: Serge Hallyn
Signed-off-by: Chen Hanxiao
---
No change since v3
v3: add another two fielsd: NSpgid and NSsid.
v2: add two new fields: NStgid and
Commit-ID: f622b429dadf83c3cc2d70f57f407ad85684eb36
Gitweb: http://git.kernel.org/tip/f622b429dadf83c3cc2d70f57f407ad85684eb36
Author: Chen Hanxiao
AuthorDate: Tue, 4 Nov 2014 16:51:22 +0800
Committer: Ingo Molnar
CommitDate: Sun, 16 Nov 2014 10:58:53 +0100
sched: Update comments
> -Original Message-
> From: Richard Weinberger [mailto:rich...@nod.at]
> Sent: Wednesday, November 12, 2014 7:15 PM
> To: Chen, Hanxiao/陈 晗霄; Eric W. Biederman; Serge Hallyn; Oleg Nesterov
> Cc: contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.org;
18102
│
┌──┐
ns4 ns5
││
1534 1600
Every pid printed in pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
v7: change stype to be
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Tested-by: Serge Hallyn
Signed-off-by: Chen Hanxiao
---
No change since v3
v3: add another two fielsd: NSpgid and NSsid.
v2: add two new fields: NStgid and
Pid unchanged for back compatibility.
Chen Hanxiao (2):
procfs: show hierarchy of pid namespace
/proc/PID/status: show all sets of pid according to ns
fs/proc/Kconfig | 6 +
fs/proc/Makefile | 1 +
fs/proc/array.c | 17 +++
fs/proc/pidns_hie
> -Original Message-
> From: Mateusz Guzik [mailto:mgu...@redhat.com]
> Sent: Wednesday, November 05, 2014 7:54 PM
> To: Chen, Hanxiao/陈 晗霄
> Cc: Eric W. Biederman; Serge Hallyn; Oleg Nesterov;
> contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.or
> -Original Message-
> From: Richard Weinberger [mailto:rich...@nod.at]
> Sent: Wednesday, November 05, 2014 8:52 PM
> To: Serge E. Hallyn
> Cc: Chen, Hanxiao/陈 晗霄; Eric W. Biederman; Serge Hallyn; Oleg Nesterov;
> contain...@lists.linux-foundation.org; linux-kern
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Tested-by: Serge Hallyn
Signed-off-by: Chen Hanxiao
---
No change since v3
v3: add another two fielsd: NSpgid and NSsid.
v2: add two new fields: NStgid and
ocfs text file instead of dirs under /proc for
showing pidns hierarchy;
add two new fields: NStgid and NSpid
keep fields of Tgid and Pid unchanged for back compatibility.
Chen Hanxiao (2):
v5 procfs: show hierarchy of pid namespace
/proc/PID/status: show all sets of pid according t
18102
│
┌──┐
ns4 ns5
││
1534 1600
Every pid printed in pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
v6: fix get_pid le
Remove question mark:
s/New utsname group?/New utsname namespace
Unified style for IPC:
s/New ipcs/New ipc namespace
Signed-off-by: Chen Hanxiao
---
include/uapi/linux/sched.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/sched.h b/include/uapi
> -Original Message-
> From: se...@hallyn.com [mailto:se...@hallyn.com]
> Sent: Saturday, November 01, 2014 2:31 AM
> To: contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.org; Chen,
> Hanxiao/陈 晗霄
> Cc: Richard Weinberger; Serge Hallyn; Oleg Nesterov; Ma
Commit-ID: fcd964dda5ece2fa77f78f843bc3455348787282
Gitweb: http://git.kernel.org/tip/fcd964dda5ece2fa77f78f843bc3455348787282
Author: Chen Hanxiao
AuthorDate: Tue, 7 Oct 2014 17:29:07 +0800
Committer: Ingo Molnar
CommitDate: Tue, 28 Oct 2014 10:46:08 +0100
sched: Update comments for
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Chen
> Hanxiao
> Sent: Friday, October 24, 2014 6:16 PM
> To: contain...@lists.linux-foundation.org; linux-kernel@vger.kernel
or
showing pidns hierarchy;
add two new fields: NStgid and NSpid
keep fields of Tgid and Pid unchanged for back compatibility.
Chen Hanxiao (2):
procfs: show hierarchy of pid namespace
/proc/PID/status: show all sets of pid according to ns
fs/proc/Kconfig | 6 ++
fs
18102
│
┌──┐
ns4 ns5
││
1534 1600
Every pid printed in pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
fs/pr
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Acked-by: Serge Hallyn
Tested-by: Serge Hallyn
Signed-off-by: Chen Hanxiao
---
fs/proc/array.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/fs/proc
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Chen
> Hanxiao
> Sent: Thursday, October 16, 2014 8:02 PM
> To: contain...@lists.linux-foundation.org; linux-kernel@vg
18102
│
┌──┐
ns4 ns5
││
1534 1600
Every pid printed in pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
v5: collect pid by f
> -Original Message-
> From: Oleg Nesterov [mailto:o...@redhat.com]
> Sent: Friday, October 10, 2014 5:34 AM
> To: Chen, Hanxiao/陈 晗霄
> Cc: contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.org; Serge
> Hallyn; Eric W. Biederman; David Howells; Richard
> -Original Message-
> From: Oleg Nesterov [mailto:o...@redhat.com]
> Sent: Wednesday, October 08, 2014 11:13 PM
> To: Chen, Hanxiao/陈 晗霄
> Cc: contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.org; Serge
> Hallyn; Eric W. Biederman; David Howells; Richard
> -Original Message-
> From: Richard Weinberger [mailto:rich...@nod.at]
> Sent: Wednesday, October 08, 2014 6:35 PM
> To: Chen, Hanxiao/陈 晗霄; contain...@lists.linux-foundation.org;
> linux-kernel@vger.kernel.org
> Cc: Serge Hallyn; Eric W. Biederman; Oleg Nesterov; Davi
> -Original Message-
> From: Eric W. Biederman [mailto:ebied...@xmission.com]
> Sent: Thursday, October 09, 2014 1:56 AM
>
> Serge Hallyn writes:
>
> > Quoting Chen Hanxiao (chenhanx...@cn.fujitsu.com):
> >> We could use setns to join the cu
pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
v4: simplify pid collection and do some performance optimizamtion
fix another race issue.
v3: fix a race issue and memory leak issue
v2: use a procfs text file instead of dirs under /proc
fs/proc/Kconfig
We could use setns to join the current ns,
which did a lot of unnecessary work.
This patch will check this senario and
return 0 directly.
Signed-off-by: Chen Hanxiao
---
kernel/nsproxy.c | 28
1 file changed, 28 insertions(+)
diff --git a/kernel/nsproxy.c b/kernel
Signed-off-by: Chen Hanxiao
Acked-by: Serge E. Hallyn
---
v2: s/group?/group
include/uapi/linux/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h
index 34f9d73..db765b4 100644
--- a/include/uapi/linux/sched.h
> -Original Message-
> From: Serge Hallyn [mailto:serge.hal...@ubuntu.com]
> Sent: Monday, October 06, 2014 10:27 PM
> To: Chen, Hanxiao/陈 晗霄
> Cc: Ingo Molnar; Peter Zijlstra; David Howells;
> contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.org
>
Signed-off-by: Chen Hanxiao
---
include/uapi/linux/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h
index 34f9d73..db765b4 100644
--- a/include/uapi/linux/sched.h
+++ b/include/uapi/linux/sched.h
@@ -13,7 +13,7
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Richard
> Guy
> Briggs
> Sent: Monday, October 06, 2014 1:09 PM
> To: linux-au...@redhat.com; linux-kernel@vger.kernel.org;
> contain...@lists.
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Richard
> Guy
> Briggs
> Sent: Monday, October 06, 2014 1:08 PM
> To: linux-au...@redhat.com; linux-kernel@vger.kernel.org;
> contain...@lists.
Hi,
> -Original Message-
> From: Serge E. Hallyn [mailto:se...@hallyn.com]
> Sent: Monday, September 29, 2014 10:00 PM
> Subject: Re: [PATCHv3 2/2] /proc/PID/status: show all sets of pid according to
> ns
[snip]
> > >
> > > This patch adds four fields: NStgid, NSpid, NSpgid and NSsid:
> >
Hi,
> -Original Message-
> From: containers-boun...@lists.linux-foundation.org
> [mailto:containers-boun...@lists.linux-foundation.org] On Behalf Of Chen
> Hanxiao
> Sent: Wednesday, September 24, 2014 6:00 PM
> To: contain...@lists.linux-foundation.org; linux-kernel@vg
d, it depends on which pidns are you in.
> NStgid: 5 1
> NSpid: 5 1
> NSpgid: 5 1
> NSsid: 1 0
> ** Views from level 1
>
> Signed-off-by: Chen Hanxiao
> ---
> v3: add another two fielsd: NSpgid and NSsid.
> v2: add two new fields: NStgid and NSpid.
Hi,
> -Original Message-
> From: Mateusz Guzik [mailto:mgu...@redhat.com]
> Sent: Thursday, September 25, 2014 1:45 AM
> On Wed, Sep 24, 2014 at 06:00:26PM +0800, Chen Hanxiao wrote:
> > +static int
> > +pidns_list_filter(void)
> > +{
> > + struct pid
show the hierarchy of pid namespace
Chen Hanxiao (2):
procfs: show hierarchy of pid namespace
/proc/PID/status: show all sets of pid according to ns
fs/proc/Kconfig | 6 ++
fs/proc/Makefile | 1 +
fs/proc/array.c | 17
fs/proc/pidns_hierarchy.c | 227
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Signed-off-by: Chen Hanxiao
---
v3: add another two fielsd: NSpgid and NSsid.
v2: add two new fields: NStgid and NSpid.
keep fields of Tgid and Pid unchanged for back compatibility
pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
v3: fix a race issue and memory leak issue
v2: use a procfs text file instead of dirs under /proc
fs/proc/Kconfig | 6 ++
fs/proc/Makefile | 1 +
fs/proc/pidns_hierarchy.c | 227
Hi,
> -Original Message-
> From: Mateusz Guzik [mailto:mgu...@redhat.com]
> On Mon, Sep 22, 2014 at 05:53:33PM +0800, Chen Hanxiao wrote:
> > This patch will show the hierarchy of pid namespace
> > by /proc/pidns_hierarchy like:
> >
> > [root@local
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** View from level 1
Signed-off-by: Chen Hanxiao
---
v2: add two new fields: NStgid and NSpid.
keep fields of Tgid and Pid unchanged for back compatibility.
v3: add another two fielsd: NSpgid and NSsid
pidns_hierarchy
is the init pid of that pid ns level.
Signed-off-by: Chen Hanxiao
---
v2: use procfs text file instead of dirs under /proc
fs/proc/Kconfig | 6 ++
fs/proc/Makefile | 1 +
fs/proc/pidns_hierarchy.c | 195 ++
3 files
This series will expose pid inside containers
via procfs.
Also show the hierarchy of pid namespcae.
Then we could know how pid looks inside a container
and their ns relationships.
v2: use a procfs text file instead of dirs
to show the hierarchy of pid namespace
Chen Hanxiao (2):
procfs
This series will expose pid inside containers
via procfs.
Also show the hierarchy of pid namespcae.
Then we could know how pid looks inside a container
and their ns relationships.
v2: use a procfs text file instead of dirs
to show the hierarchy of pid namespace
Chen Hanxiao (2):
procfs
pid ns level.
Signed-off-by: Chen Hanxiao
---
v2: use procfs text file instead of dirs under /proc
fs/proc/Kconfig | 6 ++
fs/proc/Makefile | 1 +
fs/proc/pidns_hierarchy.c | 195 ++
3 files changed, 202 insertions(+)
create
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
Signed-off-by: Chen Hanxiao
---
v2: add two new fields: NStgid and NSpid.
keep fields of Tgid and Pid unchanged for back compatibility.
v3: add another two fielsd: NSpgid and NSsid
Hi,
> -Original Message-
> From: Serge E. Hallyn [mailto:se...@hallyn.com]
>
> Hi,
>
> so the below is just 30 mins worth of playing around, will hang if you give
> it bad pids, and requires privilege, but shows how to get pid conversion
> in some cases. Basically it gives you what I ha
> -Original Message-
> From: Aristeu Rozanski [mailto:a...@redhat.com]
>
> On Thu, Sep 11, 2014 at 05:51:31PM +0800, Chen Hanxiao wrote:
> > Use marco instead of magic number
> > for max user namespace level.
>
> patch is ok, but you might want to do s/
Use marco instead of magic number
for max user namespace level.
Signed-off-by: Chen Hanxiao
---
kernel/user_namespace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index aa312b0..5435489 100644
--- a/kernel
> -Original Message-
> From: Serge E. Hallyn [mailto:se...@hallyn.com]
> Sent: Thursday, September 11, 2014 12:23 AM
> To: Chen, Hanxiao/陈 晗霄
> Cc: contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.org;
> Richard Weinberger; Serge Hallyn; Oleg Nesterov; D
Hi,
> -Original Message-
> Quoting Chen Hanxiao (chenhanx...@cn.fujitsu.com):
> > This series will expose pid inside containers
> > via procfs.
> > Also show the hierarchy of pid namespcae.
> > Then we could know how pid looks inside a container
Use marco instead of magic number
for max user namespace level.
Signed-off-by: Chen Hanxiao
---
kernel/user_namespace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index aa312b0..5435489 100644
--- a/kernel
Hi,
> -Original Message-
> Hi,
>
> On Wed, Sep 03, 2014 at 18:29 +0800, Chen Hanxiao wrote:
> > This patch will show the hierarchy of pid namespace
> > under /proc/pidns like:
> > /proc/pidns
> > ├── hierarchy
> > │ ├── pidns4026532399
which pidns are you in.
NStgid: 5 1
NSpid: 5 1
NSpgid: 5 1
NSsid: 1 0
** Views from level 1
v2: add two new fields: NStgid and NSpid.
keep fields of Tgid and Pid unchanged for back compatibility.
v3: add another two fields: NSpgid and NSsid.
Signed-off-by: Chen Hanxiao
This series will expose pid inside containers
via procfs.
Also show the hierarchy of pid namespcae.
Then we could know how pid looks inside a container
and their ns relationships.
Chen Hanxiao (3):
procfs: check uniq proc_dir_entry subdir name
procfs: show hierarchy of pid namespace
/proc
Check whether a proc dir has a subdir
with a specific name.
Will be used in a later patch.
Signed-off-by: Chen Hanxiao
---
fs/proc/generic.c | 15 +++
include/linux/proc_fs.h | 3 +++
2 files changed, 18 insertions(+)
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index
could get hierarchy info
under /proc/pidns/hierarchy.
Signed-off-by: Chen Hanxiao
---
fs/proc/Kconfig | 6 ++
fs/proc/Makefile | 1 +
fs/proc/pidns_hierarchy.c | 161 ++
3 files changed, 168 insertions(+)
create mode 10064
s/iff/if
Signed-off-by: Chen Hanxiao
---
Documentation/cgroups/cgroups.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/cgroups/cgroups.txt
b/Documentation/cgroups/cgroups.txt
index 821de56..b614f42 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b
ns.
return value:
>0 : translated pid in ns1(fd1) seen from ns2(fd2).
<=0: on failure.
Signed-off-by: Chen Hanxiao
---
v2: drop pidtype
check ns_ops before getting pid_namespace structure
arch/x86/syscalls/syscall_32.tbl | 1 +
arch/x86/syscalls/syscall_64.tbl | 1 +
i
means for current ns.
pidtype: 0 PIDTYPE_PID; 1 PIDTYPE_PGID; 2 PIDTYPE_SID.
return value:
>0: translated pid in ns1(fd1) seen from ns2(fd2).
<0: on failure.
Signed-off-by: Chen Hanxiao
---
arch/x86/syscalls/syscall_32.tbl | 1 +
arch/x86/syscalls/syscall_64.tbl | 1 +
include
are you in.
NStgid: 9 3
NSpid: 9 3
** Views from level 1
Signed-off-by: Chen Hanxiao
---
v2: add two new fields: NStgid and NSpid.
keep fields of Tgid and Pid unchanged for back compatibility.
fs/proc/array.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/fs/proc
pidns are you in.
Tgid: 9 3
Pid:9 3
** Views from level 1 for Pid 1628 in host.
Signed-off-by: Chen Hanxiao
---
fs/proc/array.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 64db2bc..eef20dd 100644
shooting.
This patch introduces pid_in_ns:
If one process is in init_pid_ns, /proc/PID/pid_in_ns
equals to /proc/PID;
if one process is in pidns, /proc/PID/pid_in_ns
will tell the pid inside containers;
if pidns is nested, it depends on which pidns are you in.
Signed-off-by: Chen Hanxiao
---
fs/proc
shooting.
This patch introduces pid_in_ns:
If one process is in init_pid_ns, /proc/PID/pid_in_ns
equals to /proc/PID;
if one process is in pidns, /proc/PID/pid_in_ns
will tell the pid inside containers;
if pidns is nested, it depends on which pidns are you in.
Signed-off-by: Chen Hanxiao
---
fs/proc
94 matches
Mail list logo