From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756481AbaHYSxd (ORCPT ); Mon, 25 Aug 2014 14:53:33 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:35969 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751799AbaHYSxc (ORCPT ); Mon, 25 Aug 2014 14:53:32 -0400 Date: Mon, 25 Aug 2014 11:51:47 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Oleg Nesterov cc: Hugh Dickins , Cyrill Gorcunov , Andrew Morton , Manfred Spraul , Davidlohr Bueso , Kees Cook , Tejun Heo , Andrew Vagin , "Eric W. Biederman" , "H. Peter Anvin" , Serge Hallyn , Pavel Emelyanov , Vasiliy Kulikov , KAMEZAWA Hiroyuki , Michael Kerrisk , Julien Tinnes , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] ipc/shm: fix the historical/wrong mm->start_stack check In-Reply-To: <20140825171820.GB8338@redhat.com> Message-ID: References: <20140823144246.GA6281@redhat.com> <20140823144327.GA6299@redhat.com> <20140823152240.GH25918@moon> <20140823155832.GA9406@redhat.com> <20140825150301.GB3021@redhat.com> <20140825171820.GB8338@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 On Mon, 25 Aug 2014, Oleg Nesterov wrote: > On 08/25, Hugh Dickins wrote: > > > And I think I'll let Linus's guard page justify your 4 (to match comment) > > in place of the original's mysterious 5. > > Ah, thanks again. Yes, if we want to guarantee 4 pages we should check 5. > > Although obviously this doesn't explain the original's 5, this was > written before check_stack_guard_page(). I meant, you changed the coded 5 to 4, to match the comment above it; and if I were insistent on maximizing back-compatible-safety, I would say that 4 should go back to 5; but since Linus added the guard page gap at next->vm_start in between, I don't mind if you stick with 4 there to match the comment. Disclaimer: I may be mistaken in each clause of that paragraph, and you may prefer to ignore everything I wrote there as worthless! But I didn't understand your "to guarantee 4 we should check 5". Hugh