zdtm: Update proc-self test

The link must be read after restore on original
file descriptor since namespace id do change between
c/r sessions.

https://bugzilla.openvz.org/show_bug.cgi?id=2599

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
proc: add vma_area in a list after parsing all parameters

The size of vma can be changed after parsing flags. For example we need
to add a guard page for vma with MAP_GROWSDOWN.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
proc: use vma flags for determing vmas with MAP_GROWSDOWN

When a kernel didn't show vma flags, we set MAP_GROWSDOWN for stack
vmas, but it's not reliable. E.g. thread stacks are mapped without
MAP_GROWSDOWN.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
page-server: Add daemonize call return check

On ubuntu this don't compile if no check.

Signed-off-by: Pavel Tikhomirov <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
zdtm: use a current stack for preccesses created by clone()

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ipc_ns: allocate enough memrory for the buffer

==22653== Syscall param read(buf) points to unaddressable byte(s)
==22653==    at 0x50480B0: __read_nocancel (in /usr/lib64/libpthread-2.17.so)
==22653==    by 0x40CF7C: parasite_dump_pages_seized (mem.c:244)
==22653==    by 0x41681D: cr_dump_tasks (cr-dump.c:1533)
==22653==    by 0x40448C: main (crtools.c:309)

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>