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:Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
Showing
Please
register
or
sign in
to comment