diff --git a/cr-restore.c b/cr-restore.c index cfe36785c..8bf4c5db8 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -2382,6 +2382,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core) task_args->bootstrap_start = bootstrap_start; task_args->bootstrap_len = restore_bootstrap_len; + task_args->vdso_rt_size = vdso_rt_size; /* * Get a reference to shared memory area which is diff --git a/include/restorer.h b/include/restorer.h index 8ba91e08b..3458a5be3 100644 --- a/include/restorer.h +++ b/include/restorer.h @@ -119,6 +119,7 @@ struct task_restore_core_args { void *bootstrap_start; unsigned long bootstrap_len; + unsigned long vdso_rt_size; struct itimerval itimers[3]; diff --git a/pie/restorer.c b/pie/restorer.c index cf4387f94..11d8fd069 100644 --- a/pie/restorer.c +++ b/pie/restorer.c @@ -513,10 +513,11 @@ static void restore_posix_timers(struct task_restore_core_args *args) } static void *bootstrap_start; static unsigned int bootstrap_len; +static unsigned long vdso_rt_size; void __export_unmap(void) { - sys_munmap(bootstrap_start, bootstrap_len); + sys_munmap(bootstrap_start, bootstrap_len - vdso_rt_size); /* * sys_munmap must not return here. The controll process must * trap us on the exit from sys_munmap. @@ -590,6 +591,7 @@ long __export_restore_task(struct task_restore_core_args *args) bootstrap_start = args->bootstrap_start; bootstrap_len = args->bootstrap_len; + vdso_rt_size = args->vdso_rt_size; task_entries = args->task_entries;