Re: [PATCH] tun: don't zeroize sock->file on detach

2012-08-22 Thread Stanislav Kinsbursky
21.08.2012 21:18, Neal Cardwell пишет: On Tue, Aug 21, 2012 at 12:04 PM, Stanislav Kinsbursky wrote: 10.08.2012 03:16, David Miller пишет: From: Stanislav Kinsbursky Date: Thu, 09 Aug 2012 16:50:40 +0400 This is a fix for bug, introduced in 3.4 kernel by commit

Re: [PATCH] tun: don't zeroize sock-file on detach

2012-08-22 Thread Stanislav Kinsbursky
21.08.2012 21:18, Neal Cardwell пишет: On Tue, Aug 21, 2012 at 12:04 PM, Stanislav Kinsbursky skinsbur...@parallels.com wrote: 10.08.2012 03:16, David Miller пишет: From: Stanislav Kinsbursky skinsbur...@parallels.com Date: Thu, 09 Aug 2012 16:50:40 +0400 This is a fix for bug, introduced

Re: [PATCH] tun: don't zeroize sock->file on detach

2012-08-21 Thread Stanislav Kinsbursky
10.08.2012 03:16, David Miller пишет: From: Stanislav Kinsbursky Date: Thu, 09 Aug 2012 16:50:40 +0400 This is a fix for bug, introduced in 3.4 kernel by commit 1ab5ecb90cb6a3df1476e052f76a6e8f6511cb3d, which, among other things, replaced simple sock_put() by sk_release_kernel(). Below

Re: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown

2012-08-21 Thread Stanislav Kinsbursky
20.08.2012 20:58, J. Bruce Fields пишет: On Mon, Aug 20, 2012 at 07:11:00PM +0400, Stanislav Kinsbursky wrote: 20.08.2012 18:56, J. Bruce Fields пишет: On Mon, Aug 20, 2012 at 03:05:49PM +0400, Stanislav Kinsbursky wrote: 16.08.2012 23:29, J. Bruce Fields пишет: Looking back

Re: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown

2012-08-21 Thread Stanislav Kinsbursky
20.08.2012 20:58, J. Bruce Fields пишет: On Mon, Aug 20, 2012 at 07:11:00PM +0400, Stanislav Kinsbursky wrote: 20.08.2012 18:56, J. Bruce Fields пишет: On Mon, Aug 20, 2012 at 03:05:49PM +0400, Stanislav Kinsbursky wrote: 16.08.2012 23:29, J. Bruce Fields пишет: Looking back

Re: [PATCH] tun: don't zeroize sock-file on detach

2012-08-21 Thread Stanislav Kinsbursky
10.08.2012 03:16, David Miller пишет: From: Stanislav Kinsbursky skinsbur...@parallels.com Date: Thu, 09 Aug 2012 16:50:40 +0400 This is a fix for bug, introduced in 3.4 kernel by commit 1ab5ecb90cb6a3df1476e052f76a6e8f6511cb3d, which, among other things, replaced simple sock_put

[PATCH] NFS: free client is case of idr allocation failure

2012-08-20 Thread Stanislav Kinsbursky
Simple kfree() is not enough, because we need to clean up the allocation of cl_hostname, put the module and the network namespace, etc Signed-off-by: Stanislav Kinsbursky --- fs/nfs/nfs4client.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs

Re: [PATCH] NFS: put net in case of idr allocation failure

2012-08-20 Thread Stanislav Kinsbursky
20.08.2012 20:11, Myklebust, Trond пишет: On Mon, 2012-08-20 at 17:43 +0400, Stanislav Kinsbursky wrote: Put net reference we got in nfs_alloc_client() on error path. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/nfs4client.c |1 + 1 files changed, 1 insertions(+), 0 deletions

Re: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown

2012-08-20 Thread Stanislav Kinsbursky
20.08.2012 18:56, J. Bruce Fields пишет: On Mon, Aug 20, 2012 at 03:05:49PM +0400, Stanislav Kinsbursky wrote: 16.08.2012 23:29, J. Bruce Fields пишет: Looking back at this: - adding the sv_lock looks like the right thing to do anyway independent of containers, because

[PATCH v4 04/10] NFS: callback up - transport backchannel cleanup

2012-08-20 Thread Stanislav Kinsbursky
() instead of callback, since callback link can be uninitialized. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c | 34 +- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index a53b4e5..a528cb7 100644

[PATCH v4 05/10] NFS: callback service start function introduced

2012-08-20 Thread Stanislav Kinsbursky
changes. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c | 77 +++-- 1 files changed, 45 insertions(+), 32 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index a528cb7..5d5f9d1 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback

