• Andrey Vagin's avatar
    mm: taking into account a gurad page to find a space for a restorer vma · c627c037
    Andrey Vagin authored
    Actually a gurad page is a part of a stack vma and we don't want to remap
    it by a restorer vma.
    
    The crtools on restore find a place for a restorer vma, which will not
    intersect with other VMAs. A guard page is a part of a stack VMA, if
    we don't take into account it, we can place the restorer VMA on it and
    that case is a bug.
    
    Would not this lead to situation where we expand stack manually? Every new
    c/r cycle add one page to the bottom of stack, no? No:
    
    strace:
    mmap(0x5f4d0e0cc000, 4096, PROT_READ|PROT_WRITE,
    MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|MAP_GROWSDOWN, -1, 0) =
    0x5f4d0e0cc000
    
    /proc/PID/maps:
    5f4d0e0cd000-5f4d0e0cd000 rw-p 00000000 00:00 0
    .
    Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    c627c037
util.c 6.95 KB