- 21 Jan, 2013 3 commits
-
-
Andrey Vagin authored
In this case they will be executed in other name-spaces. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
This patch can be committed instead of: [PATCH 1/6] cr-dump: move parasite_drain_fds_seized out of dump_task_files [PATCH 2/6] cr-dump: fix dumping file locks in a mount namespace readlink is not required here and a file can be unavailable, if a process is in another mnt namespace Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
On glibc-2.16 I'm getting | sched_prio00.c: In function ‘main’: | sched_prio00.c:48:3: error: implicit declaration of function ‘setpriority’ [-Werror=implicit-function-declaration] | sched_prio00.c:48:19: error: ‘PRIO_PROCESS’ undeclared (first use in this function) | sched_prio00.c:48:19: note: each undeclared identifier is reported only once for each function it appears in | sched_prio00.c:60:3: error: implicit declaration of function ‘getpriority’ [-Werror=implicit-function-declaration] fix it adding headers needed. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 18 Jan, 2013 20 commits
-
-
Pavel Emelyanov authored
When we've read all pstree-items and their ids we can get the desired clone-flags early and avoid all these dances with flag calculations in fork_with_pid and company. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Helpers don't have any IDs on board and thus checks for "is my X shared with parent" will be wrong. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
In old images we had no clue whether the root task is to be created in new namespaces. Remember using the --namespaces option for explicitl specification of this fact. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It's no longer required to use this option -- two currently supported cases (tasks on host and tasks in containers) can be detected automatically. Keep this option for future. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Introduce the current_ns_mask variable, that collects info about which namespaces tasks being dumped and to be restored live in. For simlicity all tasks are supposed to live in one set of spaces. This should be fixed eventually. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It's required to know whether the root task lives in namespaces very very early (e.g. -- to lock the network properly). Thus we have to collect task IDs right at the time we collect the tasks themselves. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
On restore we'll need to know whether the root task should be cloned in new set of namespaces. It's natural to do it by comparing root ids with some "other-world" IDs. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The recent kernels allow to get namespaces IDs by reading proc-ns links. Use this to generate IDs for tasks' namespaces (I do generate them, since IDs provided by kernel look ugly :( ). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
These functions are designated to convert a native pointer to uint64_t used to store a virtual address in protobuf messages and vice versa in a machine-independent way. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The patch reverts the commit 58064d9b. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
If a task executes a non-userspace code (that sometimes takes place on ARM) while being seized the subsequent infection with the syscall blob fails because ptrace fails to write to the VMA the PC is in. The patch modifies the function get_vma_by_ip() to check the PC of the task being seized is below the TASK_SIZE boundary. If the check fails the first suitable VMA is infected. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
This patch prevents compilation warnings about shift overflow on ARM. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The macro specifies the size of the machine pointer explicitly. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
This patch fixes format strings in newly added code. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Jan, 2013 15 commits
-
-
Cyrill Gorcunov authored
Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kinsbursky Stanislav authored
This part was lost after update to "sysctl" interface for IPC object ID specifying (previous, currently obsolete, interface was able to pass proper credentials with KEY change) . Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kinsbursky Stanislav authored
Signed-off: Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Oracle has such mappings. v2: add check, that a file is a character device Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
We check shared lock, exclusive lock and mandatory-read lock for flock file locks. After restore, by parsing /proc/locks file, we check if the process holds the same file locks as it was dumped. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
We check read lock and write lock for posix file locks. After restore, we use fcntl(fd, F_GETLK, &lock), to see if the file is hold the same lock as it was dumped. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
According to the file lock information from the image, we recall flock or fcntl with proper parameters, so we can rehold the file locks as we were dumped. We only support flock and posix file locks so far. Changelog since the initial version: a. Use prepare_file_locks instead of restore function directly. b. Fix some bugs. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
Dump file locks' necessary entries to the image, we only support flock and posix file lock right now. Changelog since the initial version: We got file lock info from global list, so the dump_task_file_locks can be much simpler. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
We collect all file locks to a golbal list, so we can use them easily in dump_one_task. For optimizaton, we only collect file locks hold by tasks in the pstree. Thanks to the ptrace-seize machanism, we can aviod the blocked file lock issue, makes the work simpler. Right now, the check handles only one situation: -- Dumping tasks with file locks hold without the -l option. This covers for the most part. But we still need some more work to make it perfect robust in the future. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
Sometimes, when we parse some global info files, we can only care about tasks which are taken into dump(such as file locks), which means their pids are in the pstree. So a function like this would be help. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
Some contents needed by filelock's image. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
Add a callback for filelock's image show. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
We need a new protobuf description for file-lock. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Qiang Huang authored
Add --file-locks/-l option to support handling file locks, for safety, only used for container. Originally-signed-off-by:
Zheng Gu <cengku.gu@huawei.com> Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 16 Jan, 2013 2 commits
-
-
Alexander Kartashov authored
This workarounds a compilation warning on ARM: packet-sock.pb-c.c: In function 'packet_sock_entry__init': packet-sock.pb-c.c:98:3: error: this decimal constant is unsigned only in ISO C90 [-Werror] packet-sock.pb-c.c: At top level: packet-sock.pb-c.c:318:1: error: this decimal constant is unsigned only in ISO C90 [-Werror] Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
This patch replaces the format specifier %ld with PRIx64 in the following places: * the format string argument of the functions scanf() and printf(), * in the macros GEN_SYSCTL_*_FUNC. We need explicit specification of the integer size there. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-