[PATCH v4 10/10] NFS: add debug messages to callback down function

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 6dfdc83..8ed0bc8 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -410,7 +410,9 @@ void nfs_callback_down(int

[PATCH v4 09/10] NFS: callback per-net usage counting introduced

2012-08-20 Thread Stanislav Kinsbursky
This patch also introduces refcount-aware nfs_callback_down_net() wrapper for svc_shutdown_net(). Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c | 19 +-- fs/nfs/netns.h|1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/fs/nfs/callback.c b

[PATCH v4 08/10] NFS: make nfs_callback_tcpport6 per network context

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c |6 ++ fs/nfs/callback.h |1 - fs/nfs/netns.h |1 + fs/nfs/nfs4state.c |2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 94aa9d8..baafa0f 100644

[PATCH v4 07/10] NFS: make nfs_callback_tcpport per network context

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c |6 -- fs/nfs/callback.h |1 - fs/nfs/netns.h |1 + fs/nfs/nfs4state.c |4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 64e87ec..94aa9d8 100644

[PATCH v4 06/10] NFS: callback up - users counting cleanup

2012-08-20 Thread Stanislav Kinsbursky
Usage coutner now increased only is the service was started sccessfully. Even if service is running already, then goto is not required anymore, because service creation and start will be skipped. With this patch code looks clearer. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c

[PATCH v4 01/10] NFS: pass net to nfs_callback_down()

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c |4 ++-- fs/nfs/callback.h |2 +- fs/nfs/nfs4client.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 4c8459e..51297b2 100644 --- a/fs/nfs/callback.c +++ b

[PATCH v4 03/10] NFS: move per-net callback thread initialization to nfs_callback_up_net()

2012-08-20 Thread Stanislav Kinsbursky
to callback usage counter decrement (because in case of per-net data allocation faulure svc_shutdown_net() have to be skipped). Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c | 133 +-- fs/nfs/nfs4client.c |2 - 2 files changed

[PATCH v4 02/10] NFS: callback service creation function introduced

2012-08-20 Thread Stanislav Kinsbursky
This function creates service if it's not exist, or increase usage counter of the existent, and returns pointer to it. Usage counter will be droppepd by svc_destroy() later in nfs_callback_up(). Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c | 63

[PATCH v4 00/10] NFS: callback threads containerization

2012-08-20 Thread Stanislav Kinsbursky
it for next kernel. The following series implements... --- Stanislav Kinsbursky (10): NFS: pass net to nfs_callback_down() NFS: callback service creation function introduced NFS: move per-net callback thread initialization to nfs_callback_up_net() NFS: callback up

[PATCH] NFS: put net in case of idr allocation failure

2012-08-20 Thread Stanislav Kinsbursky
Put net reference we got in nfs_alloc_client() on error path. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/nfs4client.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index cbcdfaf..b895629 100644 --- a/fs/nfs/nfs4client.c

Re: [PATCH v3 00/11] Series short description

2012-08-20 Thread Stanislav Kinsbursky
25.07.2012 02:36, J. Bruce Fields пишет: On Tue, Jul 03, 2012 at 08:19:23PM +0400, Stanislav Kinsbursky wrote: v3: Rebased on Bruce's tree, "for-3.6" branch v2: Rebased on Bruce's tree, "for-3.5" branch Aside from the one question, this looks OK to me. I seem to reca

Re: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown

2012-08-20 Thread Stanislav Kinsbursky
16.08.2012 23:29, J. Bruce Fields пишет: On Tue, Jul 24, 2012 at 03:40:37PM -0400, J. Bruce Fields wrote: On Tue, Jul 03, 2012 at 04:58:57PM +0400, Stanislav Kinsbursky wrote: v3: 1) rebased on 3.5-rc3 kernel. v2: destruction of currently processing transport added: 1) Added marking

Re: [RFC PATCH 0/5] net: socket bind to file descriptor introduced

2012-08-20 Thread Stanislav Kinsbursky
16.08.2012 07:03, Eric W. Biederman пишет: Stanislav Kinsbursky writes: This patch set introduces new socket operation and new system call: sys_fbind(), which allows to bind socket to opened file. File to bind to can be created by sys_mknod(S_IFSOCK) and opened by open(O_PATH). This system

Re: [RFC PATCH 0/5] net: socket bind to file descriptor introduced

2012-08-20 Thread Stanislav Kinsbursky
16.08.2012 07:03, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: This patch set introduces new socket operation and new system call: sys_fbind(), which allows to bind socket to opened file. File to bind to can be created by sys_mknod(S_IFSOCK) and opened

Re: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown

