Commit 73e64bec authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

restorer: Setup task data via prctl

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 566a900e
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment