[PATCH] workqueue: fix a typo

2015-05-13 Thread Chen Hanxiao
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

[PATCH v2] docs: add VmPMD description in proc

2015-04-24 Thread Chen Hanxiao
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

RE: [PATCH] docs: add VmPMD description in proc

2015-04-23 Thread Chen, Hanxiao
> -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

[PATCH] docs: add VmPMD description in proc

2015-04-23 Thread Chen Hanxiao
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

RE: [PATCH] Docs: proc: fix kernel version

2015-04-21 Thread Chen, Hanxiao
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

[PATCH] Docs: proc: fix kernel version

2015-04-20 Thread Chen Hanxiao
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

RE: [PATCH v10 2/2] docs: add missing and new /proc/PID/status file entries, fix typos

2015-02-27 Thread Chen, Hanxiao
> -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

[PATCH v10 2/2] docs: add missing and new /proc/PID/status file entries, fix typos

2015-02-22 Thread Chen Hanxiao
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

[resend][PATCH v10 1/2] /proc/PID/status: show all sets of pid according to ns

2015-02-22 Thread Chen Hanxiao
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

[resend][PATCH v10 0/2] ns, procfs: pid conversion between ns

2015-02-22 Thread Chen Hanxiao
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

RE: [PATCH v10 0/2] ns, procfs: pid conversion between ns

2015-02-11 Thread Chen, Hanxiao
> -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

RE: [PATCH v10 0/2] ns, procfs: pid conversion between ns

2015-02-10 Thread Chen, Hanxiao
> -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

[PATCH v10 1/2] /proc/PID/status: show all sets of pid according to ns

2015-02-06 Thread Chen Hanxiao
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

[PATCH v10 2/2] docs: add missing and new /proc/PID/status file entries, fix typos

2015-02-06 Thread Chen Hanxiao
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

[PATCH v10 0/2] ns, procfs: pid conversion between ns

2015-02-06 Thread Chen Hanxiao
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

RE: [resend][PATCH v9 1/3] procfs: show hierarchy of pid namespace

2014-12-29 Thread Chen, Hanxiao
> -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

[resend][PATCH v9 1/3] procfs: show hierarchy of pid namespace

2014-12-23 Thread Chen Hanxiao
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

[resend][PATCH v9 0/3] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-12-23 Thread Chen Hanxiao
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

[PATCH v9 3/3] Documentation: add docs for /proc/pidns_hierarchy

2014-12-23 Thread Chen Hanxiao
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

[resend][PATCH v9 2/3] /proc/PID/status: show all sets of pid according to ns

2014-12-23 Thread Chen Hanxiao
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

[RESEND][PATCH] userns: use macro instead of magic number for max userns level

2014-12-12 Thread Chen Hanxiao
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

RE: [CFT] Can I get some Tested-By's on this series?

2014-12-11 Thread Chen, Hanxiao
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

RE: [PATCH v9 1/3] procfs: show hierarchy of pid namespace

2014-12-04 Thread Chen, Hanxiao
> -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

[PATCH v9 2/3] /proc/PID/status: show all sets of pid according to ns

2014-12-01 Thread Chen Hanxiao
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

[PATCH v9 3/3] Documentation: add docs for /proc/pidns_hierarchy

2014-12-01 Thread Chen Hanxiao
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

[PATCH v9 1/3] procfs: show hierarchy of pid namespace

2014-12-01 Thread Chen Hanxiao
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

[PATCH v9 0/3] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-12-01 Thread Chen Hanxiao
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

RE: [PATCH v8 1/2] procfs: show hierarchy of pid namespace

2014-11-24 Thread Chen, Hanxiao
> -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

RE: [PATCH v8 1/2] procfs: show hierarchy of pid namespace

2014-11-20 Thread Chen, Hanxiao
> -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

[PATCH v8 0/2] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-11-18 Thread Chen Hanxiao
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

[PATCH v8 1/2] procfs: show hierarchy of pid namespace

2014-11-18 Thread Chen Hanxiao
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

[PATCH v8 2/2] /proc/PID/status: show all sets of pid according to ns

2014-11-18 Thread Chen Hanxiao
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