2012-08-20 Thread Stanislav Kinsbursky
16.08.2012 23:29, J. Bruce Fields пишет: On Tue, Jul 24, 2012 at 03:40:37PM -0400, J. Bruce Fields wrote: On Tue, Jul 03, 2012 at 04:58:57PM +0400, Stanislav Kinsbursky wrote: v3: 1) rebased on 3.5-rc3 kernel. v2: destruction of currently processing transport added: 1) Added marking

Re: [PATCH v3 00/11] Series short description

2012-08-20 Thread Stanislav Kinsbursky
25.07.2012 02:36, J. Bruce Fields пишет: On Tue, Jul 03, 2012 at 08:19:23PM +0400, Stanislav Kinsbursky wrote: v3: Rebased on Bruce's tree, for-3.6 branch v2: Rebased on Bruce's tree, for-3.5 branch Aside from the one question, this looks OK to me. I seem to recall this needed to go through

[PATCH] NFS: put net in case of idr allocation failure

2012-08-20 Thread Stanislav Kinsbursky
Put net reference we got in nfs_alloc_client() on error path. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/nfs4client.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index cbcdfaf..b895629 100644

[PATCH v4 00/10] NFS: callback threads containerization

2012-08-20 Thread Stanislav Kinsbursky
it for next kernel. The following series implements... --- Stanislav Kinsbursky (10): NFS: pass net to nfs_callback_down() NFS: callback service creation function introduced NFS: move per-net callback thread initialization to nfs_callback_up_net() NFS: callback up

[PATCH v4 02/10] NFS: callback service creation function introduced

2012-08-20 Thread Stanislav Kinsbursky
This function creates service if it's not exist, or increase usage counter of the existent, and returns pointer to it. Usage counter will be droppepd by svc_destroy() later in nfs_callback_up(). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c | 63

[PATCH v4 03/10] NFS: move per-net callback thread initialization to nfs_callback_up_net()

2012-08-20 Thread Stanislav Kinsbursky
to callback usage counter decrement (because in case of per-net data allocation faulure svc_shutdown_net() have to be skipped). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c | 133 +-- fs/nfs/nfs4client.c

[PATCH v4 06/10] NFS: callback up - users counting cleanup

2012-08-20 Thread Stanislav Kinsbursky
Usage coutner now increased only is the service was started sccessfully. Even if service is running already, then goto is not required anymore, because service creation and start will be skipped. With this patch code looks clearer. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com

[PATCH v4 01/10] NFS: pass net to nfs_callback_down()

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c |4 ++-- fs/nfs/callback.h |2 +- fs/nfs/nfs4client.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 4c8459e..51297b2 100644

[PATCH v4 07/10] NFS: make nfs_callback_tcpport per network context

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c |6 -- fs/nfs/callback.h |1 - fs/nfs/netns.h |1 + fs/nfs/nfs4state.c |4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index

[PATCH v4 08/10] NFS: make nfs_callback_tcpport6 per network context

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c |6 ++ fs/nfs/callback.h |1 - fs/nfs/netns.h |1 + fs/nfs/nfs4state.c |2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index

[PATCH v4 09/10] NFS: callback per-net usage counting introduced

2012-08-20 Thread Stanislav Kinsbursky
This patch also introduces refcount-aware nfs_callback_down_net() wrapper for svc_shutdown_net(). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c | 19 +-- fs/nfs/netns.h|1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff

[PATCH v4 10/10] NFS: add debug messages to callback down function

2012-08-20 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 6dfdc83..8ed0bc8 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -410,7 +410,9

[PATCH v4 05/10] NFS: callback service start function introduced

2012-08-20 Thread Stanislav Kinsbursky
This is just a code move, which from my POW makes code looks better. I.e. now on start we have 3 different stages: 1) Service creation. 2) Service per-net data allocation. 3) Service start. Patch also renames goto label out_err: into err_start: to reflect new changes. Signed-off-by: Stanislav

[PATCH v4 04/10] NFS: callback up - transport backchannel cleanup

2012-08-20 Thread Stanislav Kinsbursky
() instead of callback, since callback link can be uninitialized. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/callback.c | 34 +- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index

Re: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown

2012-08-20 Thread Stanislav Kinsbursky
20.08.2012 18:56, J. Bruce Fields пишет: On Mon, Aug 20, 2012 at 03:05:49PM +0400, Stanislav Kinsbursky wrote: 16.08.2012 23:29, J. Bruce Fields пишет: Looking back at this: - adding the sv_lock looks like the right thing to do anyway independent of containers, because

Re: [PATCH] NFS: put net in case of idr allocation failure

