From df497f2b883c62e7461cd6e91694009fdfab58a5 Mon Sep 17 00:00:00 2001 From: Vladislav Khmelevsky Date: Tue, 20 Jun 2023 13:34:27 +0400 Subject: [PATCH] vma: Add !VVAR condition to vma_entry_can_be_lazy Currently most of the times we don't have problems with VVAR segment and lazy restore because when VDSO is parked there is an munmap call that calls UFFDIO_UNREGISTER on the destination address. But we don't want to enable userfaultfd for VDSO and VVAR at the first place. --- criu/include/vma.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/criu/include/vma.h b/criu/include/vma.h index 106c56af26..4b663ee500 100644 --- a/criu/include/vma.h +++ b/criu/include/vma.h @@ -122,8 +122,8 @@ static inline struct vma_area *vma_next(struct vma_area *vma) static inline bool vma_entry_can_be_lazy(VmaEntry *e) { return ((e->flags & MAP_ANONYMOUS) && (e->flags & MAP_PRIVATE) && !(e->flags & MAP_LOCKED) && - !(vma_entry_is(e, VMA_AREA_VDSO)) && !(vma_entry_is(e, VMA_AREA_VSYSCALL)) && - !(e->flags & MAP_HUGETLB)); + !(vma_entry_is(e, VMA_AREA_VDSO)) && !(vma_entry_is(e, VMA_AREA_VVAR)) && + !(vma_entry_is(e, VMA_AREA_VSYSCALL)) && !(e->flags & MAP_HUGETLB)); } #endif /* __CR_VMA_H__ */