RE: [PATCH v3 1/3] Make call_usermodehelper_exec possible to set pid namespace

2016-09-06 Thread Zhao Lei
Hi, Andrei Vagin Thanks for review. > -Original Message- > From: Andrei Vagin [mailto:ava...@gmail.com] > Sent: Tuesday, September 06, 2016 5:12 PM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; contain...@lists.linux-foundation.org; Eric > W. > Bied

RE: [PATCH v2] Btrfs: remove unnecessary code of chunk_root assignment in btrfs_read_chunk_tree.

2016-09-05 Thread Zhao Lei
Hi, Sean Fu > -Original Message- > From: Sean Fu [mailto:fxinr...@gmail.com] > Sent: Tuesday, September 06, 2016 11:51 AM > To: dste...@suse.com > Cc: c...@fb.com; anand.j...@oracle.com; fdman...@suse.com; > zhao...@cn.fujitsu.com; linux-kernel@vger.kernel.org; > linux-bt...@vger.kernel.or

RE: [PATCH v3 0/3] Make core_pattern support namespace

2016-09-05 Thread Zhao Lei
Ping > -Original Message- > From: Zhao Lei [mailto:zhao...@cn.fujitsu.com] > Sent: Monday, August 29, 2016 8:07 PM > To: linux-kernel@vger.kernel.org > Cc: contain...@lists.linux-foundation.org; Eric W. Biederman > ; Mateusz Guzik ; > Kamezawa Hiroyuki ; Stéphane Gr

RE: [PATCH] Btrfs: remove unnecessary code of chunk_root assignment in btrfs_read_chunk_tree.

2016-09-05 Thread Zhao Lei
Hi, Qu Wenruo > From: Qu Wenruo [mailto:quwen...@cn.fujitsu.com] > Sent: Monday, September 05, 2016 3:57 PM > To: Zhao Lei ; 'Sean Fu' ; > dste...@suse.com > Cc: c...@fb.com; anand.j...@oracle.com; fdman...@suse.com; > linux-bt...@vger.kernel.org; linux-kernel@v

RE: [PATCH] Btrfs: remove unnecessary code of chunk_root assignment in btrfs_read_chunk_tree.

2016-09-04 Thread Zhao Lei
Hi, Sean Fu > From: Sean Fu [mailto:fxinr...@gmail.com] > Sent: Sunday, September 04, 2016 7:54 PM > To: dste...@suse.com > Cc: c...@fb.com; anand.j...@oracle.com; fdman...@suse.com; > zhao...@cn.fujitsu.com; linux-bt...@vger.kernel.org; > linux-kernel@vger.kernel.org; Sean Fu > Subject: [PATCH]

[PATCH v3 2/3] Limit dump_pipe program's permission to init for container

2016-08-29 Thread Zhao Lei
's filesystem, and write coredump into container's filesystem. The dumper's permission is also limited into subset of container's init process. Suggested-by: Eric W. Biederman Suggested-by: KOSAKI Motohiro Signed-off-by: Zhao Lei --- fs/coredump.c | 102 ++

[PATCH v3 0/3] Make core_pattern support namespace

2016-08-29 Thread Zhao Lei
d namespace, pointed out by: Andrei Vagin Changelog v1(RFC)->v2: 1: Add [PATCH 2/2] which was todo in [RFC v1]. 2: Pass a test script for each function. 3: Rebase on top of v4.7. Suggested-by: Eric W. Biederman Suggested-by: KOSAKI Motohiro Signed-off-by: Zhao Lei Zhao Lei (3): Make

[PATCH v3 3/3] Make core_pattern support namespace

2016-08-29 Thread Zhao Lei
ult (core dumped) # ls -l -rw--- 1 root root 331776 Feb 4 18:49 host_core.2351 -rwxr-xr-x 1 root root 759731 Feb 4 18:01 make_dump # Signed-off-by: Zhao Lei --- fs/coredump.c | 25 -- include/linux/pid_namespace.h | 3 +++ kernel/pid.c

[PATCH v3 1/3] Make call_usermodehelper_exec possible to set pid namespace

2016-08-29 Thread Zhao Lei
make pid namespace active, and run program in the child process. This function is helpful for coredump to run pipe_program in specific container environment. Signed-off-by: Zhao Lei --- fs/coredump.c | 3 +- include/linux/kmod.h| 2 + init/do_mounts_initrd.c | 3

RE: [PATCH v2 1/2] Limit dump_pipe program's permission to init for container

2016-08-11 Thread Zhao Lei
Hi, Andrei Vagin > -Original Message- > From: 'Andrei Vagin' [mailto:ava...@gmail.com] > Sent: Saturday, August 06, 2016 1:14 AM > To: Zhao Lei > Cc: 'LKML' ; 'Linux Containers' > ; 'Eric W. Biederman' > > Subject: Re:

RE: [PATCH v2 1/2] Limit dump_pipe program's permission to init for container

2016-08-05 Thread Zhao Lei
Hi, Andrei Vagin Thanks for your detailed review and suggestion. > -Original Message- > From: Andrei Vagin [mailto:ava...@gmail.com] > Sent: Friday, August 05, 2016 2:32 PM > To: Zhao Lei > Cc: LKML ; Linux Containers > ; Eric W. Biederman > > Subject:

