[PATCH 07/15] nfsd: make unconf_str_hastbl allocated per net

2012-11-13 Thread Stanislav Kinsbursky
-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfsd/netns.h |3 +++ fs/nfsd/nfs4state.c | 27 ++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h index 0577780..ad08208 100644 --- a/fs/nfsd/netns.h

[PATCH 02/15] nfsd: make nfs4_client network namespace dependent

2012-11-13 Thread Stanislav Kinsbursky
And use it's net where possible. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfsd/nfs4callback.c |2 +- fs/nfsd/nfs4recover.c |9 +++-- fs/nfsd/nfs4state.c| 15 +-- fs/nfsd/state.h|1 + 4 files changed, 14 insertions(+), 13

Re: [PATCH v3] SUNRPC: set desired file system root before connecting local transports

2012-11-12 Thread Stanislav Kinsbursky
is? Is there any other hazard to doing this that people can think of? --b. -- 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://vger.kernel.or

Re: [PATCH v3] SUNRPC: set desired file system root before connecting local transports

2012-11-12 Thread Stanislav Kinsbursky
this? Is there any other hazard to doing this that people can think of? --b. -- 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://vger.kernel.org/majordomo

[PATCH 4/4] ipc: add more comments to message copying related code

2012-11-07 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky --- ipc/msg.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index 5e317fe..4a4725c 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -770,6 +770,10 @@ static long do_msg_fill(void __user *dest, struct msg_msg

[PATCH 2/4] ipc: convert prepare_copy() from macro to function

2012-11-07 Thread Stanislav Kinsbursky
This code works if CONFIG_CHECKPOINT_RESTORE is disabled. Signed-off-by: Stanislav Kinsbursky --- ipc/msg.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index f1070c3..ad194f8 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -803,8 +803,15

[PATCH 3/4] ipc: simplify message copying

2012-11-07 Thread Stanislav Kinsbursky
is disabled. Signed-off-by: Stanislav Kinsbursky --- ipc/msg.c | 24 +--- ipc/msgutil.c |5 + 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index ad194f8..5e317fe 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -770,16 +770,6

[PATCH 1/4] ipc: simplify free_copy() call

2012-11-07 Thread Stanislav Kinsbursky
-by: Stanislav Kinsbursky --- ipc/msg.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index a0b0224..f1070c3 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -797,15 +797,17 @@ static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz

[PATCH 0/4] IPC: CRIU enhancements fixes and cleanup

2012-11-07 Thread Stanislav Kinsbursky
implemetation of further message handling. The following series implements... --- Stanislav Kinsbursky (4): ipc: simplify free_copy() call ipc: convert prepare_copy() from macro to function ipc: simplify message copying ipc: add more comments to message copying related code

[PATCH 0/4] IPC: CRIU enhancements fixes and cleanup

2012-11-07 Thread Stanislav Kinsbursky
implemetation of further message handling. The following series implements... --- Stanislav Kinsbursky (4): ipc: simplify free_copy() call ipc: convert prepare_copy() from macro to function ipc: simplify message copying ipc: add more comments to message copying related code

[PATCH 1/4] ipc: simplify free_copy() call

2012-11-07 Thread Stanislav Kinsbursky
-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/msg.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index a0b0224..f1070c3 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -797,15 +797,17 @@ static inline struct msg_msg *prepare_copy(void

[PATCH 2/4] ipc: convert prepare_copy() from macro to function

2012-11-07 Thread Stanislav Kinsbursky
This code works if CONFIG_CHECKPOINT_RESTORE is disabled. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/msg.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index f1070c3..ad194f8 100644 --- a/ipc/msg.c +++ b/ipc

[PATCH 3/4] ipc: simplify message copying

2012-11-07 Thread Stanislav Kinsbursky
is disabled. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/msg.c | 24 +--- ipc/msgutil.c |5 + 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index ad194f8..5e317fe 100644 --- a/ipc/msg.c +++ b/ipc/msg.c

[PATCH 4/4] ipc: add more comments to message copying related code

2012-11-07 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/msg.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index 5e317fe..4a4725c 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -770,6 +770,10 @@ static long do_msg_fill(void __user

Re: [PATCH v3] SUNRPC: set desired file system root before connecting local transports

2012-11-06 Thread Stanislav Kinsbursky
06.11.2012 16:06, J. Bruce Fields пишет: On Tue, Nov 06, 2012 at 02:14:50PM +0400, Stanislav Kinsbursky wrote: 09.10.2012 23:35, J. Bruce Fields пишет: Cc'ing Eric since I seem to recall he suggested doing it this way? Seems OK to me, but maybe that swap_root should be in common code

Re: [PATCH v3] SUNRPC: set desired file system root before connecting local transports

2012-11-06 Thread Stanislav Kinsbursky
this.--b. On Mon, Oct 08, 2012 at 02:56:32PM +0400, 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 all local transports are connecting in rpciod context. I.e

Re: [PATCH v3] SUNRPC: set desired file system root before connecting local transports

2012-11-06 Thread Stanislav Kinsbursky
this.--b. On Mon, Oct 08, 2012 at 02:56:32PM +0400, 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 all local transports are connecting in rpciod context. I.e

Re: [PATCH v3] SUNRPC: set desired file system root before connecting local transports

2012-11-06 Thread Stanislav Kinsbursky
06.11.2012 16:06, J. Bruce Fields пишет: On Tue, Nov 06, 2012 at 02:14:50PM +0400, Stanislav Kinsbursky wrote: 09.10.2012 23:35, J. Bruce Fields пишет: Cc'ing Eric since I seem to recall he suggested doing it this way? Seems OK to me, but maybe that swap_root should be in common code

[PATCH 3/5] test: IPC message queue copy feature test update

2012-10-26 Thread Stanislav Kinsbursky
This update fixes coding style problems (80-characters line and others). Also, it fixes test to work with new IPC sysctls (instead of using experimental API logic, which was throwed away and replaced by sysctls). Signed-off-by: Stanislav Kinsbursky --- include/linux/msg.h

[PATCH 4/5] Documentation: update sysctl/kernel.txt

2012-10-26 Thread Stanislav Kinsbursky
This patch adds documentation about new "msg_next_id", "sem_next_id" and "shm_next_id" sysctls. Signed-off-by: Stanislav Kinsbursky --- Documentation/sysctl/kernel.txt | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/Doc

[PATCH 5/5] ipc: cleanup do_msgrcv() aroung MSG_COPY feature

2012-10-26 Thread Stanislav Kinsbursky
MSG_COPY feature was developed for Checkpoint/Restart In User space project and thus wrapped in CONFIG_CHECKPOINT_RESTORE macro. But code look a bit ugly. So this patch is an attempt to cleanup do_msgrcv() a bit and make it looks better. Signed-off-by: Stanislav Kinsbursky --- ipc/msg.c | 79

[PATCH 1/5] ipc: wrap new sysctls for CRIU inside CONFIG_CHECKPOINT_RESTORE

2012-10-26 Thread Stanislav Kinsbursky
This patch set wraps "msg_next_id", "sem_next_id" and "shm_next_id" inside CONFIG_CHECKPOINT_RESTORE macro. Signed-off-by: Stanislav Kinsbursky --- ipc/ipc_sysctl.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ipc/ipc_sysctl.c b/

[PATCH 2/5] ipc: remove redundant MSG_COPY check

2012-10-26 Thread Stanislav Kinsbursky
Small cleanup patch. Signed-off-by: Stanislav Kinsbursky --- ipc/msg.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index 28320ab..f9774ff 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -786,11 +786,8 @@ long do_msgrcv(int msqid, void __user

[RFC PATCH 0/5] IPC: CRIU enhancements update

2012-10-26 Thread Stanislav Kinsbursky
sysctls. 3) cleanup do_msgrcv() to make it looks less ugly aroung MSG_COPY feature. The following series implements... --- Stanislav Kinsbursky (5): ipc: wrap new sysctls for CRIU inside CONFIG_CHECKPOINT_RESTORE ipc: remove redundant MSG_COPY check test: IPC message queue copy fe

[RFC PATCH 0/5] IPC: CRIU enhancements update

2012-10-26 Thread Stanislav Kinsbursky
) cleanup do_msgrcv() to make it looks less ugly aroung MSG_COPY feature. The following series implements... --- Stanislav Kinsbursky (5): ipc: wrap new sysctls for CRIU inside CONFIG_CHECKPOINT_RESTORE ipc: remove redundant MSG_COPY check test: IPC message queue copy feature test

[PATCH 2/5] ipc: remove redundant MSG_COPY check

2012-10-26 Thread Stanislav Kinsbursky
Small cleanup patch. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/msg.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index 28320ab..f9774ff 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -786,11 +786,8 @@ long do_msgrcv

[PATCH 1/5] ipc: wrap new sysctls for CRIU inside CONFIG_CHECKPOINT_RESTORE

2012-10-26 Thread Stanislav Kinsbursky
This patch set wraps msg_next_id, sem_next_id and shm_next_id inside CONFIG_CHECKPOINT_RESTORE macro. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/ipc_sysctl.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c

[PATCH 5/5] ipc: cleanup do_msgrcv() aroung MSG_COPY feature

2012-10-26 Thread Stanislav Kinsbursky
MSG_COPY feature was developed for Checkpoint/Restart In User space project and thus wrapped in CONFIG_CHECKPOINT_RESTORE macro. But code look a bit ugly. So this patch is an attempt to cleanup do_msgrcv() a bit and make it looks better. Signed-off-by: Stanislav Kinsbursky skinsbur

[PATCH 4/5] Documentation: update sysctl/kernel.txt

2012-10-26 Thread Stanislav Kinsbursky
This patch adds documentation about new msg_next_id, sem_next_id and shm_next_id sysctls. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- Documentation/sysctl/kernel.txt | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/Documentation

[PATCH 3/5] test: IPC message queue copy feature test update

2012-10-26 Thread Stanislav Kinsbursky
This update fixes coding style problems (80-characters line and others). Also, it fixes test to work with new IPC sysctls (instead of using experimental API logic, which was throwed away and replaced by sysctls). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux

Re: [PATCH v8 2/5] ipc: add sysctl to specify desired next object id

2012-10-25 Thread Stanislav Kinsbursky
25.10.2012 01:41, Andrew Morton пишет: On Wed, 24 Oct 2012 19:35:09 +0400 Stanislav Kinsbursky wrote: This patch adds 3 new variables and sysctls to tune them (by one "next_id" variable for messages, semaphores and shared memory respectively). This variable can be used to set

Re: [PATCH v8 2/5] ipc: add sysctl to specify desired next object id

2012-10-25 Thread Stanislav Kinsbursky
25.10.2012 01:41, Andrew Morton пишет: On Wed, 24 Oct 2012 19:35:09 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: This patch adds 3 new variables and sysctls to tune them (by one next_id variable for messages, semaphores and shared memory respectively). This variable can be used

[PATCH v8 2/5] ipc: add sysctl to specify desired next object id

2012-10-24 Thread Stanislav Kinsbursky
on attempt, "next_id" will be set back to -1 (if it was non-negative). Signed-off-by: Stanislav Kinsbursky --- include/linux/ipc_namespace.h |1 + ipc/ipc_sysctl.c | 28 ipc/util.c| 16 ipc/util.h

[PATCH v8 4/5] ipc: message queue copy feature introduced

2012-10-24 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/uapi/linux/msg.h |1 + ipc/msg.c| 50 -- ipc/msgutil.c| 38

[PATCH v8 1/5] ipc: remove forced assignment of selected message

2012-10-24 Thread Stanislav Kinsbursky
This is a cleanup patch. The assignment is redundant. Signed-off-by: Stanislav Kinsbursky --- ipc/msg.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index a71af5a..2f272fa 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -793,12 +793,9 @@ long

[RFC PATCH v8 0/5] IPC: checkpoint/restore in userspace enhancements

2012-10-24 Thread Stanislav Kinsbursky
queues without deleting them. This was achived by introducing of new MSG_COPY flag for sys_msgrcv(). If MSG_COPY flag is set, then msgtyp is interpreted as message number. The following series implements... --- Stanislav Kinsbursky (5): ipc: remove forced assignment of selected message

[PATCH v8 5/5] test: IPC message queue copy feture test

2012-10-24 Thread Stanislav Kinsbursky
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). Signed-off-by: Stanislav Kinsbursky --- tools/testing/selftests/ipc/Makefile | 25 tools/testing/selftests/ipc/msgque.c | 231

[PATCH v8 3/5] ipc: message queue receive cleanup

2012-10-24 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 --- include/linux/msg.h |5 +++-- ipc/compat.c| 45 +++-- ipc/msg.c

[PATCH v6] posix timers: allocate timer id per process

2012-10-24 Thread Stanislav Kinsbursky
ser space in loop, listed below, will be increasing on each iteration till INT_MAX and then dropped to zero: while(1) { id = timer_create(...); timer_delete(id); } Signed-off-by: Stanislav Kinsbursky --- v6: 1) include of "linux/idr.h" removed from "include/linux/s

[PATCH] lockd: fix races in per-net NSM client handling

2012-10-24 Thread Stanislav Kinsbursky
This patch fixes two problems: 1) Removes races on NSM creation. 2) Fixes silly misprint on NSM client destruction (usage counter was checked for non-zero value instead of zero). Signed-off-by: Stanislav Kinsbursky --- fs/lockd/mon.c | 35 +++ 1 files changed

[PATCH] lockd: fix races in per-net NSM client handling

2012-10-24 Thread Stanislav Kinsbursky
This patch fixes two problems: 1) Removes races on NSM creation. 2) Fixes silly misprint on NSM client destruction (usage counter was checked for non-zero value instead of zero). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/lockd/mon.c | 35

[PATCH v6] posix timers: allocate timer id per process

2012-10-24 Thread Stanislav Kinsbursky
in loop, listed below, will be increasing on each iteration till INT_MAX and then dropped to zero: while(1) { id = timer_create(...); timer_delete(id); } Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- v6: 1) include of linux/idr.h removed from include/linux

[PATCH v8 3/5] ipc: message queue receive cleanup

2012-10-24 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 --- include/linux/msg.h |5 +++-- ipc/compat.c| 45

[PATCH v8 5/5] test: IPC message queue copy feture test

2012-10-24 Thread Stanislav Kinsbursky
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- tools/testing/selftests/ipc/Makefile | 25 tools/testing/selftests/ipc/msgque.c | 231

[RFC PATCH v8 0/5] IPC: checkpoint/restore in userspace enhancements

2012-10-24 Thread Stanislav Kinsbursky
queues without deleting them. This was achived by introducing of new MSG_COPY flag for sys_msgrcv(). If MSG_COPY flag is set, then msgtyp is interpreted as message number. The following series implements... --- Stanislav Kinsbursky (5): ipc: remove forced assignment of selected message

[PATCH v8 1/5] ipc: remove forced assignment of selected message

2012-10-24 Thread Stanislav Kinsbursky
This is a cleanup patch. The assignment is redundant. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/msg.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index a71af5a..2f272fa 100644 --- a/ipc/msg.c +++ b/ipc/msg.c

[PATCH v8 4/5] ipc: message queue copy feature introduced

2012-10-24 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/uapi/linux/msg.h |1 + ipc/msg.c| 50 -- ipc

[PATCH v8 2/5] ipc: add sysctl to specify desired next object id

2012-10-24 Thread Stanislav Kinsbursky
, next_id will be set back to -1 (if it was non-negative). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux/ipc_namespace.h |1 + ipc/ipc_sysctl.c | 28 ipc/util.c| 16 ipc/util.h

[PATCH v5] posix timers: allocate timer id per process

2012-10-23 Thread Stanislav Kinsbursky
ser space in loop, listed below, will be increasing on each iteration till INT_MAX and then dropped to zero: while(1) { id = timer_create(...); timer_delete(id); } Signed-off-by: Stanislav Kinsbursky --- v5: 1) Patch changelog updated v4: 1) a couple of coding style fixes (lines o

[PATCH v5] posix timers: allocate timer id per process

2012-10-23 Thread Stanislav Kinsbursky
in loop, listed below, will be increasing on each iteration till INT_MAX and then dropped to zero: while(1) { id = timer_create(...); timer_delete(id); } Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- v5: 1) Patch changelog updated v4: 1) a couple of coding