[tip:sched/core] sched: Update comments about CLONE_NEWUTS and CLONE_NEWIPC

2014-11-16 Thread tip-bot for Chen Hanxiao
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

RE: [PATCH v7 1/2] procfs: show hierarchy of pid namespace

2014-11-13 Thread Chen, Hanxiao
> -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;

[PATCH v7 1/2] procfs: show hierarchy of pid namespace

2014-11-12 Thread Chen Hanxiao
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

[PATCH v7 2/2] /proc/PID/status: show all sets of pid according to ns

2014-11-12 Thread Chen Hanxiao
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

[PATCH v7 0/2] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-11-12 Thread Chen Hanxiao
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

RE: [PATCH 1/2v6] procfs: show hierarchy of pid namespace

2014-11-06 Thread Chen, Hanxiao
> -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

RE: [PATCH 1/2v6] procfs: show hierarchy of pid namespace

2014-11-05 Thread Chen, Hanxiao
> -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

[PATCH 2/2v6] /proc/PID/status: show all sets of pid according to ns

2014-11-05 Thread Chen Hanxiao
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

[PATCH 0/2v6] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-11-05 Thread Chen Hanxiao
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

[PATCH 1/2v6] procfs: show hierarchy of pid namespace

2014-11-05 Thread Chen Hanxiao
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

[PATCH] sched: updated comments of CLONE_NEWUTS and CLONE_NEWIPC

2014-11-04 Thread Chen Hanxiao
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

RE: [PATCHv5] procfs: show hierarchy of pid namespace

2014-11-04 Thread Chen, Hanxiao
> -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

[tip:sched/core] sched: Update comments for CLONE_NEWNS

2014-10-28 Thread tip-bot for Chen Hanxiao
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

RE: [RESEND][PATCH 0/2v5] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-10-28 Thread Chen, Hanxiao
> -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

[RESEND][PATCH 0/2v5] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-10-24 Thread Chen Hanxiao
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

[RESEND][PATCH 1/2v5] procfs: show hierarchy of pid namespace

2014-10-24 Thread Chen Hanxiao
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

[RESEND][PATCH 2/2v5] /proc/PID/status: show all sets of pid according to ns

2014-10-24 Thread Chen Hanxiao
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

RE: [PATCHv5] procfs: show hierarchy of pid namespace

2014-10-21 Thread Chen, Hanxiao
> -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

[PATCHv5] procfs: show hierarchy of pid namespace

2014-10-16 Thread Chen Hanxiao
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

RE: [PATCHv4] procfs: show hierarchy of pid namespace

2014-10-13 Thread Chen, Hanxiao
> -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

RE: [PATCHv4] procfs: show hierarchy of pid namespace

2014-10-09 Thread Chen, Hanxiao
> -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

RE: [PATCHv4] procfs: show hierarchy of pid namespace

2014-10-09 Thread Chen, Hanxiao
> -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

RE: [PATCH RFC] setns: return 0 directly if try to reassociate with current namespace

2014-10-08 Thread Chen, Hanxiao
> -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

[PATCHv4] procfs: show hierarchy of pid namespace

2014-10-08 Thread Chen Hanxiao
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

[PATCH RFC] setns: return 0 directly if try to reassociate with current namespace

2014-10-08 Thread Chen Hanxiao
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

[PATCHv2] sched: updated comments of CLONE_NEWNS

2014-10-07 Thread Chen Hanxiao
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

RE: [PATCH] sched: updated comments of CLONE_NEWNS

2014-10-07 Thread Chen, Hanxiao
> -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 >

[PATCH] sched: updated comments of CLONE_NEWNS

2014-10-06 Thread Chen Hanxiao
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

RE: [PATCH V5 08/13] sched: add a macro to ref all CLONE_NEW* flags

2014-10-06 Thread Chen, Hanxiao
> -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.

RE: [PATCH V5 01/13] namespaces: assign each namespace instance a serial number

2014-10-06 Thread Chen, Hanxiao
> -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.

RE: [PATCHv3 2/2] /proc/PID/status: show all sets of pid according to ns

2014-09-30 Thread Chen, Hanxiao
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: > >

RE: [PATCHv3 2/2] /proc/PID/status: show all sets of pid according to ns

