Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926AbdFUQWz (ORCPT ); Wed, 21 Jun 2017 12:22:55 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:32897 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752640AbdFUQWx (ORCPT ); Wed, 21 Jun 2017 12:22:53 -0400 Date: Wed, 21 Jun 2017 18:22:56 +0300 From: Cyrill Gorcunov To: Hugh Dickins Cc: Andrey Vagin , LKML , Pavel Emelyanov , Dmitry Safonov , Andrew Morton , Oleg Nesterov Subject: Re: [criu] 1M guard page ruined restore Message-ID: <20170621152256.GC31050@uranus> References: <20170620075206.GB1909@uranus.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1506 Lines: 53 On Tue, Jun 20, 2017 at 03:23:20AM -0700, Hugh Dickins wrote: ... > > We do need to understand this fairly quickly, since those stable > backports will pose more of a problem for you than the v4.12 > release itself. The patches for criu are on the fly. Still one of the test case start failing with the new kernels. Basically the test does the following: - allocate growsdown memory area - touch first byte (which before the patch force the kernel to extend the stack allocating new page) - touch first-1 byte --- int main(int argc, char **argv) { char *start_addr, *start_addr1, *fake_grow_down, *test_addr, *grow_down; volatile char *p; start_addr = mmap(NULL, PAGE_SIZE * 10, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); if (start_addr == MAP_FAILED) { printf("Can't mal a new region"); return 1; } printf("start_addr %lx\n", start_addr); munmap(start_addr, PAGE_SIZE * 10); fake_grow_down = mmap(start_addr + PAGE_SIZE * 5, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED | MAP_GROWSDOWN, -1, 0); if (fake_grow_down == MAP_FAILED) { printf("Can't mal a new region"); return 1; } printf("start_addr %lx\n", fake_grow_down); p = fake_grow_down; *p-- = 'c'; *p = 'b'; ... } --- This start failing because | static inline int check_stack_guard_page(struct vm_area_struct *vma, unsigned long address) function get dropped off. Hugh, it is done on intent and userspace programs have to extend stack manually? Cyrill