Re: [PATCH v4] posix timers: allocate timer id per process

2012-10-19 Thread Stanislav Kinsbursky
of releasing timer (if id of this timer is less than current->signal min_id). Does this approach solves the issue you mentioned above? -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mess

[PATCH v4] posix timers: allocate timer id per process

2012-10-19 Thread Stanislav Kinsbursky
will be returned to user. Hash table is size of page (4KB). Key is constructed as follows: key = hash_32(current->signal) ^ hash_32(posix_timer_id); Signed-off-by: Stanislav Kinsbursky --- include/linux/posix-timers.h |1 include/linux/sched.h|4 + kernel/posix-timers.c|

[PATCH v4] posix timers: allocate timer id per process

2012-10-19 Thread Stanislav Kinsbursky
will be returned to user. Hash table is size of page (4KB). Key is constructed as follows: key = hash_32(current-signal) ^ hash_32(posix_timer_id); Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux/posix-timers.h |1 include/linux/sched.h|4 + kernel/posix

Re: [PATCH v4] posix timers: allocate timer id per process

2012-10-19 Thread Stanislav Kinsbursky
of releasing timer (if id of this timer is less than current-signal min_id). Does this approach solves the issue you mentioned above? -- 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

[PATCH v7 05/10] ipc: add new MSG_SET command for sys_msgctl() call

