mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +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:
parent
7451fc7d23
commit
1438f013a2
5 changed files with 18 additions and 16 deletions
|
|
@ -92,17 +92,19 @@ static inline int in_vma_area(struct vma_area *vma, unsigned long addr)
|
|||
addr < (unsigned long)vma->e->end;
|
||||
}
|
||||
|
||||
static inline bool vma_entry_is_private(VmaEntry *entry)
|
||||
static inline bool vma_entry_is_private(VmaEntry *entry,
|
||||
unsigned long task_size)
|
||||
{
|
||||
return vma_entry_is(entry, VMA_AREA_REGULAR) &&
|
||||
(vma_entry_is(entry, VMA_ANON_PRIVATE) ||
|
||||
vma_entry_is(entry, VMA_FILE_PRIVATE)) &&
|
||||
(entry->end <= TASK_SIZE);
|
||||
(entry->end <= task_size);
|
||||
}
|
||||
|
||||
static inline bool vma_area_is_private(struct vma_area *vma)
|
||||
static inline bool vma_area_is_private(struct vma_area *vma,
|
||||
unsigned long task_size)
|
||||
{
|
||||
return vma_entry_is_private(vma->e);
|
||||
return vma_entry_is_private(vma->e, task_size);
|
||||
}
|
||||
|
||||
#endif /* __CR_VMA_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue