Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2005 10:20:58 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        arch@freebsd.org, Suleiman Souhlal <ssouhlal@freebsd.org>
Subject:   Re: [PATCH] randomized mmap
Message-ID:  <b8080f4403ee49f8df1070f42d3eab10@xcllnt.net>
In-Reply-To: <20050530093845.T52379@fledge.watson.org>
References:  <40BB7DA9-472A-476A-B6B0-8C3DFDCC9060@FreeBSD.org> <20050530093845.T52379@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b8080f4403ee49f8df1070f42d3eab10>