- 29 Feb, 2012 8 commits
-
-
Kinsbursky Stanislav authored
Based on xemul@ patches. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
Based on xemul@ patches. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
Based on xemul@ patches. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
This patch was designed to be generic and thus usable for all kinds of sockets. Not sure, thah this goal has been reached, but at least I tried. Key ideas: 1) sockets queue dump file have to be readed first and then packets entries with offset for it's data in image will be collected in doubly linked list by read_sockets_queue() function. Note: list will contain sockets queues for all (!) the sockets of the task. 2) socket queue can be restored by restore_socket_queue(), which selects packets from the list by passed id and use sendfile() top send them to the passed socket. It also removes packet from the list and frees it. Based on xemul@ patches. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
This patch was designed to be generic and thus usable for all kinds of sockets. Not sure, thah this goal has been reached, but at least I tried. Key ideas: 1) On-stack structure for collecting sockets queues and then passing them to parasite code. 2) Singly linked list is used for collecting structures, representing sockets of any kind (!) with queues. Based on xemul@ patches. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
This patch adds sockets queue dump functionality. Key ideas 1) sockets info is passed as plain array in parasite args. 2) new socket option SO_PEEK_OFF with MSG_PEEK is used to read the get the queue's packets. 3) Buffer for packet will be allocated for each socket separately and with size of socket sending buffer. For stream sockets is means, that it's queue will be dumped in chunks of this size. Note: loop around sys_msgrcv() is required for DGRAM sockets - sys_msgrcv() with MSG_PEEK will return only one packet. Based on xemul@ patches. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
This test is based on original version by xemul@ - second message to queue added. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
This is a cleanup patch. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 28 Feb, 2012 14 commits
-
-
Kinsbursky Stanislav authored
Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
We switch generic-object-id concept with sys_kcmp approach, which implies changes of image format a bit (and since it's early time for project overall, we're allowed to). In short -- previously every file descriptor had an ID generated by a kernel and exported via procfs. If the appropriate file descriptors were the same objects in kernel memory -- the IDs did match up to bit. It allows us to figure out which files were actually the identical ones and should be restored in a special way. Once sys_kcmp system call was merged into the kernel, we've got a new opprotunity -- to use this syscall instead. The syscall basically compares kernel objects and returns ordered results suitable for objects sorting in a userspace. For us it means -- we treat every file descriptor as a combination of 'genid' and 'subid'. While 'genid' serves for fast comparison between fds, the 'subid' is kind of a second key, which guarantees uniqueness of genid+subid tuple over all file descritors found in a process (or group of processes). To be able to find and dump file descriptors in a single pass we collect every fd into a global rbtree, where (!) each node might become a root for a subtree as well. The main tree carries only non-equal genid. If we find genid which is already in tree, we need to make sure that it's either indeed a duplicate or not. For this we use sys_kcmp syscall and if we find that file descriptors are different -- we simply put new fd into a subtree. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This function simply allocates shared memory. Name it so and move it closer to the variables it referes on. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The function has nothing to do with "pop" operation, it rather "pull"s descriptor out of list. Name it so. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Having them in the header file will allow to share these structures with other callers. Moreover, this is a good practice to have definition(s) in header file until otherwise really needed. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will be needed for file-ids handling. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Though we can use libc's syscall() wrapper I would prefer to have own implementation in case if we will need it in non-libc bindable code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kinsbursky Stanislav authored
1) Use macro for defining size mapped size. 2) Allow to allocate all space (including the last byte). Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> [gorcunov@: MAX_BUF_SIZE tuneup, don't use ops without braces)] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
Current heap has 10 MB free space. It should be enough. Otherwise something broken by design.. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
Stack heap size is probably small for dumping unix sockest skb's (it's hard to discover, how big it could be; thus let's assume that 10MB is enough, otherwise give up and throw error). So let' replace this stack heap wil 10 MB anonimous private mapping. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 27 Feb, 2012 1 commit
-
-
Kinsbursky Stanislav authored
Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 22 Feb, 2012 4 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Socket address is being generated with this function, name it so. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 21 Feb, 2012 2 commits
-
-
Kinsbursky Stanislav authored
1) Added few missed successfull status setup - this looks redundant though, but unified with other functions. 2) remove redundant argument in dump_pages_fini(). Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
v2: it's toom risky to jump to address equal to line numbet (there could be valid executable code). So now jump is done to 0 address and %sp encodes line number (32 most significant bits) and error code (32 least significant bits). There is a race between log close by process being restoring and opened file desctriptors check in zdtm test suite - crtools can exit and compare file descriptors before detached restored process will perform all the rest tasks (including close of the log) and execute final system call: |--- dump/sleeping00/8578/dump.fd 2012-02-20 14:31:31.246096000 +0300 |+++ dump/sleeping00/8578/restore.fd 2012-02-20 14:31:31.418095999 +0300 |@@ -1,4 +1,5 @@ | | 0 -> /dev/null | 1 -> /dev/null |+1023 -> /root/crtools/test/dump/sleeping00/8578/restore.log | 2 -> /dev/null The solution is to close log in restorer before final command received. But this leads to another problem: we have to inform somehow about possible errors afterwards This is done by forced segmentation fault and looks like this (dmesg): pipe00[4678]: segfault at 0 ip 00007f4c8ab77d02 sp 000002ed00000001 error 4 Where %sp encodes line number (32 most significant bits) and error code (32 least significant bits). Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 20 Feb, 2012 11 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
It's already closed in restore_mapping, just an unapplied patch snippet from 389bd830Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Kinsbursky Stanislav authored
Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
In case if time is modified in ls -l output we should not treat it as error, interrupting zdtm work -lrwx------ 1 root root 64 Feb 17 14:52 0 -> /dev/null -lrwx------ 1 root root 64 Feb 17 14:52 1 -> /dev/null -lrwx------ 1 root root 64 Feb 17 14:52 2 -> /dev/null +lrwx------ 1 root root 64 Feb 17 14:53 0 -> /dev/null +lrwx------ 1 root root 64 Feb 17 14:53 1 -> /dev/null +lrwx------ 1 root root 64 Feb 17 14:53 2 -> /dev/null Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
They are redundant, and simply overlog the output Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This is a place where they should belong to. util.c is too big already. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Don't forget to close opened file in case of error. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
map_files format defined as %lx-%lx in kernel and while there should not be a problem if it's written in %p-%p, still better to be on a safe side and follow kernel's notation. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The ptrace seize doesn't prevent signals from delivery. That said, we should block the signals in the target task before dumping anything which is signals-related, i.e. memory and registers. But once we've blocked signals, we should dump registers before unblocking them, since any postponed signal will screw things up. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-