2014-09-26 Thread Chen, Hanxiao
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

RE: [PATCHv3 2/2] /proc/PID/status: show all sets of pid according to ns

2014-09-25 Thread Chen, Hanxiao
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.

RE: [PATCHv3 1/2] procfs: show hierarchy of pid namespace

2014-09-25 Thread Chen, Hanxiao
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

[PATCHv3 0/2] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-09-24 Thread Chen Hanxiao
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

[PATCHv3 2/2] /proc/PID/status: show all sets of pid according to ns

2014-09-24 Thread Chen Hanxiao
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

[PATCHv3 1/2] procfs: show hierarchy of pid namespace

2014-09-24 Thread Chen Hanxiao
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

RE: [RESEND][PATCHv2 1/2] procfs: show hierarchy of pid namespace

2014-09-23 Thread Chen, Hanxiao
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

[RESEND][PATCHv3 2/2] /proc/PID/status: show all sets of pid according to ns

2014-09-22 Thread Chen Hanxiao
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

[RESEND][PATCHv2 1/2] procfs: show hierarchy of pid namespace

2014-09-22 Thread Chen Hanxiao
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

[RESEND][PATCH v2 0/2] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-09-22 Thread 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. v2: use a procfs text file instead of dirs to show the hierarchy of pid namespace Chen Hanxiao (2): procfs

[PATCH v2 0/2] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-09-16 Thread 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. v2: use a procfs text file instead of dirs to show the hierarchy of pid namespace Chen Hanxiao (2): procfs

[PATCHv2 1/2] procfs: show hierarchy of pid namespace

2014-09-16 Thread Chen Hanxiao
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

[RESEND][PATCH 2/2] /proc/PID/status: show all sets of pid according to ns

2014-09-16 Thread Chen Hanxiao
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

RE: [RFC PATCH 0/3] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-09-16 Thread Chen, Hanxiao
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

RE: [RESEND][PATCH] userns: use marco instead of magic number for max userns level

2014-09-11 Thread Chen, Hanxiao
> -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/

[RESEND][PATCH] userns: use marco instead of magic number for max userns level

2014-09-11 Thread Chen Hanxiao
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

RE: [RFC PATCH 2/3] procfs: show hierarchy of pid namespace

2014-09-11 Thread Chen, Hanxiao
> -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

RE: [RFC PATCH 0/3] ns, procfs: pid conversion between ns and showing pidns hierarchy

2014-09-05 Thread Chen, Hanxiao
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

[PATCH] userns: use marco instead of magic number for max userns level

2014-09-05 Thread Chen Hanxiao
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

RE: [RFC PATCH 2/3] procfs: show hierarchy of pid namespace

2014-09-04 Thread Chen, Hanxiao
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

[PATCH 3/3] /proc/pid/status: show all sets of pid according to ns

2014-09-03 Thread Chen Hanxiao
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

[RFC PATCH 0/3] ns,procfs: pid conversion between ns and showing pidns hierarchy

2014-09-03 Thread 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

[RFC PATCH 1/3] procfs: check uniq proc_dir_entry subdir name

2014-09-03 Thread Chen Hanxiao
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

[RFC PATCH 2/3] procfs: show hierarchy of pid namespace

2014-09-03 Thread Chen Hanxiao
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

[PATCH] cgroup: fix a typo in Documentation/cgroups/cgroups.txt

2014-06-24 Thread Chen Hanxiao
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

[PATCH v2] ns: introduce getnspid syscall

2014-06-20 Thread Chen Hanxiao
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

[PATCH] ns: introduce getnspid syscall

2014-06-17 Thread Chen Hanxiao
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

[PATCH v2] /proc/pid/status: show all sets of pid according to ns

2014-05-28 Thread Chen Hanxiao
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

[PATCH] /proc/pid/status: show all sets of pid according to ns

2014-05-26 Thread Chen Hanxiao
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

[Resend][PATCH] ns,proc: introduce pid_in_ns

2014-04-25 Thread Chen Hanxiao
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

[PATCH] ns: Introduce pid_in_ns under /proc

2014-04-22 Thread Chen Hanxiao
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