mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 01:59:04 +00:00
restorer: Setup task data via prctl
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
566a900e4e
commit
73e64bec27
1 changed files with 12 additions and 0 deletions
12
restorer.c
12
restorer.c
|
|
@ -315,6 +315,18 @@ self_len_end:
|
|||
|
||||
sys_close(fd_core);
|
||||
|
||||
/*
|
||||
* Tune up the task fields.
|
||||
*/
|
||||
sys_prctl(PR_SET_NAME, (long)core_entry.task_comm, 0, 0, 0);
|
||||
sys_prctl(PR_CKPT_CTL, PR_CKPT_CTL_SET_MM_START_CODE, (long)core_entry.mm_start_code, 0, 0);
|
||||
sys_prctl(PR_CKPT_CTL, PR_CKPT_CTL_SET_MM_END_CODE, (long)core_entry.mm_end_code, 0, 0);
|
||||
sys_prctl(PR_CKPT_CTL, PR_CKPT_CTL_SET_MM_START_DATA, (long)core_entry.mm_start_data, 0, 0);
|
||||
sys_prctl(PR_CKPT_CTL, PR_CKPT_CTL_SET_MM_END_DATA, (long)core_entry.mm_end_data, 0, 0);
|
||||
sys_prctl(PR_CKPT_CTL, PR_CKPT_CTL_SET_MM_START_STACK, (long)core_entry.mm_start_stack, 0, 0);
|
||||
sys_prctl(PR_CKPT_CTL, PR_CKPT_CTL_SET_MM_START_BRK, (long)core_entry.mm_start_brk, 0, 0);
|
||||
sys_prctl(PR_CKPT_CTL, PR_CKPT_CTL_SET_MM_BRK, (long)core_entry.mm_brk, 0, 0);
|
||||
|
||||
/*
|
||||
* We need to prepare a valid sigframe here, so
|
||||
* after sigreturn the kernel will pick up the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue