Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751144AbdFVBHk (ORCPT ); Wed, 21 Jun 2017 21:07:40 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:35980 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946AbdFVBHi (ORCPT ); Wed, 21 Jun 2017 21:07:38 -0400 Date: Wed, 21 Jun 2017 18:07:29 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Linus Torvalds cc: Oleg Nesterov , Cyrill Gorcunov , Andrey Vagin , Pavel Emelyanov , Dmitry Safonov , Andrew Morton , Adrian Reber , Michael Kerrisk , Willy Tarreau , Hugh Dickins , kernel test robot , Michal Hocko , LKML , LKP Subject: Re: [lkp-robot] [mm] 1be7107fbe: kernel_BUG_at_mm/mmap.c In-Reply-To: Message-ID: References: <20170621023552.GB32082@yexl-desktop> <20170621193338.GA29222@redhat.com> <20170621202751.GA29638@redhat.com> <20170621205617.GA29841@redhat.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2253 Lines: 56 On Wed, 21 Jun 2017, Linus Torvalds wrote: > On Wed, Jun 21, 2017 at 1:56 PM, Oleg Nesterov wrote: > > > > I understand. My point is that this check was invalidated by stack-guard-page > > a long ago, and this means that we add the user-visible change now. > > Yeah. I guess we could consider it an *old* regression that got fixed, > but if people started relying on the regression... > > >> Do you have a pointer to the report for this regression? I must have missed it. > > > > See http://marc.info/?t=149794523000001&r=1&w=2 > > Ok. > > And thinking about it, while that is a silly test-case, the notion of > "create top-down segment, then start populating it _before_ moving the > stack pointer into it" is actually perfectly valid. > > So I guess checking against the stack pointer is wrong in that case - > at least if the stack pointer isn't inside that vma to begin with. > > So yes, removing that check looks like the right thing to do for now. > > Do you want to send me the patch if you already have a commit message etc? I have a bit of a bad feeling about this. Perhaps it's just sentimental attachment to all those weird and ancient stack pointer checks in arch//fault.c. We have been inconsistent: cris frv m32r m68k microblaze mn10300 openrisc powerpc tile um x86 have such checks, the others don't. So that's a good reason to delete them. But at least at the moment those checks impose some sanity: just a page less than we had imagined for several years. Once we remove them, they cannot go back. Should we now complicate them with an extra page of slop? I'm not entirely persuaded by your pre-population argument: it's perfectly possible to prepare a MAP_GROWSDOWN area with an initial size, that's populated in a normal way, before handing off for stack expansion - isn't it? I'd be interested to hear more about that (redhat internal) bug report that Oleg mentions: whether it gives stronger grounds for making this sudden change than the CRIU testcase. I can go ahead and create a patch if Oleg is not there at the moment - but I might prefer his or your name on it - particularly if we're rushing it in before consulting the arch maintainers whose work we would be deleting. Queasily, Hugh