2012-10-18 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 --- include/uapi

[PATCH v7 06/10] qlge driver: rename internal SEM_SET macro to SEM_INIT

2012-10-18 Thread Stanislav Kinsbursky
, "SHM_") part. So, I'm hoping, that this change doesn't really matters for "QLogic qlge NIC HBA Driver" developers, since it's just an internal define. Signed-off-by: Stanislav Kinsbursky --- drivers/net/ethernet/qlogic/qlge/qlge.h |4 ++-- drivers/net/ethernet/qlogic

[PATCH v7 03/10] ipc: segment key change helper introduced

2012-10-18 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 --- ipc

[PATCH v7 00/10] IPC: checkpoint/restore in userspace enhancements

2012-10-18 Thread Stanislav Kinsbursky
eting them. This was achived by introducing of new MSG_COPY flag for sys_msgrcv(). If MSG_COPY flag is set, then msgtyp is interpreted as message number. The following series implements... --- Stanislav Kinsbursky (10): ipc: remove forced assignment of selected message ipc: "use key as id

[PATCH v7 08/10] IPC: message queue receive cleanup

2012-10-18 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 --- include/linux/msg.h |5 +++-- ipc/compat.c| 45 +++-- ipc/msg.c

[PATCH v7 01/10] ipc: remove forced assignment of selected message

2012-10-18 Thread Stanislav Kinsbursky
This is a cleanup patch. The assignment is redundant. Signed-off-by: Stanislav Kinsbursky --- ipc/msg.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index a71af5a..2f272fa 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -793,12 +793,9 @@ long

[PATCH v7 10/10] test: IPC message queue copy feture test

2012-10-18 Thread Stanislav Kinsbursky
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). Signed-off-by: Stanislav Kinsbursky --- tools/testing/selftests/ipc/Makefile | 25 tools/testing/selftests/ipc/msgque.c | 231

