Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205AbdFURQA (ORCPT ); Wed, 21 Jun 2017 13:16:00 -0400 Received: from mail-db5eur01on0099.outbound.protection.outlook.com ([104.47.2.99]:33162 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752717AbdFURP4 (ORCPT ); Wed, 21 Jun 2017 13:15:56 -0400 Authentication-Results: virtuozzo.com; dkim=none (message not signed) header.d=none;virtuozzo.com; dmarc=none action=none header.from=virtuozzo.com; Subject: Re: [criu] 1M guard page ruined restore To: Oleg Nesterov , Cyrill Gorcunov Cc: Hugh Dickins , Andrey Vagin , LKML , Pavel Emelyanov , Andrew Morton , Adrian Reber References: <20170620075206.GB1909@uranus.lan> <20170621152256.GC31050@uranus> <20170621155730.GA32554@redhat.com> <20170621160410.GF31050@uranus> <20170621170129.GA32752@redhat.com> From: Dmitry Safonov Message-ID: Date: Wed, 21 Jun 2017 20:15:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170621170129.GA32752@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: SIXPR04CA0022.apcprd04.prod.outlook.com (2a01:111:e400:51e5::12) To DB6PR0801MB1734.eurprd08.prod.outlook.com (2603:10a6:4:3a::21) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB6PR0801MB1734: X-MS-Office365-Filtering-Correlation-Id: ceba05f0-ca8a-44f1-7b0e-08d4b8c92c51 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:DB6PR0801MB1734; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1734;3:KPYnOhl37m1Skni1RggVW6JYdQiFM57X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Uvdsdq4=;20:cCG6z7FBsouREnBjBNuzGM4BsnxR9G1FDvirUYOEe0DEJnQBoDWX1M0vKekXFiE4Aa3m4HwrE3yYHq8apR25phQDe2ReOVxFdiiDjMRYIDafqAeLf5DGgGPbUoT1CDt8C2enHH8jDkZ1cWbH6x+dMDKjU7YMcTYKVE6APYP4brnQmZ/Tt7OffZVcBe9XnHNWp7iLdH4vPJjARqdFF78+FyUGthWUSbGTf5kHFDsCDynrDGGBNUzda2qSC93C9PSRU4u0l54/xzqScxFc1Rq4cV4Z2aL8bdPbQ2hpzUdiM9J1X0Tm1AXvFahRfdfnnnS07N4qF3be/VVgt8RpZbsuRhAPGyi+MJ7i92lytsyxQLvzJcjSH+dnjU3aOghEkg4bFFxE1H9+oVyWZ98KBg42m71VAhm7CV6lLbzi/66+tgU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(100000703101)(100105400095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR0801MB1734;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR0801MB1734; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA4MDFNQjE3MzQ7NDpQUkp6Q1AxQmxpZUlkNGlhU1cxb3RBNEpR?= =?utf-8?B?NnBIV1VaTWN6djdzQ01YdzY3NnZrUGlYSUF5NVpaNi81MnpveFFNTG1xSlA0?= =?utf-8?B?MXJ5Tkc0Vnl2dU9IdDZYelRJMFRSMysvVWNoajlZ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VVxeG1jMGR4TkR5dHFac1RqQmZOYzhYb0crL1lD?= =?utf-8?B?RmphenQyaGo2OUF4b3BoYVpJOHp5eGRuNVVrZEJNakFpWFlrZ0VlVGE1SHNJ?= =?utf-8?B?RmY5OXRuSjlDV2l6TDFTRjQ3WXE3dWVKbzdZZ3VqSGlYWTk5T2ZreXVzVUZu?= =?utf-8?B?ZFRBWjUvSDY5bXJrVzdhc0cwK01qYWlueTdFWGJuMWtValZ2bWdiRUszenRx?= =?utf-8?B?UUg1eHQrNXZwT3pOMEZHRE1hL29YbmNkdDlwYk1sR0YxRmx2dHp5WVhFRVVq?= =?utf-8?B?eVFWNVZoL001cXZadDlJRVdlRUxSSUlXUEJWakora2doNW1VYzZOeFYyVnZW?= =?utf-8?B?ZGlORlJUbFVVczQ5NnA0QXBoZVdWbllEMFlpU2xVYmwzMGlHWmM0c3B5akt3?= =?utf-8?B?MzY3ZGJ2YlorektkamhKQU54L0ZBVTgxM1BJVUxvek9hS3A3RWlDdjE1cVNR?= =?utf-8?Q?Z3Aq9/rK8xJg/igJL2rh4vPd0OcH4KTq4Jfs6oodBYA1pgR?= X-Forefront-PRVS: 0345CFD558 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(6049001)(39400400002)(39410400002)(39450400003)(39840400002)(24454002)(377454003)(8676002)(54356999)(81166006)(76176999)(50986999)(93886004)(47776003)(230700001)(5660300001)(65806001)(478600001)(66066001)(38730400002)(77096006)(25786009)(6246003)(54906002)(6486002)(53936002)(189998001)(4326008)(305945005)(7736002)(6116002)(3846002)(23676002)(36756003)(2950100002)(6666003)(229853002)(4001350100001)(42186005)(31686004)(33646002)(50466002)(31696002)(53546010)(83506001)(86362001)(2906002);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0801MB1734;H:[172.16.24.230];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA4MDFNQjE3MzQ7MjM6cEhK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XCKXFXNteXPPOr4wjdNZTFdDxWrPEs6LvApeI/AWL/LkCUE4E0qll/dMQxTANL/RJebOGWqw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2017 17:15:48.5681 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1734 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2585 Lines: 91 On 06/21/2017 08:01 PM, Oleg Nesterov wrote: > On 06/21, Cyrill Gorcunov wrote: >> >> On Wed, Jun 21, 2017 at 05:57:30PM +0200, Oleg Nesterov wrote: >>>> >>>> p = fake_grow_down; >>>> *p-- = 'c'; >>> >>> I guess this works? I mean, *p-- = 'c' should not fail... >> >> It fails. > > Hmm. Impossible ;) could you add the additional printf's to re-check? > >> Here is the complete code. It supposed to _extend_ stack but it fails >> on the latest master + Hugh's [PATCH] mm: fix new crash in unmapped_area_topdown() >> --- >> [root@fc2 criu]# ~/st2 >> start_addr 7fe6162a8000 >> start_addr 7fe6163d9000 >> Segmentation fault (core dumped) >> --- >> #include >> #include >> #include >> #include >> #include >> #include >> >> #include >> >> #define PAGE_SIZE 4096 >> >> 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 * 512, 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 * 512); >> >> start_addr += PAGE_SIZE * 300; >> >> 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'; > > once again, I can't believe this STORE can fail... > >> *p = 'b'; > > Ah. I forgot about another kernel "feature" ;) not related to the recent guard > page changes... > > Could you test the patch below? Well, for me only the second store caused segfault. With your patch it passes.. > > > diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c > index 8ad91a0..edc5d68 100644 > --- a/arch/x86/mm/fault.c > +++ b/arch/x86/mm/fault.c > @@ -1416,7 +1416,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code, > * and pusha to work. ("enter $65535, $31" pushes > * 32 pointers and then decrements %sp by 65535.) > */ > - if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) { > +if (0) if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) { > bad_area(regs, error_code, address); > return; > } > -- Dmitry