2012-08-20 Thread Stanislav Kinsbursky
20.08.2012 20:11, Myklebust, Trond пишет: On Mon, 2012-08-20 at 17:43 +0400, Stanislav Kinsbursky wrote: Put net reference we got in nfs_alloc_client() on error path. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/nfs4client.c |1 + 1 files changed, 1

[PATCH] NFS: free client is case of idr allocation failure

2012-08-20 Thread Stanislav Kinsbursky
Simple kfree() is not enough, because we need to clean up the allocation of cl_hostname, put the module and the network namespace, etc Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfs/nfs4client.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [RFC PATCH 5/5] syscall: sys_fbind() introduced

2012-08-15 Thread Stanislav Kinsbursky
15.08.2012 20:30, H. Peter Anvin пишет: On 08/15/2012 09:22 AM, Stanislav Kinsbursky wrote: This syscall allows to bind socket to specified file descriptor. Descriptor can be gained by simple open with O_PATH flag. Socket node can be created by sys_mknod(). Signed-off-by: Stanislav Kinsbursky

[RFC PATCH 0/5] net: socket bind to file descriptor introduced

2012-08-15 Thread Stanislav Kinsbursky
. The following series implements... --- Stanislav Kinsbursky (5): net: cleanup unix_bind() a little net: split unix_bind() net: new protocol operation fbind() introduced net: fbind() for unix sockets protocol operations introduced syscall: sys_fbind() introduced

[RFC PATCH 3/5] net: new protocol operation fbind() introduced

2012-08-15 Thread Stanislav Kinsbursky
This operation is used to bind socket to specified file. Signed-off-by: Stanislav Kinsbursky --- include/linux/net.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index e9ac2df..843cb75 100644 --- a/include/linux/net.h +++ b

[RFC PATCH 2/5] net: split unix_bind()

2012-08-15 Thread Stanislav Kinsbursky
This patch moves UNIX socket insert into separated function, because this code will be used for unix_fbind() too. Signed-off-by: Stanislav Kinsbursky --- net/unix/af_unix.c | 52 +--- 1 files changed, 29 insertions(+), 23 deletions(-) diff

[RFC PATCH 5/5] syscall: sys_fbind() introduced

2012-08-15 Thread Stanislav Kinsbursky
This syscall allows to bind socket to specified file descriptor. Descriptor can be gained by simple open with O_PATH flag. Socket node can be created by sys_mknod(). Signed-off-by: Stanislav Kinsbursky --- arch/x86/syscalls/syscall_32.tbl |1 + arch/x86/syscalls/syscall_64.tbl |1

[RFC PATCH 4/5] net: fbind() for unix sockets protocol operations introduced

2012-08-15 Thread Stanislav Kinsbursky
Path for unix_address is taken from passed file. File inode have to be socket. Since no sunaddr is present, addr->name is constructed at the place. It obviously means, then path name can be truncated is it's longer then UNIX_MAX_PATH. Signed-off-by: Stanislav Kinsbursky --- net/unix/af_uni

[RFC PATCH 1/5] net: cleanup unix_bind() a little

2012-08-15 Thread Stanislav Kinsbursky
This will simplify further changes for unix_fbind(). --- net/unix/af_unix.c | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 641f2e4..bc90ddb 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -880,10 +880,8

[RFC PATCH 1/5] net: cleanup unix_bind() a little

2012-08-15 Thread Stanislav Kinsbursky
This will simplify further changes for unix_fbind(). --- net/unix/af_unix.c | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 641f2e4..bc90ddb 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -880,10 +880,8

[RFC PATCH 4/5] net: fbind() for unix sockets protocol operations introduced

2012-08-15 Thread Stanislav Kinsbursky
Path for unix_address is taken from passed file. File inode have to be socket. Since no sunaddr is present, addr-name is constructed at the place. It obviously means, then path name can be truncated is it's longer then UNIX_MAX_PATH. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com

[RFC PATCH 5/5] syscall: sys_fbind() introduced

2012-08-15 Thread Stanislav Kinsbursky
This syscall allows to bind socket to specified file descriptor. Descriptor can be gained by simple open with O_PATH flag. Socket node can be created by sys_mknod(). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- arch/x86/syscalls/syscall_32.tbl |1 + arch/x86/syscalls

[RFC PATCH 2/5] net: split unix_bind()

2012-08-15 Thread Stanislav Kinsbursky
This patch moves UNIX socket insert into separated function, because this code will be used for unix_fbind() too. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- net/unix/af_unix.c | 52 +--- 1 files changed, 29 insertions

[RFC PATCH 3/5] net: new protocol operation fbind() introduced

