Skip to content
Commit 85adb786 authored by Pavel Emelyanov's avatar Pavel Emelyanov
Browse files

restore: Allocate task and threads args from rst-malloc



These two objects are actually needed at the very early stages of
restore, much earlier than they are actually allocated. To make
life nicer, let's allocate args from private rst mem, it will get
remapped into restorer blob automatically.

The new memory layout then is

  | restorer code | memzone (stacks and sigframes) | arguments |

The last area is unmapped at the very end of restorer code. Also
this gives the opportunity not to copy many bits betweek static
variables and task-args, but put them directly into args. All the
next patches are about it.

Also the sigreturn_restore() is now stuffed with preparatory code
and is quite big. When new "restoring" is added it's confusing at
which place in the code it should be inserted. This patch makes
a clear distinction -- the sigreturn_restore() is __only__ about
remapping the memory into restorer blob and jumping into it. All
the rest should go into restore_one_alive_task().

Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
Reviewed-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 3d9fc867
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment