Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932510Ab1EIXRz (ORCPT ); Mon, 9 May 2011 19:17:55 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:37976 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932437Ab1EIXRw (ORCPT ); Mon, 9 May 2011 19:17:52 -0400 MIME-Version: 1.0 In-Reply-To: References: <1304979549.4865.56.camel@mulgrave.site> From: Linus Torvalds Date: Mon, 9 May 2011 16:17:29 -0700 Message-ID: Subject: Re: [PATCH] Don't mlock guardpage if the stack is growing up To: Tony Luck Cc: James Bottomley , Mikulas Patocka , Fenghua Yu , Hugh Dickins , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, Michel Lespinasse , Oleg Nesterov , linux-ia64@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1572 Lines: 36 On Mon, May 9, 2011 at 4:08 PM, Tony Luck wrote: > > Definitely not for normal processes - I'm not sure how both stacks are > set up for threads. We don't actually allow user space to set the growsup/growsdown bits any more (we have PROT_GROWSUP and PROT_GROWSDOWN, but that is to allow mprotect to not give an exact range, but say "apply this to the end of a growsup/growsdown segment"). So the only thing that has those bits are things that the kernel sets explicitly at exec time. So if ia64 doesn't set it, we're all good. >> One thing I did want to verify: did the mlockall() actually change the >> stack size without that patch? Just to double-check that the patch >> actually did change semantics visibly. > > On an unpatched system I see this (lots more than one page of growth - > pages are 64K on this config): > 6007fffffff50000-6007fffffff70000 rw-p 00000000 00:00 0 > 6007fffffff50000-6008000000750000 rw-p 00000000 00:00 0 > > On a patched system I see (this one has 16K pages - no growth) > 600007ffff9d0000-600007ffff9d4000 rw-p 00000000 00:00 0 > 600007ffff9d0000-600007ffff9d4000 rw-p 00000000 00:00 0 Ok, I'll consider it tested. I'll commit it with Mikulas as author, but note that I edited it so he won't get the blame if there's some problem. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/