tmpfs: use the --one-file-system option for dumping tmpfs with help tar

Actully for dumping tmpfs it should be remounted to somewhere else to
avoid overmounts.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cr: determine the version of the ARM architecture of the target machine

This patch modifies the build system to analyze the version
of the target ARM architecture and setup the compiler flags
accordingly. This makes it possible to support the ARM
architectures prior to ARMv7.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
arm: added the ARMv6 data barrier implementation

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
arm: refactor the syscall glue to support ARMv6

This patch modifies the ARM syscall glue as follows:

* the macros syscallX that produce different code
  for syscalls with different number of arguments
  are replaced by the generic syscall thunk copied
  from libc;

* the syscall tables generation script is simplified
  since the syscall argument number analysis is redundant;

* the ARMv7 specific instruction MOVW is eliminated.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
arm: moved the mincore syscall description

The description of the syscall mincore breaks
the traditional ordering of syscall descriptions.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Move dump_task_mm out of dump_task_core

Mm used to be in code, so the call was left in that place.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Remove unused arg from dump_task_core_all

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Factor out thread_core dumping

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
protobuf: Add thread_sas_entry

Will need it to store thread alternative signal stack.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pstree: Allocate and free sas entry

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Add dumping of alternative signal stack

[alekskartashov@: use encode_pointer]
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
restore: Add restoration of alternative signal stack

To restore SAS we have two ways:
- call for sigaltstack explicitly in restorer.c right before we call for sigreturn
- pass stack value to sigreturn call and allow the kernel to restore stack for us

Since second way is a simplier one -- we stick with it.

[alekskartashov@: use RT_SIGFRAME_UC]
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>