[PATCH v2 0/2] Make core_pattern support namespace

2016-08-02 Thread Zhao Lei
elog v1(RFC)->v2: 1: Add [PATCH 2/2] which was todo in [RFC v1]. 2: Pass a test script for each function. 3: Rebase on top of v4.7. Suggested-by: Eric W. Biederman Suggested-by: KOSAKI Motohiro Signed-off-by: Zhao Lei Zhao Lei (2): Limit dump_pipe program's permission to init for container

[PATCH v2 2/2] Make core_pattern support namespace

2016-08-02 Thread Zhao Lei
ult (core dumped) # ls -l -rw--- 1 root root 331776 Feb 4 18:49 host_core.2351 -rwxr-xr-x 1 root root 759731 Feb 4 18:01 make_dump # Signed-off-by: Zhao Lei --- fs/coredump.c | 25 -- include/linux/pid_namespace.h | 3 +++ kernel/pid.c

[PATCH v2 1/2] Limit dump_pipe program's permission to init for container

2016-08-02 Thread Zhao Lei
's filesystem, and write coredump into container's filesystem. The dumper's permission is also limited into subset of container's init process. Suggested-by: Eric W. Biederman Suggested-by: KOSAKI Motohiro Signed-off-by: Zhao Lei --- fs/coredump.c | 87 +++

RE: [PATCH] [RFC] Limit dump_pipe program's permission to init for container

2016-07-12 Thread Zhao Lei
Hi, Stéphane Graber Many thanks for your review! > -Original Message- > From: Stéphane Graber [mailto:stgra...@ubuntu.com] > Sent: Friday, July 08, 2016 11:26 PM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; contain...@lists.linux-foundation.org; Eric > W. >

[tip:sched/core] sched/cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index enums

2016-07-09 Thread tip-bot for Zhao Lei
Commit-ID: 9acacc2ac525ef1397af63b15cef7bb77a823c06 Gitweb: http://git.kernel.org/tip/9acacc2ac525ef1397af63b15cef7bb77a823c06 Author: Zhao Lei AuthorDate: Mon, 20 Jun 2016 17:37:18 +0800 Committer: Ingo Molnar CommitDate: Sat, 9 Jul 2016 13:56:15 +0200 sched/cpuacct: Merge

[tip:sched/core] sched/cpuacct: Use loop to consolidate code in cpuacct_stats_show()

2016-07-09 Thread tip-bot for Zhao Lei
Commit-ID: 8e546bfafb3121ed25c73a0c02311ec58459344a Gitweb: http://git.kernel.org/tip/8e546bfafb3121ed25c73a0c02311ec58459344a Author: Zhao Lei AuthorDate: Mon, 20 Jun 2016 17:37:19 +0800 Committer: Ingo Molnar CommitDate: Sat, 9 Jul 2016 13:56:15 +0200 sched/cpuacct: Use loop to

[tip:sched/core] sched/cpuacct: Introduce cpuacct.usage_all to show all CPU stats together

2016-07-09 Thread tip-bot for Zhao Lei
Commit-ID: 277a13e4f0d661678a7084bf97ed96a99c7dac21 Gitweb: http://git.kernel.org/tip/277a13e4f0d661678a7084bf97ed96a99c7dac21 Author: Zhao Lei AuthorDate: Mon, 20 Jun 2016 17:37:20 +0800 Committer: Ingo Molnar CommitDate: Sat, 9 Jul 2016 13:56:15 +0200 sched/cpuacct: Introduce

[PATCH] [RFC] Limit dump_pipe program's permission to init for container

2016-07-08 Thread Zhao Lei
om/lists/linux/kernel/2397602 Todo: 1: Set different core_pattern to host and each container. 2: Keep compatibility with current design All above are done in previous version of this patch, need some restruct. Any suggestion is welcome for this patch. Suggested-by: Eric W. Biederman Suggested-b

[PATCH v4 0/3] cpuacct: Introduce cpuacct.usage_all to show all cpu stats together(was: [PATCH v2 0/3] cpuacct: Show all detail stats in one file)

2016-06-20 Thread Zhao Lei
e between variable definitions and the first non-definition C statement. Above are suggested by: Ingo Molnar 4: Remove '[]' in CPUID, to make it easier to parse. Suggested by: Peter Zijlstra Zhao Lei (3): cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index cpua

[PATCH v4 2/3] cpuacct: Use loop to avoid copies of the similar code in cpuacct_stats_show()

2016-06-20 Thread Zhao Lei
Currently we have copies of the similar code for each cpustat(system/user) in cpuacct_stats_show(), this patch use loop instead. Only a little cleanup. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff

[PATCH v4 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index

2016-06-20 Thread Zhao Lei
These two types have similar function. No need to separate them. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 47 --- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 41f85c4

[PATCH v4 3/3] cpuacct: Introduce cpuacct.usage_all to show all cpu stats together

2016-06-20 Thread Zhao Lei
his file with a simple data-processing code. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 40 1 file changed, 40 insertions(+) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 677cd1a..bc0b309c 100644 --- a/kernel/sched/cpuacct

[PATCH v2 3/3] Write dump into container's filesystem for pipe_type core_pattern

2016-06-07 Thread Zhao Lei
t -c 1024000 [GUEST]# rm -f /tmp/*dump* [GUEST]# ./make_dump [GUEST]Segmentation fault (core dumped) [GUEST]# ls -l /tmp/*dump* # Should not see dump file [GUEST]ls: /tmp/*dump*: No such file or directory [HOST] # ls -l /tmp/*dump* # Should see dump file [HOST] -rw-r-

[PATCH v2 1/3] Save dump_root into pid_namespace

2016-06-07 Thread Zhao Lei
ng, the process who write the dumpfile is a kernel thread, whose fs_root always point to host's root fs. This patch save the dump_root into pid_namespace, and when a crach happened in container, this dump_root can be used as fs_root of dump_writter_thread. Signed-off-by: Zhao Lei

[PATCH v2 2/3] Make dump_pipe thread possilbe to select the rootfs

2016-06-07 Thread Zhao Lei
To make the dump_pipe thread run in container's filesystem, we need to make it possible to select its fs_root from fork. Then the dump_pipe thread will exec user_defined pipe program in container's fs_root, and the problem will also write dumpdata into the same fs_root. Signed-off-by

[PATCH v2 0/3] Write dump into container's filesystem for pipe_type core_pattern

2016-06-07 Thread Zhao Lei
d forking thread from the crach process. Suggested-by: Eric W. Biederman 2: To keep compatibility with current code, if user hadn't change core_pattern in container, the dump file will still write to the host filesystem. Suggested-by: Eric W. Biederman Zhao Lei (3): Save du

[PATCH 1/3] Save dump_root into pid_namespace

2016-06-06 Thread Zhao Lei
ng, the process who write the dumpfile is a kernel thread, whose fs_root always point to host's root fs. This patch save the dump_root into pid_namespace, and when a crach happened in container, this dump_root can be used as fs_root of dump_writter_thread. Signed-off-by: Zhao Lei

[PATCH 3/3] Write dump into container's filesystem for pipe_type core_pattern

2016-06-06 Thread Zhao Lei
t -c 1024000 [GUEST]# rm -f /tmp/*dump* [GUEST]# ./make_dump [GUEST]Segmentation fault (core dumped) [GUEST]# ls -l /tmp/*dump* # Should not see dump file [GUEST]ls: /tmp/*dump*: No such file or directory [HOST] # ls -l /tmp/*dump* # Should see dump file [HOST] -rw-r-

[PATCH 0/3] Write dump into container's filesystem for pipe_type core_pattern

2016-06-06 Thread Zhao Lei
p compatibility with current code, if user hadn't change core_pattern in container, the dump file will still write to the host filesystem. Suggested-by: Eric W. Biederman Zhao Lei (3): Save dump_root into pid_namespace Make dump_pipe thread possilbe to select the rootfs Writ

[PATCH 2/3] Make dump_pipe thread possilbe to select the rootfs

2016-06-06 Thread Zhao Lei
To make the dump_pipe thread run in container's filesystem, we need to make it possible to select its fs_root from fork. Then the dump_pipe thread will exec user_defined pipe program in container's fs_root, and the problem will also write dumpdata into the same fs_root. Signed-off-by

[PATCH v3 2/3] cpuacct: Use loop to avoid copies of the similar code in cpuacct_stats_show()

2016-05-17 Thread Zhao Lei
Currently we have copies of the similar code for each cpustat(system/user) in cpuacct_stats_show(), this patch use loop instead. Only a little cleanup. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff

[PATCH v3 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index

2016-05-17 Thread Zhao Lei
These two types have similar function. No need to separate them. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 47 --- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 41f85c4

[PATCH v3 3/3] cpuacct: Introduce cpuacct.usage_all to show all cpu stats together

2016-05-17 Thread Zhao Lei
his file with a simple data-processing code. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 40 1 file changed, 40 insertions(+) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 677cd1a..bc0b309c 100644 --- a/kernel/sched/cpuacct

[PATCH v3 0/3] cpuacct: Introduce cpuacct.usage_all to show all cpu stats together(was: [PATCH v2 0/3] cpuacct: Show all detail stats in one file)

2016-05-17 Thread Zhao Lei
missed newline between variable definitions and the first non-definition C statement. Above are suggested by: Ingo Molnar 4: Remove '[]' in CPUID, to make it easier to parse. Suggested by: Peter Zijlstra Zhao Lei (3): cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index

[PATCH v2 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index

2016-05-13 Thread Zhao Lei
These two types have similar function. No need to separate them. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 47 --- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 41f85c4

[PATCH v2 3/3] cpuacct: Show all detail stats in one file

2016-05-13 Thread Zhao Lei
his file with a simple data-processing code. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 40 1 file changed, 40 insertions(+) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 677cd1a..bc0b309c 100644 --- a/kernel/sched/cpuacct

[PATCH v2 0/3] cpuacct: Show all detail stats in one file

2016-05-13 Thread Zhao Lei
finitions and the first non-definition C statement. Above are suggested by: Ingo Molnar 4: Remove '[]' in CPUID, to make it easier to parse. Suggested by: Peter Zijlstra Zhao Lei (3): cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index cpuacct: Use lo

[PATCH v2 2/3] cpuacct: Use loop to avoid copies of the similar code in cpuacct_stats_show()

2016-05-13 Thread Zhao Lei
Currently we have copies of the similar code for each cpustat(system/user) in cpuacct_stats_show(), this patch use loop instead. Only a little cleanup. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff

RE: [PATCH 0/3] Write dump into container's filesystem for pipe_type core_pattern

2016-05-13 Thread Zhao Lei
(Offline) Hi, Eric I rewrited patch to support code_dump in container according to your suggestion. Could you take a look of it, and give me your opinion in this version? Thanks Zhaolei > -Original Message- > From: Zhao Lei [mailto:zhao...@cn.fujitsu.com] > Sent: Wednesda

[PATCH 1/3] Save dump_root into pid_namespace

2016-05-10 Thread Zhao Lei
ng, the process who write the dumpfile is a kernel thread, whose fs_root always point to host's root fs. This patch save the dump_root into pid_namespace, and when a crach happened in container, this dump_root can be used as fs_root of dump_writter_thread. Signed-off-by: Zhao Lei

[PATCH 0/3] Write dump into container's filesystem for pipe_type core_pattern

2016-05-10 Thread Zhao Lei
ore_pattern in container, the dump file will still write to the host filesystem. Suggested-by: Eric W. Biederman Zhao Lei (3): [RFC] Save dump_root into pid_namespace [RFC] Make dump_pipe thread possilbe to select the rootfs [RFC] Write dump into container's fi

[PATCH 3/3] Write dump into container's filesystem for pipe_type core_pattern

2016-05-10 Thread Zhao Lei
t -c 1024000 [GUEST]# rm -f /tmp/*dump* [GUEST]# ./make_dump [GUEST]Segmentation fault (core dumped) [GUEST]# ls -l /tmp/*dump* # Should not see dump file [GUEST]ls: /tmp/*dump*: No such file or directory [HOST] # ls -l /tmp/*dump* # Should see dump file [HOST] -rw-r-

[PATCH 2/3] Make dump_pipe thread possilbe to select the rootfs

2016-05-10 Thread Zhao Lei
To make the dump_pipe thread run in container's filesystem, we need to make it possible to select its fs_root from fork. Then the dump_pipe thread will exec user_defined pipe program in container's fs_root, and the problem will also write dumpdata into the same fs_root. Signed-off-by

[PATCH 1/3] cpuacct: Merge cpuacct_usage_index and cpuacct_usage_index

2016-05-10 Thread Zhao Lei
These two types have similar function. No need to separate them. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 47 --- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 41f85c4

[PATCH 3/3] cpuacct: Show all detail stats in one file

2016-05-10 Thread Zhao Lei
from this file with a simple data-processing code. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 40 1 file changed, 40 insertions(+) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index e643483..b84ae40 100644 --- a/kernel/sched/

[PATCH 2/3] cpuacct: Simplify cpuacct_stats_show

2016-05-10 Thread Zhao Lei
Merge code for each cpustat(system/user) into a loop, to avoid clone of code blocks. Only a little cleanup. Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel

[PATCH 0/3] cpuacct: Show all detail stats in one file

2016-05-10 Thread Zhao Lei
thor: Anton Blanchard AuthorDate: Wed, 6 Apr 2016 21:59:50 +1000 Committer: Ingo Molnar CommitDate: Wed, 13 Apr 2016 13:22:37 +0200 Zhao Lei (3): cpuacct: Merge cpuacct_usage_index and cpuacct_usage_index cpuacct: Simplify cpuacct_stats_show cpuacct: Show all detail stats in one file

RE: [PATCH] scripts/spelling.txt: add "fimware" misspelling

2016-04-26 Thread Zhao Lei
Hi, Kees Cook * From: Kees Cook [mailto:keesc...@chromium.org] > Sent: Wednesday, April 27, 2016 7:48 AM > To: Andrew Morton > Cc: Randy Dunlap ; Andy Whitcroft > ; Joe Perches ; Zhao Lei > ; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: [PATCH] scri

RE: [PATCH 0/3] [RFC] Write dump into container's filesystem for pipe_type core_pattern

2016-04-26 Thread Zhao Lei
Ping Thanks Zhaolei > From: Zhao Lei [mailto:zhao...@cn.fujitsu.com] > Sent: Friday, April 15, 2016 6:47 PM > To: linux-kernel@vger.kernel.org > Cc: contain...@lists.linux-foundation.org; Eric W. Biederman > ; Mateusz Guzik ; > Kamezawa Hiroyuki ; Zhao Lei > > Subject:

[PATCH 3/3] [RFC] Write dump into container's filesystem for pipe_type core_pattern

2016-04-15 Thread Zhao Lei
t -c 1024000 [GUEST]# rm -f /tmp/*dump* [GUEST]# ./make_dump [GUEST]Segmentation fault (core dumped) [GUEST]# ls -l /tmp/*dump* # Should not see dump file [GUEST]ls: /tmp/*dump*: No such file or directory [HOST] # ls -l /tmp/*dump* # Should see dump file [HOST] -rw-r-

[PATCH 1/3] [RFC] Save dump_root into pid_namespace

2016-04-15 Thread Zhao Lei
ng, the process who write the dumpfile is a kernel thread, whose fs_root always point to host's root fs. This patch save the dump_root into pid_namespace, and when a crach happened in container, this dump_root can be used as fs_root of dump_writter_thread. Signed-off-by: Zhao Lei

[PATCH 0/3] [RFC] Write dump into container's filesystem for pipe_type core_pattern

2016-04-15 Thread Zhao Lei
ore_pattern in container, the dump file will still write to the host filesystem. Suggested-by: Eric W. Biederman Zhao Lei (3): [RFC] Save dump_root into pid_namespace [RFC] Make dump_pipe thread possilbe to select the rootfs [RFC] Write dump into container's fi

[PATCH 2/3] [RFC] Make dump_pipe thread possilbe to select the rootfs

2016-04-15 Thread Zhao Lei
To make the dump_pipe thread run in container's filesystem, we need to make it possible to select its fs_root from fork. Then the dump_pipe thread will exec user_defined pipe program in container's fs_root, and the problem will also write dumpdata into the same fs_root. Signed-off-by

RE: Commit 'sched/cpuacct: Split usage accounting into user_usage and sys_usage' causing crashes

2016-04-10 Thread Zhao Lei
Hi, Guenter, > From: Guenter Roeck [mailto:li...@roeck-us.net] > Sent: Monday, April 11, 2016 12:15 AM > To: Dongsheng Yang > Cc: linux-kernel@vger.kernel.org; Zhao Lei ; Peter > Zijlstra ; Tejun Heo ; Ingo Molnar > ; linux-n...@vger.kernel.org > Subject: Commit '

RE: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()

2016-04-06 Thread Zhao Lei
> -Original Message- > From: Srikar Dronamraju [mailto:sri...@linux.vnet.ibm.com] > Sent: Wednesday, April 06, 2016 9:27 PM > To: Anton Blanchard > Cc: Peter Zijlstra ; Ingo Molnar ; > t...@linutronix.de; efa...@gmx.de; hte...@gmail.com; > linux-kernel@vger.kernel.org; t...@kernel.org; t

RE: [tip:sched/core] sched/cpuacct: Split usage accounting into user_usage and sys_usage

2016-04-06 Thread Zhao Lei
Hi, Anton and Peter > -Original Message- > From: Peter Zijlstra [mailto:pet...@infradead.org] > Sent: Wednesday, April 06, 2016 7:08 PM > To: Anton Blanchard > Cc: Ingo Molnar ; Srikar Dronamraju > ; t...@linutronix.de; efa...@gmx.de; > hte...@gmail.com; linux-kernel@vger.kernel.org; t...

RE: [tip:sched/core] sched/cpuacct: Split usage accounting into user_usage and sys_usage

2016-04-06 Thread Zhao Lei
Hi, Ingo and Srikar, > -Original Message- > From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of Ingo > Molnar > Sent: Wednesday, April 06, 2016 2:55 PM > To: Srikar Dronamraju > Cc: t...@linutronix.de; efa...@gmx.de; hte...@gmail.com; > linux-kernel@vger.kernel.org; t...@ke

[tip:sched/core] sched/cpuacct: Show all possible CPUs in cpuacct output

2016-03-31 Thread tip-bot for Zhao Lei
Commit-ID: 5ca3726af7f66a8cc71ce4414cfeb86deb784491 Gitweb: http://git.kernel.org/tip/5ca3726af7f66a8cc71ce4414cfeb86deb784491 Author: Zhao Lei AuthorDate: Tue, 22 Mar 2016 16:37:07 +0800 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:45:56 +0200 sched/cpuacct: Show all

RE: [PATCH v2 3/3] Make core_pattern support namespace

2016-03-23 Thread Zhao Lei
Hi, Eric > -Original Message- > From: Eric W. Biederman [mailto:ebied...@xmission.com] > Sent: Wednesday, March 23, 2016 6:43 AM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; contain...@lists.linux-foundation.org; > 'Mateusz Guzik' ; 'Kamezawa Hiroyu

[PATCH v4 1/4] cpuacct: rename parameter in cpuusage_write for readability

2016-03-22 Thread Zhao Lei
g the code more readable. From: Dongsheng Yang Acked-by: Tejun Heo Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index dd7cbb5..9c2bbf7 100644 --- a/kernel/sched/cpuacct.c +++

[PATCH v4 2/4] cpuacct: small restruct for cpuacct

2016-03-22 Thread Zhao Lei
1: Use for() instead of while() loop in some functions to make code simple. 2: Use this_cpu_ptr() instead of per_cpu_ptr() to make code clean with little performance up. Suggested-by: Peter Zijlstra Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 28

[PATCH v4 0/4] cpuacct: split usage into user_usage and sys_usage

2016-03-22 Thread Zhao Lei
e over 80 characters Yang Dongsheng (2): cpuacct: rename parameter in cpuusage_write for readability cpuacct: split usage into user_usage and sys_usage. Zhao Lei (2): cpuacct: small restruct for cpuacct cpuacct: Show possible_cpu in cpuacct kernel/sched/cpuacc

[PATCH v4 4/4] cpuacct: split usage into user_usage and sys_usage

2016-03-22 Thread Zhao Lei
Acked-by: Tejun Heo Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 140 +++-- 1 file changed, 113 insertions(+), 27 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 4399850..6a4de22 100644 --- a/kernel/sched

[PATCH v4 3/4] cpuacct: Show possible_cpu in cpuacct

2016-03-22 Thread Zhao Lei
Suggested-by: Peter Zijlstra Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 434c2fa..4399850 100644 --- a/kernel/sched/cpuacct.c +++ b/kernel/sched/cpuacct.c

RE: [PATCH v2 3/3] Make core_pattern support namespace

2016-03-21 Thread Zhao Lei
Hi, Eric > -Original Message- > From: Eric W. Biederman [mailto:ebied...@xmission.com] > Sent: Tuesday, March 22, 2016 5:25 AM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; contain...@lists.linux-foundation.org; > 'Mateusz Guzik' ; 'Kamezawa Hiroyuki

[tip:sched/urgent] sched/cpuacct: Simplify the cpuacct code

2016-03-21 Thread tip-bot for Zhao Lei
Commit-ID: 73e6aafd9ea81498d31361f01db84a0118da2d1c Gitweb: http://git.kernel.org/tip/73e6aafd9ea81498d31361f01db84a0118da2d1c Author: Zhao Lei AuthorDate: Thu, 17 Mar 2016 12:19:43 +0800 Committer: Ingo Molnar CommitDate: Mon, 21 Mar 2016 11:00:28 +0100 sched/cpuacct: Simplify the

RE: [PATCH v2 3/3] Make core_pattern support namespace

2016-03-21 Thread Zhao Lei
Hi, Eric > -Original Message- > From: Eric W. Biederman [mailto:ebied...@xmission.com] > Sent: Monday, March 21, 2016 4:15 PM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; contain...@lists.linux-foundation.org; > 'Mateusz Guzik' ; 'Kamezawa Hiroyuki

RE: [PATCH v2 3/3] Make core_pattern support namespace

2016-03-21 Thread Zhao Lei
Hi, Eric W. Biederman > -Original Message- > From: Eric W. Biederman [mailto:ebied...@xmission.com] > Sent: Monday, March 21, 2016 2:00 PM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; contain...@lists.linux-foundation.org; > Mateusz Guzik > Subject: Re

[PATCH v2 2/3] Run dump pipe in container's namespace

2016-03-20 Thread Zhao Lei
27;s system: # # # cat /proc/sys/kernel/core_pattern |/dump_pipe # cat /dump_pipe #!/bin/sh cat >/tmp/guest_dump_$1_$2_$3_$4_$5_$6 # rm -f /tmp/*dump* # ./make_dump Segmentation fault (core dumped) # ls -l /tmp/*dump* -rw-r--r--1 root root 331776

[PATCH v3 0/3] cpuacct: split usage into user_usage and sys_usage

2016-03-19 Thread Zhao Lei
usage into user_usage and sys_usage. Zhao Lei (1): Some small restruct for cpuacct kernel/sched/cpuacct.c | 165 +++-- kernel/sched/cpuacct.h | 4 +- 2 files changed, 120 insertions(+), 49 deletions(-) -- 1.8.5.1

[PATCH v3 3/3] cpuacct: split usage into user_usage and sys_usage

2016-03-19 Thread Zhao Lei
Acked-by: Tejun Heo Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 140 +++-- 1 file changed, 113 insertions(+), 27 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 434c2fa..9075b9d 100644 --- a/kernel/sched

[PATCH v2 1/3] Make _do_fork support return to caller's code

2016-03-19 Thread Zhao Lei
task in user process's context, it is used for next patch to fix core dump's security problem in container. This patch add a argument named return_to_kernel to _do_fork(), to make new task always return to kernel_space with this argument. Signed-off-by: Zhao Lei --- arch/alpha/kernel

[PATCH v2 0/3] Make core_pattern support namespace

2016-03-19 Thread Zhao Lei
e kernel/fork.c, suggested by: Kamezawa Hiroyuki Zhao Lei (3): Make _do_fork support return to caller's code Run dump pipe in container's namespace Make core_pattern support namespace arch/alpha/kernel/process.c | 4 +- arch/arc/kernel/process.c | 4 +

[PATCH v3 2/3] Some small restruct for cpuacct

2016-03-19 Thread Zhao Lei
1: Use for() instead of while() loop in some functions to make code simple. 2: Use this_cpu_ptr() instead of per_cpu_ptr() to make code clean with little performance up. Suggested-by: Peter Zijlstra Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 28

RE: [PATCH 0/2] Make core_pattern support namespace

2016-03-19 Thread Zhao Lei
Hi, Kamezawa-san > From: Kamezawa Hiroyuki [mailto:kamezawa.hir...@jp.fujitsu.com] > Sent: Thursday, March 17, 2016 8:58 AM > To: Zhao Lei ; linux-kernel@vger.kernel.org; Mateusz > Guzik > Cc: contain...@lists.linux-foundation.org > Subject: Re: [PATCH 0/2] Make core_pattern

[PATCH v2 3/3] Make core_pattern support namespace

2016-03-19 Thread Zhao Lei
host_core # ls host_core.2175 make_dump make_dump.c # rm -f host_core.2175 # ./make_dump Segmentation fault (core dumped) # ls -l -rw--- 1 root root 331776 Feb 4 18:49 host_core.2351 -rwxr-xr-x 1 root root 759731 Feb 4 18:01 make_dump # Signed-off-by: Zhao Lei --- fs/coredump.c

[PATCH v3 1/3] cpuacct: rename parameter in cpuusage_write for readability

2016-03-19 Thread Zhao Lei
g the code more readable. From: Dongsheng Yang Acked-by: Tejun Heo Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index dd7cbb5..9c2bbf7 100644 --- a/kernel/sched/cpuacct.c +++

RE: [PATCH v3 3/3] cpuacct: split usage into user_usage and sys_usage

2016-03-18 Thread Zhao Lei
Hi, Peter Zijlstra > -Original Message- > From: Peter Zijlstra [mailto:pet...@infradead.org] > Sent: Thursday, March 17, 2016 4:40 PM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; Tejun Heo ; Yang > Dongsheng > Subject: Re: [PATCH v3 3/3] cpuacct: split usag

RE: [PATCH v2 2/2] cpuacct: split usage into user_usage and sys_usage.

2016-03-16 Thread Zhao Lei
Hi, Peter Zijlstra Thanks for so detailed review. > -Original Message- > From: Peter Zijlstra [mailto:pet...@infradead.org] > Sent: Thursday, March 10, 2016 9:27 PM > To: Zhao Lei > Cc: cgro...@vger.kernel.org; linux-kernel@vger.kernel.org; > mi...@redhat.com; t..

[PATCH 1/2] Run dump pipe in container's namespace

2016-03-16 Thread Zhao Lei
: # # # cat /proc/sys/kernel/core_pattern |/dump_pipe # cat /dump_pipe #!/bin/sh cat >/tmp/guest_dump_$1_$2_$3_$4_$5_$6 # rm -f /tmp/*dump* # ./make_dump Segmentation fault (core dumped) # ls -l /tmp/*dump* -rw-r--r--1 root root 331776 Mar 16 09:02 /tmp

[PATCH 2/2] Make core_pattern support namespace

2016-03-16 Thread Zhao Lei
host_core # ls host_core.2175 make_dump make_dump.c # rm -f host_core.2175 # ./make_dump Segmentation fault (core dumped) # ls -l -rw--- 1 root root 331776 Feb 4 18:49 host_core.2351 -rwxr-xr-x 1 root root 759731 Feb 4 18:01 make_dump # Signed-off-by: Zhao Lei --- fs/coredump.c

[PATCH 0/2] Make core_pattern support namespace

2016-03-16 Thread Zhao Lei
host's filesystem. (See discussion of that patch for detail) Now we can solve the second problem by [PATCH 1/2], I send the origional patch with it. Zhao Lei (2): Run dump pipe in container's namespace Make core_pattern support namespace arch/x86/kernel/process_32.c | 5 +-- arch/

[PATCH v2 0/2] cpuacct: rename parameter in cpuusage_write for readability

2016-03-04 Thread Zhao Lei
The name of 'reset' makes a little confusion in reading, we would say, if we want to reset usage, return -EINVAL. That's not true. Actually, we want to say, we only allow user to do a reset. This patch rename reset to val and add a comment here, making the code more readable. Changelog v1->v2: 1:

[PATCH v2 1/2] cpuacct: rename parameter in cpuusage_write for readability

2016-03-04 Thread Zhao Lei
g the code more readable. From: Dongsheng Yang Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index dd7cbb5..9c2bbf7 100644 --- a/kernel/sched/cpuacct.c +++ b/kernel/sched/cpuac

[PATCH v2 2/2] cpuacct: split usage into user_usage and sys_usage.

2016-03-04 Thread Zhao Lei
Acked-by: Tejun Heo Signed-off-by: Zhao Lei --- kernel/sched/cpuacct.c | 144 ++--- 1 file changed, 124 insertions(+), 20 deletions(-) diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 9c2bbf7..f3446b8 100644 --- a/kernel/sched

RE: [RESEND PATCH 2/2] cpuacct: split usage into user_usage and sys_usage.

2016-03-01 Thread Zhao Lei
Hi, Tejun Heo > From: linux-kernel-ow...@vger.kernel.org > [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Tejun Heo > Sent: Tuesday, December 22, 2015 5:33 AM > To: Dongsheng Yang > Cc: cgro...@vger.kernel.org; linux-kernel@vger.kernel.org; > mi...@redhat.com; pet...@infradead.org > Sub

RE: [PATCH] Make core_pattern support namespace

2016-02-19 Thread Zhao Lei
Hi, Biederman > -Original Message- > From: Eric W. Biederman [mailto:ebied...@xmission.com] > Sent: Friday, February 19, 2016 4:18 AM > To: Zhao Lei > Cc: 'Mateusz Guzik' ; > contain...@lists.linux-foundation.org; linux-kernel@vger.kernel.org > Subject

RE: [PATCH] Make core_pattern support namespace

2016-02-18 Thread Zhao Lei
Hi, Mateusz Guzik > -Original Message- > From: Mateusz Guzik [mailto:mgu...@redhat.com] > Sent: Thursday, February 18, 2016 4:54 AM > To: Eric W. Biederman > Cc: Zhao Lei ; contain...@lists.linux-foundation.org; > linux-kernel@vger.kernel.org > Subject: Re: [PAT

RE: [PATCH] Make core_pattern support namespace

2016-02-18 Thread Zhao Lei
Hi, Mateusz Guzik Thanks for your detailed comment and suggestion on this patch. > -Original Message- > From: Mateusz Guzik [mailto:mgu...@redhat.com] > Sent: Tuesday, February 16, 2016 10:26 PM > To: Zhao Lei > Cc: linux-kernel@vger.kernel.org; contain...@lists.linux

[PATCH] Make core_pattern support namespace

2016-02-16 Thread Zhao Lei
host_core # ls host_core.2175 make_dump make_dump.c # rm -f host_core.2175 # ./make_dump Segmentation fault (core dumped) # ls -l -rw--- 1 root root 331776 Feb 4 18:49 host_core.2351 -rwxr-xr-x 1 root root 759731 Feb 4 18:01 make_dump # Signed-off-by: Zhao Lei --- fs/coredump.c

[PATCH] [RFC] Make core_pattern support namespace

2016-02-04 Thread Zhao Lei
host_core # ls host_core.2175 make_dump make_dump.c # rm -f host_core.2175 # ./make_dump Segmentation fault (core dumped) # ls -l -rw--- 1 root root 331776 Feb 4 18:49 host_core.2351 -rwxr-xr-x 1 root root 759731 Feb 4 18:01 make_dump # Signed-off-by: Zhao Lei --- fs/coredump.c

[PATCH] Add some typo-words in patch into spelling.txt

2015-08-20 Thread Zhao Lei
is not my mother language. Signed-off-by: Zhao Lei --- scripts/spelling.txt | 24 1 file changed, 24 insertions(+) diff --git a/scripts/spelling.txt b/scripts/spelling.txt index bb8e4d0..40a0b8d 100644 --- a/scripts/spelling.txt +++ b/scripts/spelling.txt @@ -32,6 +

RE: Regression caused by using node_to_bdi()

2015-04-14 Thread Zhao Lei
Hi, Christoph > -Original Message- > From: 'Christoph Hellwig' [mailto:h...@lst.de] > Sent: Tuesday, April 14, 2015 1:33 AM > To: Zhao Lei > Cc: 'Christoph Hellwig'; linux-fsde...@vger.kernel.org; 'Jan Kara'; 'Jens > Axboe'; >

RE: Regression caused by using node_to_bdi()

2015-04-14 Thread Zhao Lei
Hi, Boaz > -Original Message- > From: Boaz Harrosh [mailto:b...@plexistor.com] > Sent: Monday, April 13, 2015 8:31 PM > To: Zhao Lei; 'Boaz Harrosh'; 'Christoph Hellwig' > Cc: linux-fsde...@vger.kernel.org; 'Jan Kara'; 'Jens Axboe&

RE: Regression caused by using node_to_bdi()

2015-04-13 Thread Zhao Lei
Hi, Boaz > -Original Message- > From: Zhao Lei [mailto:zhao...@cn.fujitsu.com] > Sent: Monday, April 13, 2015 3:00 PM > To: 'Boaz Harrosh'; 'Christoph Hellwig' > Cc: 'linux-fsde...@vger.kernel.org'; 'Jan Kara'; 'Jens Axboe&#x

RE: Regression caused by using node_to_bdi()

2015-04-13 Thread Zhao Lei
Hi, Boaz > -Original Message- > From: Boaz Harrosh [mailto:b...@plexistor.com] > Sent: Sunday, April 12, 2015 10:39 PM > To: Boaz Harrosh; Zhao Lei; 'Christoph Hellwig' > Cc: linux-fsde...@vger.kernel.org; 'Jan Kara'; 'Jens Axboe'; &#x

RE: Regression caused by using node_to_bdi()

2015-04-12 Thread Zhao Lei
Hi, Boaz > -Original Message- > From: Boaz Harrosh [mailto:b...@plexistor.com] > Sent: Sunday, April 12, 2015 10:39 PM > To: Boaz Harrosh; Zhao Lei; 'Christoph Hellwig' > Cc: linux-fsde...@vger.kernel.org; 'Jan Kara'; 'Jens Axboe'; &#x

RE: Regression caused by using node_to_bdi()

2015-04-01 Thread Zhao Lei
Hi, Christoph *From: Zhao Lei [mailto:zhao...@cn.fujitsu.com] > Sent: Monday, March 09, 2015 10:47 AM > To: 'Christoph Hellwig'; 'Jan Kara' > Cc: 'Tejun Heo'; 'Jens Axboe' > Subject: RE: Regression caused by using node_to_bdi() > > Hi, Ch

Regression caused by using node_to_bdi()

2015-03-05 Thread Zhao Lei
Hi, Christoph Hellwig resend: + cc lkml I found regression in v4.0-rc1 caused by this patch: Author: Christoph Hellwig Date: Wed Jan 14 10:42:36 2015 +0100 fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info Test process is following: 2015-02-25 15:50:22: Start 2015-

  1   2   >