2012-08-15 Thread Stanislav Kinsbursky
This operation is used to bind socket to specified file. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux/net.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/net.h b/include/linux/net.h index e9ac2df..843cb75 100644

[RFC PATCH 0/5] net: socket bind to file descriptor introduced

2012-08-15 Thread Stanislav Kinsbursky
. The following series implements... --- Stanislav Kinsbursky (5): net: cleanup unix_bind() a little net: split unix_bind() net: new protocol operation fbind() introduced net: fbind() for unix sockets protocol operations introduced syscall: sys_fbind() introduced

Re: [RFC PATCH 5/5] syscall: sys_fbind() introduced

2012-08-15 Thread Stanislav Kinsbursky
15.08.2012 20:30, H. Peter Anvin пишет: On 08/15/2012 09:22 AM, Stanislav Kinsbursky wrote: This syscall allows to bind socket to specified file descriptor. Descriptor can be gained by simple open with O_PATH flag. Socket node can be created by sys_mknod(). Signed-off-by: Stanislav Kinsbursky

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-14 Thread Stanislav Kinsbursky
13.08.2012 22:24, J. Bruce Fields пишет: On Mon, Aug 13, 2012 at 09:39:53PM +0400, Stanislav Kinsbursky wrote: 13.08.2012 20:47, J. Bruce Fields пишет: On Sat, Aug 11, 2012 at 03:15:24PM +0400, Stanislav Kinsbursky wrote: 11.08.2012 10:23, Pavel Emelyanov пишет: On 08/11/2012 03:09 AM, H

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-14 Thread Stanislav Kinsbursky
13.08.2012 22:24, J. Bruce Fields пишет: On Mon, Aug 13, 2012 at 09:39:53PM +0400, Stanislav Kinsbursky wrote: 13.08.2012 20:47, J. Bruce Fields пишет: On Sat, Aug 11, 2012 at 03:15:24PM +0400, Stanislav Kinsbursky wrote: 11.08.2012 10:23, Pavel Emelyanov пишет: On 08/11/2012 03:09 AM, H

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-13 Thread Stanislav Kinsbursky
13.08.2012 20:47, J. Bruce Fields пишет: On Sat, Aug 11, 2012 at 03:15:24PM +0400, Stanislav Kinsbursky wrote: 11.08.2012 10:23, Pavel Emelyanov пишет: On 08/11/2012 03:09 AM, H. Peter Anvin wrote: On 08/10/2012 12:28 PM, Alan Cox wrote: Explicitly for Linux yes - this is not generally true

[PATCH v4 1/9] ipc: remove forced assignment of selected message

2012-08-13 Thread Stanislav Kinsbursky
This is a cleanup patch. The assignment is redundant. --- ipc/msg.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index 7385de2..f3bfbb8 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -787,7 +787,6 @@ long do_msgrcv(int msqid, long *pmtype, void __user

[PATCH v4 0/9] IPC: checkpoint/restore in userspace enhancements

2012-08-13 Thread Stanislav Kinsbursky
following series implements... --- Stanislav Kinsbursky (9): ipc: remove forced assignment of selected message ipc: "use key as id" functionality for resource get system call introduced ipc: segment key change helper introduced ipc: add new SHM_SET command f

[PATCH v4 9/9] test: IPC message queue migration test

2012-08-13 Thread Stanislav Kinsbursky
+#include + +#include "zdtmtst.h" + +const char *test_doc="Tests sysv5 msg queues support by user space checkpointing"; +const char *test_author="Stanislav Kinsbursky "; + +struct msg1 { + long mtype; + char mtext[20]; +}; +#define TEST_STRING "

[PATCH v4 8/9] IPC: message queue copy feature introduced

2012-08-13 Thread Stanislav Kinsbursky
the queue). Notes: 1) Return -ENOSYS if MSG_COPY is specified, but CONFIG_CHECKPOINT_RESTORE is not set. Signed-off-by: Stanislav Kinsbursky --- include/linux/msg.h |1 + ipc/msg.c | 51 +-- ipc/msgutil.c | 38

[PATCH v4 4/9] ipc: add new SHM_SET command for sys_shmctl() call

2012-08-13 Thread Stanislav Kinsbursky
New SHM_SET command will be interpreted exactly as IPC_SET, but also will update key, cuid and cgid values. IOW, it allows to change existent key value. The fact, that key is not used is checked before update. Otherwise -EEXIST is returned. Signed-off-by: Stanislav Kinsbursky Signed-off

[PATCH v4 7/9] IPC: message queue receive cleanup

