Merge arch/*/vdso.c files in vdso.c.
The merge has been done by copying arch/x86/vdso.c in vdso.c since it
contains patch a67e9f7bb930 ("vdso: don't play with a function exit code").
The commit f9ae6d9dd4e4 ("Replace remaining hard-coded TASK_SIZE use")
pushed in the aarch64 has been replicated since it should be cross
platform.
CC: Christopher Covington <cov@codeaurora.org>
CC: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
When building without the vDSO support on PowerPC (which is not a good
idea), the build is failing because few files are not included in the
build.
This fix moves those files inclusion outside of the vDSO directive.
CC: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
In ubuntu wily, these paths are inotify'd by various daemons, so we should
watch them as well.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
In commit 664659a0 we defined max possible
values for TCP queues but on low memory
machines (or on machinese whith custom limits
set via sysctl) this trick doesn't work well
all the time. We have to fetch the allowed values
from /proc/sys/net/ipv4/tcp_[wmem|rmem] which
might be simply missing on the environment
we run.
So lets stick with really small values here
got from kernel source code so instead of failing
we would be able to restore in a bit "slower"
than usual.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The function is too big and @p is too short.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We have quite a lot of new stuff this time. More flexibility
in cgroup management code (and this story far from being over)
in the library and in the crit command line, preparations to
x66 32bit, that also helped the PPC port, freezer cgroup
filannly found its place in the code. We also had our first
CVE-s found :) and a LOT of bugs fixed.
So the plan for the 1.8 is: cgroups, secured containers and
bugfixes. x86 32bit is tempting too.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Travis testing engine complained about @_BSD_SOURCE
which is not the case on my build environment.
Anyway lets do a safe thing -- conditional definition.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
BTRFS uses own device numbering scheme so lets do a trick
close one to what we have in CRIU itself -- mangle
device to match mountinfo output.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
In particular we have to find out if we're
running on btrfs filesystem for proper device
number mangling.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Currently the buffer size is 4096. It always works because
we use hosts where PAGE_SIZE is 4096. PowerPC64 has a bigger PAGE_SIZE.
Here is a comment from the kernel code.
/*
* skb should fit one page. This choice is good for headerless malloc.
* But we should limit to 8K so that userspace does not have to
* use enormous buffer sizes on recvmsg() calls just to avoid
* MSG_TRUNC when PAGE_SIZE is very large.
*/
We set the buffer size to 16384, because it's the max length of recvmsg()
for this case. We will need less iterations to collect all data, so
the perfomance should be better.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It lookups over shared entries and finds widest.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
- make sure it doesn't exist using O_EXCL
- don't forget to close it
Reported-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
1) Deleted bindmount for files should be restored
by creating temp file. The kernel doesn't permit
to mix bindmount in terms of file/dir relationship:
either both source and target should be files or
directories.
Thus we can call stat on the target and figure out
what kind of source we had.
2) Even for deleted entries better to use permissions
from the target's stat call, this makes result close
to how would it look if program hadn't been checkpointed.
Reported-by: Andrey Wagin <avagin@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The commit 69d008d56788 ("Use run-time page_size() for mremap")
introduces the use of dynamic page size in rst-malloc.c.
The commit also add the include of unistd.h in
arch/aarch64/include/asm/page.h to allow the build to succeed on this
architecture. Since ppc64 is also using the same way to deal with page
size, the same include is required in arch/ppc64/include/asm/page.h
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
CC: Christopher Covington <cov@codeaurora.org>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
To handle deleted bindmounts we simply create
the former directory bindmount lived at, mount
the target and remove the directory back.
For this sake we add @deleted entry into the image.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Make it handle both postfixes and return
non-zero code if stipping happened.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The main reason is to execute tests without a control termnal and avoid
a case when tests try to use the --shell-job options.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Useless, at least in the form present
now it's unreadable anyway. So stop
welling out the logs.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The main purpose of this patch is to add OverlayFS support to docker_cr.sh
for external checkpoint and restore. It also does a bit of cleaning
and minor enhancements.
Signed-off-by: Saied Kazemi <saied@google.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>