Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: HEADS UP: user address 0 mapping disabled



On Sat, Feb 20, 2010 at 06:35:58PM +0000, Eduardo Horvath wrote:
> On Sat, 20 Feb 2010, Matthias Drochner wrote:
> 
> > So I've just changed the kernel to disallow user
> > mappings of address 0 in the default case. This
> > affects use of mmap() and execution of binaries
> > which want to load text or data into the first
> > page. Native NetBSD code is not affected, so in
> 
> Are you disallowing all mappings or just R/W mappings?

It has to be all mappings.

> Since the problem 
> only occurs when you write data to page zero R/O mappings should be 
> allowed, especially sine they can be used by the compiler to optimize 
> pointer chasing operations.

No, the problem is with read/execute mappings.
The only plausibly allowable mapping would be from /dev/zero.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index