2012-08-13 Thread Stanislav Kinsbursky
This patch moves all message related manipulation into one function msg_fill(). Actually, two functions because of the compat one. Signed-off-by: Stanislav Kinsbursky Signed-off-by: Cyrill Gorcunov Conflicts: arch/tile/kernel/compat.c include/linux/compat.h --- arch/tile

[PATCH v4 6/9] ipc: add new SEM_SET command for sys_semctl() call

2012-08-13 Thread Stanislav Kinsbursky
New SEM_SET command will be interpreted exactly as IPC_SET, but also will update key, cuid and cgid values. IOW, it allows to change existent key value. The fact, that key is not used is checked before update. Otherwise -EEXIST is returned. Signed-off-by: Stanislav Kinsbursky Signed-off

[PATCH v4 5/9] ipc: add new MSG_SET command for sys_msgctl() call

2012-08-13 Thread Stanislav Kinsbursky
New MSG_SET command will be interpreted exactly as IPC_SET, but also will update key, cuid and cgid values. IOW, it allows to change existent key value. The fact, that key is not used is checked before update. Otherwise -EEXIST is returned. Signed-off-by: Stanislav Kinsbursky Signed-off

[PATCH v4 3/9] ipc: segment key change helper introduced

2012-08-13 Thread Stanislav Kinsbursky
user-space in __get_compat_ipc_perm() and __get_compat_ipc64_perm() functions. Also segment search by key and lock were splitted into different functions, because ipc_update_key() doesn't need to lock the segment during check that new key is not used. Signed-off-by: Stanislav Kinsbursky Signed-off

[PATCH v4 2/9] ipc: "use key as id" functionality for resource get system call introduced

2012-08-13 Thread Stanislav Kinsbursky
. Signed-off-by: Stanislav Kinsbursky Signed-off-by: Cyrill Gorcunov --- include/linux/ipc.h |1 + ipc/msg.c |1 + ipc/sem.c |1 + ipc/shm.c |1 + ipc/util.c |8 +++- ipc/util.h |1 + 6 files changed, 12 insertions(+), 1

[PATCH v2] SUNRPC: check current nsproxy before set of node name on client creation

2012-08-13 Thread Stanislav Kinsbursky
ces will be destroyed one by one. I.e. we can't dereference current->nsproxy to obtain uts namespace. Signed-off-by: Stanislav Kinsbursky --- net/sunrpc/clnt.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 9a9676e..8

Re: [PATCH] SUNRPC: check current nsproxy before set of node name on client creation

2012-08-13 Thread Stanislav Kinsbursky
Thanks, Jeff. Will fix. 13.08.2012 15:35, Jeff Layton пишет: On Mon, 13 Aug 2012 15:21:56 +0400 Stanislav Kinsbursky wrote: When child reaper exits, it can destroy mount namespace it belong to, and if there are NFS mounts inside, then it will try to umount them. But in this point current

[PATCH] SUNRPC: check current nsproxy before set of node name on client creation

2012-08-13 Thread Stanislav Kinsbursky
in uts namespace. Signed-off-by: Stanislav Kinsbursky --- net/sunrpc/clnt.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 9a9676e..28ac940 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -279,6 +279,16 @

Re: [PATCH v3 08/10] IPC: message queue copy feature introduced

2012-08-13 Thread Stanislav Kinsbursky
just to avoid any 32/64 bit issues. Sounds reasonable. But, probably, mtype suit better for message number. I'll update. -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.or

Re: [PATCH v3 08/10] IPC: message queue copy feature introduced

2012-08-13 Thread Stanislav Kinsbursky
bit issues. Sounds reasonable. But, probably, mtype suit better for message number. I'll update. -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH] SUNRPC: check current nsproxy before set of node name on client creation

2012-08-13 Thread Stanislav Kinsbursky
namespace. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- net/sunrpc/clnt.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 9a9676e..28ac940 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c

Re: [PATCH] SUNRPC: check current nsproxy before set of node name on client creation

2012-08-13 Thread Stanislav Kinsbursky
Thanks, Jeff. Will fix. 13.08.2012 15:35, Jeff Layton пишет: On Mon, 13 Aug 2012 15:21:56 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: When child reaper exits, it can destroy mount namespace it belong to, and if there are NFS mounts inside, then it will try to umount them

[PATCH v2] SUNRPC: check current nsproxy before set of node name on client creation

2012-08-13 Thread Stanislav Kinsbursky
will be destroyed one by one. I.e. we can't dereference current-nsproxy to obtain uts namespace. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- net/sunrpc/clnt.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c

[PATCH v4 2/9] ipc: use key as id functionality for resource get system call introduced

