Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763266AbXF0Tc5 (ORCPT ); Wed, 27 Jun 2007 15:32:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757046AbXF0Tck (ORCPT ); Wed, 27 Jun 2007 15:32:40 -0400 Received: from extu-mxob-1.symantec.com ([216.10.194.28]:54856 "EHLO extu-mxob-1.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763057AbXF0Tcj (ORCPT ); Wed, 27 Jun 2007 15:32:39 -0400 Date: Wed, 27 Jun 2007 20:32:04 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.wat.veritas.com To: Ulrich Drepper cc: Davide Libenzi , blaisorblade@yahoo.it, Linux Kernel Mailing List Subject: Re: [patch 2/3] MAP_NOZERO - implement sys_brk2() In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Brightmail-Verdict: VlJEQwAAAAIAAAABAAAAAAAAAAEAAAAAAAAABGluYm94AGJsYWlzb3JibGFkZUB5YWhvby5pdABkYXZpZGVsQHhtYWlsc2VydmVyLm9yZwBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnAGRyZXBwZXJAZ21haWwuY29tAA== X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1334 Lines: 31 On Wed, 27 Jun 2007, Ulrich Drepper wrote: > On 6/27/07, Hugh Dickins wrote: > > The absolute virtual addresses are randomized, yes; but do a sequence > > of mmaps and they come back adjacent to each other, and so mergable. > > Or does your distro include a kernel patch to randomize them relative > > to each other? > > Each individual mmap is supposed to be randomized, yes. If this > doesn't happen in one of our kernels right now something broken. You > wouldn't have effective ASLR if all relative address remain the same. Ah, I guess it's an exec_shield thing: vanilla kernel gives us adjacent mmaps which are mergable. As Rik suggest, to make your mmaps adjacent, use the mmap(addr,...) hint. (But please don't then complain that they're not relatively randomized ;) > > It _might_ turn out to be more attractive, not to rely on that > > peculiar sys_remap_file_pages, but make all our vmas independent > > of protections, and hang differently protected ranges off them. > > Maybe. > > That's what I think is done or at least should be done. Noted. Hugh - 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/