- 19 Dec, 2011 7 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Not a clean solution yet. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This as well implies we change paths to PATH_MAX size. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It might contain working directory path as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Better to have global vars gathered. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com>
-
- 16 Dec, 2011 3 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 13 Dec, 2011 3 commits
-
-
Cyrill Gorcunov authored
getcwd returns NULL on error, fix it. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
We have a mess in our return codes: some functions return negative values, while others -- positive. Sanitize the return codes and make error condition to return negative values. Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 10 Dec, 2011 1 commit
-
-
Cyrill Gorcunov authored
pr_perror is not the same as perror and requires new line at then end. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 09 Dec, 2011 9 commits
-
-
Andrey Vagin authored
Otherwise it may begin to restore a parent objects... 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
For this reason a function may return success in case of error. 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>
-
Andrey Vagin authored
1. pipe() returns two descriptors with numbers (r: x, w: y). We may want to restore it as (r: y, w: x). 2. Close a extra end, before try to restore a target end. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Stage structures in one place. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Even u64 address might consume not greater than 20 bytes of string so 128 is enough and safe here. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
If a process continue to run, it may change a state of filesystem. @gorcunov: - Drop -k option, it's not needed anymore. - Allow -c option (continue execution of a process after being dumped) in dumping procedure. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
If you execute this script without arguments, it will execute all test cases, which should pass. Or the first argument may be a path to the test case. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 08 Dec, 2011 4 commits
-
-
Cyrill Gorcunov authored
Since we use pure syscalls there is no need to keep intermediate layer for signals. Moreover mask entry moved at the end of the structure so we will easily expand it if it'll be ever needed. Note it breaks backward compatibility with older image but since it's development stage it should be safe. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@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
Probably all of you know about "lock inversion". There was a similar problem on restoring pipes. One process try to restore pipe1 and waits when another process attached to it. In this time another process restores pipe2 and waits too. I know two solves. 1. Open all pipes -> attach to them -> close unnecessary ends. This method has a problem, if only one end belongs to the process. In this cases another end occupies a descriptor, which may be needed to another pipe. 2. Restore pipes in the same order. This patch does that. A sorted list of pipe entries are constructed. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
This patch removed stange logic about minusers. Now we calculate foreign users only. The main idea of this patch, that we bind a pipe ends to correct descriptos immediately. When a process X creates a pipe, we have two cases: 1. Both ends belongs to this process. It's simple, we bind both ends to their descriptors and we go further. 2. Only one end of a pipe belongs to this process. In this case we are waiting all foreign users and we go futher. In second case we should wait, because a end which doesn't belong to this process occupies a file descriptor, which may be used by another pipe. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 07 Dec, 2011 2 commits
-
-
Andrey Vagin authored
CWD is saved as file descriptor with number -1. v2: use dump_regular_file 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
Now I try to restore CWD and a relative path will be invalid. Add new options -D to set image files directory. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 06 Dec, 2011 1 commit
-
-
Andrey Vagin authored
Probably all of you know about "lock inversion". We have a similar problem on restoring pipes. This test case creates two process and two pipes. process 1: 11: pipe1 (w) 12: pipe2 (r) process 2: 11: pipe2 (r) 12: pipe1 (w) Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 05 Dec, 2011 8 commits
-
-
Cyrill Gorcunov authored
There is no such file at all and it forced build process to re-build every make command passed. Reported-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
It's already in OBJS Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Added - ability to parse every single file crtools understands via magic number - dumped memory pages can be rendered in two modes -- as a simple set of pages' virtual addresses or in hexdummp fashion (via -c command line key). For example ./crtools -s -c -f pages-2557.img CR_FD_PAGES: pages-2557.img ---------------------------------------- 7fffb44ace20: 00 00 00 00 00 00 00 00 00 00 00 74 65 73 74 2f |. . . . . . . . . . . t e s t / | 7fffb44ace30: 74 65 73 74 2d 73 69 67 61 63 74 69 6f 6e 00 48 |t e s t - s i g a c t i o n . H | 7fffb44ace40: 4f 53 54 4e 41 4d 45 3d 6c 6f 63 61 6c 68 6f 73 |O S T N A M E = l o c a l h o s | 7fffb44ace50: 74 2e 6c 6f 63 61 6c 64 6f 6d 61 69 6e 00 54 45 |t . l o c a l d o m a i n . T E | Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
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>
-
Andrey Vagin authored
The standard descriptors may be redirected. crtool dumplicates stderr in rlimit.maxfileno-1 and this descriptor is inherited by all children and will be closed before sigreturn. Known issues: - The logging descriptor may be used by a target process and a resume will fail. 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
Many programs use stdout for transferring data. v2: remove debug code Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 03 Dec, 2011 1 commit
-
-
Cyrill Gorcunov authored
Since we operate with syscalls directly we are to convert signal's structures between image and kernel formats, without intermediate glibc layer. Note this involves chaging sa_entry::flags to u64 (since it's long int value in kernel). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 02 Dec, 2011 1 commit
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-