From owner-freebsd-arch@FreeBSD.ORG Mon May 30 17:21:05 2005 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3447416A41C; Mon, 30 May 2005 17:21:05 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC5D443D53; Mon, 30 May 2005 17:21:04 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from [192.168.4.250] (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.13.3/8.13.3) with ESMTP id j4UHL4nG015318; Mon, 30 May 2005 10:21:04 -0700 (PDT) (envelope-from marcel@xcllnt.net) In-Reply-To: <20050530093845.T52379@fledge.watson.org> References: <40BB7DA9-472A-476A-B6B0-8C3DFDCC9060@FreeBSD.org> <20050530093845.T52379@fledge.watson.org> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Mon, 30 May 2005 10:20:58 -0700 To: Robert Watson X-Mailer: Apple Mail (2.622) Cc: arch@freebsd.org, Suleiman Souhlal Subject: Re: [PATCH] randomized mmap X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 17:21:05 -0000 On May 30, 2005, at 1:46 AM, Robert Watson wrote: > On a 32-bit system, this sort of change would be disastrous in terms > of address space fragmentation, I would think. However, on a 64-bit > system, it might be quite a bit less so. However, I'm not sure I'd > implement it this way: in a 64-bit address space, we may want to do a > bit more structuring of the address space and set aside a specific > region for mmap's. Does it make sense to do the randomization only > for mappings with the executable bit set, or implicitly set, when > talking about 64-bit architectures that have a more reasonable notion > of executable than i386? Executable regions are typically read-only. Read-only regions can share TLBs across processes if the kernel supports this. Sharing of TLBs can be a performance booster by reducing TLB pressure in certain environments. Randomization of executable regions will probably hinder the sharing of TLBs to such extend that no sharing is possible. I think the suggestion to do it for executable pages only is not making things better. The benefits of randomizing mmap are questionable as it is, but the implementation is trivial it's not a bother. Keep it simple. It can be committed if it's simple and off by default. Change the implementation into something less trivial and the whole thing become a really bad idea. IMO of course. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net