[CRIU] [PATCH] criu: cgroup -- Don't use PAGE_SIZE inside parasite args
Cyrill Gorcunov
gorcunov at gmail.com
Thu Feb 25 08:03:09 PST 2016
On Thu, Feb 25, 2016 at 08:43:29AM -0700, Tycho Andersen wrote:
> On Thu, Feb 25, 2016 at 10:18:30AM +0300, Cyrill Gorcunov wrote:
> > This cause problem on ppc64
> >
> > | gcc -c -O2 -g -Wall -Werror -DCONFIG_PPC64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
> > | -fno-strict-aliasing -iquote /home/cyrill/criu/criu/include -iquote /home/cyrill/criu/images
> > | -iquote /home/cyrill/criu/criu/pie -iquote /home/cyrill/criu/criu/arch/ppc64
> > | -iquote /home/cyrill/criu/criu/arch/ppc64/include -iquote /home/cyrill/criu/ -I/usr/include/libnl3
> > | -iquote ppc64 -DCONFIG_PPC64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE parasite-syscall.c -o parasite-syscall.o
> > | parasite-syscall.c: In function ‘parasite_dump_cgroup’:
> > | parasite-syscall.c:1283:2: error: size of unnamed array is negative
> > | ca = parasite_args(ctl, struct parasite_dump_cgroup_args);
> > | ^
> > | /home/cyrill/criu/scripts/nmk/scripts/rules.mk:53: recipe for target 'parasite-syscall.o' failed
> >
> > Just use size parasite known to support.
> >
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
>
> Acked-by: Tycho Andersen <tycho.andersen at canonical.com>
>
> Just for my own education, I thought we always transferred PAGE_SIZE
> number of bytes across for the parasite blob args. If PAGE_SIZE <
> PARASITE_ARG_SIZE_MIN, how does that work?
In turn in the scenario above the page size is greater than 4K, which
lead the bug-on to trigger. Strictly speaking we calculate the area
nedede for parasite arguments during its preparation and it's assumed
that it won't be that big, so the bug-on is rather a note for us that
we potentially doing something wrong if requireing more that 4K for
arguments. We indeed requires memory with
parasite_mmap_exchange
...
ctl->map_length = round_up(size, page_size());
but this is cummulative size of blob itself together with arguments.
That said the only true size used for arguments are PARASITE_ARG_SIZE_MIN,
which is exactly 4k and don't depend on page size.
Something like that.
More information about the CRIU
mailing list