2012-08-13 Thread Stanislav Kinsbursky
. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Signed-off-by: Cyrill Gorcunov gorcu...@openvz.org --- include/linux/ipc.h |1 + ipc/msg.c |1 + ipc/sem.c |1 + ipc/shm.c |1 + ipc/util.c |8 +++- ipc/util.h |1

[PATCH v4 3/9] ipc: segment key change helper introduced

2012-08-13 Thread Stanislav Kinsbursky
user-space in __get_compat_ipc_perm() and __get_compat_ipc64_perm() functions. Also segment search by key and lock were splitted into different functions, because ipc_update_key() doesn't need to lock the segment during check that new key is not used. Signed-off-by: Stanislav Kinsbursky skinsbur

[PATCH v4 5/9] ipc: add new MSG_SET command for sys_msgctl() call

2012-08-13 Thread Stanislav Kinsbursky
New MSG_SET command will be interpreted exactly as IPC_SET, but also will update key, cuid and cgid values. IOW, it allows to change existent key value. The fact, that key is not used is checked before update. Otherwise -EEXIST is returned. Signed-off-by: Stanislav Kinsbursky skinsbur

[PATCH v4 6/9] ipc: add new SEM_SET command for sys_semctl() call

2012-08-13 Thread Stanislav Kinsbursky
New SEM_SET command will be interpreted exactly as IPC_SET, but also will update key, cuid and cgid values. IOW, it allows to change existent key value. The fact, that key is not used is checked before update. Otherwise -EEXIST is returned. Signed-off-by: Stanislav Kinsbursky skinsbur

[PATCH v4 7/9] IPC: message queue receive cleanup

2012-08-13 Thread Stanislav Kinsbursky
This patch moves all message related manipulation into one function msg_fill(). Actually, two functions because of the compat one. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Signed-off-by: Cyrill Gorcunov gorcu...@openvz.org Conflicts: arch/tile/kernel/compat.c

[PATCH v4 4/9] ipc: add new SHM_SET command for sys_shmctl() call

2012-08-13 Thread Stanislav Kinsbursky
New SHM_SET command will be interpreted exactly as IPC_SET, but also will update key, cuid and cgid values. IOW, it allows to change existent key value. The fact, that key is not used is checked before update. Otherwise -EEXIST is returned. Signed-off-by: Stanislav Kinsbursky skinsbur

[PATCH v4 8/9] IPC: message queue copy feature introduced

2012-08-13 Thread Stanislav Kinsbursky
the queue). Notes: 1) Return -ENOSYS if MSG_COPY is specified, but CONFIG_CHECKPOINT_RESTORE is not set. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux/msg.h |1 + ipc/msg.c | 51 +-- ipc/msgutil.c

[PATCH v4 9/9] test: IPC message queue migration test

2012-08-13 Thread Stanislav Kinsbursky
+#include sys/wait.h +#include sys/sem.h +#include sys/ipc.h +#include sys/msg.h +#include signal.h +#include errno.h + +#include zdtmtst.h + +const char *test_doc=Tests sysv5 msg queues support by user space checkpointing; +const char *test_author=Stanislav Kinsbursky skinsbur...@openvz.org; + +struct

[PATCH v4 0/9] IPC: checkpoint/restore in userspace enhancements

2012-08-13 Thread Stanislav Kinsbursky
series implements... --- Stanislav Kinsbursky (9): ipc: remove forced assignment of selected message ipc: use key as id functionality for resource get system call introduced ipc: segment key change helper introduced ipc: add new SHM_SET command for sys_shmctl() call

[PATCH v4 1/9] ipc: remove forced assignment of selected message

2012-08-13 Thread Stanislav Kinsbursky
This is a cleanup patch. The assignment is redundant. --- ipc/msg.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index 7385de2..f3bfbb8 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -787,7 +787,6 @@ long do_msgrcv(int msqid, long *pmtype, void __user

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-13 Thread Stanislav Kinsbursky
13.08.2012 20:47, J. Bruce Fields пишет: On Sat, Aug 11, 2012 at 03:15:24PM +0400, Stanislav Kinsbursky wrote: 11.08.2012 10:23, Pavel Emelyanov пишет: On 08/11/2012 03:09 AM, H. Peter Anvin wrote: On 08/10/2012 12:28 PM, Alan Cox wrote: Explicitly for Linux yes - this is not generally true

Re: [PATCH v3 08/10] IPC: message queue copy feature introduced

2012-08-11 Thread Stanislav Kinsbursky
11.08.2012 15:20, Manfred Spraul пишет: Hi Stanislav, 2012/8/10 Stanislav Kinsbursky : This patch is required for checkpoint/restore in userspace. IOW, c/r requires some way to get all pending IPC messages without deleting them from the queue (checkpoint can fail and in this case tasks

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-11 Thread Stanislav Kinsbursky
11.08.2012 10:23, Pavel Emelyanov пишет: On 08/11/2012 03:09 AM, H. Peter Anvin wrote: On 08/10/2012 12:28 PM, Alan Cox wrote: Explicitly for Linux yes - this is not generally true of the AF_UNIX socket domain and even the permissions aspect isn't guaranteed to be supported on some BSD

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-11 Thread Stanislav Kinsbursky
11.08.2012 10:23, Pavel Emelyanov пишет: On 08/11/2012 03:09 AM, H. Peter Anvin wrote: On 08/10/2012 12:28 PM, Alan Cox wrote: Explicitly for Linux yes - this is not generally true of the AF_UNIX socket domain and even the permissions aspect isn't guaranteed to be supported on some BSD

Re: [PATCH v3 08/10] IPC: message queue copy feature introduced

2012-08-11 Thread Stanislav Kinsbursky
11.08.2012 15:20, Manfred Spraul пишет: Hi Stanislav, 2012/8/10 Stanislav Kinsbursky skinsbur...@parallels.com: This patch is required for checkpoint/restore in userspace. IOW, c/r requires some way to get all pending IPC messages without deleting them from the queue (checkpoint can fail

Re: [RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-10 Thread Stanislav Kinsbursky
10.08.2012 22:15, H. Peter Anvin пишет: On 08/10/2012 05:57 AM, Stanislav Kinsbursky wrote: Today, there is a problem in connecting of local SUNRPC thansports. These transports uses UNIX sockets and connection itself is done by rpciod workqueue. But UNIX sockets lookup is done in context

Re: [RFC PATCH 1/2] unix sockets: add ability for search for peer from passed root

2012-08-10 Thread Stanislav Kinsbursky
10.08.2012 22:10, J. Bruce Fields пишет: On Fri, Aug 10, 2012 at 04:57:30PM +0400, Stanislav Kinsbursky wrote: This helper is used stream sockets yet. All is simple: if non-NULL struct path was passed to unix_find_other(), then vfs_path_lookup() is called instead of kern_path(). I'm having

[RFC PATCH 2/2] SUNRPC: connect local transports with unix_stream_connect_root() helper

2012-08-10 Thread Stanislav Kinsbursky
- not containers's one. This patch solves the problem by using special helper unix_stream_connect_root(), which lookup socket file starting from passed root. Signed-off-by: Stanislav Kinsbursky --- net/sunrpc/xprtsock.c | 28 +--- 1 files changed, 25 insertions(+), 3

[RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-10 Thread Stanislav Kinsbursky
... --- Stanislav Kinsbursky (2): unix sockets: add ability for search for peer from passed root SUNRPC: connect local transports with unix_stream_connect_root() helper include/net/af_unix.h |2 ++ net/sunrpc/xprtsock.c | 28 +--- net/unix/af_unix.c

[RFC PATCH 1/2] unix sockets: add ability for search for peer from passed root

2012-08-10 Thread Stanislav Kinsbursky
This helper is used stream sockets yet. All is simple: if non-NULL struct path was passed to unix_find_other(), then vfs_path_lookup() is called instead of kern_path(). Signed-off-by: Stanislav Kinsbursky --- include/net/af_unix.h |2 ++ net/unix/af_unix.c| 25

[RFC PATCH 1/2] unix sockets: add ability for search for peer from passed root

2012-08-10 Thread Stanislav Kinsbursky
This helper is used stream sockets yet. All is simple: if non-NULL struct path was passed to unix_find_other(), then vfs_path_lookup() is called instead of kern_path(). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/net/af_unix.h |2 ++ net/unix/af_unix.c| 25

[RFC PATCH 0/2] net: connect to UNIX sockets from specified root

2012-08-10 Thread Stanislav Kinsbursky
... --- Stanislav Kinsbursky (2): unix sockets: add ability for search for peer from passed root SUNRPC: connect local transports with unix_stream_connect_root() helper include/net/af_unix.h |2 ++ net/sunrpc/xprtsock.c | 28 +--- net/unix/af_unix.c

[RFC PATCH 2/2] SUNRPC: connect local transports with unix_stream_connect_root() helper

2012-08-10 Thread Stanislav Kinsbursky
- not containers's one. This patch solves the problem by using special helper unix_stream_connect_root(), which lookup socket file starting from passed root. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- net/sunrpc/xprtsock.c | 28 +--- 1 files changed

<    2   3   4   5   6   7   8   >