Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751883AbdFUTjg (ORCPT ); Wed, 21 Jun 2017 15:39:36 -0400 Received: from mail-it0-f53.google.com ([209.85.214.53]:38586 "EHLO mail-it0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038AbdFUTjf (ORCPT ); Wed, 21 Jun 2017 15:39:35 -0400 MIME-Version: 1.0 In-Reply-To: <20170621193338.GA29222@redhat.com> References: <20170621023552.GB32082@yexl-desktop> <20170621193338.GA29222@redhat.com> From: Linus Torvalds Date: Wed, 21 Jun 2017 12:39:33 -0700 X-Google-Sender-Auth: KOttZHKVOPt523fGDLBofuWw8OU Message-ID: Subject: Re: [lkp-robot] [mm] 1be7107fbe: kernel_BUG_at_mm/mmap.c To: Oleg Nesterov Cc: Hugh Dickins , kernel test robot , Michal Hocko , LKML , LKP Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 715 Lines: 18 On Wed, Jun 21, 2017 at 12:33 PM, Oleg Nesterov wrote: > - if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) { > +if (0) if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) { This smells bad. That test is not about grow-down or even the guard page. That test is that it's always wrong to grow down the stack below %esp. Except we allow some slop, because certain instructions take the page fault before actually updating %rsp. So that patch is not correct. We want a page fault (and *not* expand the stack) if somebody accesses below the stack pointer. If we had a regression, it's due to something else. Linus