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
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
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
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
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]
'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 ++
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
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
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
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:
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:
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
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
'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 +++
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.
>
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
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
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
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
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
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
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
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
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-
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
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
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
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
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-
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
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
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
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
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
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
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
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
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
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
(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
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
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
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-
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
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
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/
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
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
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
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:
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-
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
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
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
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 '
> -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
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...
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
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
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
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
+++
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
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
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
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
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
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
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
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
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
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
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
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
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 +
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
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
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
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
+++
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
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..
:
#
#
# 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
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
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/
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:
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
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
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
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
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
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
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
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
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 +
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';
>
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&
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
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';
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';
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
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-
100 matches
Mail list logo