gt; [ 18.470881] [] mutex_lock_nested+0x71/0x370
> [ 18.474546] [] ? alternatives_text_reserved+0x1b/0x90
> [ 18.478720] [] ? trace_hardirqs_on_caller+0x192/0x1d0
> [ 18.496043] [] ? alternatives_text_reserved+0x1b/0x90
It may seem like a bit complicated to fix this race. And how t
mutex_lock_nested+0x71/0x370
> [ 18.474546] [] ? alternatives_text_reserved+0x1b/0x90
> [ 18.478720] [] ? trace_hardirqs_on_caller+0x192/0x1d0
> [ 18.496043] [] ? alternatives_text_reserved+0x1b/0x90
It may seem like a bit complicated to fix this race. And how to fix
sta...@vger.kernel.org
Signed-off-by: Rui Xiang <rui.xi...@huawei.com>
---
arch/x86/kernel/alternative.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 5cb272a..7cec0cc 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x
sta...@vger.kernel.org
Signed-off-by: Rui Xiang
---
arch/x86/kernel/alternative.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 5cb272a..7cec0cc 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -563,6 +56
Hi,list
I encounter a panic about init process.
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0007
Pid: 1, comm: init Tainted: G RO 3.4.24.19-0.11-default #1
Call Trace:
[] panic+0xc1/0x1e2
[] do_exit+0x7db/0x8d0
[] do_group_exit+0x3a/0xa0
[]
Hi,list
I encounter a panic about init process.
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0007
Pid: 1, comm: init Tainted: G RO 3.4.24.19-0.11-default #1
Call Trace:
[] panic+0xc1/0x1e2
[] do_exit+0x7db/0x8d0
[] do_group_exit+0x3a/0xa0
[]
From: Wu Yanjiang
Hi all,
On a system that was running 3.0.13-0.27-default, a problem that the OX_ID is
reused by FCoE driver occurred.
Which can be confirmed is that the problem is occurred at initiator side, but
the reason how does it happen is unknown.
By the trace captured by JDSU
From: Wu Yanjiang wuyanji...@huawei.com
Hi all,
On a system that was running 3.0.13-0.27-default, a problem that the OX_ID is
reused by FCoE driver occurred.
Which can be confirmed is that the problem is occurred at initiator side, but
the reason how does it happen is unknown.
By the trace
Hi List,
We encounter a crash in kallsyms_lookup_name in our product, the kernel version
is Linux 3.4.
It seems a kernel bug.
In the scene, some modules were loading in CPU A. But kallsyms_lookup_name was
executed to find an symbol name for each modules in CPU B.
The reason seems like that,
Hi List,
We encounter a crash in kallsyms_lookup_name in our product, the kernel version
is Linux 3.4.
It seems a kernel bug.
In the scene, some modules were loading in CPU A. But kallsyms_lookup_name was
executed to find an symbol name for each modules in CPU B.
The reason seems like that,
On 2014/7/21 10:34, Rui Xiang wrote:
> On 2014/7/18 17:10, Lukáš Czerner wrote:
>> On Wed, 16 Jul 2014, Rui Xiang wrote:
>>
>>> Date: Wed, 16 Jul 2014 17:28:10 +0800
>>> From: Rui Xiang
>>> To: Lukáš Czerner
>>> Cc: Dave Kleika
On 2014/7/21 10:34, Rui Xiang wrote:
> On 2014/7/18 17:10, Lukáš Czerner wrote:
>> On Wed, 16 Jul 2014, Rui Xiang wrote:
>>
>>> Date: Wed, 16 Jul 2014 17:28:10 +0800
>>> From: Rui Xiang
>>> To: Lukáš Czerner
>>> Cc: Dave Kleika
On 2014/7/21 10:34, Rui Xiang wrote:
On 2014/7/18 17:10, Lukáš Czerner wrote:
On Wed, 16 Jul 2014, Rui Xiang wrote:
Date: Wed, 16 Jul 2014 17:28:10 +0800
From: Rui Xiang rui.xi...@huawei.com
To: Lukáš Czerner lczer...@redhat.com
Cc: Dave Kleikamp dave.kleik...@oracle.com, linux-e
On 2014/7/21 10:34, Rui Xiang wrote:
On 2014/7/18 17:10, Lukáš Czerner wrote:
On Wed, 16 Jul 2014, Rui Xiang wrote:
Date: Wed, 16 Jul 2014 17:28:10 +0800
From: Rui Xiang rui.xi...@huawei.com
To: Lukáš Czerner lczer...@redhat.com
Cc: Dave Kleikamp dave.kleik...@oracle.com, linux-e
On 2014/7/18 17:10, Lukáš Czerner wrote:
> On Wed, 16 Jul 2014, Rui Xiang wrote:
>
>> Date: Wed, 16 Jul 2014 17:28:10 +0800
>> From: Rui Xiang
>> To: Lukáš Czerner
>> Cc: Dave Kleikamp , linux-e...@vger.kernel.org,
>> linux-fsde...@vger.kernel.org, lin
On 2014/7/18 17:10, Lukáš Czerner wrote:
On Wed, 16 Jul 2014, Rui Xiang wrote:
Date: Wed, 16 Jul 2014 17:28:10 +0800
From: Rui Xiang rui.xi...@huawei.com
To: Lukáš Czerner lczer...@redhat.com
Cc: Dave Kleikamp dave.kleik...@oracle.com, linux-e...@vger.kernel.org,
linux-fsde
On 2014/7/16 15:58, Lukáš Czerner wrote:
> On Wed, 16 Jul 2014, Rui Xiang wrote:
>
>> Date: Wed, 16 Jul 2014 11:54:24 +0800
>> From: Rui Xiang
>> To: Lukáš Czerner
>> Cc: Dave Kleikamp , linux-e...@vger.kernel.org,
>> linux-fsde...@vger.kernel.org, lin
On 2014/7/16 15:58, Lukáš Czerner wrote:
On Wed, 16 Jul 2014, Rui Xiang wrote:
Date: Wed, 16 Jul 2014 11:54:24 +0800
From: Rui Xiang rui.xi...@huawei.com
To: Lukáš Czerner lczer...@redhat.com
Cc: Dave Kleikamp dave.kleik...@oracle.com, linux-e...@vger.kernel.org,
linux-fsde
On 2014/7/14 17:51, Lukáš Czerner wrote:
> On Mon, 14 Jul 2014, Rui Xiang wrote:
>
>> Date: Mon, 14 Jul 2014 17:34:38 +0800
>> From: Rui Xiang
>> To: Dave Kleikamp , linux-e...@vger.kernel.org
>> Cc: linux-fsde...@vger.kernel.org, linux-kernel@vger.kernel.or
On 2014/7/14 17:51, Lukáš Czerner wrote:
On Mon, 14 Jul 2014, Rui Xiang wrote:
Date: Mon, 14 Jul 2014 17:34:38 +0800
From: Rui Xiang rui.xi...@huawei.com
To: Dave Kleikamp dave.kleik...@oracle.com, linux-e...@vger.kernel.org
Cc: linux-fsde...@vger.kernel.org, linux-kernel@vger.kernel.org
Hi Dave,
We export a container image file as a block device via loop device, but we
found it's very easy that the container rootfs gets corrupted due to power
loss.
Your early version of loop-aio patchset said the patchset can make loop
mounted filesystems
Hi Dave,
We export a container image file as a block device via loop device, but we
found it's very easy that the container rootfs gets corrupted due to power
loss.
Your early version of loop-aio patchset said the patchset can make loop
mounted filesystems
On 2013/12/16 16:10, Andrew Morton wrote:
> On Tue, 26 Nov 2013 16:39:09 +0800 Rui Xiang wrote:
>
>> Here ret always equals 0, so SetPageUptodate directly.
>>
>> ...
>>
>> --- a/fs/romfs/super.c
>> +++ b/fs/romfs/super.c
>> @@ -129,8 +129,7 @@ sta
On 2013/12/16 16:10, Andrew Morton wrote:
On Tue, 26 Nov 2013 16:39:09 +0800 Rui Xiang rui.xi...@huawei.com wrote:
Here ret always equals 0, so SetPageUptodate directly.
...
--- a/fs/romfs/super.c
+++ b/fs/romfs/super.c
@@ -129,8 +129,7 @@ static int romfs_readpage(struct file *file
On 2013/12/11 7:02, Andrew Morton wrote:
> On Mon, 9 Dec 2013 20:11:54 +0800 Rui Xiang wrote:
>
>> While getting proc task error, it shoule return -ESRCH.
>>
>> ...
>>
>> --- a/fs/proc/base.c
>> +++ b/fs/proc/base.c
>> @@ -174,9 +174,10 @@ s
On 2013/12/11 7:02, Andrew Morton wrote:
On Mon, 9 Dec 2013 20:11:54 +0800 Rui Xiang rui.xi...@huawei.com wrote:
While getting proc task error, it shoule return -ESRCH.
...
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -174,9 +174,10 @@ static int get_task_root(struct task_struct *task
While getting proc task error, it shoule return -ESRCH.
Signed-off-by: Rui Xiang
---
fs/proc/base.c | 25 +++--
fs/proc/fd.c | 8 +---
fs/proc/namespaces.c | 12
fs/proc_namespace.c | 2 +-
4 files changed, 29 insertions(+), 18 deletions
Use existing accessor proc_set_user and proc_set_size
to set attributes. Just clean up.
Signed-off-by: Rui Xiang
---
fs/proc/generic.c | 3 +--
fs/proc/proc_devtree.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index
While getting proc task error, it shoule return -ESRCH.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/proc/base.c | 25 +++--
fs/proc/fd.c | 8 +---
fs/proc/namespaces.c | 12
fs/proc_namespace.c | 2 +-
4 files changed, 29 insertions
Use existing accessor proc_set_user and proc_set_size
to set attributes. Just clean up.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/proc/generic.c | 3 +--
fs/proc/proc_devtree.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/proc/generic.c b/fs/proc
On 2013/12/3 10:47, Greg Kroah-Hartman wrote:
> On Tue, Dec 03, 2013 at 09:38:47AM +0800, Rui Xiang wrote:
>> While target_sd or sd are null, it won't need sysfs_put and
>> should return -ENOENT directly. Here add null check for
>> target_sd and sd.
>>
>> Signed
While target_sd or sd are null, it won't need sysfs_put and
should return -ENOENT directly. Here add null check for
target_sd and sd.
Signed-off-by: Rui Xiang
---
fs/sysfs/symlink.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
While target_sd or sd are null, it won't need sysfs_put and
should return -ENOENT directly. Here add null check for
target_sd and sd.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/sysfs/symlink.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/sysfs/symlink.c
On 2013/12/3 10:47, Greg Kroah-Hartman wrote:
On Tue, Dec 03, 2013 at 09:38:47AM +0800, Rui Xiang wrote:
While target_sd or sd are null, it won't need sysfs_put and
should return -ENOENT directly. Here add null check for
target_sd and sd.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
Here ret always equals 0, so SetPageUptodate directly.
Signed-off-by: Rui Xiang
---
fs/romfs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/romfs/super.c b/fs/romfs/super.c
index d841878..b5e4ad4 100644
--- a/fs/romfs/super.c
+++ b/fs/romfs/super.c
@@ -129,8
Getting an inode by romfs_iget may lead to an err in fill_super,
and the err value should be return.
And it should return -ENOMEM instead while d_make_root fails,
fix it too.
Signed-off-by: Rui Xiang
---
fs/romfs/super.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
Getting an inode by romfs_iget may lead to an err in fill_super,
and the err value should be return.
And it should return -ENOMEM instead while d_make_root fails,
fix it too.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/romfs/super.c | 6 ++
1 file changed, 2 insertions(+), 4
Here ret always equals 0, so SetPageUptodate directly.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/romfs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/romfs/super.c b/fs/romfs/super.c
index d841878..b5e4ad4 100644
--- a/fs/romfs/super.c
+++ b/fs/romfs
Use the helper macro !IS_ROOT to replace parent != dentry->d_parent.
Just clean up.
Signed-off-by: Rui Xiang
---
fs/autofs4/root.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 92ef341..2caf36a 100644
--- a/fs/auto
While kzallocing sbi/ino fails, it should return -ENOMEM.
And it should return the err value from autofs_prepare_pipe.
Signed-off-by: Rui Xiang
---
fs/autofs4/inode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index
Use the helper macro !IS_ROOT to replace parent != dentry-d_parent.
Just clean up.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/autofs4/root.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 92ef341..2caf36a 100644
While kzallocing sbi/ino fails, it should return -ENOMEM.
And it should return the err value from autofs_prepare_pipe.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/autofs4/inode.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/fs/autofs4/inode.c b/fs
Clean up.
Signed-off-by: Rui Xiang
---
fs/proc/generic.c | 3 +--
fs/proc/proc_devtree.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 737e156..2097e9e 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -49,8
While getting proc task fails, it shoule return -ESRCH.
Signed-off-by: Rui Xiang
---
fs/proc/base.c | 25 +++--
fs/proc/fd.c | 8 +---
fs/proc/namespaces.c | 12
fs/proc_namespace.c | 2 +-
4 files changed, 29 insertions(+), 18 deletions
While getting proc task fails, it shoule return -ESRCH.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/proc/base.c | 25 +++--
fs/proc/fd.c | 8 +---
fs/proc/namespaces.c | 12
fs/proc_namespace.c | 2 +-
4 files changed, 29 insertions
Clean up.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/proc/generic.c | 3 +--
fs/proc/proc_devtree.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 737e156..2097e9e 100644
--- a/fs/proc/generic.c
+++ b/fs/proc
On 2013/8/23 12:10, Greg KH wrote:
> On Fri, Aug 23, 2013 at 10:48:36AM +0800, Rui Xiang wrote:
>> This patchset implements an accessor functions to set uid/gid
>> in inode struct. Just finish code clean up.
>
> Why?
>
It can introduce a new function to reduce som
On 2013/8/23 12:10, Greg KH wrote:
On Fri, Aug 23, 2013 at 10:48:36AM +0800, Rui Xiang wrote:
This patchset implements an accessor functions to set uid/gid
in inode struct. Just finish code clean up.
Why?
It can introduce a new function to reduce some codes.
Just clean up.
Thanks
Use the new interface to set i_uid/i_gid in inode struct.
Signed-off-by: Rui Xiang
---
arch/ia64/kernel/perfmon.c| 3 +--
arch/powerpc/platforms/cell/spufs/inode.c | 3 +--
arch/s390/hypfs/inode.c | 3 +--
drivers/infiniband/hw/qib/qib_fs.c| 3
Supply a interface inode_set_user to set uid/gid of inode
structs.
Signed-off-by: Rui Xiang
---
fs/inode.c | 7 +++
include/linux/fs.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/fs/inode.c b/fs/inode.c
index e315c0a..3f90499 100644
--- a/fs/inode.c
+++ b/fs/inode.c
This patchset implements an accessor functions to set uid/gid
in inode struct. Just finish code clean up.
Rui Xiang (2):
fs: implement inode uid/gid setting function
fs: use inode_set_user to set uid/gid of inode
arch/ia64/kernel/perfmon.c| 3 +--
arch/powerpc/platforms
This patchset implements an accessor functions to set uid/gid
in inode struct. Just finish code clean up.
Rui Xiang (2):
fs: implement inode uid/gid setting function
fs: use inode_set_user to set uid/gid of inode
arch/ia64/kernel/perfmon.c| 3 +--
arch/powerpc/platforms
Supply a interface inode_set_user to set uid/gid of inode
structs.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/inode.c | 7 +++
include/linux/fs.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/fs/inode.c b/fs/inode.c
index e315c0a..3f90499 100644
--- a/fs/inode.c
Use the new interface to set i_uid/i_gid in inode struct.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
arch/ia64/kernel/perfmon.c| 3 +--
arch/powerpc/platforms/cell/spufs/inode.c | 3 +--
arch/s390/hypfs/inode.c | 3 +--
drivers/infiniband/hw/qib
On 2013/8/15 2:43, Oleg Nesterov wrote:
> On 08/14, Rui Xiang wrote:
>>
>> On 2013/8/14 13:06, Andy Lutomirski wrote:
>>> On Tue, Aug 13, 2013 at 10:04 PM, Rui Xiang wrote:
>>>> The level of init_user_ns shoule be 1.
>>>
>>> What's wrong
On 2013/8/14 13:06, Andy Lutomirski wrote:
> On Tue, Aug 13, 2013 at 10:04 PM, Rui Xiang wrote:
>> The level of init_user_ns shoule be 1.
>
> What's wrong with zero?
>
No problem. It is just consistent with commit 8742f229b63, IMHO.
but the initialization of level should be n
On 2013/8/14 13:06, Andy Lutomirski wrote:
On Tue, Aug 13, 2013 at 10:04 PM, Rui Xiang rui.xi...@huawei.com wrote:
The level of init_user_ns shoule be 1.
What's wrong with zero?
No problem. It is just consistent with commit 8742f229b63, IMHO.
but the initialization of level should
On 2013/8/15 2:43, Oleg Nesterov wrote:
On 08/14, Rui Xiang wrote:
On 2013/8/14 13:06, Andy Lutomirski wrote:
On Tue, Aug 13, 2013 at 10:04 PM, Rui Xiang rui.xi...@huawei.com wrote:
The level of init_user_ns shoule be 1.
What's wrong with zero?
No problem. It is just consistent
The level of init_user_ns shoule be 1.
Signed-off-by: Rui Xiang
---
kernel/user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/user.c b/kernel/user.c
index 69b4c3d..32da187 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -48,6 +48,7 @@ struct user_namespace init_user_ns
The level of init_user_ns shoule be 1.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
kernel/user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/user.c b/kernel/user.c
index 69b4c3d..32da187 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -48,6 +48,7 @@ struct user_namespace
r space tools in container may use this interface
> to read/generate syslog.
>
> But I don't know how important/urgent this containerizing syslog work is,
> Rui Xiang, can you find an important/popular user space tool which uses this
> interfaces to generate kernel syslog?
>
Th
this containerizing syslog work is,
Rui Xiang, can you find an important/popular user space tool which uses this
interfaces to generate kernel syslog?
There are some other cases. Some warnings (bad mount options for tmpfs,
bad uid owner for many of them, etc) emerged in the container should
Add a syslog_ns pointer to user_namespace, and make
syslog_ns per user_namespace, not global.
Since syslog_ns is assigned to user_ns, we can have
full capabilities in new user_ns to create a new syslog_ns.
Signed-off-by: Rui Xiang
---
include/linux/syslog.h | 5 +
include/linux
) of __NR_syslog system call. Through
that command, we can create a new syslog ns in user
space.
Signed-off-by: Rui Xiang
---
include/linux/syslog.h | 4
kernel/printk.c| 52 ++
2 files changed, 56 insertions(+)
diff --git a/include/linux
Add a struct syslog_namespace which contains the necessary
members for hanlding syslog and realize get_syslog_ns and
put_syslog_ns API.
Signed-off-by: Rui Xiang
---
include/linux/syslog.h | 68 ++
kernel/printk.c| 7 --
2 files
Add init_syslog_ns to manage host log buffer, and
initilize its fileds as the global variables.
Printk by default in kernel will continue to be
targeted at init_syslog_ns. So the buf of init
ns is just the same as the original global buf.
Signed-off-by: Rui Xiang
---
include/linux/syslog.h
-off-by: Rui Xiang
---
include/linux/printk.h | 6 ++
kernel/printk.c| 20 +++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index bf83ad9..4c7e2be 100644
--- a/include/linux/printk.h
+++ b/include/linux
from
current syslog namespace on cosoles, not just init_
syslog_ns.
Signed-off-by: Rui Xiang
---
include/linux/console.h | 1 +
kernel/printk.c | 116 +++-
2 files changed, 116 insertions(+), 1 deletion(-)
diff --git a/include/linux/console.h
To containerise iptables log, use ns_printk
to report individual logs to container as
getting syslog_ns from net->user_ns.
Signed-off-by: Rui Xiang
---
include/net/netfilter/xt_log.h | 6 +-
net/netfilter/xt_LOG.c | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
d
zed for
container users.
Signed-off-by: Rui Xiang
---
fs/proc/kmsg.c | 17 +-
include/linux/printk.h | 1 -
include/linux/syslog.h | 3 +-
kernel/printk.c| 513 +
kernel/sysctl.c| 3 +-
5 files changed, 273 insertions(+),
Use ns_capable to check capability in user ns,
instead of capable function. The user ns is the
owner of current syslog ns.
Signed-off-by: Rui Xiang
---
kernel/printk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
index e508ab2
ce.
-- Put user ns while freeing syslog_ns.
-- Use net instead of skb->dev->nd_net in sb_close.
-- Clean up.
Rui Xiang (11):
syslog_ns: add syslog_namespace and put/get_syslog_ns
syslog_ns: add syslog_ns into user_namespace
syslog_ns: add init syslog_ns for global syslog
sys
While flags SYSLOG_ACTION_CONSOLE_ON/OFF/LEVEL of
console actin are used in syslog syscall, the related
hanlding should be targeted at host by init_syslog_ns.
Signed-off-by: Rui Xiang
---
kernel/printk.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/kernel/printk.c b/kernel/printk.c
Add a new interface named ns_printk, and assign an
patamater ns. Log which belong to a container can
be printed by ns_printk.
Signed-off-by: Rui Xiang
---
include/linux/printk.h | 4
kernel/printk.c| 53 ++
2 files changed, 53
Add a new interface named ns_printk, and assign an
patamater ns. Log which belong to a container can
be printed by ns_printk.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
include/linux/printk.h | 4
kernel/printk.c| 53 ++
2
Use ns_capable to check capability in user ns,
instead of capable function. The user ns is the
owner of current syslog ns.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
kernel/printk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/printk.c b/kernel/printk.c
freeing syslog_ns.
-- Use net instead of skb-dev-nd_net in sb_close.
-- Clean up.
Rui Xiang (11):
syslog_ns: add syslog_namespace and put/get_syslog_ns
syslog_ns: add syslog_ns into user_namespace
syslog_ns: add init syslog_ns for global syslog
syslog_ns: make syslog handling per namespace
While flags SYSLOG_ACTION_CONSOLE_ON/OFF/LEVEL of
console actin are used in syslog syscall, the related
hanlding should be targeted at host by init_syslog_ns.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
kernel/printk.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/kernel
To containerise iptables log, use ns_printk
to report individual logs to container as
getting syslog_ns from net-user_ns.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
include/net/netfilter/xt_log.h | 6 +-
net/netfilter/xt_LOG.c | 4 ++--
2 files changed, 7 insertions(+), 3
users.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
fs/proc/kmsg.c | 17 +-
include/linux/printk.h | 1 -
include/linux/syslog.h | 3 +-
kernel/printk.c| 513 +
kernel/sysctl.c| 3 +-
5 files changed, 273
from
current syslog namespace on cosoles, not just init_
syslog_ns.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
include/linux/console.h | 1 +
kernel/printk.c | 116 +++-
2 files changed, 116 insertions(+), 1 deletion(-)
diff --git
Add init_syslog_ns to manage host log buffer, and
initilize its fileds as the global variables.
Printk by default in kernel will continue to be
targeted at init_syslog_ns. So the buf of init
ns is just the same as the original global buf.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
-off-by: Rui Xiang rui.xi...@huawei.com
---
include/linux/printk.h | 6 ++
kernel/printk.c| 20 +++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index bf83ad9..4c7e2be 100644
--- a/include/linux/printk.h
) of __NR_syslog system call. Through
that command, we can create a new syslog ns in user
space.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
include/linux/syslog.h | 4
kernel/printk.c| 52 ++
2 files changed, 56 insertions(+)
diff
Add a struct syslog_namespace which contains the necessary
members for hanlding syslog and realize get_syslog_ns and
put_syslog_ns API.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
include/linux/syslog.h | 68 ++
kernel/printk.c| 7
Add a syslog_ns pointer to user_namespace, and make
syslog_ns per user_namespace, not global.
Since syslog_ns is assigned to user_ns, we can have
full capabilities in new user_ns to create a new syslog_ns.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
include/linux/syslog.h | 5
On 2013/8/1 13:38, Gao feng wrote:
> On 08/01/2013 11:10 AM, Rui Xiang wrote:
>> On 2013/8/1 9:36, Gao feng wrote:
>>> On 07/29/2013 10:31 AM, Rui Xiang wrote:
>>>> This patch makes syslog buf and other fields per
>>>> namespace.
>>>&
On 2013/8/1 13:38, Gao feng wrote:
On 08/01/2013 11:10 AM, Rui Xiang wrote:
On 2013/8/1 9:36, Gao feng wrote:
On 07/29/2013 10:31 AM, Rui Xiang wrote:
This patch makes syslog buf and other fields per
namespace.
Here use ns-log_buf(log_buf_len, logbuf_lock,
log_first_seq, logbuf_lock
On 2013/8/1 9:36, Gao feng wrote:
> On 07/29/2013 10:31 AM, Rui Xiang wrote:
>> This patch makes syslog buf and other fields per
>> namespace.
>>
>> Here use ns->log_buf(log_buf_len, logbuf_lock,
>> log_first_seq, logbuf_lock, and so on) fields
>&g
On 2013/8/1 9:36, Gao feng wrote:
On 07/29/2013 10:31 AM, Rui Xiang wrote:
This patch makes syslog buf and other fields per
namespace.
Here use ns-log_buf(log_buf_len, logbuf_lock,
log_first_seq, logbuf_lock, and so on) fields
instead of global ones to handle syslog.
Syslog interfaces
On 2013/7/29 18:25, Gu Zheng wrote:
> Hi Rui,
>
> On 07/29/2013 10:31 AM, Rui Xiang wrote:
>
>> Add create_syslog_ns function to create a new ns. We
>> must create a user_ns before create a new syslog ns.
>> And then tie the new syslog_ns to current user_ns
>>
Hi Eric,
Thanks for your attention.
On 2013/7/30 2:58, Eric W. Biederman wrote:
> Rui Xiang writes:
>
>> This patchset introduces a system log namespace.
>
> The largest outstanding question is not answered. Can't we just fix
> iptables to log somehwere better
On 2013/7/29 17:48, Gao feng wrote:
> On 07/29/2013 10:31 AM, Rui Xiang wrote:
>> To containerise iptables log, use ns_printk
>> to report individual logs to container as
>> getting syslog_ns from skb->dev->nd_net->user_ns.
>>
>> Signed-off-by: Rui Xiang
On 2013/7/29 18:37, Gu Zheng wrote:
> Hi Rui,
>
> On 07/29/2013 10:31 AM, Rui Xiang wrote:
>
>> Add a new interface named ns_printk, and assign an
>> patamater ns. Log which belong to a container can
>> be printed by ns_printk.
>
> One question, with the
On 2013/7/29 17:40, Gu Zheng wrote:
> Hi Rui,
> Refer to inline:).
>
Hi Gu,
Thanks for your attention.
> On 07/29/2013 10:31 AM, Rui Xiang wrote:
>
>> Add a struct syslog_namespace which contains the necessary
>> members for hanlding syslog and realize get_sys
On 2013/7/29 17:40, Gu Zheng wrote:
Hi Rui,
Refer to inline:).
Hi Gu,
Thanks for your attention.
On 07/29/2013 10:31 AM, Rui Xiang wrote:
Add a struct syslog_namespace which contains the necessary
members for hanlding syslog and realize get_syslog_ns and
put_syslog_ns API
On 2013/7/29 18:37, Gu Zheng wrote:
Hi Rui,
On 07/29/2013 10:31 AM, Rui Xiang wrote:
Add a new interface named ns_printk, and assign an
patamater ns. Log which belong to a container can
be printed by ns_printk.
One question, with the syslog_ns used, do the log we print by *printk
On 2013/7/29 17:48, Gao feng wrote:
On 07/29/2013 10:31 AM, Rui Xiang wrote:
To containerise iptables log, use ns_printk
to report individual logs to container as
getting syslog_ns from skb-dev-nd_net-user_ns.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
---
include/net/netfilter
Hi Eric,
Thanks for your attention.
On 2013/7/30 2:58, Eric W. Biederman wrote:
Rui Xiang rui.xi...@huawei.com writes:
This patchset introduces a system log namespace.
The largest outstanding question is not answered. Can't we just fix
iptables to log somehwere better than dmesg
On 2013/7/29 18:25, Gu Zheng wrote:
Hi Rui,
On 07/29/2013 10:31 AM, Rui Xiang wrote:
Add create_syslog_ns function to create a new ns. We
must create a user_ns before create a new syslog ns.
And then tie the new syslog_ns to current user_ns
instead of original syslog_ns which comes from
1 - 100 of 120 matches
Mail list logo