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.
This commit is contained in:
Vladislav Khmelevsky 2023-06-20 13:34:27 +04:00 committed by Andrei Vagin
parent 1e4f5fb2b6
commit 4f0c07fd54

View file

@ -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__ */