2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 23:05:39 +00:00

Pass task_size to vma_area_is_private()

If we want one CRIU binary to work across all AArch64 kernel
configurations, a single task size value cannot be hard coded. Since
vma_area_is_private() is used by both restorer blob code and non
restorer blob code, which must use different variables for recording
the task size, make task_size a function argument and modify the call
sites accordingly. This fixes the following error on AArch64 kernels
with CONFIG_ARM64_64K_PAGES=y.

  pie: Error (pie/restorer.c:929): Can't restore 0x3ffb7e70000 mapping w>
  pie: ith 0xfffffffffffffff7

Signed-off-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Christopher Covington
2015-07-31 10:36:26 -04:00
committed by Pavel Emelyanov
parent 7451fc7d23
commit 1438f013a2
5 changed files with 18 additions and 16 deletions

View File

@@ -473,7 +473,7 @@ static int vma_list_add(struct vma_area *vma_area,
list_add_tail(&vma_area->list, &vma_area_list->h);
vma_area_list->nr++;
if (vma_area_is_private(vma_area)) {
if (vma_area_is_private(vma_area, kdat.task_size)) {
unsigned long pages;
pages = vma_area_len(vma_area) / PAGE_SIZE;