[PATCH v7 09/10] IPC: message queue copy feature introduced

2012-10-18 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/uapi/linux/msg.h |1 + ipc/msg.c| 50 -- ipc/msgutil.c| 38

[PATCH v7 07/10] ipc: add new SEM_SET command for sys_semctl() call

2012-10-18 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 --- include/uapi

[PATCH v7 04/10] ipc: add new SHM_SET command for sys_shmctl() call

2012-10-18 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 --- include/uapi

[PATCH v7 02/10] ipc: "use key as id" functionality for resource get system call introduced

2012-10-18 Thread Stanislav Kinsbursky
free slot will be used. Signed-off-by: Stanislav Kinsbursky --- include/uapi/linux/ipc.h |1 + ipc/msg.c|4 +++- ipc/sem.c|4 +++- ipc/shm.c|4 +++- ipc/util.c | 18 +++--- ipc/util.h |3

[PATCH v3] posix timers: allocate timer id per process

2012-10-18 Thread Stanislav Kinsbursky
is constructed as follows: key = hash_ptr(current->signal) ^ hash_32(posix_timer_id); Signed-off-by: Stanislav Kinsbursky --- include/linux/posix-timers.h |1 include/linux/sched.h|4 +- kernel/posix-timers.c| 111 -- 3 files changed,

[PATCH v3] posix timers: allocate timer id per process

2012-10-18 Thread Stanislav Kinsbursky
is constructed as follows: key = hash_ptr(current-signal) ^ hash_32(posix_timer_id); Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux/posix-timers.h |1 include/linux/sched.h|4 +- kernel/posix-timers.c| 111

[PATCH v7 02/10] ipc: use key as id functionality for resource get system call introduced

2012-10-18 Thread Stanislav Kinsbursky
free slot will be used. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/uapi/linux/ipc.h |1 + ipc/msg.c|4 +++- ipc/sem.c|4 +++- ipc/shm.c|4 +++- ipc/util.c | 18 +++--- ipc/util.h

[PATCH v7 04/10] ipc: add new SHM_SET command for sys_shmctl() call

2012-10-18 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 v7 07/10] ipc: add new SEM_SET command for sys_semctl() call

2012-10-18 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 v7 09/10] IPC: message queue copy feature introduced

2012-10-18 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/uapi/linux/msg.h |1 + ipc/msg.c| 50 -- ipc

[PATCH v7 10/10] test: IPC message queue copy feture test

2012-10-18 Thread Stanislav Kinsbursky
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- tools/testing/selftests/ipc/Makefile | 25 tools/testing/selftests/ipc/msgque.c | 231

[PATCH v7 01/10] ipc: remove forced assignment of selected message

2012-10-18 Thread Stanislav Kinsbursky
This is a cleanup patch. The assignment is redundant. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- ipc/msg.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index a71af5a..2f272fa 100644 --- a/ipc/msg.c +++ b/ipc/msg.c

[PATCH v7 08/10] IPC: message queue receive cleanup

2012-10-18 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 --- include/linux/msg.h |5 +++-- ipc/compat.c| 45

[PATCH v7 00/10] IPC: checkpoint/restore in userspace enhancements

2012-10-18 Thread Stanislav Kinsbursky
. This was achived by introducing of new MSG_COPY flag for sys_msgrcv(). If MSG_COPY flag is set, then msgtyp is interpreted as message number. The following series implements... --- Stanislav Kinsbursky (10): ipc: remove forced assignment of selected message ipc: use key as id functionality

[PATCH v7 03/10] ipc: segment key change helper introduced

2012-10-18 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 v7 06/10] qlge driver: rename internal SEM_SET macro to SEM_INIT

2012-10-18 Thread Stanislav Kinsbursky
, that this change doesn't really matters for QLogic qlge NIC HBA Driver developers, since it's just an internal define. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- drivers/net/ethernet/qlogic/qlge/qlge.h |4 ++-- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 16

[PATCH v7 05/10] ipc: add new MSG_SET command for sys_msgctl() call

2012-10-18 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

Re: [RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Stanislav Kinsbursky
17.10.2012 17:57, Eric Dumazet пишет: On Wed, 2012-10-17 at 17:18 +0400, Stanislav Kinsbursky wrote: +static int posix_timer_add(struct k_itimer *timer) +{ + struct signal_struct *sig = current->signal; + int next_free_id = sig->posix_timer_id; + struct hlist_head

Re: [RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Stanislav Kinsbursky
17.10.2012 17:44, Eric Dumazet пишет: On Wed, 2012-10-17 at 17:18 +0400, Stanislav Kinsbursky wrote: +static int hash(struct signal_struct *sig, unsigned int nr) +{ + int hash = hash_ptr(sig, POSIX_TIMERS_HASH_BITS); + return hash ^ hash_32(nr, POSIX_TIMERS_HASH_BITS

[RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Stanislav Kinsbursky
_32(posix_timer_id); Signed-off-by: Stanislav Kinsbursky --- include/linux/posix-timers.h |1 include/linux/sched.h|4 +- kernel/posix-timers.c| 112 -- 3 files changed, 78 insertions(+), 39 deletions(-) diff --git a/include/li

[RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Stanislav Kinsbursky
(posix_timer_id); Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux/posix-timers.h |1 include/linux/sched.h|4 +- kernel/posix-timers.c| 112 -- 3 files changed, 78 insertions(+), 39 deletions(-) diff

Re: [RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Stanislav Kinsbursky
17.10.2012 17:44, Eric Dumazet пишет: On Wed, 2012-10-17 at 17:18 +0400, Stanislav Kinsbursky wrote: +static int hash(struct signal_struct *sig, unsigned int nr) +{ + int hash = hash_ptr(sig, POSIX_TIMERS_HASH_BITS); + return hash ^ hash_32(nr, POSIX_TIMERS_HASH_BITS

Re: [RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Stanislav Kinsbursky
17.10.2012 17:57, Eric Dumazet пишет: On Wed, 2012-10-17 at 17:18 +0400, Stanislav Kinsbursky wrote: +static int posix_timer_add(struct k_itimer *timer) +{ + struct signal_struct *sig = current-signal; + int next_free_id = sig-posix_timer_id; + struct hlist_head *head

Re: [RFC PATCH] posix timers: allocate timer id per task

2012-10-16 Thread Stanislav Kinsbursky
15.10.2012 23:08, Thomas Gleixner пишет: On Mon, 15 Oct 2012, Stanislav Kinsbursky wrote: This patch is required CRIU project (www.criu.org). To migrate processes with posix timers we have to make sure, that we can restore posix timer with proper id. Currently, this is not true, because timer

Re: [RFC PATCH] posix timers: allocate timer id per task

2012-10-16 Thread Stanislav Kinsbursky
15.10.2012 21:04, Peter Zijlstra пишет: On Mon, 2012-10-15 at 20:17 +0400, Stanislav Kinsbursky wrote: This patch is required CRIU project (www.criu.org). To migrate processes with posix timers we have to make sure, that we can restore posix timer with proper id. Currently, this is not true

Re: [RFC PATCH] posix timers: allocate timer id per task

2012-10-16 Thread Stanislav Kinsbursky
15.10.2012 20:34, Eric Dumazet пишет: On Mon, 2012-10-15 at 20:17 +0400, Stanislav Kinsbursky wrote: This patch is required CRIU project (www.criu.org). To migrate processes with posix timers we have to make sure, that we can restore posix timer with proper id. Currently, this is not true

Re: [PATCH] proc: check vma->vm_file before dereferencing

2012-10-16 Thread Stanislav Kinsbursky
16.10.2012 01:40, Andrew Morton пишет: On Mon, 15 Oct 2012 19:30:03 +0400 Stanislav Kinsbursky wrote: It can be equal to NULL. Please write better changelogs, so people do not have to ask questions such as: - Under what conditions does this bug trigger? - In which kernel version(s

Re: [PATCH] proc: check vma-vm_file before dereferencing

2012-10-16 Thread Stanislav Kinsbursky
16.10.2012 01:40, Andrew Morton пишет: On Mon, 15 Oct 2012 19:30:03 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: It can be equal to NULL. Please write better changelogs, so people do not have to ask questions such as: - Under what conditions does this bug trigger

Re: [RFC PATCH] posix timers: allocate timer id per task

2012-10-16 Thread Stanislav Kinsbursky
15.10.2012 20:34, Eric Dumazet пишет: On Mon, 2012-10-15 at 20:17 +0400, Stanislav Kinsbursky wrote: This patch is required CRIU project (www.criu.org). To migrate processes with posix timers we have to make sure, that we can restore posix timer with proper id. Currently, this is not true

Re: [RFC PATCH] posix timers: allocate timer id per task

2012-10-16 Thread Stanislav Kinsbursky
15.10.2012 21:04, Peter Zijlstra пишет: On Mon, 2012-10-15 at 20:17 +0400, Stanislav Kinsbursky wrote: This patch is required CRIU project (www.criu.org). To migrate processes with posix timers we have to make sure, that we can restore posix timer with proper id. Currently, this is not true

Re: [RFC PATCH] posix timers: allocate timer id per task

2012-10-16 Thread Stanislav Kinsbursky
15.10.2012 23:08, Thomas Gleixner пишет: On Mon, 15 Oct 2012, Stanislav Kinsbursky wrote: This patch is required CRIU project (www.criu.org). To migrate processes with posix timers we have to make sure, that we can restore posix timer with proper id. Currently, this is not true, because timer

[RFC PATCH] posix timers: allocate timer id per task

2012-10-15 Thread Stanislav Kinsbursky
, it will be dropped to zero and -EAGAIN will be returned to user. Hash table is size of page (4KB). Key is constructed as follows: key = hash_ptr(current->signal) ^ hash_32(posix_timer_id); Signed-off-by: Stanislav Kinsbursky --- include/linux/posix-timers.h |1 include/linux/sched.h|

[PATCH v6 06/10] glge driver: rename internal SEM_SET macro to SEM_INIT

2012-10-15 Thread Stanislav Kinsbursky
The reason for shit patch is that SET_SET is desired to be a part of new part of API of IPC sys_semctl() system call. The name itself for IPC is quite natural, because all linux-specific commands names for IPC system calls are originally created by replacing "IPC_" part by "SEM_"("MSG_", "SHM_")

[PATCH v6 09/10] IPC: message queue copy feature introduced

2012-10-15 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/uapi/linux/msg.h |1 + ipc/msg.c| 50 -- ipc/msgutil.c| 38

[PATCH v6 10/10] test: IPC message queue copy feture test

2012-10-15 Thread Stanislav Kinsbursky
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). --- tools/testing/selftests/ipc/Makefile | 28 tools/testing/selftests/ipc/msgque.c | 251 ++ 2 files changed, 279 insertions(+),

[PATCH v6 08/10] IPC: message queue receive cleanup

2012-10-15 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 --- include/linux/msg.h |5 +++-- ipc/compat.c| 36 +++- ipc/msg.c

[PATCH v6 00/10] IPC: checkpoint/restore in userspace enhancements

2012-10-15 Thread Stanislav Kinsbursky
er problem was to peek messages from queues without deleting them. This was achived by introducing of new MSG_COPY flag for sys_msgrcv(). If MSG_COPY flag is set, then msgtyp is interpreted as message number. The following series implements... --- Stanislav Kinsbursky (10): ipc: remove forced

[PATCH v6 04/10] ipc: add new SHM_SET command for sys_shmctl() call

2012-10-15 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 --- include/uapi

[PATCH v6 07/10] ipc: add new SEM_SET command for sys_semctl() call

2012-10-15 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 --- include/uapi

<    1   2   3   4   5   6   7   8   >