From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750719AbWGOQPZ (ORCPT ); Sat, 15 Jul 2006 12:15:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750720AbWGOQPZ (ORCPT ); Sat, 15 Jul 2006 12:15:25 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:25577 "EHLO pentafluge.infradead.org") by vger.kernel.org with ESMTP id S1750719AbWGOQPZ (ORCPT ); Sat, 15 Jul 2006 12:15:25 -0400 Subject: Re: [PATCH] x86: Don't randomize stack unless current->personality permits it From: Arjan van de Ven To: Al Boldi Cc: Frank van Maarseveen , linux-kernel@vger.kernel.org, Andi Kleen In-Reply-To: <200607151709.45870.a1426z@gawab.com> References: <200607112257.22069.a1426z@gawab.com> <200607151429.32298.a1426z@gawab.com> <1152966159.3114.19.camel@laptopd505.fenrus.org> <200607151709.45870.a1426z@gawab.com> Content-Type: text/plain Date: Sat, 15 Jul 2006 18:15:21 +0200 Message-Id: <1152980121.3114.26.camel@laptopd505.fenrus.org> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2006-07-15 at 17:09 +0300, Al Boldi wrote: > Arjan van de Ven wrote: > > On Sat, 2006-07-15 at 14:29 +0300, Al Boldi wrote: > > > Arjan van de Ven wrote: > > > > > BTW, why does randomize_stack_top() mod against (8192*1024) instead > > > > > of (8192) like arch_align_stack()? > > > > > > > > because it wants to randomize for 8Mb, unlike arch_align_stack which > > > > wants to randomize the last 8Kb within this 8Mb ;) > > > > > > Randomizing twice? > > > > a VMA can only be randomized in 4Kb (well page size) granularity, so the > > 8Mb randomization can only work in that 4Kb unit, the "second" > > randomization can work in 16 byte granularity. > > > > > There is even a case where a mere rename or running through an extra > > > shell causes a slowdown. And that's with randomization turned off. > > > > randomization off will slow stuff down yes... you get cache alias > > contention that way. a question.. do you have prelink installed/active on your system? that may very well mess with timings...